Built with
doc-gen4 , running Lean4.
Bubbles (
) indicate interactive fragments: hover for details, tap to reveal contents.
Use
Ctrl+β Ctrl+β to navigate,
Ctrl+π±οΈ to focus.
On Mac, use
Cmd instead of
Ctrl .
/-
Copyright (c) 2020 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Simon Hudon, Patrick Massot, Yury Kudryashov
! This file was ported from Lean 3 source module algebra.group.prod
! leanprover-community/mathlib commit cf9386b56953fb40904843af98b7a80757bbe7f9
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathlib.Algebra.Group.Opposite
import Mathlib.Algebra.GroupWithZero.Units.Basic
import Mathlib.Algebra.Hom.Units
/-!
# Monoid, group etc structures on `M Γ N`
In this file we define one-binop (`Monoid`, `Group` etc) structures on `M Γ N`. We also prove
trivial `simp` lemmas, and define the following operations on `MonoidHom`s:
* `fst M N : M Γ N β* M`, `snd M N : M Γ N β* N`: projections `Prod.fst` and `Prod.snd`
as `MonoidHom`s;
* `inl M N : M β* M Γ N`, `inr M N : N β* M Γ N`: inclusions of first/second monoid
into the product;
* `f.prod g : `M β* N Γ P`: sends `x` to `(f x, g x)`;
* `f.coprod g : M Γ N β* P`: sends `(x, y)` to `f x * g y`;
* `f.prodMap g : M Γ N β M' Γ N'`: `prod.map f g` as a `MonoidHom`,
sends `(x, y)` to `(f x, g y)`.
## Main declarations
* `mulMulHom`/`mulMonoidHom`/`mulMonoidWithZeroHom`: Multiplication bundled as a
multiplicative/monoid/monoid with zero homomorphism.
* `divMonoidHom`/`divMonoidWithZeroHom`: Division bundled as a monoid/monoid with zero
homomorphism.
-/
variable { A : Type _ : Type (?u.59943+1) Type _} { B : Type _ : Type (?u.21364+1) Type _} { G : Type _ : Type (?u.15455+1) Type _} { H : Type _ } { M : Type _ } { N : Type _ } { P : Type _ : Type (?u.42267+1) Type _}
namespace Prod
@[ to_additive : {M : Type u_1} β {N : Type u_2} β [inst : Add M ] β [inst : Add N ] β Add (M Γ N ) to_additive ]
instance : {M : Type u_1} β {N : Type u_2} β [inst : Mul M ] β [inst : Mul N ] β Mul (M Γ N ) instance [ Mul M ] [ Mul N ] : Mul ( M Γ N ) :=
β¨ fun p q => β¨ p . 1 : {Ξ± : Type ?u.81} β {Ξ² : Type ?u.80} β Ξ± Γ Ξ² β Ξ± 1 * q . 1 : {Ξ± : Type ?u.85} β {Ξ² : Type ?u.84} β Ξ± Γ Ξ² β Ξ± 1, p . 2 : {Ξ± : Type ?u.129} β {Ξ² : Type ?u.128} β Ξ± Γ Ξ² β Ξ² 2 * q . 2 : {Ξ± : Type ?u.133} β {Ξ² : Type ?u.132} β Ξ± Γ Ξ² β Ξ² 2β©β©
@[ to_additive : β {M : Type u_1} {N : Type u_2} [inst : Add M ] [inst_1 : Add N ] (p q : M Γ N ), (p + q ).fst = p .fst + q .fst to_additive ( attr := simp )]
theorem fst_mul : β {M : Type u_1} {N : Type u_2} [inst : Mul M ] [inst_1 : Mul N ] (p q : M Γ N ), (p * q ).fst = p .fst * q .fst fst_mul [ Mul M ] [ Mul N ] ( p q : M Γ N ) : ( p * q ). 1 : {Ξ± : Type ?u.615} β {Ξ² : Type ?u.614} β Ξ± Γ Ξ² β Ξ± 1 = p . 1 : {Ξ± : Type ?u.624} β {Ξ² : Type ?u.623} β Ξ± Γ Ξ² β Ξ± 1 * q . 1 : {Ξ± : Type ?u.628} β {Ξ² : Type ?u.627} β Ξ± Γ Ξ² β Ξ± 1 :=
rfl : β {Ξ± : Sort ?u.672} {a : Ξ± }, a = a rfl
#align prod.fst_mul Prod.fst_mul : β {M : Type u_1} {N : Type u_2} [inst : Mul M ] [inst_1 : Mul N ] (p q : M Γ N ), (p * q ).fst = p .fst * q .fst Prod.fst_mul
#align prod.fst_add Prod.fst_add : β {M : Type u_1} {N : Type u_2} [inst : Add M ] [inst_1 : Add N ] (p q : M Γ N ), (p + q ).fst = p .fst + q .fst Prod.fst_add
@[ to_additive : β {M : Type u_1} {N : Type u_2} [inst : Add M ] [inst_1 : Add N ] (p q : M Γ N ), (p + q ).snd = p .snd + q .snd to_additive ( attr := simp )]
theorem snd_mul : β [inst : Mul M ] [inst_1 : Mul N ] (p q : M Γ N ), (p * q ).snd = p .snd * q .snd snd_mul [ Mul M ] [ Mul N ] ( p q : M Γ N ) : ( p * q ). 2 : {Ξ± : Type ?u.859} β {Ξ² : Type ?u.858} β Ξ± Γ Ξ² β Ξ² 2 = p . 2 : {Ξ± : Type ?u.868} β {Ξ² : Type ?u.867} β Ξ± Γ Ξ² β Ξ² 2 * q . 2 : {Ξ± : Type ?u.872} β {Ξ² : Type ?u.871} β Ξ± Γ Ξ² β Ξ² 2 :=
rfl : β {Ξ± : Sort ?u.916} {a : Ξ± }, a = a rfl
#align prod.snd_mul Prod.snd_mul : β {M : Type u_1} {N : Type u_2} [inst : Mul M ] [inst_1 : Mul N ] (p q : M Γ N ), (p * q ).snd = p .snd * q .snd Prod.snd_mul
#align prod.snd_add Prod.snd_add : β {M : Type u_1} {N : Type u_2} [inst : Add M ] [inst_1 : Add N ] (p q : M Γ N ), (p + q ).snd = p .snd + q .snd Prod.snd_add
@[ to_additive : β {M : Type u_1} {N : Type u_2} [inst : Add M ] [inst_1 : Add N ] (aβ aβ : M ) (bβ bβ : N ),
(aβ , bβ ) + (aβ , bβ ) = (aβ + aβ , bβ + bβ ) to_additive ( attr := simp )]
theorem mk_mul_mk : β [inst : Mul M ] [inst_1 : Mul N ] (aβ aβ : M ) (bβ bβ : N ), (aβ , bβ ) * (aβ , bβ ) = (aβ * aβ , bβ * bβ ) mk_mul_mk [ Mul M ] [ Mul N ] ( aβ aβ : M ) ( bβ bβ : N ) :
( aβ , bβ ) * ( aβ , bβ ) = ( aβ * aβ , bβ * bβ ) :=
rfl : β {Ξ± : Sort ?u.1200} {a : Ξ± }, a = a rfl
#align prod.mk_mul_mk Prod.mk_mul_mk : β {M : Type u_1} {N : Type u_2} [inst : Mul M ] [inst_1 : Mul N ] (aβ aβ : M ) (bβ bβ : N ),
(aβ , bβ ) * (aβ , bβ ) = (aβ * aβ , bβ * bβ ) Prod.mk_mul_mk
#align prod.mk_add_mk Prod.mk_add_mk : β {M : Type u_1} {N : Type u_2} [inst : Add M ] [inst_1 : Add N ] (aβ aβ : M ) (bβ bβ : N ),
(aβ , bβ ) + (aβ , bβ ) = (aβ + aβ , bβ + bβ ) Prod.mk_add_mk
@[ to_additive ( attr := simp )]
theorem swap_mul [ Mul M ] [ Mul N ] ( p q : M Γ N ) : ( p * q ). swap : {Ξ± : Type ?u.1421} β {Ξ² : Type ?u.1420} β Ξ± Γ Ξ² β Ξ² Γ Ξ± swap = p . swap : {Ξ± : Type ?u.1433} β {Ξ² : Type ?u.1432} β Ξ± Γ Ξ² β Ξ² Γ Ξ± swap * q . swap : {Ξ± : Type ?u.1440} β {Ξ² : Type ?u.1439} β Ξ± Γ Ξ² β Ξ² Γ Ξ± swap :=
rfl : β {Ξ± : Sort ?u.1507} {a : Ξ± }, a = a rfl
#align prod.swap_mul Prod.swap_mul
#align prod.swap_add Prod.swap_add
@[ to_additive : β {M : Type u_1} {N : Type u_2} [inst : Add M ] [inst_1 : Add N ] (p q : M Γ N ), p + q = (p .fst + q .fst , p .snd + q .snd ) to_additive ]
theorem mul_def : β {M : Type u_1} {N : Type u_2} [inst : Mul M ] [inst_1 : Mul N ] (p q : M Γ N ), p * q = (p .fst * q .fst , p .snd * q .snd ) mul_def [ Mul M ] [ Mul N ] ( p q : M Γ N ) : p * q = ( p . 1 : {Ξ± : Type ?u.1645} β {Ξ² : Type ?u.1644} β Ξ± Γ Ξ² β Ξ± 1 * q . 1 : {Ξ± : Type ?u.1651} β {Ξ² : Type ?u.1650} β Ξ± Γ Ξ² β Ξ± 1, p . 2 : {Ξ± : Type ?u.1696} β {Ξ² : Type ?u.1695} β Ξ± Γ Ξ² β Ξ² 2 * q . 2 : {Ξ± : Type ?u.1700} β {Ξ² : Type ?u.1699} β Ξ± Γ Ξ² β Ξ² 2) :=
rfl : β {Ξ± : Sort ?u.1811} {a : Ξ± }, a = a rfl
#align prod.mul_def Prod.mul_def : β {M : Type u_1} {N : Type u_2} [inst : Mul M ] [inst_1 : Mul N ] (p q : M Γ N ), p * q = (p .fst * q .fst , p .snd * q .snd ) Prod.mul_def
#align prod.add_def Prod.add_def : β {M : Type u_1} {N : Type u_2} [inst : Add M ] [inst_1 : Add N ] (p q : M Γ N ), p + q = (p .fst + q .fst , p .snd + q .snd ) Prod.add_def
@[ to_additive : β {M : Type u_1} {N : Type u_2} [inst : AddMonoid M ] [inst_1 : Add N ] (bβ bβ : N ), (0 , bβ ) + (0 , bβ ) = (0 , bβ + bβ ) to_additive ]
theorem one_mk_mul_one_mk : β [inst : Monoid M ] [inst_1 : Mul N ] (bβ bβ : N ), (1 , bβ ) * (1 , bβ ) = (1 , bβ * bβ ) one_mk_mul_one_mk [ Monoid M ] [ Mul N ] ( bβ bβ : N ) :
(( 1 : M ), bβ ) * ( 1 , bβ ) = ( 1 , bβ * bβ ) :=
by (1 , bβ ) * (1 , bβ ) = (1 , bβ * bβ ) rw [ (1 , bβ ) * (1 , bβ ) = (1 , bβ * bβ ) mk_mul_mk : β {M : Type ?u.2305} {N : Type ?u.2306} [inst : Mul M ] [inst_1 : Mul N ] (aβ aβ : M ) (bβ bβ : N ),
(aβ , bβ ) * (aβ , bβ ) = (aβ * aβ , bβ * bβ ) mk_mul_mk, (1 * 1 , bβ * bβ ) = (1 , bβ * bβ ) (1 , bβ ) * (1 , bβ ) = (1 , bβ * bβ ) mul_one (1 , bβ * bβ ) = (1 , bβ * bβ ) ]
#align prod.one_mk_mul_one_mk Prod.one_mk_mul_one_mk : β {M : Type u_1} {N : Type u_2} [inst : Monoid M ] [inst_1 : Mul N ] (bβ bβ : N ), (1 , bβ ) * (1 , bβ ) = (1 , bβ * bβ ) Prod.one_mk_mul_one_mk
#align prod.zero_mk_add_zero_mk Prod.zero_mk_add_zero_mk : β {M : Type u_1} {N : Type u_2} [inst : AddMonoid M ] [inst_1 : Add N ] (bβ bβ : N ), (0 , bβ ) + (0 , bβ ) = (0 , bβ + bβ ) Prod.zero_mk_add_zero_mk
@[ to_additive : β {M : Type u_1} {N : Type u_2} [inst : Add M ] [inst_1 : AddMonoid N ] (aβ aβ : M ), (aβ , 0 ) + (aβ , 0 ) = (aβ + aβ , 0 ) to_additive ]
theorem mk_one_mul_mk_one : β [inst : Mul M ] [inst_1 : Monoid N ] (aβ aβ : M ), (aβ , 1 ) * (aβ , 1 ) = (aβ * aβ , 1 ) mk_one_mul_mk_one [ Mul M ] [ Monoid N ] ( aβ aβ : M ) :
( aβ , ( 1 : N )) * ( aβ , 1 ) = ( aβ * aβ , 1 ) :=
by (aβ , 1 ) * (aβ , 1 ) = (aβ * aβ , 1 ) rw [ (aβ , 1 ) * (aβ , 1 ) = (aβ * aβ , 1 ) mk_mul_mk : β {M : Type ?u.3086} {N : Type ?u.3087} [inst : Mul M ] [inst_1 : Mul N ] (aβ aβ : M ) (bβ bβ : N ),
(aβ , bβ ) * (aβ , bβ ) = (aβ * aβ , bβ * bβ ) mk_mul_mk, (aβ * aβ , 1 * 1 ) = (aβ * aβ , 1 ) (aβ , 1 ) * (aβ , 1 ) = (aβ * aβ , 1 ) mul_one (aβ * aβ , 1 ) = (aβ * aβ , 1 ) ]
#align prod.mk_one_mul_mk_one Prod.mk_one_mul_mk_one : β {M : Type u_1} {N : Type u_2} [inst : Mul M ] [inst_1 : Monoid N ] (aβ aβ : M ), (aβ , 1 ) * (aβ , 1 ) = (aβ * aβ , 1 ) Prod.mk_one_mul_mk_one
#align prod.mk_zero_add_mk_zero Prod.mk_zero_add_mk_zero : β {M : Type u_1} {N : Type u_2} [inst : Add M ] [inst_1 : AddMonoid N ] (aβ aβ : M ), (aβ , 0 ) + (aβ , 0 ) = (aβ + aβ , 0 ) Prod.mk_zero_add_mk_zero
@[ to_additive ]
instance : {M : Type u_1} β {N : Type u_2} β [inst : One M ] β [inst : One N ] β One (M Γ N ) instance [ One M ] [ One N ] : One ( M Γ N ) :=
β¨( 1 , 1 )β©
@[ to_additive : β {M : Type u_1} {N : Type u_2} [inst : Zero M ] [inst_1 : Zero N ], 0 .fst = 0 to_additive ( attr := simp )]
theorem fst_one : β [inst : One M ] [inst_1 : One N ], 1 .fst = 1 fst_one [ One M ] [ One N ] : ( 1 : M Γ N ). 1 : {Ξ± : Type ?u.3747} β {Ξ² : Type ?u.3746} β Ξ± Γ Ξ² β Ξ± 1 = 1 :=
rfl : β {Ξ± : Sort ?u.3787} {a : Ξ± }, a = a rfl
#align prod.fst_one Prod.fst_one : β {M : Type u_1} {N : Type u_2} [inst : One M ] [inst_1 : One N ], 1 .fst = 1 Prod.fst_one
#align prod.fst_zero Prod.fst_zero : β {M : Type u_1} {N : Type u_2} [inst : Zero M ] [inst_1 : Zero N ], 0 .fst = 0 Prod.fst_zero
@[ to_additive : β {M : Type u_1} {N : Type u_2} [inst : Zero M ] [inst_1 : Zero N ], 0 .snd = 0 to_additive ( attr := simp )]
theorem snd_one : β {M : Type u_1} {N : Type u_2} [inst : One M ] [inst_1 : One N ], 1 .snd = 1 snd_one [ One M ] [ One N ] : ( 1 : M Γ N ). 2 : {Ξ± : Type ?u.3927} β {Ξ² : Type ?u.3926} β Ξ± Γ Ξ² β Ξ² 2 = 1 :=
rfl : β {Ξ± : Sort ?u.3967} {a : Ξ± }, a = a rfl
#align prod.snd_one Prod.snd_one : β {M : Type u_1} {N : Type u_2} [inst : One M ] [inst_1 : One N ], 1 .snd = 1 Prod.snd_one
#align prod.snd_zero Prod.snd_zero : β {M : Type u_1} {N : Type u_2} [inst : Zero M ] [inst_1 : Zero N ], 0 .snd = 0 Prod.snd_zero
@[ to_additive : β {M : Type u_1} {N : Type u_2} [inst : Zero M ] [inst_1 : Zero N ], 0 = (0 , 0 ) to_additive ]
theorem one_eq_mk : β [inst : One M ] [inst_1 : One N ], 1 = (1 , 1 ) one_eq_mk [ One M ] [ One N ] : ( 1 : M Γ N ) = ( 1 , 1 ) :=
rfl : β {Ξ± : Sort ?u.4206} {a : Ξ± }, a = a rfl
#align prod.one_eq_mk Prod.one_eq_mk : β {M : Type u_1} {N : Type u_2} [inst : One M ] [inst_1 : One N ], 1 = (1 , 1 ) Prod.one_eq_mk
#align prod.zero_eq_mk Prod.zero_eq_mk : β {M : Type u_1} {N : Type u_2} [inst : Zero M ] [inst_1 : Zero N ], 0 = (0 , 0 ) Prod.zero_eq_mk
@[ to_additive : β {M : Type u_1} {N : Type u_2} [inst : Zero M ] [inst_1 : Zero N ] {x : M } {y : N }, (x , y ) = 0 β x = 0 β§ y = 0 to_additive ( attr := simp )]
theorem mk_eq_one : β [inst : One M ] [inst_1 : One N ] {x : M } {y : N }, (x , y ) = 1 β x = 1 β§ y = 1 mk_eq_one [ One M ] [ One N ] { x : M } { y : N } : ( x , y ) = 1 β x = 1 β§ y = 1 :=
mk.inj_iff : β {Ξ± : Type ?u.4411} {Ξ² : Type ?u.4412} {aβ aβ : Ξ± } {bβ bβ : Ξ² }, (aβ , bβ ) = (aβ , bβ ) β aβ = aβ β§ bβ = bβ mk.inj_iff
#align prod.mk_eq_one Prod.mk_eq_one : β {M : Type u_1} {N : Type u_2} [inst : One M ] [inst_1 : One N ] {x : M } {y : N }, (x , y ) = 1 β x = 1 β§ y = 1 Prod.mk_eq_one
#align prod.mk_eq_zero Prod.mk_eq_zero : β {M : Type u_1} {N : Type u_2} [inst : Zero M ] [inst_1 : Zero N ] {x : M } {y : N }, (x , y ) = 0 β x = 0 β§ y = 0 Prod.mk_eq_zero
@[ to_additive ( attr := simp )]
theorem swap_one : β [inst : One M ] [inst_1 : One N ], swap 1 = 1 swap_one [ One M ] [ One N ] : ( 1 : M Γ N ). swap : {Ξ± : Type ?u.4618} β {Ξ² : Type ?u.4617} β Ξ± Γ Ξ² β Ξ² Γ Ξ± swap = 1 :=
rfl : β {Ξ± : Sort ?u.4681} {a : Ξ± }, a = a rfl
#align prod.swap_one Prod.swap_one
#align prod.swap_zero Prod.swap_zero
@[ to_additive ]
theorem fst_mul_snd [ MulOneClass : Type ?u.4765 β Type ?u.4765 MulOneClass M ] [ MulOneClass : Type ?u.4768 β Type ?u.4768 MulOneClass N ] ( p : M Γ N ) : ( p . fst : {Ξ± : Type ?u.4784} β {Ξ² : Type ?u.4783} β Ξ± Γ Ξ² β Ξ± fst, 1 ) * ( 1 , p . snd : {Ξ± : Type ?u.4814} β {Ξ² : Type ?u.4813} β Ξ± Γ Ξ² β Ξ² snd) = p :=
ext : β {Ξ± : Type ?u.5462} {Ξ² : Type ?u.5463} {p q : Ξ± Γ Ξ² }, p .fst = q .fst β p .snd = q .snd β p = q ext ( mul_one p . 1 : {Ξ± : Type ?u.5477} β {Ξ² : Type ?u.5476} β Ξ± Γ Ξ² β Ξ± 1) ( one_mul p . 2 : {Ξ± : Type ?u.5496} β {Ξ² : Type ?u.5495} β Ξ± Γ Ξ² β Ξ² 2)
#align prod.fst_mul_snd Prod.fst_mul_snd
#align prod.fst_add_snd Prod.fst_add_snd
@[ to_additive : {M : Type u_1} β {N : Type u_2} β [inst : Neg M ] β [inst : Neg N ] β Neg (M Γ N ) to_additive ]
instance : {M : Type u_1} β {N : Type u_2} β [inst : Inv M ] β [inst : Inv N ] β Inv (M Γ N ) instance [ Inv M ] [ Inv N ] : Inv ( M Γ N ) :=
β¨ fun p => ( p . 1 : {Ξ± : Type ?u.5604} β {Ξ² : Type ?u.5603} β Ξ± Γ Ξ² β Ξ± 1β»ΒΉ, p . 2 : {Ξ± : Type ?u.5635} β {Ξ² : Type ?u.5634} β Ξ± Γ Ξ² β Ξ² 2β»ΒΉ)β©
@[ to_additive : β {G : Type u_1} {H : Type u_2} [inst : Neg G ] [inst_1 : Neg H ] (p : G Γ H ), (- p ).fst = - p .fst to_additive ( attr := simp )]
theorem fst_inv [ Inv G ] [ Inv H ] ( p : G Γ H ) : p β»ΒΉ. 1 : {Ξ± : Type ?u.5938} β {Ξ² : Type ?u.5937} β Ξ± Γ Ξ² β Ξ± 1 = p . 1 : {Ξ± : Type ?u.5945} β {Ξ² : Type ?u.5944} β Ξ± Γ Ξ² β Ξ± 1β»ΒΉ :=
rfl : β {Ξ± : Sort ?u.5959} {a : Ξ± }, a = a rfl
#align prod.fst_inv Prod.fst_inv
#align prod.fst_neg Prod.fst_neg : β {G : Type u_1} {H : Type u_2} [inst : Neg G ] [inst_1 : Neg H ] (p : G Γ H ), (- p ).fst = - p .fst Prod.fst_neg
@[ to_additive : β {G : Type u_1} {H : Type u_2} [inst : Neg G ] [inst_1 : Neg H ] (p : G Γ H ), (- p ).snd = - p .snd to_additive ( attr := simp )]
theorem snd_inv [ Inv G ] [ Inv H ] ( p : G Γ H ) : p β»ΒΉ. 2 : {Ξ± : Type ?u.6091} β {Ξ² : Type ?u.6090} β Ξ± Γ Ξ² β Ξ² 2 = p . 2 : {Ξ± : Type ?u.6098} β {Ξ² : Type ?u.6097} β Ξ± Γ Ξ² β Ξ² 2β»ΒΉ :=
rfl : β {Ξ± : Sort ?u.6112} {a : Ξ± }, a = a rfl
#align prod.snd_inv Prod.snd_inv
#align prod.snd_neg Prod.snd_neg : β {G : Type u_1} {H : Type u_2} [inst : Neg G ] [inst_1 : Neg H ] (p : G Γ H ), (- p ).snd = - p .snd Prod.snd_neg
@[ to_additive : β {G : Type u_1} {H : Type u_2} [inst : Neg G ] [inst_1 : Neg H ] (a : G ) (b : H ), - (a , b ) = (- a , - b ) to_additive ( attr := simp )]
theorem inv_mk [ Inv G ] [ Inv H ] ( a : G ) ( b : H ) : ( a , b )β»ΒΉ = ( a β»ΒΉ, b β»ΒΉ) :=
rfl : β {Ξ± : Sort ?u.6311} {a : Ξ± }, a = a rfl
#align prod.inv_mk Prod.inv_mk
#align prod.neg_mk Prod.neg_mk : β {G : Type u_1} {H : Type u_2} [inst : Neg G ] [inst_1 : Neg H ] (a : G ) (b : H ), - (a , b ) = (- a , - b ) Prod.neg_mk
@[ to_additive ( attr := simp )]
theorem swap_inv [ Inv G ] [ Inv H ] ( p : G Γ H ) : p β»ΒΉ. swap : {Ξ± : Type ?u.6466} β {Ξ² : Type ?u.6465} β Ξ± Γ Ξ² β Ξ² Γ Ξ± swap = p . swap : {Ξ± : Type ?u.6476} β {Ξ² : Type ?u.6475} β Ξ± Γ Ξ² β Ξ² Γ Ξ± swapβ»ΒΉ :=
rfl : β {Ξ± : Sort ?u.6513} {a : Ξ± }, a = a rfl
#align prod.swap_inv Prod.swap_inv
#align prod.swap_neg Prod.swap_neg
@[ to_additive ]
instance [ InvolutiveInv : Type ?u.6608 β Type ?u.6608 InvolutiveInv M ] [ InvolutiveInv : Type ?u.6611 β Type ?u.6611 InvolutiveInv N ] : InvolutiveInv : Type ?u.6614 β Type ?u.6614 InvolutiveInv ( M Γ N ) :=
{ inv_inv := fun _ => ext : β {Ξ± : Type ?u.6788} {Ξ² : Type ?u.6789} {p q : Ξ± Γ Ξ² }, p .fst = q .fst β p .snd = q .snd β p = q ext ( inv_inv _ ) ( inv_inv _ ) }
@[ to_additive : {M : Type u_1} β {N : Type u_2} β [inst : Sub M ] β [inst : Sub N ] β Sub (M Γ N ) to_additive ]
instance : {M : Type u_1} β {N : Type u_2} β [inst : Div M ] β [inst : Div N ] β Div (M Γ N ) instance [ Div M ] [ Div N ] : Div ( M Γ N ) :=
β¨ fun p q => β¨ p . 1 : {Ξ± : Type ?u.7061} β {Ξ² : Type ?u.7060} β Ξ± Γ Ξ² β Ξ± 1 / q . 1 : {Ξ± : Type ?u.7065} β {Ξ² : Type ?u.7064} β Ξ± Γ Ξ² β Ξ± 1, p . 2 : {Ξ± : Type ?u.7109} β {Ξ² : Type ?u.7108} β Ξ± Γ Ξ² β Ξ² 2 / q . 2 : {Ξ± : Type ?u.7113} β {Ξ² : Type ?u.7112} β Ξ± Γ Ξ² β Ξ² 2β©β©
@[ to_additive : β {G : Type u_1} {H : Type u_2} [inst : Sub G ] [inst_1 : Sub H ] (a b : G Γ H ), (a - b ).fst = a .fst - b .fst to_additive ( attr := simp )]
theorem fst_div : β [inst : Div G ] [inst_1 : Div H ] (a b : G Γ H ), (a / b ).fst = a .fst / b .fst fst_div [ Div G ] [ Div H ] ( a b : G Γ H ) : ( a / b ). 1 : {Ξ± : Type ?u.7585} β {Ξ² : Type ?u.7584} β Ξ± Γ Ξ² β Ξ± 1 = a . 1 : {Ξ± : Type ?u.7594} β {Ξ² : Type ?u.7593} β Ξ± Γ Ξ² β Ξ± 1 / b . 1 : {Ξ± : Type ?u.7598} β {Ξ² : Type ?u.7597} β Ξ± Γ Ξ² β Ξ± 1 :=
rfl : β {Ξ± : Sort ?u.7642} {a : Ξ± }, a = a rfl
#align prod.fst_div Prod.fst_div : β {G : Type u_1} {H : Type u_2} [inst : Div G ] [inst_1 : Div H ] (a b : G Γ H ), (a / b ).fst = a .fst / b .fst Prod.fst_div
#align prod.fst_sub Prod.fst_sub : β {G : Type u_1} {H : Type u_2} [inst : Sub G ] [inst_1 : Sub H ] (a b : G Γ H ), (a - b ).fst = a .fst - b .fst Prod.fst_sub
@[ to_additive : β {G : Type u_1} {H : Type u_2} [inst : Sub G ] [inst_1 : Sub H ] (a b : G Γ H ), (a - b ).snd = a .snd - b .snd to_additive ( attr := simp )]
theorem snd_div : β [inst : Div G ] [inst_1 : Div H ] (a b : G Γ H ), (a / b ).snd = a .snd / b .snd snd_div [ Div G ] [ Div H ] ( a b : G Γ H ) : ( a / b ). 2 : {Ξ± : Type ?u.7829} β {Ξ² : Type ?u.7828} β Ξ± Γ Ξ² β Ξ² 2 = a . 2 : {Ξ± : Type ?u.7838} β {Ξ² : Type ?u.7837} β Ξ± Γ Ξ² β Ξ² 2 / b . 2 : {Ξ± : Type ?u.7842} β {Ξ² : Type ?u.7841} β Ξ± Γ Ξ² β Ξ² 2 :=
rfl : β {Ξ± : Sort ?u.7886} {a : Ξ± }, a = a rfl
#align prod.snd_div Prod.snd_div : β {G : Type u_1} {H : Type u_2} [inst : Div G ] [inst_1 : Div H ] (a b : G Γ H ), (a / b ).snd = a .snd / b .snd Prod.snd_div
#align prod.snd_sub Prod.snd_sub : β {G : Type u_1} {H : Type u_2} [inst : Sub G ] [inst_1 : Sub H ] (a b : G Γ H ), (a - b ).snd = a .snd - b .snd Prod.snd_sub
@[ to_additive : β {G : Type u_1} {H : Type u_2} [inst : Sub G ] [inst_1 : Sub H ] (xβ xβ : G ) (yβ yβ : H ),
(xβ , yβ ) - (xβ , yβ ) = (xβ - xβ , yβ - yβ ) to_additive ( attr := simp )]
theorem mk_div_mk : β {G : Type u_1} {H : Type u_2} [inst : Div G ] [inst_1 : Div H ] (xβ xβ : G ) (yβ yβ : H ),
(xβ , yβ ) / (xβ , yβ ) = (xβ / xβ , yβ / yβ ) mk_div_mk [ Div G ] [ Div H ] ( xβ xβ : G ) ( yβ yβ : H ) :
( xβ , yβ ) / ( xβ , yβ ) = ( xβ / xβ , yβ / yβ ) :=
rfl : β {Ξ± : Sort ?u.8170} {a : Ξ± }, a = a rfl
#align prod.mk_div_mk Prod.mk_div_mk : β {G : Type u_1} {H : Type u_2} [inst : Div G ] [inst_1 : Div H ] (xβ xβ : G ) (yβ yβ : H ),
(xβ , yβ ) / (xβ , yβ ) = (xβ / xβ , yβ / yβ ) Prod.mk_div_mk
#align prod.mk_sub_mk Prod.mk_sub_mk : β {G : Type u_1} {H : Type u_2} [inst : Sub G ] [inst_1 : Sub H ] (xβ xβ : G ) (yβ yβ : H ),
(xβ , yβ ) - (xβ , yβ ) = (xβ - xβ , yβ - yβ ) Prod.mk_sub_mk
@[ to_additive ( attr := simp )]
theorem swap_div [ Div G ] [ Div H ] ( a b : G Γ H ) : ( a / b ). swap : {Ξ± : Type ?u.8391} β {Ξ² : Type ?u.8390} β Ξ± Γ Ξ² β Ξ² Γ Ξ± swap = a . swap : {Ξ± : Type ?u.8403} β {Ξ² : Type ?u.8402} β Ξ± Γ Ξ² β Ξ² Γ Ξ± swap / b . swap : {Ξ± : Type ?u.8410} β {Ξ² : Type ?u.8409} β Ξ± Γ Ξ² β Ξ² Γ Ξ± swap :=
rfl : β {Ξ± : Sort ?u.8477} {a : Ξ± }, a = a rfl
#align prod.swap_div Prod.swap_div
#align prod.swap_sub Prod.swap_sub
instance [ MulZeroClass : Type ?u.8589 β Type ?u.8589 MulZeroClass M ] [ MulZeroClass : Type ?u.8592 β Type ?u.8592 MulZeroClass N ] : MulZeroClass : Type ?u.8595 β Type ?u.8595 MulZeroClass ( M Γ N ) :=
{ zero_mul := fun a => Prod.recOn : β {Ξ± : Type ?u.8808} {Ξ² : Type ?u.8807} {motive : Ξ± Γ Ξ² β Sort ?u.8809 } (t : Ξ± Γ Ξ² ),
(β (fst : Ξ± ) (snd : Ξ² ), motive (fst , snd ) ) β motive t Prod.recOn a fun _ _ => mk.inj_iff : β {Ξ± : Type ?u.8885} {Ξ² : Type ?u.8886} {aβ aβ : Ξ± } {bβ bβ : Ξ² }, (aβ , bβ ) = (aβ , bβ ) β aβ = aβ β§ bβ = bβ mk.inj_iff. mpr : β {a b : Prop }, (a β b ) β b β a mpr β¨ zero_mul _ , zero_mul _ β©,
mul_zero := fun a => Prod.recOn : β {Ξ± : Type ?u.8848} {Ξ² : Type ?u.8847} {motive : Ξ± Γ Ξ² β Sort ?u.8849 } (t : Ξ± Γ Ξ² ),
(β (fst : Ξ± ) (snd : Ξ² ), motive (fst , snd ) ) β motive t Prod.recOn a fun _ _ => mk.inj_iff : β {Ξ± : Type ?u.8984} {Ξ² : Type ?u.8985} {aβ aβ : Ξ± } {bβ bβ : Ξ² }, (aβ , bβ ) = (aβ , bβ ) β aβ = aβ β§ bβ = bβ mk.inj_iff. mpr : β {a b : Prop }, (a β b ) β b β a mpr β¨ mul_zero _ , mul_zero _ β© }
@[ to_additive ]
instance [ Semigroup : Type ?u.9130 β Type ?u.9130 Semigroup M ] [ Semigroup : Type ?u.9133 β Type ?u.9133 Semigroup N ] : Semigroup : Type ?u.9136 β Type ?u.9136 Semigroup ( M Γ N ) :=
{ mul_assoc := fun _ _ _ => mk.inj_iff : β {Ξ± : Type ?u.9530} {Ξ² : Type ?u.9531} {aβ aβ : Ξ± } {bβ bβ : Ξ² }, (aβ , bβ ) = (aβ , bβ ) β aβ = aβ β§ bβ = bβ mk.inj_iff. mpr : β {a b : Prop }, (a β b ) β b β a mpr β¨ mul_assoc : β {G : Type ?u.9559} [inst : Semigroup G ] (a b c : G ), a * b * c = a * (b * c ) mul_assoc _ _ _ , mul_assoc : β {G : Type ?u.9595} [inst : Semigroup G ] (a b c : G ), a * b * c = a * (b * c ) mul_assoc _ _ _ β© }
@[ to_additive ]
instance [ CommSemigroup : Type ?u.9826 β Type ?u.9826 CommSemigroup G ] [ CommSemigroup : Type ?u.9829 β Type ?u.9829 CommSemigroup H ] : CommSemigroup : Type ?u.9832 β Type ?u.9832 CommSemigroup ( G Γ H ) :=
{ mul_comm := fun _ _ => mk.inj_iff : β {Ξ± : Type ?u.10207} {Ξ² : Type ?u.10208} {aβ aβ : Ξ± } {bβ bβ : Ξ² }, (aβ , bβ ) = (aβ , bβ ) β aβ = aβ β§ bβ = bβ mk.inj_iff. mpr : β {a b : Prop }, (a β b ) β b β a mpr β¨ mul_comm _ _ , mul_comm _ _ β© }
instance [ SemigroupWithZero : Type ?u.10474 β Type ?u.10474 SemigroupWithZero M ] [ SemigroupWithZero : Type ?u.10477 β Type ?u.10477 SemigroupWithZero N ] : SemigroupWithZero : Type ?u.10480 β Type ?u.10480 SemigroupWithZero ( M Γ N ) :=
{ zero_mul := by β (a : M Γ N ), 0 * a = 0 simp ,
mul_zero := by β (a : M Γ N ), a * 0 = 0 simp }
@[ to_additive ]
instance [ MulOneClass : Type ?u.12227 β Type ?u.12227 MulOneClass M ] [ MulOneClass : Type ?u.12230 β Type ?u.12230 MulOneClass N ] : MulOneClass : Type ?u.12233 β Type ?u.12233 MulOneClass ( M Γ N ) :=
{ one_mul := fun a => Prod.recOn : β {Ξ± : Type ?u.12765} {Ξ² : Type ?u.12764} {motive : Ξ± Γ Ξ² β Sort ?u.12766 } (t : Ξ± Γ Ξ² ),
(β (fst : Ξ± ) (snd : Ξ² ), motive (fst , snd ) ) β motive t Prod.recOn a fun _ _ => mk.inj_iff : β {Ξ± : Type ?u.12842} {Ξ² : Type ?u.12843} {aβ aβ : Ξ± } {bβ bβ : Ξ² }, (aβ , bβ ) = (aβ , bβ ) β aβ = aβ β§ bβ = bβ mk.inj_iff. mpr : β {a b : Prop }, (a β b ) β b β a mpr β¨ one_mul _ , one_mul _ β©,
mul_one := fun a => Prod.recOn : β {Ξ± : Type ?u.12805} {Ξ² : Type ?u.12804} {motive : Ξ± Γ Ξ² β Sort ?u.12806 } (t : Ξ± Γ Ξ² ),
(β (fst : Ξ± ) (snd : Ξ² ), motive (fst , snd ) ) β motive t Prod.recOn a fun _ _ => mk.inj_iff : β {Ξ± : Type ?u.12947} {Ξ² : Type ?u.12948} {aβ aβ : Ξ± } {bβ bβ : Ξ² }, (aβ , bβ ) = (aβ , bβ ) β aβ = aβ β§ bβ = bβ mk.inj_iff. mpr : β {a b : Prop }, (a β b ) β b β a mpr β¨ mul_one _ , mul_one _ β© }
@[ to_additive ]
instance [ Monoid M ] [ Monoid N ] : Monoid ( M Γ N ) :=
{ npow := fun z a => β¨ Monoid.npow : {M : Type ?u.13616} β [self : Monoid M ] β β β M β M Monoid.npow z a . 1 : {Ξ± : Type ?u.13633} β {Ξ² : Type ?u.13632} β Ξ± Γ Ξ² β Ξ± 1, Monoid.npow : {M : Type ?u.13642} β [self : Monoid M ] β β β M β M Monoid.npow z a . 2 : {Ξ± : Type ?u.13659} β {Ξ² : Type ?u.13658} β Ξ± Γ Ξ² β Ξ² 2β©,
npow_zero := fun z => ext : β {Ξ± : Type ?u.13675} {Ξ² : Type ?u.13676} {p q : Ξ± Γ Ξ² }, p .fst = q .fst β p .snd = q .snd β p = q ext ( Monoid.npow_zero _ ) ( Monoid.npow_zero _ ),
npow_succ := fun z a => ext : β {Ξ± : Type ?u.13751} {Ξ² : Type ?u.13752} {p q : Ξ± Γ Ξ² }, p .fst = q .fst β p .snd = q .snd β p = q ext ( Monoid.npow_succ _ _ ) ( Monoid.npow_succ _ _ ),
one_mul := by β (a : M Γ N ), 1 * a = a simp ,
mul_one := by β (a : M Γ N ), a * 1 = a simp }
@[ to_additive Prod.subNegMonoid ]
instance [ DivInvMonoid : Type ?u.15470 β Type ?u.15470 DivInvMonoid G ] [ DivInvMonoid : Type ?u.15473 β Type ?u.15473 DivInvMonoid H ] : DivInvMonoid : Type ?u.15476 β Type ?u.15476 DivInvMonoid ( G Γ H ) :=
{ div_eq_mul_inv := fun _ _ => mk.inj_iff : β {Ξ± : Type ?u.15789} {Ξ² : Type ?u.15790} {aβ aβ : Ξ± } {bβ bβ : Ξ² }, (aβ , bβ ) = (aβ , bβ ) β aβ = aβ β§ bβ = bβ mk.inj_iff. mpr : β {a b : Prop }, (a β b ) β b β a mpr β¨ div_eq_mul_inv _ _ , div_eq_mul_inv _ _ β©,
zpow := fun z a => β¨ DivInvMonoid.zpow z a . 1 : {Ξ± : Type ?u.15923} β {Ξ² : Type ?u.15922} β Ξ± Γ Ξ² β Ξ± 1, DivInvMonoid.zpow z a . 2 : {Ξ± : Type ?u.15940} β {Ξ² : Type ?u.15939} β Ξ± Γ Ξ² β Ξ² 2β©,
zpow_zero' := fun _ => ext : β {Ξ± : Type ?u.15950} {Ξ² : Type ?u.15951} {p q : Ξ± Γ Ξ² }, p .fst = q .fst β p .snd = q .snd β p = q ext ( DivInvMonoid.zpow_zero' _ ) ( DivInvMonoid.zpow_zero' _ ),
zpow_succ' := fun _ _ => ext : β {Ξ± : Type ?u.16011} {Ξ² : Type ?u.16012} {p q : Ξ± Γ Ξ² }, p .fst = q .fst β p .snd = q .snd β p = q ext ( DivInvMonoid.zpow_succ' _ _ ) ( DivInvMonoid.zpow_succ' _ _ ),
zpow_neg' := fun _ _ => ext : β {Ξ± : Type ?u.16070} {Ξ² : Type ?u.16071} {p q : Ξ± Γ Ξ² }, p .fst = q .fst β p .snd = q .snd β p = q ext ( DivInvMonoid.zpow_neg' _ _ ) ( DivInvMonoid.zpow_neg' _ _ ) }
@[ to_additive ]
instance [ DivisionMonoid : Type ?u.16670 β Type ?u.16670 DivisionMonoid G ] [ DivisionMonoid : Type ?u.16673 β Type ?u.16673 DivisionMonoid H ] : DivisionMonoid : Type ?u.16676 β Type ?u.16676 DivisionMonoid ( G Γ H ) :=
{ mul_inv_rev := fun a b => ext : β {Ξ± : Type ?u.16761} {Ξ² : Type ?u.16762} {p q : Ξ± Γ Ξ² }, p .fst = q .fst β p .snd = q .snd β p = q ext ( mul_inv_rev _ _ ) ( mul_inv_rev _ _ ),
inv_eq_of_mul := fun a b h =>
ext : β {Ξ± : Type ?u.16876} {Ξ² : Type ?u.16877} {p q : Ξ± Γ Ξ² }, p .fst = q .fst β p .snd = q .snd β p = q ext ( inv_eq_of_mul_eq_one_right <| congr_arg : β {Ξ± : Sort ?u.16898} {Ξ² : Sort ?u.16897} {aβ aβ : Ξ± } (f : Ξ± β Ξ² ), aβ = aβ β f aβ = f aβ congr_arg fst : {Ξ± : Type ?u.16904} β {Ξ² : Type ?u.16903} β Ξ± Γ Ξ² β Ξ± fst h )
( inv_eq_of_mul_eq_one_right <| congr_arg : β {Ξ± : Sort ?u.16929} {Ξ² : Sort ?u.16928} {aβ aβ : Ξ± } (f : Ξ± β Ξ² ), aβ = aβ β f aβ = f aβ congr_arg snd : {Ξ± : Type ?u.16935} β {Ξ² : Type ?u.16934} β Ξ± Γ Ξ² β Ξ² snd h ),
inv_inv := by simp }
@[ to_additive SubtractionCommMonoid ]
instance [ DivisionCommMonoid : Type ?u.17831 β Type ?u.17831 DivisionCommMonoid G ] [ DivisionCommMonoid : Type ?u.17834 β Type ?u.17834 DivisionCommMonoid H ] : DivisionCommMonoid : Type ?u.17837 β Type ?u.17837 DivisionCommMonoid ( G Γ H ) :=
{ mul_comm := fun β¨ gβ , hβ β© β¨_, _β© => by (gβ , hβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (gβ , hβ ) rw [ (gβ , hβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (gβ , hβ ) mk_mul_mk : β {M : Type ?u.18059} {N : Type ?u.18060} [inst : Mul M ] [inst_1 : Mul N ] (aβ aβ : M ) (bβ bβ : N ),
(aβ , bβ ) * (aβ , bβ ) = (aβ * aβ , bβ * bβ ) mk_mul_mk, (gβ * fstβ , hβ * sndβ ) = (fstβ , sndβ ) * (gβ , hβ ) (gβ , hβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (gβ , hβ ) mul_comm gβ , (fstβ * gβ , hβ * sndβ ) = (fstβ , sndβ ) * (gβ , hβ ) (gβ , hβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (gβ , hβ ) mul_comm hβ (fstβ * gβ , sndβ * hβ ) = (fstβ , sndβ ) * (gβ , hβ ) ] (fstβ * gβ , sndβ * hβ ) = (fstβ , sndβ ) * (gβ , hβ ) ; (fstβ * gβ , sndβ * hβ ) = (fstβ , sndβ ) * (gβ , hβ ) (gβ , hβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (gβ , hβ ) rfl }
@[ to_additive ]
instance [ Group G ] [ Group H ] : Group ( G Γ H ) :=
{ mul_left_inv := fun _ => mk.inj_iff : β {Ξ± : Type ?u.18816} {Ξ² : Type ?u.18817} {aβ aβ : Ξ± } {bβ bβ : Ξ² }, (aβ , bβ ) = (aβ , bβ ) β aβ = aβ β§ bβ = bβ mk.inj_iff. mpr : β {a b : Prop }, (a β b ) β b β a mpr β¨ mul_left_inv _ , mul_left_inv _ β© }
@[ to_additive ]
instance [ LeftCancelSemigroup : Type ?u.19086 β Type ?u.19086 LeftCancelSemigroup G ] [ LeftCancelSemigroup : Type ?u.19089 β Type ?u.19089 LeftCancelSemigroup H ] : LeftCancelSemigroup : Type ?u.19092 β Type ?u.19092 LeftCancelSemigroup ( G Γ H ) :=
{ mul_left_cancel := fun _ _ _ h =>
Prod.ext : β {Ξ± : Type ?u.19459} {Ξ² : Type ?u.19460} {p q : Ξ± Γ Ξ² }, p .fst = q .fst β p .snd = q .snd β p = q Prod.ext ( mul_left_cancel ( Prod.ext_iff : β {Ξ± : Type ?u.19533} {Ξ² : Type ?u.19534} {p q : Ξ± Γ Ξ² }, p = q β p .fst = q .fst β§ p .snd = q .snd Prod.ext_iff. 1 : β {a b : Prop }, (a β b ) β a β b 1 h ). 1 ) ( mul_left_cancel ( Prod.ext_iff : β {Ξ± : Type ?u.19821} {Ξ² : Type ?u.19822} {p q : Ξ± Γ Ξ² }, p = q β p .fst = q .fst β§ p .snd = q .snd Prod.ext_iff. 1 : β {a b : Prop }, (a β b ) β a β b 1 h ). 2 ) }
@[ to_additive ]
instance [ RightCancelSemigroup : Type ?u.20244 β Type ?u.20244 RightCancelSemigroup G ] [ RightCancelSemigroup : Type ?u.20247 β Type ?u.20247 RightCancelSemigroup H ] : RightCancelSemigroup : Type ?u.20250 β Type ?u.20250 RightCancelSemigroup ( G Γ H ) :=
{ mul_right_cancel := fun _ _ _ h =>
Prod.ext : β {Ξ± : Type ?u.20603} {Ξ² : Type ?u.20604} {p q : Ξ± Γ Ξ² }, p .fst = q .fst β p .snd = q .snd β p = q Prod.ext ( mul_right_cancel ( Prod.ext_iff : β {Ξ± : Type ?u.20677} {Ξ² : Type ?u.20678} {p q : Ξ± Γ Ξ² }, p = q β p .fst = q .fst β§ p .snd = q .snd Prod.ext_iff. 1 : β {a b : Prop }, (a β b ) β a β b 1 h ). 1 ) ( mul_right_cancel ( Prod.ext_iff : β {Ξ± : Type ?u.20962} {Ξ² : Type ?u.20963} {p q : Ξ± Γ Ξ² }, p = q β p .fst = q .fst β§ p .snd = q .snd Prod.ext_iff. 1 : β {a b : Prop }, (a β b ) β a β b 1 h ). 2 ) }
@[ to_additive ]
instance [ LeftCancelMonoid : Type ?u.21382 β Type ?u.21382 LeftCancelMonoid M ] [ LeftCancelMonoid : Type ?u.21385 β Type ?u.21385 LeftCancelMonoid N ] : LeftCancelMonoid : Type ?u.21388 β Type ?u.21388 LeftCancelMonoid ( M Γ N ) :=
{ mul_one := by β (a : M Γ N ), a * 1 = a simp ,
one_mul := by β (a : M Γ N ), 1 * a = a simp }
@[ to_additive ]
instance [ RightCancelMonoid : Type ?u.23331 β Type ?u.23331 RightCancelMonoid M ] [ RightCancelMonoid : Type ?u.23334 β Type ?u.23334 RightCancelMonoid N ] : RightCancelMonoid : Type ?u.23337 β Type ?u.23337 RightCancelMonoid ( M Γ N ) :=
{ mul_one := by β (a : M Γ N ), a * 1 = a simp ,
one_mul := by β (a : M Γ N ), 1 * a = a simp }
@[ to_additive ]
instance [ CancelMonoid : Type ?u.25176 β Type ?u.25176 CancelMonoid M ] [ CancelMonoid : Type ?u.25179 β Type ?u.25179 CancelMonoid N ] : CancelMonoid : Type ?u.25182 β Type ?u.25182 CancelMonoid ( M Γ N ) :=
{ mul_right_cancel := by β (a b c : M Γ N ), a * b = c * b β a = c simp only [ mul_left_inj , imp_self , forall_const ] }
@[ to_additive ]
instance [ CommMonoid : Type ?u.26364 β Type ?u.26364 CommMonoid M ] [ CommMonoid : Type ?u.26367 β Type ?u.26367 CommMonoid N ] : CommMonoid : Type ?u.26370 β Type ?u.26370 CommMonoid ( M Γ N ) :=
{ mul_comm := fun β¨ mβ , nβ β© β¨_, _β© => by (mβ , nβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (mβ , nβ ) rw [ (mβ , nβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (mβ , nβ ) mk_mul_mk : β {M : Type ?u.26822} {N : Type ?u.26823} [inst : Mul M ] [inst_1 : Mul N ] (aβ aβ : M ) (bβ bβ : N ),
(aβ , bβ ) * (aβ , bβ ) = (aβ * aβ , bβ * bβ ) mk_mul_mk, (mβ * fstβ , nβ * sndβ ) = (fstβ , sndβ ) * (mβ , nβ ) (mβ , nβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (mβ , nβ ) mk_mul_mk : β {M : Type ?u.27197} {N : Type ?u.27198} [inst : Mul M ] [inst_1 : Mul N ] (aβ aβ : M ) (bβ bβ : N ),
(aβ , bβ ) * (aβ , bβ ) = (aβ * aβ , bβ * bβ ) mk_mul_mk, (mβ * fstβ , nβ * sndβ ) = (fstβ * mβ , sndβ * nβ ) (mβ , nβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (mβ , nβ ) mul_comm mβ , (fstβ * mβ , nβ * sndβ ) = (fstβ * mβ , sndβ * nβ ) (mβ , nβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (mβ , nβ ) mul_comm nβ (fstβ * mβ , sndβ * nβ ) = (fstβ * mβ , sndβ * nβ ) ] }
@[ to_additive ]
instance [ CancelCommMonoid : Type ?u.27556 β Type ?u.27556 CancelCommMonoid M ] [ CancelCommMonoid : Type ?u.27559 β Type ?u.27559 CancelCommMonoid N ] : CancelCommMonoid : Type ?u.27562 β Type ?u.27562 CancelCommMonoid ( M Γ N ) :=
{ mul_comm := fun β¨ mβ , nβ β© β¨_, _β© => by (mβ , nβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (mβ , nβ ) rw [ (mβ , nβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (mβ , nβ ) mk_mul_mk : β {M : Type ?u.27771} {N : Type ?u.27772} [inst : Mul M ] [inst_1 : Mul N ] (aβ aβ : M ) (bβ bβ : N ),
(aβ , bβ ) * (aβ , bβ ) = (aβ * aβ , bβ * bβ ) mk_mul_mk, (mβ * fstβ , nβ * sndβ ) = (fstβ , sndβ ) * (mβ , nβ ) (mβ , nβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (mβ , nβ ) mk_mul_mk : β {M : Type ?u.28166} {N : Type ?u.28167} [inst : Mul M ] [inst_1 : Mul N ] (aβ aβ : M ) (bβ bβ : N ),
(aβ , bβ ) * (aβ , bβ ) = (aβ * aβ , bβ * bβ ) mk_mul_mk, (mβ * fstβ , nβ * sndβ ) = (fstβ * mβ , sndβ * nβ ) (mβ , nβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (mβ , nβ ) mul_comm mβ , (fstβ * mβ , nβ * sndβ ) = (fstβ * mβ , sndβ * nβ ) (mβ , nβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (mβ , nβ ) mul_comm nβ (fstβ * mβ , sndβ * nβ ) = (fstβ * mβ , sndβ * nβ ) ] }
instance [ MulZeroOneClass : Type ?u.28577 β Type ?u.28577 MulZeroOneClass M ] [ MulZeroOneClass : Type ?u.28580 β Type ?u.28580 MulZeroOneClass N ] : MulZeroOneClass : Type ?u.28583 β Type ?u.28583 MulZeroOneClass ( M Γ N ) :=
{ zero_mul := by β (a : M Γ N ), 0 * a = 0 simp ,
mul_zero := by β (a : M Γ N ), a * 0 = 0 simp }
instance [ MonoidWithZero : Type ?u.30143 β Type ?u.30143 MonoidWithZero M ] [ MonoidWithZero : Type ?u.30146 β Type ?u.30146 MonoidWithZero N ] : MonoidWithZero : Type ?u.30149 β Type ?u.30149 MonoidWithZero ( M Γ N ) :=
{ zero_mul := by β (a : M Γ N ), 0 * a = 0 simp ,
mul_zero := by β (a : M Γ N ), a * 0 = 0 simp }
instance [ CommMonoidWithZero : Type ?u.31564 β Type ?u.31564 CommMonoidWithZero M ] [ CommMonoidWithZero : Type ?u.31567 β Type ?u.31567 CommMonoidWithZero N ] : CommMonoidWithZero : Type ?u.31570 β Type ?u.31570 CommMonoidWithZero ( M Γ N ) :=
{ zero_mul := by β (a : M Γ N ), 0 * a = 0 simp ,
mul_zero := by β (a : M Γ N ), a * 0 = 0 simp }
@[ to_additive ]
instance [ CommGroup : Type ?u.32990 β Type ?u.32990 CommGroup G ] [ CommGroup : Type ?u.32993 β Type ?u.32993 CommGroup H ] : CommGroup : Type ?u.32996 β Type ?u.32996 CommGroup ( G Γ H ) :=
{ mul_comm := fun β¨ gβ , hβ β© β¨_, _β© => by (gβ , hβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (gβ , hβ ) rw [ (gβ , hβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (gβ , hβ ) mk_mul_mk : β {M : Type ?u.33200} {N : Type ?u.33201} [inst : Mul M ] [inst_1 : Mul N ] (aβ aβ : M ) (bβ bβ : N ),
(aβ , bβ ) * (aβ , bβ ) = (aβ * aβ , bβ * bβ ) mk_mul_mk, (gβ * fstβ , hβ * sndβ ) = (fstβ , sndβ ) * (gβ , hβ ) (gβ , hβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (gβ , hβ ) mk_mul_mk : β {M : Type ?u.33503} {N : Type ?u.33504} [inst : Mul M ] [inst_1 : Mul N ] (aβ aβ : M ) (bβ bβ : N ),
(aβ , bβ ) * (aβ , bβ ) = (aβ * aβ , bβ * bβ ) mk_mul_mk, (gβ * fstβ , hβ * sndβ ) = (fstβ * gβ , sndβ * hβ ) (gβ , hβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (gβ , hβ ) mul_comm gβ , (fstβ * gβ , hβ * sndβ ) = (fstβ * gβ , sndβ * hβ ) (gβ , hβ ) * (fstβ , sndβ ) = (fstβ , sndβ ) * (gβ , hβ ) mul_comm hβ (fstβ * gβ , sndβ * hβ ) = (fstβ * gβ , sndβ * hβ ) ] }
end Prod
namespace MulHom
section Prod
variable ( M N ) [ Mul M ] [ Mul N ] [ Mul P ]
/-- Given magmas `M`, `N`, the natural projection homomorphism from `M Γ N` to `M`.-/
@[ to_additive
"Given additive magmas `A`, `B`, the natural projection homomorphism
from `A Γ B` to `A`"]
def fst : M Γ N ββ* M :=
β¨ Prod.fst : {Ξ± : Type ?u.34030} β {Ξ² : Type ?u.34029} β Ξ± Γ Ξ² β Ξ± Prod.fst, fun _ _ => rfl : β {Ξ± : Sort ?u.34044} {a : Ξ± }, a = a rflβ©
#align mul_hom.fst MulHom.fst
#align add_hom.fst AddHom.fst
/-- Given magmas `M`, `N`, the natural projection homomorphism from `M Γ N` to `N`.-/
@[ to_additive
"Given additive magmas `A`, `B`, the natural projection homomorphism
from `A Γ B` to `B`"]
def snd : M Γ N ββ* N :=
β¨ Prod.snd : {Ξ± : Type ?u.34335} β {Ξ² : Type ?u.34334} β Ξ± Γ Ξ² β Ξ² Prod.snd, fun _ _ => rfl : β {Ξ± : Sort ?u.34349} {a : Ξ± }, a = a rflβ©
#align mul_hom.snd MulHom.snd
#align add_hom.snd AddHom.snd
variable { M N }
@[ to_additive ( attr := simp )]
theorem coe_fst : β(fst M N ) = Prod.fst coe_fst : β( fst M N ) = Prod.fst : {Ξ± : Type ?u.34764} β {Ξ² : Type ?u.34763} β Ξ± Γ Ξ² β Ξ± Prod.fst :=
rfl : β {Ξ± : Sort ?u.34819} {a : Ξ± }, a = a rfl
#align mul_hom.coe_fst MulHom.coe_fst : β {M : Type u_1} {N : Type u_2} [inst : Mul M ] [inst_1 : Mul N ], β(fst M N ) = Prod.fst MulHom.coe_fst
#align add_hom.coe_fst AddHom.coe_fst
@[ to_additive ( attr := simp )]
theorem coe_snd : β(snd M N ) = Prod.snd coe_snd : β( snd M N ) = Prod.snd : {Ξ± : Type ?u.35135} β {Ξ² : Type ?u.35134} β Ξ± Γ Ξ² β Ξ² Prod.snd :=
rfl : β {Ξ± : Sort ?u.35190} {a : Ξ± }, a = a rfl
#align mul_hom.coe_snd MulHom.coe_snd : β {M : Type u_1} {N : Type u_2} [inst : Mul M ] [inst_1 : Mul N ], β(snd M N ) = Prod.snd MulHom.coe_snd
#align add_hom.coe_snd AddHom.coe_snd
/-- Combine two `MonoidHom`s `f : M ββ* N`, `g : M ββ* P` into
`f.prod g : M ββ* (N Γ P)` given by `(f.prod g) x = (f x, g x)`. -/
@[ to_additive prod
"Combine two `AddMonoidHom`s `f : AddHom M N`, `g : AddHom M P` into
`f.prod g : AddHom M (N Γ P)` given by `(f.prod g) x = (f x, g x)`"]
protected def prod ( f : M ββ* N ) ( g : M ββ* P ) :
M ββ* N Γ P where
toFun := Pi.prod : {I : Type ?u.35402} β
{f : I β Type ?u.35401 } β {g : I β Type ?u.35400 } β ((i : I ) β f i ) β ((i : I ) β g i ) β (i : I ) β f i Γ g i Pi.prod f g
map_mul' x y := Prod.ext : β {Ξ± : Type ?u.35758} {Ξ² : Type ?u.35759} {p q : Ξ± Γ Ξ² }, p .fst = q .fst β p .snd = q .snd β p = q Prod.ext ( f . map_mul : β {M : Type ?u.35769} {N : Type ?u.35770} [inst : Mul M ] [inst_1 : Mul N ] (f : M ββ* N ) (a b : M ),
βf (a * b ) = βf a * βf b map_mul x y ) ( g . map_mul : β {M : Type ?u.35791} {N : Type ?u.35792} [inst : Mul M ] [inst_1 : Mul N ] (f : M ββ* N ) (a b : M ),
βf (a * b ) = βf a * βf b map_mul x y )
#align mul_hom.prod MulHom.prod
#align add_hom.prod AddHom.prod
@[ to_additive coe_prod ]
theorem coe_prod ( f : M ββ* N ) ( g : M ββ* P ) : β( f . prod g ) = Pi.prod : {I : Type ?u.36468} β
{f : I β Type ?u.36467 } β {g : I β Type ?u.36466 } β ((i : I ) β f i ) β ((i : I ) β g i ) β (i : I ) β f i Γ g i Pi.prod f g :=
rfl : β {Ξ± : Sort ?u.36824} {a : Ξ± }, a = a rfl
#align mul_hom.coe_prod MulHom.coe_prod
#align add_hom.coe_prod AddHom.coe_prod
@[ to_additive ( attr := simp ) prod_apply ]
theorem prod_apply ( f : M ββ* N ) ( g : M ββ* P ) ( x ) : f . prod g x = ( f x , g x ) :=
rfl : β {Ξ± : Sort ?u.37507} {a : Ξ± }, a = a rfl
#align mul_hom.prod_apply MulHom.prod_apply
#align add_hom.prod_apply AddHom.prod_apply
@[ to_additive ( attr := simp ) fst_comp_prod ]
theorem fst_comp_prod ( f : M ββ* N ) ( g : M ββ* P ) : ( fst N P ). comp ( f . prod g ) = f :=
ext : β {M : Type ?u.37824} {N : Type ?u.37825} [inst : Mul M ] [inst_1 : Mul N ] β¦f g : M ββ* N β¦,
(β (x : M ), βf x = βg x ) β f = g ext fun _ => rfl : β {Ξ± : Sort ?u.37882} {a : Ξ± }, a = a rfl
#align mul_hom.fst_comp_prod MulHom.fst_comp_prod
#align add_hom.fst_comp_prod AddHom.fst_comp_prod
@[ to_additive ( attr := simp ) snd_comp_prod ]
theorem snd_comp_prod ( f : M ββ* N ) ( g : M ββ* P ) : ( snd N P ). comp ( f . prod g ) = g :=
ext : β {M : Type ?u.38198} {N : Type ?u.38199} [inst : Mul M ] [inst_1 : Mul N ] β¦f g : M ββ* N β¦,
(β (x : M ), βf x = βg x ) β f = g ext fun _ => rfl : β {Ξ± : Sort ?u.38256} {a : Ξ± }, a = a rfl
#align mul_hom.snd_comp_prod MulHom.snd_comp_prod
#align add_hom.snd_comp_prod AddHom.snd_comp_prod
@[ to_additive ( attr := simp ) prod_unique ]
theorem prod_unique ( f : M ββ* N Γ P ) : (( fst N P ). comp f ). prod (( snd N P ). comp f ) = f :=
ext : β {M : Type ?u.38608} {N : Type ?u.38609} [inst : Mul M ] [inst_1 : Mul N ] β¦f g : M ββ* N β¦,
(β (x : M ), βf x = βg x ) β f = g ext fun x => by simp only [ prod_apply , coe_fst : β {M : Type ?u.38762} {N : Type ?u.38763} [inst : Mul M ] [inst_1 : Mul N ], β(fst M N ) = Prod.fst coe_fst, coe_snd : β {M : Type ?u.38790} {N : Type ?u.38791} [inst : Mul M ] [inst_1 : Mul N ], β(snd M N ) = Prod.snd coe_snd, comp_apply : β {M : Type ?u.38816} {N : Type ?u.38817} {P : Type ?u.38818} [inst : Mul M ] [inst_1 : Mul N ] [inst_2 : Mul P ]
(g : N ββ* P ) (f : M ββ* N ) (x : M ), β(comp g f ) x = βg (βf x ) comp_apply, Prod.mk.eta : β {Ξ± : Type ?u.38858} {Ξ² : Type ?u.38859} {p : Ξ± Γ Ξ² }, (p .fst , p .snd ) = p Prod.mk.eta]
#align mul_hom.prod_unique MulHom.prod_unique
#align add_hom.prod_unique AddHom.prod_unique
end Prod
section Prod_map
variable { M' : Type _ : Type (?u.39705+1) Type _} { N' : Type _ : Type (?u.39708+1) Type _} [ Mul M ] [ Mul N ] [ Mul M' ] [ Mul N' ] [ Mul P ] (