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]
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 : Set.Nonempty self.sets
The set of filter basis sets is nonempty.
The set of filter basis sets is directed downwards.
Instances For
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 (U : Set α) (B : FilterBasis α) => 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
- Filter.asBasis f = { 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
Constructs a filter basis from an indexed family of sets satisfying IsBasis
.
Equations
- Filter.IsBasis.filterBasis h = { sets := {t : Set α | ∃ (i : ι), p i ∧ s i = t}, nonempty := ⋯, inter_sets := ⋯ }
Instances For
The filter associated to a filter basis.
Equations
- FilterBasis.filter B = { sets := {s : Set α | ∃ t ∈ B, t ⊆ s}, univ_sets := ⋯, sets_of_superset := ⋯, inter_sets := ⋯ }
Instances For
Constructs a filter from an indexed family of sets satisfying IsBasis
.
Equations
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
- Filter.FilterBasis.ofSets s = { sets := Set.sInter '' {t : Set (Set α) | Set.Finite t ∧ t ⊆ s}, nonempty := ⋯, inter_sets := ⋯ }
Instances For
Index of a basis set such that s i ⊆ t
as an element of Subtype p
.
Equations
- Filter.HasBasis.index h t ht = { val := Exists.choose ⋯, property := ⋯ }
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
.
If {s i | p i}
is a basis of a filter l
and V ∈ l
, then {s i | p i ∧ s i ⊆ V}
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
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 α)), Set.Countable s ∧ f = Filter.generate s
There exists a countable set that generates the filter.
Instances
IsCountableBasis p s
means the image of s
bounded by p
is a countable filter basis.
- nonempty : ∃ (i : ι), p i
- countable : Set.Countable (setOf p)
The set of
i
that satisfy the predicatep
is countable.
Instances For
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 : Set.Countable (setOf p)
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 : Set.Nonempty self.sets
- countable : Set.Countable self.sets
The set of sets of the filter basis is countable.
Instances For
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
A countably generated filter admits a basis formed by an antitone sequence of sets.
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯