diff --git a/Mathlib/Data/ENat/Lattice.lean b/Mathlib/Data/ENat/Lattice.lean index eee647b6bd108c..c50803a8f63b5b 100644 --- a/Mathlib/Data/ENat/Lattice.lean +++ b/Mathlib/Data/ENat/Lattice.lean @@ -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 diff --git a/Mathlib/Order/ConditionallyCompleteLattice/Basic.lean b/Mathlib/Order/ConditionallyCompleteLattice/Basic.lean index 9a399fc8db1899..cd6aa7aa1d749a 100644 --- a/Mathlib/Order/ConditionallyCompleteLattice/Basic.lean +++ b/Mathlib/Order/ConditionallyCompleteLattice/Basic.lean @@ -514,6 +514,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⟩ + exact 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 diff --git a/Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean b/Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean index 310e79093eb693..96302b4a9024a1 100644 --- a/Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean +++ b/Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean @@ -424,6 +424,15 @@ 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 α + constructor + · rintro rfl + exact ⟨ciInf_mem f, ciInf_le (OrderBot.bddBelow ..)⟩ + · rintro ⟨⟨i, rfl⟩, h⟩ + exact le_antisymm (ciInf_le (OrderBot.bddBelow ..) _) (le_ciInf h) + end ConditionallyCompleteLinearOrder /-!