# mathlibdocumentation

algebra.group.ext

# Extensionality lemmas for monoid and group structures #

In this file we prove extensionality lemmas for monoid and higher algebraic structures with one binary operation. Extensionality lemmas for structures that are lower in the hierarchy can be found in algebra.group.defs.

## Implementation details #

To get equality of npow etc, we define a monoid homomorphism between two monoid structures on the same type, then apply lemmas like monoid_hom.map_div, monoid_hom.map_pow etc.

## Tags #

monoid, group, extensionality

@[ext]
theorem monoid.ext {M : Type u} ⦃m₁ m₂ : monoid M⦄ (h_mul : monoid.mul = monoid.mul) :
m₁ = m₂
@[ext]
m₁ = m₂
theorem comm_monoid.to_monoid_injective {M : Type u} :
@[ext]
theorem comm_monoid.ext {M : Type u_1} ⦃m₁ m₂ : comm_monoid M⦄ (h_mul : comm_monoid.mul = comm_monoid.mul) :
m₁ = m₂
@[ext]
theorem add_comm_monoid.ext {M : Type u_1} ⦃m₁ m₂ : add_comm_monoid M⦄  :
m₁ = m₂
@[ext]
theorem left_cancel_monoid.ext {M : Type u} ⦃m₁ m₂ : left_cancel_monoid M⦄  :
m₁ = m₂
@[ext]
theorem add_left_cancel_monoid.ext {M : Type u} ⦃m₁ m₂ : add_left_cancel_monoid M⦄  :
m₁ = m₂
@[ext]
theorem add_right_cancel_monoid.ext {M : Type u} ⦃m₁ m₂ : add_right_cancel_monoid M⦄  :
m₁ = m₂
@[ext]
theorem right_cancel_monoid.ext {M : Type u} ⦃m₁ m₂ : right_cancel_monoid M⦄  :
m₁ = m₂
@[ext]
theorem add_cancel_monoid.ext {M : Type u_1} ⦃m₁ m₂ : add_cancel_monoid M⦄  :
m₁ = m₂
@[ext]
theorem cancel_monoid.ext {M : Type u_1} ⦃m₁ m₂ : cancel_monoid M⦄ (h_mul : cancel_monoid.mul = cancel_monoid.mul) :
m₁ = m₂
@[ext]
theorem add_cancel_comm_monoid.ext {M : Type u_1} ⦃m₁ m₂ : add_cancel_comm_monoid M⦄  :
m₁ = m₂
@[ext]
theorem cancel_comm_monoid.ext {M : Type u_1} ⦃m₁ m₂ : cancel_comm_monoid M⦄  :
m₁ = m₂
@[ext]
theorem div_inv_monoid.ext {M : Type u_1} ⦃m₁ m₂ : div_inv_monoid M⦄  :
m₁ = m₂
@[ext]
theorem sub_neg_monoid.ext {M : Type u_1} ⦃m₁ m₂ : sub_neg_monoid M⦄  :
m₁ = m₂
@[ext]
theorem group.ext {G : Type u_1} ⦃g₁ g₂ : group G⦄ (h_mul : group.mul = group.mul) :
g₁ = g₂
@[ext]