Skip to content
Open
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ assert_not_exists Multiset

open Function OrderDual Set

variable {α β γ : Type*} {ι : Sort*}
variable {α β γ : Type*} {ι : Sort*} {κ : ι → Sort*}

section

Expand Down Expand Up @@ -136,9 +136,16 @@ 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 minimum of a function is bounded below by a uniform
lower bound -/]
Comment thread
lua-vr marked this conversation as resolved.
Outdated
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 _)
Expand Down Expand Up @@ -431,6 +438,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 _)
Expand Down Expand Up @@ -531,6 +544,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 :=

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add the dual of the theorem. Otherwise it will be more annoying when we do tag the whole file with to_dual.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly ConditionallyCompleteLinearOrderBot has no dual, so none of the theorems around here can be to_dualized

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah that's too bad, in that case ignore my comment.

@lua-vr lua-vr May 19, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JovanGerb in #38938 I made an attempt to tag the whole file with to_dual (but this section was not included)

ciSup_le' fun i ↦ ciSup_le' <| h i

@[simp]
theorem ciSup_bot : ⨆ _ : ι, (⊥ : α) = ⊥ := le_bot_iff.mp (ciSup_le' fun _ ↦ bot_le)

Expand All @@ -543,6 +559,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
Expand Down
Loading