Skip to content

Commit 8971777

Browse files
committed
begin
2 parents a58e079 + b47b27e commit 8971777

11 files changed

Lines changed: 303 additions & 27 deletions

File tree

Mathlib.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5916,7 +5916,8 @@ public import Mathlib.Order.Cover
59165916
public import Mathlib.Order.Defs.LinearOrder
59175917
public import Mathlib.Order.Defs.PartialOrder
59185918
public import Mathlib.Order.Defs.Unbundled
5919-
public import Mathlib.Order.DirSupClosed
5919+
public import Mathlib.Order.DirSupClosed.Basic
5920+
public import Mathlib.Order.DirSupClosed.Finite
59205921
public import Mathlib.Order.Directed
59215922
public import Mathlib.Order.DirectedInverseSystem
59225923
public import Mathlib.Order.Disjoint

Mathlib/Data/Fintype/Order.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,14 @@ lemma Directed.finite_le {ι κ : Sort*} [Nonempty ι] [Finite κ] {f : ι →
195195
simpa using
196196
(hf.comp_of_surjective PLift.down_surjective).finite_set_le (Set.finite_range (PLift.up ∘ g))
197197

198+
theorem DirectedOn.finite_le {s : Set α} (hs₀ : s.Nonempty) (D : DirectedOn r s)
199+
(hs : s.Finite) : ∃ z ∈ s, ∀ i ∈ s, r i z := by
200+
have := hs₀.to_subtype
201+
have := hs.to_subtype
202+
obtain ⟨⟨z, hzs⟩, hz⟩ := D.directed_val.finite_le id
203+
use z, hzs
204+
simpa using hz
205+
198206
variable [Nonempty α] [Preorder α]
199207

200208
theorem Finite.exists_le [IsDirectedOrder α] (f : β → α) : ∃ M, ∀ i, f i ≤ M :=

Mathlib/Data/Set/Image.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,11 @@ theorem preimage_rangeSplitting {f : α → β} (hf : Injective f) :
955955
(image_eq_preimage_of_inverse (rightInverse_rangeSplitting hf)
956956
(leftInverse_rangeSplitting f)).symm
957957

958+
theorem rangeSplitting_strictMono [LinearOrder α] [PartialOrder β] {f : α → β} (hf : Monotone f) :
959+
StrictMono (rangeSplitting f) := by
960+
refine fun x y h ↦ hf.reflect_lt ?_
961+
simpa [apply_rangeSplitting f]
962+
958963
theorem isCompl_range_some_none (α : Type*) : IsCompl (range (some : α → Option α)) {none} :=
959964
IsCompl.of_le (fun _ ⟨⟨_, ha⟩, (hn : _ = none)⟩ => Option.some_ne_none _ (ha.trans hn))
960965
fun x _ => Option.casesOn x (Or.inr rfl) fun _ => Or.inl <| mem_range_self _

Mathlib/Order/Cofinal.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ theorem IsCofinal.mono {s t : Set α} (h : s ⊆ t) (hs : IsCofinal s) : IsCofin
5252
obtain ⟨b, hb, hb'⟩ := hs a
5353
exact ⟨b, h hb, hb'⟩
5454

55+
theorem IsCofinal.nonempty [Nonempty α] {s : Set α} (h : IsCofinal s) : s.Nonempty := by
56+
inhabit α
57+
obtain ⟨x, hx, _⟩ := h default
58+
exact ⟨x, hx⟩
59+
5560
end LE
5661

5762
section Preorder
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,17 +288,21 @@ lemma dirSupInaccOn_Iic (a : α) : DirSupInaccOn D (Iic a) :=
288288

289289
end Preorder
290290

291-
namespace PartialOrder
291+
section PartialOrder
292292
variable [PartialOrder α]
293293

294-
theorem dirSupClosed_singleton (a : α) : DirSupClosed {a} := by
294+
theorem DirSupClosed.singleton (a : α) : DirSupClosed {a} := by
295295
intro d hda hdn _ b hb
296296
rw [hdn.subset_singleton_iff] at hda
297297
subst hda
298298
exact mem_singleton_of_eq (hb.unique isLUB_singleton)
299299

300-
theorem dirSupClosedOn_singleton (a : α) : DirSupClosedOn D {a} :=
301-
(dirSupClosed_singleton a).dirSupClosedOn
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
302306

303307
end PartialOrder
304308

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/Club.lean

Lines changed: 186 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ Authors: Violeta Hernández Palacios
55
-/
66
module
77

8-
public import Mathlib.Order.DirSupClosed
98
public import Mathlib.SetTheory.Cardinal.Cofinality.Ordinal
109

1110
/-!
1211
# Club sets
1312
14-
A subset of a well-ordered type `α` is called a club set when it is closed in the order topology and
15-
cofinal. If `α` has no maximum, then an equivalent condition is that `α` is closed and unbounded;
16-
hence the name.
13+
A subset of a well-ordered type `α` is called a **club set** when it is closed in the order topology
14+
and cofinal. If `α` has no maximum, then an equivalent condition is that `α` is closed and
15+
unbounded; hence the name.
16+
17+
A **stationary set** is a set which intersects all club sets.
1718
1819
## Implementation notes
1920
@@ -28,6 +29,8 @@ universe u v
2829

2930
open Cardinal Order Ordinal Set
3031

32+
variable {α : Type v} {s t : Set α} {x : α} [LinearOrder α]
33+
3134
/-- A club set is closed under suprema and cofinal. -/
3235
structure IsClub {α : Type*} [LinearOrder α] (s : Set α) where
3336
/-- Club sets are closed under suprema. If `α` is a well-order with the order topology, this
@@ -39,8 +42,6 @@ structure IsClub {α : Type*} [LinearOrder α] (s : Set α) where
3942

4043
namespace IsClub
4144

42-
variable {α : Type v} {s t : Set α} {x : α} [LinearOrder α]
43-
4445
@[simp]
4546
theorem of_isEmpty [IsEmpty α] {s : Set α} : IsClub s :=
4647
⟨.of_isEmpty, .of_isEmpty⟩
@@ -49,6 +50,12 @@ theorem of_isEmpty [IsEmpty α] {s : Set α} : IsClub s :=
4950
protected theorem univ : IsClub (α := α) .univ :=
5051
⟨.univ, .univ⟩
5152

53+
protected theorem nonempty [Nonempty α] (hs : IsClub s) : s.Nonempty :=
54+
hs.isCofinal.nonempty
55+
56+
theorem _root_.isClub_empty_iff : IsClub (α := α) ∅ ↔ IsEmpty α :=
57+
fun h ↦ isCofinal_empty_iff.1 h.isCofinal, fun _ ↦ .of_isEmpty⟩
58+
5259
protected theorem union (hs : IsClub s) (ht : IsClub t) : IsClub (s ∪ t) :=
5360
⟨hs.dirSupClosed.union ht.dirSupClosed, hs.isCofinal.mono subset_union_left⟩
5461

@@ -83,7 +90,6 @@ theorem iInter_of_cof_le_one {ι : Type*} {f : ι → Set α} (hα : cof α ≤
8390
exact .sInter_of_cof_le_one hα (by simpa)
8491

8592
section WellFoundedLT
86-
8793
variable [WellFoundedLT α]
8894

8995
attribute [local instance]
@@ -117,14 +123,22 @@ protected theorem iInter {ι : Type u} {f : ι → Set α} (hα : cof α ≠ ℵ
117123
rw [← Cardinal.lift_lt]
118124
exact mk_range_le_lift.trans_lt hι
119125

120-
protected theorem inter {s t : Set α} (hα : cof α ≠ ℵ₀) (hs : IsClub s) (ht : IsClub t) :
121-
IsClub (s ∩ t) := by
122-
rw [← sInter_pair]
123-
have H : ∀ x ∈ ({s, t} : Set _), IsClub x := by simpa [hs]
124-
obtain hα | hα' := hα.lt_or_gt
125-
· rw [cof_lt_aleph0_iff] at hα
126-
exact .sInter_of_cof_le_one hα H
127-
· exact .sInter hα (hα'.trans_le' <| by simp) H
126+
theorem sInter_of_countable {s : Set (Set α)} (hα : cof α ≠ ℵ₀) (hsα : s.Countable)
127+
(hs : ∀ x ∈ s, IsClub x) : IsClub (⋂₀ s) := by
128+
obtain hα | hα := hα.lt_or_gt
129+
· apply IsClub.sInter_of_cof_le_one _ hs
130+
rwa [← Order.cof_lt_aleph0_iff]
131+
· apply IsClub.sInter hα.ne' (hα.trans_le' _) hs
132+
rwa [le_aleph0_iff_set_countable]
133+
134+
theorem iInter_of_countable {ι : Type*} {f : ι → Set α} [Countable ι] (hα : cof α ≠ ℵ₀)
135+
(hf : ∀ i, IsClub (f i)) : IsClub (⋂ i, f i) := by
136+
rw [← sInter_range]
137+
apply IsClub.sInter_of_countable hα (countable_range f)
138+
simpa
139+
140+
protected theorem inter (hα : cof α ≠ ℵ₀) (hs : IsClub s) (ht : IsClub t) : IsClub (s ∩ t) := by
141+
simpa [hs, ht] using IsClub.sInter_of_countable (s := {s, t}) hα
128142

129143
theorem _root_.Order.IsNormal.isClub_range {f : α → α} (hf : IsNormal f) : IsClub (.range f) :=
130144
⟨hf.dirSupClosed_range, fun x ↦ ⟨_, ⟨x, rfl⟩, hf.strictMono.le_apply⟩⟩
@@ -148,9 +162,32 @@ theorem _root_.Order.IsNormal.isClub_fixedPoints {f : α → α} (hα : cof α
148162
theorem ord_cof_eq_isClub_of_isCofinal (hs : IsCofinal s) (hsα : typeLT s = (cof α).ord) :
149163
∃ t, s ⊆ t ∧ IsClub t ∧ typeLT t = (cof α).ord := by
150164
obtain hα | hα := le_or_gt (cof α) ℵ₀
151-
· refine ⟨s, subset_rfl, ⟨?_, hs⟩, hsα⟩
152-
apply dirSupClosed_of
153-
sorry
165+
· refine ⟨s, subset_rfl, ⟨dirSupClosed_of_type_le_omega0 hs (hsα.trans_le ?_), hs⟩, hsα⟩
166+
simpa using ord_mono hα
167+
have : Nonempty α := by
168+
by_contra!
169+
simp at hα
170+
have f : (cof α).ord.ToType ≃o s := (type_lt_eq.1 <| by simp [hsα]).some
171+
let g (x : (cof α).ord.ToType) : α :=
172+
limitRecOn (motive := fun y ↦ y < (cof α).ord → α) _
173+
(fun h ↦ f <| .mk ⟨0, h⟩)
174+
(fun y _ hyα ↦ f <| .mk ⟨_, (lt_add_one _).trans hyα⟩)
175+
(fun y hy IH hyα ↦ ⨆ z : Iio y, IH _ z.2 (z.2.trans hyα))
176+
x.toOrd_lt
177+
have hsg : s ⊆ range g := by
178+
refine fun x hx ↦ ⟨.mk ⟨f.symm ⟨x, hx⟩ + 1, ?_⟩, ?_⟩
179+
· exact (isSuccLimit_ord hα.le).add_one_lt (ToType.toOrd_lt _)
180+
· unfold g
181+
convert limitRecOn_add_one ..
182+
refine ⟨range g, hsg, ⟨?_, hs.mono hsg⟩, ?_⟩
183+
· sorry
184+
· conv_rhs => rw [← hsα]
185+
apply (type_mono hsg).antisymm'
186+
apply (type_range_le _).trans
187+
apply le_antisymm <;> rw [type_le_iff']
188+
· sorry
189+
· refine ⟨⟨embeddingOfSubset _ _ hsg, ?_⟩⟩
190+
aesop
154191

155192
variable (α) in
156193
/-- Every well-order has a club subset of order type `(cof α).ord`. -/
@@ -159,5 +196,136 @@ theorem ord_cof_eq_isClub : ∃ t : Set α, IsClub t ∧ typeLT t = (cof α).ord
159196
obtain ⟨t, -, ht, ht'⟩ := ord_cof_eq_isClub_of_isCofinal hs hs'
160197
exact ⟨t, ht, ht'⟩
161198

199+
/-- Every club set has a club subset of order type `(cof α).ord`. -/
200+
theorem ord_cof_eq_isClub_of_subset (hs : IsClub s) :
201+
∃ t ⊆ s, IsClub t ∧ typeLT t = (cof α).ord := by
202+
obtain ⟨t, hts, ht, ht'⟩ := ord_cof_eq_of_isCofinal hs.isCofinal
203+
obtain ⟨u, hut, hu, hu'⟩ := ord_cof_eq_isClub_of_isCofinal ht ht'
204+
refine ⟨u, ?_, hu, hu'⟩
205+
sorry
206+
162207
end WellFoundedLT
163208
end IsClub
209+
210+
/-! ### Stationary sets -/
211+
212+
/-- A set is called stationary when it intersects all club sets. -/
213+
@[expose]
214+
def IsStationary (s : Set α) : Prop :=
215+
∀ ⦃t⦄, IsClub t → (s ∩ t).Nonempty
216+
217+
theorem not_isStationary_iff : ¬ IsStationary s ↔ ∃ t, IsClub t ∧ Disjoint s t := by
218+
simp [IsStationary, disjoint_iff, not_nonempty_iff_eq_empty]
219+
220+
@[gcongr]
221+
theorem IsStationary.mono (hs : IsStationary s) (h : s ⊆ t) : IsStationary t :=
222+
fun _u hu ↦ (hs hu).mono (inter_subset_inter_left _ h)
223+
224+
theorem IsStationary.nonempty (hs : IsStationary s) : s.Nonempty := by
225+
simpa using hs .univ
226+
227+
theorem isStationary_univ_iff : IsStationary (.univ (α := α)) ↔ Nonempty α := by
228+
simp [IsStationary, ← not_imp_not (b := IsClub _), not_nonempty_iff_eq_empty,
229+
isClub_empty_iff]
230+
231+
@[simp]
232+
protected theorem IsStationary.univ [Nonempty α] : IsStationary (.univ (α := α)) :=
233+
isStationary_univ_iff.2 ‹_›
234+
235+
@[simp]
236+
theorem not_isStationary_empty : ¬ IsStationary (∅ : Set α) := by
237+
intro h
238+
simpa using h .univ
239+
240+
theorem IsClub.isStationary [Nonempty α] [WellFoundedLT α] (hα : cof α ≠ ℵ₀) (hs : IsClub s) :
241+
IsStationary s :=
242+
fun _ ht ↦ (hs.inter hα ht).nonempty
243+
244+
@[simp]
245+
theorem not_isStationary_of_isEmpty [IsEmpty α] : ¬ IsStationary s :=
246+
s.eq_empty_of_isEmpty ▸ not_isStationary_empty
247+
248+
theorem IsStationary.of_not_isCofinal_compl (hs : ¬ IsCofinal sᶜ) : IsStationary s := by
249+
intro t ht
250+
obtain ⟨a, ha⟩ := not_isCofinal_iff.1 hs
251+
obtain ⟨b, hb, hb'⟩ := ht.isCofinal a
252+
refine ⟨b, ?_, hb⟩
253+
contrapose! ha
254+
exact ⟨b, ha, hb'⟩
255+
256+
theorem isStationary_iff_not_isCofinal_compl [WellFoundedLT α] (hα : cof α ≤ ℵ₀) :
257+
IsStationary s ↔ ¬ IsCofinal (sᶜ) where
258+
mp hs h := by
259+
obtain ⟨t, hts, ht, htα⟩ := ord_cof_eq_of_isCofinal h
260+
have ht' := dirSupClosed_of_type_le_omega0 ht (htα.trans_le ?_)
261+
· cases hs ⟨ht', ht⟩
262+
grind
263+
· simpa using ord_mono hα
264+
mpr := .of_not_isCofinal_compl
265+
266+
theorem isStationary_sUnion_iff_of_cof_le_one {s : Set (Set α)} (hα : cof α ≤ 1) :
267+
IsStationary (⋃₀ s) ↔ ∃ x ∈ s, IsStationary x where
268+
mp h := by
269+
contrapose! h
270+
simp_rw [not_isStationary_iff] at h ⊢
271+
choose f hf hxf using h
272+
refine ⟨⋂ x : s, f _ x.2, ?_, ?_⟩
273+
· apply IsClub.iInter_of_cof_le_one hα
274+
simpa
275+
· rw [disjoint_sUnion_left]
276+
exact fun x hx ↦ (hxf _ hx).mono_right (iInter_subset _ ⟨x, hx⟩)
277+
mpr := fun ⟨x, hxs, hx⟩ ↦ hx.mono (subset_sUnion_of_mem hxs)
278+
279+
theorem isStationary_iUnion_iff_of_cof_le_one {ι : Type u} {f : ι → Set α} (hα : cof α ≤ 1) :
280+
IsStationary (⋃ i, f i) ↔ ∃ i, IsStationary (f i) := by
281+
rw [← sUnion_range, isStationary_sUnion_iff_of_cof_le_one hα]
282+
simp
283+
284+
theorem isStationary_sUnion_iff_of_orderTop [OrderTop α] {s : Set (Set α)} :
285+
IsStationary (⋃₀ s) ↔ ∃ x ∈ s, IsStationary x :=
286+
isStationary_sUnion_iff_of_cof_le_one (by simp)
287+
288+
theorem isStationary_iUnion_iff_of_orderTop [OrderTop α] {ι : Type u} {f : ι → Set α} :
289+
IsStationary (⋃ i, f i) ↔ ∃ i, IsStationary (f i) :=
290+
isStationary_iUnion_iff_of_cof_le_one (by simp)
291+
292+
section WellFoundedLT
293+
variable [WellFoundedLT α]
294+
295+
theorem isStationary_sUnion_iff {s : Set (Set α)} (hα : cof α ≠ ℵ₀) (hsα : #s < cof α) :
296+
IsStationary (⋃₀ s) ↔ ∃ x ∈ s, IsStationary x where
297+
mp h := by
298+
contrapose! h
299+
simp_rw [not_isStationary_iff] at h ⊢
300+
choose f hf hxf using h
301+
refine ⟨⋂ x : s, f _ x.2, ?_, ?_⟩
302+
· apply IsClub.iInter hα <;> simpa
303+
· rw [disjoint_sUnion_left]
304+
exact fun x hx ↦ (hxf _ hx).mono_right (iInter_subset _ ⟨x, hx⟩)
305+
mpr := fun ⟨x, hxs, hx⟩ ↦ hx.mono (subset_sUnion_of_mem hxs)
306+
307+
theorem isStationary_iUnion_iff {ι : Type u} {f : ι → Set α} (hα : cof α ≠ ℵ₀)
308+
(hι : lift.{v} #ι < lift.{u} (cof α)) : IsStationary (⋃ i, f i) ↔ ∃ i, IsStationary (f i) := by
309+
rw [← sUnion_range, isStationary_sUnion_iff hα]
310+
· simp
311+
· rw [← Cardinal.lift_lt]
312+
exact mk_range_le_lift.trans_lt hι
313+
314+
theorem isStationary_sUnion_iff_of_countable {s : Set (Set α)} (hα : cof α ≠ ℵ₀)
315+
(hsα : s.Countable) : IsStationary (⋃₀ s) ↔ ∃ x ∈ s, IsStationary x := by
316+
obtain hα | hα := hα.lt_or_gt
317+
· apply isStationary_sUnion_iff_of_cof_le_one
318+
rwa [← Order.cof_lt_aleph0_iff]
319+
· apply isStationary_sUnion_iff hα.ne' (hα.trans_le' _)
320+
rwa [le_aleph0_iff_set_countable]
321+
322+
theorem isStationary_iUnion_iff_of_countable {ι : Type*} {f : ι → Set α} [Countable ι]
323+
(hα : cof α ≠ ℵ₀) : IsStationary (⋃ i, f i) ↔ ∃ i, IsStationary (f i) := by
324+
rw [← sUnion_range, isStationary_sUnion_iff_of_countable hα (countable_range f)]
325+
simp
326+
327+
theorem isStationary_union_iff (hα : cof α ≠ ℵ₀) :
328+
IsStationary (s ∪ t) ↔ IsStationary s ∨ IsStationary t := by
329+
simpa using isStationary_sUnion_iff_of_countable (s := {s, t}) hα
330+
331+
end WellFoundedLT

0 commit comments

Comments
 (0)