Theory of filters on sets #
A filter on a type α is a collection of sets of α which contains the whole α,
is upwards-closed, and is stable under intersection. They are mostly used to
abstract two related kinds of ideas:
- limits, including finite or infinite limits of sequences, finite or infinite limits of functions at a point or at infinity, etc...
- things happening eventually, including things happening for large enough
n : ℕ, or near enough a pointx, or for close enough pairs of points, or things happening almost everywhere in the sense of measure theory. Dually, filters can also express the idea of things happening often: for arbitrarily largen, or at a point in any neighborhood of given a point etc...
Main definitions #
In this file, we endow Filter α it with a complete lattice structure.
This structure is lifted from the lattice structure on Set (Set X) using the Galois
insertion which maps a filter to its elements in one direction, and an arbitrary set of sets to
the smallest filter containing it in the other direction.
We also prove Filter is a monadic functor, with a push-forward operation
Filter.map and a pull-back operation Filter.comap that form a Galois connections for the
order on filters.
The examples of filters appearing in the description of the two motivating ideas are:
(Filter.atTop : Filter ℕ): made of sets ofℕcontaining{n | n ≥ N}for someN𝓝 x: made of neighborhoods ofxin a topological space (defined in topology.basic)𝓤 X: made of entourages of a uniform space (those space are generalizations of metric spaces defined inMathlib/Topology/UniformSpace/Basic.lean)MeasureTheory.ae: made of sets whose complement has zero measure with respect toμ(defined inMathlib/MeasureTheory/OuterMeasure/AE)
The predicate "happening eventually" is Filter.Eventually, and "happening often" is
Filter.Frequently, whose definitions are immediate after Filter is defined (but they come
rather late in this file in order to immediately relate them to the lattice structure).
Notation #
∀ᶠ x in f, p x:f.Eventually p;∃ᶠ x in f, p x:f.Frequently p;f =ᶠ[l] g:∀ᶠ x in l, f x = g x;f ≤ᶠ[l] g:∀ᶠ x in l, f x ≤ g x;𝓟 s:Filter.Principal s, localized inFilter.
References #
- [N. Bourbaki, General Topology][bourbaki1966]
Important note: Bourbaki requires that a filter on X cannot contain all sets of X, which
we do not require. This gives Filter X better formal properties, in particular a bottom element
⊥ for its lattice structure, at the cost of including the assumption
[NeBot f] in a number of lemmas and definitions.
An extensionality lemma that is useful for filters with good lemmas about sᶜ ∈ f (e.g.,
Filter.comap, Filter.coprod, Filter.Coprod, Filter.cofinite).
Equations
- Filter.instTransSetMemSubset = { trans := ⋯ }
Weaker version of Filter.biInter_mem that assumes Subsingleton β rather than Finite β.
Weaker version of Filter.iInter_mem that assumes Subsingleton β rather than Finite β.
GenerateSets g s: s is in the filter closure of g.
- basic {α : Type u} {g : Set (Set α)} {s : Set α} : s ∈ g → GenerateSets g s
- univ {α : Type u} {g : Set (Set α)} : GenerateSets g Set.univ
- superset {α : Type u} {g : Set (Set α)} {s t : Set α} : GenerateSets g s → s ⊆ t → GenerateSets g t
- inter {α : Type u} {g : Set (Set α)} {s t : Set α} : GenerateSets g s → GenerateSets g t → GenerateSets g (s ∩ t)
Instances For
mkOfClosure s hs constructs a filter on α whose elements set is exactly
s : Set (Set α), provided one gives the assumption hs : (generate s).sets = s.
Equations
- Filter.mkOfClosure s hs = { sets := s, univ_sets := ⋯, sets_of_superset := ⋯, inter_sets := ⋯ }
Instances For
Galois insertion from sets of sets into filters.
Equations
- Filter.giGenerate α = { choice := fun (s : Set (Set α)) (hs : (Filter.generate s).sets ≤ s) => Filter.mkOfClosure s ⋯, gc := ⋯, le_l_u := ⋯, choice_eq := ⋯ }
Instances For
Complete lattice structure on Filter α.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Filter.instInhabited = { default := ⊥ }
Either f = ⊥ or Filter.NeBot f. This is a version of eq_or_ne that uses Filter.NeBot
as the second alternative, to be used as an instance.
Alias of the reverse direction of Filter.principal_mono.
Lattice equations #
Alias of Filter.empty_notMem.
Alias of Filter.compl_notMem.
There are only two filters on a Subsingleton: ⊥ and ⊤. If the type is empty, then they are
equal.
Equations
- Filter.instDistribLattice = { toLattice := Filter.instCompleteLatticeFilter.toLattice, le_sup_inf := ⋯ }
If f : ι → Filter α is directed, ι is not empty, and ∀ i, f i ≠ ⊥, then iInf f ≠ ⊥.
See also iInf_neBot_of_directed for a version assuming Nonempty α instead of Nonempty ι.
If f : ι → Filter α is directed, α is not empty, and ∀ i, f i ≠ ⊥, then iInf f ≠ ⊥.
See also iInf_neBot_of_directed' for a version assuming Nonempty ι instead of Nonempty α.
principal equations #
Alias of the reverse direction of Filter.principal_neBot_iff.
Eventually #
Frequently #
Relation “eventually equal” #
Alias of Filter.EventuallyEq.of_eq.
Alias of Filter.EventuallyEq.prodMk.
Equations
- Filter.instTransForallEventuallyEqEventuallyLE = { trans := ⋯ }
Equations
- Filter.instTransForallEventuallyLEEventuallyEq = { trans := ⋯ }
Alias of Filter.EventuallyLE.ge_iff_eq'.