@@ -213,9 +213,9 @@ lemma ciInf_le_ciSup [Nonempty ι] {f : ι → α} (hf : BddBelow (range f)) (hf
213213lemma ciSup_prod {f : β × γ → α} (hf : BddAbove (Set.range f)) :
214214 ⨆ p, f p = ⨆ b, ⨆ c, f (b, c) := by
215215 rcases isEmpty_or_nonempty β
216- · simp [iSup_of_empty']
216+ · simp
217217 rcases isEmpty_or_nonempty γ
218- · simp [iSup_of_empty']
218+ · simp
219219 have h₁ : BddAbove (Set.range fun b ↦ ⨆ c, f (b, c)) := by
220220 rw [bddAbove_def] at hf ⊢
221221 obtain ⟨B, hB⟩ := hf
@@ -360,6 +360,24 @@ lemma ciInf_image {ι ι' : Type*} {s : Set ι} {f : ι → ι'} {g : ι' → α
360360 ⨅ i ∈ (f '' s), g i = ⨅ x ∈ s, g (f x) :=
361361 ciSup_image (α := αᵒᵈ) hf hg'
362362
363+ theorem ciSup_exists_le {p : ι → Prop } {f : Exists p → α} : ⨆ ih, f ih ≤ ⨆ (i) (h), f ⟨i, h⟩ := by
364+ by_cases! h : Exists p
365+ · have : Nonempty <| Exists p := ⟨h⟩
366+ refine ciSup_le fun ⟨i, hi⟩ ↦ le_ciSup₂ (f := fun _ _ ↦ _) ⟨f ⟨i, hi⟩, ?_⟩ i hi
367+ rintro _ ⟨_, ⟨j, rfl⟩, ⟨hj, rfl⟩⟩
368+ rfl
369+ · cases isEmpty_or_nonempty ι <;>
370+ simp [h, ciSup_const]
371+
372+ theorem le_ciInf_exists {p : ι → Prop } {f : Exists p → α} : ⨅ (i) (h), f ⟨i, h⟩ ≤ ⨅ ih, f ih :=
373+ ciSup_exists_le (α := αᵒᵈ)
374+
375+ theorem ciSup_and {p q : Prop } {f : p ∧ q → α} : ⨆ ih, f ih = ⨆ (h₁) (h₂), f ⟨h₁, h₂⟩ := by
376+ by_cases hp : p <;> by_cases hq : q <;> simp [hp, hq]
377+
378+ theorem ciInf_and {p q : Prop } {f : p ∧ q → α} : ⨅ ih, f ih = ⨅ (h₁) (h₂), f ⟨h₁, h₂⟩ :=
379+ ciSup_and (α := αᵒᵈ)
380+
363381end ConditionallyCompleteLattice
364382
365383section ConditionallyCompleteLinearOrder
@@ -495,6 +513,10 @@ theorem ciSup_mono' {ι'} {f : ι → α} {g : ι' → α} (hg : BddAbove (range
495513 (h : ∀ i, ∃ i', f i ≤ g i') : iSup f ≤ iSup g :=
496514 ciSup_le' fun i => Exists.elim (h i) (le_ciSup_of_le hg)
497515
516+ theorem ciSup_exists {p : ι → Prop } {f : Exists p → α} : ⨆ ih, f ih = ⨆ (i) (h), f ⟨i, h⟩ := by
517+ refine le_antisymm ciSup_exists_le <| ciSup_le' fun i ↦ ciSup_le' fun hi ↦ ?_
518+ simp [show Exists p from ⟨i, hi⟩]
519+
498520lemma ciSup_or' (p q : Prop ) (f : p ∨ q → α) :
499521 ⨆ (h : p ∨ q), f h = (⨆ h : p, f (.inl h)) ⊔ ⨆ h : q, f (.inr h) := by
500522 by_cases hp : p <;>
0 commit comments