doc-next-gen

Mathlib.Algebra.Group.End

Module docstring

{"# Monoids of endomorphisms, groups of automorphisms

This file defines * the endomorphism monoid structure on Function.End α := α → α * the endomorphism monoid structure on Monoid.End M := M →* M and AddMonoid.End M := M →+ M * the automorphism group structure on Equiv.Perm α := α ≃ α * the automorphism group structure on MulAut M := M ≃* M and AddAut M := M ≃+ M.

Implementation notes

The definition of multiplication in the endomorphism monoids and automorphism groups agrees with function composition, and multiplication in CategoryTheory.End, but not with CategoryTheory.comp.

Tags

end monoid, aut group ","### Type endomorphisms ","### Monoid endomorphisms ","Lemmas about mixing Perm with Equiv. Because we have multiple ways to express Equiv.refl, Equiv.symm, and Equiv.trans, we want simp lemmas for every combination. The assumption made here is that if you're using the group structure, you want to preserve it after simp. ","Lemmas about Equiv.Perm.sumCongr re-expressed via the group structure. ","Lemmas about Equiv.Perm.sigmaCongrRight re-expressed via the group structure. ","Lemmas about Equiv.Perm.extendDomain re-expressed via the group structure. "}

Function.End definition
Full source
/-- The monoid of endomorphisms.

Note that this is generalized by `CategoryTheory.End` to categories other than `Type u`. -/
protected def Function.End := α → α
Endomorphism monoid of a type
Informal description
The monoid structure on the set of all endomorphisms (self-maps) of a type $\alpha$, where the multiplication is given by function composition and the identity element is the identity function.
instMonoidEnd instance
: Monoid (Function.End α)
Full source
instance : Monoid (Function.End α) where
  one := id
  mul := (· ∘ ·)
  mul_assoc _ _ _ := rfl
  mul_one _ := rfl
  one_mul _ := rfl
  npow n f := f^[n]
  npow_succ _ _ := Function.iterate_succ _ _
Monoid Structure on Endomorphisms of a Type
Informal description
The set of all endomorphisms (self-maps) of a type $\alpha$ forms a monoid under function composition, with the identity function as the neutral element.
instInhabitedEnd instance
: Inhabited (Function.End α)
Full source
instance : Inhabited (Function.End α) := ⟨1⟩
Endomorphisms are Inhabited
Informal description
The set of all endomorphisms (self-maps) of a type $\alpha$ is nonempty, with the identity function as a distinguished element.
Equiv.Perm.instOne instance
: One (Perm α)
Full source
instance instOne : One (Perm α) where one := Equiv.refl _
Identity Permutation as Neutral Element
Informal description
For any type $\alpha$, the set of permutations $\text{Perm}(\alpha)$ is equipped with a neutral element given by the identity permutation.
Equiv.Perm.instMul instance
: Mul (Perm α)
Full source
instance instMul : Mul (Perm α) where mul f g := Equiv.trans g f
Composition as Multiplication in the Permutation Group
Informal description
For any type $\alpha$, the set of permutations $\text{Perm}(\alpha)$ is equipped with a multiplication operation given by composition of permutations. That is, for any two permutations $f, g \in \text{Perm}(\alpha)$, their product $f \cdot g$ is defined as the composition $g \circ f$.
Equiv.Perm.instInv instance
: Inv (Perm α)
Full source
instance instInv : Inv (Perm α) where inv := Equiv.symm
Inversion Operation on Permutations
Informal description
For any type $\alpha$, the set of permutations $\text{Perm}(\alpha)$ is equipped with an inversion operation, where for each permutation $f \in \text{Perm}(\alpha)$, the inverse $f^{-1}$ is the unique permutation such that $f \circ f^{-1} = f^{-1} \circ f = \text{id}$.
Equiv.Perm.instPowNat instance
: Pow (Perm α) ℕ
Full source
instance instPowNat : Pow (Perm α)  where
  pow f n := ⟨f^[n], f.symm^[n], f.left_inv.iterate _, f.right_inv.iterate _⟩
Iterated Composition of Permutations
Informal description
For any type $\alpha$, the set of permutations $\text{Perm}(\alpha)$ is equipped with a power operation, where for any permutation $f \in \text{Perm}(\alpha)$ and natural number $n$, the power $f^n$ is defined as the $n$-fold composition of $f$ with itself.
Equiv.Perm.permGroup instance
: Group (Perm α)
Full source
instance permGroup : Group (Perm α) where
  mul_assoc _ _ _ := (trans_assoc _ _ _).symm
  one_mul := trans_refl
  mul_one := refl_trans
  inv_mul_cancel := self_trans_symm
  npow n f := f ^ n
  npow_succ _ _ := coe_fn_injective <| Function.iterate_succ _ _
  zpow := zpowRec fun n f ↦ f ^ n
  zpow_succ' _ _ := coe_fn_injective <| Function.iterate_succ _ _
Permutation Group Structure
Informal description
For any type $\alpha$, the set of permutations $\text{Perm}(\alpha)$ forms a group under composition of functions, with the identity permutation as the neutral element and the inverse permutation as the group inverse.
Equiv.Perm.default_eq theorem
: (default : Perm α) = 1
Full source
@[simp]
theorem default_eq : (default : Perm α) = 1 :=
  rfl
Default Permutation is Identity
Informal description
For any type $\alpha$, the default permutation in $\text{Perm}(\alpha)$ is equal to the identity permutation $1$.
Equiv.Perm.equivUnitsEnd definition
: Perm α ≃* Units (Function.End α)
Full source
/-- The permutation of a type is equivalent to the units group of the endomorphisms monoid of this
type. -/
@[simps]
def equivUnitsEnd : PermPerm α ≃* Units (Function.End α) where
  -- Porting note: needed to add `.toFun`.
  toFun e := ⟨e.toFun, e.symm.toFun, e.self_comp_symm, e.symm_comp_self⟩
  invFun u :=
    ⟨(u : Function.End α), (↑u⁻¹ : Function.End α), congr_fun u.inv_val, congr_fun u.val_inv⟩
  left_inv _ := ext fun _ => rfl
  right_inv _ := Units.ext rfl
  map_mul' _ _ := rfl
Permutation group as units of endomorphism monoid
Informal description
The type of permutations of a type $\alpha$ is multiplicatively equivalent to the group of units of the endomorphism monoid of $\alpha$. More precisely, there is a multiplicative isomorphism between the group of permutations $\text{Perm}(\alpha)$ and the group of invertible elements in the monoid of all endomorphisms $\text{End}(\alpha) = \alpha \to \alpha$ (where multiplication is given by function composition). The equivalence maps: - Each permutation $e \in \text{Perm}(\alpha)$ to the unit $\langle e, e^{-1}, \text{proofs}\rangle \in (\text{End}(\alpha))^\times$ - Each unit $\langle f, g, \text{proofs}\rangle \in (\text{End}(\alpha))^\times$ back to the permutation $\langle f, g, \text{proofs}\rangle \in \text{Perm}(\alpha)$ This isomorphism preserves the group structure, meaning it respects multiplication and inverses.
MonoidHom.toHomPerm definition
{G : Type*} [Group G] (f : G →* Function.End α) : G →* Perm α
Full source
/-- Lift a monoid homomorphism `f : G →* Function.End α` to a monoid homomorphism
`f : G →* Equiv.Perm α`. -/
@[simps!]
def _root_.MonoidHom.toHomPerm {G : Type*} [Group G] (f : G →* Function.End α) : G →* Perm α :=
  equivUnitsEnd.symm.toMonoidHom.comp f.toHomUnits
Lifting a monoid homomorphism to the permutation group
Informal description
Given a group $G$ and a monoid homomorphism $f \colon G \to \text{End}(\alpha)$ from $G$ to the endomorphism monoid of a type $\alpha$, the function `MonoidHom.toHomPerm` constructs a monoid homomorphism from $G$ to the permutation group $\text{Perm}(\alpha)$ by first lifting $f$ to the group of units of $\text{End}(\alpha)$ and then applying the multiplicative equivalence between the group of units and the permutation group.
Equiv.Perm.mul_apply theorem
(f g : Perm α) (x) : (f * g) x = f (g x)
Full source
theorem mul_apply (f g : Perm α) (x) : (f * g) x = f (g x) :=
  Equiv.trans_apply _ _ _
Composition of Permutations Acts as Function Composition
Informal description
For any permutations $f$ and $g$ of a type $\alpha$ and any element $x \in \alpha$, the composition of $f$ and $g$ evaluated at $x$ equals $f$ applied to $g(x)$, i.e., $(f \circ g)(x) = f(g(x))$.
Equiv.Perm.one_apply theorem
(x) : (1 : Perm α) x = x
Full source
theorem one_apply (x) : (1 : Perm α) x = x :=
  rfl
Identity Permutation Acts Trivially
Informal description
For any element $x$ of type $\alpha$, the identity permutation $1 \in \text{Perm}(\alpha)$ acts trivially on $x$, i.e., $1(x) = x$.
Equiv.Perm.inv_apply_self theorem
(f : Perm α) (x) : f⁻¹ (f x) = x
Full source
@[simp]
theorem inv_apply_self (f : Perm α) (x) : f⁻¹ (f x) = x :=
  f.symm_apply_apply x
Inverse Permutation Recovers Original Element: $f^{-1}(f(x)) = x$
Informal description
For any permutation $f$ of a type $\alpha$ and any element $x \in \alpha$, the inverse permutation $f^{-1}$ satisfies $f^{-1}(f(x)) = x$.
Equiv.Perm.apply_inv_self theorem
(f : Perm α) (x) : f (f⁻¹ x) = x
Full source
@[simp]
theorem apply_inv_self (f : Perm α) (x) : f (f⁻¹ x) = x :=
  f.apply_symm_apply x
Permutation Recovery: $f(f^{-1}(x)) = x$
Informal description
For any permutation $f$ of a type $\alpha$ and any element $x \in \alpha$, applying $f$ to the inverse permutation $f^{-1}$ evaluated at $x$ recovers $x$, i.e., $f(f^{-1}(x)) = x$.
Equiv.Perm.one_def theorem
: (1 : Perm α) = Equiv.refl α
Full source
theorem one_def : (1 : Perm α) = Equiv.refl α :=
  rfl
Identity Permutation as Identity Equivalence
Informal description
The identity permutation (denoted as $1$) on a type $\alpha$ is equal to the identity equivalence $\text{refl}_\alpha$ on $\alpha$.
Equiv.Perm.mul_def theorem
(f g : Perm α) : f * g = g.trans f
Full source
theorem mul_def (f g : Perm α) : f * g = g.trans f :=
  rfl
Permutation Multiplication as Composition: $f \cdot g = g \circ f$
Informal description
For any two permutations $f$ and $g$ of a type $\alpha$, the product $f \cdot g$ is equal to the composition of equivalences $g \circ f$.
Equiv.Perm.inv_def theorem
(f : Perm α) : f⁻¹ = f.symm
Full source
theorem inv_def (f : Perm α) : f⁻¹ = f.symm :=
  rfl
Inverse of a Permutation Equals its Symmetric Equivalence
Informal description
For any permutation $f$ of a type $\alpha$, the inverse permutation $f^{-1}$ is equal to the symmetric equivalence $f^{\text{symm}}$, where $f^{\text{symm}}$ is the bijection obtained by swapping the domain and codomain of $f$.
Equiv.Perm.coe_one theorem
: ⇑(1 : Perm α) = id
Full source
@[simp, norm_cast] lemma coe_one : ⇑(1 : Perm α) = id := rfl
Identity Permutation as Identity Function
Informal description
The underlying function of the identity permutation $1$ on a type $\alpha$ is equal to the identity function $\text{id}$ on $\alpha$.
Equiv.Perm.coe_mul theorem
(f g : Perm α) : ⇑(f * g) = f ∘ g
Full source
@[simp, norm_cast] lemma coe_mul (f g : Perm α) : ⇑(f * g) = f ∘ g := rfl
Permutation multiplication as function composition: $(f \cdot g)(x) = f(g(x))$
Informal description
For any two permutations $f$ and $g$ of a type $\alpha$, the underlying function of their product $f \cdot g$ in the permutation group is equal to the composition $f \circ g$ of their underlying functions.
Equiv.Perm.coe_pow theorem
(f : Perm α) (n : ℕ) : ⇑(f ^ n) = f^[n]
Full source
@[norm_cast] lemma coe_pow (f : Perm α) (n : ) : ⇑(f ^ n) = f^[n] := rfl
Permutation Power as Iterated Composition: $(f^n)(x) = f^{[n]}(x)$
Informal description
For any permutation $f$ of a type $\alpha$ and any natural number $n$, the underlying function of the $n$-th power of $f$ (denoted $f^n$) is equal to the $n$-th iterate of $f$ (denoted $f^{[n]}$), i.e., $(f^n)(x) = f^{[n]}(x)$ for all $x \in \alpha$.
Equiv.Perm.iterate_eq_pow theorem
(f : Perm α) (n : ℕ) : f^[n] = ⇑(f ^ n)
Full source
@[simp] lemma iterate_eq_pow (f : Perm α) (n : ) : f^[n] = ⇑(f ^ n) := rfl
Iteration of Permutation Equals Group Power
Informal description
For any permutation $f$ of a type $\alpha$ and any natural number $n$, the $n$-th iterate of $f$ is equal to the $n$-th power of $f$ in the permutation group, i.e., $f^{[n]} = f^n$.
Equiv.Perm.inv_eq_iff_eq theorem
{f : Perm α} {x y : α} : f⁻¹ x = y ↔ x = f y
Full source
theorem inv_eq_iff_eq {f : Perm α} {x y : α} : f⁻¹f⁻¹ x = y ↔ x = f y :=
  f.symm_apply_eq
Permutation Inverse Characterization: $f^{-1}(x) = y \leftrightarrow x = f(y)$
Informal description
For any permutation $f$ of a type $\alpha$ and any elements $x, y \in \alpha$, the equality $f^{-1}(x) = y$ holds if and only if $x = f(y)$.
Equiv.Perm.zpow_apply_comm theorem
{α : Type*} (σ : Perm α) (m n : ℤ) {x : α} : (σ ^ m) ((σ ^ n) x) = (σ ^ n) ((σ ^ m) x)
Full source
theorem zpow_apply_comm {α : Type*} (σ : Perm α) (m n : ) {x : α} :
    (σ ^ m) ((σ ^ n) x) = (σ ^ n) ((σ ^ m) x) := by
  rw [← Equiv.Perm.mul_apply, ← Equiv.Perm.mul_apply, zpow_mul_comm]
Commutativity of Permutation Powers: $\sigma^m(\sigma^n(x)) = \sigma^n(\sigma^m(x))$
Informal description
For any permutation $\sigma$ of a type $\alpha$, any integers $m$ and $n$, and any element $x \in \alpha$, the application of $\sigma^m$ to $\sigma^n(x)$ equals the application of $\sigma^n$ to $\sigma^m(x)$, i.e., $\sigma^m(\sigma^n(x)) = \sigma^n(\sigma^m(x))$.
Equiv.Perm.trans_one theorem
{α : Sort*} {β : Type*} (e : α ≃ β) : e.trans (1 : Perm β) = e
Full source
@[simp]
theorem trans_one {α : Sort*} {β : Type*} (e : α ≃ β) : e.trans (1 : Perm β) = e :=
  Equiv.trans_refl e
Right Identity Law for Equivalence Composition with Permutation Identity
Informal description
For any equivalence $e : \alpha \simeq \beta$, the composition of $e$ with the identity permutation on $\beta$ is equal to $e$ itself, i.e., $e \circ \text{id}_\beta = e$.
Equiv.Perm.mul_refl theorem
(e : Perm α) : e * Equiv.refl α = e
Full source
@[simp]
theorem mul_refl (e : Perm α) : e * Equiv.refl α = e :=
  Equiv.trans_refl e
Right Identity Law for Permutation Composition
Informal description
For any permutation $e$ of a type $\alpha$, the composition of $e$ with the identity permutation $\text{id}_\alpha$ is equal to $e$ itself, i.e., $e \circ \text{id}_\alpha = e$.
Equiv.Perm.one_symm theorem
: (1 : Perm α).symm = 1
Full source
@[simp]
theorem one_symm : (1 : Perm α).symm = 1 :=
  Equiv.refl_symm
Inverse of Identity Permutation is Identity
Informal description
The inverse of the identity permutation on a type $\alpha$ is equal to the identity permutation itself, i.e., $(1_{\text{Perm}(\alpha)})^{-1} = 1_{\text{Perm}(\alpha)}$.
Equiv.Perm.refl_inv theorem
: (Equiv.refl α : Perm α)⁻¹ = 1
Full source
@[simp]
theorem refl_inv : (Equiv.refl α : Perm α)⁻¹ = 1 :=
  Equiv.refl_symm
Inverse of Identity Permutation is Identity
Informal description
The inverse of the identity permutation on a type $\alpha$ is equal to the identity permutation, i.e., $(\text{id}_\alpha)^{-1} = \text{id}_\alpha$.
Equiv.Perm.one_trans theorem
{α : Type*} {β : Sort*} (e : α ≃ β) : (1 : Perm α).trans e = e
Full source
@[simp]
theorem one_trans {α : Type*} {β : Sort*} (e : α ≃ β) : (1 : Perm α).trans e = e :=
  Equiv.refl_trans e
Identity Permutation is Left Neutral for Composition with Equivalence
Informal description
For any equivalence $e : \alpha \simeq \beta$, the composition of the identity permutation on $\alpha$ with $e$ is equal to $e$ itself, i.e., $\text{id}_\alpha \circ e = e$.
Equiv.Perm.refl_mul theorem
(e : Perm α) : Equiv.refl α * e = e
Full source
@[simp]
theorem refl_mul (e : Perm α) : Equiv.refl α * e = e :=
  Equiv.refl_trans e
Identity Permutation is Left Neutral for Composition
Informal description
For any permutation $e$ of a type $\alpha$, the composition of the identity permutation with $e$ equals $e$, i.e., $\text{id}_\alpha \circ e = e$.
Equiv.Perm.inv_trans_self theorem
(e : Perm α) : e⁻¹.trans e = 1
Full source
@[simp]
theorem inv_trans_self (e : Perm α) : e⁻¹.trans e = 1 :=
  Equiv.symm_trans_self e
Inverse-Then-Forward Composition Yields Identity Permutation: $e^{-1} \circ e = \text{id}_\alpha$
Informal description
For any permutation $e$ of a type $\alpha$, the composition of its inverse $e^{-1}$ with $e$ itself yields the identity permutation, i.e., $e^{-1} \circ e = \text{id}_\alpha$.
Equiv.Perm.mul_symm theorem
(e : Perm α) : e * e.symm = 1
Full source
@[simp]
theorem mul_symm (e : Perm α) : e * e.symm = 1 :=
  Equiv.symm_trans_self e
Composition of Permutation with its Inverse Yields Identity
Informal description
For any permutation $e$ of a type $\alpha$, the composition of $e$ with its inverse $e^{-1}$ yields the identity permutation, i.e., $e \circ e^{-1} = \text{id}_\alpha$.
Equiv.Perm.self_trans_inv theorem
(e : Perm α) : e.trans e⁻¹ = 1
Full source
@[simp]
theorem self_trans_inv (e : Perm α) : e.trans e⁻¹ = 1 :=
  Equiv.self_trans_symm e
Composition of Permutation with its Inverse Yields Identity
Informal description
For any permutation $e$ of a type $\alpha$, the composition of $e$ with its inverse $e^{-1}$ yields the identity permutation, i.e., $e \circ e^{-1} = \text{id}_\alpha$.
Equiv.Perm.symm_mul theorem
(e : Perm α) : e.symm * e = 1
Full source
@[simp]
theorem symm_mul (e : Perm α) : e.symm * e = 1 :=
  Equiv.self_trans_symm e
Inverse Permutation Composition Yields Identity
Informal description
For any permutation $e$ of a type $\alpha$, the composition of the inverse permutation $e^{-1}$ with $e$ yields the identity permutation, i.e., $e^{-1} \circ e = \text{id}_\alpha$.
Equiv.Perm.sumCongr_mul theorem
{α β : Type*} (e : Perm α) (f : Perm β) (g : Perm α) (h : Perm β) : sumCongr e f * sumCongr g h = sumCongr (e * g) (f * h)
Full source
@[simp]
theorem sumCongr_mul {α β : Type*} (e : Perm α) (f : Perm β) (g : Perm α) (h : Perm β) :
    sumCongr e f * sumCongr g h = sumCongr (e * g) (f * h) :=
  sumCongr_trans g h e f
Product of Sum Permutations Equals Sum of Products
Informal description
For any permutations $e, g$ of a type $\alpha$ and $f, h$ of a type $\beta$, the product of the sum permutations $\text{sumCongr}(e, f)$ and $\text{sumCongr}(g, h)$ equals the sum permutation of the products $e \cdot g$ and $f \cdot h$, i.e., $$\text{sumCongr}(e, f) \cdot \text{sumCongr}(g, h) = \text{sumCongr}(e \cdot g, f \cdot h).$$
Equiv.Perm.sumCongr_inv theorem
{α β : Type*} (e : Perm α) (f : Perm β) : (sumCongr e f)⁻¹ = sumCongr e⁻¹ f⁻¹
Full source
@[simp]
theorem sumCongr_inv {α β : Type*} (e : Perm α) (f : Perm β) :
    (sumCongr e f)⁻¹ = sumCongr e⁻¹ f⁻¹ :=
  sumCongr_symm e f
Inverse of Sum Permutation Equals Sum of Inverses
Informal description
For any permutations $e$ of type $\alpha$ and $f$ of type $\beta$, the inverse of the permutation $\text{sumCongr}(e, f)$ of the sum type $\alpha \oplus \beta$ is equal to the permutation obtained by applying the inverses componentwise, i.e., $(\text{sumCongr}(e, f))^{-1} = \text{sumCongr}(e^{-1}, f^{-1})$.
Equiv.Perm.sumCongr_one theorem
{α β : Type*} : sumCongr (1 : Perm α) (1 : Perm β) = 1
Full source
@[simp]
theorem sumCongr_one {α β : Type*} : sumCongr (1 : Perm α) (1 : Perm β) = 1 :=
  sumCongr_refl
Identity Permutation Preserved Under Sum Construction
Informal description
For any types $\alpha$ and $\beta$, the permutation $\text{sumCongr}(1_\alpha, 1_\beta)$ of the sum type $\alpha \oplus \beta$ is equal to the identity permutation $1_{\alpha \oplus \beta}$, where $1_\alpha$ and $1_\beta$ denote the identity permutations on $\alpha$ and $\beta$ respectively.
Equiv.Perm.sumCongrHom definition
(α β : Type*) : Perm α × Perm β →* Perm (α ⊕ β)
Full source
/-- `Equiv.Perm.sumCongr` as a `MonoidHom`, with its two arguments bundled into a single `Prod`.

This is particularly useful for its `MonoidHom.range` projection, which is the subgroup of
permutations which do not exchange elements between `α` and `β`. -/
@[simps]
def sumCongrHom (α β : Type*) : PermPerm α × Perm βPerm α × Perm β →* Perm (α ⊕ β) where
  toFun a := sumCongr a.1 a.2
  map_one' := sumCongr_one
  map_mul' _ _ := (sumCongr_mul _ _ _ _).symm
Sum type permutation homomorphism
Informal description
The monoid homomorphism that takes a pair of permutations $(e_\alpha, e_\beta)$ of types $\alpha$ and $\beta$ respectively, and returns the permutation of the sum type $\alpha \oplus \beta$ obtained by applying $e_\alpha$ to left components and $e_\beta$ to right components. This homomorphism preserves the identity and composition of permutations.
Equiv.Perm.sumCongrHom_injective theorem
{α β : Type*} : Function.Injective (sumCongrHom α β)
Full source
theorem sumCongrHom_injective {α β : Type*} : Function.Injective (sumCongrHom α β) := by
  rintro ⟨⟩ ⟨⟩ h
  rw [Prod.mk_inj]
  constructor <;> ext i
  · simpa using Equiv.congr_fun h (Sum.inl i)
  · simpa using Equiv.congr_fun h (Sum.inr i)
Injectivity of Sum Type Permutation Homomorphism
Informal description
For any types $\alpha$ and $\beta$, the homomorphism $\text{sumCongrHom}_{\alpha,\beta}$ from the product of permutation groups $\text{Perm}(\alpha) \times \text{Perm}(\beta)$ to the permutation group $\text{Perm}(\alpha \oplus \beta)$ is injective. In other words, if two pairs of permutations $(e_\alpha, e_\beta)$ and $(e'_\alpha, e'_\beta)$ induce the same permutation on $\alpha \oplus \beta$ via $\text{sumCongrHom}_{\alpha,\beta}$, then $e_\alpha = e'_\alpha$ and $e_\beta = e'_\beta$.
Equiv.Perm.sumCongr_swap_one theorem
{α β : Type*} [DecidableEq α] [DecidableEq β] (i j : α) : sumCongr (Equiv.swap i j) (1 : Perm β) = Equiv.swap (Sum.inl i) (Sum.inl j)
Full source
@[simp]
theorem sumCongr_swap_one {α β : Type*} [DecidableEq α] [DecidableEq β] (i j : α) :
    sumCongr (Equiv.swap i j) (1 : Perm β) = Equiv.swap (Sum.inl i) (Sum.inl j) :=
  sumCongr_swap_refl i j
Sum Congruence of Swap and Identity Permutation Equals Swap on Left Inclusions
Informal description
For any types $\alpha$ and $\beta$ with decidable equality, and for any elements $i, j \in \alpha$, the permutation obtained by taking the sum congruence of the swap permutation $\mathrm{swap}(i, j)$ on $\alpha$ and the identity permutation on $\beta$ is equal to the swap permutation $\mathrm{swap}(\mathrm{inl}(i), \mathrm{inl}(j))$ on the sum type $\alpha \oplus \beta$.
Equiv.Perm.sumCongr_one_swap theorem
{α β : Type*} [DecidableEq α] [DecidableEq β] (i j : β) : sumCongr (1 : Perm α) (Equiv.swap i j) = Equiv.swap (Sum.inr i) (Sum.inr j)
Full source
@[simp]
theorem sumCongr_one_swap {α β : Type*} [DecidableEq α] [DecidableEq β] (i j : β) :
    sumCongr (1 : Perm α) (Equiv.swap i j) = Equiv.swap (Sum.inr i) (Sum.inr j) :=
  sumCongr_refl_swap i j
Direct Sum of Identity and Swap Permutation Equals Swap of Right Injections
Informal description
For any types $\alpha$ and $\beta$ with decidable equality, and for any elements $i, j \in \beta$, the permutation obtained by taking the direct sum of the identity permutation on $\alpha$ and the swap permutation of $i$ and $j$ on $\beta$ is equal to the swap permutation of the right injections $\mathrm{inr}(i)$ and $\mathrm{inr}(j)$ in the sum type $\alpha \oplus \beta$.
Equiv.Perm.sigmaCongrRight_mul theorem
{α : Type*} {β : α → Type*} (F : ∀ a, Perm (β a)) (G : ∀ a, Perm (β a)) : sigmaCongrRight F * sigmaCongrRight G = sigmaCongrRight (F * G)
Full source
@[simp]
theorem sigmaCongrRight_mul {α : Type*} {β : α → Type*} (F : ∀ a, Perm (β a))
    (G : ∀ a, Perm (β a)) : sigmaCongrRight F * sigmaCongrRight G = sigmaCongrRight (F * G) :=
  sigmaCongrRight_trans G F
Component-wise Multiplication of Permutations on Dependent Sums
Informal description
For any type $\alpha$ and a family of types $\beta : \alpha \to \text{Type}$, given two families of permutations $F, G : \forall a, \text{Perm}(\beta a)$, the product of the permutations $\text{sigmaCongrRight}\, F$ and $\text{sigmaCongrRight}\, G$ on the dependent sum type $\Sigma a, \beta a$ is equal to the permutation obtained by component-wise multiplication, i.e., \[ (\text{sigmaCongrRight}\, F) \cdot (\text{sigmaCongrRight}\, G) = \text{sigmaCongrRight}\, (\lambda a, F a \cdot G a). \]
Equiv.Perm.sigmaCongrRight_inv theorem
{α : Type*} {β : α → Type*} (F : ∀ a, Perm (β a)) : (sigmaCongrRight F)⁻¹ = sigmaCongrRight fun a => (F a)⁻¹
Full source
@[simp]
theorem sigmaCongrRight_inv {α : Type*} {β : α → Type*} (F : ∀ a, Perm (β a)) :
    (sigmaCongrRight F)⁻¹ = sigmaCongrRight fun a => (F a)⁻¹ :=
  sigmaCongrRight_symm F
Inverse of Component-wise Permutation on Dependent Sums
Informal description
For any family of permutations $F : \forall a, \text{Perm}(\beta a)$ indexed by elements of type $\alpha$, the inverse of the permutation $\text{sigmaCongrRight } F$ on the dependent sum type $\Sigma a, \beta a$ is equal to the permutation obtained by applying the inverse of each $F a$ component-wise, i.e., $$(\text{sigmaCongrRight } F)^{-1} = \text{sigmaCongrRight } (\lambda a, (F a)^{-1}).$$
Equiv.Perm.sigmaCongrRight_one theorem
{α : Type*} {β : α → Type*} : sigmaCongrRight (1 : ∀ a, Equiv.Perm <| β a) = 1
Full source
@[simp]
theorem sigmaCongrRight_one {α : Type*} {β : α → Type*} :
    sigmaCongrRight (1 : ∀ a, Equiv.Perm <| β a) = 1 :=
  sigmaCongrRight_refl
Identity Permutation Preserves Dependent Sum Identity
Informal description
For any type $\alpha$ and family of types $\beta : \alpha \to \text{Type}^*$, the permutation obtained by applying the identity permutation component-wise to each $\beta(a)$ is equal to the identity permutation on the dependent sum type $\Sigma a, \beta a$. That is, $\text{sigmaCongrRight}(1) = 1$.
Equiv.Perm.sigmaCongrRightHom definition
{α : Type*} (β : α → Type*) : (∀ a, Perm (β a)) →* Perm (Σ a, β a)
Full source
/-- `Equiv.Perm.sigmaCongrRight` as a `MonoidHom`.

This is particularly useful for its `MonoidHom.range` projection, which is the subgroup of
permutations which do not exchange elements between fibers. -/
@[simps]
def sigmaCongrRightHom {α : Type*} (β : α → Type*) : (∀ a, Perm (β a)) →* Perm (Σa, β a) where
  toFun := sigmaCongrRight
  map_one' := sigmaCongrRight_one
  map_mul' _ _ := (sigmaCongrRight_mul _ _).symm
Monoid Homomorphism for Component-wise Permutations on Dependent Sums
Informal description
Given a family of types $\beta : \alpha \to \text{Type}^*$ indexed by elements of type $\alpha$, the function $\text{sigmaCongrRightHom}$ constructs a monoid homomorphism from the product monoid of permutations $\forall a, \text{Perm}(\beta a)$ to the permutation monoid $\text{Perm}(\Sigma a, \beta a)$ of the dependent sum type. The homomorphism maps a family of permutations $F : \forall a, \text{Perm}(\beta a)$ to the permutation $\text{sigmaCongrRight } F$ on the dependent sum type, which applies $F a$ to the second component of each pair $\langle a, b \rangle$. The homomorphism preserves the identity and composition of permutations.
Equiv.Perm.sigmaCongrRightHom_injective theorem
{α : Type*} {β : α → Type*} : Function.Injective (sigmaCongrRightHom β)
Full source
theorem sigmaCongrRightHom_injective {α : Type*} {β : α → Type*} :
    Function.Injective (sigmaCongrRightHom β) := by
  intro x y h
  ext a b
  simpa using Equiv.congr_fun h ⟨a, b⟩
Injectivity of the Component-wise Permutation Homomorphism on Dependent Sums
Informal description
For any type $\alpha$ and family of types $\beta : \alpha \to \text{Type}^*$, the monoid homomorphism $\text{sigmaCongrRightHom} \beta$ from the product monoid of permutations $\forall a, \text{Perm}(\beta a)$ to the permutation monoid $\text{Perm}(\Sigma a, \beta a)$ is injective. That is, if two families of permutations $F, G : \forall a, \text{Perm}(\beta a)$ satisfy $\text{sigmaCongrRightHom} \beta (F) = \text{sigmaCongrRightHom} \beta (G)$, then $F = G$.
Equiv.Perm.subtypeCongrHom definition
(p : α → Prop) [DecidablePred p] : Perm { a // p a } × Perm { a // ¬p a } →* Perm α
Full source
/-- `Equiv.Perm.subtypeCongr` as a `MonoidHom`. -/
@[simps]
def subtypeCongrHom (p : α → Prop) [DecidablePred p] :
    PermPerm { a // p a } × Perm { a // ¬p a }Perm { a // p a } × Perm { a // ¬p a } →* Perm α where
  toFun pair := Perm.subtypeCongr pair.fst pair.snd
  map_one' := Perm.subtypeCongr.refl
  map_mul' _ _ := (Perm.subtypeCongr.trans _ _ _ _).symm
Monoid homomorphism combining permutations on complementary subtypes
Informal description
Given a type $\alpha$ with a decidable predicate $p : \alpha \to \text{Prop}$, the function `subtypeCongrHom` constructs a monoid homomorphism from the product of the permutation groups of the subtypes $\{a \mid p\ a\}$ and $\{a \mid \neg p\ a\}$ to the permutation group of $\alpha$. Specifically, it maps a pair of permutations $(e_p, e_n)$ to the permutation of $\alpha$ obtained by applying $e_p$ to elements satisfying $p$ and $e_n$ to elements not satisfying $p$. The homomorphism preserves the identity and composition of permutations.
Equiv.Perm.subtypeCongrHom_injective theorem
(p : α → Prop) [DecidablePred p] : Function.Injective (subtypeCongrHom p)
Full source
theorem subtypeCongrHom_injective (p : α → Prop) [DecidablePred p] :
    Function.Injective (subtypeCongrHom p) := by
  rintro ⟨⟩ ⟨⟩ h
  rw [Prod.mk_inj]
  constructor <;> ext i <;> simpa using Equiv.congr_fun h i
Injectivity of the Subtype Permutation Homomorphism
Informal description
For any type $\alpha$ and decidable predicate $p : \alpha \to \text{Prop}$, the monoid homomorphism $\text{subtypeCongrHom}_p$ from the product group $\text{Perm}(\{a \mid p\ a\}) \times \text{Perm}(\{a \mid \neg p\ a\})$ to $\text{Perm}(\alpha)$ is injective. That is, if two pairs of permutations $(e_p, e_n)$ and $(e'_p, e'_n)$ satisfy $\text{subtypeCongrHom}_p(e_p, e_n) = \text{subtypeCongrHom}_p(e'_p, e'_n)$, then $(e_p, e_n) = (e'_p, e'_n)$.
Equiv.Perm.permCongr_eq_mul theorem
(e p : Perm α) : e.permCongr p = e * p * e⁻¹
Full source
/-- If `e` is also a permutation, we can write `permCongr`
completely in terms of the group structure. -/
@[simp]
theorem permCongr_eq_mul (e p : Perm α) : e.permCongr p = e * p * e⁻¹ :=
  rfl
Permutation Conjugation Formula: $e.permCongr(p) = e \cdot p \cdot e^{-1}$
Informal description
For any permutations $e$ and $p$ of a type $\alpha$, the conjugation of $p$ by $e$ equals the group product $e \cdot p \cdot e^{-1}$, i.e., $e.permCongr(p) = e \cdot p \cdot e^{-1}$.
Equiv.Perm.extendDomain_one theorem
: extendDomain 1 f = 1
Full source
@[simp]
theorem extendDomain_one : extendDomain 1 f = 1 :=
  extendDomain_refl f
Extension of Identity Permutation Yields Identity
Informal description
For any injective function $f \colon \alpha \to \beta$, extending the identity permutation $1$ on $\alpha$ via $f$ yields the identity permutation $1$ on $\beta$, i.e., $\text{extendDomain}(1, f) = 1$.
Equiv.Perm.extendDomain_inv theorem
: (e.extendDomain f)⁻¹ = e⁻¹.extendDomain f
Full source
@[simp]
theorem extendDomain_inv : (e.extendDomain f)⁻¹ = e⁻¹.extendDomain f :=
  rfl
Inverse of Extended Permutation Equals Extension of Inverse
Informal description
For any permutation $e$ of a type $\alpha$ and any injective function $f \colon \alpha \to \beta$, the inverse of the extended permutation $e.\text{extendDomain}(f)$ is equal to the extension of the inverse permutation $e^{-1}$ via $f$, i.e., $(e.\text{extendDomain}(f))^{-1} = e^{-1}.\text{extendDomain}(f)$.
Equiv.Perm.extendDomain_mul theorem
(e e' : Perm α) : e.extendDomain f * e'.extendDomain f = (e * e').extendDomain f
Full source
@[simp]
theorem extendDomain_mul (e e' : Perm α) :
    e.extendDomain f * e'.extendDomain f = (e * e').extendDomain f :=
  extendDomain_trans _ _ _
Compatibility of Permutation Extension with Group Multiplication
Informal description
For any permutations $e$ and $e'$ of a type $\alpha$ and any injective function $f \colon \alpha \to \beta$, the product of the extended permutations $e.\text{extendDomain}(f)$ and $e'.\text{extendDomain}(f)$ equals the extension of the product permutation $e \cdot e'$ via $f$. In other words, $(e.\text{extendDomain}(f)) \cdot (e'.\text{extendDomain}(f)) = (e \cdot e').\text{extendDomain}(f)$.
Equiv.Perm.extendDomainHom definition
: Perm α →* Perm β
Full source
/-- `extendDomain` as a group homomorphism -/
@[simps]
def extendDomainHom : PermPerm α →* Perm β where
  toFun e := extendDomain e f
  map_one' := extendDomain_one f
  map_mul' e e' := (extendDomain_mul f e e').symm
Permutation extension homomorphism via injective function
Informal description
The function `extendDomainHom` is a group homomorphism from the group of permutations of a type `α` to the group of permutations of a type `β`, defined via an injective function `f : α → β`. Specifically, it maps each permutation `e` of `α` to its extension `extendDomain e f` on `β`, which applies `e` to elements in the range of `f` and leaves other elements unchanged. The homomorphism preserves the group structure, meaning it maps the identity permutation to the identity permutation and respects composition of permutations.
Equiv.Perm.extendDomainHom_injective theorem
: Function.Injective (extendDomainHom f)
Full source
theorem extendDomainHom_injective : Function.Injective (extendDomainHom f) :=
  (injective_iff_map_eq_one (extendDomainHom f)).mpr fun e he =>
    ext fun x => f.injective <|
      Subtype.ext ((extendDomain_apply_image e f x).symm.trans (Perm.ext_iff.mp he (f x)))
Injectivity of Permutation Extension Homomorphism via Injective Function
Informal description
For any injective function $f \colon \alpha \to \beta$, the group homomorphism $\text{extendDomainHom}_f \colon \text{Perm}(\alpha) \to \text{Perm}(\beta)$ is injective. In other words, if two permutations $e_1, e_2$ of $\alpha$ satisfy $\text{extendDomainHom}_f(e_1) = \text{extendDomainHom}_f(e_2)$, then $e_1 = e_2$.
Equiv.Perm.extendDomain_eq_one_iff theorem
{e : Perm α} {f : α ≃ Subtype p} : e.extendDomain f = 1 ↔ e = 1
Full source
@[simp]
theorem extendDomain_eq_one_iff {e : Perm α} {f : α ≃ Subtype p} : e.extendDomain f = 1 ↔ e = 1 :=
  (injective_iff_map_eq_one' (extendDomainHom f)).mp (extendDomainHom_injective f) e
Identity Criterion for Extended Permutation: $e.\text{extendDomain}\, f = 1 \leftrightarrow e = 1$
Informal description
For any permutation $e$ of a type $\alpha$ and any equivalence $f \colon \alpha \simeq \{x \mid p(x)\}$ (where $p$ is a predicate on $\beta$), the extension of $e$ via $f$ is the identity permutation if and only if $e$ itself is the identity permutation. In other words, $e.\text{extendDomain}\, f = 1 \leftrightarrow e = 1$.
Equiv.Perm.extendDomain_pow theorem
(n : ℕ) : (e ^ n).extendDomain f = e.extendDomain f ^ n
Full source
@[simp]
lemma extendDomain_pow (n : ) : (e ^ n).extendDomain f = e.extendDomain f ^ n :=
  map_pow (extendDomainHom f) _ _
Power of Extended Permutation Equals Extended Power of Permutation
Informal description
For any permutation $e$ of a type $\alpha$, any injective function $f \colon \alpha \to \beta$, and any natural number $n$, the extension of the $n$-th power of $e$ via $f$ equals the $n$-th power of the extension of $e$ via $f$. In other words, $(e^n).\text{extendDomain}\,f = (e.\text{extendDomain}\,f)^n$.
Equiv.Perm.extendDomain_zpow theorem
(n : ℤ) : (e ^ n).extendDomain f = e.extendDomain f ^ n
Full source
@[simp]
lemma extendDomain_zpow (n : ) : (e ^ n).extendDomain f = e.extendDomain f ^ n :=
  map_zpow (extendDomainHom f) _ _
Power Law for Extended Permutations: $(e^n).\text{extendDomain}\, f = (e.\text{extendDomain}\, f)^n$
Informal description
For any integer $n$ and any permutation $e$ of a type $\alpha$, the extension of $e^n$ via an injective function $f \colon \alpha \to \beta$ equals the $n$-th power of the extension of $e$ via $f$, i.e., $$(e^n).\text{extendDomain}\, f = (e.\text{extendDomain}\, f)^n.$$
Equiv.Perm.subtypePerm definition
(f : Perm α) (h : ∀ x, p x ↔ p (f x)) : Perm { x // p x }
Full source
/-- If the permutation `f` fixes the subtype `{x // p x}`, then this returns the permutation
  on `{x // p x}` induced by `f`. -/
def subtypePerm (f : Perm α) (h : ∀ x, p x ↔ p (f x)) : Perm { x // p x } where
  toFun := fun x => ⟨f x, (h _).1 x.2⟩
  invFun := fun x => ⟨f⁻¹ x, (h (f⁻¹ x)).2 <| by simpa using x.2⟩
  left_inv _ := by simp only [Perm.inv_apply_self, Subtype.coe_eta, Subtype.coe_mk]
  right_inv _ := by simp only [Perm.apply_inv_self, Subtype.coe_eta, Subtype.coe_mk]
Permutation on a Subtype Induced by a Permutation on the Whole Type
Informal description
Given a permutation $f$ of a type $\alpha$ and a predicate $p$ on $\alpha$ such that $f$ preserves $p$ (i.e., for any $x \in \alpha$, $p(x)$ holds if and only if $p(f(x))$ holds), the function `subtypePerm` constructs a permutation on the subtype $\{x \in \alpha \mid p(x)\}$ induced by $f$. Explicitly, the permutation maps $\langle x, h_x \rangle$ to $\langle f(x), h_{f(x)} \rangle$, where $h_x$ is a proof that $p(x)$ holds and $h_{f(x)}$ is a proof that $p(f(x))$ holds (which exists by the preservation property of $f$). The inverse permutation is similarly constructed using $f^{-1}$.
Equiv.Perm.subtypePerm_apply theorem
(f : Perm α) (h : ∀ x, p x ↔ p (f x)) (x : { x // p x }) : subtypePerm f h x = ⟨f x, (h _).1 x.2⟩
Full source
@[simp]
theorem subtypePerm_apply (f : Perm α) (h : ∀ x, p x ↔ p (f x)) (x : { x // p x }) :
    subtypePerm f h x = ⟨f x, (h _).1 x.2⟩ :=
  rfl
Application of Subtype Permutation Induced by a Permutation
Informal description
Let $f$ be a permutation of a type $\alpha$ and let $p$ be a predicate on $\alpha$ such that $f$ preserves $p$ (i.e., for all $x \in \alpha$, $p(x) \leftrightarrow p(f(x))$). For any element $x$ in the subtype $\{x \in \alpha \mid p(x)\}$, the application of the induced permutation $\text{subtypePerm}\, f\, h$ to $x$ is equal to $\langle f(x), (h(x)).1(x.2) \rangle$, where $x.2$ is the proof that $p(x)$ holds and $(h(x)).1$ is the forward implication of the preservation property applied to $x$.
Equiv.Perm.subtypePerm_mul theorem
(f g : Perm α) (hf hg) : (f.subtypePerm hf * g.subtypePerm hg : Perm { x // p x }) = (f * g).subtypePerm fun _ => (hg _).trans <| hf _
Full source
@[simp]
theorem subtypePerm_mul (f g : Perm α) (hf hg) :
    (f.subtypePerm hf * g.subtypePerm hg : Perm { x // p x }) =
      (f * g).subtypePerm fun _ => (hg _).trans <| hf _ :=
  rfl
Composition of Subtype Permutations Equals Subtype of Composition
Informal description
Let $\alpha$ be a type and $p$ a predicate on $\alpha$. Given two permutations $f, g \in \text{Perm}(\alpha)$ that preserve $p$ (i.e., for all $x \in \alpha$, $p(x) \leftrightarrow p(f(x))$ and $p(x) \leftrightarrow p(g(x))$), the product of the induced permutations on the subtype $\{x \in \alpha \mid p(x)\}$ equals the permutation induced by the product $f \cdot g$ on $\alpha$. More precisely, we have: $$(f_{\text{subtype}} \cdot g_{\text{subtype}}) = (f \cdot g)_{\text{subtype}}$$ where $f_{\text{subtype}}$ denotes the permutation on $\{x \in \alpha \mid p(x)\}$ induced by $f$, and similarly for $g$ and $f \cdot g$.
Equiv.Perm.subtypePerm_inv theorem
(f : Perm α) (hf) : f⁻¹.subtypePerm hf = (f.subtypePerm <| inv_aux.2 hf : Perm { x // p x })⁻¹
Full source
/-- See `Equiv.Perm.inv_subtypePerm`. -/
theorem subtypePerm_inv (f : Perm α) (hf) :
    f⁻¹.subtypePerm hf = (f.subtypePerm <| inv_aux.2 hf : Perm { x // p x })⁻¹ :=
  rfl
Inverse of Subtype Permutation Equals Permutation of Inverse
Informal description
Let $f$ be a permutation of a type $\alpha$ and let $p$ be a predicate on $\alpha$ such that for all $x \in \alpha$, $p(x)$ holds if and only if $p(f(x))$ holds. Then the inverse of the permutation induced by $f$ on the subtype $\{x \in \alpha \mid p(x)\}$ is equal to the permutation induced by $f^{-1}$ on the same subtype, where the preservation condition for $f^{-1}$ is derived from that of $f$. In symbols: $$f^{-1}.\text{subtypePerm}(h_f) = (f.\text{subtypePerm}(h_{f^{-1}}))^{-1}$$ where $h_f$ is the preservation condition for $f$ and $h_{f^{-1}}$ is the derived preservation condition for $f^{-1}$.
Equiv.Perm.inv_subtypePerm theorem
(f : Perm α) (hf) : (f.subtypePerm hf : Perm { x // p x })⁻¹ = f⁻¹.subtypePerm (inv_aux.1 hf)
Full source
/-- See `Equiv.Perm.subtypePerm_inv`. -/
@[simp]
theorem inv_subtypePerm (f : Perm α) (hf) :
    (f.subtypePerm hf : Perm { x // p x })⁻¹ = f⁻¹.subtypePerm (inv_aux.1 hf) :=
  rfl
Inverse of Subtype Permutation Equals Permutation of Inverse
Informal description
Let $f$ be a permutation of a type $\alpha$ and let $p$ be a predicate on $\alpha$ such that $f$ preserves $p$ (i.e., for all $x \in \alpha$, $p(x) \leftrightarrow p(f(x))$). Then the inverse of the induced permutation on the subtype $\{x \in \alpha \mid p(x)\}$ is equal to the permutation induced by $f^{-1}$ on the same subtype.
Equiv.Perm.subtypePerm_pow theorem
(f : Perm α) (n : ℕ) (hf) : (f.subtypePerm hf : Perm { x // p x }) ^ n = (f ^ n).subtypePerm (pow_aux hf)
Full source
@[simp]
theorem subtypePerm_pow (f : Perm α) (n : ) (hf) :
    (f.subtypePerm hf : Perm { x // p x }) ^ n = (f ^ n).subtypePerm (pow_aux hf) := by
  induction n with
  | zero => simp
  | succ n ih => simp_rw [pow_succ', ih, subtypePerm_mul]
Power of Subtype Permutation Equals Permutation of Power
Informal description
Let $f$ be a permutation of a type $\alpha$ and let $p$ be a predicate on $\alpha$ such that $f$ preserves $p$ (i.e., for all $x \in \alpha$, $p(x) \leftrightarrow p(f(x))$). Then for any natural number $n$, the $n$-th power of the induced permutation on the subtype $\{x \in \alpha \mid p(x)\}$ is equal to the permutation induced by $f^n$ on the same subtype. That is, $(f_{\text{subtype}})^n = (f^n)_{\text{subtype}}$.
Equiv.Perm.subtypePerm_zpow theorem
(f : Perm α) (n : ℤ) (hf) : (f.subtypePerm hf ^ n : Perm { x // p x }) = (f ^ n).subtypePerm (zpow_aux hf)
Full source
@[simp]
theorem subtypePerm_zpow (f : Perm α) (n : ) (hf) :
    (f.subtypePerm hf ^ n : Perm { x // p x }) = (f ^ n).subtypePerm (zpow_aux hf) := by
  cases n with
  | ofNat n => exact subtypePerm_pow _ _ _
  | negSucc n => simp only [zpow_negSucc, subtypePerm_pow, subtypePerm_inv]
Integer Power of Subtype Permutation Equals Permutation of Integer Power
Informal description
Let $f$ be a permutation of a type $\alpha$ and let $p$ be a predicate on $\alpha$ such that $f$ preserves $p$ (i.e., for all $x \in \alpha$, $p(x) \leftrightarrow p(f(x))$). Then for any integer $n$, the $n$-th power of the induced permutation on the subtype $\{x \in \alpha \mid p(x)\}$ is equal to the permutation induced by $f^n$ on the same subtype. That is, $(f_{\text{subtype}})^n = (f^n)_{\text{subtype}}$.
Equiv.Perm.ofSubtype definition
: Perm (Subtype p) →* Perm α
Full source
/-- The inclusion map of permutations on a subtype of `α` into permutations of `α`,
  fixing the other points. -/
def ofSubtype : PermPerm (Subtype p) →* Perm α where
  toFun f := extendDomain f (Equiv.refl (Subtype p))
  map_one' := Equiv.Perm.extendDomain_one _
  map_mul' f g := (Equiv.Perm.extendDomain_mul _ f g).symm
Lift of Subtype Permutation to Full Type Permutation
Informal description
The monoid homomorphism that lifts a permutation of a subtype $\{x \in \alpha \mid p(x)\}$ to a permutation of the entire type $\alpha$ by extending it as the identity on elements not in the subtype. More precisely, given a permutation $f$ of the subtype, the function $\text{ofSubtype}(f)$ is defined as follows: - For $a \in \alpha$ such that $p(a)$ holds, $\text{ofSubtype}(f)(a) = f(\langle a, \text{proof of } p(a) \rangle)$. - For $a \in \alpha$ such that $p(a)$ does not hold, $\text{ofSubtype}(f)(a) = a$. This construction preserves the group structure, meaning it respects composition and maps the identity permutation to the identity permutation.
Equiv.Perm.ofSubtype_subtypePerm theorem
{f : Perm α} (h₁ : ∀ x, p x ↔ p (f x)) (h₂ : ∀ x, f x ≠ x → p x) : ofSubtype (subtypePerm f h₁) = f
Full source
theorem ofSubtype_subtypePerm {f : Perm α} (h₁ : ∀ x, p x ↔ p (f x)) (h₂ : ∀ x, f x ≠ x → p x) :
    ofSubtype (subtypePerm f h₁) = f :=
  Equiv.ext fun x => by
    by_cases hx : p x
    · exact (subtypePerm f h₁).extendDomain_apply_subtype _ hx
    · rw [ofSubtype, MonoidHom.coe_mk, OneHom.coe_mk,
        Equiv.Perm.extendDomain_apply_not_subtype _ _ hx]
      exact not_not.mp fun h => hx (h₂ x (Ne.symm h))
Lifting a Subtype Permutation Recovers Original Permutation When Non-fixed Points Satisfy Predicate
Informal description
Let $f$ be a permutation of a type $\alpha$ and let $p$ be a predicate on $\alpha$ such that: 1. $f$ preserves $p$ (i.e., for all $x \in \alpha$, $p(x) \leftrightarrow p(f(x))$) 2. For any $x \in \alpha$, if $f(x) \neq x$ then $p(x)$ holds Then the permutation obtained by lifting the induced permutation on the subtype $\{x \in \alpha \mid p(x)\}$ back to the full type $\alpha$ equals $f$ itself. In other words, $\text{ofSubtype}(\text{subtypePerm}(f, h₁)) = f$.
Equiv.Perm.ofSubtype_apply_of_mem theorem
(f : Perm (Subtype p)) (ha : p a) : ofSubtype f a = f ⟨a, ha⟩
Full source
theorem ofSubtype_apply_of_mem (f : Perm (Subtype p)) (ha : p a) : ofSubtype f a = f ⟨a, ha⟩ :=
  extendDomain_apply_subtype _ _ ha
Action of Lifted Subtype Permutation on Elements in Predicate
Informal description
For any permutation $f$ of the subtype $\{x \in \alpha \mid p(x)\}$ and any element $a \in \alpha$ satisfying $p(a)$, the action of the lifted permutation $\text{ofSubtype}(f)$ on $a$ is equal to the action of $f$ on the subtype element $\langle a, ha \rangle$, where $ha$ is a proof that $p(a)$ holds. In other words, $\text{ofSubtype}(f)(a) = f(\langle a, ha \rangle)$.
Equiv.Perm.ofSubtype_apply_coe theorem
(f : Perm (Subtype p)) (x : Subtype p) : ofSubtype f x = f x
Full source
@[simp]
theorem ofSubtype_apply_coe (f : Perm (Subtype p)) (x : Subtype p) : ofSubtype f x = f x :=
  Subtype.casesOn x fun _ => ofSubtype_apply_of_mem f
Lifted Subtype Permutation Acts Identically on Subtype Elements
Informal description
For any permutation $f$ of the subtype $\{x \in \alpha \mid p(x)\}$ and any element $x$ in this subtype, the action of the lifted permutation $\text{ofSubtype}(f)$ on $x$ equals the action of $f$ on $x$, i.e., $\text{ofSubtype}(f)(x) = f(x)$.
Equiv.Perm.ofSubtype_apply_of_not_mem theorem
(f : Perm (Subtype p)) (ha : ¬p a) : ofSubtype f a = a
Full source
theorem ofSubtype_apply_of_not_mem (f : Perm (Subtype p)) (ha : ¬p a) : ofSubtype f a = a :=
  extendDomain_apply_not_subtype _ _ ha
Fixed Points of Subtype Permutation Extension Outside Predicate Domain
Informal description
For any permutation $f$ of the subtype $\{x \in \alpha \mid p(x)\}$ and any element $a \in \alpha$ such that $p(a)$ does not hold, the permutation $\text{ofSubtype}(f)$ fixes $a$, i.e., $\text{ofSubtype}(f)(a) = a$.
Equiv.Perm.mem_iff_ofSubtype_apply_mem theorem
(f : Perm (Subtype p)) (x : α) : p x ↔ p ((ofSubtype f : α → α) x)
Full source
theorem mem_iff_ofSubtype_apply_mem (f : Perm (Subtype p)) (x : α) :
    p x ↔ p ((ofSubtype f : α → α) x) :=
  if h : p x then by
    simpa only [h, true_iff, MonoidHom.coe_mk, ofSubtype_apply_of_mem f h] using (f ⟨x, h⟩).2
  else by simp [h, ofSubtype_apply_of_not_mem f h]
Preservation of Predicate under Lifted Subtype Permutation
Informal description
For any permutation $f$ of the subtype $\{x \in \alpha \mid p(x)\}$ and any element $x \in \alpha$, the predicate $p$ holds for $x$ if and only if it holds for the image of $x$ under the lifted permutation $\text{ofSubtype}(f) : \alpha \to \alpha$. In other words, $p(x) \leftrightarrow p(\text{ofSubtype}(f)(x))$.
Equiv.Perm.ofSubtype_injective theorem
: Function.Injective (ofSubtype : Perm (Subtype p) → Perm α)
Full source
theorem ofSubtype_injective : Function.Injective (ofSubtype : Perm (Subtype p) → Perm α) := by
  intro x y h
  rw [Perm.ext_iff] at h ⊢
  intro a
  specialize h a
  rwa [ofSubtype_apply_coe, ofSubtype_apply_coe, SetCoe.ext_iff] at h
Injectivity of Subtype Permutation Lifting
Informal description
The function $\text{ofSubtype} \colon \text{Perm}(\{x \in \alpha \mid p(x)\}) \to \text{Perm}(\alpha)$, which lifts a permutation of a subtype to a permutation of the entire type by extending it as the identity outside the subtype, is injective. That is, for any two permutations $f, g$ of the subtype, if $\text{ofSubtype}(f) = \text{ofSubtype}(g)$, then $f = g$.
Equiv.Perm.subtypePerm_ofSubtype theorem
(f : Perm (Subtype p)) : subtypePerm (ofSubtype f) (mem_iff_ofSubtype_apply_mem f) = f
Full source
@[simp]
theorem subtypePerm_ofSubtype (f : Perm (Subtype p)) :
    subtypePerm (ofSubtype f) (mem_iff_ofSubtype_apply_mem f) = f :=
  Equiv.ext fun x => Subtype.coe_injective (ofSubtype_apply_coe f x)
Subtype Permutation Identity: $\text{subtypePerm}(\text{ofSubtype}(f)) = f$
Informal description
For any permutation $f$ of the subtype $\{x \in \alpha \mid p(x)\}$, the permutation $\text{subtypePerm}(\text{ofSubtype}(f), h)$ (where $h$ is the proof that $\text{ofSubtype}(f)$ preserves $p$) is equal to $f$ itself. In other words, lifting a permutation from the subtype to the full type and then restricting it back to the subtype recovers the original permutation.
Equiv.Perm.ofSubtype_subtypePerm_of_mem theorem
{p : α → Prop} [DecidablePred p] {g : Perm α} (hg : ∀ (x : α), p x ↔ p (g x)) {a : α} (ha : p a) : (ofSubtype (g.subtypePerm hg)) a = g a
Full source
theorem ofSubtype_subtypePerm_of_mem {p : α → Prop} [DecidablePred p]
    {g : Perm α} (hg : ∀ (x : α), p x ↔ p (g x))
    {a : α} (ha : p a) : (ofSubtype (g.subtypePerm hg)) a = g a :=
  ofSubtype_apply_of_mem (g.subtypePerm hg) ha
Action of Lifted Subtype Permutation on Elements in Predicate Matches Original Permutation
Informal description
Let $p$ be a decidable predicate on a type $\alpha$, and let $g$ be a permutation of $\alpha$ that preserves $p$ (i.e., for any $x \in \alpha$, $p(x)$ holds if and only if $p(g(x))$ holds). For any element $a \in \alpha$ satisfying $p(a)$, the action of the lifted permutation $\text{ofSubtype}(g.\text{subtypePerm}\, hg)$ on $a$ equals the action of $g$ on $a$, i.e., \[ \text{ofSubtype}(g.\text{subtypePerm}\, hg)(a) = g(a). \]
Equiv.Perm.ofSubtype_subtypePerm_of_not_mem theorem
{p : α → Prop} [DecidablePred p] {g : Perm α} (hg : ∀ (x : α), p x ↔ p (g x)) {a : α} (ha : ¬p a) : (ofSubtype (g.subtypePerm hg)) a = a
Full source
theorem ofSubtype_subtypePerm_of_not_mem {p : α → Prop} [DecidablePred p]
    {g : Perm α} (hg : ∀ (x : α), p x ↔ p (g x))
    {a : α} (ha : ¬ p a) : (ofSubtype (g.subtypePerm hg)) a = a :=
  ofSubtype_apply_of_not_mem (g.subtypePerm hg) ha
Fixed Points of Subtype Permutation Extension Outside Predicate Domain
Informal description
Let $p \colon \alpha \to \text{Prop}$ be a decidable predicate on a type $\alpha$, and let $g$ be a permutation of $\alpha$ that preserves $p$ (i.e., for any $x \in \alpha$, $p(x)$ holds if and only if $p(g(x))$ holds). For any $a \in \alpha$ such that $p(a)$ does not hold, the permutation $\text{ofSubtype}(g.\text{subtypePerm}~hg)$ fixes $a$, i.e., $\text{ofSubtype}(g.\text{subtypePerm}~hg)(a) = a$.
Equiv.Perm.subtypeEquivSubtypePerm definition
(p : α → Prop) [DecidablePred p] : Perm (Subtype p) ≃ { f : Perm α // ∀ a, ¬p a → f a = a }
Full source
/-- Permutations on a subtype are equivalent to permutations on the original type that fix pointwise
the rest. -/
@[simps]
protected def subtypeEquivSubtypePerm (p : α → Prop) [DecidablePred p] :
    PermPerm (Subtype p) ≃ { f : Perm α // ∀ a, ¬p a → f a = a } where
  toFun f := ⟨ofSubtype f, fun _ => f.ofSubtype_apply_of_not_mem⟩
  invFun f :=
    (f : Perm α).subtypePerm fun a =>
      ⟨Decidable.not_imp_not.1 fun hfa => f.val.injective (f.prop _ hfa) ▸ hfa,
        Decidable.not_imp_not.1 fun ha hfa => ha <| f.prop a ha ▸ hfa⟩
  left_inv := Equiv.Perm.subtypePerm_ofSubtype
  right_inv f :=
    Subtype.ext ((Equiv.Perm.ofSubtype_subtypePerm _) fun a => Not.decidable_imp_symm <| f.prop a)
Equivalence between Subtype Permutations and Fixed-Point Permutations on the Full Type
Informal description
Given a decidable predicate \( p \) on a type \( \alpha \), there is an equivalence between the group of permutations of the subtype \( \{x \in \alpha \mid p(x)\} \) and the subgroup of permutations of \( \alpha \) that fix all elements not satisfying \( p \). More precisely, the equivalence is defined as follows: - The forward map takes a permutation \( f \) of the subtype and extends it to a permutation of \( \alpha \) by setting it to be the identity on elements not in the subtype. - The inverse map takes a permutation \( g \) of \( \alpha \) that fixes all elements not in the subtype and restricts it to a permutation of the subtype. This equivalence respects the group structure, meaning it preserves composition and inverses.
Equiv.Perm.subtypeEquivSubtypePerm_apply_of_mem theorem
(f : Perm (Subtype p)) (h : p a) : (Perm.subtypeEquivSubtypePerm p f).1 a = f ⟨a, h⟩
Full source
theorem subtypeEquivSubtypePerm_apply_of_mem (f : Perm (Subtype p)) (h : p a) :
    (Perm.subtypeEquivSubtypePerm p f).1 a = f ⟨a, h⟩ :=
  f.ofSubtype_apply_of_mem h
Action of Extended Subtype Permutation on Elements in Predicate
Informal description
Let $p \colon \alpha \to \text{Prop}$ be a decidable predicate on a type $\alpha$, and let $f$ be a permutation of the subtype $\{x \in \alpha \mid p(x)\}$. For any element $a \in \alpha$ satisfying $p(a)$, the action of the permutation $\text{subtypeEquivSubtypePerm}(p)(f)$ on $a$ is equal to the action of $f$ on the subtype element $\langle a, h \rangle$, where $h$ is a proof that $p(a)$ holds. In other words, $\text{subtypeEquivSubtypePerm}(p)(f)(a) = f(\langle a, h \rangle)$.
Equiv.Perm.subtypeEquivSubtypePerm_apply_of_not_mem theorem
(f : Perm (Subtype p)) (h : ¬p a) : ((Perm.subtypeEquivSubtypePerm p) f).1 a = a
Full source
theorem subtypeEquivSubtypePerm_apply_of_not_mem (f : Perm (Subtype p)) (h : ¬p a) :
    ((Perm.subtypeEquivSubtypePerm p) f).1 a = a :=
  f.ofSubtype_apply_of_not_mem h
Fixed Points of Extended Subtype Permutation Outside Predicate Domain
Informal description
For any permutation $f$ of the subtype $\{x \in \alpha \mid p(x)\}$ and any element $a \in \alpha$ such that $\neg p(a)$ holds, the permutation obtained via the equivalence `subtypeEquivSubtypePerm` fixes $a$, i.e., $(\text{subtypeEquivSubtypePerm}(p)(f))(a) = a$.
Equiv.swap_inv theorem
(x y : α) : (swap x y)⁻¹ = swap x y
Full source
@[simp]
theorem swap_inv (x y : α) : (swap x y)⁻¹ = swap x y :=
  rfl
Inverse of a Swap Permutation is Itself
Informal description
For any two elements $x$ and $y$ of a type $\alpha$, the inverse of the permutation swapping $x$ and $y$ is equal to the permutation swapping $x$ and $y$ itself, i.e., $(\text{swap}(x, y))^{-1} = \text{swap}(x, y)$.
Equiv.swap_mul_self theorem
(i j : α) : swap i j * swap i j = 1
Full source
@[simp]
theorem swap_mul_self (i j : α) : swap i j * swap i j = 1 :=
  swap_swap i j
Square of Swap Permutation is Identity: $(\text{swap}(i, j))^2 = 1$
Informal description
For any two elements $i$ and $j$ of a type $\alpha$, the composition of the swap permutation (swapping $i$ and $j$) with itself is equal to the identity permutation, i.e., $\text{swap}(i, j) \circ \text{swap}(i, j) = \text{id}_\alpha$.
Equiv.swap_mul_eq_mul_swap theorem
(f : Perm α) (x y : α) : swap x y * f = f * swap (f⁻¹ x) (f⁻¹ y)
Full source
theorem swap_mul_eq_mul_swap (f : Perm α) (x y : α) : swap x y * f = f * swap (f⁻¹ x) (f⁻¹ y) :=
  Equiv.ext fun z => by
    simp only [Perm.mul_apply, swap_apply_def]
    split_ifs <;>
      simp_all only [Perm.apply_inv_self, Perm.eq_inv_iff_eq, eq_self_iff_true, not_true]
Swap-Permutation Conjugation Identity: $\text{swap}(x, y) \circ f = f \circ \text{swap}(f^{-1}(x), f^{-1}(y))$
Informal description
For any permutation $f$ of a type $\alpha$ and any elements $x, y \in \alpha$, the composition of the swap permutation $\text{swap}(x, y)$ with $f$ is equal to the composition of $f$ with the swap permutation $\text{swap}(f^{-1}(x), f^{-1}(y))$. That is, \[ \text{swap}(x, y) \circ f = f \circ \text{swap}(f^{-1}(x), f^{-1}(y)). \]
Equiv.mul_swap_eq_swap_mul theorem
(f : Perm α) (x y : α) : f * swap x y = swap (f x) (f y) * f
Full source
theorem mul_swap_eq_swap_mul (f : Perm α) (x y : α) : f * swap x y = swap (f x) (f y) * f := by
  rw [swap_mul_eq_mul_swap, Perm.inv_apply_self, Perm.inv_apply_self]
Conjugation of Swap Permutation: $f \circ \text{swap}(x, y) = \text{swap}(f(x), f(y)) \circ f$
Informal description
For any permutation $f$ of a type $\alpha$ and any elements $x, y \in \alpha$, the composition of $f$ with the swap permutation $\text{swap}(x, y)$ is equal to the composition of the swap permutation $\text{swap}(f(x), f(y))$ with $f$. That is, \[ f \circ \text{swap}(x, y) = \text{swap}(f(x), f(y)) \circ f. \]
Equiv.swap_apply_apply theorem
(f : Perm α) (x y : α) : swap (f x) (f y) = f * swap x y * f⁻¹
Full source
theorem swap_apply_apply (f : Perm α) (x y : α) : swap (f x) (f y) = f * swap x y * f⁻¹ := by
  rw [mul_swap_eq_swap_mul, mul_inv_cancel_right]
Conjugation of Swap Permutation: $\text{swap}(f(x), f(y)) = f \circ \text{swap}(x, y) \circ f^{-1}$
Informal description
For any permutation $f$ of a type $\alpha$ and any elements $x, y \in \alpha$, the swap permutation of $f(x)$ and $f(y)$ is equal to the conjugation of the swap permutation of $x$ and $y$ by $f$. That is, \[ \text{swap}(f(x), f(y)) = f \circ \text{swap}(x, y) \circ f^{-1}. \]
Equiv.swap_mul_self_mul theorem
(i j : α) (σ : Perm α) : Equiv.swap i j * (Equiv.swap i j * σ) = σ
Full source
/-- Left-multiplying a permutation with `swap i j` twice gives the original permutation.

  This specialization of `swap_mul_self` is useful when using cosets of permutations.
-/
@[simp]
theorem swap_mul_self_mul (i j : α) (σ : Perm α) : Equiv.swap i j * (Equiv.swap i j * σ) = σ := by
  simp [← mul_assoc]
Double Swap Cancellation in Permutation Composition: $\text{swap}(i, j)^2 \circ \sigma = \sigma$
Informal description
For any two elements $i$ and $j$ of a type $\alpha$ and any permutation $\sigma$ of $\alpha$, the composition of the swap permutation (swapping $i$ and $j$) with itself and then with $\sigma$ equals $\sigma$, i.e., $\text{swap}(i, j) \circ (\text{swap}(i, j) \circ \sigma) = \sigma$.
Equiv.mul_swap_mul_self theorem
(i j : α) (σ : Perm α) : σ * Equiv.swap i j * Equiv.swap i j = σ
Full source
/-- Right-multiplying a permutation with `swap i j` twice gives the original permutation.

  This specialization of `swap_mul_self` is useful when using cosets of permutations.
-/
@[simp]
theorem mul_swap_mul_self (i j : α) (σ : Perm α) : σ * Equiv.swap i j * Equiv.swap i j = σ := by
  rw [mul_assoc, swap_mul_self, mul_one]
Double Swap Cancellation in Permutation Composition: $\sigma \circ \text{swap}(i, j) \circ \text{swap}(i, j) = \sigma$
Informal description
For any elements $i, j$ of a type $\alpha$ and any permutation $\sigma$ of $\alpha$, the composition $\sigma \circ \text{swap}(i, j) \circ \text{swap}(i, j)$ equals $\sigma$.
Equiv.swap_mul_involutive theorem
(i j : α) : Function.Involutive (Equiv.swap i j * ·)
Full source
/-- A stronger version of `mul_right_injective` -/
@[simp]
theorem swap_mul_involutive (i j : α) : Function.Involutive (Equiv.swap i j * ·) :=
  swap_mul_self_mul i j
Involutivity of Left Composition with Swap Permutation: $(\text{swap}(i, j) \circ \cdot)^2 = \text{id}$
Informal description
For any two elements $i$ and $j$ of a type $\alpha$, the function $f(\sigma) = \text{swap}(i, j) \circ \sigma$ is involutive, meaning that $f(f(\sigma)) = \sigma$ for all permutations $\sigma$ of $\alpha$.
Equiv.mul_swap_involutive theorem
(i j : α) : Function.Involutive (· * Equiv.swap i j)
Full source
/-- A stronger version of `mul_left_injective` -/
@[simp]
theorem mul_swap_involutive (i j : α) : Function.Involutive (· * Equiv.swap i j) :=
  mul_swap_mul_self i j
Involutivity of Right Composition with Swap Permutation: $f(\sigma) = \sigma \circ \text{swap}(i, j)$ is involutive
Informal description
For any elements $i, j$ of a type $\alpha$, the function $f(\sigma) = \sigma \circ \text{swap}(i, j)$ is involutive, meaning that $f(f(\sigma)) = \sigma$ for all permutations $\sigma$ of $\alpha$.
Equiv.swap_eq_one_iff theorem
{i j : α} : swap i j = (1 : Perm α) ↔ i = j
Full source
@[simp]
theorem swap_eq_one_iff {i j : α} : swapswap i j = (1 : Perm α) ↔ i = j :=
  swap_eq_refl_iff
Swap Permutation is Identity if and only if Elements are Equal: $\mathrm{swap}(i, j) = 1 \leftrightarrow i = j$
Informal description
For any elements $i$ and $j$ of a type $\alpha$, the swap permutation $\mathrm{swap}(i, j)$ is equal to the identity permutation $1$ if and only if $i = j$.
Equiv.swap_mul_eq_iff theorem
{i j : α} {σ : Perm α} : swap i j * σ = σ ↔ i = j
Full source
theorem swap_mul_eq_iff {i j : α} {σ : Perm α} : swapswap i j * σ = σ ↔ i = j := by
  rw [mul_eq_right, swap_eq_one_iff]
Swap Composition Identity: $\mathrm{swap}(i, j) \circ \sigma = \sigma \leftrightarrow i = j$
Informal description
For any elements $i$ and $j$ of a type $\alpha$ and any permutation $\sigma$ of $\alpha$, the composition of the swap permutation $\mathrm{swap}(i, j)$ with $\sigma$ equals $\sigma$ if and only if $i = j$. In other words, $\mathrm{swap}(i, j) \circ \sigma = \sigma \leftrightarrow i = j$.
Equiv.mul_swap_eq_iff theorem
{i j : α} {σ : Perm α} : σ * swap i j = σ ↔ i = j
Full source
theorem mul_swap_eq_iff {i j : α} {σ : Perm α} : σ * swap i j = σ ↔ i = j := by
  rw [mul_eq_left, swap_eq_one_iff]
Composition with Swap Preserves Permutation if and only if Elements are Equal: $\sigma \circ \mathrm{swap}(i, j) = \sigma \leftrightarrow i = j$
Informal description
For any elements $i$ and $j$ of a type $\alpha$ and any permutation $\sigma$ of $\alpha$, the composition of $\sigma$ with the swap permutation $\mathrm{swap}(i, j)$ equals $\sigma$ if and only if $i = j$. In other words, $\sigma \circ \mathrm{swap}(i, j) = \sigma \leftrightarrow i = j$.
Equiv.swap_mul_swap_mul_swap theorem
{x y z : α} (hxy : x ≠ y) (hxz : x ≠ z) : swap y z * swap x y * swap y z = swap z x
Full source
theorem swap_mul_swap_mul_swap {x y z : α} (hxy : x ≠ y) (hxz : x ≠ z) :
    swap y z * swap x y * swap y z = swap z x := by
  nth_rewrite 3 [← swap_inv]
  rw [← swap_apply_apply, swap_apply_left, swap_apply_of_ne_of_ne hxy hxz, swap_comm]
Composition of Three Swaps: $\mathrm{swap}(y, z) \circ \mathrm{swap}(x, y) \circ \mathrm{swap}(y, z) = \mathrm{swap}(z, x)$
Informal description
For any distinct elements $x, y, z$ in a type $\alpha$ with $x \neq y$ and $x \neq z$, the composition of the permutations $\mathrm{swap}(y, z) \circ \mathrm{swap}(x, y) \circ \mathrm{swap}(y, z)$ equals the permutation $\mathrm{swap}(z, x)$.
Equiv.addLeft_zero theorem
: Equiv.addLeft (0 : α) = 1
Full source
@[simp] lemma addLeft_zero : Equiv.addLeft (0 : α) = 1 := ext zero_add
Left Addition by Zero Yields Identity Permutation
Informal description
For an additive group $\alpha$, the left addition equivalence by the zero element is equal to the identity permutation, i.e., $\text{addLeft}(0) = 1$.
Equiv.addRight_zero theorem
: Equiv.addRight (0 : α) = 1
Full source
@[simp] lemma addRight_zero : Equiv.addRight (0 : α) = 1 := ext add_zero
Right Addition by Zero is the Identity Permutation
Informal description
For any additive group $\alpha$, the right addition equivalence by the zero element is equal to the identity permutation, i.e., $\text{addRight}(0) = 1$.
Equiv.addLeft_add theorem
: Equiv.addLeft (a + b) = Equiv.addLeft a * Equiv.addLeft b
Full source
@[simp] lemma addLeft_add : Equiv.addLeft (a + b) = Equiv.addLeft a * Equiv.addLeft b :=
  ext <| add_assoc _ _
Composition Property of Left Addition Equivalences in Additive Groups
Informal description
For any elements $a$ and $b$ in an additive group $\alpha$, the left addition equivalence of $a + b$ is equal to the composition of the left addition equivalences of $a$ and $b$, i.e., $\text{addLeft}(a + b) = \text{addLeft}(a) \circ \text{addLeft}(b)$.
Equiv.addRight_add theorem
: Equiv.addRight (a + b) = Equiv.addRight b * Equiv.addRight a
Full source
@[simp] lemma addRight_add : Equiv.addRight (a + b) = Equiv.addRight b * Equiv.addRight a :=
  ext fun _ ↦ (add_assoc _ _ _).symm
Composition Property of Right Addition Equivalence: $\text{addRight}(a + b) = \text{addRight}(b) \circ \text{addRight}(a)$
Informal description
For any elements $a$ and $b$ in an additive group, the right addition equivalence of $a + b$ is equal to the composition of the right addition equivalence of $b$ followed by the right addition equivalence of $a$, i.e., $\text{addRight}(a + b) = \text{addRight}(b) \circ \text{addRight}(a)$.
Equiv.inv_addLeft theorem
: (Equiv.addLeft a)⁻¹ = Equiv.addLeft (-a)
Full source
@[simp] lemma inv_addLeft : (Equiv.addLeft a)⁻¹ = Equiv.addLeft (-a) := Equiv.coe_inj.1 rfl
Inverse of Left Addition Equivalence is Left Addition of Negation
Informal description
For any element $a$ in an additive group, the inverse of the left addition equivalence $\text{addLeft}(a)$ is equal to the left addition equivalence of the negation of $a$, i.e., $(\text{addLeft}(a))^{-1} = \text{addLeft}(-a)$.
Equiv.inv_addRight theorem
: (Equiv.addRight a)⁻¹ = Equiv.addRight (-a)
Full source
@[simp] lemma inv_addRight : (Equiv.addRight a)⁻¹ = Equiv.addRight (-a) := Equiv.coe_inj.1 rfl
Inverse of Right Addition Equivalence in Additive Group
Informal description
For any element $a$ in an additive group, the inverse of the right addition equivalence $\text{addRight}(a)$ is equal to the right addition equivalence of $-a$, i.e., $(\text{addRight}(a))^{-1} = \text{addRight}(-a)$.
Equiv.pow_addLeft theorem
(n : ℕ) : Equiv.addLeft a ^ n = Equiv.addLeft (n • a)
Full source
@[simp] lemma pow_addLeft (n : ) : Equiv.addLeft a ^ n = Equiv.addLeft (n • a) := by
  ext; simp [Perm.coe_pow]
Power of Left Addition Equivalence in Additive Group
Informal description
For any natural number $n$ and any element $a$ in an additive group, the $n$-th power of the left addition equivalence $\text{addLeft}(a)$ is equal to the left addition equivalence of the $n$-th multiple of $a$, i.e., $(\text{addLeft}(a))^n = \text{addLeft}(n \cdot a)$.
Equiv.pow_addRight theorem
(n : ℕ) : Equiv.addRight a ^ n = Equiv.addRight (n • a)
Full source
@[simp] lemma pow_addRight (n : ) : Equiv.addRight a ^ n = Equiv.addRight (n • a) := by
  ext; simp [Perm.coe_pow]
Power of Right Addition Equivalence in Additive Group: $(\text{addRight}(a))^n = \text{addRight}(n \cdot a)$
Informal description
For any natural number $n$ and any element $a$ in an additive group, the $n$-th power of the right addition equivalence $\text{addRight}(a)$ is equal to the right addition equivalence of the $n$-fold sum of $a$, i.e., $(\text{addRight}(a))^n = \text{addRight}(n \cdot a)$.
Equiv.zpow_addLeft theorem
(n : ℤ) : Equiv.addLeft a ^ n = Equiv.addLeft (n • a)
Full source
@[simp] lemma zpow_addLeft (n : ) : Equiv.addLeft a ^ n = Equiv.addLeft (n • a) :=
  (map_zsmul ({ toFun := Equiv.addLeft, map_zero' := addLeft_zero, map_add' := addLeft_add } :
    α →+ Additive (Perm α)) _ _).symm
Integer Power of Left Addition Equivalence: $(\text{addLeft}(a))^n = \text{addLeft}(n \cdot a)$
Informal description
For any integer $n$ and any element $a$ in an additive group $\alpha$, the $n$-th power of the left addition equivalence $\text{addLeft}(a)$ is equal to the left addition equivalence of the $n$-fold sum of $a$, i.e., $(\text{addLeft}(a))^n = \text{addLeft}(n \cdot a)$.
Equiv.zpow_addRight theorem
: ∀ (n : ℤ), Equiv.addRight a ^ n = Equiv.addRight (n • a)
Full source
@[simp] lemma zpow_addRight : ∀ (n : ), Equiv.addRight a ^ n = Equiv.addRight (n • a)
  | Int.ofNat n => by simp
  | Int.negSucc n => by simp
Integer Power of Right Addition Equivalence: $(\text{addRight}(a))^n = \text{addRight}(n \cdot a)$
Informal description
For any element $a$ in an additive group and any integer $n$, the $n$-th power of the right addition equivalence $\text{addRight}(a)$ is equal to the right addition equivalence of the $n$-fold sum of $a$, i.e., $(\text{addRight}(a))^n = \text{addRight}(n \cdot a)$.
Equiv.mulLeft_one theorem
: Equiv.mulLeft (1 : α) = 1
Full source
@[to_additive existing (attr := simp)]
lemma mulLeft_one : Equiv.mulLeft (1 : α) = 1 := ext one_mul
Left Multiplication by Identity is Identity Permutation
Informal description
For any type $\alpha$ with a multiplicative identity element $1$, the left multiplication map by $1$ is equal to the identity permutation on $\alpha$, i.e., $\text{mulLeft}(1) = 1$.
Equiv.mulRight_one theorem
: Equiv.mulRight (1 : α) = 1
Full source
@[to_additive existing (attr := simp)]
lemma mulRight_one : Equiv.mulRight (1 : α) = 1 := ext mul_one
Right Multiplication by Identity is the Identity Permutation
Informal description
For any group $\alpha$ with identity element $1$, the right multiplication permutation $\text{mulRight}\ 1$ is equal to the identity permutation on $\alpha$.
Equiv.mulLeft_mul theorem
: Equiv.mulLeft (a * b) = Equiv.mulLeft a * Equiv.mulLeft b
Full source
@[to_additive existing (attr := simp)]
lemma mulLeft_mul : Equiv.mulLeft (a * b) = Equiv.mulLeft a * Equiv.mulLeft b :=
  ext <| mul_assoc _ _
Composition of Left Multiplication Permutations in a Group
Informal description
For any elements $a$ and $b$ in a group $G$, the left multiplication permutation of the product $a * b$ is equal to the composition of the left multiplication permutations of $a$ and $b$, i.e., $\text{mulLeft}(a * b) = \text{mulLeft}(a) \circ \text{mulLeft}(b)$.
Equiv.mulRight_mul theorem
: Equiv.mulRight (a * b) = Equiv.mulRight b * Equiv.mulRight a
Full source
@[to_additive existing (attr := simp)]
lemma mulRight_mul : Equiv.mulRight (a * b) = Equiv.mulRight b * Equiv.mulRight a :=
  ext fun _ ↦ (mul_assoc _ _ _).symm
Composition Property of Right Multiplication Permutations: $\text{mulRight}(a * b) = \text{mulRight}(b) \circ \text{mulRight}(a)$
Informal description
For any elements $a$ and $b$ in a group $G$, the right multiplication permutation $\text{mulRight}(a * b)$ is equal to the composition of the right multiplication permutations $\text{mulRight}(b) \circ \text{mulRight}(a)$.
Equiv.inv_mulLeft theorem
: (Equiv.mulLeft a)⁻¹ = Equiv.mulLeft a⁻¹
Full source
@[to_additive existing (attr := simp) inv_addLeft]
lemma inv_mulLeft : (Equiv.mulLeft a)⁻¹ = Equiv.mulLeft a⁻¹ := Equiv.coe_inj.1 rfl
Inverse of Left Multiplication Permutation in a Group
Informal description
For any element $a$ in a group $G$, the inverse of the left multiplication permutation $\text{mulLeft}(a)$ is equal to the left multiplication permutation of the inverse element $a^{-1}$, i.e., $(\text{mulLeft}(a))^{-1} = \text{mulLeft}(a^{-1})$.
Equiv.inv_mulRight theorem
: (Equiv.mulRight a)⁻¹ = Equiv.mulRight a⁻¹
Full source
@[to_additive existing (attr := simp) inv_addRight]
lemma inv_mulRight : (Equiv.mulRight a)⁻¹ = Equiv.mulRight a⁻¹ := Equiv.coe_inj.1 rfl
Inverse of Right Multiplication Permutation in a Group
Informal description
For any element $a$ in a group $G$, the inverse of the right multiplication permutation $\text{mulRight}(a)$ is equal to the right multiplication permutation of the inverse element $a^{-1}$, i.e., $(\text{mulRight}(a))^{-1} = \text{mulRight}(a^{-1})$.
Equiv.pow_mulLeft theorem
(n : ℕ) : Equiv.mulLeft a ^ n = Equiv.mulLeft (a ^ n)
Full source
@[to_additive existing (attr := simp) pow_addLeft]
lemma pow_mulLeft (n : ) : Equiv.mulLeft a ^ n = Equiv.mulLeft (a ^ n) := by
  ext; simp [Perm.coe_pow]
Power of Left Multiplication Permutation Equals Left Multiplication of Power
Informal description
For any element $a$ in a group $G$ and any natural number $n$, the $n$-th power of the left multiplication permutation $\text{mulLeft}(a)$ is equal to the left multiplication permutation of the $n$-th power of $a$, i.e., $(\text{mulLeft}(a))^n = \text{mulLeft}(a^n)$.
Equiv.pow_mulRight theorem
(n : ℕ) : Equiv.mulRight a ^ n = Equiv.mulRight (a ^ n)
Full source
@[to_additive existing (attr := simp) pow_addRight]
lemma pow_mulRight (n : ) : Equiv.mulRight a ^ n = Equiv.mulRight (a ^ n) := by
  ext; simp [Perm.coe_pow]
Power of Right Multiplication Permutation in a Group: $(\text{mulRight}(a))^n = \text{mulRight}(a^n)$
Informal description
For any element $a$ in a group $G$ and any natural number $n$, the $n$-th power of the right multiplication permutation $\text{mulRight}(a)$ is equal to the right multiplication permutation of $a^n$, i.e., $(\text{mulRight}(a))^n = \text{mulRight}(a^n)$.
Equiv.zpow_mulLeft theorem
(n : ℤ) : Equiv.mulLeft a ^ n = Equiv.mulLeft (a ^ n)
Full source
@[to_additive existing (attr := simp) zpow_addLeft]
lemma zpow_mulLeft (n : ) : Equiv.mulLeft a ^ n = Equiv.mulLeft (a ^ n) :=
  (map_zpow ({ toFun := Equiv.mulLeft, map_one' := mulLeft_one, map_mul' := mulLeft_mul } :
              α →* Perm α) _ _).symm
Integer Power of Left Multiplication Permutation: $(\text{mulLeft}(a))^n = \text{mulLeft}(a^n)$
Informal description
For any element $a$ in a group $G$ and any integer $n$, the $n$-th power of the left multiplication permutation $\text{mulLeft}(a)$ is equal to the left multiplication permutation of $a^n$, i.e., $(\text{mulLeft}(a))^n = \text{mulLeft}(a^n)$.
Equiv.zpow_mulRight theorem
: ∀ n : ℤ, Equiv.mulRight a ^ n = Equiv.mulRight (a ^ n)
Full source
@[to_additive existing (attr := simp) zpow_addRight]
lemma zpow_mulRight : ∀ n : , Equiv.mulRight a ^ n = Equiv.mulRight (a ^ n)
  | Int.ofNat n => by simp
  | Int.negSucc n => by simp
Integer Power of Right Multiplication Permutation: $(\text{mulRight}(a))^n = \text{mulRight}(a^n)$
Informal description
For any element $a$ in a group $G$ and any integer $n$, the $n$-th power of the right multiplication permutation $\text{mulRight}(a)$ is equal to the right multiplication permutation of $a^n$, i.e., $(\text{mulRight}(a))^n = \text{mulRight}(a^n)$.
MulAut definition
(M : Type*) [Mul M]
Full source
/-- The group of multiplicative automorphisms. -/
@[reducible, to_additive "The group of additive automorphisms."]
def MulAut (M : Type*) [Mul M] :=
  M ≃* M
Group of multiplicative automorphisms
Informal description
The group of multiplicative automorphisms of a type $M$ equipped with a multiplication operation. An element of `MulAut M` is a multiplicative equivalence (isomorphism) from $M$ to itself, i.e., a bijection $f \colon M \to M$ that preserves multiplication: $f(x * y) = f(x) * f(y)$ for all $x, y \in M$.
MulAut.instGroup instance
: Group (MulAut M)
Full source
/-- The group operation on multiplicative automorphisms is defined by `g h => MulEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance : Group (MulAut M) where
  mul g h := MulEquiv.trans h g
  one := MulEquiv.refl _
  inv := MulEquiv.symm
  mul_assoc _ _ _ := rfl
  one_mul _ := rfl
  mul_one _ := rfl
  inv_mul_cancel := MulEquiv.self_trans_symm
Group Structure on Multiplicative Automorphisms via Composition
Informal description
The multiplicative automorphisms of a type $M$ equipped with a multiplication operation form a group, where the group operation is given by composition of automorphisms. Specifically, for any two automorphisms $g, h \in \text{MulAut}(M)$, their product $g \cdot h$ is defined as the composition $h \circ g$, meaning $(g \cdot h)(x) = g(h(x))$ for all $x \in M$. The identity element is the identity automorphism, and the inverse of an automorphism $f$ is its inverse function $f^{-1}$.
MulAut.instInhabited instance
: Inhabited (MulAut M)
Full source
instance : Inhabited (MulAut M) :=
  ⟨1⟩
Nonemptiness of Multiplicative Automorphisms
Informal description
For any type $M$ with a multiplication operation, the type of multiplicative automorphisms of $M$ is inhabited.
MulAut.coe_mul theorem
(e₁ e₂ : MulAut M) : ⇑(e₁ * e₂) = e₁ ∘ e₂
Full source
@[simp]
theorem coe_mul (e₁ e₂ : MulAut M) : ⇑(e₁ * e₂) = e₁ ∘ e₂ :=
  rfl
Composition of Multiplicative Automorphisms via Group Multiplication
Informal description
For any two multiplicative automorphisms $e₁$ and $e₂$ of a type $M$ with a multiplication operation, the underlying function of their product $e₁ * e₂$ is equal to the composition $e₁ \circ e₂$ of their underlying functions.
MulAut.coe_one theorem
: ⇑(1 : MulAut M) = id
Full source
@[simp]
theorem coe_one : ⇑(1 : MulAut M) = id :=
  rfl
Identity Multiplicative Automorphism is the Identity Function
Informal description
The identity element of the group of multiplicative automorphisms of a type $M$ is represented by the identity function $\text{id} \colon M \to M$.
MulAut.mul_def theorem
(e₁ e₂ : MulAut M) : e₁ * e₂ = e₂.trans e₁
Full source
theorem mul_def (e₁ e₂ : MulAut M) : e₁ * e₂ = e₂.trans e₁ :=
  rfl
Product of Multiplicative Automorphisms as Composition in Reverse Order
Informal description
For any two multiplicative automorphisms $e_1, e_2$ of a type $M$ with multiplication, the product $e_1 \cdot e_2$ in the automorphism group is equal to the composition $e_2 \circ e_1$ (where composition is interpreted as the transitive application of the multiplicative isomorphisms).
MulAut.one_def theorem
: (1 : MulAut M) = MulEquiv.refl _
Full source
theorem one_def : (1 : MulAut M) = MulEquiv.refl _ :=
  rfl
Identity Automorphism Equals Multiplicative Identity Isomorphism
Informal description
The identity element of the group of multiplicative automorphisms of a type $M$ with multiplication is equal to the multiplicative identity isomorphism on $M$, i.e., $1 = \text{refl}_M$ where $\text{refl}_M$ is the identity automorphism that maps each element to itself.
MulAut.inv_def theorem
(e₁ : MulAut M) : e₁⁻¹ = e₁.symm
Full source
theorem inv_def (e₁ : MulAut M) : e₁⁻¹ = e₁.symm :=
  rfl
Inverse of a multiplicative automorphism equals its inverse isomorphism
Informal description
For any multiplicative automorphism $e₁$ of a type $M$ with a multiplication operation, the inverse $e₁^{-1}$ in the automorphism group is equal to the inverse isomorphism $e₁.symm$.
MulAut.mul_apply theorem
(e₁ e₂ : MulAut M) (m : M) : (e₁ * e₂) m = e₁ (e₂ m)
Full source
@[simp]
theorem mul_apply (e₁ e₂ : MulAut M) (m : M) : (e₁ * e₂) m = e₁ (e₂ m) :=
  rfl
Composition of Multiplicative Automorphisms via Group Multiplication
Informal description
For any two multiplicative automorphisms $e₁, e₂$ of a type $M$ equipped with a multiplication operation, and for any element $m \in M$, the application of the product automorphism $e₁ * e₂$ to $m$ is equal to the application of $e₁$ to the result of applying $e₂$ to $m$, i.e., $(e₁ * e₂)(m) = e₁(e₂(m))$.
MulAut.one_apply theorem
(m : M) : (1 : MulAut M) m = m
Full source
@[simp]
theorem one_apply (m : M) : (1 : MulAut M) m = m :=
  rfl
Identity Multiplicative Automorphism Acts Trivially
Informal description
For any element $m$ in a type $M$ with a multiplication operation, the identity multiplicative automorphism $1 \in \text{MulAut}(M)$ acts trivially on $m$, i.e., $1(m) = m$.
MulAut.apply_inv_self theorem
(e : MulAut M) (m : M) : e (e⁻¹ m) = m
Full source
@[simp]
theorem apply_inv_self (e : MulAut M) (m : M) : e (e⁻¹ m) = m :=
  MulEquiv.apply_symm_apply _ _
Inverse Automorphism Recovery: $e(e^{-1}(m)) = m$
Informal description
For any multiplicative automorphism $e$ of a type $M$ equipped with a multiplication operation and any element $m \in M$, applying $e$ to the inverse automorphism $e^{-1}$ evaluated at $m$ recovers $m$, i.e., $e(e^{-1}(m)) = m$.
MulAut.inv_apply_self theorem
(e : MulAut M) (m : M) : e⁻¹ (e m) = m
Full source
@[simp]
theorem inv_apply_self (e : MulAut M) (m : M) : e⁻¹ (e m) = m :=
  MulEquiv.apply_symm_apply _ _
Inverse Multiplicative Automorphism Recovers Original Element: $e^{-1}(e(m)) = m$
Informal description
For any multiplicative automorphism $e$ of a type $M$ equipped with a multiplication operation, and for any element $m \in M$, applying the inverse automorphism $e^{-1}$ to the image $e(m)$ recovers the original element $m$, i.e., $e^{-1}(e(m)) = m$.
MulAut.toPerm definition
: MulAut M →* Equiv.Perm M
Full source
/-- Monoid hom from the group of multiplicative automorphisms to the group of permutations. -/
def toPerm : MulAutMulAut M →* Equiv.Perm M where
  toFun := MulEquiv.toEquiv
  map_one' := rfl
  map_mul' _ _ := rfl
Homomorphism from multiplicative automorphisms to permutations
Informal description
The monoid homomorphism from the group of multiplicative automorphisms of a type $M$ to the group of permutations of $M$, mapping each multiplicative automorphism to its underlying bijection (permutation). This homomorphism preserves the identity and composition operations.
MulAut.conj definition
[Group G] : G →* MulAut G
Full source
/-- Group conjugation, `MulAut.conj g h = g * h * g⁻¹`, as a monoid homomorphism
mapping multiplication in `G` into multiplication in the automorphism group `MulAut G`.
See also the type `ConjAct G` for any group `G`, which has a `MulAction (ConjAct G) G` instance
where `conj G` acts on `G` by conjugation. -/
def conj [Group G] : G →* MulAut G where
  toFun g :=
    { toFun := fun h => g * h * g⁻¹
      invFun := fun h => g⁻¹ * h * g
      left_inv := fun _ => by simp only [mul_assoc, inv_mul_cancel_left, inv_mul_cancel, mul_one]
      right_inv := fun _ => by simp only [mul_assoc, mul_inv_cancel_left, mul_inv_cancel, mul_one]
      map_mul' := by simp only [mul_assoc, inv_mul_cancel_left, forall_const] }
  map_mul' g₁ g₂ := by
    ext h
    show g₁ * g₂ * h * (g₁ * g₂)⁻¹ = g₁ * (g₂ * h * g₂⁻¹) * g₁⁻¹
    simp only [mul_assoc, mul_inv_rev]
  map_one' := by ext; simp only [one_mul, inv_one, mul_one, one_apply]; rfl
Group conjugation as a homomorphism to automorphisms
Informal description
The group conjugation homomorphism, which maps an element \( g \) of a group \( G \) to the automorphism \( \text{conj}_g \) defined by \( \text{conj}_g(h) = g * h * g^{-1} \). This homomorphism sends the group operation in \( G \) to composition in the automorphism group \( \text{MulAut}(G) \).
MulAut.conj_apply theorem
[Group G] (g h : G) : conj g h = g * h * g⁻¹
Full source
@[simp]
theorem conj_apply [Group G] (g h : G) : conj g h = g * h * g⁻¹ :=
  rfl
Conjugation Formula in Groups: $\text{conj}_g(h) = g h g^{-1}$
Informal description
Let $G$ be a group. For any elements $g, h \in G$, the conjugation action of $g$ on $h$ is given by $\text{conj}_g(h) = g h g^{-1}$.
MulAut.conj_symm_apply theorem
[Group G] (g h : G) : (conj g).symm h = g⁻¹ * h * g
Full source
@[simp]
theorem conj_symm_apply [Group G] (g h : G) : (conj g).symm h = g⁻¹ * h * g :=
  rfl
Inverse Conjugation Formula: $(conj_g)^{-1}(h) = g^{-1} h g$
Informal description
For any group $G$ and elements $g, h \in G$, the application of the inverse of the conjugation automorphism $\text{conj}_g$ to $h$ is given by $g^{-1} * h * g$.
MulAut.conj_inv_apply theorem
[Group G] (g h : G) : (conj g)⁻¹ h = g⁻¹ * h * g
Full source
@[simp]
theorem conj_inv_apply [Group G] (g h : G) : (conj g)⁻¹ h = g⁻¹ * h * g :=
  rfl
Inverse of Conjugation Automorphism Formula
Informal description
Let $G$ be a group. For any elements $g, h \in G$, the inverse of the conjugation automorphism $\text{conj}_g$ evaluated at $h$ is given by $g^{-1} * h * g$.
MulAut.congr definition
[Group G] {H : Type*} [Group H] (ϕ : G ≃* H) : MulAut G ≃* MulAut H
Full source
/-- Isomorphic groups have isomorphic automorphism groups. -/
@[simps]
def congr [Group G] {H : Type*} [Group H] (ϕ : G ≃* H) :
    MulAutMulAut G ≃* MulAut H where
  toFun f := ϕ.symm.trans (f.trans ϕ)
  invFun f := ϕ.trans (f.trans ϕ.symm)
  left_inv _ := by simp [DFunLike.ext_iff]
  right_inv _ := by simp [DFunLike.ext_iff]
  map_mul' := by simp [DFunLike.ext_iff]
Isomorphism of automorphism groups induced by a group isomorphism
Informal description
Given a multiplicative isomorphism $\phi \colon G \to H$ between two groups $G$ and $H$, the map $\text{MulAut.congr} \colon \text{MulAut}(G) \to \text{MulAut}(H)$ is a group isomorphism between the automorphism groups of $G$ and $H$. Specifically, for any automorphism $f \in \text{MulAut}(G)$, the corresponding automorphism in $\text{MulAut}(H)$ is given by $\phi \circ f \circ \phi^{-1}$.
AddAut.group instance
: Group (AddAut A)
Full source
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) where
  mul g h := AddEquiv.trans h g
  one := AddEquiv.refl _
  inv := AddEquiv.symm
  mul_assoc _ _ _ := rfl
  one_mul _ := rfl
  mul_one _ := rfl
  inv_mul_cancel := AddEquiv.self_trans_symm
Group Structure on Additive Automorphisms
Informal description
For any additive group $A$, the set of additive automorphisms of $A$ forms a group under composition, where the group operation is given by composition of automorphisms (i.e., $(g \circ h)(x) = g(h(x))$), the identity element is the identity automorphism, and the inverse of an automorphism is its inverse function.
AddAut.instInhabited instance
: Inhabited (AddAut A)
Full source
instance : Inhabited (AddAut A) :=
  ⟨1⟩
Nonemptiness of Additive Automorphism Group
Informal description
For any additive group $A$, the set of additive automorphisms of $A$ is nonempty, containing at least the identity automorphism.
AddAut.coe_mul theorem
(e₁ e₂ : AddAut A) : ⇑(e₁ * e₂) = e₁ ∘ e₂
Full source
@[simp]
theorem coe_mul (e₁ e₂ : AddAut A) : ⇑(e₁ * e₂) = e₁ ∘ e₂ :=
  rfl
Composition of Additive Automorphisms as Group Multiplication
Informal description
For any two additive automorphisms $e₁$ and $e₂$ of an additive group $A$, the underlying function of their product $e₁ * e₂$ is equal to the composition $e₁ \circ e₂$.
AddAut.coe_one theorem
: ⇑(1 : AddAut A) = id
Full source
@[simp]
theorem coe_one : ⇑(1 : AddAut A) = id :=
  rfl
Identity Additive Automorphism is the Identity Function
Informal description
The identity element of the group of additive automorphisms of $A$ is represented by the identity function $\mathrm{id} : A \to A$.
AddAut.mul_def theorem
(e₁ e₂ : AddAut A) : e₁ * e₂ = e₂.trans e₁
Full source
theorem mul_def (e₁ e₂ : AddAut A) : e₁ * e₂ = e₂.trans e₁ :=
  rfl
Product of Additive Automorphisms as Composition
Informal description
For any two additive automorphisms $e₁$ and $e₂$ of an additive group $A$, the product $e₁ * e₂$ in the automorphism group is equal to the composition $e₂ \circ e₁$ (where composition is defined as function composition).
AddAut.one_def theorem
: (1 : AddAut A) = AddEquiv.refl _
Full source
theorem one_def : (1 : AddAut A) = AddEquiv.refl _ :=
  rfl
Identity Additive Automorphism is Identity Equivalence
Informal description
The identity element of the group of additive automorphisms of an additive group $A$ is equal to the identity additive equivalence on $A$.
AddAut.inv_def theorem
(e₁ : AddAut A) : e₁⁻¹ = e₁.symm
Full source
theorem inv_def (e₁ : AddAut A) : e₁⁻¹ = e₁.symm :=
  rfl
Inverse of Additive Automorphism Equals Its Symmetric Equivalence
Informal description
For any additive automorphism $e_1$ of an additive group $A$, the inverse of $e_1$ in the automorphism group is equal to the symmetric (inverse) equivalence of $e_1$, i.e., $e_1^{-1} = e_1^{\text{symm}}$.
AddAut.mul_apply theorem
(e₁ e₂ : AddAut A) (a : A) : (e₁ * e₂) a = e₁ (e₂ a)
Full source
@[simp]
theorem mul_apply (e₁ e₂ : AddAut A) (a : A) : (e₁ * e₂) a = e₁ (e₂ a) :=
  rfl
Composition of Additive Automorphisms
Informal description
For any additive automorphisms $e₁$ and $e₂$ of an additive group $A$, and for any element $a \in A$, the composition of $e₁$ and $e₂$ evaluated at $a$ satisfies $(e₁ \circ e₂)(a) = e₁(e₂(a))$.
AddAut.one_apply theorem
(a : A) : (1 : AddAut A) a = a
Full source
@[simp]
theorem one_apply (a : A) : (1 : AddAut A) a = a :=
  rfl
Identity Automorphism Acts as Identity on Additive Group Elements
Informal description
For any additive group $A$ and any element $a \in A$, the identity automorphism $1$ in the group of additive automorphisms of $A$ satisfies $1(a) = a$.
AddAut.apply_inv_self theorem
(e : AddAut A) (a : A) : e⁻¹ (e a) = a
Full source
@[simp]
theorem apply_inv_self (e : AddAut A) (a : A) : e⁻¹ (e a) = a :=
  AddEquiv.apply_symm_apply _ _
Inverse Automorphism Cancels Automorphism in Additive Groups
Informal description
For any additive automorphism $e$ of an additive group $A$ and any element $a \in A$, the application of the inverse automorphism $e^{-1}$ to $e(a)$ yields $a$, i.e., $e^{-1}(e(a)) = a$.
AddAut.inv_apply_self theorem
(e : AddAut A) (a : A) : e (e⁻¹ a) = a
Full source
@[simp]
theorem inv_apply_self (e : AddAut A) (a : A) : e (e⁻¹ a) = a :=
  AddEquiv.apply_symm_apply _ _
Inverse Application Property of Additive Automorphisms
Informal description
For any additive automorphism $e$ of an additive group $A$ and any element $a \in A$, applying $e$ to the inverse of $e$ evaluated at $a$ returns $a$, i.e., $e(e^{-1}(a)) = a$.
AddAut.toPerm definition
: AddAut A →* Equiv.Perm A
Full source
/-- Monoid hom from the group of multiplicative automorphisms to the group of permutations. -/
def toPerm : AddAutAddAut A →* Equiv.Perm A where
  toFun := AddEquiv.toEquiv
  map_one' := rfl
  map_mul' _ _ := rfl
Homomorphism from additive automorphisms to permutations
Informal description
The monoid homomorphism from the group of additive automorphisms of an additive group $A$ to the group of permutations of $A$, mapping each additive automorphism to its underlying bijection (permutation). This homomorphism preserves the group structure, sending composition of automorphisms to composition of permutations, and the identity automorphism to the identity permutation.
AddAut.conj definition
[AddGroup G] : G →+ Additive (AddAut G)
Full source
/-- Additive group conjugation, `AddAut.conj g h = g + h - g`, as an additive monoid
homomorphism mapping addition in `G` into multiplication in the automorphism group `AddAut G`
(written additively in order to define the map). -/
def conj [AddGroup G] : G →+ Additive (AddAut G) where
  toFun g :=
    @Additive.ofMul (AddAut G)
      { toFun := fun h => g + h + -g
        -- this definition is chosen to match `MulAut.conj`
        invFun := fun h => -g + h + g
        left_inv := fun _ => by
          simp only [add_assoc, neg_add_cancel_left, neg_add_cancel, add_zero]
        right_inv := fun _ => by
          simp only [add_assoc, add_neg_cancel_left, add_neg_cancel, add_zero]
        map_add' := by simp only [add_assoc, neg_add_cancel_left, forall_const] }
  map_add' g₁ g₂ := by
    apply Additive.toMul.injective; ext h
    show g₁ + g₂ + h + -(g₁ + g₂) = g₁ + (g₂ + h + -g₂) + -g₁
    simp only [add_assoc, neg_add_rev]
  map_zero' := by
    apply Additive.toMul.injective; ext
    simp only [zero_add, neg_zero, add_zero, toMul_ofMul, toMul_zero, one_apply]
    rfl
Additive conjugation as a homomorphism to automorphisms
Informal description
Given an additive group $G$, the function $\text{AddAut.conj} : G \to \text{Additive}(\text{AddAut} G)$ is an additive monoid homomorphism that maps each element $g \in G$ to the conjugation automorphism $h \mapsto g + h - g$ in the additive automorphism group of $G$. More precisely, for any $g \in G$, the automorphism $\text{AddAut.conj}(g)$ is defined by: - The forward map: $h \mapsto g + h - g$ - The inverse map: $h \mapsto -g + h + g$ This homomorphism satisfies: 1. $\text{AddAut.conj}(g_1 + g_2) = \text{AddAut.conj}(g_1) \circ \text{AddAut.conj}(g_2)$ for all $g_1, g_2 \in G$ 2. $\text{AddAut.conj}(0) = \text{id}_G$ (the identity automorphism)
AddAut.conj_apply theorem
[AddGroup G] (g h : G) : (conj g).toMul h = g + h + -g
Full source
@[simp]
theorem conj_apply [AddGroup G] (g h : G) : (conj g).toMul h = g + h + -g :=
  rfl
Conjugation Automorphism Formula: $\text{conj}(g)(h) = g + h - g$
Informal description
For any additive group $G$ and elements $g, h \in G$, the conjugation automorphism $\text{conj}(g)$ applied to $h$ is given by $g + h - g$.
AddAut.conj_symm_apply theorem
[AddGroup G] (g h : G) : (conj g).toMul.symm h = -g + h + g
Full source
@[simp]
theorem conj_symm_apply [AddGroup G] (g h : G) : (conj g).toMul.symm h = -g + h + g :=
  rfl
Inverse Conjugation Automorphism Formula: $(\text{conj}(g))^{-1}(h) = -g + h + g$
Informal description
For any additive group $G$ and elements $g, h \in G$, the inverse of the conjugation automorphism $\text{conj}(g)$ applied to $h$ is given by $-g + h + g$.
AddAut.conj_inv_apply theorem
[AddGroup G] (g h : G) : (conj g).toMul⁻¹ h = -g + h + g
Full source
@[simp]
theorem conj_inv_apply [AddGroup G] (g h : G) : (conj g).toMul⁻¹ h = -g + h + g :=
  rfl
Inverse Conjugation Automorphism Formula: $(\text{conj}(g))^{-1}(h) = -g + h + g$
Informal description
For any additive group $G$ and elements $g, h \in G$, the inverse of the conjugation automorphism $\text{conj}(g)$ applied to $h$ is given by $-g + h + g$.
AddAut.neg_conj_apply theorem
[AddGroup G] (g h : G) : (-conj g).toMul h = -g + h + g
Full source
theorem neg_conj_apply [AddGroup G] (g h : G) : (-conj g).toMul h = -g + h + g := by
  simp
Action of Negated Conjugation Automorphism in Additive Group
Informal description
Let $G$ be an additive group. For any elements $g, h \in G$, the action of the negation of the conjugation automorphism $\text{conj}(g)$ on $h$ is given by $(- \text{conj}(g))(h) = -g + h + g$.
AddAut.congr definition
[AddGroup G] {H : Type*} [AddGroup H] (ϕ : G ≃+ H) : AddAut G ≃* AddAut H
Full source
/-- Isomorphic additive groups have isomorphic automorphism groups. -/
@[simps]
def congr [AddGroup G] {H : Type*} [AddGroup H] (ϕ : G ≃+ H) :
    AddAutAddAut G ≃* AddAut H where
  toFun f := ϕ.symm.trans (f.trans ϕ)
  invFun f := ϕ.trans (f.trans ϕ.symm)
  left_inv _ := by simp [DFunLike.ext_iff]
  right_inv _ := by simp [DFunLike.ext_iff]
  map_mul' := by simp [DFunLike.ext_iff]
Isomorphism of automorphism groups induced by an additive group isomorphism
Informal description
Given an additive group isomorphism $\phi : G \simeq H$ between two additive groups $G$ and $H$, the map $\text{AddAut.congr} \phi$ is a multiplicative isomorphism between the automorphism groups $\text{AddAut}(G)$ and $\text{AddAut}(H)$. Specifically, it sends an automorphism $f \in \text{AddAut}(G)$ to the automorphism $\phi^{-1} \circ f \circ \phi \in \text{AddAut}(H)$, and its inverse sends $g \in \text{AddAut}(H)$ to $\phi \circ g \circ \phi^{-1} \in \text{AddAut}(G)$. This map preserves the group operation (composition of automorphisms) and is bijective.
MulAutMultiplicative definition
[AddGroup G] : MulAut (Multiplicative G) ≃* AddAut G
Full source
/-- `Multiplicative G` and `G` have isomorphic automorphism groups. -/
@[simps!]
def MulAutMultiplicative [AddGroup G] : MulAutMulAut (Multiplicative G) ≃* AddAut G :=
  { AddEquiv.toMultiplicative.symm with map_mul' := fun _ _ ↦ rfl }
Isomorphism between multiplicative automorphisms of multiplicative $G$ and additive automorphisms of $G$
Informal description
The multiplicative automorphism group of the multiplicative version of an additive group $G$ is isomorphic to the additive automorphism group of $G$. More precisely, there is a group isomorphism between $\text{MulAut}(\text{Multiplicative}\,G)$ and $\text{AddAut}(G)$, where $\text{Multiplicative}\,G$ is the type $G$ equipped with multiplication defined via the additive structure of $G$.
AddAutAdditive definition
[Group G] : AddAut (Additive G) ≃* MulAut G
Full source
/-- `Additive G` and `G` have isomorphic automorphism groups. -/
@[simps!]
def AddAutAdditive [Group G] : AddAutAddAut (Additive G) ≃* MulAut G :=
  { MulEquiv.toAdditive.symm with map_mul' := fun _ _ ↦ rfl }
Isomorphism between additive automorphisms of $\text{Additive}\,G$ and multiplicative automorphisms of $G$
Informal description
The definition provides a group isomorphism between the additive automorphism group of the additive version of a group $G$ (denoted $\text{Additive}\,G$) and the multiplicative automorphism group of $G$ itself. More precisely, it constructs an isomorphism: \[ \text{AddAut}(\text{Additive}\,G) \simeq^* \text{MulAut}(G), \] where: - $\text{AddAut}(\text{Additive}\,G)$ is the group of additive automorphisms of $\text{Additive}\,G$ (with composition as the group operation). - $\text{MulAut}(G)$ is the group of multiplicative automorphisms of $G$ (with composition as the group operation). The isomorphism is given by converting multiplicative automorphisms of $G$ into additive automorphisms of $\text{Additive}\,G$ and vice versa, preserving the group structure.