# Documentation

Mathlib.Order.Filter.Ultrafilter

# Ultrafilters #

An ultrafilter is a minimal (maximal in the set order) proper filter. In this file we define

• Ultrafilter.of: an ultrafilter that is less than or equal to a given filter;
• Ultrafilter: subtype of ultrafilters;
• pure x : Ultrafilter α: pure x as an ultrafiler;
• Ultrafilter.map, Ultrafilter.bind, Ultrafilter.comap : operations on ultrafilters;
• hyperfilter: the ultrafilter extending the cofinite filter.

Filter α is an atomic type: for every filter there exists an ultrafilter that is less than or equal to this filter.

Equations
• One or more equations did not get rendered due to their size.
structure Ultrafilter (α : Type u_1) extends :
Type u_1
• An ultrafilter is nontrivial.

neBot' : Filter.NeBot toFilter
• If g is a nontrivial filter that is less than or equal to an ultrafilter, then it is greater than or equal to the ultrafilter.

le_of_le : ∀ (g : ), g toFiltertoFilter g

An ultrafilter is a minimal (maximal in the set order) proper filter.

Instances For
Equations
• Ultrafilter.instCoeTCUltrafilterFilter = { coe := Ultrafilter.toFilter }
Equations
• Ultrafilter.instMembershipSetUltrafilter = { mem := fun s f => s f }
theorem Ultrafilter.unique {α : Type u} (f : ) {g : } (h : g f) (hne : ) :
g = f
instance Ultrafilter.neBot {α : Type u} (f : ) :
Equations
theorem Ultrafilter.isAtom {α : Type u} (f : ) :
IsAtom f
@[simp]
theorem Ultrafilter.mem_coe {α : Type u} {f : } {s : Set α} :
s f s f
theorem Ultrafilter.coe_injective {α : Type u} :
Function.Injective Ultrafilter.toFilter
theorem Ultrafilter.eq_of_le {α : Type u} {f : } {g : } (h : f g) :
f = g
@[simp]
theorem Ultrafilter.coe_le_coe {α : Type u} {f : } {g : } :
f g f = g
@[simp]
theorem Ultrafilter.coe_inj {α : Type u} {f : } {g : } :
f = g f = g
theorem Ultrafilter.ext {α : Type u} ⦃f : ⦃g : (h : ∀ (s : Set α), s f s g) :
f = g
theorem Ultrafilter.le_of_inf_neBot {α : Type u} (f : ) {g : } (hg : Filter.NeBot (f g)) :
f g
theorem Ultrafilter.le_of_inf_neBot' {α : Type u} (f : ) {g : } (hg : Filter.NeBot (g f)) :
f g
theorem Ultrafilter.inf_neBot_iff {α : Type u} {f : } {g : } :
Filter.NeBot (f g) f g
theorem Ultrafilter.disjoint_iff_not_le {α : Type u} {f : } {g : } :
Disjoint (f) g ¬f g
@[simp]
theorem Ultrafilter.compl_not_mem_iff {α : Type u} {f : } {s : Set α} :
¬s f s f
@[simp]
theorem Ultrafilter.frequently_iff_eventually {α : Type u} {f : } {p : αProp} :
Filter.Frequently (fun x => p x) f Filter.Eventually (fun x => p x) f
theorem Filter.Frequently.eventually {α : Type u} {f : } {p : αProp} :
Filter.Frequently (fun x => p x) fFilter.Eventually (fun x => p x) f

Alias of the forward direction of Ultrafilter.frequently_iff_eventually.

theorem Ultrafilter.compl_mem_iff_not_mem {α : Type u} {f : } {s : Set α} :
s f ¬s f
theorem Ultrafilter.diff_mem_iff {α : Type u} {s : Set α} {t : Set α} (f : ) :
s \ t f s f ¬t f
def Ultrafilter.ofComplNotMemIff {α : Type u} (f : ) (h : ∀ (s : Set α), ¬s f s f) :

If sᶜ ∉ f ↔ s ∈ f∉ f ↔ s ∈ f↔ s ∈ f∈ f, then f is an ultrafilter. The other implication is given by Ultrafilter.compl_not_mem_iff.

Equations
• = { toFilter := f, neBot' := (_ : ), le_of_le := (_ : ∀ (g : ), g f∀ (s : Set α), s gs f) }
def Ultrafilter.ofAtom {α : Type u} (f : ) (hf : ) :

If f : Filter α is an atom, then it is an ultrafilter.

Equations
• = { toFilter := f, neBot' := (_ : ), le_of_le := (_ : ∀ (g : ), g ff g) }
theorem Ultrafilter.nonempty_of_mem {α : Type u} {f : } {s : Set α} (hs : s f) :
theorem Ultrafilter.ne_empty_of_mem {α : Type u} {f : } {s : Set α} (hs : s f) :
@[simp]
theorem Ultrafilter.empty_not_mem {α : Type u} {f : } :
@[simp]
theorem Ultrafilter.le_sup_iff {α : Type u} {u : } {f : } {g : } :
u f g u f u g
@[simp]
theorem Ultrafilter.union_mem_iff {α : Type u} {f : } {s : Set α} {t : Set α} :
s t f s f t f
theorem Ultrafilter.mem_or_compl_mem {α : Type u} (f : ) (s : Set α) :
s f s f
theorem Ultrafilter.em {α : Type u} (f : ) (p : αProp) :
Filter.Eventually (fun x => p x) f Filter.Eventually (fun x => ¬p x) f
theorem Ultrafilter.eventually_or {α : Type u} {f : } {p : αProp} {q : αProp} :
Filter.Eventually (fun x => p x q x) f Filter.Eventually (fun x => p x) f Filter.Eventually (fun x => q x) f
theorem Ultrafilter.eventually_not {α : Type u} {f : } {p : αProp} :
Filter.Eventually (fun x => ¬p x) f ¬Filter.Eventually (fun x => p x) f
theorem Ultrafilter.eventually_imp {α : Type u} {f : } {p : αProp} {q : αProp} :
Filter.Eventually (fun x => p xq x) f Filter.Eventually (fun x => p x) fFilter.Eventually (fun x => q x) f
theorem Ultrafilter.finite_unionₛ_mem_iff {α : Type u} {f : } {s : Set (Set α)} (hs : ) :
⋃₀ s f t, t s t f
theorem Ultrafilter.finite_bunionᵢ_mem_iff {α : Type u} {β : Type v} {f : } {is : Set β} {s : βSet α} (his : ) :
(Set.unionᵢ fun i => Set.unionᵢ fun h => s i) f i, i is s i f
def Ultrafilter.map {α : Type u} {β : Type v} (m : αβ) (f : ) :

Pushforward for ultrafilters.

Equations
@[simp]
theorem Ultrafilter.coe_map {α : Type u} {β : Type v} (m : αβ) (f : ) :
↑() = Filter.map m f
@[simp]
theorem Ultrafilter.mem_map {α : Type u} {β : Type v} {m : αβ} {f : } {s : Set β} :
s m ⁻¹' s f
@[simp]
theorem Ultrafilter.map_id {α : Type u} (f : ) :
= f
@[simp]
theorem Ultrafilter.map_id' {α : Type u} (f : ) :
Ultrafilter.map (fun x => x) f = f
@[simp]
theorem Ultrafilter.map_map {α : Type u} {β : Type v} {γ : Type u_1} (f : ) (m : αβ) (n : βγ) :
def Ultrafilter.comap {α : Type u} {β : Type v} {m : αβ} (u : ) (inj : ) (large : u) :

The pullback of an ultrafilter along an injection whose range is large with respect to the given ultrafilter.

Equations
• One or more equations did not get rendered due to their size.
@[simp]
theorem Ultrafilter.mem_comap {α : Type u} {β : Type v} {m : αβ} (u : ) (inj : ) (large : u) {s : Set α} :
s Ultrafilter.comap u inj large m '' s u
@[simp]
theorem Ultrafilter.coe_comap {α : Type u} {β : Type v} {m : αβ} (u : ) (inj : ) (large : u) :
↑(Ultrafilter.comap u inj large) = Filter.comap m u
@[simp]
theorem Ultrafilter.comap_id {α : Type u} (f : ) (h₀ : optParam () (_ : )) (h₁ : optParam ( f) (_ : f)) :
Ultrafilter.comap f h₀ h₁ = f
@[simp]
theorem Ultrafilter.comap_comap {α : Type u} {β : Type v} {γ : Type u_1} (f : ) {m : αβ} {n : βγ} (inj₀ : ) (large₀ : f) (inj₁ : ) (large₁ : Ultrafilter.comap f inj₀ large₀) (inj₂ : optParam (Function.Injective (n m)) (_ : Function.Injective (n m))) (large₂ : optParam (Set.range (n m) f) (_ : Set.range (n m) f)) :
Ultrafilter.comap (Ultrafilter.comap f inj₀ large₀) inj₁ large₁ = Ultrafilter.comap f inj₂ large₂

The principal ultrafilter associated to a point x.

Equations
@[simp]
theorem Ultrafilter.mem_pure {α : Type u} {a : α} {s : Set α} :
s pure a a s
@[simp]
theorem Ultrafilter.coe_pure {α : Type u} (a : α) :
↑(pure a) = pure a
@[simp]
theorem Ultrafilter.map_pure {α : Type u} {β : Type v} (m : αβ) (a : α) :
@[simp]
theorem Ultrafilter.comap_pure {α : Type u} {β : Type v} {m : αβ} (a : α) (inj : ) (large : pure (m a)) :
Ultrafilter.comap (pure (m a)) inj large = pure a
instance Ultrafilter.instInhabitedUltrafilter {α : Type u} [inst : ] :
Equations
• Ultrafilter.instInhabitedUltrafilter = { default := pure default }
instance Ultrafilter.instNonemptyUltrafilter {α : Type u} [inst : ] :
Equations
theorem Ultrafilter.eq_pure_of_finite_mem {α : Type u} {f : } {s : Set α} (h : ) (h' : s f) :
x, x s f = pure x
theorem Ultrafilter.eq_pure_of_finite {α : Type u} [inst : ] (f : ) :
a, f = pure a
theorem Ultrafilter.le_cofinite_or_eq_pure {α : Type u} (f : ) :
f Filter.cofinite a, f = pure a
def Ultrafilter.bind {α : Type u} {β : Type v} (f : ) (m : α) :

Monadic bind for ultrafilters, coming from the one on filters defined in terms of map and join.

Equations
Equations
Equations
theorem Ultrafilter.exists_le {α : Type u} (f : ) [h : ] :
u, u f

The ultrafilter lemma: Any proper filter is contained in an ultrafilter.

theorem Filter.exists_ultrafilter_le {α : Type u} (f : ) [h : ] :
u, u f

Alias of Ultrafilter.exists_le.

noncomputable def Ultrafilter.of {α : Type u} (f : ) [inst : ] :

Construct an ultrafilter extending a given filter. The ultrafilter lemma is the assertion that such a filter exists; we use the axiom of choice to pick one.

Equations
theorem Ultrafilter.of_le {α : Type u} (f : ) [inst : ] :
↑() f
theorem Ultrafilter.of_coe {α : Type u} (f : ) :
= f
theorem Ultrafilter.exists_ultrafilter_of_finite_inter_nonempty {α : Type u} (S : Set (Set α)) (cond : ∀ (T : Finset (Set α)), T SSet.Nonempty (⋂₀ T)) :
F, S (F).sets
theorem Filter.isAtom_pure {α : Type u} {a : α} :
theorem Filter.NeBot.le_pure_iff {α : Type u} {f : } {a : α} (hf : ) :
f pure a f = pure a
@[simp]
theorem Filter.lt_pure_iff {α : Type u} {f : } {a : α} :
f < pure a f =
theorem Filter.le_pure_iff' {α : Type u} {f : } {a : α} :
f pure a f = f = pure a
@[simp]
theorem Filter.Iic_pure {α : Type u} (a : α) :
Set.Iic (pure a) = {, pure a}
theorem Filter.mem_iff_ultrafilter {α : Type u} {f : } {s : Set α} :
s f ∀ (g : ), g fs g
theorem Filter.le_iff_ultrafilter {α : Type u} {f₁ : } {f₂ : } :
f₁ f₂ ∀ (g : ), g f₁g f₂
theorem Filter.supᵢ_ultrafilter_le_eq {α : Type u} (f : ) :
(g, _hg, g) = f

A filter equals the intersection of all the ultrafilters which contain it.

theorem Filter.tendsto_iff_ultrafilter {α : Type u} {β : Type v} (f : αβ) (l₁ : ) (l₂ : ) :
Filter.Tendsto f l₁ l₂ ∀ (g : ), g l₁Filter.Tendsto f (g) l₂

The tendsto relation can be checked on ultrafilters.

theorem Filter.exists_ultrafilter_iff {α : Type u} {f : } :
(u, u f)
theorem Filter.forall_neBot_le_iff {α : Type u} {g : } {p : Prop} (hp : ) :
((f : ) → f gp f) (f : ) → f gp f
noncomputable def Filter.hyperfilter (α : Type u) [inst : ] :

The ultrafilter extending the cofinite filter.

Equations
theorem Filter.hyperfilter_le_cofinite {α : Type u} [inst : ] :
↑() Filter.cofinite
@[simp]
theorem Filter.bot_ne_hyperfilter {α : Type u} [inst : ] :
↑()
theorem Filter.nmem_hyperfilter_of_finite {α : Type u} [inst : ] {s : Set α} (hf : ) :
theorem Set.Finite.nmem_hyperfilter {α : Type u} [inst : ] {s : Set α} (hf : ) :

Alias of Filter.nmem_hyperfilter_of_finite.

theorem Filter.compl_mem_hyperfilter_of_finite {α : Type u} [inst : ] {s : Set α} (hf : ) :
theorem Set.Finite.compl_mem_hyperfilter {α : Type u} [inst : ] {s : Set α} (hf : ) :

Alias of Filter.compl_mem_hyperfilter_of_finite.

theorem Filter.mem_hyperfilter_of_finite_compl {α : Type u} [inst : ] {s : Set α} (hf : Set.Finite (s)) :
theorem Ultrafilter.comap_inf_principal_neBot_of_image_mem {α : Type u} {β : Type v} {m : αβ} {s : Set α} {g : } (h : m '' s g) :
noncomputable def Ultrafilter.ofComapInfPrincipal {α : Type u} {β : Type v} {m : αβ} {s : Set α} {g : } (h : m '' s g) :

Ultrafilter extending the inf of a comapped ultrafilter and a principal ultrafilter.

Equations
theorem Ultrafilter.ofComapInfPrincipal_mem {α : Type u} {β : Type v} {m : αβ} {s : Set α} {g : } (h : m '' s g) :
theorem Ultrafilter.ofComapInfPrincipal_eq_of_map {α : Type u} {β : Type v} {m : αβ} {s : Set α} {g : } (h : m '' s g) :