Skip to content

Commit f685e3a

Browse files
committed
feat: under ConditionallyCompleteLinearOrderBot, an order iso preserves suprema unconditionally (#24324)
... thanks to the junk values
1 parent 6b8fb6c commit f685e3a

File tree

2 files changed

+34
-5
lines changed

2 files changed

+34
-5
lines changed

Mathlib/Order/ConditionallyCompleteLattice/Basic.lean

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ instance Pi.conditionallyCompleteLattice {ι : Type*} {α : ι → Type*}
437437

438438
section ConditionallyCompleteLinearOrder
439439

440-
variable [ConditionallyCompleteLinearOrder α] {s : Set α} {a b : α}
440+
variable [ConditionallyCompleteLinearOrder α] {f : ι → α} {s : Set α} {a b : α}
441441

442442
/-- When `b < sSup s`, there is an element `a` in `s` with `b < a`, if `s` is nonempty and the order
443443
is a linear order. -/
@@ -456,20 +456,32 @@ theorem lt_csSup_iff (hb : BddAbove s) (hs : s.Nonempty) : a < sSup s ↔ ∃ b
456456
theorem csInf_lt_iff (hb : BddBelow s) (hs : s.Nonempty) : sInf s < a ↔ ∃ b ∈ s, b < a :=
457457
isGLB_lt_iff <| isGLB_csInf hs hb
458458

459-
theorem csSup_of_not_bddAbove {s : Set α} (hs : ¬BddAbove s) : sSup s = sSup ∅ :=
459+
@[simp] lemma csSup_of_not_bddAbove (hs : ¬BddAbove s) : sSup s = sSup ∅ :=
460460
ConditionallyCompleteLinearOrder.csSup_of_not_bddAbove s hs
461461

462-
theorem csSup_eq_univ_of_not_bddAbove {s : Set α} (hs : ¬BddAbove s) : sSup s = sSup univ := by
462+
@[simp] lemma ciSup_of_not_bddAbove (hf : ¬BddAbove (range f)) : ⨆ i, f i = sSup ∅ :=
463+
csSup_of_not_bddAbove hf
464+
465+
lemma csSup_eq_univ_of_not_bddAbove (hs : ¬BddAbove s) : sSup s = sSup univ := by
463466
rw [csSup_of_not_bddAbove hs, csSup_of_not_bddAbove (s := univ)]
464467
contrapose! hs
465468
exact hs.mono (subset_univ _)
466469

467-
theorem csInf_of_not_bddBelow {s : Set α} (hs : ¬BddBelow s) : sInf s = sInf ∅ :=
470+
lemma ciSup_eq_univ_of_not_bddAbove (hf : ¬BddAbove (range f)) : ⨆ i, f i = sSup univ :=
471+
csSup_eq_univ_of_not_bddAbove hf
472+
473+
@[simp] lemma csInf_of_not_bddBelow (hs : ¬BddBelow s) : sInf s = sInf ∅ :=
468474
ConditionallyCompleteLinearOrder.csInf_of_not_bddBelow s hs
469475

470-
theorem csInf_eq_univ_of_not_bddBelow {s : Set α} (hs : ¬BddBelow s) : sInf s = sInf univ :=
476+
@[simp] lemma ciInf_of_not_bddBelow (hf : ¬BddBelow (range f)) : ⨅ i, f i = sInf ∅ :=
477+
csInf_of_not_bddBelow hf
478+
479+
lemma csInf_eq_univ_of_not_bddBelow (hs : ¬BddBelow s) : sInf s = sInf univ :=
471480
csSup_eq_univ_of_not_bddAbove (α := αᵒᵈ) hs
472481

482+
lemma ciInf_eq_univ_of_not_bddBelow (hf : ¬BddBelow (range f)) : ⨅ i, f i = sInf univ :=
483+
csInf_eq_univ_of_not_bddBelow hf
484+
473485
/-- When every element of a set `s` is bounded by an element of a set `t`, and conversely, then
474486
`s` and `t` have the same supremum. This holds even when the sets may be empty or unbounded. -/
475487
theorem csSup_eq_csSup_of_forall_exists_le {s t : Set α}

Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,7 @@ end GaloisConnection
538538

539539
namespace OrderIso
540540

541+
section ConditionallyCompleteLattice
541542
variable [ConditionallyCompleteLattice α] [ConditionallyCompleteLattice β] [Nonempty ι]
542543

543544
theorem map_csSup (e : α ≃o β) {s : Set α} (hne : s.Nonempty) (hbdd : BddAbove s) :
@@ -572,6 +573,22 @@ theorem map_ciInf_set (e : α ≃o β) {s : Set γ} {f : γ → α} (hf : BddBel
572573
(hne : s.Nonempty) : e (⨅ i : s, f i) = ⨅ i : s, e (f i) :=
573574
e.dual.map_ciSup_set hf hne
574575

576+
end ConditionallyCompleteLattice
577+
578+
section ConditionallyCompleteLinearOrderBot
579+
variable [ConditionallyCompleteLinearOrderBot α] [ConditionallyCompleteLinearOrderBot β]
580+
581+
@[simp]
582+
lemma map_ciSup' (e : α ≃o β) (f : ι → α) : e (⨆ i, f i) = ⨆ i, e (f i) := by
583+
cases isEmpty_or_nonempty ι
584+
· simp [map_bot]
585+
by_cases hf : BddAbove (range f)
586+
· exact e.map_ciSup hf
587+
· have hfe : ¬ BddAbove (range fun i ↦ e (f i)) := by
588+
simpa [Set.Nonempty, BddAbove, upperBounds, e.surjective.forall] using hf
589+
simp [map_bot, hf, hfe]
590+
591+
end ConditionallyCompleteLinearOrderBot
575592
end OrderIso
576593

577594
section WithTopBot

0 commit comments

Comments
 (0)