Multiplicative and additive equivs #
In this file we define two extensions of Equiv
called AddEquiv
and MulEquiv
, which are
datatypes representing isomorphisms of AddMonoid
s/AddGroup
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.
Tags #
Equiv, MulEquiv, AddEquiv
Make a ZeroHom
inverse from the bijective inverse of a ZeroHom
Equations
- ZeroHom.inverse f g h₁ = { toFun := g, map_zero' := (_ : g 0 = 0) }
Instances For
Makes a OneHom
inverse from the bijective inverse of a OneHom
Equations
- OneHom.inverse f g h₁ = { toFun := g, map_one' := (_ : g 1 = 1) }
Instances For
Makes an additive inverse from a bijection which preserves addition.
Equations
- AddHom.inverse f g h₁ h₂ = { toFun := g, map_add' := (_ : ∀ (x y : N), g (x + y) = g x + g y) }
Instances For
Makes a multiplicative inverse from a bijection which preserves multiplication.
Equations
- MulHom.inverse f g h₁ h₂ = { toFun := g, map_mul' := (_ : ∀ (x y : N), g (x * y) = g x * g y) }
Instances For
The inverse of a bijective AddMonoidHom
is an AddMonoidHom
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The inverse of a bijective MonoidHom
is a MonoidHom
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
AddEquiv α β
is the type of an equiv α ≃ β
which preserves addition.
- toFun : A → B
- invFun : B → A
- left_inv : Function.LeftInverse self.invFun self.toFun
- right_inv : Function.RightInverse self.invFun self.toFun
The proposition that the function preserves addition
Instances For
The AddHom
underlying an AddEquiv
.
Equations
- AddEquiv.toAddHom self = { toFun := self.toFun, map_add' := (_ : ∀ (x y : A), self.toEquiv.toFun (x + y) = self.toEquiv.toFun x + self.toEquiv.toFun y) }
Instances For
MulEquiv α β
is the type of an equiv α ≃ β
which preserves multiplication.
- toFun : M → N
- invFun : N → M
- left_inv : Function.LeftInverse self.invFun self.toFun
- right_inv : Function.RightInverse self.invFun self.toFun
The proposition that the function preserves multiplication
Instances For
Notation for a MulEquiv
.
Equations
- «term_≃*_» = Lean.ParserDescr.trailingNode `term_≃*_ 25 25 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≃* ") (Lean.ParserDescr.cat `term 26))
Instances For
Notation for an AddEquiv
.
Equations
- «term_≃+_» = Lean.ParserDescr.trailingNode `term_≃+_ 25 25 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≃+ ") (Lean.ParserDescr.cat `term 26))
Instances For
Equations
- (_ : AddHomClass F M N) = (_ : AddHomClass F M N)
Equations
- (_ : MulHomClass F M N) = (_ : MulHomClass F M N)
Equations
- (_ : AddMonoidHomClass F M N) = (_ : AddMonoidHomClass F M N)
Equations
- (_ : MonoidHomClass F M N) = (_ : MonoidHomClass F M N)
Equations
- (_ : ZeroHomClass F α β) = (_ : ZeroHomClass F α β)
Equations
- (_ : MonoidWithZeroHomClass F α β) = (_ : MonoidWithZeroHomClass F α β)
Turn an element of a type F
satisfying AddEquivClass F α β
into an actual
AddEquiv
. This is declared as the default coercion from F
to α ≃+ β
.
Equations
Instances For
Turn an element of a type F
satisfying MulEquivClass F α β
into an actual
MulEquiv
. This is declared as the default coercion from F
to α ≃* β
.
Equations
Instances For
Any type satisfying AddEquivClass
can be cast into AddEquiv
via
AddEquivClass.toAddEquiv
.
Equations
- instCoeTCAddEquiv = { coe := AddEquivClass.toAddEquiv }
Any type satisfying MulEquivClass
can be cast into MulEquiv
via
MulEquivClass.toMulEquiv
.
Equations
- instCoeTCMulEquiv = { coe := MulEquivClass.toMulEquiv }
Equations
- (_ : AddEquivClass (M ≃+ N) M N) = (_ : AddEquivClass (M ≃+ N) M N)
Equations
- (_ : MulEquivClass (M ≃* N) M N) = (_ : MulEquivClass (M ≃* N) M N)
The identity map is an additive isomorphism.
Equations
- AddEquiv.refl M = let src := Equiv.refl M; { toEquiv := src, map_add' := (_ : ∀ (x x_1 : M), (Equiv.refl M).toFun (x + x_1) = (Equiv.refl M).toFun (x + x_1)) }
Instances For
The identity map is a multiplicative isomorphism.
Equations
- MulEquiv.refl M = let src := Equiv.refl M; { toEquiv := src, map_mul' := (_ : ∀ (x x_1 : M), (Equiv.refl M).toFun (x * x_1) = (Equiv.refl M).toFun (x * x_1)) }
Instances For
Equations
- AddEquiv.instInhabitedAddEquiv = { default := AddEquiv.refl M }
Equations
- MulEquiv.instInhabitedMulEquiv = { default := MulEquiv.refl M }
See Note [custom simps projection]
Equations
Instances For
See Note [custom simps projection]
Equations
Instances For
Transitivity of addition-preserving isomorphisms
Equations
- AddEquiv.trans h1 h2 = let src := h1.trans h2.toEquiv; { toEquiv := src, map_add' := (_ : ∀ (x y : M), h2 (h1 (x + y)) = h2 (h1 x) + h2 (h1 y)) }
Instances For
Transitivity of multiplication-preserving isomorphisms
Equations
- MulEquiv.trans h1 h2 = let src := h1.trans h2.toEquiv; { toEquiv := src, map_mul' := (_ : ∀ (x y : M), h2 (h1 (x * y)) = h2 (h1 x) * h2 (h1 y)) }
Instances For
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 AddSemigroup
homomorphism is an isomorphism
Equations
- AddEquiv.ofBijective f hf = let src := Equiv.ofBijective (⇑f) hf; { toEquiv := src, map_add' := (_ : ∀ (x y : M), f (x + y) = f x + f y) }
Instances For
A bijective Semigroup
homomorphism is an isomorphism
Equations
- MulEquiv.ofBijective f hf = let src := Equiv.ofBijective (⇑f) hf; { toEquiv := src, map_mul' := (_ : ∀ (x y : M), f (x * y) = f x * f y) }
Instances For
Extract the forward direction of an additive equivalence as an addition-preserving function.
Equations
Instances For
Extract the forward direction of a multiplicative equivalence as a multiplication-preserving function.
Equations
Instances For
An additive analogue of Equiv.arrowCongr
,
where the equivalence between the targets is additive.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A multiplicative analogue of Equiv.arrowCongr
,
where the equivalence between the targets is multiplicative.
Equations
- One or more equations did not get rendered due to their size.
Instances For
An additive analogue of Equiv.arrowCongr
,
for additive maps from an additive monoid to a commutative additive monoid.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A multiplicative analogue of Equiv.arrowCongr
,
for multiplicative maps from a monoid to a commutative monoid.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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 AddEquiv
version of Equiv.piCongrRight
, and the dependent version of
AddEquiv.arrowCongr
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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 MulEquiv
version of Equiv.piCongrRight
, and the dependent version of
MulEquiv.arrowCongr
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A family indexed by a type with a unique element
is AddEquiv
to the element at the single index.
Equations
- AddEquiv.piUnique M = let src := Equiv.piUnique M; { toEquiv := src, map_add' := (_ : ∀ (x x_1 : (j : ι) → M j), (x + x_1) default = x default + x_1 default) }
Instances For
A family indexed by a type with a unique element
is MulEquiv
to the element at the single index.
Equations
- MulEquiv.piUnique M = let src := Equiv.piUnique M; { toEquiv := src, map_mul' := (_ : ∀ (x x_1 : (j : ι) → M j), (x * x_1) default = x default * x_1 default) }
Instances For
Groups #
An additive equivalence of additive groups preserves negation.
A multiplicative equivalence of groups preserves inversion.
An additive equivalence of additive groups preserves subtractions.
A multiplicative equivalence of groups preserves division.
Given a pair of additive homomorphisms f
, g
such that g.comp f = id
and
f.comp g = id
, returns an additive equivalence with toFun = f
and invFun = g
. This
constructor is useful if the underlying type(s) have specialized ext
lemmas for additive
homomorphisms.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given a pair of multiplicative homomorphisms f
, g
such that g.comp f = id
and
f.comp g = id
, returns a multiplicative equivalence with toFun = f
and invFun = g
. This
constructor is useful if the underlying type(s) have specialized ext
lemmas for multiplicative
homomorphisms.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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 toFun = f
and invFun = g
. This
constructor is useful if the underlying type(s) have specialized ext
lemmas for additive
monoid homomorphisms.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given a pair of monoid homomorphisms f
, g
such that g.comp f = id
and f.comp g = id
,
returns a multiplicative equivalence with toFun = f
and invFun = g
. This constructor is
useful if the underlying type(s) have specialized ext
lemmas for monoid homomorphisms.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Negation on an AddGroup
is a permutation of the underlying type.
Equations
- Equiv.neg G = Function.Involutive.toPerm Neg.neg (_ : Function.Involutive Neg.neg)
Instances For
Inversion on a Group
or GroupWithZero
is a permutation of the underlying type.
Equations
- Equiv.inv G = Function.Involutive.toPerm Inv.inv (_ : Function.Involutive Inv.inv)