@@ -147,10 +147,8 @@ attribute [instance 100] ConditionallyCompleteLinearOrderBot.toOrderBot
147147on the properties of sInf and sSup in a complete lattice. -/
148148instance (priority := 100 ) CompleteLattice.toConditionallyCompleteLattice [CompleteLattice α] :
149149 ConditionallyCompleteLattice α where
150- le_csSup := by intros; apply le_sSup; assumption
151- csSup_le := by intros; apply sSup_le; assumption
152- csInf_le := by intros; apply sInf_le; assumption
153- le_csInf := by intros; apply le_sInf; assumption
150+ isLUB_csSup _ _ _ := isLUB_sSup _
151+ isGLB_csInf _ _ _ := isGLB_sInf _
154152
155153-- see Note [lower instance priority]
156154instance (priority := 100 ) CompleteLinearOrder.toConditionallyCompleteLinearOrderBot {α : Type *}
@@ -165,10 +163,8 @@ namespace OrderDual
165163
166164instance instConditionallyCompleteLattice (α : Type *) [ConditionallyCompleteLattice α] :
167165 ConditionallyCompleteLattice αᵒᵈ where
168- le_csSup := ConditionallyCompleteLattice.csInf_le (α := α)
169- csSup_le := ConditionallyCompleteLattice.le_csInf (α := α)
170- le_csInf := ConditionallyCompleteLattice.csSup_le (α := α)
171- csInf_le := ConditionallyCompleteLattice.le_csSup (α := α)
166+ isLUB_csSup := ConditionallyCompleteLattice.isGLB_csInf (α := α)
167+ isGLB_csInf := ConditionallyCompleteLattice.isLUB_csSup (α := α)
172168
173169instance (α : Type *) [ConditionallyCompleteLinearOrder α] :
174170 ConditionallyCompleteLinearOrder αᵒᵈ where
@@ -183,17 +179,23 @@ section ConditionallyCompleteLattice
183179
184180variable [ConditionallyCompleteLattice α] {s t : Set α} {a b : α}
185181
182+ theorem isLUB_csSup (hn : s.Nonempty) (hb : BddAbove s) : IsLUB s (sSup s) :=
183+ ConditionallyCompleteLattice.isLUB_csSup _ hn hb
184+
185+ theorem isGLB_csInf (hn : s.Nonempty) (hb : BddBelow s) : IsGLB s (sInf s) :=
186+ ConditionallyCompleteLattice.isGLB_csInf _ hn hb
187+
186188theorem le_csSup (h₁ : BddAbove s) (h₂ : a ∈ s) : a ≤ sSup s :=
187- ConditionallyCompleteLattice.le_csSup s a h₁ h₂
189+ (isLUB_csSup (nonempty_of_mem h₂) h₁). 1 h₂
188190
189191theorem csSup_le (h₁ : s.Nonempty) (h₂ : ∀ b ∈ s, b ≤ a) : sSup s ≤ a :=
190- ConditionallyCompleteLattice.csSup_le s a h₁ h₂
192+ (isLUB_csSup h₁ ⟨a, h₂⟩). 2 h₂
191193
192194theorem csInf_le (h₁ : BddBelow s) (h₂ : a ∈ s) : sInf s ≤ a :=
193- ConditionallyCompleteLattice.csInf_le s a h₁ h₂
195+ (isGLB_csInf (nonempty_of_mem h₂) h₁). 1 h₂
194196
195197theorem le_csInf (h₁ : s.Nonempty) (h₂ : ∀ b ∈ s, a ≤ b) : a ≤ sInf s :=
196- ConditionallyCompleteLattice.le_csInf s a h₁ h₂
198+ (isGLB_csInf h₁ ⟨a, h₂⟩). 2 h₂
197199
198200theorem le_csSup_of_le (hs : BddAbove s) (hb : b ∈ s) (h : a ≤ b) : a ≤ sSup s :=
199201 le_trans h (le_csSup hs hb)
@@ -216,12 +218,6 @@ theorem le_csSup_iff (h : BddAbove s) (hs : s.Nonempty) :
216218theorem csInf_le_iff (h : BddBelow s) (hs : s.Nonempty) : sInf s ≤ a ↔ ∀ b ∈ lowerBounds s, b ≤ a :=
217219 ⟨fun h _ hb => le_trans (le_csInf hs hb) h, fun hb => hb _ fun _ => csInf_le h⟩
218220
219- theorem isLUB_csSup (ne : s.Nonempty) (H : BddAbove s) : IsLUB s (sSup s) :=
220- ⟨fun _ => le_csSup H, fun _ => csSup_le ne⟩
221-
222- theorem isGLB_csInf (ne : s.Nonempty) (H : BddBelow s) : IsGLB s (sInf s) :=
223- ⟨fun _ => csInf_le H, fun _ => le_csInf ne⟩
224-
225221theorem IsLUB.csSup_eq (H : IsLUB s a) (ne : s.Nonempty) : sSup s = a :=
226222 (isLUB_csSup ne ⟨a, H.1 ⟩).unique H
227223
@@ -230,8 +226,8 @@ theorem IsGLB.csInf_eq (H : IsGLB s a) (ne : s.Nonempty) : sInf s = a :=
230226
231227instance (priority := 100 ) ConditionallyCompleteLattice.toConditionallyCompletePartialOrder :
232228 ConditionallyCompletePartialOrder α where
233- isGLB_csInf_of_directed _ _ non bdd := isGLB_csInf non bdd
234- isLUB_csSup_of_directed _ _ non bdd := isLUB_csSup non bdd
229+ isGLB_csInf_of_directed _ _ := isGLB_csInf _
230+ isLUB_csSup_of_directed _ _ := isLUB_csSup _
235231
236232theorem subset_Icc_csInf_csSup (hb : BddBelow s) (ha : BddAbove s) : s ⊆ Icc (sInf s) (sSup s) :=
237233 fun _ hx => ⟨csInf_le hb hx, le_csSup ha hx⟩
@@ -386,14 +382,12 @@ end ConditionallyCompleteLattice
386382
387383instance Pi.conditionallyCompleteLattice {ι : Type *} {α : ι → Type *}
388384 [∀ i, ConditionallyCompleteLattice (α i)] : ConditionallyCompleteLattice (∀ i, α i) where
389- le_csSup := fun _ f ⟨g, hg⟩ hf i =>
390- le_csSup ⟨g i, Set.forall_mem_range.2 fun ⟨_, hf'⟩ => hg hf' i⟩ ⟨⟨f, hf⟩, rfl⟩
391- csSup_le s _ hs hf i :=
392- (csSup_le (by have := hs.to_subtype; apply range_nonempty)) fun _ ⟨⟨_, hg⟩, hb⟩ => hb ▸ hf hg i
393- csInf_le := fun _ f ⟨g, hg⟩ hf i =>
394- csInf_le ⟨g i, Set.forall_mem_range.2 fun ⟨_, hf'⟩ => hg hf' i⟩ ⟨⟨f, hf⟩, rfl⟩
395- le_csInf s _ hs hf i :=
396- (le_csInf (by have := hs.to_subtype; apply range_nonempty)) fun _ ⟨⟨_, hg⟩, hb⟩ => hb ▸ hf hg i
385+ isLUB_csSup _ hn hb := isLUB_pi.mpr fun _ ↦ by
386+ rw [sSup_apply_eq_sSup_image]
387+ exact isLUB_csSup (image_nonempty.mpr hn) ((monotone_eval _).map_bddAbove hb)
388+ isGLB_csInf _ hn hb := isGLB_pi.mpr fun _ ↦ by
389+ rw [sInf_apply_eq_sInf_image]
390+ exact isGLB_csInf (image_nonempty.mpr hn) ((monotone_eval _).map_bddBelow hb)
397391
398392section ConditionallyCompleteLinearOrder
399393
@@ -872,19 +866,15 @@ This result can be used to show that the extended reals `[-∞, ∞]` are a comp
872866gives a conditionally complete lattice -/
873867noncomputable instance WithTop.conditionallyCompleteLattice {α : Type *}
874868 [ConditionallyCompleteLattice α] : ConditionallyCompleteLattice (WithTop α) where
875- le_csSup _ a _ haS := (WithTop.isLUB_sSup' ⟨a, haS⟩).1 haS
876- csSup_le _ _ hS haS := (WithTop.isLUB_sSup' hS).2 haS
877- csInf_le _ _ hS haS := (WithTop.isGLB_sInf' hS).1 haS
878- le_csInf _ a _ haS := (WithTop.isGLB_sInf' ⟨a, haS⟩).2 haS
869+ isLUB_csSup _ hS _ := WithTop.isLUB_sSup' hS
870+ isGLB_csInf _ _ hS := WithTop.isGLB_sInf' hS
879871
880872/-- Adding a bottom element to a conditionally complete lattice
881873gives a conditionally complete lattice -/
882874noncomputable instance WithBot.conditionallyCompleteLattice {α : Type *}
883875 [ConditionallyCompleteLattice α] : ConditionallyCompleteLattice (WithBot α) where
884- le_csSup := (WithTop.conditionallyCompleteLattice (α := αᵒᵈ)).csInf_le
885- csSup_le := (WithTop.conditionallyCompleteLattice (α := αᵒᵈ)).le_csInf
886- csInf_le := (WithTop.conditionallyCompleteLattice (α := αᵒᵈ)).le_csSup
887- le_csInf := (WithTop.conditionallyCompleteLattice (α := αᵒᵈ)).csSup_le
876+ isLUB_csSup := (WithTop.conditionallyCompleteLattice (α := αᵒᵈ)).isGLB_csInf
877+ isGLB_csInf := (WithTop.conditionallyCompleteLattice (α := αᵒᵈ)).isLUB_csSup
888878
889879noncomputable instance [CompleteLattice α] : CompleteLattice (WithBot α) where
890880 isLUB_sSup s := ⟨fun _ ↦ le_csSup (OrderTop.bddAbove _), fun _ hsa ↦
0 commit comments