Skip to content

Commit c5edb8d

Browse files
committed
feat: ∃ a, f a ≤ x < f (succ a) for a normal function f (#36759)
Most of the diff is just re-sectioning.
1 parent 7c24df4 commit c5edb8d

3 files changed

Lines changed: 63 additions & 40 deletions

File tree

Mathlib/Order/IsNormal.lean

Lines changed: 58 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -114,41 +114,6 @@ theorem to_Iio (hf : IsNormal f) (a : α) :
114114
refine ⟨fun x y h ↦ hf.strictMono h, fun b hb c hc ↦ hf.2 (hb.subtypeVal (isLowerSet_Iio _)) ?_⟩
115115
simpa [upperBounds] using fun d hd ↦ hc ⟨d, hd.trans b.2⟩ hd
116116

117-
section WellFoundedLT
118-
variable [WellFoundedLT α] [SuccOrder α]
119-
120-
theorem of_succ_lt
121-
(hs : ∀ a, f a < f (succ a)) (hl : ∀ {a}, IsSuccLimit a → IsLUB (f '' Iio a) (f a)) :
122-
IsNormal f := by
123-
refine ⟨fun a b ↦ ?_, fun ha ↦ (hl ha).2
124-
induction b using SuccOrder.limitRecOn with
125-
| isMin b hb => exact hb.not_lt.elim
126-
| succ b hb IH =>
127-
intro hab
128-
obtain rfl | h := (lt_succ_iff_eq_or_lt_of_not_isMax hb).1 hab
129-
· exact hs a
130-
· exact (IH h).trans (hs b)
131-
| isSuccLimit b hb IH =>
132-
intro hab
133-
have hab' := hb.succ_lt hab
134-
exact (IH _ hab' (lt_succ_of_not_isMax hab.not_isMax)).trans_le
135-
((hl hb).1 (mem_image_of_mem _ hab'))
136-
137-
protected theorem ext [OrderBot α] {g : α → β} (hf : IsNormal f) (hg : IsNormal g) :
138-
f = g ↔ f ⊥ = g ⊥ ∧ ∀ a, f a = g a → f (succ a) = g (succ a) := by
139-
constructor
140-
· simp_all
141-
rintro ⟨H₁, H₂⟩
142-
ext a
143-
induction a using SuccOrder.limitRecOn with
144-
| isMin a ha => rw [ha.eq_bot, H₁]
145-
| succ a ha IH => exact H₂ a IH
146-
| isSuccLimit a ha IH =>
147-
apply (hf.isLUB_image_Iio_of_isSuccLimit ha).unique
148-
convert hg.isLUB_image_Iio_of_isSuccLimit ha using 1
149-
aesop
150-
151-
end WellFoundedLT
152117
end LinearOrder
153118

154119
section ConditionallyCompleteLinearOrder
@@ -204,5 +169,63 @@ theorem apply_of_isSuccLimit (hf : IsNormal f) (ha : IsSuccLimit a) :
204169
exact hx.le
205170

206171
end ConditionallyCompleteLinearOrderBot
172+
173+
section WellFoundedLT
174+
variable [LinearOrder α] [WellFoundedLT α] [SuccOrder α] [LinearOrder β]
175+
176+
theorem of_succ_lt
177+
(hs : ∀ a, f a < f (succ a)) (hl : ∀ {a}, IsSuccLimit a → IsLUB (f '' Iio a) (f a)) :
178+
IsNormal f := by
179+
refine ⟨fun a b ↦ ?_, fun ha ↦ (hl ha).2
180+
induction b using SuccOrder.limitRecOn with
181+
| isMin b hb => exact hb.not_lt.elim
182+
| succ b hb IH =>
183+
intro hab
184+
obtain rfl | h := (lt_succ_iff_eq_or_lt_of_not_isMax hb).1 hab
185+
· exact hs a
186+
· exact (IH h).trans (hs b)
187+
| isSuccLimit b hb IH =>
188+
intro hab
189+
have hab' := hb.succ_lt hab
190+
exact (IH _ hab' (lt_succ_of_not_isMax hab.not_isMax)).trans_le
191+
((hl hb).1 (mem_image_of_mem _ hab'))
192+
193+
theorem ext_iff [OrderBot α] {g : α → β} (hf : IsNormal f) (hg : IsNormal g) :
194+
f = g ↔ f ⊥ = g ⊥ ∧ ∀ a, f a = g a → f (succ a) = g (succ a) := by
195+
constructor
196+
· simp_all
197+
rintro ⟨H₁, H₂⟩
198+
ext a
199+
induction a using SuccOrder.limitRecOn with
200+
| isMin a ha => rw [ha.eq_bot, H₁]
201+
| succ a ha IH => exact H₂ a IH
202+
| isSuccLimit a ha IH =>
203+
apply (hf.isLUB_image_Iio_of_isSuccLimit ha).unique
204+
convert hg.isLUB_image_Iio_of_isSuccLimit ha using 1
205+
aesop
206+
207+
@[deprecated (since := "2026-03-22")] protected alias ext := IsNormal.ext_iff
208+
209+
theorem exists_map_le_lt_map_succ_of_exists_ge [NoMaxOrder α] [OrderBot α] [WellFoundedLT β]
210+
{f : α → β} {x : β} (hf : IsNormal f) (hf' : ∃ y, x ≤ f y) (hx : f ⊥ ≤ x) :
211+
∃ a, f a ≤ x ∧ x < f (succ a) := by
212+
have : Nonempty β := ⟨x⟩
213+
let := WellFoundedLT.toOrderBot β
214+
let := WellFoundedLT.conditionallyCompleteLinearOrderBot α
215+
let := WellFoundedLT.conditionallyCompleteLinearOrderBot β
216+
have H : BddAbove (f ⁻¹' Iic x) :=
217+
have ⟨y, hy⟩ := hf'
218+
⟨y, fun z hz ↦ hf.strictMono.le_iff_le.1 <| hz.trans hy⟩
219+
refine ⟨sSup (f ⁻¹' Set.Iic x), ?_, ?_⟩
220+
· rw [hf.le_iff_le_sSup ⟨⊥, hx⟩ H]
221+
· rw [← not_le, hf.le_iff_le_sSup ⟨⊥, hx⟩ H, not_le, lt_succ_iff]
222+
223+
/-- If `f : α → α`, we can infer one of the hypotheses in
224+
`exists_map_le_lt_map_succ_of_exists_ge`. -/
225+
theorem exists_map_le_lt_map_succ [NoMaxOrder α] [OrderBot α] {f : α → α} {x : α}
226+
(hf : IsNormal f) (hx : f ⊥ ≤ x) : ∃ a, f a ≤ x ∧ x < f (succ a) :=
227+
exists_map_le_lt_map_succ_of_exists_ge hf ⟨x, hf.strictMono.le_apply⟩ hx
228+
229+
end WellFoundedLT
207230
end IsNormal
208231
end Order

Mathlib/SetTheory/Ordinal/Family.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -848,10 +848,10 @@ theorem isNormal_iff_lt_succ_and_blsub_eq {f : Ordinal.{u} → Ordinal.{max u v}
848848
constructor <;> intro H o ho <;> have := H o ho <;>
849849
rwa [← bsup_eq_blsub_of_lt_succ_limit ho fun a _ => h a] at *
850850

851-
@[deprecated IsNormal.ext (since := "2025-12-25")]
851+
@[deprecated IsNormal.ext_iff (since := "2025-12-25")]
852852
theorem IsNormal.eq_iff_zero_and_succ {f g : Ordinal.{u} → Ordinal.{u}} (hf : IsNormal f)
853853
(hg : IsNormal g) : f = g ↔ f 0 = g 0 ∧ ∀ a, f a = g a → f (succ a) = g (succ a) :=
854-
Order.IsNormal.ext hf hg
854+
Order.IsNormal.ext_iff hf hg
855855

856856
end blsub
857857

Mathlib/SetTheory/Ordinal/FixedPoint.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ theorem deriv_strictMono (f) : StrictMono (deriv f) :=
362362
derivFamily_strictMono _
363363

364364
theorem deriv_eq_id_of_nfp_eq_id (h : nfp f = id) : deriv f = id :=
365-
((isNormal_deriv _).ext .id).2 (by simp [h])
365+
((isNormal_deriv _).ext_iff .id).2 (by simp [h])
366366

367367
@[deprecated (since := "2025-10-25")]
368368
alias deriv_id_of_nfp_id := deriv_eq_id_of_nfp_eq_id
@@ -451,7 +451,7 @@ theorem add_le_right_iff_mul_omega0_le {a b : Ordinal} : a + b ≤ b ↔ a * ω
451451

452452
theorem deriv_add_eq_mul_omega0_add (a b : Ordinal.{u}) : deriv (a + ·) b = a * ω + b := by
453453
revert b
454-
rw [← funext_iff, IsNormal.ext (isNormal_deriv _) (isNormal_add_right _)]
454+
rw [← funext_iff, IsNormal.ext_iff (isNormal_deriv _) (isNormal_add_right _)]
455455
refine ⟨?_, fun a h => ?_⟩
456456
· rw [bot_eq_zero, deriv_zero_right, add_zero]
457457
exact nfp_add_zero a
@@ -534,7 +534,7 @@ theorem deriv_mul_eq_opow_omega0_mul {a : Ordinal.{u}} (ha : 0 < a) (b) :
534534
deriv (a * ·) b = a ^ ω * b := by
535535
revert b
536536
rw [← funext_iff,
537-
IsNormal.ext (isNormal_deriv _) (isNormal_mul_right (opow_pos ω ha))]
537+
IsNormal.ext_iff (isNormal_deriv _) (isNormal_mul_right (opow_pos ω ha))]
538538
refine ⟨?_, fun c h => ?_⟩
539539
· rw [bot_eq_zero, deriv_zero_right, nfp_mul_zero, mul_zero]
540540
· rw [deriv_succ, h]

0 commit comments

Comments
 (0)