diff --git a/Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean b/Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean index 8842e00b5713c9..216d58cc46dd00 100644 --- a/Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean +++ b/Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean @@ -23,7 +23,7 @@ assert_not_exists Multiset open Function OrderDual Set -variable {α β γ : Type*} {ι : Sort*} +variable {α β γ : Type*} {ι : Sort*} {κ : ι → Sort*} section @@ -136,9 +136,15 @@ theorem IsGLB.ciInf_set_eq {s : Set β} {f : β → α} (H : IsGLB (f '' s) a) ( IsGLB.csInf_eq (image_eq_range f s ▸ H) (image_eq_range f s ▸ Hne.image f) /-- The indexed supremum of a function is bounded above by a uniform bound -/ +@[to_dual le_ciInf /-- The indexed infimum of a function is bounded below by a uniform bound -/] theorem ciSup_le [Nonempty ι] {f : ι → α} {c : α} (H : ∀ x, f x ≤ c) : iSup f ≤ c := csSup_le (range_nonempty f) (by rwa [forall_mem_range]) +@[to_dual le_ciInf₂] +theorem ciSup₂_le [Nonempty ι] [∀ i, Nonempty (κ i)] {f : ∀ i, κ i → α} + (h : ∀ i j, f i j ≤ a) : ⨆ (i) (j), f i j ≤ a := + ciSup_le fun i ↦ ciSup_le <| h i + /-- The indexed supremum of a function is bounded below by the value taken at one point -/ theorem le_ciSup {f : ι → α} (H : BddAbove (range f)) (c : ι) : f c ≤ iSup f := le_csSup H (mem_range_self _) @@ -189,10 +195,6 @@ theorem ciInf_inf_eq {f g : ι → α} (Hf : BddBelow <| range f) (Hg : BddBelow ⨅ x, f x ⊓ g x = (⨅ x, f x) ⊓ (⨅ x, g x) := ciSup_sup_eq (α := αᵒᵈ) Hf Hg -/-- The indexed minimum of a function is bounded below by a uniform lower bound -/ -theorem le_ciInf [Nonempty ι] {f : ι → α} {c : α} (H : ∀ x, c ≤ f x) : c ≤ iInf f := - ciSup_le (α := αᵒᵈ) H - /-- The indexed infimum of a function is bounded above by the value taken at one point -/ theorem ciInf_le {f : ι → α} (H : BddBelow (range f)) (c : ι) : iInf f ≤ f c := le_ciSup (α := αᵒᵈ) H c @@ -431,6 +433,12 @@ When `iInf f < a`, there is an element `i` such that `f i < a`. theorem exists_lt_of_ciInf_lt [Nonempty ι] {f : ι → α} (h : iInf f < a) : ∃ i, f i < a := exists_lt_of_lt_ciSup (α := αᵒᵈ) h +@[to_dual exists_lt_of_ciInf₂_lt] +theorem exists_lt_of_lt_ciSup₂ [Nonempty ι] [∀ i, Nonempty (κ i)] + {f : ∀ i, κ i → α} (h : a < ⨆ (i) (j), f i j) : ∃ i j, a < f i j := by + contrapose! h + exact ciSup₂_le h + theorem lt_ciSup_iff [Nonempty ι] {f : ι → α} (hb : BddAbove (range f)) : a < iSup f ↔ ∃ i, a < f i := by simpa only [mem_range, exists_exists_eq_and] using lt_csSup_iff hb (range_nonempty _) @@ -531,6 +539,9 @@ theorem ciSup_le_iff' {f : ι → α} (h : BddAbove (range f)) {a : α} : theorem ciSup_le' {f : ι → α} {a : α} (h : ∀ i, f i ≤ a) : ⨆ i, f i ≤ a := csSup_le' <| forall_mem_range.2 h +theorem ciSup₂_le' {f : ∀ i, κ i → α} (h : ∀ i j, f i j ≤ a) : ⨆ (i) (j), f i j ≤ a := + ciSup_le' fun i ↦ ciSup_le' <| h i + @[simp] theorem ciSup_bot : ⨆ _ : ι, (⊥ : α) = ⊥ := le_bot_iff.mp (ciSup_le' fun _ ↦ bot_le) @@ -543,6 +554,11 @@ theorem exists_lt_of_lt_ciSup' {f : ι → α} {a : α} (h : a < ⨆ i, f i) : contrapose! h exact ciSup_le' h +theorem exists_lt_of_lt_ciSup₂' {f : ∀ i, κ i → α} (h : a < ⨆ (i) (j), f i j) : + ∃ i j, a < f i j := by + contrapose! h + exact ciSup₂_le' h + theorem ciSup_mono_of_forall_exists' {ι'} {f : ι → α} {g : ι' → α} (hg : BddAbove <| range g) (h : ∀ i, ∃ i', f i ≤ g i') : ⨆ i, f i ≤ ⨆ i', g i' := ciSup_le' fun i ↦ h i |>.elim <| le_ciSup_of_le hg