File: Mathlib/Data/Int/Cast/Lemmas.lean

full_name: Int.ofNatHom
code: /-- Coercion `ℕ → ℤ` as a `RingHom`. -/
def ofNatHom : ℕ →+* ℤ 
goal: ℕ →+* ℤ

full_name: Int.cast_ite
code: @[simp, norm_cast]
theorem cast_ite [AddGroupWithOne α] (P : Prop) [Decidable P] (m n : ℤ) :
    ((ite P m n : ℤ) : α) = ite P (m : α) (n : α) 
goal: ↑(if P then m else n) = if P then ↑m else ↑n

full_name: Int.castAddHom
code: /-- `coe : ℤ → α` as an `AddMonoidHom`. -/
def castAddHom (α : Type*) [AddGroupWithOne α] : ℤ →+ α 
goal: ℤ →+ α

full_name: Int.coe_castAddHom
code: @[simp] lemma coe_castAddHom : ⇑(castAddHom α) = fun x : ℤ => (x : α) 
goal: ⇑(Int.castAddHom α) = fun x => ↑x

full_name: Even.intCast
code: lemma _root_.Even.intCast {n : ℤ} (h : Even n) : Even (n : α) 
goal: Even ↑n

full_name: Int.cast_eq_zero
code: @[simp] lemma cast_eq_zero : (n : α) = 0 ↔ n = 0 
goal: ↑n = 0 ↔ n = 0

full_name: Int.cast_inj
code: @[simp, norm_cast]
lemma cast_inj : (m : α) = n ↔ m = n 
goal: ↑m = ↑n ↔ m = n

full_name: Int.cast_injective
code: lemma cast_injective : Injective (Int.cast : ℤ → α) 
goal: Function.Injective Int.cast

full_name: Int.cast_ne_zero
code: lemma cast_ne_zero : (n : α) ≠ 0 ↔ n ≠ 0 
goal: ↑n ≠ 0 ↔ n ≠ 0

full_name: Int.cast_eq_one
code: @[simp] lemma cast_eq_one : (n : α) = 1 ↔ n = 1 
goal: ↑n = 1 ↔ n = 1

full_name: Int.cast_ne_one
code: lemma cast_ne_one : (n : α) ≠ 1 ↔ n ≠ 1 
goal: ↑n ≠ 1 ↔ n ≠ 1

full_name: Int.castRingHom
code: /-- `coe : ℤ → α` as a `RingHom`. -/
def castRingHom : ℤ →+* α 
goal: ℤ →+* α

full_name: Int.coe_castRingHom
code: @[simp] lemma coe_castRingHom : ⇑(castRingHom α) = fun x : ℤ ↦ (x : α) 
goal: ⇑(Int.castRingHom α) = fun x => ↑x

full_name: Int.cast_commute
code: lemma cast_commute : ∀ (n : ℤ) (a : α), Commute ↑n a
  
goal: Commute (↑n) a

full_name: Int.cast_comm
code: lemma cast_comm (n : ℤ) (x : α) : n * x = x * n 
goal: ↑n * x = x * ↑n

full_name: Int.commute_cast
code: lemma commute_cast (a : α) (n : ℤ) : Commute a n 
goal: Commute a ↑n

full_name: zsmul_eq_mul
code: @[simp] lemma _root_.zsmul_eq_mul (a : α) : ∀ n : ℤ, n • a = n * a
  
goal: n • a = ↑n * a

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

full_name: Odd.intCast
code: lemma _root_.Odd.intCast (hn : Odd n) : Odd (n : α) 
goal: Odd ↑n

full_name: Int.cast_dvd_cast
code: theorem cast_dvd_cast [CommRing α] (m n : ℤ) (h : m ∣ n) : (m : α) ∣ (n : α) 
goal: ↑m ∣ ↑n

full_name: SemiconjBy.intCast_mul_right
code: @[simp] lemma intCast_mul_right (h : SemiconjBy a x y) (n : ℤ) : SemiconjBy a (n * x) (n * y) 
goal: SemiconjBy a (↑n * x) (↑n * y)

full_name: SemiconjBy.intCast_mul_left
code: @[simp] lemma intCast_mul_left (h : SemiconjBy a x y) (n : ℤ) : SemiconjBy (n * a) x y 
goal: SemiconjBy (↑n * a) x y

full_name: SemiconjBy.intCast_mul_intCast_mul
code: @[simp] lemma intCast_mul_intCast_mul (h : SemiconjBy a x y) (m n : ℤ) :
    SemiconjBy (m * a) (n * x) (n * y) 
goal: SemiconjBy (↑m * a) (↑n * x) (↑n * y)

full_name: Commute.intCast_left
code: @[simp] lemma intCast_left : Commute (n : α) a 
goal: Commute (↑n) a

full_name: Commute.intCast_right
code: @[simp] lemma intCast_right : Commute a n 
goal: Commute a ↑n

full_name: Commute.intCast_mul_right
code: @[simp] lemma intCast_mul_right (h : Commute a b) (m : ℤ) : Commute a (m * b) 
goal: Commute a (↑m * b)

full_name: Commute.intCast_mul_left
code: @[simp] lemma intCast_mul_left (h : Commute a b) (m : ℤ) : Commute (m  * a) b 
goal: Commute (↑m * a) b

full_name: Commute.intCast_mul_intCast_mul
code: lemma intCast_mul_intCast_mul (h : Commute a b) (m n : ℤ) : Commute (m * a) (n * b) 
goal: Commute (↑m * a) (↑n * b)

full_name: Commute.self_intCast_mul
code: lemma self_intCast_mul : Commute a (n * a : α) 
goal: Commute a (↑n * a)

full_name: Commute.intCast_mul_self
code: lemma intCast_mul_self : Commute ((n : α) * a) a 
goal: Commute (↑n * a) a

full_name: Commute.self_intCast_mul_intCast_mul
code: lemma self_intCast_mul_intCast_mul : Commute (m * a : α) (n * a : α) 
goal: Commute (↑m * a) (↑n * a)

full_name: AddMonoidHom.ext_int
code: /-- Two additive monoid homomorphisms `f`, `g` from `ℤ` to an additive monoid are equal
if `f 1 = g 1`. -/
@[ext high]
theorem ext_int [AddMonoid A] {f g : ℤ →+ A} (h1 : f 1 = g 1) : f = g 
goal: f = g

full_name: AddMonoidHom.eq_intCastAddHom
code: theorem eq_intCastAddHom (f : ℤ →+ A) (h1 : f 1 = 1) : f = Int.castAddHom A 
goal: f = Int.castAddHom A

full_name: eq_intCast'
code: theorem eq_intCast' [AddGroupWithOne α] [FunLike F ℤ α] [AddMonoidHomClass F ℤ α]
    (f : F) (h₁ : f 1 = 1) :
    ∀ n : ℤ, f n = n 
goal: f n = ↑n

full_name: zsmul_one
code: @[simp] lemma zsmul_one [AddGroupWithOne α] (n : ℤ) : n • (1 : α) = n 
goal: n • 1 = ↑n

full_name: Int.castAddHom_int
code: @[simp]
theorem Int.castAddHom_int : Int.castAddHom ℤ = AddMonoidHom.id ℤ 
goal: Int.castAddHom ℤ = AddMonoidHom.id ℤ

full_name: MonoidHom.ext_mint
code: @[ext]
theorem ext_mint {f g : Multiplicative ℤ →* M} (h1 : f (ofAdd 1) = g (ofAdd 1)) : f = g 
goal: f = g

full_name: MonoidHom.ext_int
code: /-- If two `MonoidHom`s agree on `-1` and the naturals then they are equal. -/
@[ext]
theorem ext_int {f g : ℤ →* M} (h_neg_one : f (-1) = g (-1))
    (h_nat : f.comp Int.ofNatHom.toMonoidHom = g.comp Int.ofNatHom.toMonoidHom) : f = g 
goal: f = g

full_name: MonoidWithZeroHom.ext_int
code: /-- If two `MonoidWithZeroHom`s agree on `-1` and the naturals then they are equal. -/
@[ext]
theorem ext_int {f g : ℤ →*₀ M} (h_neg_one : f (-1) = g (-1))
    (h_nat : f.comp Int.ofNatHom.toMonoidWithZeroHom = g.comp Int.ofNatHom.toMonoidWithZeroHom) :
    f = g 
goal: f = g

full_name: ext_int'
code: /-- If two `MonoidWithZeroHom`s agree on `-1` and the _positive_ naturals then they are equal. -/
theorem ext_int' [MonoidWithZero α] [FunLike F ℤ α] [MonoidWithZeroHomClass F ℤ α] {f g : F}
    (h_neg_one : f (-1) = g (-1)) (h_pos : ∀ n : ℕ, 0 < n → f n = g n) : f = g 
goal: f = g

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

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

full_name: zmultiplesHom_apply
code: lemma zmultiplesHom_apply (x : β) (n : ℤ) : zmultiplesHom β x n = n • x 
goal: ((zmultiplesHom β) x) n = n • x

full_name: zmultiplesHom_symm_apply
code: lemma zmultiplesHom_symm_apply (f : ℤ →+ β) : (zmultiplesHom β).symm f = f 1 
goal: (zmultiplesHom β).symm f = f 1

full_name: zpowersHom_apply
code: @[to_additive existing (attr := simp)]
lemma zpowersHom_apply (x : α) (n : Multiplicative ℤ) : zpowersHom α x n = x ^ toAdd n 
goal: ((zpowersHom α) x) n = x ^ Multiplicative.toAdd n

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

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

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

full_name: zmultiplesAddHom
code: /-- If `α` is commutative, `zmultiplesHom` is an additive equivalence. -/
def zmultiplesAddHom : β ≃+ (ℤ →+ β) 
goal: β ≃+ (ℤ →+ β)

full_name: zpowersMulHom
code: /-- If `α` is commutative, `zpowersHom` is a multiplicative equivalence. -/
def zpowersMulHom : α ≃* (Multiplicative ℤ →* α) 
goal: α ≃* (Multiplicative ℤ →* α)

full_name: zpowersMulHom_apply
code: @[simp]
lemma zpowersMulHom_apply (x : α) (n : Multiplicative ℤ) : zpowersMulHom α x n = x ^ toAdd n 
goal: ((zpowersMulHom α) x) n = x ^ Multiplicative.toAdd n

full_name: zpowersMulHom_symm_apply
code: @[simp]
lemma zpowersMulHom_symm_apply (f : Multiplicative ℤ →* α) :
    (zpowersMulHom α).symm f = f (ofAdd 1) 
goal: (zpowersMulHom α).symm f = f (Multiplicative.ofAdd 1)

full_name: zmultiplesAddHom_apply
code: @[simp] lemma zmultiplesAddHom_apply (x : β) (n : ℤ) : zmultiplesAddHom β x n = n • x 
goal: ((zmultiplesAddHom β) x) n = n • x

full_name: zmultiplesAddHom_symm_apply
code: @[simp] lemma zmultiplesAddHom_symm_apply (f : ℤ →+ β) : (zmultiplesAddHom β).symm f = f 1 
goal: (zmultiplesAddHom β).symm f = f 1

full_name: eq_intCast
code: @[simp]
theorem eq_intCast [FunLike F ℤ α] [RingHomClass F ℤ α] (f : F) (n : ℤ) : f n = n 
goal: f n = ↑n

full_name: map_intCast
code: @[simp]
theorem map_intCast [FunLike F α β] [RingHomClass F α β] (f : F) (n : ℤ) : f n = n 
goal: f ↑n = ↑n

full_name: RingHom.eq_intCast'
code: theorem eq_intCast' (f : ℤ →+* α) : f = Int.castRingHom α 
goal: f = Int.castRingHom α

full_name: RingHom.ext_int
code: theorem ext_int {R : Type*} [NonAssocSemiring R] (f g : ℤ →+* R) : f = g 
goal: f = g

full_name: RingHom.Int.subsingleton_ringHom
code: instance Int.subsingleton_ringHom {R : Type*} [NonAssocSemiring R] : Subsingleton (ℤ →+* R) 
goal: Subsingleton (ℤ →+* R)

full_name: Int.castRingHom_int
code: @[simp]
theorem Int.castRingHom_int : Int.castRingHom ℤ = RingHom.id ℤ 
goal: Int.castRingHom ℤ = RingHom.id ℤ

full_name: Pi.instIntCast
code: instance instIntCast : IntCast (∀ i, π i) 
goal: IntCast ((i : ι) → π i)

full_name: Pi.intCast_apply
code: theorem intCast_apply (n : ℤ) (i : ι) : (n : ∀ i, π i) i = n 
goal: ↑n i = ↑n

full_name: Pi.intCast_def
code: @[simp]
theorem intCast_def (n : ℤ) : (n : ∀ i, π i) = fun _ => ↑n 
goal: ↑n = fun x => ↑n

full_name: Sum.elim_intCast_intCast
code: theorem Sum.elim_intCast_intCast {α β γ : Type*} [IntCast γ] (n : ℤ) :
    Sum.elim (n : α → γ) (n : β → γ) = n 
goal: Sum.elim ↑n ↑n = ↑n