module Algebra.Group.Instances.Symmetric where
Symmetric groups🔗
If is a set, then the type of all bijections is also a set, and it forms the carrier for a group: The symmetric group on
: ∀ {ℓ} (X : Set ℓ) → Group-on (∣ X ∣ ≃ ∣ X ∣)
Sym = to-group-on group-str where
Sym X open make-group
: make-group (∣ X ∣ ≃ ∣ X ∣)
group-str .mul g f = f ∙e g group-str
The group operation is composition of equivalences
; The identity element
is the identity equivalence
.
.unit = id , id-equiv group-str
This type is a set because
is a set (because
is a set by assumption), and being an equivalence is a proposition
.
.group-is-set = hlevel 2 group-str
The associativity and identity laws hold definitionally.
.assoc _ _ _ = trivial!
group-str .idl _ = trivial! group-str
The inverse is given by the inverse equivalence
, and the inverse
equations hold by the fact that the inverse of an equivalence is both a
section and a retraction.
.inv = _e⁻¹
group-str .invl (f , eqv) = ext (equiv→unit eqv) group-str
We write for the symmetric group on the standard finite set with elements.
: Nat → Group lzero
S = el! (Fin n ≃ Fin n) , Sym (el! (Fin n)) S n