Definition

A subset FF of a partial order LL is called a filter if it is upward-closed and downward directed, i.e.

  1. if A≤BA \leq B in LL and A∈FA \in F, then B∈FB \in F (upward closed)
  2. for some AA in LL, A∈FA \in F (nonempty)
  3. if A∈FA \in F and B∈FB \in F, then for some C∈FC \in F, C≤AC \leq A and C≤BC \leq B (downward directed)

Notes

  • can define filter in terms of predicate being a filter under similar conditions (whereas instead membership of FF it is defined in terms of truth condition F(A)F(A) being satisfiable on some type AA)

Lean4 definition

A filter F on a type α is a collection of sets of α which contains the whole α, is upwards-closed, and is stable under intersection. We do not forbid this collection to be all sets of α.

structure Filter (α : Type*) where
  /-- The set of sets that belong to the filter. -/
  sets : Set (Set α)
  /-- The set `Set.univ` belongs to any filter. -/
  univ_sets : Set.univ ∈ sets
  /-- If a set belongs to a filter, then its superset belongs to the filter as well. -/
  sets_of_superset {x y} : x ∈ sets → x ⊆ y → y ∈ sets
  /-- If two sets belong to a filter, then their intersection belongs to the filter as well. -/
  inter_sets {x y} : x ∈ sets → y ∈ sets → x ∩ y ∈ sets

See also


References

  1. https://mathworld.wolfram.com/Filter.html
  2. https://ncatlab.org/nlab/show/filter
  3. https://math.stackexchange.com/questions/5045043/is-the-empty-filter-a-filter