Skip to content
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Mathlib/Data/ENat/Lattice.lean
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ lemma coe_iSup : BddAbove (range f) → ↑(⨆ i, f i) = ⨆ i, (f i : ℕ∞)
lemma iInf_eq_top_of_isEmpty [IsEmpty ι] : ⨅ i, (f i : ℕ∞) = ⊤ :=
iInf_coe_eq_top.mpr ‹_›

lemma iInf_eq_coe_iff {f : ι → ℕ∞} {n : ℕ} :
⨅ i, f i = n ↔ (∃ i, f i = n) ∧ ∀ i, n ≤ f i := by
by_cases! hι : IsEmpty ι
· simp [iInf_of_isEmpty]
apply ciInf_eq_iff

lemma iInf_toNat : (⨅ i, (f i : ℕ∞)).toNat = ⨅ i, f i := by
cases isEmpty_or_nonempty ι
· simp
Expand Down
9 changes: 9 additions & 0 deletions Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,15 @@ theorem le_csInf_iff' (hs : s.Nonempty) : b ≤ sInf s ↔ b ∈ lowerBounds s :
theorem csInf_mem (hs : s.Nonempty) : sInf s ∈ s :=
(isLeast_csInf hs).1

lemma csInf_eq_iff (hs : s.Nonempty) (n : α) :
sInf s = n ↔ n ∈ s ∧ ∀ a ∈ s, n ≤ a := by
have : OrderBot α := WellFoundedLT.toOrderBot
constructor
· intro rfl
exact ⟨csInf_mem hs, fun _ ↦ csInf_le (OrderBot.bddBelow s)⟩
· intro ⟨hn, hle⟩
apply le_antisymm (csInf_le (OrderBot.bddBelow s) hn) (le_csInf hs hle)

theorem MonotoneOn.map_csInf {β : Type*} [ConditionallyCompleteLattice β] {f : α → β}
(hf : MonotoneOn f s) (hs : s.Nonempty) : f (sInf s) = sInf (f '' s) :=
(hf.map_isLeast (isLeast_csInf hs)).csInf_eq.symm
Expand Down
6 changes: 6 additions & 0 deletions Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,12 @@ variable [WellFoundedLT α]
theorem ciInf_mem [Nonempty ι] (f : ι → α) : iInf f ∈ range f :=
csInf_mem (range_nonempty f)

lemma ciInf_eq_iff [Nonempty ι] (f : ι → α) (n : α) :
⨅ i, (f i) = n ↔ (∃ i, f i = n) ∧ ∀ i, n ≤ f i := by
have : OrderBot α := WellFoundedLT.toOrderBot
refine ⟨(· ▸ ⟨ciInf_mem f, ciInf_le (OrderBot.bddBelow ..)⟩), fun ⟨⟨i, hi⟩, h⟩ ↦ ?_⟩
exact le_antisymm (hi ▸ ciInf_le (OrderBot.bddBelow ..) _) (le_ciInf h)

end ConditionallyCompleteLinearOrder

/-!
Expand Down
Loading