refactor(library/data/nat): rename to_nat to of_num
This commit is contained in:
parent
716cd4d651
commit
a978e30c81
2 changed files with 2 additions and 2 deletions
|
@ -209,7 +209,7 @@ _
|
|||
|
||||
irreducible int
|
||||
definition of_nat [coercion] [reducible] (n : ℕ) : ℤ := psub (pair n 0)
|
||||
definition of_num [coercion] [reducible] (n : num) : ℤ := of_nat (nat.to_nat n)
|
||||
definition of_num [coercion] [reducible] (n : num) : ℤ := of_nat (nat.of_num n)
|
||||
|
||||
theorem eq_zero_intro (n : ℕ) : psub (pair n n) = 0 :=
|
||||
have H : rel (pair n n) (pair 0 0), by simp,
|
||||
|
|
|
@ -47,7 +47,7 @@ definition add (x y : ℕ) : ℕ :=
|
|||
nat.rec x (λ n r, succ r) y
|
||||
infixl `+` := add
|
||||
|
||||
definition to_nat [coercion] [reducible] (n : num) : ℕ :=
|
||||
definition of_num [coercion] [reducible] (n : num) : ℕ :=
|
||||
num.rec zero
|
||||
(λ n, pos_num.rec (succ zero) (λ n r, r + r + (succ zero)) (λ n r, r + r) n) n
|
||||
|
||||
|
|
Loading…
Reference in a new issue