Multiplicative and additive equivs #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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 : A → B
- inv_fun : B → A
- left_inv : function.left_inverse self.inv_fun self.to_fun
- right_inv : function.right_inverse self.inv_fun self.to_fun
- map_add' : ∀ (x y : A), self.to_fun (x + y) = self.to_fun x + self.to_fun y
add_equiv α β is the type of an equiv α ≃ β which preserves addition.
Instances for add_equiv
- 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
.
Instances of this typeclass
Instances of other typeclasses for add_equiv_class
- add_equiv_class.has_sizeof_inst
- 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.
Instances for mul_equiv
- 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
.
Instances of this typeclass
Instances of other typeclasses for mul_equiv_class
- mul_equiv_class.has_sizeof_inst
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
- 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 = {to_fun := (equiv.equiv_of_unique M N).to_fun, inv_fun := (equiv.equiv_of_unique M N).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 = {to_fun := (equiv.equiv_of_unique M N).to_fun, inv_fun := (equiv.equiv_of_unique M N).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 _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 _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_semigroup
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 semigroup
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 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
homomorphisms.
Given a pair of multiplicative 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 multiplicative
homomorphisms.
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.
Inversion on a group
or group_with_zero
is a permutation of the underlying type.