Multiplicative and additive equivs #
In this file we define two extensions of equiv
called add_equiv
and mul_equiv
, which are
datatypes representing isomorphisms of add_monoid
s/add_group
s and monoid
s/group
s.
Notations #
The extended equivs all have coercions to functions, and the coercions are the canonical notation when treating the isomorphisms as maps.
Implementation notes #
The fields for mul_equiv
, add_equiv
now avoid the unbundled is_mul_hom
and is_add_hom
, as
these are deprecated.
Tags #
equiv, mul_equiv, add_equiv
Makes an additive inverse from a bijection which preserves addition.
Makes a multiplicative inverse from a bijection which preserves multiplication.
The inverse of a bijective add_monoid_hom
is an add_monoid_hom
.
The inverse of a bijective monoid_hom
is a monoid_hom
.
- to_fun : M → N
- inv_fun : N → M
- left_inv : function.left_inverse self.inv_fun self.to_fun
- right_inv : function.right_inverse self.inv_fun self.to_fun
- map_mul' : ∀ (x y : M), self.to_fun (x * y) = (self.to_fun x) * self.to_fun y
mul_equiv α β
is the type of an equiv α ≃ β
which preserves multiplication.
Equations
- add_equiv.has_coe_to_fun = {coe := add_equiv.to_fun _inst_2}
Equations
- mul_equiv.has_coe_to_fun = {coe := mul_equiv.to_fun _inst_2}
The identity map is an additive isomorphism.
Equations
- add_equiv.refl M = {to_fun := (equiv.refl M).to_fun, inv_fun := (equiv.refl M).inv_fun, left_inv := _, right_inv := _, map_add' := _}
The identity map is a multiplicative isomorphism.
Equations
- mul_equiv.refl M = {to_fun := (equiv.refl M).to_fun, inv_fun := (equiv.refl M).inv_fun, left_inv := _, right_inv := _, map_mul' := _}
Equations
- add_equiv.inhabited = {default := add_equiv.refl M _inst_1}
Equations
- mul_equiv.inhabited = {default := mul_equiv.refl M _inst_1}
See Note custom simps projection
Equations
- add_equiv.simps.symm_apply e = ⇑(e.symm)
See Note [custom simps projection]
Equations
- mul_equiv.simps.symm_apply e = ⇑(e.symm)
The add_equiv
between two add_monoids with a unique element.
Equations
- add_equiv.add_equiv_of_unique_of_unique = {to_fun := equiv_of_unique_of_unique.to_fun, inv_fun := equiv_of_unique_of_unique.inv_fun, left_inv := _, right_inv := _, map_add' := _}
The mul_equiv
between two monoids with a unique element.
Equations
- mul_equiv.mul_equiv_of_unique_of_unique = {to_fun := equiv_of_unique_of_unique.to_fun, inv_fun := equiv_of_unique_of_unique.inv_fun, left_inv := _, right_inv := _, map_mul' := _}
Equations
- add_equiv.unique = {to_inhabited := {default := add_equiv.add_equiv_of_unique_of_unique _inst_8}, uniq := _}
There is a unique monoid homomorphism between two monoids with a unique element.
Equations
- mul_equiv.unique = {to_inhabited := {default := mul_equiv.mul_equiv_of_unique_of_unique _inst_8}, uniq := _}
Monoids #
A multiplicative equiv of monoids sends 1 to 1 (and is hence a monoid isomorphism).
A bijective add_monoid
homomorphism is an isomorphism
Equations
- add_equiv.of_bijective f hf = {to_fun := (equiv.of_bijective ⇑f hf).to_fun, inv_fun := (equiv.of_bijective ⇑f hf).inv_fun, left_inv := _, right_inv := _, map_add' := _}
A bijective monoid
homomorphism is an isomorphism
Equations
- mul_equiv.of_bijective f hf = {to_fun := (equiv.of_bijective ⇑f hf).to_fun, inv_fun := (equiv.of_bijective ⇑f hf).inv_fun, left_inv := _, right_inv := _, map_mul' := _}
Extract the forward direction of an additive equivalence as an addition-preserving function.
Extract the forward direction of a multiplicative equivalence as a multiplication-preserving function.
An additive analogue of equiv.arrow_congr
,
where the equivalence between the targets is additive.
A multiplicative analogue of equiv.arrow_congr
,
where the equivalence between the targets is multiplicative.
An additive analogue of equiv.arrow_congr
,
for additive maps from an additive monoid to a commutative additive monoid.
Equations
- f.add_monoid_hom_congr g = {to_fun := λ (h : M →+ P), g.to_add_monoid_hom.comp (h.comp f.symm.to_add_monoid_hom), inv_fun := λ (k : N →+ Q), g.symm.to_add_monoid_hom.comp (k.comp f.to_add_monoid_hom), left_inv := _, right_inv := _, map_add' := _}
A multiplicative analogue of equiv.arrow_congr
,
for multiplicative maps from a monoid to a commutative monoid.
Equations
- f.monoid_hom_congr g = {to_fun := λ (h : M →* P), g.to_monoid_hom.comp (h.comp f.symm.to_monoid_hom), inv_fun := λ (k : N →* Q), g.symm.to_monoid_hom.comp (k.comp f.to_monoid_hom), left_inv := _, right_inv := _, map_mul' := _}
A family of additive equivalences Π j, (Ms j ≃+ Ns j)
generates an additive equivalence between Π j, Ms j
and Π j, Ns j
.
This is the add_equiv
version of equiv.Pi_congr_right
, and the dependent version of
add_equiv.arrow_congr
.
A family of multiplicative equivalences Π j, (Ms j ≃* Ns j)
generates a
multiplicative equivalence between Π j, Ms j
and Π j, Ns j
.
This is the mul_equiv
version of equiv.Pi_congr_right
, and the dependent version of
mul_equiv.arrow_congr
.
Groups #
Given a pair of additive monoid homomorphisms f
, g
such that g.comp f = id
and f.comp g = id
, returns an additive equivalence with to_fun = f
and inv_fun = g
. This
constructor is useful if the underlying type(s) have specialized ext
lemmas for additive
monoid homomorphisms.
Given a pair of monoid homomorphisms f
, g
such that g.comp f = id
and f.comp g = id
,
returns an multiplicative equivalence with to_fun = f
and inv_fun = g
. This constructor is
useful if the underlying type(s) have specialized ext
lemmas for monoid homomorphisms.
An additive group is isomorphic to its group of additive units
A multiplicative equivalence of monoids defines a multiplicative equivalence of their groups of units.
Equations
- units.map_equiv h = {to_fun := (units.map h.to_monoid_hom).to_fun, inv_fun := ⇑(units.map h.symm.to_monoid_hom), left_inv := _, right_inv := _, map_mul' := _}
Left addition in an add_group
is a permutation of the underlying type.
Equations
- equiv.add_left a = (⇑to_add_units a).add_left
extra simp lemma that dsimp
can use. simp
will never use this.
extra simp lemma that dsimp
can use. simp
will never use this.
A version of equiv.add_left a (-b)
that is defeq to a - b
.
A version of equiv.mul_left a b⁻¹
that is defeq to a / b
.
A version of equiv.add_right (-a) b
that is defeq to b - a
.
A version of equiv.mul_right a⁻¹ b
that is defeq to b / a
.
Left multiplication by a nonzero element in a group_with_zero
is a permutation of the
underlying type.
Equations
- equiv.mul_left₀ a ha = (units.mk0 a ha).mul_left
Right multiplication by a nonzero element in a group_with_zero
is a permutation of the
underlying type.
Equations
- equiv.mul_right₀ a ha = (units.mk0 a ha).mul_right
When the add_group
is commutative, equiv.neg
is an add_equiv
.
Equations
- add_equiv.neg G = {to_fun := has_neg.neg (sub_neg_monoid.to_has_neg G), inv_fun := has_neg.neg (sub_neg_monoid.to_has_neg G), left_inv := _, right_inv := _, map_add' := _}
When the group is commutative, equiv.inv
is a mul_equiv
. There is a variant of this
mul_equiv.inv' G : G ≃* Gᵐᵒᵖ
for the non-commutative case.
Equations
- mul_equiv.inv G = {to_fun := has_inv.inv (div_inv_monoid.to_has_inv G), inv_fun := has_inv.inv (div_inv_monoid.to_has_inv G), left_inv := _, right_inv := _, map_mul' := _}
When the group with zero is commutative, equiv.inv₀
is a mul_equiv
.
Equations
- mul_equiv.inv₀ G = {to_fun := has_inv.inv (div_inv_monoid.to_has_inv G), inv_fun := has_inv.inv (div_inv_monoid.to_has_inv G), left_inv := _, right_inv := _, map_mul' := _}
Reinterpret G ≃+ H
as multiplicative G ≃* multiplicative H
.
Equations
- add_equiv.to_multiplicative = {to_fun := λ (f : G ≃+ H), {to_fun := ⇑(⇑add_monoid_hom.to_multiplicative f.to_add_monoid_hom), inv_fun := ⇑(⇑add_monoid_hom.to_multiplicative f.symm.to_add_monoid_hom), left_inv := _, right_inv := _, map_mul' := _}, inv_fun := λ (f : multiplicative G ≃* multiplicative H), {to_fun := ⇑(f.to_monoid_hom), inv_fun := ⇑(f.symm.to_monoid_hom), left_inv := _, right_inv := _, map_add' := _}, left_inv := _, right_inv := _}
Reinterpret G ≃* H
as additive G ≃+ additive H
.
Equations
- mul_equiv.to_additive = {to_fun := λ (f : G ≃* H), {to_fun := ⇑(⇑monoid_hom.to_additive f.to_monoid_hom), inv_fun := ⇑(⇑monoid_hom.to_additive f.symm.to_monoid_hom), left_inv := _, right_inv := _, map_add' := _}, inv_fun := λ (f : additive G ≃+ additive H), {to_fun := ⇑(f.to_add_monoid_hom), inv_fun := ⇑(f.symm.to_add_monoid_hom), left_inv := _, right_inv := _, map_mul' := _}, left_inv := _, right_inv := _}
Reinterpret additive G ≃+ H
as G ≃* multiplicative H
.
Equations
- add_equiv.to_multiplicative' = {to_fun := λ (f : additive G ≃+ H), {to_fun := ⇑(⇑add_monoid_hom.to_multiplicative' f.to_add_monoid_hom), inv_fun := ⇑(⇑add_monoid_hom.to_multiplicative'' f.symm.to_add_monoid_hom), left_inv := _, right_inv := _, map_mul' := _}, inv_fun := λ (f : G ≃* multiplicative H), {to_fun := ⇑(f.to_monoid_hom), inv_fun := ⇑(f.symm.to_monoid_hom), left_inv := _, right_inv := _, map_add' := _}, left_inv := _, right_inv := _}
Reinterpret G ≃* multiplicative H
as additive G ≃+ H
as.
Reinterpret G ≃+ additive H
as multiplicative G ≃* H
.
Equations
- add_equiv.to_multiplicative'' = {to_fun := λ (f : G ≃+ additive H), {to_fun := ⇑(⇑add_monoid_hom.to_multiplicative'' f.to_add_monoid_hom), inv_fun := ⇑(⇑add_monoid_hom.to_multiplicative' f.symm.to_add_monoid_hom), left_inv := _, right_inv := _, map_mul' := _}, inv_fun := λ (f : multiplicative G ≃* H), {to_fun := ⇑(f.to_monoid_hom), inv_fun := ⇑(f.symm.to_monoid_hom), left_inv := _, right_inv := _, map_add' := _}, left_inv := _, right_inv := _}
Reinterpret multiplicative G ≃* H
as G ≃+ additive H
as.