fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
isNormal_deriv (f) : IsNormal (deriv f) := isNormal_derivFamily _
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
isNormal_deriv
null
deriv_strictMono (f) : StrictMono (deriv f) := derivFamily_strictMono _
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
deriv_strictMono
null
deriv_id_of_nfp_id (h : nfp f = id) : deriv f = id := ((isNormal_deriv _).eq_iff_zero_and_succ IsNormal.refl).2 (by simp [h])
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
deriv_id_of_nfp_id
null
IsNormal.deriv_fp (H : IsNormal f) : ∀ o, f (deriv f o) = deriv f o := derivFamily_fp (i := ⟨⟩) H
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
IsNormal.deriv_fp
null
IsNormal.le_iff_deriv (H : IsNormal f) {a} : f a ≤ a ↔ ∃ o, deriv f o = a := by unfold deriv rw [← le_iff_derivFamily fun _ : Unit => H] exact ⟨fun h _ => h, fun h => h Unit.unit⟩
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
IsNormal.le_iff_deriv
null
IsNormal.fp_iff_deriv (H : IsNormal f) {a} : f a = a ↔ ∃ o, deriv f o = a := by rw [← H.le_iff_eq, H.le_iff_deriv]
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
IsNormal.fp_iff_deriv
null
IsNormal.mem_range_deriv (H : IsNormal f) {a} : a ∈ Set.range (deriv f) ↔ f a = a := H.fp_iff_deriv.symm
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
IsNormal.mem_range_deriv
null
deriv_eq_enumOrd (H : IsNormal f) : deriv f = enumOrd (Function.fixedPoints f) := by convert derivFamily_eq_enumOrd fun _ : Unit => H exact (Set.iInter_const _).symm
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
deriv_eq_enumOrd
`Ordinal.deriv` enumerates the fixed points of a normal function.
deriv_eq_id_of_nfp_eq_id (h : nfp f = id) : deriv f = id := (IsNormal.eq_iff_zero_and_succ (isNormal_deriv _) IsNormal.refl).2 <| by simp [h]
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
deriv_eq_id_of_nfp_eq_id
null
nfp_zero_left (a) : nfp 0 a = a := by rw [← iSup_iterate_eq_nfp] apply (Ordinal.iSup_le ?_).antisymm (Ordinal.le_iSup _ 0) intro n cases n · rfl · rw [Function.iterate_succ'] simp @[simp]
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
nfp_zero_left
null
nfp_zero : nfp 0 = id := by ext exact nfp_zero_left _ @[simp]
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
nfp_zero
null
deriv_zero : deriv 0 = id := deriv_eq_id_of_nfp_eq_id nfp_zero
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
deriv_zero
null
deriv_zero_left (a) : deriv 0 a = a := by rw [deriv_zero, id_eq]
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
deriv_zero_left
null
@[simp] nfp_add_zero (a) : nfp (a + ·) 0 = a * ω := by simp_rw [← iSup_iterate_eq_nfp, ← iSup_mul_nat] congr; funext n induction n with | zero => rw [Nat.cast_zero, mul_zero, iterate_zero_apply] | succ n hn => rw [iterate_succ_apply', Nat.add_comm, Nat.cast_add, Nat.cast_one, mul_one_add, hn]
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
nfp_add_zero
null
nfp_add_eq_mul_omega0 {a b} (hba : b ≤ a * ω) : nfp (a + ·) b = a * ω := by apply le_antisymm (nfp_le_fp (isNormal_add_right a).monotone hba _) · rw [← nfp_add_zero] exact nfp_monotone (isNormal_add_right a).monotone (Ordinal.zero_le b) · dsimp; rw [← mul_one_add, one_add_omega0]
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
nfp_add_eq_mul_omega0
null
add_eq_right_iff_mul_omega0_le {a b : Ordinal} : a + b = b ↔ a * ω ≤ b := by refine ⟨fun h => ?_, fun h => ?_⟩ · rw [← nfp_add_zero a, ← deriv_zero_right] obtain ⟨c, hc⟩ := (isNormal_add_right a).fp_iff_deriv.1 h rw [← hc] exact (isNormal_deriv _).monotone (Ordinal.zero_le _) · have := Ordinal.add_sub_cancel_of_le h nth_rw 1 [← this] rwa [← add_assoc, ← mul_one_add, one_add_omega0]
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
add_eq_right_iff_mul_omega0_le
null
add_le_right_iff_mul_omega0_le {a b : Ordinal} : a + b ≤ b ↔ a * ω ≤ b := by rw [← add_eq_right_iff_mul_omega0_le] exact (isNormal_add_right a).le_iff_eq
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
add_le_right_iff_mul_omega0_le
null
deriv_add_eq_mul_omega0_add (a b : Ordinal.{u}) : deriv (a + ·) b = a * ω + b := by revert b rw [← funext_iff, IsNormal.eq_iff_zero_and_succ (isNormal_deriv _) (isNormal_add_right _)] refine ⟨?_, fun a h => ?_⟩ · rw [deriv_zero_right, add_zero] exact nfp_add_zero a · rw [deriv_succ, h, add_succ] exact nfp_eq_self (add_eq_right_iff_mul_omega0_le.2 ((le_add_right _ _).trans (le_succ _))) /-! ### Fixed points of multiplication -/ @[simp]
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
deriv_add_eq_mul_omega0_add
null
nfp_mul_one {a : Ordinal} (ha : 0 < a) : nfp (a * ·) 1 = a ^ ω := by rw [← iSup_iterate_eq_nfp, ← iSup_pow ha] congr funext n induction n with | zero => rw [pow_zero, iterate_zero_apply] | succ n hn => rw [iterate_succ_apply', Nat.add_comm, pow_add, pow_one, hn] @[simp]
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
nfp_mul_one
null
nfp_mul_zero (a : Ordinal) : nfp (a * ·) 0 = 0 := by rw [← Ordinal.le_zero, nfp_le_iff] intro n induction n with | zero => rfl | succ n hn => dsimp only; rwa [iterate_succ_apply, mul_zero]
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
nfp_mul_zero
null
nfp_mul_eq_opow_omega0 {a b : Ordinal} (hb : 0 < b) (hba : b ≤ a ^ ω) : nfp (a * ·) b = a ^ ω := by rcases eq_zero_or_pos a with ha | ha · rw [ha, zero_opow omega0_ne_zero] at hba ⊢ simp_rw [Ordinal.le_zero.1 hba, zero_mul] exact nfp_zero_left 0 apply le_antisymm · apply nfp_le_fp (isNormal_mul_right ha).monotone hba rw [← opow_one_add, one_add_omega0] rw [← nfp_mul_one ha] exact nfp_monotone (isNormal_mul_right ha).monotone (one_le_iff_pos.2 hb)
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
nfp_mul_eq_opow_omega0
null
eq_zero_or_opow_omega0_le_of_mul_eq_right {a b : Ordinal} (hab : a * b = b) : b = 0 ∨ a ^ ω ≤ b := by rcases eq_zero_or_pos a with ha | ha · rw [ha, zero_opow omega0_ne_zero] exact Or.inr (Ordinal.zero_le b) rw [or_iff_not_imp_left] intro hb rw [← nfp_mul_one ha] rw [← Ne, ← one_le_iff_ne_zero] at hb exact nfp_le_fp (isNormal_mul_right ha).monotone hb (le_of_eq hab)
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
eq_zero_or_opow_omega0_le_of_mul_eq_right
null
mul_eq_right_iff_opow_omega0_dvd {a b : Ordinal} : a * b = b ↔ a ^ ω ∣ b := by rcases eq_zero_or_pos a with ha | ha · rw [ha, zero_mul, zero_opow omega0_ne_zero, zero_dvd_iff] exact eq_comm refine ⟨fun hab => ?_, fun h => ?_⟩ · rw [dvd_iff_mod_eq_zero] rw [← div_add_mod b (a ^ ω), mul_add, ← mul_assoc, ← opow_one_add, one_add_omega0, add_left_cancel_iff] at hab rcases eq_zero_or_opow_omega0_le_of_mul_eq_right hab with hab | hab · exact hab refine (not_lt_of_ge hab (mod_lt b (opow_ne_zero ω ?_))).elim rwa [← Ordinal.pos_iff_ne_zero] obtain ⟨c, hc⟩ := h rw [hc, ← mul_assoc, ← opow_one_add, one_add_omega0]
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
mul_eq_right_iff_opow_omega0_dvd
null
mul_le_right_iff_opow_omega0_dvd {a b : Ordinal} (ha : 0 < a) : a * b ≤ b ↔ (a ^ ω) ∣ b := by rw [← mul_eq_right_iff_opow_omega0_dvd] exact (isNormal_mul_right ha).le_iff_eq
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
mul_le_right_iff_opow_omega0_dvd
null
nfp_mul_opow_omega0_add {a c : Ordinal} (b) (ha : 0 < a) (hc : 0 < c) (hca : c ≤ a ^ ω) : nfp (a * ·) (a ^ ω * b + c) = a ^ ω * succ b := by apply le_antisymm · apply nfp_le_fp (isNormal_mul_right ha).monotone · rw [mul_succ] apply add_le_add_left hca · dsimp only; rw [← mul_assoc, ← opow_one_add, one_add_omega0] · obtain ⟨d, hd⟩ := mul_eq_right_iff_opow_omega0_dvd.1 ((isNormal_mul_right ha).nfp_fp ((a ^ ω) * b + c)) rw [hd] apply mul_le_mul_left' have := le_nfp (a * ·) (a ^ ω * b + c) rw [hd] at this have := (add_lt_add_left hc (a ^ ω * b)).trans_le this rw [add_zero, mul_lt_mul_iff_right₀ (opow_pos ω ha)] at this rwa [succ_le_iff]
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
nfp_mul_opow_omega0_add
null
deriv_mul_eq_opow_omega0_mul {a : Ordinal.{u}} (ha : 0 < a) (b) : deriv (a * ·) b = a ^ ω * b := by revert b rw [← funext_iff, IsNormal.eq_iff_zero_and_succ (isNormal_deriv _) (isNormal_mul_right (opow_pos ω ha))] refine ⟨?_, fun c h => ?_⟩ · dsimp only; rw [deriv_zero_right, nfp_mul_zero, mul_zero] · rw [deriv_succ, h] exact nfp_mul_opow_omega0_add c ha zero_lt_one (one_le_iff_pos.2 (opow_pos _ ha))
theorem
SetTheory
[ "Mathlib.Logic.Small.List", "Mathlib.SetTheory.Ordinal.Enum", "Mathlib.SetTheory.Ordinal.Exponential" ]
Mathlib/SetTheory/Ordinal/FixedPoint.lean
deriv_mul_eq_opow_omega0_mul
null
not_injective_limitation_set : ¬ InjOn g (Iio (ord <| succ #α)) := by intro h_inj have h := lift_mk_le_lift_mk_of_injective <| injOn_iff_injective.1 h_inj have mk_initialSeg_subtype : #(Iio (ord <| succ #α)) = lift.{u + 1} (succ #α) := by simpa only [coe_setOf, card_typein, card_ord] using mk_Iio_ordinal (ord <| succ #α) rw [mk_initialSeg_subtype, lift_lift, lift_le] at h exact not_le_of_gt (Order.lt_succ #α) h
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
not_injective_limitation_set
null
lfpApprox (a : Ordinal.{u}) : α := sSup ({ f (lfpApprox b) | (b : Ordinal) (h : b < a) } ∪ {x}) termination_by a decreasing_by exact h
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
lfpApprox
The ordinal-indexed sequence approximating the least fixed point greater than an initial value `x`. It is defined in such a way that we have `lfpApprox 0 x = x` and `lfpApprox a x = ⨆ b < a, f (lfpApprox b x)`.
lfpApprox_monotone : Monotone (lfpApprox f x) := by intro a b h rw [lfpApprox, lfpApprox] gcongr sSup (?_ ∪ {x}) simp only [exists_prop, Set.setOf_subset_setOf, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂] intro a' h' use a' exact ⟨lt_of_lt_of_le h' h, rfl⟩
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
lfpApprox_monotone
null
le_lfpApprox {a : Ordinal} : x ≤ lfpApprox f x a := by rw [lfpApprox] apply le_sSup simp only [exists_prop, Set.union_singleton, Set.mem_insert_iff, Set.mem_setOf_eq, true_or]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
le_lfpApprox
null
lfpApprox_add_one (h : x ≤ f x) (a : Ordinal) : lfpApprox f x (a + 1) = f (lfpApprox f x a) := by apply le_antisymm · conv => left; rw [lfpApprox] apply sSup_le simp only [Ordinal.add_one_eq_succ, lt_succ_iff, exists_prop, Set.union_singleton, Set.mem_insert_iff, Set.mem_setOf_eq, forall_eq_or_imp, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂] apply And.intro · apply le_trans h apply Monotone.imp f.monotone exact le_lfpApprox f x · intro a' h apply f.2; apply lfpApprox_monotone; exact h · conv => right; rw [lfpApprox] apply le_sSup simp only [Ordinal.add_one_eq_succ, lt_succ_iff, exists_prop] rw [Set.mem_union] apply Or.inl simp only [Set.mem_setOf_eq] use a
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
lfpApprox_add_one
null
lfpApprox_mono_left : Monotone (lfpApprox : (α →o α) → _) := by intro f g h x a induction a using Ordinal.induction with | h i ih => rw [lfpApprox, lfpApprox] apply sSup_le simp only [exists_prop, Set.union_singleton, Set.mem_insert_iff, Set.mem_setOf_eq, sSup_insert, forall_eq_or_imp, le_sup_left, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂, true_and] intro i' h_lt apply le_sup_of_le_right apply le_sSup_of_le · use i' · apply le_trans (h _) simp only [OrderHom.toFun_eq_coe] exact g.monotone (ih i' h_lt)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
lfpApprox_mono_left
null
lfpApprox_mono_mid : Monotone (lfpApprox f) := by intro x₁ x₂ h a induction a using Ordinal.induction with | h i ih => rw [lfpApprox, lfpApprox] apply sSup_le simp only [exists_prop, Set.union_singleton, Set.mem_insert_iff, Set.mem_setOf_eq, sSup_insert, forall_eq_or_imp, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂] constructor · exact le_sup_of_le_left h · intro i' h_i' apply le_sup_of_le_right apply le_sSup_of_le · use i' · exact f.monotone (ih i' h_i')
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
lfpApprox_mono_mid
null
lfpApprox_eq_of_mem_fixedPoints {a b : Ordinal} (h_init : x ≤ f x) (h_ab : a ≤ b) (h : lfpApprox f x a ∈ fixedPoints f) : lfpApprox f x b = lfpApprox f x a := by rw [mem_fixedPoints_iff] at h induction b using Ordinal.induction with | h b IH => apply le_antisymm · conv => left; rw [lfpApprox] apply sSup_le simp only [exists_prop, Set.union_singleton, Set.mem_insert_iff, Set.mem_setOf_eq, forall_eq_or_imp, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂] apply And.intro (le_lfpApprox f x) intro a' ha'b by_cases haa : a' < a · rw [← lfpApprox_add_one f x h_init] apply lfpApprox_monotone simp only [Ordinal.add_one_eq_succ, succ_le_iff] exact haa · rw [IH a' ha'b (le_of_not_gt haa), h] · exact lfpApprox_monotone f x h_ab
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
lfpApprox_eq_of_mem_fixedPoints
The approximations of the least fixed point stabilize at a fixed point of `f`
exists_lfpApprox_eq_lfpApprox : ∃ a < ord <| succ #α, ∃ b < ord <| succ #α, a ≠ b ∧ lfpApprox f x a = lfpApprox f x b := by have h_ninj := not_injective_limitation_set <| lfpApprox f x rw [Set.injOn_iff_injective, Function.not_injective_iff] at h_ninj let ⟨a, b, h_fab, h_nab⟩ := h_ninj use a.val; apply And.intro a.prop use b.val; apply And.intro b.prop apply And.intro · intro h_eq; rw [Subtype.coe_inj] at h_eq; exact h_nab h_eq · exact h_fab
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
exists_lfpApprox_eq_lfpApprox
There are distinct indices smaller than the successor of the domain's cardinality yielding the same value
lfpApprox_mem_fixedPoints_of_eq {a b c : Ordinal} (h_init : x ≤ f x) (h_ab : a < b) (h_ac : a ≤ c) (h_fab : lfpApprox f x a = lfpApprox f x b) : lfpApprox f x c ∈ fixedPoints f := by have lfpApprox_mem_fixedPoint : lfpApprox f x a ∈ fixedPoints f := by rw [mem_fixedPoints_iff, ← lfpApprox_add_one f x h_init] exact Monotone.eq_of_ge_of_le (lfpApprox_monotone f x) h_fab (SuccOrder.le_succ a) (SuccOrder.succ_le_of_lt h_ab) rw [lfpApprox_eq_of_mem_fixedPoints f x h_init] · exact lfpApprox_mem_fixedPoint · exact h_ac · exact lfpApprox_mem_fixedPoint
lemma
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
lfpApprox_mem_fixedPoints_of_eq
If the sequence of ordinal-indexed approximations takes a value twice, then it actually stabilised at that value.
lfpApprox_ord_mem_fixedPoint (h_init : x ≤ f x) : lfpApprox f x (ord <| succ #α) ∈ fixedPoints f := by let ⟨a, h_a, b, h_b, h_nab, h_fab⟩ := exists_lfpApprox_eq_lfpApprox f x cases le_total a b with | inl h_ab => exact lfpApprox_mem_fixedPoints_of_eq f x h_init (h_nab.lt_of_le h_ab) (le_of_lt h_a) h_fab | inr h_ba => exact lfpApprox_mem_fixedPoints_of_eq f x h_init (h_nab.symm.lt_of_le h_ba) (le_of_lt h_b) (h_fab.symm)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
lfpApprox_ord_mem_fixedPoint
The approximation at the index of the successor of the domain's cardinality is a fixed point
lfpApprox_le_of_mem_fixedPoints {a : α} (h_a : a ∈ fixedPoints f) (h_le_init : x ≤ a) (i : Ordinal) : lfpApprox f x i ≤ a := by induction i using Ordinal.induction with | h i IH => rw [lfpApprox] apply sSup_le simp only [exists_prop] intro y h_y simp only [Set.mem_union, Set.mem_setOf_eq, Set.mem_singleton_iff] at h_y cases h_y with | inl h_y => let ⟨j, h_j_lt, h_j⟩ := h_y rw [← h_j, ← h_a] exact f.monotone' (IH j h_j_lt) | inr h_y => rw [h_y] exact h_le_init
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
lfpApprox_le_of_mem_fixedPoints
Every value of the approximation is less or equal than every fixed point of `f` greater or equal than the initial value
lfpApprox_ord_eq_lfp : lfpApprox f ⊥ (ord <| succ #α) = f.lfp := by apply le_antisymm · have h_lfp : ∃ y : fixedPoints f, f.lfp = y := by use ⊥; exact rfl let ⟨y, h_y⟩ := h_lfp; rw [h_y] exact lfpApprox_le_of_mem_fixedPoints f ⊥ y.2 bot_le (ord <| succ #α) · have h_fix : ∃ y : fixedPoints f, lfpApprox f ⊥ (ord <| succ #α) = y := by simpa only [Subtype.exists, mem_fixedPoints, exists_prop, exists_eq_right'] using lfpApprox_ord_mem_fixedPoint f ⊥ bot_le let ⟨x, h_x⟩ := h_fix; rw [h_x] exact lfp_le_fixed f x.prop
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
lfpApprox_ord_eq_lfp
The approximation sequence converges at the successor of the domain's cardinality to the least fixed point if starting from `⊥`
lfp_mem_range_lfpApprox : f.lfp ∈ Set.range (lfpApprox f ⊥) := by use ord <| succ #α exact lfpApprox_ord_eq_lfp f set_option linter.unusedVariables false in
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
lfp_mem_range_lfpApprox
Some approximation of the least fixed point starting from `⊥` is the least fixed point.
gfpApprox (a : Ordinal.{u}) : α := sInf ({ f (gfpApprox b) | (b : Ordinal) (h : b < a) } ∪ {x}) termination_by a decreasing_by exact h unseal gfpApprox lfpApprox
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
gfpApprox
The ordinal-indexed sequence approximating the greatest fixed point greater than an initial value `x`. It is defined in such a way that we have `gfpApprox 0 x = x` and `gfpApprox a x = ⨅ b < a, f (lfpApprox b x)`.
gfpApprox_antitone : Antitone (gfpApprox f x) := lfpApprox_monotone f.dual x
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
gfpApprox_antitone
null
gfpApprox_le {a : Ordinal} : gfpApprox f x a ≤ x := le_lfpApprox f.dual x
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
gfpApprox_le
null
gfpApprox_add_one (h : f x ≤ x) (a : Ordinal) : gfpApprox f x (a + 1) = f (gfpApprox f x a) := lfpApprox_add_one f.dual x h a
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
gfpApprox_add_one
null
gfpApprox_mono_left : Monotone (gfpApprox : (α →o α) → _) := by intro f g h have : g.dual ≤ f.dual := h exact lfpApprox_mono_left this
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
gfpApprox_mono_left
null
gfpApprox_mono_mid : Monotone (gfpApprox f) := fun _ _ h => lfpApprox_mono_mid f.dual h
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
gfpApprox_mono_mid
null
gfpApprox_eq_of_mem_fixedPoints {a b : Ordinal} (h_init : f x ≤ x) (h_ab : a ≤ b) (h : gfpApprox f x a ∈ fixedPoints f) : gfpApprox f x b = gfpApprox f x a := lfpApprox_eq_of_mem_fixedPoints f.dual x h_init h_ab h
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
gfpApprox_eq_of_mem_fixedPoints
The approximations of the greatest fixed point stabilize at a fixed point of `f`
exists_gfpApprox_eq_gfpApprox : ∃ a < ord <| succ #α, ∃ b < ord <| succ #α, a ≠ b ∧ gfpApprox f x a = gfpApprox f x b := exists_lfpApprox_eq_lfpApprox f.dual x
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
exists_gfpApprox_eq_gfpApprox
There are distinct indices smaller than the successor of the domain's cardinality yielding the same value
gfpApprox_ord_mem_fixedPoint (h_init : f x ≤ x) : gfpApprox f x (ord <| succ #α) ∈ fixedPoints f := lfpApprox_ord_mem_fixedPoint f.dual x h_init
lemma
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
gfpApprox_ord_mem_fixedPoint
The approximation at the index of the successor of the domain's cardinality is a fixed point
le_gfpApprox_of_mem_fixedPoints {a : α} (h_a : a ∈ fixedPoints f) (h_le_init : a ≤ x) (i : Ordinal) : a ≤ gfpApprox f x i := lfpApprox_le_of_mem_fixedPoints f.dual x h_a h_le_init i
lemma
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
le_gfpApprox_of_mem_fixedPoints
Every value of the approximation is greater or equal than every fixed point of `f` less or equal than the initial value
gfpApprox_ord_eq_gfp : gfpApprox f ⊤ (ord <| succ #α) = f.gfp := lfpApprox_ord_eq_lfp f.dual
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
gfpApprox_ord_eq_gfp
The approximation sequence converges at the successor of the domain's cardinality to the greatest fixed point if starting from `⊥`
gfp_mem_range_gfpApprox : f.gfp ∈ Set.range (gfpApprox f ⊤) := lfp_mem_range_lfpApprox f.dual
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Arithmetic" ]
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
gfp_mem_range_gfpApprox
Some approximation of the least fixed point starting from `⊤` is the greatest fixed point.
NatOrdinal : Type _ := Ordinal deriving Zero, Inhabited, One, WellFoundedRelation, Uncountable, LinearOrder, SuccOrder, OrderBot, NoMaxOrder, ZeroLEOneClass
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
NatOrdinal
A type synonym for ordinals with natural addition and multiplication.
NatOrdinal.instNeZeroOne : NeZero (1 : NatOrdinal) := Ordinal.instNeZeroOne
instance
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
NatOrdinal.instNeZeroOne
null
@[match_pattern] Ordinal.toNatOrdinal : Ordinal ≃o NatOrdinal := OrderIso.refl _
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
Ordinal.toNatOrdinal
The identity function between `Ordinal` and `NatOrdinal`.
@[match_pattern] NatOrdinal.toOrdinal : NatOrdinal ≃o Ordinal := OrderIso.refl _
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
NatOrdinal.toOrdinal
The identity function between `NatOrdinal` and `Ordinal`.
@[simp] toOrdinal_symm_eq : NatOrdinal.toOrdinal.symm = Ordinal.toNatOrdinal := rfl @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
toOrdinal_symm_eq
null
toOrdinal_toNatOrdinal (a : NatOrdinal) : a.toOrdinal.toNatOrdinal = a := rfl
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
toOrdinal_toNatOrdinal
null
lt_wf : @WellFounded NatOrdinal (· < ·) := Ordinal.lt_wf
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
lt_wf
null
@[simp] bot_eq_zero : (⊥ : NatOrdinal) = 0 := rfl @[simp] theorem toOrdinal_zero : toOrdinal 0 = 0 := rfl @[simp] theorem toOrdinal_one : toOrdinal 1 = 1 := rfl @[simp] theorem toOrdinal_eq_zero {a} : toOrdinal a = 0 ↔ a = 0 := Iff.rfl @[simp] theorem toOrdinal_eq_one {a} : toOrdinal a = 1 ↔ a = 1 := Iff.rfl @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
bot_eq_zero
null
toOrdinal_max (a b : NatOrdinal) : toOrdinal (max a b) = max (toOrdinal a) (toOrdinal b) := rfl @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
toOrdinal_max
null
toOrdinal_min (a b : NatOrdinal) : toOrdinal (min a b) = min (toOrdinal a) (toOrdinal b) := rfl
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
toOrdinal_min
null
succ_def (a : NatOrdinal) : succ a = toNatOrdinal (toOrdinal a + 1) := rfl @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
succ_def
null
zero_le (o : NatOrdinal) : 0 ≤ o := Ordinal.zero_le o
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
zero_le
null
not_lt_zero (o : NatOrdinal) : ¬ o < 0 := Ordinal.not_lt_zero o @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
not_lt_zero
null
lt_one_iff_zero {o : NatOrdinal} : o < 1 ↔ o = 0 := Ordinal.lt_one_iff_zero
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
lt_one_iff_zero
null
@[elab_as_elim, cases_eliminator, induction_eliminator] protected rec {β : NatOrdinal → Sort*} (h : ∀ a, β (toNatOrdinal a)) : ∀ a, β a := fun a => h (toOrdinal a)
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
rec
A recursor for `NatOrdinal`. Use as `induction x`.
induction {p : NatOrdinal → Prop} : ∀ (i) (_ : ∀ j, (∀ k, k < j → p k) → p j), p i := Ordinal.induction
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
induction
`Ordinal.induction` but for `NatOrdinal`.
small_Iio (a : NatOrdinal.{u}) : Small.{u} (Set.Iio a) := Ordinal.small_Iio a
instance
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
small_Iio
null
small_Iic (a : NatOrdinal.{u}) : Small.{u} (Set.Iic a) := Ordinal.small_Iic a
instance
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
small_Iic
null
small_Ico (a b : NatOrdinal.{u}) : Small.{u} (Set.Ico a b) := Ordinal.small_Ico a b
instance
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
small_Ico
null
small_Icc (a b : NatOrdinal.{u}) : Small.{u} (Set.Icc a b) := Ordinal.small_Icc a b
instance
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
small_Icc
null
small_Ioo (a b : NatOrdinal.{u}) : Small.{u} (Set.Ioo a b) := Ordinal.small_Ioo a b
instance
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
small_Ioo
null
small_Ioc (a b : NatOrdinal.{u}) : Small.{u} (Set.Ioc a b) := Ordinal.small_Ioc a b
instance
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
small_Ioc
null
@[simp] toNatOrdinal_symm_eq : toNatOrdinal.symm = NatOrdinal.toOrdinal := rfl @[simp] theorem toNatOrdinal_toOrdinal (a : Ordinal) : a.toNatOrdinal.toOrdinal = a := rfl @[simp] theorem toNatOrdinal_zero : toNatOrdinal 0 = 0 := rfl @[simp] theorem toNatOrdinal_one : toNatOrdinal 1 = 1 := rfl @[simp] theorem toNatOrdinal_eq_zero (a) : toNatOrdinal a = 0 ↔ a = 0 := Iff.rfl @[simp] theorem toNatOrdinal_eq_one (a) : toNatOrdinal a = 1 ↔ a = 1 := Iff.rfl @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
toNatOrdinal_symm_eq
null
toNatOrdinal_max (a b : Ordinal) : toNatOrdinal (max a b) = max (toNatOrdinal a) (toNatOrdinal b) := rfl @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
toNatOrdinal_max
null
toNatOrdinal_min (a b : Ordinal) : toNatOrdinal (min a b) = min (toNatOrdinal a) (toNatOrdinal b) := rfl /-! We place the definitions of `nadd` and `nmul` before actually developing their API, as this guarantees we only need to open the `NaturalOps` scope once. -/
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
toNatOrdinal_min
null
noncomputable nadd (a b : Ordinal.{u}) : Ordinal.{u} := max (⨆ x : Iio a, succ (nadd x.1 b)) (⨆ x : Iio b, succ (nadd a x.1)) termination_by (a, b) decreasing_by all_goals cases x; decreasing_tactic @[inherit_doc] scoped[NaturalOps] infixl:65 " ♯ " => Ordinal.nadd open NaturalOps
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
nadd
Natural addition on ordinals `a ♯ b`, also known as the Hessenberg sum, is recursively defined as the least ordinal greater than `a' ♯ b` and `a ♯ b'` for all `a' < a` and `b' < b`. In contrast to normal ordinal addition, it is commutative. Natural addition can equivalently be characterized as the ordinal resulting from adding up corresponding coefficients in the Cantor normal forms of `a` and `b`.
noncomputable nmul (a b : Ordinal.{u}) : Ordinal.{u} := sInf {c | ∀ a' < a, ∀ b' < b, nmul a' b ♯ nmul a b' < c ♯ nmul a' b'} termination_by (a, b) @[inherit_doc] scoped[NaturalOps] infixl:70 " ⨳ " => Ordinal.nmul /-! ### Natural addition -/
def
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
nmul
Natural multiplication on ordinals `a ⨳ b`, also known as the Hessenberg product, is recursively defined as the least ordinal such that `a ⨳ b ♯ a' ⨳ b'` is greater than `a' ⨳ b ♯ a ⨳ b'` for all `a' < a` and `b < b'`. In contrast to normal ordinal multiplication, it is commutative and distributive (over natural addition). Natural multiplication can equivalently be characterized as the ordinal resulting from multiplying the Cantor normal forms of `a` and `b` as if they were polynomials in `ω`. Addition of exponents is done via natural addition.
lt_nadd_iff : a < b ♯ c ↔ (∃ b' < b, a ≤ b' ♯ c) ∨ ∃ c' < c, a ≤ b ♯ c' := by rw [nadd] simp [Ordinal.lt_iSup_iff]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
lt_nadd_iff
null
nadd_le_iff : b ♯ c ≤ a ↔ (∀ b' < b, b' ♯ c < a) ∧ ∀ c' < c, b ♯ c' < a := by rw [← not_lt, lt_nadd_iff] simp
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
nadd_le_iff
null
nadd_lt_nadd_left (h : b < c) (a) : a ♯ b < a ♯ c := lt_nadd_iff.2 (Or.inr ⟨b, h, le_rfl⟩)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
nadd_lt_nadd_left
null
nadd_lt_nadd_right (h : b < c) (a) : b ♯ a < c ♯ a := lt_nadd_iff.2 (Or.inl ⟨b, h, le_rfl⟩)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
nadd_lt_nadd_right
null
nadd_le_nadd_left (h : b ≤ c) (a) : a ♯ b ≤ a ♯ c := by rcases lt_or_eq_of_le h with (h | rfl) · exact (nadd_lt_nadd_left h a).le · exact le_rfl
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
nadd_le_nadd_left
null
nadd_le_nadd_right (h : b ≤ c) (a) : b ♯ a ≤ c ♯ a := by rcases lt_or_eq_of_le h with (h | rfl) · exact (nadd_lt_nadd_right h a).le · exact le_rfl variable (a b)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
nadd_le_nadd_right
null
nadd_comm (a b) : a ♯ b = b ♯ a := by rw [nadd, nadd, max_comm] congr <;> ext x <;> cases x <;> apply congr_arg _ (nadd_comm _ _) termination_by (a, b) @[deprecated "blsub will soon be deprecated" (since := "2024-11-18")]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
nadd_comm
null
blsub_nadd_of_mono {f : ∀ c < a ♯ b, Ordinal.{max u v}} (hf : ∀ {i j} (hi hj), i ≤ j → f i hi ≤ f j hj) : blsub.{u, v} _ f = max (blsub.{u, v} a fun a' ha' => f (a' ♯ b) <| nadd_lt_nadd_right ha' b) (blsub.{u, v} b fun b' hb' => f (a ♯ b') <| nadd_lt_nadd_left hb' a) := by apply (blsub_le_iff.2 fun i h => _).antisymm (max_le _ _) · intro i h rcases lt_nadd_iff.1 h with (⟨a', ha', hi⟩ | ⟨b', hb', hi⟩) · exact lt_max_of_lt_left ((hf h (nadd_lt_nadd_right ha' b) hi).trans_lt (lt_blsub _ _ ha')) · exact lt_max_of_lt_right ((hf h (nadd_lt_nadd_left hb' a) hi).trans_lt (lt_blsub _ _ hb')) all_goals apply blsub_le_of_brange_subset.{u, u, v} rintro c ⟨d, hd, rfl⟩ apply mem_brange_self
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
blsub_nadd_of_mono
null
private iSup_nadd_of_monotone {a b} (f : Ordinal.{u} → Ordinal.{u}) (h : Monotone f) : ⨆ x : Iio (a ♯ b), f x = max (⨆ a' : Iio a, f (a'.1 ♯ b)) (⨆ b' : Iio b, f (a ♯ b'.1)) := by apply (max_le _ _).antisymm' · rw [Ordinal.iSup_le_iff] rintro ⟨i, hi⟩ obtain ⟨x, hx, hi⟩ | ⟨x, hx, hi⟩ := lt_nadd_iff.1 hi · exact le_max_of_le_left ((h hi).trans <| Ordinal.le_iSup (fun x : Iio a ↦ _) ⟨x, hx⟩) · exact le_max_of_le_right ((h hi).trans <| Ordinal.le_iSup (fun x : Iio b ↦ _) ⟨x, hx⟩) all_goals apply csSup_le_csSup' (bddAbove_of_small _) rintro _ ⟨⟨c, hc⟩, rfl⟩ refine mem_range_self (⟨_, ?_⟩ : Iio _) apply_rules [nadd_lt_nadd_left, nadd_lt_nadd_right]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
iSup_nadd_of_monotone
null
nadd_assoc (a b c) : a ♯ b ♯ c = a ♯ (b ♯ c) := by unfold nadd rw [iSup_nadd_of_monotone fun a' ↦ succ (a' ♯ c), iSup_nadd_of_monotone fun b' ↦ succ (a ♯ b'), max_assoc] · congr <;> ext x <;> cases x <;> apply congr_arg _ (nadd_assoc _ _ _) · exact succ_mono.comp fun x y h ↦ nadd_le_nadd_left h _ · exact succ_mono.comp fun x y h ↦ nadd_le_nadd_right h _ termination_by (a, b, c) @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
nadd_assoc
null
nadd_zero (a : Ordinal) : a ♯ 0 = a := by rw [nadd, ciSup_of_empty fun _ : Iio 0 ↦ _, sup_bot_eq] convert iSup_succ a rename_i x cases x exact nadd_zero _ termination_by a @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
nadd_zero
null
zero_nadd : 0 ♯ a = a := by rw [nadd_comm, nadd_zero] @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
zero_nadd
null
nadd_one (a : Ordinal) : a ♯ 1 = succ a := by rw [nadd, ciSup_unique (s := fun _ : Iio 1 ↦ _), Iio_one_default_eq, nadd_zero, max_eq_right_iff, Ordinal.iSup_le_iff] rintro ⟨i, hi⟩ rwa [nadd_one, succ_le_succ_iff, succ_le_iff] termination_by a @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
nadd_one
null
one_nadd : 1 ♯ a = succ a := by rw [nadd_comm, nadd_one]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
one_nadd
null
nadd_succ : a ♯ succ b = succ (a ♯ b) := by rw [← nadd_one (a ♯ b), nadd_assoc, nadd_one]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
nadd_succ
null
succ_nadd : succ a ♯ b = succ (a ♯ b) := by rw [← one_nadd (a ♯ b), ← nadd_assoc, one_nadd] @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
succ_nadd
null
nadd_nat (n : ℕ) : a ♯ n = a + n := by induction n with | zero => simp | succ n hn => rw [Nat.cast_succ, add_one_eq_succ, nadd_succ, add_succ, hn] @[simp]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
nadd_nat
null
nat_nadd (n : ℕ) : ↑n ♯ a = a + n := by rw [nadd_comm, nadd_nat]
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
nat_nadd
null
add_le_nadd : a + b ≤ a ♯ b := by induction b using limitRecOn with | zero => simp | succ c h => rwa [add_succ, nadd_succ, succ_le_succ_iff] | limit c hc H => rw [(isNormal_add_right a).apply_of_isSuccLimit hc, Ordinal.iSup_le_iff] rintro ⟨i, hi⟩ exact (H i hi).trans (nadd_le_nadd_left hi.le a)
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
add_le_nadd
null
lt_add_iff {a b c : NatOrdinal} : a < b + c ↔ (∃ b' < b, a ≤ b' + c) ∨ ∃ c' < c, a ≤ b + c' := Ordinal.lt_nadd_iff
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
lt_add_iff
null
add_le_iff {a b c : NatOrdinal} : b + c ≤ a ↔ (∀ b' < b, b' + c < a) ∧ ∀ c' < c, b + c' < a := Ordinal.nadd_le_iff
theorem
SetTheory
[ "Mathlib.SetTheory.Ordinal.Family", "Mathlib.Tactic.Abel", "Mathlib.Tactic.Linter.DeprecatedModule" ]
Mathlib/SetTheory/Ordinal/NaturalOps.lean
add_le_iff
null