File: Mathlib/Algebra/Group/Units.lean

full_name: Units.val_inv
code: /-- Units of a `Monoid`, bundled version. Notation: `αˣ`.

An element of a `Monoid` is a unit if it has a two-sided inverse.
This version bundles the inverse element so that it can be computed.
For a predicate see `IsUnit`. -/
structure Units (α : Type u) [Monoid α] where
  /-- The underlying value in the base `Monoid`. -/
  val : α
  /-- The inverse value of `val` in the base `Monoid`. -/
  inv : α
  /-- `inv` is the right inverse of `val` in the base `Monoid`. -/
  val_inv : val * inv = 1
  /-- `inv` is the left inverse of `val` in the base `Monoid`. -/
  inv_val : inv * val = 1
goal: ↑self * self.inv = 1

full_name: Units
code: /-- Units of a `Monoid`, bundled version. Notation: `αˣ`.

An element of a `Monoid` is a unit if it has a two-sided inverse.
This version bundles the inverse element so that it can be computed.
For a predicate see `IsUnit`. -/
structure Units (α : Type u) [Monoid α] where
  /-- The underlying value in the base `Monoid`. -/
  val : α
  /-- The inverse value of `val` in the base `Monoid`. -/
  inv : α
  /-- `inv` is the right inverse of `val` in the base `Monoid`. -/
  val_inv : val * inv = 1
  /-- `inv` is the left inverse of `val` in the base `Monoid`. -/
  inv_val : inv * val = 1
goal: Type u

full_name: Units.inv_val
code: /-- Units of a `Monoid`, bundled version. Notation: `αˣ`.

An element of a `Monoid` is a unit if it has a two-sided inverse.
This version bundles the inverse element so that it can be computed.
For a predicate see `IsUnit`. -/
structure Units (α : Type u) [Monoid α] where
  /-- The underlying value in the base `Monoid`. -/
  val : α
  /-- The inverse value of `val` in the base `Monoid`. -/
  inv : α
  /-- `inv` is the right inverse of `val` in the base `Monoid`. -/
  val_inv : val * inv = 1
  /-- `inv` is the left inverse of `val` in the base `Monoid`. -/
  inv_val : inv * val = 1
goal: self.inv * ↑self = 1

full_name: Units.val
code: /-- Units of a `Monoid`, bundled version. Notation: `αˣ`.

An element of a `Monoid` is a unit if it has a two-sided inverse.
This version bundles the inverse element so that it can be computed.
For a predicate see `IsUnit`. -/
structure Units (α : Type u) [Monoid α] where
  /-- The underlying value in the base `Monoid`. -/
  val : α
  /-- The inverse value of `val` in the base `Monoid`. -/
  inv : α
  /-- `inv` is the right inverse of `val` in the base `Monoid`. -/
  val_inv : val * inv = 1
  /-- `inv` is the left inverse of `val` in the base `Monoid`. -/
  inv_val : inv * val = 1
goal: α

full_name: Units.inv
code: /-- Units of a `Monoid`, bundled version. Notation: `αˣ`.

An element of a `Monoid` is a unit if it has a two-sided inverse.
This version bundles the inverse element so that it can be computed.
For a predicate see `IsUnit`. -/
structure Units (α : Type u) [Monoid α] where
  /-- The underlying value in the base `Monoid`. -/
  val : α
  /-- The inverse value of `val` in the base `Monoid`. -/
  inv : α
  /-- `inv` is the right inverse of `val` in the base `Monoid`. -/
  val_inv : val * inv = 1
  /-- `inv` is the left inverse of `val` in the base `Monoid`. -/
  inv_val : inv * val = 1
goal: α

full_name: «_aux_Mathlib_Algebra_Group_Units___macroRules_term_ˣ_1»
code: @[inherit_doc]
postfix:1024 "ˣ" => Units
goal: Lean.Macro

full_name: _aux_Mathlib_Algebra_Group_Units___unexpand_Units_1
code: @[inherit_doc]
postfix:1024 "ˣ" => Units
goal: Lean.PrettyPrinter.Unexpander

full_name: AddUnits
code: /-- Units of an `AddMonoid`, bundled version.

An element of an `AddMonoid` is a unit if it has a two-sided additive inverse.
This version bundles the inverse element so that it can be computed.
For a predicate see `isAddUnit`. -/
structure AddUnits (α : Type u) [AddMonoid α] where
  /-- The underlying value in the base `AddMonoid`. -/
  val : α
  /-- The additive inverse value of `val` in the base `AddMonoid`. -/
  neg : α
  /-- `neg` is the right additive inverse of `val` in the base `AddMonoid`. -/
  val_neg : val + neg = 0
  /-- `neg` is the left additive inverse of `val` in the base `AddMonoid`. -/
  neg_val : neg + val = 0
goal: Type u

full_name: AddUnits.val_neg
code: /-- Units of an `AddMonoid`, bundled version.

An element of an `AddMonoid` is a unit if it has a two-sided additive inverse.
This version bundles the inverse element so that it can be computed.
For a predicate see `isAddUnit`. -/
structure AddUnits (α : Type u) [AddMonoid α] where
  /-- The underlying value in the base `AddMonoid`. -/
  val : α
  /-- The additive inverse value of `val` in the base `AddMonoid`. -/
  neg : α
  /-- `neg` is the right additive inverse of `val` in the base `AddMonoid`. -/
  val_neg : val + neg = 0
  /-- `neg` is the left additive inverse of `val` in the base `AddMonoid`. -/
  neg_val : neg + val = 0
goal: ↑self + self.neg = 0

full_name: AddUnits.neg_val
code: /-- Units of an `AddMonoid`, bundled version.

An element of an `AddMonoid` is a unit if it has a two-sided additive inverse.
This version bundles the inverse element so that it can be computed.
For a predicate see `isAddUnit`. -/
structure AddUnits (α : Type u) [AddMonoid α] where
  /-- The underlying value in the base `AddMonoid`. -/
  val : α
  /-- The additive inverse value of `val` in the base `AddMonoid`. -/
  neg : α
  /-- `neg` is the right additive inverse of `val` in the base `AddMonoid`. -/
  val_neg : val + neg = 0
  /-- `neg` is the left additive inverse of `val` in the base `AddMonoid`. -/
  neg_val : neg + val = 0
goal: self.neg + ↑self = 0

full_name: AddUnits.val
code: /-- Units of an `AddMonoid`, bundled version.

An element of an `AddMonoid` is a unit if it has a two-sided additive inverse.
This version bundles the inverse element so that it can be computed.
For a predicate see `isAddUnit`. -/
structure AddUnits (α : Type u) [AddMonoid α] where
  /-- The underlying value in the base `AddMonoid`. -/
  val : α
  /-- The additive inverse value of `val` in the base `AddMonoid`. -/
  neg : α
  /-- `neg` is the right additive inverse of `val` in the base `AddMonoid`. -/
  val_neg : val + neg = 0
  /-- `neg` is the left additive inverse of `val` in the base `AddMonoid`. -/
  neg_val : neg + val = 0
goal: α

full_name: AddUnits.neg
code: /-- Units of an `AddMonoid`, bundled version.

An element of an `AddMonoid` is a unit if it has a two-sided additive inverse.
This version bundles the inverse element so that it can be computed.
For a predicate see `isAddUnit`. -/
structure AddUnits (α : Type u) [AddMonoid α] where
  /-- The underlying value in the base `AddMonoid`. -/
  val : α
  /-- The additive inverse value of `val` in the base `AddMonoid`. -/
  neg : α
  /-- `neg` is the right additive inverse of `val` in the base `AddMonoid`. -/
  val_neg : val + neg = 0
  /-- `neg` is the left additive inverse of `val` in the base `AddMonoid`. -/
  neg_val : neg + val = 0
goal: α

full_name: unique_zero
code: @[to_additive]
theorem unique_one {α : Type*} [Unique α] [One α] : default = (1 : α) 
goal: default = 0

full_name: unique_one
code: @[to_additive]
theorem unique_one {α : Type*} [Unique α] [One α] : default = (1 : α) 
goal: default = 1

full_name: Units.instCoeHead
code: /-- A unit can be interpreted as a term in the base `Monoid`. -/
@[to_additive "An additive unit can be interpreted as a term in the base `AddMonoid`."]
instance : CoeHead αˣ α 
goal: CoeHead αˣ α

full_name: AddUnits.instCoeHead
code: /-- A unit can be interpreted as a term in the base `Monoid`. -/
@[to_additive "An additive unit can be interpreted as a term in the base `AddMonoid`."]
instance : CoeHead αˣ α 
goal: CoeHead (AddUnits α) α

full_name: AddUnits.instNeg
code: /-- The inverse of a unit in a `Monoid`. -/
@[to_additive "The additive inverse of an additive unit in an `AddMonoid`."]
instance instInv : Inv αˣ 
goal: Neg (AddUnits α)

full_name: Units.instInv
code: /-- The inverse of a unit in a `Monoid`. -/
@[to_additive "The additive inverse of an additive unit in an `AddMonoid`."]
instance instInv : Inv αˣ 
goal: Inv αˣ

full_name: AddUnits.Simps.val_neg
code: /-- See Note [custom simps projection] -/
@[to_additive "See Note [custom simps projection]"]
def Simps.val_inv (u : αˣ) : α 
goal: α

full_name: Units.Simps.val_inv
code: /-- See Note [custom simps projection] -/
@[to_additive "See Note [custom simps projection]"]
def Simps.val_inv (u : αˣ) : α 
goal: α

full_name: Units.val_mk
code: @[to_additive]
theorem val_mk (a : α) (b h₁ h₂) : ↑(Units.mk a b h₁ h₂) = a 
goal: ↑{ val := a, inv := b, val_inv := h₁, inv_val := h₂ } = a

full_name: AddUnits.val_mk
code: @[to_additive]
theorem val_mk (a : α) (b h₁ h₂) : ↑(Units.mk a b h₁ h₂) = a 
goal: ↑{ val := a, neg := b, val_neg := h₁, neg_val := h₂ } = a

full_name: Units.ext
code: @[to_additive (attr := ext)]
theorem ext : Function.Injective (val : αˣ → α)
  
goal: Function.Injective Units.val

full_name: AddUnits.ext
code: @[to_additive (attr := ext)]
theorem ext : Function.Injective (val : αˣ → α)
  
goal: Function.Injective AddUnits.val

full_name: AddUnits.eq_iff
code: @[to_additive (attr := norm_cast)]
theorem eq_iff {a b : αˣ} : (a : α) = b ↔ a = b 
goal: ↑a = ↑b ↔ a = b

full_name: Units.eq_iff
code: @[to_additive (attr := norm_cast)]
theorem eq_iff {a b : αˣ} : (a : α) = b ↔ a = b 
goal: ↑a = ↑b ↔ a = b

full_name: AddUnits.ext_iff
code: @[to_additive]
protected theorem ext_iff {a b : αˣ} : a = b ↔ (a : α) = b 
goal: a = b ↔ ↑a = ↑b

full_name: Units.ext_iff
code: @[to_additive]
protected theorem ext_iff {a b : αˣ} : a = b ↔ (a : α) = b 
goal: a = b ↔ ↑a = ↑b

full_name: AddUnits.instDecidableEq
code: /-- Units have decidable equality if the base `Monoid` has decidable equality. -/
@[to_additive "Additive units have decidable equality
if the base `AddMonoid` has deciable equality."]
instance [DecidableEq α] : DecidableEq αˣ 
goal: DecidableEq (AddUnits α)

full_name: Units.instDecidableEq
code: /-- Units have decidable equality if the base `Monoid` has decidable equality. -/
@[to_additive "Additive units have decidable equality
if the base `AddMonoid` has deciable equality."]
instance [DecidableEq α] : DecidableEq αˣ 
goal: DecidableEq αˣ

full_name: Units.mk_val
code: @[to_additive (attr := simp)]
theorem mk_val (u : αˣ) (y h₁ h₂) : mk (u : α) y h₁ h₂ = u 
goal: { val := ↑u, inv := y, val_inv := h₁, inv_val := h₂ } = u

full_name: AddUnits.mk_val
code: @[to_additive (attr := simp)]
theorem mk_val (u : αˣ) (y h₁ h₂) : mk (u : α) y h₁ h₂ = u 
goal: { val := ↑u, neg := y, val_neg := h₁, neg_val := h₂ } = u

full_name: Units.val_inv_copy
code: /-- Copy a unit, adjusting definition equalities. -/
@[to_additive (attr := simps) "Copy an `AddUnit`, adjusting definitional equalities."]
def copy (u : αˣ) (val : α) (hv : val = u) (inv : α) (hi : inv = ↑u⁻¹) : αˣ 
goal: ↑(u.copy val hv inv hi)⁻¹ = inv

full_name: Units.val_copy
code: /-- Copy a unit, adjusting definition equalities. -/
@[to_additive (attr := simps) "Copy an `AddUnit`, adjusting definitional equalities."]
def copy (u : αˣ) (val : α) (hv : val = u) (inv : α) (hi : inv = ↑u⁻¹) : αˣ 
goal: ↑(u.copy val hv inv hi) = val

full_name: AddUnits.val_neg_copy
code: /-- Copy a unit, adjusting definition equalities. -/
@[to_additive (attr := simps) "Copy an `AddUnit`, adjusting definitional equalities."]
def copy (u : αˣ) (val : α) (hv : val = u) (inv : α) (hi : inv = ↑u⁻¹) : αˣ 
goal: ↑(-u.copy val hv inv hi) = inv

full_name: AddUnits.val_copy
code: /-- Copy a unit, adjusting definition equalities. -/
@[to_additive (attr := simps) "Copy an `AddUnit`, adjusting definitional equalities."]
def copy (u : αˣ) (val : α) (hv : val = u) (inv : α) (hi : inv = ↑u⁻¹) : αˣ 
goal: ↑(u.copy val hv inv hi) = val

full_name: Units.copy
code: /-- Copy a unit, adjusting definition equalities. -/
@[to_additive (attr := simps) "Copy an `AddUnit`, adjusting definitional equalities."]
def copy (u : αˣ) (val : α) (hv : val = u) (inv : α) (hi : inv = ↑u⁻¹) : αˣ 
goal: αˣ

full_name: AddUnits.copy
code: /-- Copy a unit, adjusting definition equalities. -/
@[to_additive (attr := simps) "Copy an `AddUnit`, adjusting definitional equalities."]
def copy (u : αˣ) (val : α) (hv : val = u) (inv : α) (hi : inv = ↑u⁻¹) : αˣ 
goal: AddUnits α

full_name: AddUnits.copy_eq
code: @[to_additive]
theorem copy_eq (u : αˣ) (val hv inv hi) : u.copy val hv inv hi = u 
goal: u.copy val hv inv hi = u

full_name: Units.copy_eq
code: @[to_additive]
theorem copy_eq (u : αˣ) (val hv inv hi) : u.copy val hv inv hi = u 
goal: u.copy val hv inv hi = u

full_name: Units.instMul
code: /-- Units of a monoid have an induced multiplication. -/
@[to_additive "Additive units of an additive monoid have an induced addition."]
instance : Mul αˣ 
goal: Mul αˣ

full_name: AddUnits.instAdd
code: /-- Units of a monoid have an induced multiplication. -/
@[to_additive "Additive units of an additive monoid have an induced addition."]
instance : Mul αˣ 
goal: Add (AddUnits α)

full_name: AddUnits.instZero
code: /-- Units of a monoid have a unit -/
@[to_additive "Additive units of an additive monoid have a zero."]
instance : One αˣ 
goal: Zero (AddUnits α)

full_name: Units.instOne
code: /-- Units of a monoid have a unit -/
@[to_additive "Additive units of an additive monoid have a zero."]
instance : One αˣ 
goal: One αˣ

full_name: AddUnits.instAddZeroClass
code: /-- Units of a monoid have a multiplication and multiplicative identity. -/
@[to_additive "Additive units of an additive monoid have an addition and an additive identity."]
instance instMulOneClass : MulOneClass αˣ 
goal: AddZeroClass (AddUnits α)

full_name: Units.instMulOneClass
code: /-- Units of a monoid have a multiplication and multiplicative identity. -/
@[to_additive "Additive units of an additive monoid have an addition and an additive identity."]
instance instMulOneClass : MulOneClass αˣ 
goal: MulOneClass αˣ

full_name: Units.instInhabited
code: /-- Units of a monoid are inhabited because `1` is a unit. -/
@[to_additive "Additive units of an additive monoid are inhabited because `0` is an additive unit."]
instance : Inhabited αˣ 
goal: Inhabited αˣ

full_name: AddUnits.instInhabited
code: /-- Units of a monoid are inhabited because `1` is a unit. -/
@[to_additive "Additive units of an additive monoid are inhabited because `0` is an additive unit."]
instance : Inhabited αˣ 
goal: Inhabited (AddUnits α)

full_name: Units.instRepr
code: /-- Units of a monoid have a representation of the base value in the `Monoid`. -/
@[to_additive "Additive units of an additive monoid have a representation of the base value in
the `AddMonoid`."]
instance [Repr α] : Repr αˣ 
goal: Repr αˣ

full_name: AddUnits.instRepr
code: /-- Units of a monoid have a representation of the base value in the `Monoid`. -/
@[to_additive "Additive units of an additive monoid have a representation of the base value in
the `AddMonoid`."]
instance [Repr α] : Repr αˣ 
goal: Repr (AddUnits α)

full_name: Units.val_mul
code: @[to_additive (attr := simp, norm_cast)]
theorem val_mul : (↑(a * b) : α) = a * b 
goal: ↑(a * b) = ↑a * ↑b

full_name: AddUnits.val_add
code: @[to_additive (attr := simp, norm_cast)]
theorem val_mul : (↑(a * b) : α) = a * b 
goal: ↑(a + b) = ↑a + ↑b

full_name: AddUnits.val_zero
code: @[to_additive (attr := simp, norm_cast)]
theorem val_one : ((1 : αˣ) : α) = 1 
goal: ↑0 = 0

full_name: Units.val_one
code: @[to_additive (attr := simp, norm_cast)]
theorem val_one : ((1 : αˣ) : α) = 1 
goal: ↑1 = 1

full_name: AddUnits.val_eq_zero
code: @[to_additive (attr := simp, norm_cast)]
theorem val_eq_one {a : αˣ} : (a : α) = 1 ↔ a = 1 
goal: ↑a = 0 ↔ a = 0

full_name: Units.val_eq_one
code: @[to_additive (attr := simp, norm_cast)]
theorem val_eq_one {a : αˣ} : (a : α) = 1 ↔ a = 1 
goal: ↑a = 1 ↔ a = 1

full_name: AddUnits.neg_mk
code: @[to_additive (attr := simp)]
theorem inv_mk (x y : α) (h₁ h₂) : (mk x y h₁ h₂)⁻¹ = mk y x h₂ h₁ 
goal: -{ val := x, neg := y, val_neg := h₁, neg_val := h₂ } = { val := y, neg := x, val_neg := h₂, neg_val := h₁ }

full_name: Units.inv_mk
code: @[to_additive (attr := simp)]
theorem inv_mk (x y : α) (h₁ h₂) : (mk x y h₁ h₂)⁻¹ = mk y x h₂ h₁ 
goal: { val := x, inv := y, val_inv := h₁, inv_val := h₂ }⁻¹ = { val := y, inv := x, val_inv := h₂, inv_val := h₁ }

full_name: Units.inv_eq_val_inv
code: @[to_additive (attr := simp)]
theorem inv_eq_val_inv : a.inv = ((a⁻¹ : αˣ) : α) 
goal: a.inv = ↑a⁻¹

full_name: AddUnits.neg_eq_val_neg
code: @[to_additive (attr := simp)]
theorem inv_eq_val_inv : a.inv = ((a⁻¹ : αˣ) : α) 
goal: a.neg = ↑(-a)

full_name: Units.inv_mul
code: @[to_additive (attr := simp)]
theorem inv_mul : (↑a⁻¹ * a : α) = 1 
goal: ↑a⁻¹ * ↑a = 1

full_name: AddUnits.neg_add
code: @[to_additive (attr := simp)]
theorem inv_mul : (↑a⁻¹ * a : α) = 1 
goal: ↑(-a) + ↑a = 0

full_name: Units.mul_inv
code: @[to_additive (attr := simp)]
theorem mul_inv : (a * ↑a⁻¹ : α) = 1 
goal: ↑a * ↑a⁻¹ = 1

full_name: AddUnits.add_neg
code: @[to_additive (attr := simp)]
theorem mul_inv : (a * ↑a⁻¹ : α) = 1 
goal: ↑a + ↑(-a) = 0

full_name: Units.commute_coe_inv
code: @[to_additive] lemma commute_coe_inv : Commute (a : α) ↑a⁻¹ 
goal: Commute ↑a ↑a⁻¹

full_name: AddUnits.addCommute_coe_neg
code: @[to_additive] lemma commute_coe_inv : Commute (a : α) ↑a⁻¹ 
goal: AddCommute ↑a ↑(-a)

full_name: Units.commute_inv_coe
code: @[to_additive] lemma commute_inv_coe : Commute ↑a⁻¹ (a : α) 
goal: Commute ↑a⁻¹ ↑a

full_name: AddUnits.addCommute_neg_coe
code: @[to_additive] lemma commute_inv_coe : Commute ↑a⁻¹ (a : α) 
goal: AddCommute ↑(-a) ↑a

full_name: AddUnits.neg_add_of_eq
code: @[to_additive]
theorem inv_mul_of_eq {a : α} (h : ↑u = a) : ↑u⁻¹ * a = 1 
goal: ↑(-u) + a = 0

full_name: Units.inv_mul_of_eq
code: @[to_additive]
theorem inv_mul_of_eq {a : α} (h : ↑u = a) : ↑u⁻¹ * a = 1 
goal: ↑u⁻¹ * a = 1

full_name: Units.mul_inv_of_eq
code: @[to_additive]
theorem mul_inv_of_eq {a : α} (h : ↑u = a) : a * ↑u⁻¹ = 1 
goal: a * ↑u⁻¹ = 1

full_name: AddUnits.add_neg_of_eq
code: @[to_additive]
theorem mul_inv_of_eq {a : α} (h : ↑u = a) : a * ↑u⁻¹ = 1 
goal: a + ↑(-u) = 0

full_name: AddUnits.add_neg_cancel_left
code: @[to_additive (attr := simp)]
theorem mul_inv_cancel_left (a : αˣ) (b : α) : (a : α) * (↑a⁻¹ * b) = b 
goal: ↑a + (↑(-a) + b) = b

full_name: Units.mul_inv_cancel_left
code: @[to_additive (attr := simp)]
theorem mul_inv_cancel_left (a : αˣ) (b : α) : (a : α) * (↑a⁻¹ * b) = b 
goal: ↑a * (↑a⁻¹ * b) = b

full_name: AddUnits.neg_add_cancel_left
code: @[to_additive (attr := simp)]
theorem inv_mul_cancel_left (a : αˣ) (b : α) : (↑a⁻¹ : α) * (a * b) = b 
goal: ↑(-a) + (↑a + b) = b

full_name: Units.inv_mul_cancel_left
code: @[to_additive (attr := simp)]
theorem inv_mul_cancel_left (a : αˣ) (b : α) : (↑a⁻¹ : α) * (a * b) = b 
goal: ↑a⁻¹ * (↑a * b) = b

full_name: Units.mul_inv_cancel_right
code: @[to_additive (attr := simp)]
theorem mul_inv_cancel_right (a : α) (b : αˣ) : a * b * ↑b⁻¹ = a 
goal: a * ↑b * ↑b⁻¹ = a

full_name: AddUnits.add_neg_cancel_right
code: @[to_additive (attr := simp)]
theorem mul_inv_cancel_right (a : α) (b : αˣ) : a * b * ↑b⁻¹ = a 
goal: a + ↑b + ↑(-b) = a

full_name: Units.inv_mul_cancel_right
code: @[to_additive (attr := simp)]
theorem inv_mul_cancel_right (a : α) (b : αˣ) : a * ↑b⁻¹ * b = a 
goal: a * ↑b⁻¹ * ↑b = a

full_name: AddUnits.neg_add_cancel_right
code: @[to_additive (attr := simp)]
theorem inv_mul_cancel_right (a : α) (b : αˣ) : a * ↑b⁻¹ * b = a 
goal: a + ↑(-b) + ↑b = a

full_name: Units.mul_right_inj
code: @[to_additive (attr := simp)]
theorem mul_right_inj (a : αˣ) {b c : α} : (a : α) * b = a * c ↔ b = c 
goal: ↑a * b = ↑a * c ↔ b = c

full_name: AddUnits.add_right_inj
code: @[to_additive (attr := simp)]
theorem mul_right_inj (a : αˣ) {b c : α} : (a : α) * b = a * c ↔ b = c 
goal: ↑a + b = ↑a + c ↔ b = c

full_name: Units.mul_left_inj
code: @[to_additive (attr := simp)]
theorem mul_left_inj (a : αˣ) {b c : α} : b * a = c * a ↔ b = c 
goal: b * ↑a = c * ↑a ↔ b = c

full_name: AddUnits.add_left_inj
code: @[to_additive (attr := simp)]
theorem mul_left_inj (a : αˣ) {b c : α} : b * a = c * a ↔ b = c 
goal: b + ↑a = c + ↑a ↔ b = c

full_name: Units.eq_mul_inv_iff_mul_eq
code: @[to_additive]
theorem eq_mul_inv_iff_mul_eq {a b : α} : a = b * ↑c⁻¹ ↔ a * c = b 
goal: a = b * ↑c⁻¹ ↔ a * ↑c = b

full_name: AddUnits.eq_add_neg_iff_add_eq
code: @[to_additive]
theorem eq_mul_inv_iff_mul_eq {a b : α} : a = b * ↑c⁻¹ ↔ a * c = b 
goal: a = b + ↑(-c) ↔ a + ↑c = b

full_name: Units.eq_inv_mul_iff_mul_eq
code: @[to_additive]
theorem eq_inv_mul_iff_mul_eq {a c : α} : a = ↑b⁻¹ * c ↔ ↑b * a = c 
goal: a = ↑b⁻¹ * c ↔ ↑b * a = c

full_name: AddUnits.eq_neg_add_iff_add_eq
code: @[to_additive]
theorem eq_inv_mul_iff_mul_eq {a c : α} : a = ↑b⁻¹ * c ↔ ↑b * a = c 
goal: a = ↑(-b) + c ↔ ↑b + a = c

full_name: Units.inv_mul_eq_iff_eq_mul
code: @[to_additive]
theorem inv_mul_eq_iff_eq_mul {b c : α} : ↑a⁻¹ * b = c ↔ b = a * c 
goal: ↑a⁻¹ * b = c ↔ b = ↑a * c

full_name: AddUnits.neg_add_eq_iff_eq_add
code: @[to_additive]
theorem inv_mul_eq_iff_eq_mul {b c : α} : ↑a⁻¹ * b = c ↔ b = a * c 
goal: ↑(-a) + b = c ↔ b = ↑a + c

full_name: Units.mul_inv_eq_iff_eq_mul
code: @[to_additive]
theorem mul_inv_eq_iff_eq_mul {a c : α} : a * ↑b⁻¹ = c ↔ a = c * b 
goal: a * ↑b⁻¹ = c ↔ a = c * ↑b

full_name: AddUnits.add_neg_eq_iff_eq_add
code: @[to_additive]
theorem mul_inv_eq_iff_eq_mul {a c : α} : a * ↑b⁻¹ = c ↔ a = c * b 
goal: a + ↑(-b) = c ↔ a = c + ↑b

full_name: AddUnits.neg_eq_of_add_eq_zero_left
code: @[to_additive]
protected theorem inv_eq_of_mul_eq_one_left {a : α} (h : a * u = 1) : ↑u⁻¹ = a 
goal: ↑(-u) = a

full_name: Units.inv_eq_of_mul_eq_one_left
code: @[to_additive]
protected theorem inv_eq_of_mul_eq_one_left {a : α} (h : a * u = 1) : ↑u⁻¹ = a 
goal: ↑u⁻¹ = a

full_name: AddUnits.neg_eq_of_add_eq_zero_right
code: @[to_additive]
protected theorem inv_eq_of_mul_eq_one_right {a : α} (h : ↑u * a = 1) : ↑u⁻¹ = a 
goal: ↑(-u) = a

full_name: Units.inv_eq_of_mul_eq_one_right
code: @[to_additive]
protected theorem inv_eq_of_mul_eq_one_right {a : α} (h : ↑u * a = 1) : ↑u⁻¹ = a 
goal: ↑u⁻¹ = a

full_name: Units.eq_inv_of_mul_eq_one_left
code: @[to_additive]
protected theorem eq_inv_of_mul_eq_one_left {a : α} (h : ↑u * a = 1) : a = ↑u⁻¹ 
goal: a = ↑u⁻¹

full_name: AddUnits.eq_neg_of_add_eq_zero_left
code: @[to_additive]
protected theorem eq_inv_of_mul_eq_one_left {a : α} (h : ↑u * a = 1) : a = ↑u⁻¹ 
goal: a = ↑(-u)

full_name: Units.eq_inv_of_mul_eq_one_right
code: @[to_additive]
protected theorem eq_inv_of_mul_eq_one_right {a : α} (h : a * u = 1) : a = ↑u⁻¹ 
goal: a = ↑u⁻¹

full_name: AddUnits.eq_neg_of_add_eq_zero_right
code: @[to_additive]
protected theorem eq_inv_of_mul_eq_one_right {a : α} (h : a * u = 1) : a = ↑u⁻¹ 
goal: a = ↑(-u)

full_name: Units.instMonoid
code: @[to_additive]
instance instMonoid : Monoid αˣ 
goal: Monoid αˣ

full_name: AddUnits.instAddMonoid
code: @[to_additive]
instance instMonoid : Monoid αˣ 
goal: AddMonoid (AddUnits α)

full_name: AddUnits.instSub
code: /-- Units of a monoid have division -/
@[to_additive "Additive units of an additive monoid have subtraction."]
instance : Div αˣ 
goal: Sub (AddUnits α)

full_name: Units.instDiv
code: /-- Units of a monoid have division -/
@[to_additive "Additive units of an additive monoid have subtraction."]
instance : Div αˣ 
goal: Div αˣ

full_name: Units.instDivInvMonoid
code: /-- Units of a monoid form a `DivInvMonoid`. -/
@[to_additive "Additive units of an additive monoid form a `SubNegMonoid`."]
instance instDivInvMonoid : DivInvMonoid αˣ 
goal: DivInvMonoid αˣ

full_name: AddUnits.instSubNegAddMonoid
code: /-- Units of a monoid form a `DivInvMonoid`. -/
@[to_additive "Additive units of an additive monoid form a `SubNegMonoid`."]
instance instDivInvMonoid : DivInvMonoid αˣ 
goal: SubNegMonoid (AddUnits α)

full_name: Units.instGroup
code: /-- Units of a monoid form a group. -/
@[to_additive "Additive units of an additive monoid form an additive group."]
instance instGroup : Group αˣ 
goal: Group αˣ

full_name: AddUnits.instAddGroup
code: /-- Units of a monoid form a group. -/
@[to_additive "Additive units of an additive monoid form an additive group."]
instance instGroup : Group αˣ 
goal: AddGroup (AddUnits α)

full_name: Units.instCommGroupUnits
code: /-- Units of a commutative monoid form a commutative group. -/
@[to_additive "Additive units of an additive commutative monoid form
an additive commutative group."]
instance instCommGroupUnits {α} [CommMonoid α] : CommGroup αˣ 
goal: CommGroup αˣ

full_name: AddUnits.instAddCommGroupAddUnits
code: /-- Units of a commutative monoid form a commutative group. -/
@[to_additive "Additive units of an additive commutative monoid form
an additive commutative group."]
instance instCommGroupUnits {α} [CommMonoid α] : CommGroup αˣ 
goal: AddCommGroup (AddUnits α)

full_name: Units.val_pow_eq_pow_val
code: @[to_additive (attr := simp, norm_cast)]
lemma val_pow_eq_pow_val (n : ℕ) : ↑(a ^ n) = (a ^ n : α) 
goal: ↑(a ^ n) = ↑a ^ n

full_name: AddUnits.val_nsmul_eq_nsmul_val
code: @[to_additive (attr := simp, norm_cast)]
lemma val_pow_eq_pow_val (n : ℕ) : ↑(a ^ n) = (a ^ n : α) 
goal: ↑(n • a) = n • ↑a

full_name: AddUnits.add_neg_eq_zero
code: @[to_additive (attr := simp)]
theorem mul_inv_eq_one {a : α} : a * ↑u⁻¹ = 1 ↔ a = u 
goal: a + ↑(-u) = 0 ↔ a = ↑u

full_name: Units.mul_inv_eq_one
code: @[to_additive (attr := simp)]
theorem mul_inv_eq_one {a : α} : a * ↑u⁻¹ = 1 ↔ a = u 
goal: a * ↑u⁻¹ = 1 ↔ a = ↑u

full_name: AddUnits.neg_add_eq_zero
code: @[to_additive (attr := simp)]
theorem inv_mul_eq_one {a : α} : ↑u⁻¹ * a = 1 ↔ ↑u = a 
goal: ↑(-u) + a = 0 ↔ ↑u = a

full_name: Units.inv_mul_eq_one
code: @[to_additive (attr := simp)]
theorem inv_mul_eq_one {a : α} : ↑u⁻¹ * a = 1 ↔ ↑u = a 
goal: ↑u⁻¹ * a = 1 ↔ ↑u = a

full_name: AddUnits.add_eq_zero_iff_eq_neg
code: @[to_additive]
theorem mul_eq_one_iff_eq_inv {a : α} : a * u = 1 ↔ a = ↑u⁻¹ 
goal: a + ↑u = 0 ↔ a = ↑(-u)

full_name: Units.mul_eq_one_iff_eq_inv
code: @[to_additive]
theorem mul_eq_one_iff_eq_inv {a : α} : a * u = 1 ↔ a = ↑u⁻¹ 
goal: a * ↑u = 1 ↔ a = ↑u⁻¹

full_name: Units.mul_eq_one_iff_inv_eq
code: @[to_additive]
theorem mul_eq_one_iff_inv_eq {a : α} : ↑u * a = 1 ↔ ↑u⁻¹ = a 
goal: ↑u * a = 1 ↔ ↑u⁻¹ = a

full_name: AddUnits.add_eq_zero_iff_neg_eq
code: @[to_additive]
theorem mul_eq_one_iff_inv_eq {a : α} : ↑u * a = 1 ↔ ↑u⁻¹ = a 
goal: ↑u + a = 0 ↔ ↑(-u) = a

full_name: AddUnits.neg_unique
code: @[to_additive]
theorem inv_unique {u₁ u₂ : αˣ} (h : (↑u₁ : α) = ↑u₂) : (↑u₁⁻¹ : α) = ↑u₂⁻¹ 
goal: ↑(-u₁) = ↑(-u₂)

full_name: Units.inv_unique
code: @[to_additive]
theorem inv_unique {u₁ u₂ : αˣ} (h : (↑u₁ : α) = ↑u₂) : (↑u₁⁻¹ : α) = ↑u₂⁻¹ 
goal: ↑u₁⁻¹ = ↑u₂⁻¹

full_name: Units.val_inv_eq_inv_val
code: @[to_additive (attr := simp, norm_cast)] lemma val_inv_eq_inv_val (u : αˣ) : ↑u⁻¹ = (u⁻¹ : α) 
goal: ↑u⁻¹ = (↑u)⁻¹

full_name: AddUnits.val_neg_eq_neg_val
code: @[to_additive (attr := simp, norm_cast)] lemma val_inv_eq_inv_val (u : αˣ) : ↑u⁻¹ = (u⁻¹ : α) 
goal: ↑(-u) = -↑u

full_name: AddUnits.val_sub_eq_sub_val
code: @[to_additive (attr := simp, norm_cast)]
lemma val_div_eq_div_val : ∀ u₁ u₂ : αˣ, ↑(u₁ / u₂) = (u₁ / u₂ : α) 
goal: ↑(u₁ - u₂) = ↑u₁ - ↑u₂

full_name: Units.val_div_eq_div_val
code: @[to_additive (attr := simp, norm_cast)]
lemma val_div_eq_div_val : ∀ u₁ u₂ : αˣ, ↑(u₁ / u₂) = (u₁ / u₂ : α) 
goal: ↑(u₁ / u₂) = ↑u₁ / ↑u₂

full_name: Units.mkOfMulEqOne
code: /-- For `a, b` in a `CommMonoid` such that `a * b = 1`, makes a unit out of `a`. -/
@[to_additive
  "For `a, b` in an `AddCommMonoid` such that `a + b = 0`, makes an addUnit out of `a`."]
def Units.mkOfMulEqOne [CommMonoid α] (a b : α) (hab : a * b = 1) : αˣ 
goal: αˣ

full_name: AddUnits.mkOfAddEqZero
code: /-- For `a, b` in a `CommMonoid` such that `a * b = 1`, makes a unit out of `a`. -/
@[to_additive
  "For `a, b` in an `AddCommMonoid` such that `a + b = 0`, makes an addUnit out of `a`."]
def Units.mkOfMulEqOne [CommMonoid α] (a b : α) (hab : a * b = 1) : αˣ 
goal: AddUnits α

full_name: AddUnits.val_mkOfAddEqZero
code: @[to_additive (attr := simp)]
theorem Units.val_mkOfMulEqOne [CommMonoid α] {a b : α} (h : a * b = 1) :
    (Units.mkOfMulEqOne a b h : α) = a 
goal: ↑(AddUnits.mkOfAddEqZero a b h) = a

full_name: Units.val_mkOfMulEqOne
code: @[to_additive (attr := simp)]
theorem Units.val_mkOfMulEqOne [CommMonoid α] {a b : α} (h : a * b = 1) :
    (Units.mkOfMulEqOne a b h : α) = a 
goal: ↑(Units.mkOfMulEqOne a b h) = a

full_name: divp
code: /-- Partial division. It is defined when the
  second argument is invertible, and unlike the division operator
  in `DivisionRing` it is not totalized at zero. -/
def divp (a : α) (u : Units α) : α 
goal: α

full_name: _aux_Mathlib_Algebra_Group_Units___unexpand_divp_1
code: @[inherit_doc]
infixl:70 " /ₚ " => divp
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_Mathlib_Algebra_Group_Units___macroRules_term_/ₚ__1»
code: @[inherit_doc]
infixl:70 " /ₚ " => divp
goal: Lean.Macro

full_name: divp_self
code: @[simp]
theorem divp_self (u : αˣ) : (u : α) /ₚ u = 1 
goal: ↑u /ₚ u = 1

full_name: divp_one
code: @[simp]
theorem divp_one (a : α) : a /ₚ 1 = a 
goal: a /ₚ 1 = a

full_name: divp_assoc
code: theorem divp_assoc (a b : α) (u : αˣ) : a * b /ₚ u = a * (b /ₚ u) 
goal: a * b /ₚ u = a * (b /ₚ u)

full_name: divp_assoc'
code: /-- `field_simp` needs the reverse direction of `divp_assoc` to move all `/ₚ` to the right. -/
@[field_simps]
theorem divp_assoc' (x y : α) (u : αˣ) : x * (y /ₚ u) = x * y /ₚ u 
goal: x * (y /ₚ u) = x * y /ₚ u

full_name: divp_inv
code: @[simp]
theorem divp_inv (u : αˣ) : a /ₚ u⁻¹ = a * u 
goal: a /ₚ u⁻¹ = a * ↑u

full_name: divp_mul_cancel
code: @[simp]
theorem divp_mul_cancel (a : α) (u : αˣ) : a /ₚ u * u = a 
goal: a /ₚ u * ↑u = a

full_name: mul_divp_cancel
code: @[simp]
theorem mul_divp_cancel (a : α) (u : αˣ) : a * u /ₚ u = a 
goal: a * ↑u /ₚ u = a

full_name: divp_left_inj
code: @[simp]
theorem divp_left_inj (u : αˣ) {a b : α} : a /ₚ u = b /ₚ u ↔ a = b 
goal: a /ₚ u = b /ₚ u ↔ a = b

full_name: divp_divp_eq_divp_mul
code: @[field_simps]
theorem divp_divp_eq_divp_mul (x : α) (u₁ u₂ : αˣ) : x /ₚ u₁ /ₚ u₂ = x /ₚ (u₂ * u₁) 
goal: x /ₚ u₁ /ₚ u₂ = x /ₚ (u₂ * u₁)

full_name: divp_eq_iff_mul_eq
code: @[field_simps 1010]
theorem divp_eq_iff_mul_eq {x : α} {u : αˣ} {y : α} : x /ₚ u = y ↔ y * u = x 
goal: x /ₚ u = y ↔ y * ↑u = x

full_name: eq_divp_iff_mul_eq
code: @[field_simps]
theorem eq_divp_iff_mul_eq {x : α} {u : αˣ} {y : α} : x = y /ₚ u ↔ x * u = y 
goal: x = y /ₚ u ↔ x * ↑u = y

full_name: divp_eq_one_iff_eq
code: theorem divp_eq_one_iff_eq {a : α} {u : αˣ} : a /ₚ u = 1 ↔ a = u 
goal: a /ₚ u = 1 ↔ a = ↑u

full_name: one_divp
code: @[simp]
theorem one_divp (u : αˣ) : 1 /ₚ u = ↑u⁻¹ 
goal: 1 /ₚ u = ↑u⁻¹

full_name: inv_eq_one_divp
code: /-- Used for `field_simp` to deal with inverses of units. -/
@[field_simps]
theorem inv_eq_one_divp (u : αˣ) : ↑u⁻¹ = 1 /ₚ u 
goal: ↑u⁻¹ = 1 /ₚ u

full_name: inv_eq_one_divp'
code: /-- Used for `field_simp` to deal with inverses of units. This form of the lemma
is essential since `field_simp` likes to use `inv_eq_one_div` to rewrite
`↑u⁻¹ = ↑(1 / u)`.
-/
@[field_simps]
theorem inv_eq_one_divp' (u : αˣ) : ((1 / u : αˣ) : α) = 1 /ₚ u 
goal: ↑(1 / u) = 1 /ₚ u

full_name: val_div_eq_divp
code: /-- `field_simp` moves division inside `αˣ` to the right, and this lemma
lifts the calculation to `α`.
-/
@[field_simps]
theorem val_div_eq_divp (u₁ u₂ : αˣ) : ↑(u₁ / u₂) = ↑u₁ /ₚ u₂ 
goal: ↑(u₁ / u₂) = ↑u₁ /ₚ u₂

full_name: divp_mul_eq_mul_divp
code: @[field_simps]
theorem divp_mul_eq_mul_divp (x y : α) (u : αˣ) : x /ₚ u * y = x * y /ₚ u 
goal: x /ₚ u * y = x * y /ₚ u

full_name: divp_eq_divp_iff
code: @[field_simps]
theorem divp_eq_divp_iff {x y : α} {ux uy : αˣ} : x /ₚ ux = y /ₚ uy ↔ x * uy = y * ux 
goal: x /ₚ ux = y /ₚ uy ↔ x * ↑uy = y * ↑ux

full_name: divp_mul_divp
code: @[field_simps]
theorem divp_mul_divp (x y : α) (ux uy : αˣ) : x /ₚ ux * (y /ₚ uy) = x * y /ₚ (ux * uy) 
goal: x /ₚ ux * (y /ₚ uy) = x * y /ₚ (ux * uy)

full_name: eq_zero_of_add_right
code: @[to_additive]
theorem eq_one_of_mul_right (h : a * b = 1) : a = 1 
goal: a = 0

full_name: eq_one_of_mul_right
code: @[to_additive]
theorem eq_one_of_mul_right (h : a * b = 1) : a = 1 
goal: a = 1

full_name: eq_one_of_mul_left
code: @[to_additive]
theorem eq_one_of_mul_left (h : a * b = 1) : b = 1 
goal: b = 1

full_name: eq_zero_of_add_left
code: @[to_additive]
theorem eq_one_of_mul_left (h : a * b = 1) : b = 1 
goal: b = 0

full_name: add_eq_zero
code: @[to_additive (attr := simp)]
theorem mul_eq_one : a * b = 1 ↔ a = 1 ∧ b = 1 
goal: a + b = 0 ↔ a = 0 ∧ b = 0

full_name: mul_eq_one
code: @[to_additive (attr := simp)]
theorem mul_eq_one : a * b = 1 ↔ a = 1 ∧ b = 1 
goal: a * b = 1 ↔ a = 1 ∧ b = 1

full_name: IsUnit
code: /-- An element `a : M` of a `Monoid` is a unit if it has a two-sided inverse.
The actual definition says that `a` is equal to some `u : Mˣ`, where
`Mˣ` is a bundled version of `IsUnit`. -/
@[to_additive
      "An element `a : M` of an `AddMonoid` is an `AddUnit` if it has a two-sided additive inverse.
      The actual definition says that `a` is equal to some `u : AddUnits M`,
      where `AddUnits M` is a bundled version of `IsAddUnit`."]
def IsUnit [Monoid M] (a : M) : Prop 
goal: Prop

full_name: IsAddUnit
code: /-- An element `a : M` of a `Monoid` is a unit if it has a two-sided inverse.
The actual definition says that `a` is equal to some `u : Mˣ`, where
`Mˣ` is a bundled version of `IsUnit`. -/
@[to_additive
      "An element `a : M` of an `AddMonoid` is an `AddUnit` if it has a two-sided additive inverse.
      The actual definition says that `a` is equal to some `u : AddUnits M`,
      where `AddUnits M` is a bundled version of `IsAddUnit`."]
def IsUnit [Monoid M] (a : M) : Prop 
goal: Prop

full_name: isAddUnit_iff_exists
code: /-- See `isUnit_iff_exists_and_exists` for a similar lemma with two existentials. -/
@[to_additive "See `isAddUnit_iff_exists_and_exists` for a similar lemma with two existentials."]
lemma isUnit_iff_exists [Monoid M] {x : M} : IsUnit x ↔ ∃ b, x * b = 1 ∧ b * x = 1 
goal: IsAddUnit x ↔ ∃ b, x + b = 0 ∧ b + x = 0

full_name: isUnit_iff_exists
code: /-- See `isUnit_iff_exists_and_exists` for a similar lemma with two existentials. -/
@[to_additive "See `isAddUnit_iff_exists_and_exists` for a similar lemma with two existentials."]
lemma isUnit_iff_exists [Monoid M] {x : M} : IsUnit x ↔ ∃ b, x * b = 1 ∧ b * x = 1 
goal: IsUnit x ↔ ∃ b, x * b = 1 ∧ b * x = 1

full_name: isUnit_iff_exists_and_exists
code: /-- See `isUnit_iff_exists` for a similar lemma with one existential. -/
@[to_additive "See `isAddUnit_iff_exists` for a similar lemma with one existential."]
theorem isUnit_iff_exists_and_exists [Monoid M] {a : M} :
    IsUnit a ↔ (∃ b, a * b = 1) ∧ (∃ c, c * a = 1) 
goal: IsUnit a ↔ (∃ b, a * b = 1) ∧ ∃ c, c * a = 1

full_name: isAddUnit_iff_exists_and_exists
code: /-- See `isUnit_iff_exists` for a similar lemma with one existential. -/
@[to_additive "See `isAddUnit_iff_exists` for a similar lemma with one existential."]
theorem isUnit_iff_exists_and_exists [Monoid M] {a : M} :
    IsUnit a ↔ (∃ b, a * b = 1) ∧ (∃ c, c * a = 1) 
goal: IsAddUnit a ↔ (∃ b, a + b = 0) ∧ ∃ c, c + a = 0

full_name: isUnit_of_subsingleton
code: @[to_additive (attr := nontriviality)]
theorem isUnit_of_subsingleton [Monoid M] [Subsingleton M] (a : M) : IsUnit a 
goal: IsUnit a

full_name: isAddUnit_of_subsingleton
code: @[to_additive (attr := nontriviality)]
theorem isUnit_of_subsingleton [Monoid M] [Subsingleton M] (a : M) : IsUnit a 
goal: IsAddUnit a

full_name: instCanLiftUnitsValIsUnit
code: @[to_additive]
instance [Monoid M] : CanLift M Mˣ Units.val IsUnit 
goal: CanLift M Mˣ Units.val IsUnit

full_name: instCanLiftAddUnitsValIsAddUnit
code: @[to_additive]
instance [Monoid M] : CanLift M Mˣ Units.val IsUnit 
goal: CanLift M (AddUnits M) AddUnits.val IsAddUnit

full_name: instUniqueAddUnitsOfSubsingleton
code: /-- A subsingleton `Monoid` has a unique unit. -/
@[to_additive "A subsingleton `AddMonoid` has a unique additive unit."]
instance [Monoid M] [Subsingleton M] : Unique Mˣ 
goal: Unique (AddUnits M)

full_name: instUniqueUnitsOfSubsingleton
code: /-- A subsingleton `Monoid` has a unique unit. -/
@[to_additive "A subsingleton `AddMonoid` has a unique additive unit."]
instance [Monoid M] [Subsingleton M] : Unique Mˣ 
goal: Unique Mˣ

full_name: AddUnits.isAddUnit
code: @[to_additive (attr := simp)]
protected theorem Units.isUnit [Monoid M] (u : Mˣ) : IsUnit (u : M) 
goal: IsAddUnit ↑u

full_name: Units.isUnit
code: @[to_additive (attr := simp)]
protected theorem Units.isUnit [Monoid M] (u : Mˣ) : IsUnit (u : M) 
goal: IsUnit ↑u

full_name: isAddUnit_zero
code: @[to_additive (attr := simp)]
theorem isUnit_one [Monoid M] : IsUnit (1 : M) 
goal: IsAddUnit 0

full_name: isUnit_one
code: @[to_additive (attr := simp)]
theorem isUnit_one [Monoid M] : IsUnit (1 : M) 
goal: IsUnit 1

full_name: isUnit_of_mul_eq_one
code: @[to_additive]
theorem isUnit_of_mul_eq_one [CommMonoid M] (a b : M) (h : a * b = 1) : IsUnit a 
goal: IsUnit a

full_name: isAddUnit_of_add_eq_zero
code: @[to_additive]
theorem isUnit_of_mul_eq_one [CommMonoid M] (a b : M) (h : a * b = 1) : IsUnit a 
goal: IsAddUnit a

full_name: isUnit_of_mul_eq_one_right
code: @[to_additive]
theorem isUnit_of_mul_eq_one_right [CommMonoid M] (a b : M) (h : a * b = 1) : IsUnit b 
goal: IsUnit b

full_name: isAddUnit_of_add_eq_zero_right
code: @[to_additive]
theorem isUnit_of_mul_eq_one_right [CommMonoid M] (a b : M) (h : a * b = 1) : IsUnit b 
goal: IsAddUnit b

full_name: IsUnit.exists_right_inv
code: @[to_additive IsAddUnit.exists_neg]
lemma IsUnit.exists_right_inv (h : IsUnit a) : ∃ b, a * b = 1 
goal: ∃ b, a * b = 1

full_name: IsAddUnit.exists_neg
code: @[to_additive IsAddUnit.exists_neg]
lemma IsUnit.exists_right_inv (h : IsUnit a) : ∃ b, a * b = 1 
goal: ∃ b, a + b = 0

full_name: IsAddUnit.exists_neg'
code: @[to_additive IsAddUnit.exists_neg']
lemma IsUnit.exists_left_inv {a : M} (h : IsUnit a) : ∃ b, b * a = 1 
goal: ∃ b, b + a = 0

full_name: IsUnit.exists_left_inv
code: @[to_additive IsAddUnit.exists_neg']
lemma IsUnit.exists_left_inv {a : M} (h : IsUnit a) : ∃ b, b * a = 1 
goal: ∃ b, b * a = 1

full_name: IsAddUnit.add
code: @[to_additive] lemma IsUnit.mul : IsUnit a → IsUnit b → IsUnit (a * b) 
goal: IsAddUnit a → IsAddUnit b → IsAddUnit (a + b)

full_name: IsUnit.mul
code: @[to_additive] lemma IsUnit.mul : IsUnit a → IsUnit b → IsUnit (a * b) 
goal: IsUnit a → IsUnit b → IsUnit (a * b)

full_name: IsUnit.pow
code: @[to_additive] lemma IsUnit.pow (n : ℕ) : IsUnit a → IsUnit (a ^ n) 
goal: IsUnit a → IsUnit (a ^ n)

full_name: IsAddUnit.nsmul
code: @[to_additive] lemma IsUnit.pow (n : ℕ) : IsUnit a → IsUnit (a ^ n) 
goal: IsAddUnit a → IsAddUnit (n • a)

full_name: units_eq_one
code: theorem units_eq_one [Unique Mˣ] (u : Mˣ) : u = 1 
goal: u = 1

full_name: isUnit_iff_eq_one
code: @[to_additive] lemma isUnit_iff_eq_one [Unique Mˣ] {x : M} : IsUnit x ↔ x = 1 
goal: IsUnit x ↔ x = 1

full_name: isAddUnit_iff_eq_zero
code: @[to_additive] lemma isUnit_iff_eq_one [Unique Mˣ] {x : M} : IsUnit x ↔ x = 1 
goal: IsAddUnit x ↔ x = 0

full_name: isUnit_iff_exists_inv
code: @[to_additive]
theorem isUnit_iff_exists_inv [CommMonoid M] {a : M} : IsUnit a ↔ ∃ b, a * b = 1 
goal: IsUnit a ↔ ∃ b, a * b = 1

full_name: isAddUnit_iff_exists_neg
code: @[to_additive]
theorem isUnit_iff_exists_inv [CommMonoid M] {a : M} : IsUnit a ↔ ∃ b, a * b = 1 
goal: IsAddUnit a ↔ ∃ b, a + b = 0

full_name: isAddUnit_iff_exists_neg'
code: @[to_additive]
theorem isUnit_iff_exists_inv' [CommMonoid M] {a : M} : IsUnit a ↔ ∃ b, b * a = 1 
goal: IsAddUnit a ↔ ∃ b, b + a = 0

full_name: isUnit_iff_exists_inv'
code: @[to_additive]
theorem isUnit_iff_exists_inv' [CommMonoid M] {a : M} : IsUnit a ↔ ∃ b, b * a = 1 
goal: IsUnit a ↔ ∃ b, b * a = 1

full_name: Units.isUnit_mul_units
code: /-- Multiplication by a `u : Mˣ` on the right doesn't affect `IsUnit`. -/
@[to_additive (attr := simp)
"Addition of a `u : AddUnits M` on the right doesn't affect `IsAddUnit`."]
theorem Units.isUnit_mul_units [Monoid M] (a : M) (u : Mˣ) : IsUnit (a * u) ↔ IsUnit a 
goal: IsUnit (a * ↑u) ↔ IsUnit a

full_name: AddUnits.isAddUnit_add_addUnits
code: /-- Multiplication by a `u : Mˣ` on the right doesn't affect `IsUnit`. -/
@[to_additive (attr := simp)
"Addition of a `u : AddUnits M` on the right doesn't affect `IsAddUnit`."]
theorem Units.isUnit_mul_units [Monoid M] (a : M) (u : Mˣ) : IsUnit (a * u) ↔ IsUnit a 
goal: IsAddUnit (a + ↑u) ↔ IsAddUnit a

full_name: Units.isUnit_units_mul
code: /-- Multiplication by a `u : Mˣ` on the left doesn't affect `IsUnit`. -/
@[to_additive (attr := simp)
"Addition of a `u : AddUnits M` on the left doesn't affect `IsAddUnit`."]
theorem Units.isUnit_units_mul {M : Type*} [Monoid M] (u : Mˣ) (a : M) :
    IsUnit (↑u * a) ↔ IsUnit a 
goal: IsUnit (↑u * a) ↔ IsUnit a

full_name: AddUnits.isAddUnit_addUnits_add
code: /-- Multiplication by a `u : Mˣ` on the left doesn't affect `IsUnit`. -/
@[to_additive (attr := simp)
"Addition of a `u : AddUnits M` on the left doesn't affect `IsAddUnit`."]
theorem Units.isUnit_units_mul {M : Type*} [Monoid M] (u : Mˣ) (a : M) :
    IsUnit (↑u * a) ↔ IsUnit a 
goal: IsAddUnit (↑u + a) ↔ IsAddUnit a

full_name: isUnit_of_mul_isUnit_left
code: @[to_additive]
theorem isUnit_of_mul_isUnit_left [CommMonoid M] {x y : M} (hu : IsUnit (x * y)) : IsUnit x 
goal: IsUnit x

full_name: isAddUnit_of_add_isAddUnit_left
code: @[to_additive]
theorem isUnit_of_mul_isUnit_left [CommMonoid M] {x y : M} (hu : IsUnit (x * y)) : IsUnit x 
goal: IsAddUnit x

full_name: isUnit_of_mul_isUnit_right
code: @[to_additive]
theorem isUnit_of_mul_isUnit_right [CommMonoid M] {x y : M} (hu : IsUnit (x * y)) : IsUnit y 
goal: IsUnit y

full_name: isAddUnit_of_add_isAddUnit_right
code: @[to_additive]
theorem isUnit_of_mul_isUnit_right [CommMonoid M] {x y : M} (hu : IsUnit (x * y)) : IsUnit y 
goal: IsAddUnit y

full_name: IsUnit.mul_iff
code: @[to_additive (attr := simp)]
theorem mul_iff [CommMonoid M] {x y : M} : IsUnit (x * y) ↔ IsUnit x ∧ IsUnit y 
goal: IsUnit (x * y) ↔ IsUnit x ∧ IsUnit y

full_name: IsAddUnit.add_iff
code: @[to_additive (attr := simp)]
theorem mul_iff [CommMonoid M] {x y : M} : IsUnit (x * y) ↔ IsUnit x ∧ IsUnit y 
goal: IsAddUnit (x + y) ↔ IsAddUnit x ∧ IsAddUnit y

full_name: IsUnit.unit
code: /-- The element of the group of units, corresponding to an element of a monoid which is a unit. When
`α` is a `DivisionMonoid`, use `IsUnit.unit'` instead. -/
protected noncomputable def unit (h : IsUnit a) : Mˣ 
goal: Mˣ

full_name: IsAddUnit.addUnit
code: /-- "The element of the additive group of additive units, corresponding to an element of
an additive monoid which is an additive unit. When `α` is a `SubtractionMonoid`, use
`IsAddUnit.addUnit'` instead. -/
protected noncomputable def _root_.IsAddUnit.addUnit [AddMonoid N] {a : N} (h : IsAddUnit a) :
    AddUnits N 
goal: AddUnits N

full_name: IsAddUnit.addUnit_of_val_addUnits
code: @[to_additive (attr := simp)]
theorem unit_of_val_units {a : Mˣ} (h : IsUnit (a : M)) : h.unit = a 
goal: h.addUnit = a

full_name: IsUnit.unit_of_val_units
code: @[to_additive (attr := simp)]
theorem unit_of_val_units {a : Mˣ} (h : IsUnit (a : M)) : h.unit = a 
goal: h.unit = a

full_name: IsUnit.unit_spec
code: @[to_additive (attr := simp)]
theorem unit_spec (h : IsUnit a) : ↑h.unit = a 
goal: ↑h.unit = a

full_name: IsAddUnit.addUnit_spec
code: @[to_additive (attr := simp)]
theorem unit_spec (h : IsUnit a) : ↑h.unit = a 
goal: ↑h.addUnit = a

full_name: IsAddUnit.addUnit_zero
code: @[to_additive (attr := simp)]
theorem unit_one (h : IsUnit (1 : M)) : h.unit = 1 
goal: h.addUnit = 0

full_name: IsUnit.unit_one
code: @[to_additive (attr := simp)]
theorem unit_one (h : IsUnit (1 : M)) : h.unit = 1 
goal: h.unit = 1

full_name: IsAddUnit.val_neg_add
code: @[to_additive (attr := simp)]
theorem val_inv_mul (h : IsUnit a) : ↑h.unit⁻¹ * a = 1 
goal: ↑(-h.addUnit) + a = 0

full_name: IsUnit.val_inv_mul
code: @[to_additive (attr := simp)]
theorem val_inv_mul (h : IsUnit a) : ↑h.unit⁻¹ * a = 1 
goal: ↑h.unit⁻¹ * a = 1

full_name: IsAddUnit.add_val_neg
code: @[to_additive (attr := simp)]
theorem mul_val_inv (h : IsUnit a) : a * ↑h.unit⁻¹ = 1 
goal: a + ↑(-h.addUnit) = 0

full_name: IsUnit.mul_val_inv
code: @[to_additive (attr := simp)]
theorem mul_val_inv (h : IsUnit a) : a * ↑h.unit⁻¹ = 1 
goal: a * ↑h.unit⁻¹ = 1

full_name: IsUnit.instDecidableOfExistsUnitsEqVal
code: /-- `IsUnit x` is decidable if we can decide if `x` comes from `Mˣ`. -/
@[to_additive "`IsAddUnit x` is decidable if we can decide if `x` comes from `AddUnits M`."]
instance (x : M) [h : Decidable (∃ u : Mˣ, ↑u = x)] : Decidable (IsUnit x) 
goal: Decidable (IsUnit x)

full_name: IsAddUnit.instDecidableOfExistsAddUnitsEqVal
code: /-- `IsUnit x` is decidable if we can decide if `x` comes from `Mˣ`. -/
@[to_additive "`IsAddUnit x` is decidable if we can decide if `x` comes from `AddUnits M`."]
instance (x : M) [h : Decidable (∃ u : Mˣ, ↑u = x)] : Decidable (IsUnit x) 
goal: Decidable (IsAddUnit x)

full_name: IsUnit.mul_left_inj
code: @[to_additive]
theorem mul_left_inj (h : IsUnit a) : b * a = c * a ↔ b = c 
goal: b * a = c * a ↔ b = c

full_name: IsAddUnit.add_left_inj
code: @[to_additive]
theorem mul_left_inj (h : IsUnit a) : b * a = c * a ↔ b = c 
goal: b + a = c + a ↔ b = c

full_name: IsAddUnit.add_right_inj
code: @[to_additive]
theorem mul_right_inj (h : IsUnit a) : a * b = a * c ↔ b = c 
goal: a + b = a + c ↔ b = c

full_name: IsUnit.mul_right_inj
code: @[to_additive]
theorem mul_right_inj (h : IsUnit a) : a * b = a * c ↔ b = c 
goal: a * b = a * c ↔ b = c

full_name: IsUnit.mul_left_cancel
code: @[to_additive]
protected theorem mul_left_cancel (h : IsUnit a) : a * b = a * c → b = c 
goal: a * b = a * c → b = c

full_name: IsAddUnit.add_left_cancel
code: @[to_additive]
protected theorem mul_left_cancel (h : IsUnit a) : a * b = a * c → b = c 
goal: a + b = a + c → b = c

full_name: IsUnit.mul_right_cancel
code: @[to_additive]
protected theorem mul_right_cancel (h : IsUnit b) : a * b = c * b → a = c 
goal: a * b = c * b → a = c

full_name: IsAddUnit.add_right_cancel
code: @[to_additive]
protected theorem mul_right_cancel (h : IsUnit b) : a * b = c * b → a = c 
goal: a + b = c + b → a = c

full_name: IsUnit.mul_right_injective
code: @[to_additive]
protected theorem mul_right_injective (h : IsUnit a) : Injective (a * ·) 
goal: Function.Injective fun x => a * x

full_name: IsAddUnit.add_right_injective
code: @[to_additive]
protected theorem mul_right_injective (h : IsUnit a) : Injective (a * ·) 
goal: Function.Injective fun x => a + x

full_name: IsAddUnit.add_left_injective
code: @[to_additive]
protected theorem mul_left_injective (h : IsUnit b) : Injective (· * b) 
goal: Function.Injective fun x => x + b

full_name: IsUnit.mul_left_injective
code: @[to_additive]
protected theorem mul_left_injective (h : IsUnit b) : Injective (· * b) 
goal: Function.Injective fun x => x * b

full_name: IsUnit.isUnit_iff_mulLeft_bijective
code: @[to_additive]
theorem isUnit_iff_mulLeft_bijective {a : M} :
    IsUnit a ↔ Function.Bijective (a * ·) 
goal: IsUnit a ↔ Function.Bijective fun x => a * x

full_name: IsAddUnit.isAddUnit_iff_addLeft_bijective
code: @[to_additive]
theorem isUnit_iff_mulLeft_bijective {a : M} :
    IsUnit a ↔ Function.Bijective (a * ·) 
goal: IsAddUnit a ↔ Function.Bijective fun x => a + x

full_name: IsUnit.isUnit_iff_mulRight_bijective
code: @[to_additive]
theorem isUnit_iff_mulRight_bijective {a : M} :
    IsUnit a ↔ Function.Bijective (· * a) 
goal: IsUnit a ↔ Function.Bijective fun x => x * a

full_name: IsAddUnit.isAddUnit_iff_addRight_bijective
code: @[to_additive]
theorem isUnit_iff_mulRight_bijective {a : M} :
    IsUnit a ↔ Function.Bijective (· * a) 
goal: IsAddUnit a ↔ Function.Bijective fun x => x + a

full_name: IsUnit.inv_mul_cancel
code: @[to_additive (attr := simp)]
protected theorem inv_mul_cancel : IsUnit a → a⁻¹ * a = 1 
goal: IsUnit a → a⁻¹ * a = 1

full_name: IsAddUnit.neg_add_cancel
code: @[to_additive (attr := simp)]
protected theorem inv_mul_cancel : IsUnit a → a⁻¹ * a = 1 
goal: IsAddUnit a → -a + a = 0

full_name: IsUnit.mul_inv_cancel
code: @[to_additive (attr := simp)]
protected theorem mul_inv_cancel : IsUnit a → a * a⁻¹ = 1 
goal: IsUnit a → a * a⁻¹ = 1

full_name: IsAddUnit.add_neg_cancel
code: @[to_additive (attr := simp)]
protected theorem mul_inv_cancel : IsUnit a → a * a⁻¹ = 1 
goal: IsAddUnit a → a + -a = 0

full_name: IsAddUnit.addUnit'
code: /-- The element of the group of units, corresponding to an element of a monoid which is a unit. As
opposed to `IsUnit.unit`, the inverse is computable and comes from the inversion on `α`. This is
useful to transfer properties of inversion in `Units α` to `α`. See also `toUnits`. -/
@[to_additive (attr := simps val )
"The element of the additive group of additive units, corresponding to an element of
an additive monoid which is an additive unit. As opposed to `IsAddUnit.addUnit`, the negation is
computable and comes from the negation on `α`. This is useful to transfer properties of negation
in `AddUnits α` to `α`. See also `toAddUnits`."]
def unit' (h : IsUnit a) : αˣ 
goal: AddUnits α

full_name: IsUnit.val_unit'
code: /-- The element of the group of units, corresponding to an element of a monoid which is a unit. As
opposed to `IsUnit.unit`, the inverse is computable and comes from the inversion on `α`. This is
useful to transfer properties of inversion in `Units α` to `α`. See also `toUnits`. -/
@[to_additive (attr := simps val )
"The element of the additive group of additive units, corresponding to an element of
an additive monoid which is an additive unit. As opposed to `IsAddUnit.addUnit`, the negation is
computable and comes from the negation on `α`. This is useful to transfer properties of negation
in `AddUnits α` to `α`. See also `toAddUnits`."]
def unit' (h : IsUnit a) : αˣ 
goal: ↑h.unit' = a

full_name: IsUnit.unit'
code: /-- The element of the group of units, corresponding to an element of a monoid which is a unit. As
opposed to `IsUnit.unit`, the inverse is computable and comes from the inversion on `α`. This is
useful to transfer properties of inversion in `Units α` to `α`. See also `toUnits`. -/
@[to_additive (attr := simps val )
"The element of the additive group of additive units, corresponding to an element of
an additive monoid which is an additive unit. As opposed to `IsAddUnit.addUnit`, the negation is
computable and comes from the negation on `α`. This is useful to transfer properties of negation
in `AddUnits α` to `α`. See also `toAddUnits`."]
def unit' (h : IsUnit a) : αˣ 
goal: αˣ

full_name: IsAddUnit.val_addUnit'
code: /-- The element of the group of units, corresponding to an element of a monoid which is a unit. As
opposed to `IsUnit.unit`, the inverse is computable and comes from the inversion on `α`. This is
useful to transfer properties of inversion in `Units α` to `α`. See also `toUnits`. -/
@[to_additive (attr := simps val )
"The element of the additive group of additive units, corresponding to an element of
an additive monoid which is an additive unit. As opposed to `IsAddUnit.addUnit`, the negation is
computable and comes from the negation on `α`. This is useful to transfer properties of negation
in `AddUnits α` to `α`. See also `toAddUnits`."]
def unit' (h : IsUnit a) : αˣ 
goal: ↑h.addUnit' = a

full_name: IsAddUnit.val_neg_addUnit'
code: @[to_additive] lemma val_inv_unit' (h : IsUnit a) : ↑(h.unit'⁻¹) = a⁻¹ 
goal: ↑(-h.addUnit') = -a

full_name: IsUnit.val_inv_unit'
code: @[to_additive] lemma val_inv_unit' (h : IsUnit a) : ↑(h.unit'⁻¹) = a⁻¹ 
goal: ↑h.unit'⁻¹ = a⁻¹

full_name: IsAddUnit.add_neg_cancel_left
code: @[to_additive (attr := simp)]
protected lemma mul_inv_cancel_left (h : IsUnit a) : ∀ b, a * (a⁻¹ * b) = b 
goal: a + (-a + b) = b

full_name: IsUnit.mul_inv_cancel_left
code: @[to_additive (attr := simp)]
protected lemma mul_inv_cancel_left (h : IsUnit a) : ∀ b, a * (a⁻¹ * b) = b 
goal: a * (a⁻¹ * b) = b

full_name: IsUnit.inv_mul_cancel_left
code: @[to_additive (attr := simp)]
protected lemma inv_mul_cancel_left (h : IsUnit a) : ∀ b, a⁻¹ * (a * b) = b 
goal: a⁻¹ * (a * b) = b

full_name: IsAddUnit.neg_add_cancel_left
code: @[to_additive (attr := simp)]
protected lemma inv_mul_cancel_left (h : IsUnit a) : ∀ b, a⁻¹ * (a * b) = b 
goal: -a + (a + b) = b

full_name: IsAddUnit.add_neg_cancel_right
code: @[to_additive (attr := simp)]
protected lemma mul_inv_cancel_right (h : IsUnit b) (a : α) : a * b * b⁻¹ = a 
goal: a + b + -b = a

full_name: IsUnit.mul_inv_cancel_right
code: @[to_additive (attr := simp)]
protected lemma mul_inv_cancel_right (h : IsUnit b) (a : α) : a * b * b⁻¹ = a 
goal: a * b * b⁻¹ = a

full_name: IsAddUnit.neg_add_cancel_right
code: @[to_additive (attr := simp)]
protected lemma inv_mul_cancel_right (h : IsUnit b) (a : α) : a * b⁻¹ * b = a 
goal: a + -b + b = a

full_name: IsUnit.inv_mul_cancel_right
code: @[to_additive (attr := simp)]
protected lemma inv_mul_cancel_right (h : IsUnit b) (a : α) : a * b⁻¹ * b = a 
goal: a * b⁻¹ * b = a

full_name: IsAddUnit.sub_self
code: @[to_additive]
protected lemma div_self (h : IsUnit a) : a / a = 1 
goal: a - a = 0

full_name: IsUnit.div_self
code: @[to_additive]
protected lemma div_self (h : IsUnit a) : a / a = 1 
goal: a / a = 1

full_name: IsAddUnit.eq_add_neg_iff_add_eq
code: @[to_additive]
protected lemma eq_mul_inv_iff_mul_eq (h : IsUnit c) : a = b * c⁻¹ ↔ a * c = b 
goal: a = b + -c ↔ a + c = b

full_name: IsUnit.eq_mul_inv_iff_mul_eq
code: @[to_additive]
protected lemma eq_mul_inv_iff_mul_eq (h : IsUnit c) : a = b * c⁻¹ ↔ a * c = b 
goal: a = b * c⁻¹ ↔ a * c = b

full_name: IsAddUnit.eq_neg_add_iff_add_eq
code: @[to_additive]
protected lemma eq_inv_mul_iff_mul_eq (h : IsUnit b) : a = b⁻¹ * c ↔ b * a = c 
goal: a = -b + c ↔ b + a = c

full_name: IsUnit.eq_inv_mul_iff_mul_eq
code: @[to_additive]
protected lemma eq_inv_mul_iff_mul_eq (h : IsUnit b) : a = b⁻¹ * c ↔ b * a = c 
goal: a = b⁻¹ * c ↔ b * a = c

full_name: IsAddUnit.neg_add_eq_iff_eq_add
code: @[to_additive]
protected lemma inv_mul_eq_iff_eq_mul (h : IsUnit a) : a⁻¹ * b = c ↔ b = a * c 
goal: -a + b = c ↔ b = a + c

full_name: IsUnit.inv_mul_eq_iff_eq_mul
code: @[to_additive]
protected lemma inv_mul_eq_iff_eq_mul (h : IsUnit a) : a⁻¹ * b = c ↔ b = a * c 
goal: a⁻¹ * b = c ↔ b = a * c

full_name: IsAddUnit.add_neg_eq_iff_eq_add
code: @[to_additive]
protected lemma mul_inv_eq_iff_eq_mul (h : IsUnit b) : a * b⁻¹ = c ↔ a = c * b 
goal: a + -b = c ↔ a = c + b

full_name: IsUnit.mul_inv_eq_iff_eq_mul
code: @[to_additive]
protected lemma mul_inv_eq_iff_eq_mul (h : IsUnit b) : a * b⁻¹ = c ↔ a = c * b 
goal: a * b⁻¹ = c ↔ a = c * b

full_name: IsUnit.mul_inv_eq_one
code: @[to_additive]
protected lemma mul_inv_eq_one (h : IsUnit b) : a * b⁻¹ = 1 ↔ a = b 
goal: a * b⁻¹ = 1 ↔ a = b

full_name: IsAddUnit.add_neg_eq_zero
code: @[to_additive]
protected lemma mul_inv_eq_one (h : IsUnit b) : a * b⁻¹ = 1 ↔ a = b 
goal: a + -b = 0 ↔ a = b

full_name: IsUnit.inv_mul_eq_one
code: @[to_additive]
protected lemma inv_mul_eq_one (h : IsUnit a) : a⁻¹ * b = 1 ↔ a = b 
goal: a⁻¹ * b = 1 ↔ a = b

full_name: IsAddUnit.neg_add_eq_zero
code: @[to_additive]
protected lemma inv_mul_eq_one (h : IsUnit a) : a⁻¹ * b = 1 ↔ a = b 
goal: -a + b = 0 ↔ a = b

full_name: IsUnit.mul_eq_one_iff_eq_inv
code: @[to_additive]
protected lemma mul_eq_one_iff_eq_inv (h : IsUnit b) : a * b = 1 ↔ a = b⁻¹ 
goal: a * b = 1 ↔ a = b⁻¹

full_name: IsAddUnit.add_eq_zero_iff_eq_neg
code: @[to_additive]
protected lemma mul_eq_one_iff_eq_inv (h : IsUnit b) : a * b = 1 ↔ a = b⁻¹ 
goal: a + b = 0 ↔ a = -b

full_name: IsAddUnit.add_eq_zero_iff_neg_eq
code: @[to_additive]
protected lemma mul_eq_one_iff_inv_eq (h : IsUnit a) : a * b = 1 ↔ a⁻¹ = b 
goal: a + b = 0 ↔ -a = b

full_name: IsUnit.mul_eq_one_iff_inv_eq
code: @[to_additive]
protected lemma mul_eq_one_iff_inv_eq (h : IsUnit a) : a * b = 1 ↔ a⁻¹ = b 
goal: a * b = 1 ↔ a⁻¹ = b

full_name: IsUnit.div_mul_cancel
code: @[to_additive (attr := simp)]
protected lemma div_mul_cancel (h : IsUnit b) (a : α) : a / b * b = a 
goal: a / b * b = a

full_name: IsAddUnit.sub_add_cancel
code: @[to_additive (attr := simp)]
protected lemma div_mul_cancel (h : IsUnit b) (a : α) : a / b * b = a 
goal: a - b + b = a

full_name: IsUnit.mul_div_cancel_right
code: @[to_additive (attr := simp)]
protected lemma mul_div_cancel_right (h : IsUnit b) (a : α) : a * b / b = a 
goal: a * b / b = a

full_name: IsAddUnit.add_sub_cancel_right
code: @[to_additive (attr := simp)]
protected lemma mul_div_cancel_right (h : IsUnit b) (a : α) : a * b / b = a 
goal: a + b - b = a

full_name: IsAddUnit.add_zero_sub_cancel
code: @[to_additive]
protected lemma mul_one_div_cancel (h : IsUnit a) : a * (1 / a) = 1 
goal: a + (0 - a) = 0

full_name: IsUnit.mul_one_div_cancel
code: @[to_additive]
protected lemma mul_one_div_cancel (h : IsUnit a) : a * (1 / a) = 1 
goal: a * (1 / a) = 1

full_name: IsUnit.one_div_mul_cancel
code: @[to_additive]
protected lemma one_div_mul_cancel (h : IsUnit a) : 1 / a * a = 1 
goal: 1 / a * a = 1

full_name: IsAddUnit.zero_sub_add_cancel
code: @[to_additive]
protected lemma one_div_mul_cancel (h : IsUnit a) : 1 / a * a = 1 
goal: 0 - a + a = 0

full_name: IsAddUnit.neg
code: @[to_additive]
lemma inv (h : IsUnit a) : IsUnit a⁻¹ 
goal: IsAddUnit (-a)

full_name: IsUnit.inv
code: @[to_additive]
lemma inv (h : IsUnit a) : IsUnit a⁻¹ 
goal: IsUnit a⁻¹

full_name: IsUnit.div
code: @[to_additive] lemma div (ha : IsUnit a) (hb : IsUnit b) : IsUnit (a / b) 
goal: IsUnit (a / b)

full_name: IsAddUnit.sub
code: @[to_additive] lemma div (ha : IsUnit a) (hb : IsUnit b) : IsUnit (a / b) 
goal: IsAddUnit (a - b)

full_name: IsUnit.div_left_inj
code: @[to_additive]
protected lemma div_left_inj (h : IsUnit c) : a / c = b / c ↔ a = b 
goal: a / c = b / c ↔ a = b

full_name: IsAddUnit.sub_left_inj
code: @[to_additive]
protected lemma div_left_inj (h : IsUnit c) : a / c = b / c ↔ a = b 
goal: a - c = b - c ↔ a = b

full_name: IsAddUnit.sub_eq_iff
code: @[to_additive]
protected lemma div_eq_iff (h : IsUnit b) : a / b = c ↔ a = c * b 
goal: a - b = c ↔ a = c + b

full_name: IsUnit.div_eq_iff
code: @[to_additive]
protected lemma div_eq_iff (h : IsUnit b) : a / b = c ↔ a = c * b 
goal: a / b = c ↔ a = c * b

full_name: IsUnit.eq_div_iff
code: @[to_additive]
protected lemma eq_div_iff (h : IsUnit c) : a = b / c ↔ a * c = b 
goal: a = b / c ↔ a * c = b

full_name: IsAddUnit.eq_sub_iff
code: @[to_additive]
protected lemma eq_div_iff (h : IsUnit c) : a = b / c ↔ a * c = b 
goal: a = b - c ↔ a + c = b

full_name: IsAddUnit.sub_eq_of_eq_add
code: @[to_additive]
protected lemma div_eq_of_eq_mul (h : IsUnit b) : a = c * b → a / b = c 
goal: a = c + b → a - b = c

full_name: IsUnit.div_eq_of_eq_mul
code: @[to_additive]
protected lemma div_eq_of_eq_mul (h : IsUnit b) : a = c * b → a / b = c 
goal: a = c * b → a / b = c

full_name: IsUnit.eq_div_of_mul_eq
code: @[to_additive]
protected lemma eq_div_of_mul_eq (h : IsUnit c) : a * c = b → a = b / c 
goal: a * c = b → a = b / c

full_name: IsAddUnit.eq_sub_of_add_eq
code: @[to_additive]
protected lemma eq_div_of_mul_eq (h : IsUnit c) : a * c = b → a = b / c 
goal: a + c = b → a = b - c

full_name: IsUnit.div_eq_one_iff_eq
code: @[to_additive]
protected lemma div_eq_one_iff_eq (h : IsUnit b) : a / b = 1 ↔ a = b 
goal: a / b = 1 ↔ a = b

full_name: IsAddUnit.sub_eq_zero_iff_eq
code: @[to_additive]
protected lemma div_eq_one_iff_eq (h : IsUnit b) : a / b = 1 ↔ a = b 
goal: a - b = 0 ↔ a = b

full_name: IsAddUnit.sub_add_cancel_right
code: @[to_additive]
protected lemma div_mul_cancel_right (h : IsUnit b) (a : α) : b / (a * b) = a⁻¹ 
goal: b - (a + b) = -a

full_name: IsUnit.div_mul_cancel_right
code: @[to_additive]
protected lemma div_mul_cancel_right (h : IsUnit b) (a : α) : b / (a * b) = a⁻¹ 
goal: b / (a * b) = a⁻¹

full_name: IsAddUnit.sub_add_left
code: @[to_additive]
protected lemma div_mul_left (h : IsUnit b) : b / (a * b) = 1 / a 
goal: b - (a + b) = 0 - a

full_name: IsUnit.div_mul_left
code: @[to_additive]
protected lemma div_mul_left (h : IsUnit b) : b / (a * b) = 1 / a 
goal: b / (a * b) = 1 / a

full_name: IsUnit.mul_div_mul_right
code: @[to_additive]
protected lemma mul_div_mul_right (h : IsUnit c) (a b : α) : a * c / (b * c) = a / b 
goal: a * c / (b * c) = a / b

full_name: IsAddUnit.add_sub_add_right
code: @[to_additive]
protected lemma mul_div_mul_right (h : IsUnit c) (a b : α) : a * c / (b * c) = a / b 
goal: a + c - (b + c) = a - b

full_name: IsUnit.mul_mul_div
code: @[to_additive]
protected lemma mul_mul_div (a : α) (h : IsUnit b) : a * b * (1 / b) = a 
goal: a * b * (1 / b) = a

full_name: IsAddUnit.add_add_sub
code: @[to_additive]
protected lemma mul_mul_div (a : α) (h : IsUnit b) : a * b * (1 / b) = a 
goal: a + b + (0 - b) = a

full_name: IsUnit.div_mul_cancel_left
code: @[to_additive]
protected lemma div_mul_cancel_left (h : IsUnit a) (b : α) : a / (a * b) = b⁻¹ 
goal: a / (a * b) = b⁻¹

full_name: IsAddUnit.sub_add_cancel_left
code: @[to_additive]
protected lemma div_mul_cancel_left (h : IsUnit a) (b : α) : a / (a * b) = b⁻¹ 
goal: a - (a + b) = -b

full_name: IsUnit.div_mul_right
code: @[to_additive]
protected lemma div_mul_right (h : IsUnit a) (b : α) : a / (a * b) = 1 / b 
goal: a / (a * b) = 1 / b

full_name: IsAddUnit.sub_add_right
code: @[to_additive]
protected lemma div_mul_right (h : IsUnit a) (b : α) : a / (a * b) = 1 / b 
goal: a - (a + b) = 0 - b

full_name: IsUnit.mul_div_cancel_left
code: @[to_additive]
protected lemma mul_div_cancel_left (h : IsUnit a) (b : α) : a * b / a = b 
goal: a * b / a = b

full_name: IsAddUnit.add_sub_cancel_left
code: @[to_additive]
protected lemma mul_div_cancel_left (h : IsUnit a) (b : α) : a * b / a = b 
goal: a + b - a = b

full_name: IsUnit.mul_div_cancel
code: @[to_additive]
protected lemma mul_div_cancel (h : IsUnit a) (b : α) : a * (b / a) = b 
goal: a * (b / a) = b

full_name: IsAddUnit.add_sub_cancel
code: @[to_additive]
protected lemma mul_div_cancel (h : IsUnit a) (b : α) : a * (b / a) = b 
goal: a + (b - a) = b

full_name: IsUnit.mul_div_mul_left
code: @[to_additive]
protected lemma mul_div_mul_left (h : IsUnit c) (a b : α) : c * a / (c * b) = a / b 
goal: c * a / (c * b) = a / b

full_name: IsAddUnit.add_sub_add_left
code: @[to_additive]
protected lemma mul_div_mul_left (h : IsUnit c) (a b : α) : c * a / (c * b) = a / b 
goal: c + a - (c + b) = a - b

full_name: IsAddUnit.add_eq_add_of_sub_eq_sub
code: @[to_additive]
protected lemma mul_eq_mul_of_div_eq_div (hb : IsUnit b) (hd : IsUnit d)
    (a c : α) (h : a / b = c / d) : a * d = c * b 
goal: a + d = c + b

full_name: IsUnit.mul_eq_mul_of_div_eq_div
code: @[to_additive]
protected lemma mul_eq_mul_of_div_eq_div (hb : IsUnit b) (hd : IsUnit d)
    (a c : α) (h : a / b = c / d) : a * d = c * b 
goal: a * d = c * b

full_name: IsUnit.div_eq_div_iff
code: @[to_additive]
protected lemma div_eq_div_iff (hb : IsUnit b) (hd : IsUnit d) :
    a / b = c / d ↔ a * d = c * b 
goal: a / b = c / d ↔ a * d = c * b

full_name: IsAddUnit.sub_eq_sub_iff
code: @[to_additive]
protected lemma div_eq_div_iff (hb : IsUnit b) (hd : IsUnit d) :
    a / b = c / d ↔ a * d = c * b 
goal: a - b = c - d ↔ a + d = c + b

full_name: IsAddUnit.sub_sub_cancel
code: @[to_additive]
protected lemma div_div_cancel (h : IsUnit a) : a / (a / b) = b 
goal: a - (a - b) = b

full_name: IsUnit.div_div_cancel
code: @[to_additive]
protected lemma div_div_cancel (h : IsUnit a) : a / (a / b) = b 
goal: a / (a / b) = b

full_name: IsUnit.div_div_cancel_left
code: @[to_additive]
protected lemma div_div_cancel_left (h : IsUnit a) : a / b / a = b⁻¹ 
goal: a / b / a = b⁻¹

full_name: IsAddUnit.sub_sub_cancel_left
code: @[to_additive]
protected lemma div_div_cancel_left (h : IsUnit a) : a / b / a = b⁻¹ 
goal: a - b - a = -b

full_name: divp_eq_div
code: @[field_simps]
lemma divp_eq_div [DivisionMonoid α] (a : α) (u : αˣ) : a /ₚ u = a / u 
goal: a /ₚ u = a / ↑u

full_name: AddGroup.isAddUnit
code: @[to_additive]
lemma Group.isUnit [Group α] (a : α) : IsUnit a 
goal: IsAddUnit a

full_name: Group.isUnit
code: @[to_additive]
lemma Group.isUnit [Group α] (a : α) : IsUnit a 
goal: IsUnit a

full_name: invOfIsUnit
code: /-- Constructs an inv operation for a `Monoid` consisting only of units. -/
noncomputable def invOfIsUnit [Monoid M] (h : ∀ a : M, IsUnit a) : Inv M 
goal: Inv M

full_name: groupOfIsUnit
code: /-- Constructs a `Group` structure on a `Monoid` consisting only of units. -/
noncomputable def groupOfIsUnit [hM : Monoid M] (h : ∀ a : M, IsUnit a) : Group M 
goal: Group M

full_name: commGroupOfIsUnit
code: /-- Constructs a `CommGroup` structure on a `CommMonoid` consisting only of units. -/
noncomputable def commGroupOfIsUnit [hM : CommMonoid M] (h : ∀ a : M, IsUnit a) : CommGroup M 
goal: CommGroup M