Module docstring
{"# Multiplicative and additive equivalence acting on units. "}
{"# Multiplicative and additive equivalence acting on units. "}
toUnits
definition
[Group G] : G ≃* Gˣ
/-- A group is isomorphic to its group of units. -/
@[to_additive (attr := simps apply_val symm_apply)
"An additive group is isomorphic to its group of additive units"]
def toUnits [Group G] : G ≃* Gˣ where
toFun x := ⟨x, x⁻¹, mul_inv_cancel _, inv_mul_cancel _⟩
invFun x := x
left_inv _ := rfl
right_inv _ := Units.ext rfl
map_mul' _ _ := Units.ext rfl
toUnits_val_apply
theorem
{G : Type*} [Group G] (x : Gˣ) : toUnits (x : G) = x
@[to_additive (attr := simp)]
lemma toUnits_val_apply {G : Type*} [Group G] (x : Gˣ) : toUnits (x : G) = x := by
simp_rw [MulEquiv.apply_eq_iff_symm_apply, toUnits_symm_apply]
Units.mapEquiv
definition
(h : M ≃* N) : Mˣ ≃* Nˣ
/-- A multiplicative equivalence of monoids defines a multiplicative equivalence
of their groups of units. -/
def mapEquiv (h : M ≃* N) : MˣMˣ ≃* Nˣ :=
{ map h.toMonoidHom with
invFun := map h.symm.toMonoidHom,
left_inv := fun u => ext <| h.left_inv u,
right_inv := fun u => ext <| h.right_inv u }
Units.mapEquiv_symm
theorem
(h : M ≃* N) : (mapEquiv h).symm = mapEquiv h.symm
Units.coe_mapEquiv
theorem
(h : M ≃* N) (x : Mˣ) : (mapEquiv h x : N) = h x
@[simp]
theorem coe_mapEquiv (h : M ≃* N) (x : Mˣ) : (mapEquiv h x : N) = h x :=
rfl
Units.mulLeft
definition
(u : Mˣ) : Equiv.Perm M
/-- Left multiplication by a unit of a monoid is a permutation of the underlying type. -/
@[to_additive (attr := simps -fullyApplied apply)
"Left addition of an additive unit is a permutation of the underlying type."]
def mulLeft (u : Mˣ) : Equiv.Perm M where
toFun x := u * x
invFun x := u⁻¹ * x
left_inv := u.inv_mul_cancel_left
right_inv := u.mul_inv_cancel_left
Units.mulLeft_symm
theorem
(u : Mˣ) : u.mulLeft.symm = u⁻¹.mulLeft
@[to_additive (attr := simp)]
theorem mulLeft_symm (u : Mˣ) : u.mulLeft.symm = u⁻¹.mulLeft :=
Equiv.ext fun _ => rfl
Units.mulLeft_bijective
theorem
(a : Mˣ) : Function.Bijective ((a * ·) : M → M)
@[to_additive]
theorem mulLeft_bijective (a : Mˣ) : Function.Bijective ((a * ·) : M → M) :=
(mulLeft a).bijective
Units.mulRight
definition
(u : Mˣ) : Equiv.Perm M
/-- Right multiplication by a unit of a monoid is a permutation of the underlying type. -/
@[to_additive (attr := simps -fullyApplied apply)
"Right addition of an additive unit is a permutation of the underlying type."]
def mulRight (u : Mˣ) : Equiv.Perm M where
toFun x := x * u
invFun x := x * ↑u⁻¹
left_inv x := mul_inv_cancel_right x u
right_inv x := inv_mul_cancel_right x u
Units.mulRight_symm
theorem
(u : Mˣ) : u.mulRight.symm = u⁻¹.mulRight
@[to_additive (attr := simp)]
theorem mulRight_symm (u : Mˣ) : u.mulRight.symm = u⁻¹.mulRight :=
Equiv.ext fun _ => rfl
Units.mulRight_bijective
theorem
(a : Mˣ) : Function.Bijective ((· * a) : M → M)
@[to_additive]
theorem mulRight_bijective (a : Mˣ) : Function.Bijective ((· * a) : M → M) :=
(mulRight a).bijective
Equiv.mulLeft
definition
(a : G) : Perm G
/-- Left multiplication in a `Group` is a permutation of the underlying type. -/
@[to_additive "Left addition in an `AddGroup` is a permutation of the underlying type."]
protected def mulLeft (a : G) : Perm G :=
(toUnits a).mulLeft
Equiv.coe_mulLeft
theorem
(a : G) : ⇑(Equiv.mulLeft a) = (a * ·)
@[to_additive (attr := simp)]
theorem coe_mulLeft (a : G) : ⇑(Equiv.mulLeft a) = (a * ·) :=
rfl
Equiv.mulLeft_symm_apply
theorem
(a : G) : ((Equiv.mulLeft a).symm : G → G) = (a⁻¹ * ·)
/-- Extra simp lemma that `dsimp` can use. `simp` will never use this. -/
@[to_additive (attr := simp) "Extra simp lemma that `dsimp` can use. `simp` will never use this."]
theorem mulLeft_symm_apply (a : G) : ((Equiv.mulLeft a).symm : G → G) = (a⁻¹ * ·) :=
rfl
Equiv.mulLeft_symm
theorem
(a : G) : (Equiv.mulLeft a).symm = Equiv.mulLeft a⁻¹
@[to_additive (attr := simp)]
theorem mulLeft_symm (a : G) : (Equiv.mulLeft a).symm = Equiv.mulLeft a⁻¹ :=
ext fun _ => rfl
Group.mulLeft_bijective
theorem
(a : G) : Function.Bijective (a * ·)
@[to_additive]
theorem _root_.Group.mulLeft_bijective (a : G) : Function.Bijective (a * ·) :=
(Equiv.mulLeft a).bijective
Equiv.mulRight
definition
(a : G) : Perm G
/-- Right multiplication in a `Group` is a permutation of the underlying type. -/
@[to_additive "Right addition in an `AddGroup` is a permutation of the underlying type."]
protected def mulRight (a : G) : Perm G :=
(toUnits a).mulRight
Equiv.coe_mulRight
theorem
(a : G) : ⇑(Equiv.mulRight a) = fun x => x * a
@[to_additive (attr := simp)]
theorem coe_mulRight (a : G) : ⇑(Equiv.mulRight a) = fun x => x * a :=
rfl
Equiv.mulRight_symm
theorem
(a : G) : (Equiv.mulRight a).symm = Equiv.mulRight a⁻¹
@[to_additive (attr := simp)]
theorem mulRight_symm (a : G) : (Equiv.mulRight a).symm = Equiv.mulRight a⁻¹ :=
ext fun _ => rfl
Equiv.mulRight_symm_apply
theorem
(a : G) : ((Equiv.mulRight a).symm : G → G) = fun x => x * a⁻¹
/-- Extra simp lemma that `dsimp` can use. `simp` will never use this. -/
@[to_additive (attr := simp) "Extra simp lemma that `dsimp` can use. `simp` will never use this."]
theorem mulRight_symm_apply (a : G) : ((Equiv.mulRight a).symm : G → G) = fun x => x * a⁻¹ :=
rfl
Group.mulRight_bijective
theorem
(a : G) : Function.Bijective (· * a)
@[to_additive]
theorem _root_.Group.mulRight_bijective (a : G) : Function.Bijective (· * a) :=
(Equiv.mulRight a).bijective
Equiv.divLeft
definition
(a : G) : G ≃ G
/-- A version of `Equiv.mulLeft a b⁻¹` that is defeq to `a / b`. -/
@[to_additive (attr := simps) " A version of `Equiv.addLeft a (-b)` that is defeq to `a - b`. "]
protected def divLeft (a : G) : G ≃ G where
toFun b := a / b
invFun b := b⁻¹ * a
left_inv b := by simp [div_eq_mul_inv]
right_inv b := by simp [div_eq_mul_inv]
Equiv.divLeft_eq_inv_trans_mulLeft
theorem
(a : G) : Equiv.divLeft a = (Equiv.inv G).trans (Equiv.mulLeft a)
@[to_additive]
theorem divLeft_eq_inv_trans_mulLeft (a : G) :
Equiv.divLeft a = (Equiv.inv G).trans (Equiv.mulLeft a) :=
ext fun _ => div_eq_mul_inv _ _
Equiv.divRight
definition
(a : G) : G ≃ G
/-- A version of `Equiv.mulRight a⁻¹ b` that is defeq to `b / a`. -/
@[to_additive (attr := simps) " A version of `Equiv.addRight (-a) b` that is defeq to `b - a`. "]
protected def divRight (a : G) : G ≃ G where
toFun b := b / a
invFun b := b * a
left_inv b := by simp [div_eq_mul_inv]
right_inv b := by simp [div_eq_mul_inv]
Equiv.divRight_eq_mulRight_inv
theorem
(a : G) : Equiv.divRight a = Equiv.mulRight a⁻¹
@[to_additive]
theorem divRight_eq_mulRight_inv (a : G) : Equiv.divRight a = Equiv.mulRight a⁻¹ :=
ext fun _ => div_eq_mul_inv _ _
unitsEquivProdSubtype
definition
[Monoid α] : αˣ ≃ { p : α × α // p.1 * p.2 = 1 ∧ p.2 * p.1 = 1 }
/-- The `αˣ` type is equivalent to a subtype of `α × α`. -/
@[simps]
def unitsEquivProdSubtype [Monoid α] : αˣαˣ ≃ {p : α × α // p.1 * p.2 = 1 ∧ p.2 * p.1 = 1} where
toFun u := ⟨(u, ↑u⁻¹), u.val_inv, u.inv_val⟩
invFun p := Units.mk (p : α × α).1 (p : α × α).2 p.prop.1 p.prop.2
left_inv _ := Units.ext rfl
right_inv _ := Subtype.ext <| Prod.ext rfl rfl
MulEquiv.inv
definition
(G : Type*) [DivisionCommMonoid G] : G ≃* G
/-- In a `DivisionCommMonoid`, `Equiv.inv` is a `MulEquiv`. There is a variant of this
`MulEquiv.inv' G : G ≃* Gᵐᵒᵖ` for the non-commutative case. -/
@[to_additive (attr := simps apply)
"When the `AddGroup` is commutative, `Equiv.neg` is an `AddEquiv`."]
def MulEquiv.inv (G : Type*) [DivisionCommMonoid G] : G ≃* G :=
{ Equiv.inv G with toFun := Inv.inv, invFun := Inv.inv, map_mul' := mul_inv }
MulEquiv.inv_symm
theorem
(G : Type*) [DivisionCommMonoid G] : (MulEquiv.inv G).symm = MulEquiv.inv G
@[to_additive (attr := simp)]
theorem MulEquiv.inv_symm (G : Type*) [DivisionCommMonoid G] :
(MulEquiv.inv G).symm = MulEquiv.inv G :=
rfl
MulEquiv.isUnit_map
theorem
: IsUnit (f x) ↔ IsUnit x
@[to_additive (attr := simp high)]
lemma MulEquiv.isUnit_map : IsUnitIsUnit (f x) ↔ IsUnit x where
mp hx := by
simpa using hx.map <| MonoidHom.mk ⟨EquivLike.inv f, EquivLike.injective f <| by simp⟩
fun x y ↦ EquivLike.injective f <| by simp
mpr := .map f
isLocalHom_equiv
theorem
: IsLocalHom f
@[instance] theorem isLocalHom_equiv : IsLocalHom f where map_nonunit := by simp