Skip to content

Commit 6682a4e

Browse files
committed
feat(Order/ConditionallyCompleteLattice): sInf s ≤ sSup t for (s ∩ t).Nonempty (leanprover-community#35821)
1 parent 23a892a commit 6682a4e

5 files changed

Lines changed: 23 additions & 6 deletions

File tree

Mathlib/Data/Real/Archimedean.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ lemma iInf_nonpos (hf : ∀ i, f i ≤ 0) : ⨅ i, f i ≤ 0 := sInf_nonpos <| S
316316
theorem sInf_le_sSup (s : Set ℝ) (h₁ : BddBelow s) (h₂ : BddAbove s) : sInf s ≤ sSup s := by
317317
rcases s.eq_empty_or_nonempty with (rfl | hne)
318318
· rw [sInf_empty, sSup_empty]
319-
· exact csInf_le_csSup h₁ h₂ hne
319+
· exact csInf_le_csSup hne h₁ h₂
320320

321321
theorem cauSeq_converges (f : CauSeq ℝ abs) : ∃ x, f ≈ const abs x := by
322322
let s := {x : ℝ | const abs x < f}

Mathlib/Order/Bounds/Basic.lean

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,15 +665,24 @@ theorem maximal_iff_isGreatest [LinearOrder α] {s : Set α} {a : α} :
665665

666666
section Preorder
667667

668-
variable [Preorder α] [Preorder β] {s : Set α} {t : Set β} {a b : α}
668+
variable [Preorder α] [Preorder β] {s s' : Set α} {t : Set β} {a b : α}
669669

670670
theorem lowerBounds_le_upperBounds (ha : a ∈ lowerBounds s) (hb : b ∈ upperBounds s) :
671671
s.Nonempty → a ≤ b
672672
| ⟨_, hc⟩ => le_trans (ha hc) (hb hc)
673673

674+
theorem lowerBounds_le_upperBounds_of_nonempty_inter (h : (s ∩ s').Nonempty)
675+
(ha : a ∈ lowerBounds s) (hb : b ∈ upperBounds s') : a ≤ b := by
676+
have ⟨x, hx, hx'⟩ := h
677+
exact le_trans (ha hx) (hb hx')
678+
674679
theorem isGLB_le_isLUB (ha : IsGLB s a) (hb : IsLUB s b) (hs : s.Nonempty) : a ≤ b :=
675680
lowerBounds_le_upperBounds ha.1 hb.1 hs
676681

682+
theorem isGLB_le_isLUB_of_nonempty_inter (h : (s ∩ s').Nonempty) (ha : IsGLB s a)
683+
(hb : IsLUB s' b) : a ≤ b :=
684+
lowerBounds_le_upperBounds_of_nonempty_inter h ha.left hb.left
685+
677686
@[to_dual lt_isGLB_iff]
678687
theorem isLUB_lt_iff (ha : IsLUB s a) : a < b ↔ ∃ c ∈ upperBounds s, c < b :=
679688
fun hb => ⟨a, ha.1, hb⟩, fun ⟨_, hcs, hcb⟩ => lt_of_le_of_lt (ha.2 hcs) hcb⟩

Mathlib/Order/CompleteLattice/Basic.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ variable [CompleteLattice α] {s t : Set α} {b : α}
6969
theorem sInf_le_sSup (hs : s.Nonempty) : sInf s ≤ sSup s :=
7070
isGLB_le_isLUB (isGLB_sInf s) (isLUB_sSup s) hs
7171

72+
theorem sInf_le_sSup_of_nonempty_inter (h : (s ∩ t).Nonempty) : sInf s ≤ sSup t :=
73+
isGLB_le_isLUB_of_nonempty_inter h (isGLB_sInf s) (isLUB_sSup t)
74+
7275
@[to_dual]
7376
theorem sSup_union {s t : Set α} : sSup (s ∪ t) = sSup s ⊔ sSup t :=
7477
((isLUB_sSup s).union (isLUB_sSup t)).sSup_eq

Mathlib/Order/ConditionallyCompleteLattice/Basic.lean

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ section ConditionallyCompleteLattice
179179

180180
variable [ConditionallyCompleteLattice α] {s t : Set α} {a b : α}
181181

182-
theorem isLUB_csSup (hn : s.Nonempty) (hb : BddAbove s) : IsLUB s (sSup s) :=
182+
theorem isLUB_csSup (hn : s.Nonempty) (hb : BddAbove s := by bddDefault) : IsLUB s (sSup s) :=
183183
ConditionallyCompleteLattice.isLUB_csSup _ hn hb
184184

185-
theorem isGLB_csInf (hn : s.Nonempty) (hb : BddBelow s) : IsGLB s (sInf s) :=
185+
theorem isGLB_csInf (hn : s.Nonempty) (hb : BddBelow s := by bddDefault) : IsGLB s (sInf s) :=
186186
ConditionallyCompleteLattice.isGLB_csInf _ hn hb
187187

188188
theorem le_csSup (h₁ : BddAbove s) (h₂ : a ∈ s) : a ≤ sSup s :=
@@ -306,9 +306,14 @@ theorem csInf_pair (a b : α) : sInf {a, b} = a ⊓ b :=
306306

307307
/-- If a set is bounded below and above, and nonempty, its infimum is less than or equal to
308308
its supremum. -/
309-
theorem csInf_le_csSup (hb : BddBelow s) (ha : BddAbove s) (ne : s.Nonempty) : sInf s ≤ sSup s :=
309+
theorem csInf_le_csSup (ne : s.Nonempty) (hb : BddBelow s := by bddDefault)
310+
(ha : BddAbove s := by bddDefault) : sInf s ≤ sSup s :=
310311
isGLB_le_isLUB (isGLB_csInf ne hb) (isLUB_csSup ne ha) ne
311312

313+
theorem csInf_le_csSup_of_nonempty_inter (h : (s ∩ t).Nonempty) (hs : BddBelow s := by bddDefault)
314+
(ht : BddAbove t := by bddDefault) : sInf s ≤ sSup t :=
315+
isGLB_le_isLUB_of_nonempty_inter h (isGLB_csInf h.left hs) (isLUB_csSup h.right ht)
316+
312317
/-- The `sSup` of a union of two sets is the max of the suprema of each subset, under the
313318
assumptions that all sets are bounded above and nonempty. -/
314319
theorem csSup_union (hs : BddAbove s) (sne : s.Nonempty) (ht : BddAbove t) (tne : t.Nonempty) :

Mathlib/Topology/Order/Compact.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ theorem image_uIcc_eq_Icc (h : ContinuousOn f [[a, b]]) :
528528
theorem image_uIcc (h : ContinuousOn f <| [[a, b]]) :
529529
f '' [[a, b]] = [[sInf (f '' [[a, b]]), sSup (f '' [[a, b]])]] := by
530530
refine h.image_uIcc_eq_Icc.trans (uIcc_of_le ?_).symm
531-
refine csInf_le_csSup ?_ ?_ (nonempty_uIcc.image _) <;> rw [h.image_uIcc_eq_Icc]
531+
refine csInf_le_csSup (nonempty_uIcc.image _) ?_ ?_ <;> rw [h.image_uIcc_eq_Icc]
532532
exacts [bddBelow_Icc, bddAbove_Icc]
533533

534534
theorem sInf_image_Icc_le (h : ContinuousOn f <| Icc a b) (hc : c ∈ Icc a b) :

0 commit comments

Comments
 (0)