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
.
This file also introduces more restricted classes of bases, involving monotonicity or
countability. In particular, for l : Filter α
, l.IsCountablyGenerated
means
there is a countable set of sets which generates s
. This is reformulated in term of bases,
and consequences are derived.
Main statements #
Filter.HasBasis.mem_iff
,HasBasis.mem_of_superset
,HasBasis.mem_of_mem
: restatet ∈ f
in terms of a basis;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 f
respectively;Filter.HasBasis.le_iff
,Filter.HasBasis.ge_iff
,Filter.HasBasis.le_basis_iff
: restatel ≤ l'
in terms of bases.Filter.HasBasis.tendsto_right_iff
,Filter.HasBasis.tendsto_left_iff
,Filter.HasBasis.tendsto_iff
: restateTendsto f l l'
in terms of bases.isCountablyGenerated_iff_exists_antitone_basis
: proves a filter is countably generated if and only if it admits a basis parametrized by a decreasing sequence of sets indexed byℕ
.tendsto_iff_seq_tendsto
: an abstract version of "sequentially continuous implies continuous".
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
.
A filter basis B
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.
Sets of a filter basis.
- nonempty : self.sets.Nonempty
The set of filter basis sets is nonempty.
The set of filter basis sets is directed downwards.
Instances For
The set of filter basis sets is nonempty.
The set of filter basis sets is directed downwards.
Equations
- ⋯ = ⋯
If B
is a filter basis on α
, and U
a subset of α
then we can write U ∈ B
as
on paper.
Equations
- instMembershipSetFilterBasis = { mem := fun (B : FilterBasis α) (U : Set α) => U ∈ B.sets }
Equations
- instInhabitedFilterBasisNat = { default := { sets := Set.range Set.Ici, nonempty := instInhabitedFilterBasisNat.proof_1, inter_sets := @instInhabitedFilterBasisNat.proof_2 } }
View a filter as a filter basis.
Equations
- f.asBasis = { sets := f.sets, nonempty := ⋯, inter_sets := ⋯ }
Instances For
is_basis p s
means the image of s
bounded by p
is a filter basis.
- nonempty : ∃ (i : ι), p i
There exists at least one
i
that satisfiesp
. s
is directed downwards oni
such thatp i
.
Instances For
There exists at least one i
that satisfies p
.
s
is directed downwards on i
such that p i
.
Constructs a filter basis from an indexed family of sets satisfying IsBasis
.
Equations
Instances For
The filter associated to a filter basis.
Equations
Instances For
Constructs a filter from an indexed family of sets satisfying IsBasis
.
Equations
- h.filter = h.filterBasis.filter
Instances For
We say that a filter l
has a basis s : ι → Set α
bounded by p : ι → Prop
,
if t ∈ l
if and only if t
includes s i
for some i
such that p i
.
A set
t
belongs to a filterl
iff it includes an element of the basis.
Instances For
The smallest filter basis containing a given collection of sets.
Equations
Instances For
If {s i | p i}
is a basis of a filter l
and each s i
includes s j
such that
p j ∧ q j
, then {s j | p j ∧ q j}
is a basis of l
.
Alias of the reverse direction of Filter.disjoint_principal_principal
.
If s : ι → Set α
is an indexed family of sets, then finite intersections of s i
form a basis
of ⨅ i, 𝓟 (s i)
.
IsAntitoneBasis s
means the image of s
is a filter basis such that s
is decreasing.
Instances For
The sequence of sets is antitone.
We say that a filter l
has an antitone basis s : ι → Set α
, if t ∈ l
if and only if t
includes s i
for some i
, and s
is decreasing.
- antitone : Antitone s
The sequence of sets is antitone.
Instances For
IsCountablyGenerated f
means f = generate s
for some countable s
.
- out : ∃ (s : Set (Set α)), s.Countable ∧ f = Filter.generate s
There exists a countable set that generates the filter.
Instances
There exists a countable set that generates the filter.
IsCountableBasis p s
means the image of s
bounded by p
is a countable filter basis.
- nonempty : ∃ (i : ι), p i
- countable : (setOf p).Countable
The set of
i
that satisfy the predicatep
is countable.
Instances For
The set of i
that satisfy the predicate p
is countable.
We say that a filter l
has a countable basis s : ι → Set α
bounded by p : ι → Prop
,
if t ∈ l
if and only if t
includes s i
for some i
such that p i
, and the set
defined by p
is countable.
- countable : (setOf p).Countable
The set of
i
that satisfy the predicatep
is countable.
Instances For
A countable filter basis B
on a type α
is a nonempty countable collection of sets of α
such that the intersection of two elements of this collection contains some element
of the collection.
- nonempty : self.sets.Nonempty
- countable : self.sets.Countable
The set of sets of the filter basis is countable.
Instances For
The set of sets of the filter basis is countable.
Equations
- Filter.Nat.inhabitedCountableFilterBasis = { default := { toFilterBasis := default, countable := Filter.Nat.inhabitedCountableFilterBasis.proof_1 } }
If f
is countably generated and f.HasBasis p s
, then f
admits a decreasing basis
enumerated by natural numbers such that all sets have the form s i
. More precisely, there is a
sequence i n
such that p (i n)
for all n
and s (i n)
is a decreasing sequence of sets which
forms a basis of f
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯