Skip to content

Commit 029883e

Browse files
committed
merge
2 parents bd0eb03 + 1e4865e commit 029883e

6 files changed

Lines changed: 59 additions & 32 deletions

File tree

Mathlib.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5914,7 +5914,8 @@ public import Mathlib.Order.Cover
59145914
public import Mathlib.Order.Defs.LinearOrder
59155915
public import Mathlib.Order.Defs.PartialOrder
59165916
public import Mathlib.Order.Defs.Unbundled
5917-
public import Mathlib.Order.DirSupClosed
5917+
public import Mathlib.Order.DirSupClosed.Basic
5918+
public import Mathlib.Order.DirSupClosed.Finite
59185919
public import Mathlib.Order.Directed
59195920
public import Mathlib.Order.DirectedInverseSystem
59205921
public import Mathlib.Order.Disjoint
Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ Authors: Christopher Hoskin, Violeta Hernández Palacios
55
-/
66
module
77

8-
public import Mathlib.Data.Fintype.Order
98
public import Mathlib.Order.Antisymmetrization
109
public import Mathlib.Order.CompleteLattice.Defs
1110
public import Mathlib.Order.UpperLower.Basic
1211

13-
import Mathlib.Data.Nat.Lattice
12+
import Mathlib.Data.Set.Lattice
1413

1514
/-!
1615
# Sets closed under directed suprema
@@ -292,37 +291,18 @@ end Preorder
292291
section PartialOrder
293292
variable [PartialOrder α]
294293

295-
theorem dirSupClosed_singleton (a : α) : DirSupClosed {a} := by
294+
theorem DirSupClosed.singleton (a : α) : DirSupClosed {a} := by
296295
intro d hda hdn _ b hb
297296
rw [hdn.subset_singleton_iff] at hda
298297
subst hda
299298
exact mem_singleton_of_eq (hb.unique isLUB_singleton)
300299

301-
theorem dirSupClosedOn_singleton (a : α) : DirSupClosedOn D {a} :=
302-
(dirSupClosed_singleton a).dirSupClosedOn
303-
304-
theorem Set.Finite.dirSupClosed (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⟩
300+
@[deprecated (since := "2026-05-22")] alias dirSupClosed_singleton := DirSupClosed.singleton
301+
302+
theorem DirSupClosedOn.singleton (a : α) : DirSupClosedOn D {a} :=
303+
(DirSupClosed.singleton a).dirSupClosedOn
304+
305+
@[deprecated (since := "2026-05-22")] alias dirSupClosedOn_singleton := DirSupClosedOn.singleton
326306

327307
end PartialOrder
328308

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/-
2+
Copyright (c) 2026 Violeta Hernández Palacios. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Violeta Hernández Palacios
5+
-/
6+
module
7+
8+
public import Mathlib.Data.Set.Finite.Basic
9+
public import Mathlib.Order.DirSupClosed.Basic
10+
11+
import Mathlib.Data.Nat.Lattice
12+
13+
/-!
14+
# Finite sets are closed under suprema
15+
-/
16+
17+
public section
18+
19+
variable {α : Type*} [PartialOrder α]
20+
21+
theorem Set.Finite.dirSupClosed {s : Set α} (hs : s.Finite) : DirSupClosed s := by
22+
induction s, hs using induction_on with
23+
| empty => exact .empty
24+
| insert has _ hs₁ =>
25+
rw [Set.insert_eq]
26+
exact (DirSupClosed.singleton _).union hs₁
27+
28+
theorem dirSupClosed_range_nat {f : ℕ → α} (hf : Monotone f) (hf' : IsCofinal (.range f)) :
29+
DirSupClosed (.range f) := by
30+
intro s hs hs₀ hs₁ a ha
31+
obtain ⟨_, ⟨n, rfl⟩, han⟩ := hf' a
32+
obtain rfl | han := han.eq_or_lt
33+
· simp
34+
have hfb : BddAbove (f ⁻¹' s) := by
35+
refine ⟨n, fun m hm ↦ ?_⟩
36+
by_contra! hnm
37+
exact (ha.1 hm).not_gt (han.trans_le (hf hnm.le))
38+
refine ⟨sSup (f ⁻¹' s), IsLUB.unique ⟨?_, ?_⟩ ha⟩ <;> intro x hx
39+
· obtain ⟨m, rfl⟩ := hs hx
40+
exact hf (le_csSup hfb hx)
41+
· apply hx (Nat.sSup_mem _ hfb)
42+
obtain ⟨x, hx⟩ := hs₀
43+
obtain ⟨m, rfl⟩ := hs hx
44+
exact ⟨m, hx⟩

Mathlib/Order/IsNormal.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Authors: Violeta Hernández Palacios
66
module
77

88
public import Mathlib.Dynamics.FixedPoints.Defs
9-
public import Mathlib.Order.DirSupClosed
9+
public import Mathlib.Order.DirSupClosed.Basic
1010
public import Mathlib.Order.SuccPred.CompleteLinearOrder
1111
public import Mathlib.Order.SuccPred.InitialSeg
1212

Mathlib/SetTheory/Cardinal/Cofinality/Ordinal.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public import Mathlib.SetTheory.Cardinal.Arithmetic
99
public import Mathlib.SetTheory.Cardinal.Cofinality.Basic
1010
public import Mathlib.SetTheory.Ordinal.FixedPoint
1111

12+
import Mathlib.Order.DirSupClosed.Finite
13+
1214
/-!
1315
# Cofinality of an ordinal
1416
@@ -202,7 +204,7 @@ theorem dirSupClosed_of_type_le_omega0 [LinearOrder α] [WellFoundedLT α]
202204
apply Finite.dirSupClosed
203205
rw [Set.Finite, ← mk_lt_aleph0_iff]
204206
simp_all
205-
· let e : ℕ ≃o s := by
207+
· have e : ℕ ≃o s := by
206208
rw [omega0, ← lift_id (type _), lift_type_eq] at hω
207209
exact OrderIso.ofRelIsoLT hω.some.symm
208210
have hfs : .range (Subtype.val ∘ e) = s := by simp

Mathlib/Topology/Order/ScottTopology.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Authors: Christopher Hoskin
55
-/
66
module
77

8-
public import Mathlib.Order.DirSupClosed
8+
public import Mathlib.Order.DirSupClosed.Basic
99
public import Mathlib.Order.ScottContinuity
1010
public import Mathlib.Topology.Order.UpperLowerSetTopology
1111

0 commit comments

Comments
 (0)