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 ∈ f
in 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 f
respectively;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 #
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.
The set of filter basis sets is nonempty.
The set of filter basis sets is directed downwards.
Instances For
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.
Instances For
IsBasis 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
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
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
.
IsAntitoneBasis s
means the image of s
is a filter basis such that s
is decreasing.
- antitone : Antitone s''
The sequence of sets is antitone.
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.