Cast of natural numbers (additional theorems) #
This file proves additional properties about the canonical homomorphism from
the natural numbers into an additive monoid with a one (Nat.cast
).
Main declarations #
castAddMonoidHom
:cast
bundled as anAddMonoidHom
.castRingHom
:cast
bundled as aRingHom
.
@[simp]
theorem
Nat.coe_castAddMonoidHom
{α : Type u_1}
[AddMonoidWithOne α]
:
⇑(Nat.castAddMonoidHom α) = Nat.cast
@[simp]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]
@[simp]
Alias of Nat.coe_nat_dvd
.
theorem
eq_natCast'
{A : Type u_3}
{F : Type u_5}
[FunLike F ℕ A]
[AddMonoidWithOne A]
[AddMonoidHomClass F ℕ A]
(f : F)
(h1 : f 1 = 1)
(n : ℕ)
:
f n = ↑n
theorem
map_natCast'
{B : Type u_4}
{F : Type u_5}
[AddMonoidWithOne B]
{A : Type u_6}
[AddMonoidWithOne A]
[FunLike F A B]
[AddMonoidHomClass F A B]
(f : F)
(h : f 1 = 1)
(n : ℕ)
:
f ↑n = ↑n
theorem
ext_nat''
{A : Type u_3}
{F : Type u_4}
[MulZeroOneClass A]
[FunLike F ℕ A]
[MonoidWithZeroHomClass F ℕ A]
(f : F)
(g : F)
(h_pos : ∀ {n : ℕ}, 0 < n → f n = g n)
:
f = g
If two MonoidWithZeroHom
s agree on the positive naturals they are equal.
@[simp]
theorem
eq_natCast
{R : Type u_3}
{F : Type u_5}
[NonAssocSemiring R]
[FunLike F ℕ R]
[RingHomClass F ℕ R]
(f : F)
(n : ℕ)
:
f n = ↑n
@[simp]
theorem
map_natCast
{R : Type u_3}
{S : Type u_4}
{F : Type u_5}
[NonAssocSemiring R]
[NonAssocSemiring S]
[FunLike F R S]
[RingHomClass F R S]
(f : F)
(n : ℕ)
:
f ↑n = ↑n
@[simp]
theorem
map_ofNat
{R : Type u_3}
{S : Type u_4}
{F : Type u_5}
[NonAssocSemiring R]
[NonAssocSemiring S]
[FunLike F R S]
[RingHomClass F R S]
(f : F)
(n : ℕ)
[Nat.AtLeastTwo n]
:
f (OfNat.ofNat n) = OfNat.ofNat n
theorem
ext_nat
{R : Type u_3}
{F : Type u_5}
[NonAssocSemiring R]
[FunLike F ℕ R]
[RingHomClass F ℕ R]
(f : F)
(g : F)
:
f = g
theorem
RingHom.eq_natCast'
{R : Type u_3}
[NonAssocSemiring R]
(f : ℕ →+* R)
:
f = Nat.castRingHom R
This is primed to match eq_intCast'
.
We don't use RingHomClass
here, since that might cause type-class slowdown for
Subsingleton
Equations
- Nat.uniqueRingHom = { toInhabited := { default := Nat.castRingHom R }, uniq := (_ : ∀ (f : ℕ →+* R), f = Nat.castRingHom R) }
Monoid homomorphisms from Multiplicative ℕ
are defined by the image
of Multiplicative.ofAdd 1
.
Equations
- powersHom α = Additive.ofMul.trans ((multiplesHom (Additive α)).trans AddMonoidHom.toMultiplicative'')
Instances For
@[simp]
theorem
multiplesHom_apply
{α : Type u_1}
[AddMonoid α]
(x : α)
(n : ℕ)
:
((multiplesHom α) x) n = n • x
@[simp]
@[simp]
theorem
multiplesHom_symm_apply
{α : Type u_1}
[AddMonoid α]
(f : ℕ →+ α)
:
(multiplesHom α).symm f = f 1
@[simp]
theorem
MonoidHom.apply_mnat
{α : Type u_1}
[Monoid α]
(f : Multiplicative ℕ →* α)
(n : Multiplicative ℕ)
:
theorem
MonoidHom.ext_mnat
{α : Type u_1}
[Monoid α]
⦃f : Multiplicative ℕ →* α⦄
⦃g : Multiplicative ℕ →* α⦄
(h : f (Multiplicative.ofAdd 1) = g (Multiplicative.ofAdd 1))
:
f = g
If α
is commutative, multiplesHom
is an additive equivalence.
Equations
- multiplesAddHom α = let src := multiplesHom α; { toEquiv := src, map_add' := (_ : ∀ (a b : α), (multiplesHom α).toFun (a + b) = (multiplesHom α).toFun a + (multiplesHom α).toFun b) }
Instances For
@[simp]
theorem
multiplesAddHom_apply
(α : Type u_1)
[AddCommMonoid α]
(x : α)
(n : ℕ)
:
((multiplesAddHom α) x) n = n • x
@[simp]
theorem
powersMulHom_apply
(α : Type u_1)
[CommMonoid α]
(x : α)
(n : Multiplicative ℕ)
:
((powersMulHom α) x) n = x ^ Multiplicative.toAdd n
@[simp]
theorem
multiplesAddHom_symm_apply
(α : Type u_1)
[AddCommMonoid α]
(f : ℕ →+ α)
:
(AddEquiv.symm (multiplesAddHom α)) f = f 1
@[simp]
theorem
powersMulHom_symm_apply
(α : Type u_1)
[CommMonoid α]
(f : Multiplicative ℕ →* α)
:
(MulEquiv.symm (powersMulHom α)) f = f (Multiplicative.ofAdd 1)
@[simp]
theorem
Pi.ofNat_apply
{α : Type u_1}
{π : α → Type u_3}
[(a : α) → NatCast (π a)]
(n : ℕ)
[Nat.AtLeastTwo n]
(a : α)
:
OfNat.ofNat n a = ↑n