File: Mathlib/Algebra/Group/Hom/Basic.lean

full_name: nsmulAddMonoidHom_apply
code: /-- The `n`th power map on a commutative monoid for a natural `n`, considered as a morphism of
monoids. -/
@[to_additive (attr := simps) "Multiplication by a natural `n` on a commutative additive monoid,
considered as a morphism of additive monoids."]
def powMonoidHom (n : ℕ) : α →* α 
goal: ∀ (x : α), (nsmulAddMonoidHom n) x = n • x

full_name: nsmulAddMonoidHom
code: /-- The `n`th power map on a commutative monoid for a natural `n`, considered as a morphism of
monoids. -/
@[to_additive (attr := simps) "Multiplication by a natural `n` on a commutative additive monoid,
considered as a morphism of additive monoids."]
def powMonoidHom (n : ℕ) : α →* α 
goal: α →+ α

full_name: powMonoidHom
code: /-- The `n`th power map on a commutative monoid for a natural `n`, considered as a morphism of
monoids. -/
@[to_additive (attr := simps) "Multiplication by a natural `n` on a commutative additive monoid,
considered as a morphism of additive monoids."]
def powMonoidHom (n : ℕ) : α →* α 
goal: α →* α

full_name: powMonoidHom_apply
code: /-- The `n`th power map on a commutative monoid for a natural `n`, considered as a morphism of
monoids. -/
@[to_additive (attr := simps) "Multiplication by a natural `n` on a commutative additive monoid,
considered as a morphism of additive monoids."]
def powMonoidHom (n : ℕ) : α →* α 
goal: ∀ (x : α), (powMonoidHom n) x = x ^ n

full_name: zpowGroupHom_apply
code: /-- The `n`-th power map (for an integer `n`) on a commutative group, considered as a group
homomorphism. -/
@[to_additive (attr := simps) "Multiplication by an integer `n` on a commutative additive group,
considered as an additive group homomorphism."]
def zpowGroupHom (n : ℤ) : α →* α 
goal: ∀ (x : α), (zpowGroupHom n) x = x ^ n

full_name: zpowGroupHom
code: /-- The `n`-th power map (for an integer `n`) on a commutative group, considered as a group
homomorphism. -/
@[to_additive (attr := simps) "Multiplication by an integer `n` on a commutative additive group,
considered as an additive group homomorphism."]
def zpowGroupHom (n : ℤ) : α →* α 
goal: α →* α

full_name: zsmulAddGroupHom
code: /-- The `n`-th power map (for an integer `n`) on a commutative group, considered as a group
homomorphism. -/
@[to_additive (attr := simps) "Multiplication by an integer `n` on a commutative additive group,
considered as an additive group homomorphism."]
def zpowGroupHom (n : ℤ) : α →* α 
goal: α →+ α

full_name: zsmulAddGroupHom_apply
code: /-- The `n`-th power map (for an integer `n`) on a commutative group, considered as a group
homomorphism. -/
@[to_additive (attr := simps) "Multiplication by an integer `n` on a commutative additive group,
considered as an additive group homomorphism."]
def zpowGroupHom (n : ℤ) : α →* α 
goal: ∀ (x : α), (zsmulAddGroupHom n) x = n • x

full_name: invMonoidHom
code: /-- Inversion on a commutative group, considered as a monoid homomorphism. -/
@[to_additive "Negation on a commutative additive group, considered as an additive monoid
homomorphism."]
def invMonoidHom : α →* α 
goal: α →* α

full_name: negAddMonoidHom
code: /-- Inversion on a commutative group, considered as a monoid homomorphism. -/
@[to_additive "Negation on a commutative additive group, considered as an additive monoid
homomorphism."]
def invMonoidHom : α →* α 
goal: α →+ α

full_name: coe_invMonoidHom
code: @[simp]
theorem coe_invMonoidHom : (invMonoidHom : α → α) = Inv.inv 
goal: ⇑invMonoidHom = Inv.inv

full_name: invMonoidHom_apply
code: @[simp]
theorem invMonoidHom_apply (a : α) : invMonoidHom a = a⁻¹ 
goal: invMonoidHom a = a⁻¹

full_name: AddHom.instAdd
code: /-- Given two mul morphisms `f`, `g` to a commutative semigroup, `f * g` is the mul morphism
sending `x` to `f x * g x`. -/
@[to_additive "Given two additive morphisms `f`, `g` to an additive commutative semigroup,
`f + g` is the additive morphism sending `x` to `f x + g x`."]
instance [Mul M] [CommSemigroup N] : Mul (M →ₙ* N) 
goal: Add (AddHom M N)

full_name: MulHom.instMul
code: /-- Given two mul morphisms `f`, `g` to a commutative semigroup, `f * g` is the mul morphism
sending `x` to `f x * g x`. -/
@[to_additive "Given two additive morphisms `f`, `g` to an additive commutative semigroup,
`f + g` is the additive morphism sending `x` to `f x + g x`."]
instance [Mul M] [CommSemigroup N] : Mul (M →ₙ* N) 
goal: Mul (M →ₙ* N)

full_name: AddHom.add_apply
code: @[to_additive (attr := simp)]
theorem mul_apply {M N} [Mul M] [CommSemigroup N] (f g : M →ₙ* N) (x : M) :
    (f * g) x = f x * g x 
goal: (f + g) x = f x + g x

full_name: MulHom.mul_apply
code: @[to_additive (attr := simp)]
theorem mul_apply {M N} [Mul M] [CommSemigroup N] (f g : M →ₙ* N) (x : M) :
    (f * g) x = f x * g x 
goal: (f * g) x = f x * g x

full_name: MulHom.mul_comp
code: @[to_additive]
theorem mul_comp [Mul M] [Mul N] [CommSemigroup P] (g₁ g₂ : N →ₙ* P) (f : M →ₙ* N) :
    (g₁ * g₂).comp f = g₁.comp f * g₂.comp f 
goal: (g₁ * g₂).comp f = g₁.comp f * g₂.comp f

full_name: AddHom.add_comp
code: @[to_additive]
theorem mul_comp [Mul M] [Mul N] [CommSemigroup P] (g₁ g₂ : N →ₙ* P) (f : M →ₙ* N) :
    (g₁ * g₂).comp f = g₁.comp f * g₂.comp f 
goal: (g₁ + g₂).comp f = g₁.comp f + g₂.comp f

full_name: MulHom.comp_mul
code: @[to_additive]
theorem comp_mul [Mul M] [CommSemigroup N] [CommSemigroup P] (g : N →ₙ* P) (f₁ f₂ : M →ₙ* N) :
    g.comp (f₁ * f₂) = g.comp f₁ * g.comp f₂ 
goal: g.comp (f₁ * f₂) = g.comp f₁ * g.comp f₂

full_name: AddHom.comp_add
code: @[to_additive]
theorem comp_mul [Mul M] [CommSemigroup N] [CommSemigroup P] (g : N →ₙ* P) (f₁ f₂ : M →ₙ* N) :
    g.comp (f₁ * f₂) = g.comp f₁ * g.comp f₂ 
goal: g.comp (f₁ + f₂) = g.comp f₁ + g.comp f₂

full_name: injective_iff_map_eq_zero
code: /-- A homomorphism from a group to a monoid is injective iff its kernel is trivial.
For the iff statement on the triviality of the kernel, see `injective_iff_map_eq_one'`.  -/
@[to_additive
  "A homomorphism from an additive group to an additive monoid is injective iff
  its kernel is trivial. For the iff statement on the triviality of the kernel,
  see `injective_iff_map_eq_zero'`."]
theorem _root_.injective_iff_map_eq_one {G H} [Group G] [MulOneClass H]
    [FunLike F G H] [MonoidHomClass F G H]
    (f : F) : Function.Injective f ↔ ∀ a, f a = 1 → a = 1 
goal: Function.Injective ⇑f ↔ ∀ (a : G), f a = 0 → a = 0

full_name: injective_iff_map_eq_one
code: /-- A homomorphism from a group to a monoid is injective iff its kernel is trivial.
For the iff statement on the triviality of the kernel, see `injective_iff_map_eq_one'`.  -/
@[to_additive
  "A homomorphism from an additive group to an additive monoid is injective iff
  its kernel is trivial. For the iff statement on the triviality of the kernel,
  see `injective_iff_map_eq_zero'`."]
theorem _root_.injective_iff_map_eq_one {G H} [Group G] [MulOneClass H]
    [FunLike F G H] [MonoidHomClass F G H]
    (f : F) : Function.Injective f ↔ ∀ a, f a = 1 → a = 1 
goal: Function.Injective ⇑f ↔ ∀ (a : G), f a = 1 → a = 1

full_name: injective_iff_map_eq_zero'
code: /-- A homomorphism from a group to a monoid is injective iff its kernel is trivial,
stated as an iff on the triviality of the kernel.
For the implication, see `injective_iff_map_eq_one`. -/
@[to_additive
  "A homomorphism from an additive group to an additive monoid is injective iff its
  kernel is trivial, stated as an iff on the triviality of the kernel. For the implication, see
  `injective_iff_map_eq_zero`."]
theorem _root_.injective_iff_map_eq_one' {G H} [Group G] [MulOneClass H]
    [FunLike F G H] [MonoidHomClass F G H]
    (f : F) : Function.Injective f ↔ ∀ a, f a = 1 ↔ a = 1 
goal: Function.Injective ⇑f ↔ ∀ (a : G), f a = 0 ↔ a = 0

full_name: injective_iff_map_eq_one'
code: /-- A homomorphism from a group to a monoid is injective iff its kernel is trivial,
stated as an iff on the triviality of the kernel.
For the implication, see `injective_iff_map_eq_one`. -/
@[to_additive
  "A homomorphism from an additive group to an additive monoid is injective iff its
  kernel is trivial, stated as an iff on the triviality of the kernel. For the implication, see
  `injective_iff_map_eq_zero`."]
theorem _root_.injective_iff_map_eq_one' {G H} [Group G] [MulOneClass H]
    [FunLike F G H] [MonoidHomClass F G H]
    (f : F) : Function.Injective f ↔ ∀ a, f a = 1 ↔ a = 1 
goal: Function.Injective ⇑f ↔ ∀ (a : G), f a = 1 ↔ a = 1

full_name: AddMonoidHom.ofMapAddNeg
code: /-- Makes a group homomorphism from a proof that the map preserves right division
`fun x y => x * y⁻¹`. See also `MonoidHom.of_map_div` for a version using `fun x y => x / y`.
-/
@[to_additive
  "Makes an additive group homomorphism from a proof that the map preserves
  the operation `fun a b => a + -b`. See also `AddMonoidHom.ofMapSub` for a version using
  `fun a b => a - b`."]
def ofMapMulInv {H : Type*} [Group H] (f : G → H)
    (map_div : ∀ a b : G, f (a * b⁻¹) = f a * (f b)⁻¹) : G →* H 
goal: G →+ H

full_name: MonoidHom.ofMapMulInv
code: /-- Makes a group homomorphism from a proof that the map preserves right division
`fun x y => x * y⁻¹`. See also `MonoidHom.of_map_div` for a version using `fun x y => x / y`.
-/
@[to_additive
  "Makes an additive group homomorphism from a proof that the map preserves
  the operation `fun a b => a + -b`. See also `AddMonoidHom.ofMapSub` for a version using
  `fun a b => a - b`."]
def ofMapMulInv {H : Type*} [Group H] (f : G → H)
    (map_div : ∀ a b : G, f (a * b⁻¹) = f a * (f b)⁻¹) : G →* H 
goal: G →* H

full_name: MonoidHom.coe_of_map_mul_inv
code: @[to_additive (attr := simp)]
theorem coe_of_map_mul_inv {H : Type*} [Group H] (f : G → H)
    (map_div : ∀ a b : G, f (a * b⁻¹) = f a * (f b)⁻¹) :
  ↑(ofMapMulInv f map_div) = f 
goal: ⇑(MonoidHom.ofMapMulInv f map_div) = f

full_name: AddMonoidHom.coe_of_map_add_neg
code: @[to_additive (attr := simp)]
theorem coe_of_map_mul_inv {H : Type*} [Group H] (f : G → H)
    (map_div : ∀ a b : G, f (a * b⁻¹) = f a * (f b)⁻¹) :
  ↑(ofMapMulInv f map_div) = f 
goal: ⇑(AddMonoidHom.ofMapAddNeg f map_div) = f

full_name: MonoidHom.ofMapDiv
code: /-- Define a morphism of additive groups given a map which respects ratios. -/
@[to_additive "Define a morphism of additive groups given a map which respects difference."]
def ofMapDiv {H : Type*} [Group H] (f : G → H) (hf : ∀ x y, f (x / y) = f x / f y) : G →* H 
goal: G →* H

full_name: AddMonoidHom.ofMapSub
code: /-- Define a morphism of additive groups given a map which respects ratios. -/
@[to_additive "Define a morphism of additive groups given a map which respects difference."]
def ofMapDiv {H : Type*} [Group H] (f : G → H) (hf : ∀ x y, f (x / y) = f x / f y) : G →* H 
goal: G →+ H

full_name: MonoidHom.coe_of_map_div
code: @[to_additive (attr := simp)]
theorem coe_of_map_div {H : Type*} [Group H] (f : G → H) (hf : ∀ x y, f (x / y) = f x / f y) :
    ↑(ofMapDiv f hf) = f 
goal: ⇑(MonoidHom.ofMapDiv f hf) = f

full_name: AddMonoidHom.coe_of_map_sub
code: @[to_additive (attr := simp)]
theorem coe_of_map_div {H : Type*} [Group H] (f : G → H) (hf : ∀ x y, f (x / y) = f x / f y) :
    ↑(ofMapDiv f hf) = f 
goal: ⇑(AddMonoidHom.ofMapSub f hf) = f

full_name: MonoidHom.mul
code: /-- Given two monoid morphisms `f`, `g` to a commutative monoid, `f * g` is the monoid morphism
sending `x` to `f x * g x`. -/
@[to_additive]
instance mul : Mul (M →* N) 
goal: Mul (M →* N)

full_name: AddMonoidHom.add
code: /-- Given two monoid morphisms `f`, `g` to a commutative monoid, `f * g` is the monoid morphism
sending `x` to `f x * g x`. -/
@[to_additive]
instance mul : Mul (M →* N) 
goal: Add (M →+ N)

full_name: MonoidHom.mul_apply
code: @[to_additive (attr := simp)] lemma mul_apply (f g : M →* N) (x : M) : (f * g) x = f x * g x 
goal: (f * g) x = f x * g x

full_name: AddMonoidHom.add_apply
code: @[to_additive (attr := simp)] lemma mul_apply (f g : M →* N) (x : M) : (f * g) x = f x * g x 
goal: (f + g) x = f x + g x

full_name: MonoidHom.mul_comp
code: @[to_additive]
lemma mul_comp [MulOneClass P] (g₁ g₂ : M →* N) (f : P →* M) :
    (g₁ * g₂).comp f = g₁.comp f * g₂.comp f 
goal: (g₁ * g₂).comp f = g₁.comp f * g₂.comp f

full_name: AddMonoidHom.add_comp
code: @[to_additive]
lemma mul_comp [MulOneClass P] (g₁ g₂ : M →* N) (f : P →* M) :
    (g₁ * g₂).comp f = g₁.comp f * g₂.comp f 
goal: (g₁ + g₂).comp f = g₁.comp f + g₂.comp f

full_name: AddMonoidHom.comp_add
code: @[to_additive]
lemma comp_mul [CommMonoid P] (g : N →* P) (f₁ f₂ : M →* N) :
    g.comp (f₁ * f₂) = g.comp f₁ * g.comp f₂ 
goal: g.comp (f₁ + f₂) = g.comp f₁ + g.comp f₂

full_name: MonoidHom.comp_mul
code: @[to_additive]
lemma comp_mul [CommMonoid P] (g : N →* P) (f₁ f₂ : M →* N) :
    g.comp (f₁ * f₂) = g.comp f₁ * g.comp f₂ 
goal: g.comp (f₁ * f₂) = g.comp f₁ * g.comp f₂

full_name: AddMonoidHom.instNeg
code: /-- If `f` is a monoid homomorphism to a commutative group, then `f⁻¹` is the homomorphism sending
`x` to `(f x)⁻¹`. -/
@[to_additive "If `f` is an additive monoid homomorphism to an additive commutative group,
then `-f` is the homomorphism sending `x` to `-(f x)`."]
instance : Inv (M →* G) 
goal: Neg (M →+ G)

full_name: MonoidHom.instInv
code: /-- If `f` is a monoid homomorphism to a commutative group, then `f⁻¹` is the homomorphism sending
`x` to `(f x)⁻¹`. -/
@[to_additive "If `f` is an additive monoid homomorphism to an additive commutative group,
then `-f` is the homomorphism sending `x` to `-(f x)`."]
instance : Inv (M →* G) 
goal: Inv (M →* G)

full_name: AddMonoidHom.neg_apply
code: @[to_additive (attr := simp)] lemma inv_apply (f : M →* G) (x : M) : f⁻¹ x = (f x)⁻¹ 
goal: (-f) x = -f x

full_name: MonoidHom.inv_apply
code: @[to_additive (attr := simp)] lemma inv_apply (f : M →* G) (x : M) : f⁻¹ x = (f x)⁻¹ 
goal: f⁻¹ x = (f x)⁻¹

full_name: MonoidHom.inv_comp
code: @[to_additive (attr := simp)]
theorem inv_comp (φ : N →* G) (ψ : M →* N) : φ⁻¹.comp ψ = (φ.comp ψ)⁻¹ 
goal: φ⁻¹.comp ψ = (φ.comp ψ)⁻¹

full_name: AddMonoidHom.neg_comp
code: @[to_additive (attr := simp)]
theorem inv_comp (φ : N →* G) (ψ : M →* N) : φ⁻¹.comp ψ = (φ.comp ψ)⁻¹ 
goal: (-φ).comp ψ = -φ.comp ψ

full_name: MonoidHom.comp_inv
code: @[to_additive (attr := simp)]
theorem comp_inv (φ : G →* H) (ψ : M →* G) : φ.comp ψ⁻¹ = (φ.comp ψ)⁻¹ 
goal: φ.comp ψ⁻¹ = (φ.comp ψ)⁻¹

full_name: AddMonoidHom.comp_neg
code: @[to_additive (attr := simp)]
theorem comp_inv (φ : G →* H) (ψ : M →* G) : φ.comp ψ⁻¹ = (φ.comp ψ)⁻¹ 
goal: φ.comp (-ψ) = -φ.comp ψ

full_name: MonoidHom.instDiv
code: /-- If `f` and `g` are monoid homomorphisms to a commutative group, then `f / g` is the homomorphism
sending `x` to `(f x) / (g x)`. -/
@[to_additive "If `f` and `g` are monoid homomorphisms to an additive commutative group,
then `f - g` is the homomorphism sending `x` to `(f x) - (g x)`."]
instance : Div (M →* G) 
goal: Div (M →* G)

full_name: AddMonoidHom.instSub
code: /-- If `f` and `g` are monoid homomorphisms to a commutative group, then `f / g` is the homomorphism
sending `x` to `(f x) / (g x)`. -/
@[to_additive "If `f` and `g` are monoid homomorphisms to an additive commutative group,
then `f - g` is the homomorphism sending `x` to `(f x) - (g x)`."]
instance : Div (M →* G) 
goal: Sub (M →+ G)

full_name: MonoidHom.div_apply
code: @[to_additive (attr := simp)] lemma div_apply (f g : M →* G) (x : M) : (f / g) x = f x / g x 
goal: (f / g) x = f x / g x

full_name: AddMonoidHom.sub_apply
code: @[to_additive (attr := simp)] lemma div_apply (f g : M →* G) (x : M) : (f / g) x = f x / g x 
goal: (f - g) x = f x - g x

full_name: AddMonoidHom.sub_comp
code: @[to_additive (attr := simp)]
lemma div_comp (f g : N →* G) (h : M →* N) : (f / g).comp h = f.comp h / g.comp h 
goal: (f - g).comp h = f.comp h - g.comp h

full_name: MonoidHom.div_comp
code: @[to_additive (attr := simp)]
lemma div_comp (f g : N →* G) (h : M →* N) : (f / g).comp h = f.comp h / g.comp h 
goal: (f / g).comp h = f.comp h / g.comp h

full_name: AddMonoidHom.comp_sub
code: @[to_additive (attr := simp)]
lemma comp_div (f : G →* H) (g h : M →* G) : f.comp (g / h) = f.comp g / f.comp h 
goal: f.comp (g - h) = f.comp g - f.comp h

full_name: MonoidHom.comp_div
code: @[to_additive (attr := simp)]
lemma comp_div (f : G →* H) (g h : M →* G) : f.comp (g / h) = f.comp g / f.comp h 
goal: f.comp (g / h) = f.comp g / f.comp h