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

full_name: IsUnit.eq_on_inv
code: /-- If two homomorphisms from a division monoid to a monoid are equal at a unit `x`, then they are
equal at `x⁻¹`. -/
@[to_additive
  "If two homomorphisms from a subtraction monoid to an additive monoid are equal at an
  additive unit `x`, then they are equal at `-x`."]
theorem IsUnit.eq_on_inv {F G N} [DivisionMonoid G] [Monoid N] [FunLike F G N]
    [MonoidHomClass F G N] {x : G} (hx : IsUnit x) (f g : F) (h : f x = g x) : f x⁻¹ = g x⁻¹ 
goal: f x⁻¹ = g x⁻¹

full_name: IsAddUnit.eq_on_neg
code: /-- If two homomorphisms from a division monoid to a monoid are equal at a unit `x`, then they are
equal at `x⁻¹`. -/
@[to_additive
  "If two homomorphisms from a subtraction monoid to an additive monoid are equal at an
  additive unit `x`, then they are equal at `-x`."]
theorem IsUnit.eq_on_inv {F G N} [DivisionMonoid G] [Monoid N] [FunLike F G N]
    [MonoidHomClass F G N] {x : G} (hx : IsUnit x) (f g : F) (h : f x = g x) : f x⁻¹ = g x⁻¹ 
goal: f (-x) = g (-x)

full_name: eq_on_inv
code: /-- If two homomorphism from a group to a monoid are equal at `x`, then they are equal at `x⁻¹`. -/
@[to_additive
    "If two homomorphism from an additive group to an additive monoid are equal at `x`,
    then they are equal at `-x`."]
theorem eq_on_inv {F G M} [Group G] [Monoid M] [FunLike F G M] [MonoidHomClass F G M]
    (f g : F) {x : G} (h : f x = g x) : f x⁻¹ = g x⁻¹ 
goal: f x⁻¹ = g x⁻¹

full_name: eq_on_neg
code: /-- If two homomorphism from a group to a monoid are equal at `x`, then they are equal at `x⁻¹`. -/
@[to_additive
    "If two homomorphism from an additive group to an additive monoid are equal at `x`,
    then they are equal at `-x`."]
theorem eq_on_inv {F G M} [Group G] [Monoid M] [FunLike F G M] [MonoidHomClass F G M]
    (f g : F) {x : G} (h : f x = g x) : f x⁻¹ = g x⁻¹ 
goal: f (-x) = g (-x)

full_name: Units.map
code: /-- The group homomorphism on units induced by a `MonoidHom`. -/
@[to_additive "The additive homomorphism on `AddUnit`s induced by an `AddMonoidHom`."]
def map (f : M →* N) : Mˣ →* Nˣ 
goal: Mˣ →* Nˣ

full_name: AddUnits.map
code: /-- The group homomorphism on units induced by a `MonoidHom`. -/
@[to_additive "The additive homomorphism on `AddUnit`s induced by an `AddMonoidHom`."]
def map (f : M →* N) : Mˣ →* Nˣ 
goal: AddUnits M →+ AddUnits N

full_name: AddUnits.coe_map
code: @[to_additive (attr := simp)]
theorem coe_map (f : M →* N) (x : Mˣ) : ↑(map f x) = f x 
goal: ↑((AddUnits.map f) x) = f ↑x

full_name: Units.coe_map
code: @[to_additive (attr := simp)]
theorem coe_map (f : M →* N) (x : Mˣ) : ↑(map f x) = f x 
goal: ↑((Units.map f) x) = f ↑x

full_name: AddUnits.coe_map_neg
code: @[to_additive (attr := simp)]
theorem coe_map_inv (f : M →* N) (u : Mˣ) : ↑(map f u)⁻¹ = f ↑u⁻¹ 
goal: ↑(-(AddUnits.map f) u) = f ↑(-u)

full_name: Units.coe_map_inv
code: @[to_additive (attr := simp)]
theorem coe_map_inv (f : M →* N) (u : Mˣ) : ↑(map f u)⁻¹ = f ↑u⁻¹ 
goal: ↑((Units.map f) u)⁻¹ = f ↑u⁻¹

full_name: Units.map_comp
code: @[to_additive (attr := simp)]
theorem map_comp (f : M →* N) (g : N →* P) : map (g.comp f) = (map g).comp (map f) 
goal: Units.map (g.comp f) = (Units.map g).comp (Units.map f)

full_name: AddUnits.map_comp
code: @[to_additive (attr := simp)]
theorem map_comp (f : M →* N) (g : N →* P) : map (g.comp f) = (map g).comp (map f) 
goal: AddUnits.map (g.comp f) = (AddUnits.map g).comp (AddUnits.map f)

full_name: AddUnits.map_injective
code: @[to_additive]
lemma map_injective {f : M →* N} (hf : Function.Injective f) :
    Function.Injective (map f) 
goal: Function.Injective ⇑(AddUnits.map f)

full_name: Units.map_injective
code: @[to_additive]
lemma map_injective {f : M →* N} (hf : Function.Injective f) :
    Function.Injective (map f) 
goal: Function.Injective ⇑(Units.map f)

full_name: Units.map_id
code: @[to_additive (attr := simp)]
theorem map_id : map (MonoidHom.id M) = MonoidHom.id Mˣ 
goal: Units.map (MonoidHom.id M) = MonoidHom.id Mˣ

full_name: AddUnits.map_id
code: @[to_additive (attr := simp)]
theorem map_id : map (MonoidHom.id M) = MonoidHom.id Mˣ 
goal: AddUnits.map (AddMonoidHom.id M) = AddMonoidHom.id (AddUnits M)

full_name: AddUnits.coeHom
code: /-- Coercion `Mˣ → M` as a monoid homomorphism. -/
@[to_additive "Coercion `AddUnits M → M` as an AddMonoid homomorphism."]
def coeHom : Mˣ →* M 
goal: AddUnits M →+ M

full_name: Units.coeHom
code: /-- Coercion `Mˣ → M` as a monoid homomorphism. -/
@[to_additive "Coercion `AddUnits M → M` as an AddMonoid homomorphism."]
def coeHom : Mˣ →* M 
goal: Mˣ →* M

full_name: AddUnits.coeHom_apply
code: @[to_additive (attr := simp)]
theorem coeHom_apply (x : Mˣ) : coeHom M x = ↑x 
goal: (AddUnits.coeHom M) x = ↑x

full_name: Units.coeHom_apply
code: @[to_additive (attr := simp)]
theorem coeHom_apply (x : Mˣ) : coeHom M x = ↑x 
goal: (Units.coeHom M) x = ↑x

full_name: Units.val_zpow_eq_zpow_val
code: @[to_additive (attr := simp, norm_cast)]
theorem val_zpow_eq_zpow_val : ∀ (u : αˣ) (n : ℤ), ((u ^ n : αˣ) : α) = (u : α) ^ n 
goal: ↑(u ^ n) = ↑u ^ n

full_name: AddUnits.val_zsmul_eq_zsmul_val
code: @[to_additive (attr := simp, norm_cast)]
theorem val_zpow_eq_zpow_val : ∀ (u : αˣ) (n : ℤ), ((u ^ n : αˣ) : α) = (u : α) ^ n 
goal: ↑(n • u) = n • ↑u

full_name: map_addUnits_neg
code: @[to_additive (attr := simp)]
theorem _root_.map_units_inv {F : Type*} [FunLike F M α] [MonoidHomClass F M α]
    (f : F) (u : Units M) :
    f ↑u⁻¹ = (f u)⁻¹ 
goal: f ↑(-u) = -f ↑u

full_name: map_units_inv
code: @[to_additive (attr := simp)]
theorem _root_.map_units_inv {F : Type*} [FunLike F M α] [MonoidHomClass F M α]
    (f : F) (u : Units M) :
    f ↑u⁻¹ = (f u)⁻¹ 
goal: f ↑u⁻¹ = (f ↑u)⁻¹

full_name: AddUnits.liftRight
code: /-- If a map `g : M → Nˣ` agrees with a homomorphism `f : M →* N`, then
this map is a monoid homomorphism too. -/
@[to_additive
  "If a map `g : M → AddUnits N` agrees with a homomorphism `f : M →+ N`, then this map
  is an AddMonoid homomorphism too."]
def liftRight (f : M →* N) (g : M → Nˣ) (h : ∀ x, ↑(g x) = f x) : M →* Nˣ 
goal: M →+ AddUnits N

full_name: Units.liftRight
code: /-- If a map `g : M → Nˣ` agrees with a homomorphism `f : M →* N`, then
this map is a monoid homomorphism too. -/
@[to_additive
  "If a map `g : M → AddUnits N` agrees with a homomorphism `f : M →+ N`, then this map
  is an AddMonoid homomorphism too."]
def liftRight (f : M →* N) (g : M → Nˣ) (h : ∀ x, ↑(g x) = f x) : M →* Nˣ 
goal: M →* Nˣ

full_name: Units.coe_liftRight
code: @[to_additive (attr := simp)]
theorem coe_liftRight {f : M →* N} {g : M → Nˣ} (h : ∀ x, ↑(g x) = f x) (x) :
    (liftRight f g h x : N) = f x 
goal: ↑((Units.liftRight f g h) x) = f x

full_name: AddUnits.coe_liftRight
code: @[to_additive (attr := simp)]
theorem coe_liftRight {f : M →* N} {g : M → Nˣ} (h : ∀ x, ↑(g x) = f x) (x) :
    (liftRight f g h x : N) = f x 
goal: ↑((AddUnits.liftRight f g h) x) = f x

full_name: AddUnits.add_liftRight_neg
code: @[to_additive (attr := simp)]
theorem mul_liftRight_inv {f : M →* N} {g : M → Nˣ} (h : ∀ x, ↑(g x) = f x) (x) :
    f x * ↑(liftRight f g h x)⁻¹ = 1 
goal: f x + ↑(-(AddUnits.liftRight f g h) x) = 0

full_name: Units.mul_liftRight_inv
code: @[to_additive (attr := simp)]
theorem mul_liftRight_inv {f : M →* N} {g : M → Nˣ} (h : ∀ x, ↑(g x) = f x) (x) :
    f x * ↑(liftRight f g h x)⁻¹ = 1 
goal: f x * ↑((Units.liftRight f g h) x)⁻¹ = 1

full_name: Units.liftRight_inv_mul
code: @[to_additive (attr := simp)]
theorem liftRight_inv_mul {f : M →* N} {g : M → Nˣ} (h : ∀ x, ↑(g x) = f x) (x) :
    ↑(liftRight f g h x)⁻¹ * f x = 1 
goal: ↑((Units.liftRight f g h) x)⁻¹ * f x = 1

full_name: AddUnits.liftRight_neg_add
code: @[to_additive (attr := simp)]
theorem liftRight_inv_mul {f : M →* N} {g : M → Nˣ} (h : ∀ x, ↑(g x) = f x) (x) :
    ↑(liftRight f g h x)⁻¹ * f x = 1 
goal: ↑(-(AddUnits.liftRight f g h) x) + f x = 0

full_name: MonoidHom.toHomUnits
code: /-- If `f` is a homomorphism from a group `G` to a monoid `M`,
then its image lies in the units of `M`,
and `f.toHomUnits` is the corresponding monoid homomorphism from `G` to `Mˣ`. -/
@[to_additive
  "If `f` is a homomorphism from an additive group `G` to an additive monoid `M`,
  then its image lies in the `AddUnits` of `M`,
  and `f.toHomUnits` is the corresponding homomorphism from `G` to `AddUnits M`."]
def toHomUnits {G M : Type*} [Group G] [Monoid M] (f : G →* M) : G →* Mˣ 
goal: G →* Mˣ

full_name: AddMonoidHom.toHomAddUnits
code: /-- If `f` is a homomorphism from a group `G` to a monoid `M`,
then its image lies in the units of `M`,
and `f.toHomUnits` is the corresponding monoid homomorphism from `G` to `Mˣ`. -/
@[to_additive
  "If `f` is a homomorphism from an additive group `G` to an additive monoid `M`,
  then its image lies in the `AddUnits` of `M`,
  and `f.toHomUnits` is the corresponding homomorphism from `G` to `AddUnits M`."]
def toHomUnits {G M : Type*} [Group G] [Monoid M] (f : G →* M) : G →* Mˣ 
goal: G →+ AddUnits M

full_name: MonoidHom.coe_toHomUnits
code: @[to_additive (attr := simp)]
theorem coe_toHomUnits {G M : Type*} [Group G] [Monoid M] (f : G →* M) (g : G) :
    (f.toHomUnits g : M) = f g 
goal: ↑(f.toHomUnits g) = f g

full_name: AddMonoidHom.coe_toHomAddUnits
code: @[to_additive (attr := simp)]
theorem coe_toHomUnits {G M : Type*} [Group G] [Monoid M] (f : G →* M) (g : G) :
    (f.toHomUnits g : M) = f g 
goal: ↑(f.toHomAddUnits g) = f g

full_name: IsAddUnit.map
code: @[to_additive]
theorem map [MonoidHomClass F M N] (f : F) {x : M} (h : IsUnit x) : IsUnit (f x) 
goal: IsAddUnit (f x)

full_name: IsUnit.map
code: @[to_additive]
theorem map [MonoidHomClass F M N] (f : F) {x : M} (h : IsUnit x) : IsUnit (f x) 
goal: IsUnit (f x)

full_name: IsAddUnit.of_leftInverse
code: @[to_additive]
theorem of_leftInverse [MonoidHomClass G N M] {f : F} {x : M} (g : G)
    (hfg : Function.LeftInverse g f) (h : IsUnit (f x)) : IsUnit x 
goal: IsAddUnit x

full_name: IsUnit.of_leftInverse
code: @[to_additive]
theorem of_leftInverse [MonoidHomClass G N M] {f : F} {x : M} (g : G)
    (hfg : Function.LeftInverse g f) (h : IsUnit (f x)) : IsUnit x 
goal: IsUnit x

full_name: isUnit_map_of_leftInverse
code: @[to_additive]
theorem _root_.isUnit_map_of_leftInverse [MonoidHomClass F M N] [MonoidHomClass G N M]
    {f : F} {x : M} (g : G) (hfg : Function.LeftInverse g f) :
    IsUnit (f x) ↔ IsUnit x 
goal: IsUnit (f x) ↔ IsUnit x

full_name: isAddUnit_map_of_leftInverse
code: @[to_additive]
theorem _root_.isUnit_map_of_leftInverse [MonoidHomClass F M N] [MonoidHomClass G N M]
    {f : F} {x : M} (g : G) (hfg : Function.LeftInverse g f) :
    IsUnit (f x) ↔ IsUnit x 
goal: IsAddUnit (f x) ↔ IsAddUnit x

full_name: IsUnit.liftRight
code: /-- If a homomorphism `f : M →* N` sends each element to an `IsUnit`, then it can be lifted
to `f : M →* Nˣ`. See also `Units.liftRight` for a computable version. -/
@[to_additive
  "If a homomorphism `f : M →+ N` sends each element to an `IsAddUnit`, then it can be
  lifted to `f : M →+ AddUnits N`. See also `AddUnits.liftRight` for a computable version."]
noncomputable def liftRight (f : M →* N) (hf : ∀ x, IsUnit (f x)) : M →* Nˣ 
goal: M →* Nˣ

full_name: IsAddUnit.liftRight
code: /-- If a homomorphism `f : M →* N` sends each element to an `IsUnit`, then it can be lifted
to `f : M →* Nˣ`. See also `Units.liftRight` for a computable version. -/
@[to_additive
  "If a homomorphism `f : M →+ N` sends each element to an `IsAddUnit`, then it can be
  lifted to `f : M →+ AddUnits N`. See also `AddUnits.liftRight` for a computable version."]
noncomputable def liftRight (f : M →* N) (hf : ∀ x, IsUnit (f x)) : M →* Nˣ 
goal: M →+ AddUnits N

full_name: IsAddUnit.coe_liftRight
code: @[to_additive]
theorem coe_liftRight (f : M →* N) (hf : ∀ x, IsUnit (f x)) (x) :
    (IsUnit.liftRight f hf x : N) = f x 
goal: ↑((IsAddUnit.liftRight f hf) x) = f x

full_name: IsUnit.coe_liftRight
code: @[to_additive]
theorem coe_liftRight (f : M →* N) (hf : ∀ x, IsUnit (f x)) (x) :
    (IsUnit.liftRight f hf x : N) = f x 
goal: ↑((IsUnit.liftRight f hf) x) = f x

full_name: IsUnit.mul_liftRight_inv
code: @[to_additive (attr := simp)]
theorem mul_liftRight_inv (f : M →* N) (h : ∀ x, IsUnit (f x)) (x) :
    f x * ↑(IsUnit.liftRight f h x)⁻¹ = 1 
goal: f x * ↑((IsUnit.liftRight f h) x)⁻¹ = 1

full_name: IsAddUnit.add_liftRight_neg
code: @[to_additive (attr := simp)]
theorem mul_liftRight_inv (f : M →* N) (h : ∀ x, IsUnit (f x)) (x) :
    f x * ↑(IsUnit.liftRight f h x)⁻¹ = 1 
goal: f x + ↑(-(IsAddUnit.liftRight f h) x) = 0

full_name: IsUnit.liftRight_inv_mul
code: @[to_additive (attr := simp)]
theorem liftRight_inv_mul (f : M →* N) (h : ∀ x, IsUnit (f x)) (x) :
    ↑(IsUnit.liftRight f h x)⁻¹ * f x = 1 
goal: ↑((IsUnit.liftRight f h) x)⁻¹ * f x = 1

full_name: IsAddUnit.liftRight_neg_add
code: @[to_additive (attr := simp)]
theorem liftRight_inv_mul (f : M →* N) (h : ∀ x, IsUnit (f x)) (x) :
    ↑(IsUnit.liftRight f h x)⁻¹ * f x = 1 
goal: ↑(-(IsAddUnit.liftRight f h) x) + f x = 0