Skip to content

Commit be48558

Browse files
committed
feat(Order/PartialSups): add exists_partialSups_eq
1 parent 721b21c commit be48558

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Mathlib/Order/PartialSups.lean

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public import Mathlib.Data.Set.Finite.Lattice
99
public import Mathlib.Order.ConditionallyCompleteLattice.Indexed
1010
public import Mathlib.Order.Interval.Finset.Nat
1111
public import Mathlib.Order.SuccPred.Basic
12+
import Mathlib.Data.Finset.Max
1213

1314
/-!
1415
# The monotone sequence of partial supremums of a sequence
@@ -286,3 +287,23 @@ lemma partialSups_eq_biUnion_range (s : ℕ → Set α) (n : ℕ) :
286287
simp [partialSups_eq_biSup, Nat.lt_succ_iff]
287288

288289
end Set
290+
291+
section LinearOrder
292+
/-!
293+
### Functions taking values on some `LinearOrder`.
294+
-/
295+
296+
variable [Preorder ι] [LocallyFiniteOrderBot ι] [LinearOrder α]
297+
298+
/-- In a linear order, there exists an index which is equal to the value of `partialSups`. -/
299+
theorem exists_partialSups_eq (f : ι → α) (i : ι) :
300+
∃ j ≤ i, partialSups f i = f j := by
301+
obtain ⟨j, hj⟩ : ∃ j ∈ Finset.Iic i, ∀ k ∈ Finset.Iic i, f k ≤ f j :=
302+
Finset.exists_max_image _ _ ⟨i, Finset.mem_Iic.mpr le_rfl⟩
303+
simp_all only [Finset.mem_Iic, partialSups, OrderHom.coe_mk]
304+
use j, hj.1
305+
apply le_antisymm
306+
· exact Finset.sup'_le _ _ fun k hk => hj.2 k (Finset.mem_Iic.1 hk)
307+
· exact Finset.le_sup' _ (Finset.mem_Iic.2 hj.1 )
308+
309+
end LinearOrder

0 commit comments

Comments
 (0)