Filter bases #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
A filter basis B : filter_basis α
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.is_basis p s
makes sure the range of s
bounded by p
(ie. s '' set_of p
) defines a filter basis h.filter_basis
.
If one already has a filter l
on α
, filter.has_basis 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.is_basis p s
, and
l = h.filter_basis.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 has_basis.index (h : filter.has_basis 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.is_countably_generated
means
there is a countable set of sets which generates s
. This is reformulated in term of bases,
and consequences are derived.
Main statements #
has_basis.mem_iff
,has_basis.mem_of_superset
,has_basis.mem_of_mem
: restatet ∈ f
in terms of a basis;basis_sets
: all sets of a filter form a basis;has_basis.inf
,has_basis.inf_principal
,has_basis.prod
,has_basis.prod_self
,has_basis.map
,has_basis.comap
: combinators to construct filters ofl ⊓ l'
,l ⊓ 𝓟 t
,l ×ᶠ l'
,l ×ᶠ l
,l.map f
,l.comap f
respectively;has_basis.le_iff
,has_basis.ge_iff
, has_basis.le_basis_iff: restate
l ≤ l'` in terms of bases.has_basis.tendsto_right_iff
,has_basis.tendsto_left_iff
,has_basis.tendsto_iff
: restatetendsto f l l'
in terms of bases.is_countably_generated_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 Union
/bUnion
/sUnion
, there are three different approaches to filter bases:
has_basis l s
,s : set (set α)
;has_basis l s
,s : ι → set α
;has_basis l p s
,p : ι → Prop
,s : ι → set α
.
We use the latter one because, e.g., 𝓝 x
in an emetric_space
or in a metric_space
has a basis
of this form. The other two can be emulated using s = id
or p = λ _, true
.
With this approach sometimes one needs to simp
the statement provided by the has_basis
machinery, e.g., simp only [exists_prop, true_and]
or simp only [forall_const]
can help
with the case p = λ _, true
.
- sets : set (set α)
- nonempty : self.sets.nonempty
- inter_sets : ∀ {x y : set α}, x ∈ self.sets → y ∈ self.sets → (∃ (z : set α) (H : z ∈ self.sets), z ⊆ x ∩ y)
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 filter_basis
- filter_basis.has_sizeof_inst
- filter_basis.has_mem
- filter_basis.inhabited
If B
is a filter basis on α
, and U
a subset of α
then we can write U ∈ B
as
on paper.
Equations
- filter_basis.has_mem = {mem := λ (U : set α) (B : filter_basis α), U ∈ B.sets}
Equations
- filter_basis.inhabited = {default := {sets := set.range set.Ici, nonempty := filter_basis.inhabited._proof_1, inter_sets := filter_basis.inhabited._proof_2}}
View a filter as a filter basis.
Constructs a filter basis from an indexed family of sets satisfying is_basis
.
The filter associated to a filter basis.
Constructs a filter from an indexed family of sets satisfying is_basis
.
Equations
- h.filter = h.filter_basis.filter
The smallest filter basis containing a given collection of sets.
Equations
- filter.filter_basis.of_sets s = {sets := set.sInter '' {t : set (set α) | t.finite ∧ t ⊆ s}, nonempty := _, inter_sets := _}
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
.
- to_is_basis : filter.is_basis (λ (_x : ι''), true) s''
- antitone : antitone s''
is_antitone_basis s
means the image of s
is a filter basis such that s
is decreasing.
is_countably_generated f
means f = generate s
for some countable s
.
Instances of this typeclass
- at_top_countably_generated_of_archimedean
- at_bot_countably_generated_of_archimedean
- filter.at_top.is_countably_generated
- filter.at_bot.is_countably_generated
- emetric.uniformity.filter.is_countably_generated
- filter.inf.is_countably_generated
- filter.map.is_countably_generated
- filter.comap.is_countably_generated
- filter.sup.is_countably_generated
- filter.prod.is_countably_generated
- filter.coprod.is_countably_generated
- filter.is_countably_generated_principal
- filter.is_countably_generated_pure
- filter.is_countably_generated_bot
- filter.is_countably_generated_top
- filter.infi.is_countably_generated
- filter.pi.is_countably_generated
- topological_space.first_countable_topology.nhds_generated_countable
- topological_space.is_countably_generated_nhds_within
- quotient_group.nhds_one_is_countably_generated
- quotient_add_group.nhds_zero_is_countably_generated
- filter.nhds.is_countably_generated
- to_is_basis : filter.is_basis p s
- countable : (set_of p).countable
is_countable_basis p s
means the image of s
bounded by p
is a countable filter basis.
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.
- to_filter_basis : filter_basis α
- countable : self.to_filter_basis.sets.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 filter.countable_filter_basis
- filter.countable_filter_basis.has_sizeof_inst
- filter.nat.inhabited_countable_filter_basis
Equations
- filter.nat.inhabited_countable_filter_basis = {default := {to_filter_basis := {sets := inhabited.default.sets, nonempty := filter.nat.inhabited_countable_filter_basis._proof_1, inter_sets := filter.nat.inhabited_countable_filter_basis._proof_2}, countable := filter.nat.inhabited_countable_filter_basis._proof_3}}
If f
is countably generated and f.has_basis 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.