Module docstring
{"# Basic results on filter bases
A filter basis B : FilterBasis α on a type α is a nonempty collection of sets of α
such that the intersection of two elements of this collection contains some element of
the collection. Compared to filters, filter bases do not require that any set containing
an element of B belongs to B.
A filter basis B can be used to construct B.filter : Filter α such that a set belongs
to B.filter if and only if it contains an element of B.
Given an indexing type ι, a predicate p : ι → Prop, and a map s : ι → Set α,
the proposition h : Filter.IsBasis p s makes sure the range of s bounded by p
(ie. s '' setOf p) defines a filter basis h.filterBasis.
If one already has a filter l on α, Filter.HasBasis l p s (where p : ι → Prop
and s : ι → Set α as above) means that a set belongs to l if and
only if it contains some s i with p i. It implies h : Filter.IsBasis p s, and
l = h.filterBasis.filter. The point of this definition is that checking statements
involving elements of l often reduces to checking them on the basis elements.
We define a function HasBasis.index (h : Filter.HasBasis l p s) (t) (ht : t ∈ l) that returns
some index i such that p i and s i ⊆ t. This function can be useful to avoid manual
destruction of h.mem_iff.mpr ht using cases or let.
Main statements
Filter.HasBasis.mem_iff,HasBasis.mem_of_superset,HasBasis.mem_of_mem: restatet ∈ fin terms of a basis;Filter.HasBasis.le_iff,Filter.HasBasis.ge_iff,Filter.HasBasis.le_basis_iff: restatel ≤ l'in terms of bases.Filter.basis_sets: all sets of a filter form a basis;Filter.HasBasis.inf,Filter.HasBasis.inf_principal,Filter.HasBasis.prod,Filter.HasBasis.prod_self,Filter.HasBasis.map,Filter.HasBasis.comap: combinators to construct filters ofl ⊓ l',l ⊓ 𝓟 t,l ×ˢ l',l ×ˢ l,l.map f,l.comap frespectively;Filter.HasBasis.tendsto_right_iff,Filter.HasBasis.tendsto_left_iff,Filter.HasBasis.tendsto_iff: restateTendsto f l l'in terms of bases.
Implementation notes
As with Set.iUnion/biUnion/Set.sUnion, there are three different approaches to filter bases:
Filter.HasBasis l s,s : Set (Set α);Filter.HasBasis l s,s : ι → Set α;Filter.HasBasis l p s,p : ι → Prop,s : ι → Set α.
We use the latter one because, e.g., 𝓝 x in an EMetricSpace or in a MetricSpace has a basis
of this form. The other two can be emulated using s = id or p = fun _ ↦ True.
With this approach sometimes one needs to simp the statement provided by the Filter.HasBasis
machinery, e.g., simp only [true_and_iff] or simp only [forall_const] can help with the case
p = fun _ ↦ True.
Main statements
"}