statement stringlengths 1 2.88k | proof stringlengths 0 13.9k | type stringclasses 10
values | symbolic_name stringlengths 1 131 | library stringclasses 417
values | filename stringlengths 17 80 | imports listlengths 0 16 | deps listlengths 0 64 | docstring stringlengths 0 10.2k | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|
oadd_lt_oadd_2 {e o₁ o₂ : onote} {n₁ n₂ : ℕ+}
(h₁ : NF (oadd e n₁ o₁)) (h : (n₁:ℕ) < n₂) : oadd e n₁ o₁ < oadd e n₂ o₂ | begin
simp [lt_def],
refine lt_of_lt_of_le ((add_lt_add_iff_left _).2 h₁.snd'.repr_lt)
(le_trans _ (le_add_right _ _)),
rwa [← mul_succ, mul_le_mul_iff_left (opow_pos _ omega_pos), succ_le_iff, nat_cast_lt]
end | theorem | onote.oadd_lt_oadd_2 | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"mul_le_mul_iff_left",
"onote"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
oadd_lt_oadd_3 {e n a₁ a₂} (h : a₁ < a₂) :
oadd e n a₁ < oadd e n a₂ | begin
rw lt_def, unfold repr,
exact add_lt_add_left h _
end | theorem | onote.oadd_lt_oadd_3 | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
cmp_compares : ∀ (a b : onote) [NF a] [NF b], (cmp a b).compares a b | | 0 0 h₁ h₂ := rfl
| (oadd e n a) 0 h₁ h₂ := oadd_pos _ _ _
| 0 (oadd e n a) h₁ h₂ := oadd_pos _ _ _
| o₁@(oadd e₁ n₁ a₁) o₂@(oadd e₂ n₂ a₂) h₁ h₂ := begin
rw cmp,
have IHe := @cmp_compares _ _ h₁.fst h₂.fst,
cases cmp e₁ e₂,
case ordering.lt { exact oadd_lt_oadd_1 h₁ IHe },
case ordering.gt { exact... | theorem | onote.cmp_compares | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"cmp_compares",
"onote"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
repr_inj {a b} [NF a] [NF b] : repr a = repr b ↔ a = b | ⟨match cmp a b, cmp_compares a b with
| ordering.lt, (h : repr a < repr b), e := (ne_of_lt h e).elim
| ordering.gt, (h : repr a > repr b), e := (ne_of_gt h e).elim
| ordering.eq, h, e := h
end, congr_arg _⟩ | theorem | onote.repr_inj | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"cmp_compares"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
NF.of_dvd_omega_opow {b e n a} (h : NF (oadd e n a)) (d : ω ^ b ∣ repr (oadd e n a)) :
b ≤ repr e ∧ ω ^ b ∣ repr a | begin
have := mt repr_inj.1 (λ h, by injection h : oadd e n a ≠ 0),
have L := le_of_not_lt (λ l, not_le_of_lt (h.below_of_lt l).repr_lt (le_of_dvd this d)),
simp at d,
exact ⟨L, (dvd_add_iff $ (opow_dvd_opow _ L).mul_right _).1 d⟩
end | theorem | onote.NF.of_dvd_omega_opow | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"not_le_of_lt"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
NF.of_dvd_omega {e n a} (h : NF (oadd e n a)) :
ω ∣ repr (oadd e n a) → repr e ≠ 0 ∧ ω ∣ repr a | by rw [← opow_one ω, ← one_le_iff_ne_zero]; exact h.of_dvd_omega_opow | theorem | onote.NF.of_dvd_omega | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
top_below (b) : onote → Prop | | 0 := true
| (oadd e n a) := cmp e b = ordering.lt | def | onote.top_below | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | `top_below b o` asserts that the largest exponent in `o`, if
it exists, is less than `b`. This is an auxiliary definition
for decidability of `NF`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
decidable_top_below : decidable_rel top_below | by intros b o; cases o; delta top_below; apply_instance | instance | onote.decidable_top_below | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
NF_below_iff_top_below {b} [NF b] : ∀ {o},
NF_below o (repr b) ↔ NF o ∧ top_below b o | | 0 := ⟨λ h, ⟨⟨⟨_, h⟩⟩, trivial⟩, λ _, NF_below.zero⟩
| (oadd e n a) :=
⟨λ h, ⟨⟨⟨_, h⟩⟩, (@cmp_compares _ b h.fst _).eq_lt.2 h.lt⟩,
λ ⟨h₁, h₂⟩, h₁.below_of_lt $ (@cmp_compares _ b h₁.fst _).eq_lt.1 h₂⟩ | theorem | onote.NF_below_iff_top_below | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"cmp_compares"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
decidable_NF : decidable_pred NF | | 0 := is_true NF.zero
| (oadd e n a) := begin
have := decidable_NF e,
have := decidable_NF a, resetI,
apply decidable_of_iff (NF e ∧ NF a ∧ top_below e a),
abstract
{ rw ← and_congr_right (λ h, @NF_below_iff_top_below _ h _),
exact ⟨λ ⟨h₁, h₂⟩, NF.oadd h₁ n h₂, λ h, ⟨h.fst, h.snd'⟩⟩ },
end | instance | onote.decidable_NF | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"decidable_of_iff"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
add : onote → onote → onote | | 0 o := o
| (oadd e n a) o := match add a o with
| 0 := oadd e n 0
| o'@(oadd e' n' a') := match cmp e e' with
| ordering.lt := o'
| ordering.eq := oadd e (n + n') a'
| ordering.gt := oadd e n o'
end
end | def | onote.add | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | Addition of ordinal notations (correct only for normal input) | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
zero_add (o : onote) : 0 + o = o | rfl | theorem | onote.zero_add | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
oadd_add (e n a o) : oadd e n a + o = add._match_1 e n (a + o) | rfl | theorem | onote.oadd_add | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
sub : onote → onote → onote | | 0 o := 0
| o 0 := o
| o₁@(oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂) := match cmp e₁ e₂ with
| ordering.lt := 0
| ordering.gt := o₁
| ordering.eq := match (n₁:ℕ) - n₂ with
| 0 := if n₁ = n₂ then sub a₁ a₂ else 0
| (nat.succ k) := oadd e₁ k.succ_pnat a₁
end
end | def | onote.sub | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | Subtraction of ordinal notations (correct only for normal input) | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
add_NF_below {b} : ∀ {o₁ o₂}, NF_below o₁ b → NF_below o₂ b → NF_below (o₁ + o₂) b | | 0 o h₁ h₂ := h₂
| (oadd e n a) o h₁ h₂ := begin
have h' := add_NF_below (h₁.snd.mono $ le_of_lt h₁.lt) h₂,
simp [oadd_add], cases a + o with e' n' a',
{ exact NF_below.oadd h₁.fst NF_below.zero h₁.lt },
simp [add], have := @cmp_compares _ _ h₁.fst h'.fst,
cases cmp e e'; simp [add],
{ exact h' ... | theorem | onote.add_NF_below | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"cmp_compares"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
add_NF (o₁ o₂) : ∀ [NF o₁] [NF o₂], NF (o₁ + o₂) | | ⟨⟨b₁, h₁⟩⟩ ⟨⟨b₂, h₂⟩⟩ := ⟨(le_total b₁ b₂).elim
(λ h, ⟨b₂, add_NF_below (h₁.mono h) h₂⟩)
(λ h, ⟨b₁, add_NF_below h₁ (h₂.mono h)⟩)⟩ | instance | onote.add_NF | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
repr_add : ∀ o₁ o₂ [NF o₁] [NF o₂], repr (o₁ + o₂) = repr o₁ + repr o₂ | | 0 o h₁ h₂ := by simp
| (oadd e n a) o h₁ h₂ := begin
haveI := h₁.snd, have h' := repr_add a o,
conv at h' in (_+o) {simp [(+)]},
have nf := onote.add_NF a o,
conv at nf in (_+o) {simp [(+)]},
conv in (_+o) {simp [(+), add]},
cases add a o with e' n' a'; simp [add, h'.symm, add_assoc],
have :=... | theorem | onote.repr_add | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"cmp_compares",
"mul_le_mul_iff_left",
"nat.cast_add",
"onote.add_NF"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
sub_NF_below : ∀ {o₁ o₂ b}, NF_below o₁ b → NF o₂ → NF_below (o₁ - o₂) b | | 0 o b h₁ h₂ := by cases o; exact NF_below.zero
| (oadd e n a) 0 b h₁ h₂ := h₁
| (oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂) b h₁ h₂ := begin
have h' := sub_NF_below h₁.snd h₂.snd,
simp [has_sub.sub, sub] at h' ⊢,
have := @cmp_compares _ _ h₁.fst h₂.fst,
cases cmp e₁ e₂; simp [sub],
{ apply NF_below.zero },
... | theorem | onote.sub_NF_below | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"cmp_compares"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
sub_NF (o₁ o₂) : ∀ [NF o₁] [NF o₂], NF (o₁ - o₂) | | ⟨⟨b₁, h₁⟩⟩ h₂ := ⟨⟨b₁, sub_NF_below h₁ h₂⟩⟩ | instance | onote.sub_NF | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
repr_sub : ∀ o₁ o₂ [NF o₁] [NF o₂], repr (o₁ - o₂) = repr o₁ - repr o₂ | | 0 o h₁ h₂ := by cases o; exact (ordinal.zero_sub _).symm
| (oadd e n a) 0 h₁ h₂ := (ordinal.sub_zero _).symm
| (oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂) h₁ h₂ := begin
haveI := h₁.snd, haveI := h₂.snd, have h' := repr_sub a₁ a₂,
conv at h' in (a₁-a₂) {simp [has_sub.sub]},
have nf := onote.sub_NF a₁ a₂,
conv ... | theorem | onote.repr_sub | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"cmp_compares",
"mul_le_mul_left'",
"nat.cast_add",
"nat.cast_succ",
"nat.succ_pnat",
"onote.sub_NF",
"ordinal.sub_eq_of_add_eq",
"ordinal.sub_zero",
"ordinal.zero_sub",
"pnat.eq",
"tsub_eq_iff_eq_add_of_le"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul : onote → onote → onote | | 0 _ := 0
| _ 0 := 0
| o₁@(oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂) :=
if e₂ = 0 then oadd e₁ (n₁ * n₂) a₁ else
oadd (e₁ + e₂) n₂ (mul o₁ a₂) | def | onote.mul | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | Multiplication of ordinal notations (correct only for normal input) | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
oadd_mul (e₁ n₁ a₁ e₂ n₂ a₂) : oadd e₁ n₁ a₁ * oadd e₂ n₂ a₂ =
if e₂ = 0 then oadd e₁ (n₁ * n₂) a₁ else
oadd (e₁ + e₂) n₂ (oadd e₁ n₁ a₁ * a₂) | rfl | theorem | onote.oadd_mul | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
oadd_mul_NF_below {e₁ n₁ a₁ b₁} (h₁ : NF_below (oadd e₁ n₁ a₁) b₁) :
∀ {o₂ b₂}, NF_below o₂ b₂ → NF_below (oadd e₁ n₁ a₁ * o₂) (repr e₁ + b₂) | | 0 b₂ h₂ := NF_below.zero
| (oadd e₂ n₂ a₂) b₂ h₂ := begin
have IH := oadd_mul_NF_below h₂.snd,
by_cases e0 : e₂ = 0; simp [e0, oadd_mul],
{ apply NF_below.oadd h₁.fst h₁.snd,
simpa using (add_lt_add_iff_left (repr e₁)).2
(lt_of_le_of_lt (ordinal.zero_le _) h₂.lt) },
{ haveI := h₁.fst, haveI := h₂.fs... | theorem | onote.oadd_mul_NF_below | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"ordinal.zero_le"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_NF : ∀ o₁ o₂ [NF o₁] [NF o₂], NF (o₁ * o₂) | | 0 o h₁ h₂ := by cases o; exact NF.zero
| (oadd e n a) o ⟨⟨b₁, hb₁⟩⟩ ⟨⟨b₂, hb₂⟩⟩ :=
⟨⟨_, oadd_mul_NF_below hb₁ hb₂⟩⟩ | instance | onote.mul_NF | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
repr_mul : ∀ o₁ o₂ [NF o₁] [NF o₂], repr (o₁ * o₂) = repr o₁ * repr o₂ | | 0 o h₁ h₂ := by cases o; exact (zero_mul _).symm
| (oadd e₁ n₁ a₁) 0 h₁ h₂ := (mul_zero _).symm
| (oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂) h₁ h₂ := begin
have IH : repr (mul _ _) = _ := @repr_mul _ _ h₁ h₂.snd,
conv {to_lhs, simp [(*)]},
have ao : repr a₁ + ω ^ repr e₁ * (n₁:ℕ) ... | theorem | onote.repr_mul | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"mul_assoc",
"mul_le_mul_iff_left",
"mul_zero",
"nat.cast_succ",
"zero_mul"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
split' : onote → onote × ℕ | | 0 := (0, 0)
| (oadd e n a) := if e = 0 then (0, n) else
let (a', m) := split' a in (oadd (e - 1) n a', m) | def | onote.split' | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | Calculate division and remainder of `o` mod ω.
`split' o = (a, n)` means `o = ω * a + n`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
split : onote → onote × ℕ | | 0 := (0, 0)
| (oadd e n a) := if e = 0 then (0, n) else
let (a', m) := split a in (oadd e n a', m) | def | onote.split | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | Calculate division and remainder of `o` mod ω.
`split o = (a, n)` means `o = a + n`, where `ω ∣ a`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
scale (x : onote) : onote → onote | | 0 := 0
| (oadd e n a) := oadd (x + e) n (scale a) | def | onote.scale | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | `scale x o` is the ordinal notation for `ω ^ x * o`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
mul_nat : onote → ℕ → onote | | 0 m := 0
| _ 0 := 0
| (oadd e n a) (m+1) := oadd e (n * m.succ_pnat) a | def | onote.mul_nat | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | `mul_nat o n` is the ordinal notation for `o * n`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
opow_aux (e a0 a : onote) : ℕ → ℕ → onote | | _ 0 := 0
| 0 (m+1) := oadd e m.succ_pnat 0
| (k+1) m := scale (e + mul_nat a0 k) a + opow_aux k m | def | onote.opow_aux | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | Auxiliary definition to compute the ordinal notation for the ordinal
exponentiation in `opow` | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
opow (o₁ o₂ : onote) : onote | match split o₁ with
| (0, 0) := if o₂ = 0 then 1 else 0
| (0, 1) := 1
| (0, m+1) := let (b', k) := split' o₂ in
oadd b' (@has_pow.pow ℕ+ _ _ m.succ_pnat k) 0
| (a@(oadd a0 _ _), m) := match split o₂ with
| (b, 0) := oadd (a0 * b) 1 0
| (b, k+1) := let eb := a0*b in
scale (eb + mul_nat a0 k) a + opow_aux eb a0... | def | onote.opow | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | `opow o₁ o₂` calculates the ordinal notation for
the ordinal exponential `o₁ ^ o₂`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
opow_def (o₁ o₂ : onote) : o₁ ^ o₂ = opow._match_1 o₂ (split o₁) | rfl | theorem | onote.opow_def | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
split_eq_scale_split' : ∀ {o o' m} [NF o], split' o = (o', m) → split o = (scale 1 o', m) | | 0 o' m h p := by injection p; substs o' m; refl
| (oadd e n a) o' m h p := begin
by_cases e0 : e = 0; simp [e0, split, split'] at p ⊢,
{ rcases p with ⟨rfl, rfl⟩, exact ⟨rfl, rfl⟩ },
{ revert p, cases h' : split' a with a' m',
haveI := h.fst, haveI := h.snd,
simp [split_eq_scale_split' h', sp... | theorem | onote.split_eq_scale_split' | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"ordinal.add_sub_cancel_of_le"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
NF_repr_split' : ∀ {o o' m} [NF o], split' o = (o', m) → NF o' ∧ repr o = ω * repr o' + m | | 0 o' m h p := by injection p; substs o' m; simp [NF.zero]
| (oadd e n a) o' m h p := begin
by_cases e0 : e = 0; simp [e0, split, split'] at p ⊢,
{ rcases p with ⟨rfl, rfl⟩,
simp [h.zero_of_zero e0, NF.zero] },
{ revert p, cases h' : split' a with a' m',
haveI := h.fst, haveI := h.snd,
cas... | theorem | onote.NF_repr_split' | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"mul_assoc",
"mul_lt_mul_iff_left",
"ordinal.add_sub_cancel_of_le"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
scale_eq_mul (x) [NF x] : ∀ o [NF o], scale x o = oadd x 1 0 * o | | 0 h := rfl
| (oadd e n a) h := begin
simp [(*)], simp [mul, scale],
haveI := h.snd,
by_cases e0 : e = 0,
{ rw scale_eq_mul, simp [e0, h.zero_of_zero, show x + 0 = x, from repr_inj.1 (by simp)] },
{ simp [e0, scale_eq_mul, (*)] }
end | theorem | onote.scale_eq_mul | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
NF_scale (x) [NF x] (o) [NF o] : NF (scale x o) | by rw scale_eq_mul; apply_instance | instance | onote.NF_scale | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
repr_scale (x) [NF x] (o) [NF o] : repr (scale x o) = ω ^ repr x * repr o | by simp [scale_eq_mul] | theorem | onote.repr_scale | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
NF_repr_split {o o' m} [NF o] (h : split o = (o', m)) : NF o' ∧ repr o = repr o' + m | begin
cases e : split' o with a n,
cases NF_repr_split' e with s₁ s₂, resetI,
rw split_eq_scale_split' e at h,
injection h, substs o' n,
simp [repr_scale, s₂.symm],
apply_instance
end | theorem | onote.NF_repr_split | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
split_dvd {o o' m} [NF o] (h : split o = (o', m)) : ω ∣ repr o' | begin
cases e : split' o with a n,
rw split_eq_scale_split' e at h,
injection h, subst o',
cases NF_repr_split' e, resetI, simp
end | theorem | onote.split_dvd | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
split_add_lt {o e n a m} [NF o] (h : split o = (oadd e n a, m)) : repr a + m < ω ^ repr e | begin
cases NF_repr_split h with h₁ h₂,
cases h₁.of_dvd_omega (split_dvd h) with e0 d,
have := h₁.fst, have := h₁.snd,
apply principal_add_omega_opow _ h₁.snd'.repr_lt (lt_of_lt_of_le (nat_lt_omega _) _),
simpa using opow_le_opow_right omega_pos (one_le_iff_ne_zero.2 e0),
end | theorem | onote.split_add_lt | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_nat_eq_mul (n o) : mul_nat o n = o * of_nat n | by cases o; cases n; refl | theorem | onote.mul_nat_eq_mul | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
NF_mul_nat (o) [NF o] (n) : NF (mul_nat o n) | by simp; apply_instance | instance | onote.NF_mul_nat | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
NF_opow_aux (e a0 a) [NF e] [NF a0] [NF a] : ∀ k m, NF (opow_aux e a0 a k m) | | k 0 := by cases k; exact NF.zero
| 0 (m+1) := NF.oadd_zero _ _
| (k+1) (m+1) := by haveI := NF_opow_aux k;
simp [opow_aux, nat.succ_ne_zero]; apply_instance | instance | onote.NF_opow_aux | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
NF_opow (o₁ o₂) [NF o₁] [NF o₂] : NF (o₁ ^ o₂) | begin
cases e₁ : split o₁ with a m,
have na := (NF_repr_split e₁).1,
cases e₂ : split' o₂ with b' k,
haveI := (NF_repr_split' e₂).1,
casesI a with a0 n a',
{ cases m with m,
{ by_cases o₂ = 0; simp [pow, opow, *]; apply_instance },
{ by_cases m = 0,
{ simp only [pow, opow, *, zero_def], apply_... | instance | onote.NF_opow | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"npow_eq_pow"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
scale_opow_aux (e a0 a : onote) [NF e] [NF a0] [NF a] :
∀ k m, repr (opow_aux e a0 a k m) = ω ^ repr e * repr (opow_aux 0 a0 a k m) | | 0 m := by cases m; simp [opow_aux]
| (k+1) m := by by_cases m = 0; simp [h, opow_aux, mul_add, opow_add, mul_assoc, scale_opow_aux] | theorem | onote.scale_opow_aux | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"mul_assoc",
"onote"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
repr_opow_aux₁ {e a} [Ne : NF e] [Na : NF a] {a' : ordinal} (e0 : repr e ≠ 0)
(h : a' < (ω : ordinal.{0}) ^ repr e) (aa : repr a = a') (n : ℕ+) :
((ω : ordinal.{0}) ^ repr e * (n:ℕ) + a') ^ (ω : ordinal.{0}) =
(ω ^ repr e) ^ (ω : ordinal.{0}) | begin
subst aa,
have No := Ne.oadd n (Na.below_of_lt' h),
have := omega_le_oadd e n a, unfold repr at this,
refine le_antisymm _ (opow_le_opow_left _ this),
apply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_is_limit).2,
intros b l,
have := (No.below_of_lt (lt_succ _)).repr_lt, unfol... | theorem | onote.repr_opow_aux₁ | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"mul_le_mul_left'",
"mul_le_mul_right'",
"mul_lt_mul_iff_left",
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
repr_opow_aux₂ {a0 a'} [N0 : NF a0] [Na' : NF a'] (m : ℕ)
(d : ω ∣ repr a')
(e0 : repr a0 ≠ 0) (h : repr a' + m < ω ^ repr a0) (n : ℕ+) (k : ℕ) :
let R | repr (opow_aux 0 a0 (oadd a0 n a' * of_nat m) k m) in
(k ≠ 0 → R < (ω ^ repr a0) ^ succ k) ∧
(ω ^ repr a0) ^ k * (ω ^ repr a0 * (n:ℕ) + repr a') + R =
(ω ^ repr a0 * (n:ℕ) + repr a' + m) ^ succ k :=
begin
intro,
haveI No : NF (oadd a0 n a') :=
N0.oadd n (Na'.below_of_lt' $ lt_of_le_of_lt (le_add_right _... | theorem | onote.repr_opow_aux₂ | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"dvd_add",
"dvd_mul_of_dvd_left",
"mul_assoc",
"mul_le_mul_left'",
"mul_lt_mul_iff_left",
"ordinal.opow_add"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂ | begin
cases e₁ : split o₁ with a m,
cases NF_repr_split e₁ with N₁ r₁,
cases a with a0 n a',
{ cases m with m,
{ by_cases o₂ = 0; simp [opow_def, opow, e₁, h, r₁],
have := mt repr_inj.1 h, rw zero_opow this },
{ cases e₂ : split' o₂ with b' k,
cases NF_repr_split' e₂ with _ r₂,
by_case... | theorem | onote.repr_opow | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"mul_assoc",
"nat.cast_succ"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
fundamental_sequence : onote → option onote ⊕ (ℕ → onote) | | zero := sum.inl none
| (oadd a m b) :=
match fundamental_sequence b with
| sum.inr f := sum.inr (λ i, oadd a m (f i))
| sum.inl (some b') := sum.inl (some (oadd a m b'))
| sum.inl none := match fundamental_sequence a, m.nat_pred with
| sum.inl none, 0 := sum.inl (some zero)
| sum.inl none, m+1 := sum.... | def | onote.fundamental_sequence | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | Given an ordinal, returns `inl none` for `0`, `inl (some a)` for `a+1`, and
`inr f` for a limit ordinal `a`, where `f i` is a sequence converging to `a`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
exists_lt_add {α} [hα : nonempty α] {o : ordinal} {f : α → ordinal}
(H : ∀ ⦃a⦄, a < o → ∃ i, a < f i) {b : ordinal} ⦃a⦄ (h : a < b + o) : ∃ i, a < b + f i | begin
cases lt_or_le a b with h h',
{ obtain ⟨i⟩ := id hα, exact ⟨i, h.trans_le (le_add_right _ _)⟩ },
{ rw [← ordinal.add_sub_cancel_of_le h', add_lt_add_iff_left] at h,
refine (H h).imp (λ i H, _),
rwa [← ordinal.add_sub_cancel_of_le h', add_lt_add_iff_left] }
end | theorem | onote.exists_lt_add | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"ordinal",
"ordinal.add_sub_cancel_of_le"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
exists_lt_mul_omega' {o : ordinal} ⦃a⦄ (h : a < o * ω) : ∃ i : ℕ, a < o * ↑i + o | begin
obtain ⟨i, hi, h'⟩ := (lt_mul_of_limit omega_is_limit).1 h,
obtain ⟨i, rfl⟩ := lt_omega.1 hi,
exact ⟨i, h'.trans_le (le_add_right _ _)⟩
end | theorem | onote.exists_lt_mul_omega' | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
exists_lt_omega_opow' {α} {o b : ordinal}
(hb : 1 < b) (ho : o.is_limit) {f : α → ordinal}
(H : ∀ ⦃a⦄, a < o → ∃ i, a < f i) ⦃a⦄ (h : a < b ^ o) : ∃ i, a < b ^ f i | begin
obtain ⟨d, hd, h'⟩ := (lt_opow_of_limit (zero_lt_one.trans hb).ne' ho).1 h,
exact (H hd).imp (λ i hi, h'.trans $ (opow_lt_opow_iff_right hb).2 hi)
end | theorem | onote.exists_lt_omega_opow' | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
fundamental_sequence_prop (o : onote) : option onote ⊕ (ℕ → onote) → Prop | | (sum.inl none) := o = 0
| (sum.inl (some a)) := o.repr = succ a.repr ∧ (o.NF → a.NF)
| (sum.inr f) := o.repr.is_limit ∧
(∀ i, f i < f (i + 1) ∧ f i < o ∧ (o.NF → (f i).NF)) ∧
(∀ a, a < o.repr → ∃ i, a < (f i).repr) | def | onote.fundamental_sequence_prop | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | The property satisfied by `fundamental_sequence o`:
* `inl none` means `o = 0`
* `inl (some a)` means `o = succ a`
* `inr f` means `o` is a limit ordinal and `f` is a
strictly increasing sequence which converges to `o` | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
fundamental_sequence_has_prop (o) : fundamental_sequence_prop o (fundamental_sequence o) | begin
induction o with a m b iha ihb, {exact rfl},
rw [fundamental_sequence],
rcases e : b.fundamental_sequence with ⟨_|b'⟩|f;
simp only [fundamental_sequence, fundamental_sequence_prop];
rw [e, fundamental_sequence_prop] at ihb,
{ rcases e : a.fundamental_sequence with ⟨_|a'⟩|f; cases e' : m.nat_pred w... | theorem | onote.fundamental_sequence_has_prop | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"coe_coe",
"mul_add_one",
"mul_one",
"nat.cast_one",
"nat.cast_succ",
"nat.cast_zero",
"nat.succ_pnat_coe",
"ordinal.mul_lt_mul_iff_left",
"pnat.coe_inj",
"pnat.nat_pred_add_one",
"pnat.one_coe"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
fast_growing : onote → ℕ → ℕ | | o :=
match fundamental_sequence o, fundamental_sequence_has_prop o with
| sum.inl none, _ := nat.succ
| sum.inl (some a), h :=
have a < o, { rw [lt_def, h.1], apply lt_succ },
λ i, (fast_growing a)^[i] i
| sum.inr f, h := λ i, have f i < o, from (h.2.1 i).2.1, fast_growing (f i) i
end
using_well_fou... | def | onote.fast_growing | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | The fast growing hierarchy for ordinal notations `< ε₀`. This is a sequence of
functions `ℕ → ℕ` indexed by ordinals, with the definition:
* `f_0(n) = n + 1`
* `f_(α+1)(n) = f_α^[n](n)`
* `f_α(n) = f_(α[n])(n)` where `α` is a limit ordinal
and `α[i]` is the fundamental sequence converging to `α` | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
fast_growing_def
{o : onote} {x} (e : fundamental_sequence o = x) :
fast_growing o =
fast_growing._match_1 o
(λ a _ _, a.fast_growing)
(λ f _ i _, (f i).fast_growing i)
x (e ▸ fundamental_sequence_has_prop _) | by { subst x, rw [fast_growing] } | theorem | onote.fast_growing_def | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
fast_growing_zero' (o : onote) (h : fundamental_sequence o = sum.inl none) :
fast_growing o = nat.succ | by { rw [fast_growing_def h], refl } | theorem | onote.fast_growing_zero' | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
fast_growing_succ (o) {a} (h : fundamental_sequence o = sum.inl (some a)) :
fast_growing o = λ i, ((fast_growing a)^[i] i) | by { rw [fast_growing_def h], refl } | theorem | onote.fast_growing_succ | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
fast_growing_limit (o) {f} (h : fundamental_sequence o = sum.inr f) :
fast_growing o = λ i, fast_growing (f i) i | by { rw [fast_growing_def h], refl } | theorem | onote.fast_growing_limit | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
fast_growing_zero : fast_growing 0 = nat.succ | fast_growing_zero' _ rfl | theorem | onote.fast_growing_zero | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
fast_growing_one : fast_growing 1 = (λ n, 2 * n) | begin
rw [@fast_growing_succ 1 0 rfl], funext i, rw [two_mul, fast_growing_zero],
suffices : ∀ a b, nat.succ^[a] b = b + a, from this _ _,
intros a b, induction a; simp [*, function.iterate_succ', nat.add_succ],
end | theorem | onote.fast_growing_one | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"function.iterate_succ'",
"two_mul"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
fast_growing_two : fast_growing 2 = (λ n, 2 ^ n * n) | begin
rw [@fast_growing_succ 2 1 rfl], funext i, rw [fast_growing_one],
suffices : ∀ a b, (λ (n : ℕ), 2 * n)^[a] b = 2 ^ a * b, from this _ _,
intros a b, induction a; simp [*, function.iterate_succ', pow_succ, mul_assoc],
end | theorem | onote.fast_growing_two | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"function.iterate_succ'",
"mul_assoc",
"pow_succ"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
fast_growing_ε₀ (i : ℕ) : ℕ | fast_growing ((λ a, a.oadd 1 0)^[i] 0) i | def | onote.fast_growing_ε₀ | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | We can extend the fast growing hierarchy one more step to `ε₀` itself,
using `ω^(ω^...^ω^0)` as the fundamental sequence converging to `ε₀` (which is not an `onote`).
Extending the fast growing hierarchy beyond this requires a definition of fundamental sequence
for larger ordinals. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
fast_growing_ε₀_zero : fast_growing_ε₀ 0 = 1 | by simp [fast_growing_ε₀] | theorem | onote.fast_growing_ε₀_zero | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
fast_growing_ε₀_one : fast_growing_ε₀ 1 = 2 | by simp [fast_growing_ε₀, show oadd 0 1 0 = 1, from rfl] | theorem | onote.fast_growing_ε₀_one | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
fast_growing_ε₀_two : fast_growing_ε₀ 2 = 2048 | by norm_num [fast_growing_ε₀,
show oadd 0 1 0 = 1, from rfl,
@fast_growing_limit (oadd 1 1 0) _ rfl,
show oadd 0 (2:nat).succ_pnat 0 = 3, from rfl,
@fast_growing_succ 3 2 rfl] | theorem | onote.fast_growing_ε₀_two | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
nonote | {o : onote // o.NF} | def | nonote | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote"
] | The type of normal ordinal notations. (It would have been
nicer to define this right in the inductive type, but `NF o`
requires `repr` which requires `onote`, so all these things
would have to be defined at once, which messes up the VM
representation.) | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
NF (o : nonote) : NF o.1 | o.2 | instance | nonote.NF | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"nonote"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mk (o : onote) [h : NF o] : nonote | ⟨o, h⟩ | def | nonote.mk | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"nonote",
"onote"
] | Construct a `nonote` from an ordinal notation
(and infer normality) | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
repr (o : nonote) : ordinal | o.1.repr | def | nonote.repr | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"nonote",
"ordinal"
] | The ordinal represented by an ordinal notation.
(This function is noncomputable because ordinal
arithmetic is noncomputable. In computational applications
`nonote` can be used exclusively without reference
to `ordinal`, but this function allows for correctness
results to be stated.) | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
lt_wf : @well_founded nonote (<) | inv_image.wf repr ordinal.lt_wf | theorem | nonote.lt_wf | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"nonote",
"ordinal.lt_wf"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
of_nat (n : ℕ) : nonote | ⟨of_nat n, ⟨⟨_, NF_below_of_nat _⟩⟩⟩ | def | nonote.of_nat | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"nonote"
] | Convert a natural number to an ordinal notation | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
cmp (a b : nonote) : ordering | cmp a.1 b.1 | def | nonote.cmp | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"nonote"
] | Compare ordinal notations | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
cmp_compares : ∀ a b : nonote, (cmp a b).compares a b | | ⟨a, ha⟩ ⟨b, hb⟩ := begin
resetI,
dsimp [cmp], have := onote.cmp_compares a b,
cases onote.cmp a b; try {exact this},
exact subtype.mk_eq_mk.2 this
end | theorem | nonote.cmp_compares | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"cmp_compares",
"nonote",
"onote.cmp",
"onote.cmp_compares"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
below (a b : nonote) : Prop | NF_below a.1 (repr b) | def | nonote.below | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"nonote"
] | Asserts that `repr a < ω ^ repr b`. Used in `nonote.rec_on` | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
oadd (e : nonote) (n : ℕ+) (a : nonote) (h : below a e) : nonote | ⟨_, NF.oadd e.2 n h⟩ | def | nonote.oadd | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"nonote"
] | The `oadd` pseudo-constructor for `nonote` | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
rec_on {C : nonote → Sort*} (o : nonote)
(H0 : C 0)
(H1 : ∀ e n a h, C e → C a → C (oadd e n a h)) : C o | begin
cases o with o h, induction o with e n a IHe IHa,
{ exact H0 },
{ exact H1 ⟨e, h.fst⟩ n ⟨a, h.snd⟩ h.snd' (IHe _) (IHa _) }
end | def | nonote.rec_on | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"nonote"
] | This is a recursor-like theorem for `nonote` suggesting an
inductive definition, which can't actually be defined this
way due to conflicting dependencies. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
repr_add (a b) : repr (a + b) = repr a + repr b | onote.repr_add a.1 b.1 | theorem | nonote.repr_add | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote.repr_add"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
repr_sub (a b) : repr (a - b) = repr a - repr b | onote.repr_sub a.1 b.1 | theorem | nonote.repr_sub | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote.repr_sub"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
repr_mul (a b) : repr (a * b) = repr a * repr b | onote.repr_mul a.1 b.1 | theorem | nonote.repr_mul | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote.repr_mul"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
opow (x y : nonote) | mk (x.1.opow y.1) | def | nonote.opow | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"nonote"
] | Exponentiation of ordinal notations | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
repr_opow (a b) : repr (opow a b) = repr a ^ repr b | onote.repr_opow a.1 b.1 | theorem | nonote.repr_opow | set_theory.ordinal | src/set_theory/ordinal/notation.lean | [
"set_theory.ordinal.principal"
] | [
"onote.repr_opow"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
principal (op : ordinal → ordinal → ordinal) (o : ordinal) : Prop | ∀ ⦃a b⦄, a < o → b < o → op a b < o | def | ordinal.principal | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"ordinal"
] | An ordinal `o` is said to be principal or indecomposable under an operation when the set of
ordinals less than it is closed under that operation. In standard mathematical usage, this term is
almost exclusively used for additive and multiplicative principal ordinals.
For simplicity, we break usual convention and regard... | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
principal_iff_principal_swap {op : ordinal → ordinal → ordinal} {o : ordinal} :
principal op o ↔ principal (function.swap op) o | by split; exact λ h a b ha hb, h hb ha | theorem | ordinal.principal_iff_principal_swap | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
principal_zero {op : ordinal → ordinal → ordinal} : principal op 0 | λ a _ h, (ordinal.not_lt_zero a h).elim | theorem | ordinal.principal_zero | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"ordinal",
"ordinal.not_lt_zero"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
principal_one_iff {op : ordinal → ordinal → ordinal} :
principal op 1 ↔ op 0 0 = 0 | begin
refine ⟨λ h, _, λ h a b ha hb, _⟩,
{ rwa ←lt_one_iff_zero,
exact h zero_lt_one zero_lt_one },
{ rwa [lt_one_iff_zero, ha, hb] at * }
end | theorem | ordinal.principal_one_iff | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"ordinal",
"zero_lt_one"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
principal.iterate_lt {op : ordinal → ordinal → ordinal} {a o : ordinal} (hao : a < o)
(ho : principal op o) (n : ℕ) : (op a)^[n] a < o | begin
induction n with n hn,
{ rwa function.iterate_zero },
{ rw function.iterate_succ', exact ho hao hn }
end | theorem | ordinal.principal.iterate_lt | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"function.iterate_succ'",
"function.iterate_zero",
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
op_eq_self_of_principal {op : ordinal → ordinal → ordinal} {a o : ordinal.{u}}
(hao : a < o) (H : is_normal (op a)) (ho : principal op o) (ho' : is_limit o) : op a o = o | begin
refine le_antisymm _ (H.self_le _),
rw [←is_normal.bsup_eq.{u u} H ho', bsup_le_iff],
exact λ b hbo, (ho hao hbo).le
end | theorem | ordinal.op_eq_self_of_principal | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
nfp_le_of_principal {op : ordinal → ordinal → ordinal}
{a o : ordinal} (hao : a < o) (ho : principal op o) : nfp (op a) a ≤ o | nfp_le $ λ n, (ho.iterate_lt hao n).le | theorem | ordinal.nfp_le_of_principal | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
principal_nfp_blsub₂ (op : ordinal → ordinal → ordinal) (o : ordinal) :
principal op (nfp (λ o', blsub₂.{u u u} o' o' (λ a _ b _, op a b)) o) | λ a b ha hb, begin
rw lt_nfp at *,
cases ha with m hm,
cases hb with n hn,
cases le_total
((λ o', blsub₂.{u u u} o' o' (λ a _ b _, op a b))^[m] o)
((λ o', blsub₂.{u u u} o' o' (λ a _ b _, op a b))^[n] o) with h h,
{ use n + 1,
rw function.iterate_succ',
exact lt_blsub₂ _ (hm.trans_le h) hn },
... | theorem | ordinal.principal_nfp_blsub₂ | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"function.iterate_succ'",
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
unbounded_principal (op : ordinal → ordinal → ordinal) :
set.unbounded (<) {o | principal op o} | λ o, ⟨_, principal_nfp_blsub₂ op o, (le_nfp _ o).not_lt⟩ | theorem | ordinal.unbounded_principal | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"ordinal",
"set.unbounded"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
principal_add_one : principal (+) 1 | principal_one_iff.2 $ zero_add 0 | theorem | ordinal.principal_add_one | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
principal_add_of_le_one {o : ordinal} (ho : o ≤ 1) : principal (+) o | begin
rcases le_one_iff.1 ho with rfl | rfl,
{ exact principal_zero },
{ exact principal_add_one }
end | theorem | ordinal.principal_add_of_le_one | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
principal_add_is_limit {o : ordinal} (ho₁ : 1 < o) (ho : principal (+) o) :
o.is_limit | begin
refine ⟨λ ho₀, _, λ a hao, _⟩,
{ rw ho₀ at ho₁,
exact not_lt_of_gt zero_lt_one ho₁ },
{ cases eq_or_ne a 0 with ha ha,
{ rw [ha, succ_zero],
exact ho₁ },
{ refine lt_of_le_of_lt _ (ho hao hao),
rwa [←add_one_eq_succ, add_le_add_iff_left, one_le_iff_ne_zero] } }
end | theorem | ordinal.principal_add_is_limit | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"eq_or_ne",
"ordinal",
"zero_lt_one"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
principal_add_iff_add_left_eq_self {o : ordinal} :
principal (+) o ↔ ∀ a < o, a + o = o | begin
refine ⟨λ ho a hao, _, λ h a b hao hbo, _⟩,
{ cases lt_or_le 1 o with ho₁ ho₁,
{ exact op_eq_self_of_principal hao (add_is_normal a) ho (principal_add_is_limit ho₁ ho) },
{ rcases le_one_iff.1 ho₁ with rfl | rfl,
{ exact (ordinal.not_lt_zero a hao).elim },
{ rw lt_one_iff_zero at hao,
... | theorem | ordinal.principal_add_iff_add_left_eq_self | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"ordinal",
"ordinal.not_lt_zero",
"strict_mono"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
exists_lt_add_of_not_principal_add {a} (ha : ¬ principal (+) a) :
∃ (b c) (hb : b < a) (hc : c < a), b + c = a | begin
unfold principal at ha,
push_neg at ha,
rcases ha with ⟨b, c, hb, hc, H⟩,
refine ⟨b, _, hb, lt_of_le_of_ne (sub_le_self a b) (λ hab, _),
ordinal.add_sub_cancel_of_le hb.le⟩,
rw [←sub_le, hab] at H,
exact H.not_lt hc
end | theorem | ordinal.exists_lt_add_of_not_principal_add | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"ordinal.add_sub_cancel_of_le"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
principal_add_iff_add_lt_ne_self {a} :
principal (+) a ↔ ∀ ⦃b c⦄, b < a → c < a → b + c ≠ a | ⟨λ ha b c hb hc, (ha hb hc).ne, λ H, begin
by_contra' ha,
rcases exists_lt_add_of_not_principal_add ha with ⟨b, c, hb, hc, rfl⟩,
exact (H hb hc).irrefl
end⟩ | theorem | ordinal.principal_add_iff_add_lt_ne_self | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
add_omega {a : ordinal} (h : a < omega) : a + omega = omega | begin
rcases lt_omega.1 h with ⟨n, rfl⟩,
clear h, induction n with n IH,
{ rw [nat.cast_zero, zero_add] },
{ rwa [nat.cast_succ, add_assoc, one_add_of_omega_le (le_refl _)] }
end | theorem | ordinal.add_omega | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"nat.cast_succ",
"nat.cast_zero",
"ordinal"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
principal_add_omega : principal (+) omega | principal_add_iff_add_left_eq_self.2 (λ a, add_omega) | theorem | ordinal.principal_add_omega | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
add_omega_opow {a b : ordinal} (h : a < omega ^ b) : a + omega ^ b = omega ^ b | begin
refine le_antisymm _ (le_add_left _ _),
revert h, refine limit_rec_on b (λ h, _) (λ b _ h, _) (λ b l IH h, _),
{ rw [opow_zero, ← succ_zero, lt_succ_iff, ordinal.le_zero] at h,
rw [h, zero_add] },
{ rw opow_succ at h,
rcases (lt_mul_of_limit omega_is_limit).1 h with ⟨x, xo, ax⟩,
refine le_tran... | theorem | ordinal.add_omega_opow | set_theory.ordinal | src/set_theory/ordinal/principal.lean | [
"set_theory.ordinal.fixed_point"
] | [
"ordinal",
"ordinal.le_zero"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.