@@ -5,11 +5,12 @@ Authors: Christopher Hoskin, Violeta Hernández Palacios
55-/
66module
77
8+ public import Mathlib.Data.Fintype.Order
89public import Mathlib.Order.Antisymmetrization
910public import Mathlib.Order.CompleteLattice.Defs
1011public import Mathlib.Order.UpperLower.Basic
1112
12- import Mathlib.Data.Set .Lattice
13+ import Mathlib.Data.Nat .Lattice
1314
1415/-!
1516# Sets closed under directed suprema
@@ -300,6 +301,29 @@ theorem dirSupClosed_singleton (a : α) : DirSupClosed {a} := by
300301theorem dirSupClosedOn_singleton (a : α) : DirSupClosedOn D {a} :=
301302 (dirSupClosed_singleton a).dirSupClosedOn
302303
304+ theorem DirSupClosed.of_finite (hs : s.Finite) : DirSupClosed s := by
305+ intro t ht ht₀ ht₁ a ha
306+ obtain ⟨b, hbt, hb⟩ := ht₁.finite_le ht₀ (hs.subset ht)
307+ exact ht <| ha.unique ⟨hb, fun x hx ↦ hx hbt⟩ ▸ hbt
308+
309+ theorem dirSupClosed_range_nat {f : ℕ → α} (hf : Monotone f) (hf' : IsCofinal (.range f)) :
310+ DirSupClosed (range f) := by
311+ intro s hs hs₀ hs₁ a ha
312+ obtain ⟨_, ⟨n, rfl⟩, han⟩ := hf' a
313+ obtain rfl | han := han.eq_or_lt
314+ · simp
315+ have hfb : BddAbove (f ⁻¹' s) := by
316+ refine ⟨n, fun m hm ↦ ?_⟩
317+ by_contra! hnm
318+ exact (ha.1 hm).not_gt (han.trans_le (hf hnm.le))
319+ refine ⟨sSup (f ⁻¹' s), IsLUB.unique ⟨?_, ?_⟩ ha⟩ <;> intro x hx
320+ · obtain ⟨m, rfl⟩ := hs hx
321+ exact hf (le_csSup hfb hx)
322+ · apply hx (Nat.sSup_mem _ hfb)
323+ obtain ⟨x, hx⟩ := hs₀
324+ obtain ⟨m, rfl⟩ := hs hx
325+ exact ⟨m, hx⟩
326+
303327end PartialOrder
304328
305329section LinearOrder
0 commit comments