The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V13. General topology

Mathlib.Order.Filter.EventuallyConst

44 declarations and 11 deprecated aliases. Mathlib docs · Source

Functions that are eventually constant along a filter

In this file we define a predicate Filter.EventuallyConst f l saying that a function f : α → β is eventually equal to a constant along a filter l. We also prove some basic properties of these functions.

We also define Filter.EventuallyEmptyOrUniv s l, the specialization of EventuallyConst to a set s : Set α, saying that s is eventually empty or eventually equal to univ along l.

Implementation notes

A naive definition of Filter.EventuallyConst f l is ∃ y, ∀ᶠ x in l, f x = y. However, this proposition is false for empty α, β. Instead, we say that Filter.map f l is supported on a subsingleton. This allows us to drop [Nonempty _] assumptions here and there.

TODO

Link this to Function.IsConst and Function.IsConstOn.

def Filter.EventuallyConst E1 #

{α : Type u_1} → {β : Type u_2} → (α → β) → Filter α → Prop

The proposition that a function is eventually constant along a filter on the domain.

theorem Filter.HasBasis.eventuallyConst_iff E0 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f : α → β} {ι : Sort u_5} {p : ι → Prop} {s : ι → Set α},
  l.HasBasis p s → (Filter.EventuallyConst f l ↔ ∃ i, p i ∧ ∀ x ∈ s i, ∀ y ∈ s i, f x = f y)

theorem Filter.HasBasis.eventuallyConst_iff' E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f : α → β} {ι : Sort u_5} {p : ι → Prop} {s : ι → Set α} {x : ι → α},
  l.HasBasis p s → (∀ (i : ι), p i → x i ∈ s i) → (Filter.EventuallyConst f l ↔ ∃ i, p i ∧ ∀ y ∈ s i, f y = f (x i))

theorem Filter.eventuallyConst_iff_tendsto E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f : α → β} [Nonempty β],
  Filter.EventuallyConst f l ↔ ∃ x, Filter.Tendsto f l (pure x)

theorem Filter.EventuallyConst.exists_tendsto E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f : α → β} [Nonempty β],
  Filter.EventuallyConst f l → ∃ x, Filter.Tendsto f l (pure x)

Alias of the forward direction of Filter.eventuallyConst_iff_tendsto.

theorem Filter.EventuallyConst.of_tendsto E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f : α → β} {x : β},
  Filter.Tendsto f l (pure x) → Filter.EventuallyConst f l

theorem Filter.eventuallyConst_iff_exists_eventuallyEq E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f : α → β} [Nonempty β],
  Filter.EventuallyConst f l ↔ ∃ c, f =ᶠ[l] fun x ↦ c

theorem Filter.EventuallyConst.eventuallyEq_const E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f : α → β} [Nonempty β],
  Filter.EventuallyConst f l → ∃ c, f =ᶠ[l] fun x ↦ c

Alias of the forward direction of Filter.eventuallyConst_iff_exists_eventuallyEq.

theorem Filter.eventuallyConst_pred' E1 #

∀ {α : Type u_1} {l : Filter α} {p : α → Prop},
  Filter.EventuallyConst p l ↔ (p =ᶠ[l] fun x ↦ False) ∨ p =ᶠ[l] fun x ↦ True

theorem Filter.eventuallyConst_pred E1 #

∀ {α : Type u_1} {l : Filter α} {p : α → Prop},
  Filter.EventuallyConst p l ↔ (∀ᶠ (x : α) in l, p x) ∨ ∀ᶠ (x : α) in l, ¬p x

def Filter.EventuallyEmptyOrUniv E1 #

{α : Type u_1} → Set α → Filter α → Prop

A set s is eventually empty or eventually universal along a filter l if it is eventually equal to ∅ or to univ.

This is the specialization of Filter.EventuallyConst to s : Set α.

theorem Filter.eventuallyEmptyOrUniv_iff' E1 #

∀ {α : Type u_1} {l : Filter α} {s : Set α}, Filter.EventuallyEmptyOrUniv s l ↔ s =ᶠ[l] ∅ ∨ s =ᶠ[l] Set.univ

theorem Filter.eventuallyEmptyOrUniv_iff E0 #

∀ {α : Type u_1} {l : Filter α} {s : Set α},
  Filter.EventuallyEmptyOrUniv s l ↔ (∀ᶠ (x : α) in l, x ∈ s) ∨ ∀ᶠ (x : α) in l, x ∉ s

theorem Filter.eventuallyEmptyOrUniv_preimage E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {s : Set β} {f : α → β},
  Filter.EventuallyEmptyOrUniv (f ⁻¹' s) l ↔ Filter.EventuallyEmptyOrUniv s (Filter.map f l)

theorem Filter.EventuallyEq.eventuallyConst_iff E0 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f g : α → β},
  f =ᶠ[l] g → (Filter.EventuallyConst f l ↔ Filter.EventuallyConst g l)

theorem Filter.eventuallyConst_id E0 #

∀ {α : Type u_1} {l : Filter α}, Filter.EventuallyConst id l ↔ l.Subsingleton

theorem Filter.EventuallyConst.bot E0 #

∀ {α : Type u_1} {β : Type u_2} {f : α → β}, Filter.EventuallyConst f ⊥

theorem Filter.EventuallyConst.const E0 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} (c : β), Filter.EventuallyConst (fun x ↦ c) l

theorem Filter.EventuallyConst.congr E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f g : α → β},
  Filter.EventuallyConst f l → f =ᶠ[l] g → Filter.EventuallyConst g l

theorem Filter.EventuallyConst.of_subsingleton_right E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f : α → β} [Subsingleton β], Filter.EventuallyConst f l

theorem Filter.EventuallyConst.anti E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f : α → β} {l' : Filter α},
  Filter.EventuallyConst f l → l' ≤ l → Filter.EventuallyConst f l'

theorem Filter.EventuallyConst.of_subsingleton_left E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f : α → β} [Subsingleton α], Filter.EventuallyConst f l

theorem Filter.EventuallyConst.comp E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {l : Filter α} {f : α → β},
  Filter.EventuallyConst f l → ∀ (g : β → γ), Filter.EventuallyConst (g ∘ f) l

theorem Filter.EventuallyConst.neg E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f : α → β} [inst : Neg β],
  Filter.EventuallyConst f l → Filter.EventuallyConst (-f) l

theorem Filter.EventuallyConst.inv E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f : α → β} [inst : Inv β],
  Filter.EventuallyConst f l → Filter.EventuallyConst f⁻¹ l

theorem Filter.EventuallyConst.comp_tendsto E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {l : Filter α} {f : α → β} {lb : Filter β} {g : β → γ},
  Filter.EventuallyConst g lb → Filter.Tendsto f l lb → Filter.EventuallyConst (g ∘ f) l

theorem Filter.EventuallyConst.apply E1 #

∀ {α : Type u_1} {l : Filter α} {ι : Type u_5} {p : ι → Type u_6} {g : α → (x : ι) → p x},
  Filter.EventuallyConst g l → ∀ (i : ι), Filter.EventuallyConst (fun x ↦ g x i) l

theorem Filter.EventuallyConst.comp₂ E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {l : Filter α} {f : α → β} {g : α → γ},
  Filter.EventuallyConst f l →
    ∀ (op : β → γ → δ), Filter.EventuallyConst g l → Filter.EventuallyConst (fun x ↦ op (f x) (g x)) l

theorem Filter.EventuallyConst.prodMk E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {l : Filter α} {f : α → β} {g : α → γ},
  Filter.EventuallyConst f l → Filter.EventuallyConst g l → Filter.EventuallyConst (fun x ↦ (f x, g x)) l

theorem Filter.EventuallyConst.add E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f : α → β} [inst : Add β] {g : α → β},
  Filter.EventuallyConst f l → Filter.EventuallyConst g l → Filter.EventuallyConst (f + g) l

theorem Filter.EventuallyConst.mul E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} {f : α → β} [inst : Mul β] {g : α → β},
  Filter.EventuallyConst f l → Filter.EventuallyConst g l → Filter.EventuallyConst (f * g) l

theorem Filter.EventuallyEmptyOrUniv.bot E0 #

∀ {α : Type u_1} {s : Set α}, Filter.EventuallyEmptyOrUniv s ⊥

theorem Filter.EventuallyEmptyOrUniv.congr E1 #

∀ {α : Type u_1} {l : Filter α} {s t : Set α},
  Filter.EventuallyEmptyOrUniv s l → s =ᶠ[l] t → Filter.EventuallyEmptyOrUniv t l

theorem Filter.EventuallyEmptyOrUniv.anti E1 #

∀ {α : Type u_1} {l : Filter α} {s : Set α} {l' : Filter α},
  Filter.EventuallyEmptyOrUniv s l → l' ≤ l → Filter.EventuallyEmptyOrUniv s l'

theorem Filter.EventuallyEmptyOrUniv.of_mulIndicator_const E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} [inst : One β] {s : Set α} {c : β},
  Filter.EventuallyConst (s.mulIndicator fun x ↦ c) l → c ≠ 1 → Filter.EventuallyEmptyOrUniv s l

theorem Filter.EventuallyEmptyOrUniv.of_indicator_const E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} [inst : Zero β] {s : Set α} {c : β},
  Filter.EventuallyConst (s.indicator fun x ↦ c) l → c ≠ 0 → Filter.EventuallyEmptyOrUniv s l

theorem Filter.EventuallyEmptyOrUniv.mulIndicator_const E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} [inst : One β] {s : Set α},
  Filter.EventuallyEmptyOrUniv s l → ∀ (c : β), Filter.EventuallyConst (s.mulIndicator fun x ↦ c) l

theorem Filter.EventuallyEmptyOrUniv.indicator_const E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} [inst : Zero β] {s : Set α},
  Filter.EventuallyEmptyOrUniv s l → ∀ (c : β), Filter.EventuallyConst (s.indicator fun x ↦ c) l

theorem Filter.EventuallyEmptyOrUniv.indicator_const_iff_of_ne E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} [inst : Zero β] {s : Set α} {c : β},
  c ≠ 0 → (Filter.EventuallyConst (s.indicator fun x ↦ c) l ↔ Filter.EventuallyEmptyOrUniv s l)

theorem Filter.EventuallyEmptyOrUniv.mulIndicator_const_iff_of_ne E1 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} [inst : One β] {s : Set α} {c : β},
  c ≠ 1 → (Filter.EventuallyConst (s.mulIndicator fun x ↦ c) l ↔ Filter.EventuallyEmptyOrUniv s l)

theorem Filter.EventuallyEmptyOrUniv.mulIndicator_const_iff E0 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} [inst : One β] {s : Set α} {c : β},
  Filter.EventuallyConst (s.mulIndicator fun x ↦ c) l ↔ c = 1 ∨ Filter.EventuallyEmptyOrUniv s l

theorem Filter.EventuallyEmptyOrUniv.indicator_const_iff E0 #

∀ {α : Type u_1} {β : Type u_2} {l : Filter α} [inst : Zero β] {s : Set α} {c : β},
  Filter.EventuallyConst (s.indicator fun x ↦ c) l ↔ c = 0 ∨ Filter.EventuallyEmptyOrUniv s l

theorem Filter.eventuallyConst_atTop E1 #

∀ {α : Type u_1} {β : Type u_2} {f : α → β} [inst : SemilatticeSup α] [Nonempty α],
  Filter.EventuallyConst f Filter.atTop ↔ ∃ i, ∀ (j : α), i ≤ j → f j = f i

theorem Filter.eventuallyConst_atTop_nat E1 #

∀ {α : Type u_1} {f : ℕ → α}, Filter.EventuallyConst f Filter.atTop ↔ ∃ n, ∀ (m : ℕ), n ≤ m → f (m + 1) = f m

Deprecated aliases

NameNew nameSince
Filter.EventuallyConst.indicator_constFilter.EventuallyEmptyOrUniv.indicator_const2026-08-25
Filter.EventuallyConst.indicator_const_iffFilter.EventuallyEmptyOrUniv.indicator_const_iff2026-08-25
Filter.EventuallyConst.indicator_const_iff_of_neFilter.EventuallyEmptyOrUniv.indicator_const_iff_of_ne2026-08-25
Filter.EventuallyConst.mulIndicator_constFilter.EventuallyEmptyOrUniv.mulIndicator_const2026-08-25
Filter.EventuallyConst.mulIndicator_const_iffFilter.EventuallyEmptyOrUniv.mulIndicator_const_iff2026-08-25
Filter.EventuallyConst.mulIndicator_const_iff_of_neFilter.EventuallyEmptyOrUniv.mulIndicator_const_iff_of_ne2026-08-25
Filter.EventuallyConst.of_indicator_constFilter.EventuallyEmptyOrUniv.of_indicator_const2026-08-25
Filter.EventuallyConst.of_mulIndicator_constFilter.EventuallyEmptyOrUniv.of_mulIndicator_const2026-08-25
Filter.eventuallyConst_preimageFilter.eventuallyEmptyOrUniv_preimage2026-08-25
Filter.eventuallyConst_setFilter.eventuallyEmptyOrUniv_iff2026-08-25
Filter.eventuallyConst_set'Filter.eventuallyEmptyOrUniv_iff'2026-08-25