File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,39 @@ lemma SuccOrder.forall_ne_bot_iff
234234 simp only [Function.iterate_succ', Function.comp_apply]
235235 apply h
236236
237+ section IsLeast
238+
239+ -- TODO: generalize to PartialOrder and `DirectedOn` after #16272
240+ lemma BddAbove.exists_isGreatest_of_nonempty {X : Type *} [LinearOrder X] [SuccOrder X]
241+ [IsSuccArchimedean X] {S : Set X} (hS : BddAbove S) (hS' : S.Nonempty) :
242+ ∃ x, IsGreatest S x := by
243+ obtain ⟨m, hm⟩ := hS
244+ obtain ⟨n, hn⟩ := hS'
245+ by_cases hm' : m ∈ S
246+ · exact ⟨_, hm', hm⟩
247+ have hn' := hm hn
248+ revert hn hm hm'
249+ refine Succ.rec ?_ ?_ hn'
250+ · simp (config := {contextual := true })
251+ intro m _ IH hm hn hm'
252+ rw [mem_upperBounds] at IH hm
253+ simp_rw [Order.le_succ_iff_eq_or_le] at hm
254+ replace hm : ∀ x ∈ S, x ≤ m := by
255+ intro x hx
256+ refine (hm x hx).resolve_left ?_
257+ rintro rfl
258+ exact hm' hx
259+ by_cases hmS : m ∈ S
260+ · exact ⟨m, hmS, hm⟩
261+ · exact IH hm hn hmS
262+
263+ lemma BddBelow.exists_isLeast_of_nonempty {X : Type *} [LinearOrder X] [PredOrder X]
264+ [IsPredArchimedean X] {S : Set X} (hS : BddBelow S) (hS' : S.Nonempty) :
265+ ∃ x, IsLeast S x :=
266+ hS.dual.exists_isGreatest_of_nonempty hS'
267+
268+ end IsLeast
269+
237270section OrderIso
238271
239272variable {X Y : Type *} [PartialOrder X] [PartialOrder Y]
You can’t perform that action at this time.
0 commit comments