Skip to content
Open
Changes from all 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
20 changes: 20 additions & 0 deletions Mathlib/Order/PartialSups.lean
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public import Mathlib.Data.Set.Finite.Lattice
public import Mathlib.Order.ConditionallyCompleteLattice.Indexed
public import Mathlib.Order.Interval.Finset.Nat
public import Mathlib.Order.SuccPred.Basic
import Mathlib.Data.Finset.Max

/-!
# The monotone sequence of partial supremums of a sequence
Expand Down Expand Up @@ -286,3 +287,22 @@ lemma partialSups_eq_biUnion_range (s : ℕ → Set α) (n : ℕ) :
simp [partialSups_eq_biSup, Nat.lt_succ_iff]

end Set

section LinearOrder
/-!
### Functions taking values on some `LinearOrder`.
-/

variable [Preorder ι] [LocallyFiniteOrderBot ι] [LinearOrder α]

theorem exists_partialSups_eq (f : ι → α) (i : ι) :
∃ j ≤ i, partialSups f i = f j := by
obtain ⟨j, hj⟩ : ∃ j ∈ Finset.Iic i, ∀ k ∈ Finset.Iic i, f k ≤ f j :=
Finset.exists_max_image _ _ ⟨i, Finset.mem_Iic.mpr le_rfl⟩
simp_all only [Finset.mem_Iic, partialSups, OrderHom.coe_mk]
use j, hj.1
apply le_antisymm
· exact Finset.sup'_le _ _ fun k hk => hj.2 k (Finset.mem_Iic.1 hk)
· exact Finset.le_sup' _ (Finset.mem_Iic.2 hj.1 )

end LinearOrder
Loading