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) 2019 Neil Strickland. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Neil Strickland, Yury Kudryashov
! This file was ported from Lean 3 source module algebra.group.commute
! leanprover-community/mathlib commit 05101c3df9d9cfe9430edc205860c79b6d660102
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathlib.Algebra.Group.Semiconj
/-!
# Commuting pairs of elements in monoids
We define the predicate `Commute a b := a * b = b * a` and provide some operations on terms
`(h : Commute a b)`. E.g., if `a`, `b`, and c are elements of a semiring, and that
`hb : Commute a b` and `hc : Commute a c`. Then `hb.pow_left 5` proves `Commute (a ^ 5) b` and
`(hb.pow_right 2).add_right (hb.mul_right hc)` proves `Commute a (b ^ 2 + b * c)`.
Lean does not immediately recognise these terms as equations, so for rewriting we need syntax like
`rw [(hb.pow_left 5).eq]` rather than just `rw [hb.pow_left 5]`.
This file defines only a few operations (`mul_left`, `inv_right`, etc). Other operations
(`pow_right`, field inverse etc) are in the files that define corresponding notions.
## Implementation details
Most of the proofs come from the properties of `SemiconjBy`.
-/
variable { G : Type _ }
/-- Two elements commute if `a * b = b * a`. -/
@[ to_additive AddCommute : {S : Type u_1} β [inst : Add S ] β S β S β Prop AddCommute "Two elements additively commute if `a + b = b + a`"]
def Commute : {S : Type u_1} β [inst : Mul S ] β S β S β Prop Commute { S : Type _ } [ Mul S ] ( a b : S ) : Prop :=
SemiconjBy : {M : Type ?u.23} β [inst : Mul M ] β M β M β M β Prop SemiconjBy a b b
#align commute Commute : {S : Type u_1} β [inst : Mul S ] β S β S β Prop Commute
#align add_commute AddCommute : {S : Type u_1} β [inst : Add S ] β S β S β Prop AddCommute
namespace Commute
section Mul
variable { S : Type _ } [ Mul S ]
/-- Equality behind `Commute a b`; useful for rewriting. -/
@[ to_additive "Equality behind `add_commute a b`; useful for rewriting."]
protected theorem eq { a b : S } ( h : Commute : {S : Type ?u.85} β [inst : Mul S ] β S β S β Prop Commute a b ) : a * b = b * a :=
h
#align commute.eq Commute.eq : β {S : Type u_1} [inst : Mul S ] {a b : S }, Commute a b β a * b = b * a Commute.eq
#align add_commute.eq AddCommute.eq
/-- Any element commutes with itself. -/
@[ to_additive ( attr := refl, simp ) "Any element commutes with itself."]
protected theorem refl ( a : S ) : Commute : {S : Type ?u.202} β [inst : Mul S ] β S β S β Prop Commute a a :=
Eq.refl : β {Ξ± : Sort ?u.217} (a : Ξ± ), a = a Eq.refl ( a * a )
#align commute.refl Commute.refl
#align add_commute.refl AddCommute.refl
/-- If `a` commutes with `b`, then `b` commutes with `a`. -/
@[ to_additive ( attr := symm) "If `a` commutes with `b`, then `b` commutes with `a`."]
protected theorem symm { a b : S } ( h : Commute : {S : Type ?u.325} β [inst : Mul S ] β S β S β Prop Commute a b ) : Commute : {S : Type ?u.339} β [inst : Mul S ] β S β S β Prop Commute b a :=
Eq.symm : β {Ξ± : Sort ?u.353} {a b : Ξ± }, a = b β b = a Eq.symm h
#align commute.symm Commute.symm
#align add_commute.symm AddCommute.symm
@[ to_additive ]
protected theorem semiconjBy { a b : S } ( h : Commute : {S : Type ?u.413} β [inst : Mul S ] β S β S β Prop Commute a b ) : SemiconjBy : {M : Type ?u.427} β [inst : Mul M ] β M β M β M β Prop SemiconjBy a b b :=
h
#align commute.semiconj_by Commute.semiconjBy
#align add_commute.semiconj_by AddCommute.semiconjBy
@[ to_additive ]
protected theorem symm_iff { a b : S } : Commute : {S : Type ?u.480} β [inst : Mul S ] β S β S β Prop Commute a b β Commute : {S : Type ?u.488} β [inst : Mul S ] β S β S β Prop Commute b a :=
β¨ Commute.symm , Commute.symm β©
#align commute.symm_iff Commute.symm_iff
#align add_commute.symm_iff AddCommute.symm_iff
@[ to_additive : β {S : Type u_1} [inst : Add S ], IsRefl S AddCommute to_additive ]
instance : IsRefl : (Ξ± : Type ?u.565) β (Ξ± β Ξ± β Prop ) β Prop IsRefl S Commute : {S : Type ?u.566} β [inst : Mul S ] β S β S β Prop Commute :=
β¨ Commute.refl : β {S : Type ?u.597} [inst : Mul S ] (a : S ), Commute a a Commute.reflβ©
-- This instance is useful for `Finset.noncomm_prod`
@[ to_additive ]
instance on_isRefl : β {f : G β S }, IsRefl G fun a b => Commute (f a ) (f b ) on_isRefl { f : G β S } : IsRefl : (Ξ± : Type ?u.669) β (Ξ± β Ξ± β Prop ) β Prop IsRefl G fun a b => Commute : {S : Type ?u.676} β [inst : Mul S ] β S β S β Prop Commute ( f a ) ( f b ) :=
β¨ fun _ => Commute.refl : β {S : Type ?u.707} [inst : Mul S ] (a : S ), Commute a a Commute.refl _ β©
#align commute.on_is_refl Commute.on_isRefl : β {G : Type u_1} {S : Type u_2} [inst : Mul S ] {f : G β S }, IsRefl G fun a b => Commute (f a ) (f b ) Commute.on_isRefl
#align add_commute.on_is_refl AddCommute.on_isRefl
end Mul
section Semigroup
variable { S : Type _ } [ Semigroup S ] { a b c : S }
/-- If `a` commutes with both `b` and `c`, then it commutes with their product. -/
@[ to_additive ( attr := simp )
"If `a` commutes with both `b` and `c`, then it commutes with their sum."]
theorem mul_right ( hab : Commute : {S : Type ?u.833} β [inst : Mul S ] β S β S β Prop Commute a b ) ( hac : Commute : {S : Type ?u.948} β [inst : Mul S ] β S β S β Prop Commute a c ) : Commute : {S : Type ?u.957} β [inst : Mul S ] β S β S β Prop Commute a ( b * c ) :=
SemiconjBy.mul_right hab hac
#align commute.mul_right Commute.mul_rightβ
#align add_commute.add_right AddCommute.add_rightβ
-- I think `β` is necessary because of the `mul` vs `HMul` distinction
/-- If both `a` and `b` commute with `c`, then their product commutes with `c`. -/
@[ to_additive ( attr := simp )
"If both `a` and `b` commute with `c`, then their product commutes with `c`."]
theorem mul_left ( hac : Commute : {S : Type ?u.1304} β [inst : Mul S ] β S β S β Prop Commute a c ) ( hbc : Commute : {S : Type ?u.1419} β [inst : Mul S ] β S β S β Prop Commute b c ) : Commute : {S : Type ?u.1428} β [inst : Mul S ] β S β S β Prop Commute ( a * b ) c :=
SemiconjBy.mul_left hac hbc
#align commute.mul_left Commute.mul_leftβ
#align add_commute.add_left AddCommute.add_leftβ
-- I think `β` is necessary because of the `mul` vs `HMul` distinction
@[ to_additive ]
protected theorem right_comm : Commute b c β β (a : S ), a * b * c = a * c * b right_comm ( h : Commute : {S : Type ?u.1775} β [inst : Mul S ] β S β S β Prop Commute b c ) ( a : S ) : a * b * c = a * c * b :=
by simp only [ mul_assoc : β {G : Type ?u.2385} [inst : Semigroup G ] (a b c : G ), a * b * c = a * (b * c ) mul_assoc, h . eq ]
#align commute.right_comm Commute.right_commβ
#align add_commute.right_comm AddCommute.right_commβ
-- I think `β` is necessary because of the `mul` vs `HMul` distinction
@[ to_additive ]
protected theorem left_comm : Commute a b β β (c : S ), a * (b * c ) = b * (a * c ) left_comm ( h : Commute : {S : Type ?u.2646} β [inst : Mul S ] β S β S β Prop Commute a b ) ( c ) : a * ( b * c ) = b * ( a * c ) :=
by a * (b * c ) = b * (a * c )simp only [β mul_assoc : β {G : Type ?u.3257} [inst : Semigroup G ] (a b c : G ), a * b * c = a * (b * c ) mul_assoc, h . eq ]
#align commute.left_comm Commute.left_commβ : β {S : Type u_1} [inst : Semigroup S ] {a b : S }, Commute a b β β (c : S ), a * (b * c ) = b * (a * c ) Commute.left_commβ
#align add_commute.left_comm AddCommute.left_commβ
-- I think `β` is necessary because of the `mul` vs `HMul` distinction
@[ to_additive ]
protected theorem mul_mul_mul_comm : Commute b c β β (a d : S ), a * b * (c * d ) = a * c * (b * d ) mul_mul_mul_comm ( hbc : Commute : {S : Type ?u.3544} β [inst : Mul S ] β S β S β Prop Commute b c ) ( a d : S ) :
a * b * ( c * d ) = a * c * ( b * d ) := by simp only [ hbc . left_comm , mul_assoc : β {G : Type ?u.4382} [inst : Semigroup G ] (a b c : G ), a * b * c = a * (b * c ) mul_assoc]
#align commute.mul_mul_mul_comm Commute.mul_mul_mul_comm : β {S : Type u_1} [inst : Semigroup S ] {b c : S }, Commute b c β β (a d : S ), a * b * (c * d ) = a * c * (b * d ) Commute.mul_mul_mul_comm
#align add_commute.add_add_add_comm AddCommute.add_add_add_comm
end Semigroup
@[ to_additive ]
protected theorem all { S : Type _ } [ CommSemigroup : Type ?u.4516 β Type ?u.4516 CommSemigroup S ] ( a b : S ) : Commute : {S : Type ?u.4523} β [inst : Mul S ] β S β S β Prop Commute a b :=
mul_comm a b
#align commute.all Commute.allβ
#align add_commute.all AddCommute.allβ
-- not sure why this needs an `β`, maybe instance names not aligned?
section MulOneClass
variable { M : Type _ } [ MulOneClass : Type ?u.4708 β Type ?u.4708 MulOneClass M ]
@[ to_additive ( attr := simp )]
theorem one_right : β (a : M ), Commute a 1 one_right ( a : M ) : Commute : {S : Type ?u.4713} β [inst : Mul S ] β S β S β Prop Commute a 1 :=
SemiconjBy.one_right a
#align commute.one_right Commute.one_rightβ
#align add_commute.zero_right AddCommute.zero_rightβ
-- I think `β` is necessary because `One.toOfNat1` appears in the Lean 4 version
@[ to_additive ( attr := simp )]
theorem one_left ( a : M ) : Commute : {S : Type ?u.4922} β [inst : Mul S ] β S β S β Prop Commute 1 a :=
SemiconjBy.one_left a
#align commute.one_left Commute.one_leftβ
#align add_commute.zero_left AddCommute.zero_leftβ
-- I think `β` is necessary because `One.toOfNat1` appears in the Lean 4 version
end MulOneClass
section Monoid
variable { M : Type _ } [ Monoid M ] { a b : M } { u uβ uβ : M Λ£}
@[ to_additive ( attr := simp )]
theorem pow_right ( h : Commute : {S : Type ?u.5190} β [inst : Mul S ] β S β S β Prop Commute a b ) ( n : β ) : Commute : {S : Type ?u.5220} β [inst : Mul S ] β S β S β Prop Commute a ( b ^ n ) :=
SemiconjBy.pow_right h n
#align commute.pow_right Commute.pow_rightβ
#align add_commute.nsmul_right AddCommute.nsmul_rightβ
-- `MulOneClass.toHasMul` vs. `MulOneClass.toMul`
@[ to_additive ( attr := simp )]
theorem pow_left ( h : Commute : {S : Type ?u.5668} β [inst : Mul S ] β S β S β Prop Commute a b ) ( n : β ) : Commute : {S : Type ?u.5698} β [inst : Mul S ] β S β S β Prop Commute ( a ^ n ) b :=
( h . symm . pow_right n ). symm
#align commute.pow_left Commute.pow_leftβ
#align add_commute.nsmul_left AddCommute.nsmul_leftβ
-- `MulOneClass.toHasMul` vs. `MulOneClass.toMul`
-- todo: should nat power be called `nsmul` here?
@[ to_additive ( attr := simp )]
theorem pow_pow ( h : Commute : {S : Type ?u.6182} β [inst : Mul S ] β S β S β Prop Commute a b ) ( m n : β ) : Commute : {S : Type ?u.6214} β [inst : Mul S ] β S β S β Prop Commute ( a ^ m ) ( b ^ n ) :=
( h . pow_left m ). pow_right n
#align commute.pow_pow Commute.pow_powβ
#align add_commute.nsmul_nsmul AddCommute.nsmul_nsmulβ
-- `MulOneClass.toHasMul` vs. `MulOneClass.toMul`
-- porting note: `simpNF` told me to remove the `simp` attribute
@[ to_additive ]
theorem self_pow ( a : M ) ( n : β ) : Commute : {S : Type ?u.6936} β [inst : Mul S ] β S β S β Prop Commute a ( a ^ n ) :=
( Commute.refl : β {S : Type ?u.7258} [inst : Mul S ] (a : S ), Commute a a Commute.refl a ). pow_right n
#align commute.self_pow Commute.self_powβ
#align add_commute.self_nsmul AddCommute.self_nsmulβ
-- `MulOneClass.toHasMul` vs. `MulOneClass.toMul`
-- porting note: `simpNF` told me to remove the `simp` attribute
@[ to_additive ]
theorem pow_self ( a : M ) ( n : β ) : Commute : {S : Type ?u.7363} β [inst : Mul S ] β S β S β Prop Commute ( a ^ n ) a :=
( Commute.refl : β {S : Type ?u.7685} [inst : Mul S ] (a : S ), Commute a a Commute.refl a ). pow_left n
#align add_commute.nsmul_self AddCommute.nsmul_selfβ
-- `MulOneClass.toHasMul` vs. `MulOneClass.toMul`
#align commute.pow_self Commute.pow_self
-- porting note: `simpNF` told me to remove the `simp` attribute
@[ to_additive ]
theorem pow_pow_self ( a : M ) ( m n : β ) : Commute : {S : Type ?u.7792} β [inst : Mul S ] β S β S β Prop Commute ( a ^ m ) ( a ^ n ) :=
( Commute.refl : β {S : Type ?u.8356} [inst : Mul S ] (a : S ), Commute a a Commute.refl a ). pow_pow m n
#align commute.pow_pow_self Commute.pow_pow_selfβ
#align add_commute.nsmul_nsmul_self AddCommute.nsmul_nsmul_selfβ
-- `MulOneClass.toHasMul` vs. `MulOneClass.toMul`
@[ to_additive succ_nsmul' ]
theorem _root_.pow_succ' : β {M : Type u_1} [inst : Monoid M ] (a : M ) (n : β ), a ^ (n + 1 ) = a ^ n * a _root_.pow_succ' ( a : M ) ( n : β ) : a ^ ( n + 1 ) = a ^ n * a :=
( pow_succ : β {M : Type ?u.8963} [inst : Monoid M ] (a : M ) (n : β ), a ^ (n + 1 ) = a * a ^ n pow_succ a n ). trans : β {Ξ± : Sort ?u.8973} {a b c : Ξ± }, a = b β b = c β a = c trans ( self_pow _ _ )
#align pow_succ' pow_succ' : β {M : Type u_1} [inst : Monoid M ] (a : M ) (n : β ), a ^ (n + 1 ) = a ^ n * a pow_succ'
#align succ_nsmul' succ_nsmul'
@[ to_additive ]
theorem units_inv_right : Commute : {S : Type ?u.9071} β [inst : Mul S ] β S β S β Prop Commute a u β Commute : {S : Type ?u.9226} β [inst : Mul S ] β S β S β Prop Commute a β u β»ΒΉ :=
SemiconjBy.units_inv_right
#align commute.units_inv_right Commute.units_inv_right
#align add_commute.add_units_neg_right AddCommute.addUnits_neg_right
@[ to_additive ( attr := simp )]
theorem units_inv_right_iff : Commute : {S : Type ?u.9437} β [inst : Mul S ] β S β S β Prop Commute a β u β»ΒΉ β Commute : {S : Type ?u.9599} β [inst : Mul S ] β S β S β Prop Commute a u :=
SemiconjBy.units_inv_right_iff
#align commute.units_inv_right_iff Commute.units_inv_right_iff
#align add_commute.add_units_neg_right_iff AddCommute.addUnits_neg_right_iff
@[ to_additive ]
theorem units_inv_left : Commute : {S : Type ?u.9844} β [inst : Mul S ] β S β S β Prop Commute (β u ) a β Commute : {S : Type ?u.9872} β [inst : Mul S ] β S β S β Prop Commute (β u β»ΒΉ) a :=
SemiconjBy.units_inv_symm_left
#align commute.units_inv_left Commute.units_inv_left
#align add_commute.add_units_neg_left AddCommute.addUnits_neg_left
@[ to_additive ( attr := simp )]
theorem units_inv_left_iff : Commute : {S : Type ?u.10212} β [inst : Mul S ] β S β S β Prop Commute (β u β»ΒΉ) a β Commute : {S : Type ?u.10235} β [inst : Mul S ] β S β S β Prop Commute (β u ) a :=
SemiconjBy.units_inv_symm_left_iff
#align commute.units_inv_left_iff Commute.units_inv_left_iff
#align add_commute.add_units_neg_left_iff AddCommute.addUnits_neg_left_iff
@[ to_additive ]
theorem units_val : Commute : {S : Type ?u.10621} β [inst : Mul S ] β S β S β Prop Commute uβ uβ β Commute : {S : Type ?u.10648} β [inst : Mul S ] β S β S β Prop Commute ( uβ : M ) uβ :=
SemiconjBy.units_val
#align commute.units_coe Commute.units_val
#align add_commute.add_units_coe AddCommute.addUnits_val
@[ to_additive ]
theorem units_of_val : Commute : {S : Type ?u.10983} β [inst : Mul S ] β S β S β Prop Commute ( uβ : M ) uβ β Commute : {S : Type ?u.11240} β [inst : Mul S ] β S β S β Prop Commute uβ uβ :=
SemiconjBy.units_of_val
#align commute.units_of_coe Commute.units_of_val
#align add_commute.add_units_of_coe AddCommute.addUnits_of_val
@[ to_additive ( attr := simp )]
theorem units_val_iff : Commute : {S : Type ?u.11347} β [inst : Mul S ] β S β S β Prop Commute ( uβ : M ) uβ β Commute : {S : Type ?u.11599} β [inst : Mul S ] β S β S β Prop Commute uβ uβ :=
SemiconjBy.units_val_iff
#align commute.units_coe_iff Commute.units_val_iff
#align add_commute.add_units_coe_iff AddCommute.addUnits_val_iff
/-- If the product of two commuting elements is a unit, then the left multiplier is a unit. -/
@[ to_additive "If the sum of two commuting elements is an additive unit, then the left summand is
an additive unit."]
def _root_.Units.leftOfMul : (u : M Λ£ ) β (a b : M ) β a * b = βu β Commute a b β M Λ£ _root_.Units.leftOfMul ( u : M Λ£) ( a b : M ) ( hu : a * b = u ) ( hc : Commute : {S : Type ?u.12046} β [inst : Mul S ] β S β S β Prop Commute a b ) : M Λ£ where
val := a
inv := b * β u β»ΒΉ
val_inv := by rw [ β mul_assoc : β {G : Type ?u.12230} [inst : Semigroup G ] (a b c : G ), a * b * c = a * (b * c ) mul_assoc, hu , u . mul_inv ]
inv_val := by
have : Commute : {S : Type ?u.12303} β [inst : Mul S ] β S β S β Prop Commute a u := hu βΈ ( Commute.refl : β {S : Type ?u.12411} [inst : Mul S ] (a : S ), Commute a a Commute.refl _ ). mul_right hc
rw [ β this . units_inv_right . right_comm , β hc . eq , hu , u . mul_inv ]
#align units.left_of_mul Units.leftOfMul : {M : Type u_1} β [inst : Monoid M ] β (u : M Λ£ ) β (a b : M ) β a * b = βu β Commute a b β M Λ£ Units.leftOfMul
#align add_units.left_of_add AddUnits.leftOfAdd
/-- If the product of two commuting elements is a unit, then the right multiplier is a unit. -/
@[ to_additive "If the sum of two commuting elements is an additive unit, then the right summand
is an additive unit."]
def _root_.Units.rightOfMul : {M : Type u_1} β [inst : Monoid M ] β (u : M Λ£ ) β (a b : M ) β a * b = βu β Commute a b β M Λ£ _root_.Units.rightOfMul ( u : M Λ£) ( a b : M ) ( hu : a * b = u ) ( hc : Commute : {S : Type ?u.13227} β [inst : Mul S ] β S β S β Prop Commute a b ) : M Λ£ :=
u . leftOfMul : {M : Type ?u.13256} β [inst : Monoid M ] β (u : M Λ£ ) β (a b : M ) β a * b = βu β Commute a b β M Λ£ leftOfMul b a ( hc . eq βΈ hu ) hc . symm
#align units.right_of_mul Units.rightOfMul : {M : Type u_1} β [inst : Monoid M ] β (u : M Λ£ ) β (a b : M ) β a * b = βu β Commute a b β M Λ£ Units.rightOfMul
#align add_units.right_of_add AddUnits.rightOfAdd
@[ to_additive ]
theorem isUnit_mul_iff ( h : Commute : {S : Type ?u.13528} β [inst : Mul S ] β S β S β Prop Commute a b ) : IsUnit ( a * b ) β IsUnit a β§ IsUnit b :=
β¨ fun β¨ u , hu β© => β¨( u . leftOfMul : {M : Type ?u.13675} β [inst : Monoid M ] β (u : M Λ£ ) β (a b : M ) β a * b = βu β Commute a b β M Λ£ leftOfMul a b hu . symm : β {Ξ± : Sort ?u.13688} {a b : Ξ± }, a = b β b = a symm h ). isUnit , ( u . rightOfMul : {M : Type ?u.13718} β [inst : Monoid M ] β (u : M Λ£ ) β (a b : M ) β a * b = βu β Commute a b β M Λ£ rightOfMul a b hu . symm : β {Ξ± : Sort ?u.13728} {a b : Ξ± }, a = b β b = a symm h ). isUnit β©,
fun H => H . 1 . mul H . 2 β©
#align commute.is_unit_mul_iff Commute.isUnit_mul_iff
#align add_commute.is_add_unit_add_iff AddCommute.isAddUnit_add_iff
@[ to_additive ( attr := simp )]
theorem _root_.isUnit_mul_self_iff : IsUnit ( a * a ) β IsUnit a :=
( Commute.refl : β {S : Type ?u.14031} [inst : Mul S ] (a : S ), Commute a a Commute.refl a ). isUnit_mul_iff . trans ( and_self_iff _ )
-- porting note: `and_self_iff` now has an implicit argument instead of an explicit one.
#align is_unit_mul_self_iff isUnit_mul_self_iff
#align is_add_unit_add_self_iff isAddUnit_add_self_iff
end Monoid
section DivisionMonoid
variable [ DivisionMonoid : Type ?u.16707 β Type ?u.16707 DivisionMonoid G ] { a b c d : G }
@[ to_additive ]
protected theorem inv_inv : Commute : {S : Type ?u.14175} β [inst : Mul S ] β S β S β Prop Commute a b β Commute : {S : Type ?u.14222} β [inst : Mul S ] β S β S β Prop Commute a β»ΒΉ b β»ΒΉ :=
SemiconjBy.inv_inv_symm
#align commute.inv_inv Commute.inv_inv
#align add_commute.neg_neg AddCommute.neg_neg
@[ to_additive ( attr := simp )]
theorem inv_inv_iff : Commute : {S : Type ?u.14339} β [inst : Mul S ] β S β S β Prop Commute a β»ΒΉ b β»ΒΉ β Commute : {S : Type ?u.14423} β [inst : Mul S ] β S β S β Prop Commute a b :=
SemiconjBy.inv_inv_symm_iff
#align commute.inv_inv_iff Commute.inv_inv_iff
#align add_commute.neg_neg_iff AddCommute.neg_neg_iff
@[ to_additive ]
protected theorem mul_inv ( hab : Commute : {S : Type ?u.14543} β [inst : Mul S ] β S β S β Prop Commute a b ) : ( a * b )β»ΒΉ = a β»ΒΉ * b β»ΒΉ := by rw [ hab . eq , mul_inv_rev ]
#align commute.mul_inv Commute.mul_inv
#align add_commute.add_neg AddCommute.add_neg
@[ to_additive ]
protected theorem inv ( hab : Commute : {S : Type ?u.14898} β [inst : Mul S ] β S β S β Prop Commute a b ) : ( a * b )β»ΒΉ = a β»ΒΉ * b β»ΒΉ := by rw [ hab . eq , mul_inv_rev ]
#align commute.inv Commute.inv
#align add_commute.neg AddCommute.neg
@[ to_additive ]
protected theorem div_mul_div_comm ( hbd : Commute : {S : Type ?u.15253} β [inst : Mul S ] β S β S β Prop Commute b d ) ( hbc : Commute : {S : Type ?u.15301} β [inst : Mul S ] β S β S β Prop Commute b β»ΒΉ c ) :
a / b * ( c / d ) = a * c / ( b * d ) := by
simp_rw [ div_eq_mul_inv , mul_inv_rev , hbd . inv_inv . symm . eq , hbc . mul_mul_mul_comm : β {S : Type ?u.16017} [inst : Semigroup S ] {b c : S }, Commute b c β β (a d : S ), a * b * (c * d ) = a * c * (b * d ) mul_mul_mul_comm]
#align commute.div_mul_div_comm Commute.div_mul_div_comm
#align add_commute.sub_add_sub_comm AddCommute.sub_add_sub_comm
@[ to_additive ]
protected theorem mul_div_mul_comm ( hcd : Commute : {S : Type ?u.16160} β [inst : Mul S ] β S β S β Prop Commute c d ) ( hbc : Commute : {S : Type ?u.16208} β [inst : Mul S ] β S β S β Prop Commute b c β»ΒΉ) :
a * b / ( c * d ) = a / c * ( b / d ) :=
( hcd . div_mul_div_comm hbc . symm ). symm : β {Ξ± : Sort ?u.16640} {a b : Ξ± }, a = b β b = a symm
#align commute.mul_div_mul_comm Commute.mul_div_mul_comm
#align add_commute.add_sub_add_comm AddCommute.add_sub_add_comm
@[ to_additive ]
protected theorem div_div_div_comm ( hbc : Commute : {S : Type ?u.16718} β [inst : Mul S ] β S β S β Prop Commute b c ) ( hbd : Commute : {S : Type ?u.16766} β [inst : Mul S ] β S β S β Prop Commute b β»ΒΉ d ) ( hcd : Commute : {S : Type ?u.16806} β [inst : Mul S ] β S β S β Prop Commute c β»ΒΉ d ) :
a / b / ( c / d ) = a / c / ( b / d ) := by
simp_rw [ div_eq_mul_inv , mul_inv_rev , inv_inv , hbd . symm . eq , hcd . symm . eq ,
hbc . inv_inv . mul_mul_mul_comm : β {S : Type ?u.17604} [inst : Semigroup S ] {b c : S }, Commute b c β β (a d : S ), a * b * (c * d ) = a * c * (b * d ) mul_mul_mul_comm]
#align commute.div_div_div_comm Commute.div_div_div_comm
#align add_commute.sub_sub_sub_comm AddCommute.sub_sub_sub_comm
end DivisionMonoid
section Group
variable [ Group G ] { a b : G }
@[ to_additive ]
theorem inv_right : Commute : {S : Type ?u.17758} β [inst : Mul S ] β S β S β Prop Commute a b β Commute : {S : Type ?u.17797} β [inst : Mul S ] β S β S β Prop Commute a b β»ΒΉ :=
SemiconjBy.inv_right
#align commute.inv_right Commute.inv_right
#align add_commute.neg_right AddCommute.neg_right
@[ to_additive ( attr := simp )]
theorem inv_right_iff : Commute : {S : Type ?u.17910} β [inst : Mul S ] β S β S β Prop Commute a b β»ΒΉ β Commute : {S : Type ?u.17987} β [inst : Mul S ] β S β S β Prop Commute a b :=
SemiconjBy.inv_right_iff
#align commute.inv_right_iff Commute.inv_right_iff
#align add_commute.neg_right_iff AddCommute.neg_right_iff
@[ to_additive ]
theorem inv_left : Commute : {S : Type ?u.18105} β [inst : Mul S ] β S β S β Prop Commute a b β Commute : {S : Type ?u.18144} β [inst : Mul S ] β S β S β Prop Commute a β»ΒΉ b :=
SemiconjBy.inv_symm_left
#align commute.inv_left Commute.inv_left
#align add_commute.neg_left AddCommute.neg_left
@[ to_additive ( attr := simp )]
theorem inv_left_iff : Commute : {S : Type ?u.18257} β [inst : Mul S ] β S β S β Prop Commute a β»ΒΉ b β Commute : {S : Type ?u.18334} β [inst : Mul S ] β S β S β Prop Commute a b :=
SemiconjBy.inv_symm_left_iff
#align commute.inv_left_iff Commute.inv_left_iff
#align add_commute.neg_left_iff AddCommute.neg_left_iff
@[ to_additive ]
protected theorem inv_mul_cancel ( h : Commute : {S : Type ?u.18451} β [inst : Mul S ] β S β S β Prop Commute a b ) : a β»ΒΉ * b * a = b := by
rw [ h . inv_left . eq , inv_mul_cancel_right : β {G : Type ?u.18714} [inst : Group G ] (a b : G ), a * b β»ΒΉ * b = a inv_mul_cancel_right]
#align commute.inv_mul_cancel Commute.inv_mul_cancel
#align add_commute.neg_add_cancel AddCommute.neg_add_cancel
@[ to_additive ]
theorem inv_mul_cancel_assoc ( h : Commute : {S : Type ?u.18780} β [inst : Mul S ] β S β S β Prop Commute a b ) : a β»ΒΉ * ( b * a ) = b := by
rw [ β mul_assoc : β {G : Type ?u.18971} [inst : Semigroup G ] (a b c : G ), a * b * c = a * (b * c ) mul_assoc, h . inv_mul_cancel ]
#align commute.inv_mul_cancel_assoc Commute.inv_mul_cancel_assoc
#align add_commute.neg_add_cancel_assoc AddCommute.neg_add_cancel_assoc
@[ to_additive ]
protected theorem mul_inv_cancel ( h : Commute : {S : Type ?u.19132} β [inst : Mul S ] β S β S β Prop Commute a b ) : a * b * a β»ΒΉ = b := by
rw [ h . eq , mul_inv_cancel_right : β {G : Type ?u.19376} [inst : Group G ] (a b : G ), a * b * b β»ΒΉ = a mul_inv_cancel_right]
#align commute.mul_inv_cancel Commute.mul_inv_cancel
#align add_commute.add_neg_cancel AddCommute.add_neg_cancel
@[ to_additive ]
theorem mul_inv_cancel_assoc ( h : Commute : {S : Type ?u.19450} β [inst : Mul S ] β S β S β Prop Commute a b ) : a * ( b * a β»ΒΉ) = b := by
rw [ β mul_assoc : β {G : Type ?u.19641} [inst : Semigroup G ] (a b c : G ), a * b * c = a * (b * c ) mul_assoc, h . mul_inv_cancel ]
#align commute.mul_inv_cancel_assoc Commute.mul_inv_cancel_assoc
#align add_commute.add_neg_cancel_assoc AddCommute.add_neg_cancel_assoc
end Group
end Commute
section CommGroup
variable [ CommGroup : Type ?u.20361 β Type ?u.20361 CommGroup G ] ( a b : G )
@[ to_additive ( attr := simp )]
theorem mul_inv_cancel_comm : a * b * a β»ΒΉ = b :=
( Commute.all a b ). mul_inv_cancel
#align mul_inv_cancel_comm mul_inv_cancel_comm
#align add_neg_cancel_comm add_neg_cancel_comm
@[ to_additive ( attr := simp )]
theorem mul_inv_cancel_comm_assoc : a * (b * a β»ΒΉ ) = b mul_inv_cancel_comm_assoc : a * ( b * a β»ΒΉ) = b :=
( Commute.all a b ). mul_inv_cancel_assoc
#align mul_inv_cancel_comm_assoc mul_inv_cancel_comm_assoc
#align add_neg_cancel_comm_assoc add_neg_cancel_comm_assoc
@[ to_additive ( attr := simp )]
theorem inv_mul_cancel_comm : a β»ΒΉ * b * a = b :=
( Commute.all a b ). inv_mul_cancel
#align inv_mul_cancel_comm inv_mul_cancel_comm
#align neg_add_cancel_comm neg_add_cancel_comm
@[ to_additive ( attr := simp )]
theorem inv_mul_cancel_comm_assoc : a β»ΒΉ * (b * a ) = b inv_mul_cancel_comm_assoc : a β»ΒΉ * ( b * a ) = b :=
( Commute.all a b ). inv_mul_cancel_assoc
#align inv_mul_cancel_comm_assoc inv_mul_cancel_comm_assoc
#align neg_add_cancel_comm_assoc neg_add_cancel_comm_assoc
end CommGroup