Cast of natural numbers (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 natural numbers into an additive monoid with a one (nat.cast
).
Main declarations #
cast_add_monoid_hom
:cast
bundled as anadd_monoid_hom
.cast_ring_hom
:cast
bundled as aring_hom
.
coe : ℕ → α
as an add_monoid_hom
.
Equations
- nat.cast_add_monoid_hom α = {to_fun := coe coe_to_lift, map_zero' := _, map_add' := _}
@[simp]
Equations
- nat.cast_ring_hom α = {to_fun := coe coe_to_lift, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
@[simp]
@[simp]
coe : ℕ → α
as an order_embedding
@[simp]
@[simp, norm_cast]
@[simp, norm_cast]
@[simp, norm_cast]
@[simp, norm_cast]
@[simp, norm_cast]
theorem
nat.cast_tsub
{α : Type u_1}
[canonically_ordered_comm_semiring α]
[has_sub α]
[has_ordered_sub α]
[contravariant_class α α has_add.add has_le.le]
(m n : ℕ) :
A version of nat.cast_sub
that works for ℝ≥0
and ℚ≥0
. Note that this proof doesn't work
for ℕ∞
and ℝ≥0∞
, so we use type-specific lemmas for these types.
@[simp, norm_cast]
theorem
nat.cast_min
{α : Type u_1}
[linear_ordered_semiring α]
{a b : ℕ} :
↑(linear_order.min a b) = linear_order.min ↑a ↑b
@[simp, norm_cast]
theorem
nat.cast_max
{α : Type u_1}
[linear_ordered_semiring α]
{a b : ℕ} :
↑(linear_order.max a b) = linear_order.max ↑a ↑b
@[simp, norm_cast]
Alias of nat.coe_nat_dvd
.
@[ext]
theorem
add_monoid_hom.ext_nat
{A : Type u_3}
[add_monoid A]
{f g : ℕ →+ A}
(h : ⇑f 1 = ⇑g 1) :
f = g
theorem
eq_nat_cast'
{A : Type u_3}
{F : Type u_5}
[add_monoid_with_one A]
[add_monoid_hom_class F ℕ A]
(f : F)
(h1 : ⇑f 1 = 1)
(n : ℕ) :
theorem
map_nat_cast'
{B : Type u_4}
{F : Type u_5}
[add_monoid_with_one B]
{A : Type u_1}
[add_monoid_with_one A]
[add_monoid_hom_class F A B]
(f : F)
(h : ⇑f 1 = 1)
(n : ℕ) :
@[simp]
theorem
eq_nat_cast
{R : Type u_3}
{F : Type u_5}
[non_assoc_semiring R]
[ring_hom_class F ℕ R]
(f : F)
(n : ℕ) :
@[simp]
theorem
map_nat_cast
{R : Type u_3}
{S : Type u_4}
{F : Type u_5}
[non_assoc_semiring R]
[non_assoc_semiring S]
[ring_hom_class F R S]
(f : F)
(n : ℕ) :
theorem
ext_nat
{R : Type u_3}
{F : Type u_5}
[non_assoc_semiring R]
[ring_hom_class F ℕ R]
(f g : F) :
f = g
theorem
ne_zero.nat_of_injective
{R : Type u_3}
{S : Type u_4}
{F : Type u_5}
[non_assoc_semiring R]
[non_assoc_semiring S]
{n : ℕ}
[h : ne_zero ↑n]
[ring_hom_class F R S]
{f : F}
(hf : function.injective ⇑f) :
theorem
ring_hom.eq_nat_cast'
{R : Type u_1}
[non_assoc_semiring R]
(f : ℕ →+* R) :
f = nat.cast_ring_hom R
This is primed to match eq_int_cast'
.
@[protected, instance]
Equations
- nat.unique_ring_hom = {to_inhabited := {default := nat.cast_ring_hom R _inst_1}, uniq := _}
@[protected, instance]
def
pi.has_nat_cast
{α : Type u_1}
{π : α → Type u_3}
[Π (a : α), has_nat_cast (π a)] :
has_nat_cast (Π (a : α), π a)
Equations
- pi.has_nat_cast = {nat_cast := λ (ᾰ : ℕ), id (λ (a : α), has_nat_cast.nat_cast ᾰ)}
@[protected, instance]
def
pi.add_monoid_with_one
{α : Type u_1}
{π : α → Type u_3}
[Π (a : α), add_monoid_with_one (π a)] :
add_monoid_with_one (Π (a : α), π a)
Equations
- pi.add_monoid_with_one = {nat_cast := λ (ᾰ : ℕ), id (λ (a : α), add_monoid_with_one.nat_cast ᾰ), add := λ (ᾰ ᾰ_1 : Π (a : α), π a), id (λ (a : α), add_monoid_with_one.add (ᾰ a) (ᾰ_1 a)), add_assoc := _, zero := id (λ (a : α), add_monoid_with_one.zero), zero_add := _, add_zero := _, nsmul := λ (ᾰ : ℕ) (ᾰ_1 : Π (a : α), π a), id (λ (a : α), add_monoid_with_one.nsmul ᾰ (ᾰ_1 a)), nsmul_zero' := _, nsmul_succ' := _, one := id (λ (a : α), add_monoid_with_one.one), nat_cast_zero := _, nat_cast_succ := _}
Order dual #
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[simp]
@[simp]
Lexicographic order #
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]