Coercion ℕ → ℤ
as a ring_hom
.
Equations
- int.of_nat_hom = {to_fun := coe coe_to_lift, map_one' := int.of_nat_hom._proof_1, map_mul' := int.of_nat_mul, map_zero' := int.of_nat_hom._proof_2, map_add' := int.of_nat_add}
@[simp]
theorem
int.cast_neg_of_nat
{α : Type u_1}
[add_group α]
[has_one α]
(n : ℕ) :
↑(int.neg_of_nat n) = -↑n
coe : ℤ → α
as an add_monoid_hom
.
Equations
- int.cast_add_hom α = {to_fun := coe coe_to_lift, map_zero' := _, map_add' := _}
@[simp]
theorem
int.coe_cast_add_hom
{α : Type u_1}
[add_group α]
[has_one α] :
⇑(int.cast_add_hom α) = coe
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[ext]
Two additive monoid homomorphisms f
, g
from ℤ
to an additive monoid are equal
if f 1 = g 1
.
theorem
add_monoid_hom.eq_int_cast_hom
{A : Type u_1}
[add_group A]
[has_one A]
(f : ℤ →+ A) :
⇑f 1 = 1 → f = int.cast_add_hom A
theorem
monoid_hom.ext_int
{M : Type u_1}
[monoid M]
{f g : multiplicative ℤ →* M} :
⇑f (multiplicative.of_add 1) = ⇑g (multiplicative.of_add 1) → f = g
@[instance]