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
.
Sets of a filter basis.
- nonempty : Set.Nonempty s.sets
The set of filter basis sets is nonempty.
The set of filter basis sets is directed downwards.
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.
Instances For
If B
is a filter basis on α
, and U
a subset of α
then we can write U ∈ B
as
on paper.
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
Instances For
- nonempty : ∃ i, p i
There exists at least one
i
that satisfiesp
. s
is directed downwards oni
such thatp i
.
is_basis p s
means the image of s
bounded by p
is a filter basis.
Instances For
Constructs a filter basis from an indexed family of sets satisfying IsBasis
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The filter associated to a filter basis.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Constructs a filter from an indexed family of sets satisfying IsBasis
.
Equations
Instances For
A set
t
belongs to a filterl
iff it includes an element of the basis.
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
.
Instances For
The smallest filter basis containing a given collection of sets.
Equations
- One or more equations did not get rendered due to their size.
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 (_ : ∃ i, p i ∧ s i ⊆ t), property := Filter.HasBasis.index.proof_2 h t ht }
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
- antitone : Antitone s✝
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.
Instances For
- out : ∃ s, Set.Countable s ∧ f = Filter.generate s
There exists a countable set that generates the filter.
IsCountablyGenerated f
means f = generate s
for some countable s
.
Instances
- nonempty : ∃ i, p i
- countable : Set.Countable (setOf p)
The set of
i
that satisfy the predicatep
is countable.
IsCountableBasis p s
means the image of s
bounded by p
is a countable filter basis.
Instances For
- countable : Set.Countable (setOf p)
The set of
i
that satisfy the predicatep
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.
Instances For
- nonempty : Set.Nonempty s.sets
- countable : Set.Countable s.sets
The set of sets of the filter basis is countable.
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.
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.