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
.
- coe : F → A → B
- inv : F → B → A
- left_inv : ∀ (e : F), function.left_inverse (add_equiv_class.inv e) (add_equiv_class.coe e)
- right_inv : ∀ (e : F), function.right_inverse (add_equiv_class.inv e) (add_equiv_class.coe e)
- coe_injective' : ∀ (e g : F), add_equiv_class.coe e = add_equiv_class.coe g → add_equiv_class.inv e = add_equiv_class.inv g → e = g
- map_add : ∀ (f : F) (a b : A), ⇑f (a + b) = ⇑f a + ⇑f b
add_equiv_class F A B
states that F
is a type of addition-preserving morphisms.
You should extend this class when you extend add_equiv
.
- 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.
- coe : F → A → B
- inv : F → B → A
- left_inv : ∀ (e : F), function.left_inverse (mul_equiv_class.inv e) (mul_equiv_class.coe e)
- right_inv : ∀ (e : F), function.right_inverse (mul_equiv_class.inv e) (mul_equiv_class.coe e)
- coe_injective' : ∀ (e g : F), mul_equiv_class.coe e = mul_equiv_class.coe g → mul_equiv_class.inv e = mul_equiv_class.inv g → e = g
- map_mul : ∀ (f : F) (a b : A), ⇑f (a * b) = (⇑f a) * ⇑f b
mul_equiv_class F A B
states that F
is a type of multiplication-preserving morphisms.
You should extend this class when you extend mul_equiv
.
Equations
- mul_equiv_class.mul_hom_class F = {coe := mul_equiv_class.coe h, coe_injective' := _, map_mul := _}
Equations
- add_equiv_class.add_hom_class F = {coe := add_equiv_class.coe h, coe_injective' := _, map_add := _}
Equations
- mul_equiv_class.monoid_hom_class F = {coe := mul_equiv_class.coe _inst_3, coe_injective' := _, map_mul := _, map_one := _}
Equations
- add_equiv_class.add_monoid_hom_class F = {coe := add_equiv_class.coe _inst_3, coe_injective' := _, map_add := _, map_zero := _}
Equations
- mul_equiv_class.to_monoid_with_zero_hom_class F = {coe := monoid_hom_class.coe (mul_equiv_class.monoid_hom_class F), coe_injective' := _, map_mul := _, map_one := _, map_zero := _}
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}
Equations
- mul_equiv.mul_equiv_class = {coe := mul_equiv.to_fun _inst_2, inv := mul_equiv.inv_fun _inst_2, left_inv := _, right_inv := _, coe_injective' := _, map_mul := _}
Equations
- add_equiv.add_equiv_class = {coe := add_equiv.to_fun _inst_2, inv := add_equiv.inv_fun _inst_2, left_inv := _, right_inv := _, coe_injective' := _, map_add := _}
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' := _}
There is a unique additive monoid homomorphism between two additive monoids with a unique element.
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 #
An additive isomorphism of additive monoids sends 0
to 0
(and is hence an additive monoid isomorphism).
A multiplicative isomorphism 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
.
A family indexed by a nonempty subsingleton type is equivalent to the element at the single index.
Equations
- mul_equiv.Pi_subsingleton M i = {to_fun := (equiv.Pi_subsingleton M i).to_fun, inv_fun := (equiv.Pi_subsingleton M i).inv_fun, left_inv := _, right_inv := _, map_mul' := _}
A family indexed by a nonempty subsingleton type is equivalent to the element at the single index.
Equations
- add_equiv.Pi_subsingleton M i = {to_fun := (equiv.Pi_subsingleton M i).to_fun, inv_fun := (equiv.Pi_subsingleton M i).inv_fun, left_inv := _, right_inv := _, map_add' := _}
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' := _}
Inversion on a group
or group_with_zero
is a permutation of the underlying type.
Equations
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.
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.