refactor(library/data/nat): rename to_nat to of_num

This commit is contained in:
Leonardo de Moura 2014-10-01 17:52:33 -07:00
parent 716cd4d651
commit a978e30c81
2 changed files with 2 additions and 2 deletions

View file

@ -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,

View file

@ -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