Cast of integers (additional theorems) #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file proves additional properties about the canonical homomorphism from
the integers into an additive group with a one (int.cast
),
particularly results involving algebraic homomorphisms or the order structure on ℤ
which were not available in the import dependencies of data.int.cast.basic
.
Main declarations #
cast_add_hom
:cast
bundled as anadd_monoid_hom
.cast_ring_hom
:cast
bundled as aring_hom
.
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}
coe : ℤ → α
as an add_monoid_hom
.
Equations
- int.cast_add_hom α = {to_fun := coe coe_to_lift, map_zero' := _, map_add' := _}
@[simp]
Equations
- int.cast_ring_hom α = {to_fun := coe coe_to_lift, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
@[simp]
@[simp]
@[simp, norm_cast]
@[simp, norm_cast]
@[simp]
@[simp]
@[simp]
@[simp, norm_cast]
theorem
int.cast_min
{α : Type u_3}
[linear_ordered_ring α]
{a b : ℤ} :
↑(linear_order.min a b) = linear_order.min ↑a ↑b
@[simp, norm_cast]
theorem
int.cast_max
{α : Type u_3}
[linear_ordered_ring α]
{a b : ℤ} :
↑(linear_order.max a b) = linear_order.max ↑a ↑b
@[ext]
theorem
add_monoid_hom.ext_int
{A : Type u_5}
[add_monoid A]
{f g : ℤ →+ A}
(h1 : ⇑f 1 = ⇑g 1) :
f = g
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_5}
[add_group_with_one A]
(f : ℤ →+ A)
(h1 : ⇑f 1 = 1) :
f = int.cast_add_hom A
theorem
eq_int_cast'
{F : Type u_1}
{α : Type u_3}
[add_group_with_one α]
[add_monoid_hom_class F ℤ α]
(f : F)
(h₁ : ⇑f 1 = 1)
(n : ℤ) :
@[ext]
theorem
monoid_hom.ext_mint
{M : Type u_5}
[monoid M]
{f g : multiplicative ℤ →* M}
(h1 : ⇑f (⇑multiplicative.of_add 1) = ⇑g (⇑multiplicative.of_add 1)) :
f = g
@[ext]
theorem
monoid_hom.ext_int
{M : Type u_5}
[monoid M]
{f g : ℤ →* M}
(h_neg_one : ⇑f (-1) = ⇑g (-1))
(h_nat : f.comp int.of_nat_hom.to_monoid_hom = g.comp int.of_nat_hom.to_monoid_hom) :
f = g
If two monoid_hom
s agree on -1
and the naturals then they are equal.
@[ext]
theorem
monoid_with_zero_hom.ext_int
{M : Type u_5}
[monoid_with_zero M]
{f g : ℤ →*₀ M}
(h_neg_one : ⇑f (-1) = ⇑g (-1))
(h_nat : f.comp int.of_nat_hom.to_monoid_with_zero_hom = g.comp int.of_nat_hom.to_monoid_with_zero_hom) :
f = g
If two monoid_with_zero_hom
s agree on -1
and the naturals then they are equal.
@[simp]
theorem
eq_int_cast
{F : Type u_1}
{α : Type u_3}
[non_assoc_ring α]
[ring_hom_class F ℤ α]
(f : F)
(n : ℤ) :
@[simp]
theorem
map_int_cast
{F : Type u_1}
{α : Type u_3}
{β : Type u_4}
[non_assoc_ring α]
[non_assoc_ring β]
[ring_hom_class F α β]
(f : F)
(n : ℤ) :
theorem
ring_hom.eq_int_cast'
{α : Type u_3}
[non_assoc_ring α]
(f : ℤ →+* α) :
f = int.cast_ring_hom α
@[protected, instance]
def
ring_hom.int.subsingleton_ring_hom
{R : Type u_1}
[non_assoc_semiring R] :
subsingleton (ℤ →+* R)
@[protected, instance]
def
pi.has_int_cast
{ι : Type u_2}
{π : ι → Type u_5}
[Π (i : ι), has_int_cast (π i)] :
has_int_cast (Π (i : ι), π i)
Equations
- pi.has_int_cast = {int_cast := λ (ᾰ : ℤ), id (λ (i : ι), has_int_cast.int_cast ᾰ)}
@[protected, instance]
def
pi.add_group_with_one
{ι : Type u_2}
{π : ι → Type u_5}
[Π (i : ι), add_group_with_one (π i)] :
add_group_with_one (Π (i : ι), π i)
Equations
- pi.add_group_with_one = {int_cast := λ (ᾰ : ℤ), id (λ (i : ι), add_group_with_one.int_cast ᾰ), add := λ (ᾰ ᾰ_1 : Π (i : ι), π i), id (λ (i : ι), add_group_with_one.add (ᾰ i) (ᾰ_1 i)), add_assoc := _, zero := id (λ (i : ι), add_group_with_one.zero), zero_add := _, add_zero := _, nsmul := λ (ᾰ : ℕ) (ᾰ_1 : Π (i : ι), π i), id (λ (i : ι), add_group_with_one.nsmul ᾰ (ᾰ_1 i)), nsmul_zero' := _, nsmul_succ' := _, neg := λ (ᾰ : Π (i : ι), π i), id (λ (i : ι), add_group_with_one.neg (ᾰ i)), sub := λ (ᾰ ᾰ_1 : Π (i : ι), π i), id (λ (i : ι), add_group_with_one.sub (ᾰ i) (ᾰ_1 i)), sub_eq_add_neg := _, zsmul := λ (ᾰ : ℤ) (ᾰ_1 : Π (i : ι), π i), id (λ (i : ι), add_group_with_one.zsmul ᾰ (ᾰ_1 i)), zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, nat_cast := λ (ᾰ : ℕ), id (λ (i : ι), add_group_with_one.nat_cast ᾰ), one := id (λ (i : ι), add_group_with_one.one), nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _}
Order dual #
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[simp]
@[simp]
Lexicographic order #
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]