File: Mathlib/Data/Nat/Cast/Basic.lean

full_name: Nat.castAddMonoidHom
code: /-- `Nat.cast : ℕ → α` as an `AddMonoidHom`. -/
def castAddMonoidHom (α : Type*) [AddMonoidWithOne α] :
    ℕ →+ α 
goal: ℕ →+ α

full_name: Nat.coe_castAddMonoidHom
code: @[simp]
theorem coe_castAddMonoidHom [AddMonoidWithOne α] : (castAddMonoidHom α : ℕ → α) = Nat.cast 
goal: ⇑(Nat.castAddMonoidHom α) = Nat.cast

full_name: Even.natCast
code: lemma _root_.Even.natCast [AddMonoidWithOne α] {n : ℕ} (hn : Even n) : Even (n : α) 
goal: Even ↑n

full_name: Nat.cast_mul
code: @[simp, norm_cast] lemma cast_mul (m n : ℕ) : ((m * n : ℕ) : α) = m * n 
goal: ↑(m * n) = ↑m * ↑n

full_name: Nat.castRingHom
code: /-- `Nat.cast : ℕ → α` as a `RingHom` -/
def castRingHom : ℕ →+* α 
goal: ℕ →+* α

full_name: Nat.coe_castRingHom
code: @[simp, norm_cast] lemma coe_castRingHom : (castRingHom α : ℕ → α) = Nat.cast 
goal: ⇑(Nat.castRingHom α) = Nat.cast

full_name: nsmul_eq_mul'
code: lemma _root_.nsmul_eq_mul' (a : α) (n : ℕ) : n • a = a * n 
goal: n • a = a * ↑n

full_name: nsmul_eq_mul
code: @[simp] lemma _root_.nsmul_eq_mul (n : ℕ) (a : α) : n • a = n * a 
goal: n • a = ↑n * a

full_name: Nat.cast_pow
code: @[simp, norm_cast]
lemma cast_pow (m : ℕ) : ∀ n : ℕ, ↑(m ^ n) = (m ^ n : α)
  
goal: ↑(m ^ n) = ↑m ^ n

full_name: Nat.cast_dvd_cast
code: lemma cast_dvd_cast (h : m ∣ n) : (m : α) ∣ (n : α) 
goal: ↑m ∣ ↑n

full_name: ext_nat'
code: theorem ext_nat' [AddMonoid A] [AddMonoidHomClass F ℕ A] (f g : F) (h : f 1 = g 1) : f = g 
goal: f = g

full_name: AddMonoidHom.ext_nat
code: @[ext]
theorem AddMonoidHom.ext_nat [AddMonoid A] {f g : ℕ →+ A} : f 1 = g 1 → f = g 
goal: f 1 = g 1 → f = g

full_name: eq_natCast'
code: theorem eq_natCast' [AddMonoidHomClass F ℕ A] (f : F) (h1 : f 1 = 1) : ∀ n : ℕ, f n = n
  
goal: f n = ↑n

full_name: map_natCast'
code: theorem map_natCast' {A} [AddMonoidWithOne A] [FunLike F A B] [AddMonoidHomClass F A B]
    (f : F) (h : f 1 = 1) :
    ∀ n : ℕ, f n = n
  
goal: f ↑n = ↑n

full_name: map_ofNat'
code: theorem map_ofNat' {A} [AddMonoidWithOne A] [FunLike F A B] [AddMonoidHomClass F A B]
    (f : F) (h : f 1 = 1) (n : ℕ) [n.AtLeastTwo] : f (OfNat.ofNat n) = OfNat.ofNat n 
goal: f (OfNat.ofNat n) = OfNat.ofNat n

full_name: nsmul_one
code: @[simp] lemma nsmul_one {A} [AddMonoidWithOne A] : ∀ n : ℕ, n • (1 : A) = n 
goal: n • 1 = ↑n

full_name: ext_nat''
code: /-- If two `MonoidWithZeroHom`s agree on the positive naturals they are equal. -/
theorem ext_nat'' [MonoidWithZeroHomClass F ℕ A] (f g : F) (h_pos : ∀ {n : ℕ}, 0 < n → f n = g n) :
    f = g 
goal: f = g

full_name: MonoidWithZeroHom.ext_nat
code: @[ext]
theorem MonoidWithZeroHom.ext_nat {f g : ℕ →*₀ A} : (∀ {n : ℕ}, 0 < n → f n = g n) → f = g 
goal: (∀ {n : ℕ}, 0 < n → f n = g n) → f = g

full_name: eq_natCast
code: @[simp]
theorem eq_natCast [FunLike F ℕ R] [RingHomClass F ℕ R] (f : F) : ∀ n, f n = n 
goal: f n = ↑n

full_name: map_natCast
code: @[simp]
theorem map_natCast [FunLike F R S] [RingHomClass F R S] (f : F) : ∀ n : ℕ, f (n : R) = n 
goal: f ↑n = ↑n

full_name: map_ofNat
code: @[simp]
theorem map_ofNat [FunLike F R S] [RingHomClass F R S] (f : F) (n : ℕ) [Nat.AtLeastTwo n] :
    (f (no_index (OfNat.ofNat n)) : S) = OfNat.ofNat n 
goal: f (OfNat.ofNat n) = OfNat.ofNat n

full_name: ext_nat
code: theorem ext_nat [FunLike F ℕ R] [RingHomClass F ℕ R] (f g : F) : f = g 
goal: f = g

full_name: NeZero.nat_of_neZero
code: theorem NeZero.nat_of_neZero {R S} [Semiring R] [Semiring S]
    {F} [FunLike F R S] [RingHomClass F R S] (f : F)
    {n : ℕ} [hn : NeZero (n : S)] : NeZero (n : R) 
goal: NeZero ↑n

full_name: RingHom.eq_natCast'
code: /-- This is primed to match `eq_intCast'`. -/
theorem eq_natCast' {R} [NonAssocSemiring R] (f : ℕ →+* R) : f = Nat.castRingHom R 
goal: f = Nat.castRingHom R

full_name: Nat.cast_id
code: @[simp, norm_cast]
theorem Nat.cast_id (n : ℕ) : n.cast = n 
goal: ↑n = n

full_name: Nat.castRingHom_nat
code: @[simp]
theorem Nat.castRingHom_nat : Nat.castRingHom ℕ = RingHom.id ℕ 
goal: Nat.castRingHom ℕ = RingHom.id ℕ

full_name: Nat.uniqueRingHom
code: /-- We don't use `RingHomClass` here, since that might cause type-class slowdown for
`Subsingleton`-/
instance Nat.uniqueRingHom {R : Type*} [NonAssocSemiring R] : Unique (ℕ →+* R) 
goal: Unique (ℕ →+* R)

full_name: multiplesHom
code: /-- Additive homomorphisms from `ℕ` are defined by the image of `1`. -/
def multiplesHom : β ≃ (ℕ →+ β) 
goal: β ≃ (ℕ →+ β)

full_name: powersHom
code: /-- Monoid homomorphisms from `Multiplicative ℕ` are defined by the image
of `Multiplicative.ofAdd 1`. -/
@[to_additive existing]
def powersHom : α ≃ (Multiplicative ℕ →* α) 
goal: α ≃ (Multiplicative ℕ →* α)

full_name: multiplesHom_apply
code: lemma multiplesHom_apply (x : β) (n : ℕ) : multiplesHom β x n = n • x 
goal: ((multiplesHom β) x) n = n • x

full_name: powersHom_apply
code: @[to_additive existing (attr := simp)]
lemma powersHom_apply (x : α) (n : Multiplicative ℕ) :
    powersHom α x n = x ^ Multiplicative.toAdd n 
goal: ((powersHom α) x) n = x ^ Multiplicative.toAdd n

full_name: multiplesHom_symm_apply
code: lemma multiplesHom_symm_apply (f : ℕ →+ β) : (multiplesHom β).symm f = f 1 
goal: (multiplesHom β).symm f = f 1

full_name: powersHom_symm_apply
code: @[to_additive existing (attr := simp)]
lemma powersHom_symm_apply (f : Multiplicative ℕ →* α) :
    (powersHom α).symm f = f (Multiplicative.ofAdd 1) 
goal: (powersHom α).symm f = f (Multiplicative.ofAdd 1)

full_name: MonoidHom.apply_mnat
code: lemma MonoidHom.apply_mnat (f : Multiplicative ℕ →* α) (n : Multiplicative ℕ) :
    f n = f (Multiplicative.ofAdd 1) ^ (Multiplicative.toAdd n) 
goal: f n = f (Multiplicative.ofAdd 1) ^ Multiplicative.toAdd n

full_name: MonoidHom.ext_mnat
code: @[ext]
lemma MonoidHom.ext_mnat ⦃f g : Multiplicative ℕ →* α⦄
    (h : f (Multiplicative.ofAdd 1) = g (Multiplicative.ofAdd 1)) : f = g 
goal: f = g

full_name: AddMonoidHom.apply_nat
code: lemma AddMonoidHom.apply_nat (f : ℕ →+ β) (n : ℕ) : f n = n • f 1 
goal: f n = n • f 1

full_name: multiplesAddHom
code: /-- If `α` is commutative, `multiplesHom` is an additive equivalence. -/
def multiplesAddHom : β ≃+ (ℕ →+ β) 
goal: β ≃+ (ℕ →+ β)

full_name: powersMulHom
code: /-- If `α` is commutative, `powersHom` is a multiplicative equivalence. -/
def powersMulHom : α ≃* (Multiplicative ℕ →* α) 
goal: α ≃* (Multiplicative ℕ →* α)

full_name: multiplesAddHom_apply
code: @[simp] lemma multiplesAddHom_apply (x : β) (n : ℕ) : multiplesAddHom β x n = n • x 
goal: ((multiplesAddHom β) x) n = n • x

full_name: powersMulHom_apply
code: @[simp]
lemma powersMulHom_apply (x : α) (n : Multiplicative ℕ) : powersMulHom α x n = x ^ toAdd n 
goal: ((powersMulHom α) x) n = x ^ Multiplicative.toAdd n

full_name: multiplesAddHom_symm_apply
code: @[simp] lemma multiplesAddHom_symm_apply (f : ℕ →+ β) : (multiplesAddHom β).symm f = f 1 
goal: (multiplesAddHom β).symm f = f 1

full_name: powersMulHom_symm_apply
code: @[simp] lemma powersMulHom_symm_apply (f : Multiplicative ℕ →* α) :
    (powersMulHom α).symm f = f (ofAdd 1) 
goal: (powersMulHom α).symm f = f (Multiplicative.ofAdd 1)

full_name: Pi.instNatCast
code: instance instNatCast : NatCast (∀ a, π a) 
goal: NatCast ((a : α) → π a)

full_name: Pi.natCast_apply
code: theorem natCast_apply (n : ℕ) (a : α) : (n : ∀ a, π a) a = n 
goal: ↑n a = ↑n

full_name: Pi.natCast_def
code: @[simp]
theorem natCast_def (n : ℕ) : (n : ∀ a, π a) = fun _ ↦ ↑n 
goal: ↑n = fun x => ↑n

full_name: Pi.ofNat_apply
code: @[simp]
theorem ofNat_apply (n : ℕ) [n.AtLeastTwo] (a : α) : (OfNat.ofNat n : ∀ a, π a) a = n 
goal: OfNat.ofNat n a = ↑n

full_name: Sum.elim_natCast_natCast
code: theorem Sum.elim_natCast_natCast {α β γ : Type*} [NatCast γ] (n : ℕ) :
    Sum.elim (n : α → γ) (n : β → γ) = n 
goal: Sum.elim ↑n ↑n = ↑n