Skip to content

Commit 56a1462

Browse files
committed
feat(SetTheory/Ordinal): fundamental sequences (leanprover-community#37019)
We redefine a fundamental sequence for an ordinal `o` as a strict monotonic function `Iio o.cof.ord → Iio o` with cofinal range. We reprove the API on the pre-existing predicate, and deprecate it.
1 parent 37be209 commit 56a1462

4 files changed

Lines changed: 279 additions & 129 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6827,6 +6827,7 @@ public import Mathlib.SetTheory.Ordinal.Exponential
68276827
public import Mathlib.SetTheory.Ordinal.Family
68286828
public import Mathlib.SetTheory.Ordinal.FixedPoint
68296829
public import Mathlib.SetTheory.Ordinal.FixedPointApproximants
6830+
public import Mathlib.SetTheory.Ordinal.FundamentalSequence
68306831
public import Mathlib.SetTheory.Ordinal.Notation
68316832
public import Mathlib.SetTheory.Ordinal.Principal
68326833
public import Mathlib.SetTheory.Ordinal.Rank

Mathlib/Order/Cofinal.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ end LE
5858
section Preorder
5959
variable [Preorder α] [Preorder β]
6060

61+
@[simp]
6162
theorem IsCofinal.univ : IsCofinal (@univ α) :=
6263
fun a ↦ ⟨a, ⟨⟩, le_rfl⟩
6364

@@ -90,6 +91,10 @@ alias GaloisConnection.map_cofinal := GaloisConnection.map_isCofinal
9091
theorem OrderIso.map_isCofinal (e : α ≃o β) {s : Set α} (hs : IsCofinal s) : IsCofinal (e '' s) :=
9192
e.symm.to_galoisConnection.map_isCofinal hs
9293

94+
@[simp]
95+
theorem OrderIso.map_isCofinal_iff (e : α ≃o β) {s : Set α} : IsCofinal (e '' s) ↔ IsCofinal s :=
96+
fun hs ↦ by simpa using e.symm.map_isCofinal hs, e.map_isCofinal⟩
97+
9398
@[deprecated (since := "2026-03-15")]
9499
alias OrderIso.map_cofinal := OrderIso.map_isCofinal
95100

Mathlib/SetTheory/Cardinal/Cofinality.lean

Lines changed: 0 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -671,135 +671,6 @@ theorem bsup_lt_ord {o : Ordinal} {f : ∀ a < o, Ordinal} {c : Ordinal} (ho : o
671671
(∀ i hi, f i hi < c) → bsup.{u, u} o f < c :=
672672
bsup_lt_ord_lift (by rwa [o.card.lift_id])
673673

674-
/-! ### Fundamental sequences -/
675-
676-
-- TODO: move stuff about fundamental sequences to their own file.
677-
678-
/-- A fundamental sequence for `a` is an increasing sequence of length `o = cof a` that converges at
679-
`a`. We provide `o` explicitly in order to avoid type rewrites. -/
680-
@[expose]
681-
def IsFundamentalSequence (a o : Ordinal.{u}) (f : ∀ b < o, Ordinal.{u}) : Prop :=
682-
o ≤ a.cof.ord ∧ (∀ {i j} (hi hj), i < j → f i hi < f j hj) ∧ blsub.{u, u} o f = a
683-
684-
namespace IsFundamentalSequence
685-
686-
variable {a o : Ordinal.{u}} {f : ∀ b < o, Ordinal.{u}}
687-
688-
protected theorem cof_eq (hf : IsFundamentalSequence a o f) : a.cof.ord = o :=
689-
hf.1.antisymm' <| by
690-
rw [← hf.2.2]
691-
exact (ord_le_ord.2 (cof_blsub_le f)).trans (ord_card_le o)
692-
693-
protected theorem strict_mono (hf : IsFundamentalSequence a o f) {i j} :
694-
∀ hi hj, i < j → f i hi < f j hj :=
695-
hf.2.1
696-
697-
theorem blsub_eq (hf : IsFundamentalSequence a o f) : blsub.{u, u} o f = a :=
698-
hf.2.2
699-
700-
theorem ord_cof (hf : IsFundamentalSequence a o f) :
701-
IsFundamentalSequence a a.cof.ord fun i hi => f i (hi.trans_le (by rw [hf.cof_eq])) := by
702-
have H := hf.cof_eq
703-
subst H
704-
exact hf
705-
706-
theorem id_of_le_cof (h : o ≤ o.cof.ord) : IsFundamentalSequence o o fun a _ => a :=
707-
⟨h, @fun _ _ _ _ => id, blsub_id o⟩
708-
709-
protected theorem zero {f : ∀ b < (0 : Ordinal), Ordinal} : IsFundamentalSequence 0 0 f :=
710-
by rw [cof_zero, ord_zero], @fun i _ hi => (not_lt_zero hi).elim, blsub_zero f⟩
711-
712-
protected theorem succ : IsFundamentalSequence (succ o) 1 fun _ _ => o := by
713-
refine ⟨?_, @fun i j hi hj h => ?_, blsub_const Ordinal.one_ne_zero o⟩
714-
· rw [cof_succ, ord_one]
715-
· rw [lt_one_iff_zero] at hi hj
716-
rw [hi, hj] at h
717-
exact h.false.elim
718-
719-
protected theorem monotone (hf : IsFundamentalSequence a o f) {i j : Ordinal} (hi : i < o)
720-
(hj : j < o) (hij : i ≤ j) : f i hi ≤ f j hj := by
721-
rcases lt_or_eq_of_le hij with (hij | rfl)
722-
· exact (hf.2.1 hi hj hij).le
723-
· rfl
724-
725-
theorem trans {a o o' : Ordinal.{u}} {f : ∀ b < o, Ordinal.{u}} (hf : IsFundamentalSequence a o f)
726-
{g : ∀ b < o', Ordinal.{u}} (hg : IsFundamentalSequence o o' g) :
727-
IsFundamentalSequence a o' fun i hi =>
728-
f (g i hi) (by rw [← hg.2.2]; apply lt_blsub) := by
729-
refine ⟨?_, @fun i j _ _ h => hf.2.1 _ _ (hg.2.1 _ _ h), ?_⟩
730-
· rw [hf.cof_eq]
731-
exact hg.1.trans (ord_cof_le o)
732-
· rw [@blsub_comp.{u, u, u} o _ f (@IsFundamentalSequence.monotone _ _ f hf)]
733-
· exact hf.2.2
734-
· exact hg.2.2
735-
736-
protected theorem lt {a o : Ordinal} {s : Π p < o, Ordinal}
737-
(h : IsFundamentalSequence a o s) {p : Ordinal} (hp : p < o) : s p hp < a :=
738-
h.blsub_eq ▸ lt_blsub s p hp
739-
740-
end IsFundamentalSequence
741-
742-
/-- Every ordinal has a fundamental sequence. -/
743-
theorem exists_fundamental_sequence (a : Ordinal.{u}) :
744-
∃ f, IsFundamentalSequence a a.cof.ord f := by
745-
suffices h : ∃ o f, IsFundamentalSequence a o f by
746-
rcases h with ⟨o, f, hf⟩
747-
exact ⟨_, hf.ord_cof⟩
748-
rcases exists_lsub_cof a with ⟨ι, f, hf, hι⟩
749-
rcases ord_eq ι with ⟨r, wo, hr⟩
750-
let r' := Subrel r fun i ↦ ∀ j, r j i → f j < f i
751-
let hrr' : r' ↪r r := Subrel.relEmbedding _ _
752-
haveI := hrr'.isWellOrder
753-
refine
754-
⟨_, _, hrr'.ordinal_type_le.trans ?_, @fun i j _ h _ => (enum r' ⟨j, h⟩).prop _ ?_,
755-
le_antisymm (blsub_le fun i hi => lsub_le_iff.1 hf.le _) ?_⟩
756-
· rw [← hι, hr]
757-
· change r (hrr'.1 _) (hrr'.1 _)
758-
rwa [hrr'.2, @enum_lt_enum _ r']
759-
· rw [← hf, lsub_le_iff]
760-
intro i
761-
suffices h : ∃ i' hi', f i ≤ bfamilyOfFamily' r' (fun i => f i) i' hi' by
762-
rcases h with ⟨i', hi', hfg⟩
763-
exact hfg.trans_lt (lt_blsub _ _ _)
764-
by_cases! h : ∀ j, r j i → f j < f i
765-
· refine ⟨typein r' ⟨i, h⟩, typein_lt_type _ _, ?_⟩
766-
rw [bfamilyOfFamily'_typein]
767-
· obtain ⟨hji, hij⟩ := wo.wf.min_mem _ h
768-
refine ⟨typein r' ⟨_, fun k hkj => lt_of_lt_of_le ?_ hij⟩, typein_lt_type _ _, ?_⟩
769-
· by_contra! H
770-
exact (wo.wf.not_lt_min {j | r j i ∧ f i ≤ f j} ⟨IsTrans.trans _ _ _ hkj hji, H⟩) hkj
771-
· rwa [bfamilyOfFamily'_typein]
772-
773-
theorem IsFundamentalSequence.of_isNormal {f : Ordinal.{u} → Ordinal.{u}} (hf : IsNormal f)
774-
{a o} (ha : IsSuccLimit a) {g} (hg : IsFundamentalSequence a o g) :
775-
IsFundamentalSequence (f a) o fun b hb => f (g b hb) := by
776-
refine ⟨?_, @fun i j _ _ h => hf.strictMono (hg.2.1 _ _ h), ?_⟩
777-
· rcases exists_lsub_cof (f a) with ⟨ι, f', hf', hι⟩
778-
rw [← hg.cof_eq, ord_le_ord, ← hι]
779-
suffices (lsub.{u, u} fun i => sInf { b : Ordinal | f' i ≤ f b }) = a by
780-
rw [← this]
781-
apply cof_lsub_le
782-
have H : ∀ i, ∃ b < a, f' i ≤ f b := fun i => by
783-
have := lt_lsub.{u, u} f' i
784-
rw [hf', ← IsNormal.blsub_eq.{u, u} hf ha, lt_blsub_iff] at this
785-
simpa using this
786-
refine (lsub_le fun i => ?_).antisymm (le_of_forall_lt fun b hb => ?_)
787-
· rcases H i with ⟨b, hb, hb'⟩
788-
exact lt_of_le_of_lt (csInf_le' hb') hb
789-
· have := hf.strictMono hb
790-
rw [← hf', lt_lsub_iff] at this
791-
obtain ⟨i, hi⟩ := this
792-
rcases H i with ⟨b, _, hb⟩
793-
exact
794-
((le_csInf_iff'' ⟨b, by exact hb⟩).2 fun c hc =>
795-
hf.strictMono.le_iff_le.1 (hi.trans hc)).trans_lt (lt_lsub _ i)
796-
· rw [@blsub_comp.{u, u, u} a _ (fun b _ => f b) (@fun i j _ _ h => hf.strictMono.monotone h) g
797-
hg.2.2]
798-
exact IsNormal.blsub_eq.{u, u} hf ha
799-
800-
@[deprecated (since := "2025-12-25")]
801-
alias IsNormal.isFundamentalSequence := IsFundamentalSequence.of_isNormal
802-
803674
@[simp]
804675
theorem cof_add (a b : Ordinal) : b ≠ 0 → cof (a + b) = cof b := fun h => by
805676
rcases zero_or_succ_or_isSuccLimit b with (rfl | ⟨c, rfl⟩ | hb)

0 commit comments

Comments
 (0)