refactor(library/data/int/basic): put int.of_nat coercion in int namespace
This commit is contained in:
parent
130eb3f6d9
commit
a54fb42f87
1 changed files with 2 additions and 1 deletions
|
@ -39,12 +39,13 @@ inductive int : Type :=
|
|||
| neg_succ_of_nat : nat → int
|
||||
|
||||
notation `ℤ` := int
|
||||
attribute int.of_nat [coercion]
|
||||
definition int.of_num [coercion] [reducible] [constructor] (n : num) : ℤ :=
|
||||
int.of_nat (nat.of_num n)
|
||||
|
||||
namespace int
|
||||
|
||||
attribute int.of_nat [coercion]
|
||||
|
||||
/- definitions of basic functions -/
|
||||
|
||||
definition neg_of_nat (m : ℕ) : ℤ :=
|
||||
|
|
Loading…
Reference in a new issue