diff --git a/Decidable/Sets.agda b/Decidable/Sets.agda index 97948cc..a1fe0b0 100644 --- a/Decidable/Sets.agda +++ b/Decidable/Sets.agda @@ -4,6 +4,5 @@ open import LogicalFormulae module Decidable.Sets where -record DecidableSet {a : _} (A : Set a) : Set a where - field - eq : (a b : A) → ((a ≡ b) || ((a ≡ b) → False)) +DecidableSet : {a : _} (A : Set a) → Set a +DecidableSet A = (a b : A) → ((a ≡ b) || ((a ≡ b) → False)) diff --git a/Everything/Safe.agda b/Everything/Safe.agda index 13e7bb9..96da870 100644 --- a/Everything/Safe.agda +++ b/Everything/Safe.agda @@ -95,6 +95,8 @@ open import Setoids.Functions.Extension open import Setoids.Algebra.Lemmas open import Setoids.Intersection.Lemmas open import Setoids.Union.Lemmas +open import Setoids.Cardinality.Infinite.Lemmas +open import Setoids.Cardinality.Finite.Definition open import Sets.Cardinality.Infinite.Examples open import Sets.Cardinality.Infinite.Lemmas diff --git a/Everything/WithK.agda b/Everything/WithK.agda index 772735f..f69f006 100644 --- a/Everything/WithK.agda +++ b/Everything/WithK.agda @@ -19,6 +19,7 @@ open import Sets.FinSetWithK open import Rings.Examples.Examples open import Rings.Examples.Proofs +open import Groups.FreeGroup.Lemmas open import Groups.FreeGroup.UniversalProperty open import Groups.FreeGroup.Parity open import Groups.FreeProduct.UniversalProperty diff --git a/Groups/Cyclic/Lemmas.agda b/Groups/Cyclic/Lemmas.agda index 50d9a81..e3e6af6 100644 --- a/Groups/Cyclic/Lemmas.agda +++ b/Groups/Cyclic/Lemmas.agda @@ -8,7 +8,7 @@ open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Numbers.Naturals.Definition open import Numbers.Integers.Integers open import Numbers.Integers.Addition -open import Sets.FinSet +open import Sets.FinSet.Definition open import Groups.Homomorphisms.Definition open import Groups.Groups open import Groups.Subgroups.Definition diff --git a/Groups/FreeGroup/Definition.agda b/Groups/FreeGroup/Definition.agda index b3932b3..a48ef1d 100644 --- a/Groups/FreeGroup/Definition.agda +++ b/Groups/FreeGroup/Definition.agda @@ -17,6 +17,10 @@ data FreeCompletion {a : _} (A : Set a) : Set a where ofLetter : A → FreeCompletion A ofInv : A → FreeCompletion A +freeCompletionMap : {a b : _} {A : Set a} {B : Set b} (f : A → B) (w : FreeCompletion A) → FreeCompletion B +freeCompletionMap f (ofLetter x) = ofLetter (f x) +freeCompletionMap f (ofInv x) = ofInv (f x) + freeInverse : {a : _} {A : Set a} (l : FreeCompletion A) → FreeCompletion A freeInverse (ofLetter x) = ofInv x freeInverse (ofInv x) = ofLetter x @@ -27,8 +31,11 @@ ofLetterInjective refl = refl ofInvInjective : {a : _} {A : Set a} {x y : A} → (ofInv x ≡ ofInv y) → x ≡ y ofInvInjective refl = refl +ofLetterOfInv : {a : _} {A : Set a} {x y : A} → ofLetter x ≡ ofInv y → False +ofLetterOfInv () + decidableFreeCompletion : {a : _} {A : Set a} → DecidableSet A → DecidableSet (FreeCompletion A) -decidableFreeCompletion {A = A} record { eq = dec } = record { eq = pr } +decidableFreeCompletion {A = A} dec = pr where pr : (a b : FreeCompletion A) → (a ≡ b) || (a ≡ b → False) pr (ofLetter x) (ofLetter y) with dec x y @@ -41,17 +48,17 @@ decidableFreeCompletion {A = A} record { eq = dec } = record { eq = pr } ... | inr x!=y = inr λ p → x!=y (ofInvInjective p) freeCompletionEqual : {a : _} {A : Set a} (dec : DecidableSet A) (x y : FreeCompletion A) → Bool -freeCompletionEqual dec x y with DecidableSet.eq (decidableFreeCompletion dec) x y +freeCompletionEqual dec x y with decidableFreeCompletion dec x y freeCompletionEqual dec x y | inl x₁ = BoolTrue freeCompletionEqual dec x y | inr x₁ = BoolFalse freeCompletionEqualFalse : {a : _} {A : Set a} (dec : DecidableSet A) {x y : FreeCompletion A} → ((x ≡ y) → False) → (freeCompletionEqual dec x y) ≡ BoolFalse -freeCompletionEqualFalse dec {x = x} {y} x!=y with DecidableSet.eq (decidableFreeCompletion dec) x y +freeCompletionEqualFalse dec {x = x} {y} x!=y with decidableFreeCompletion dec x y freeCompletionEqualFalse dec {x} {y} x!=y | inl x=y = exFalso (x!=y x=y) freeCompletionEqualFalse dec {x} {y} x!=y | inr _ = refl freeCompletionEqualFalse' : {a : _} {A : Set a} (dec : DecidableSet A) {x y : FreeCompletion A} → .((freeCompletionEqual dec x y) ≡ BoolFalse) → (x ≡ y) → False -freeCompletionEqualFalse' dec {x} {y} pr with DecidableSet.eq (decidableFreeCompletion dec) x y +freeCompletionEqualFalse' dec {x} {y} pr with decidableFreeCompletion dec x y freeCompletionEqualFalse' dec {x} {y} () | inl x₁ freeCompletionEqualFalse' dec {x} {y} pr | inr ans = ans diff --git a/Groups/FreeGroup/Group.agda b/Groups/FreeGroup/Group.agda index 6c0fc48..4bf45c1 100644 --- a/Groups/FreeGroup/Group.agda +++ b/Groups/FreeGroup/Group.agda @@ -15,10 +15,10 @@ open import Groups.FreeGroup.Word decA prepend : ReducedWord → FreeCompletion A → ReducedWord prepend empty x = prependLetter x empty (wordEmpty refl) prepend (prependLetter (ofLetter y) w pr) (ofLetter x) = prependLetter (ofLetter x) (prependLetter (ofLetter y) w pr) (wordEnding (succIsPositive _) (freeCompletionEqualFalse decA {ofLetter x} {ofInv x} λ ())) -prepend (prependLetter (ofInv y) w pr) (ofLetter x) with DecidableSet.eq decA x y +prepend (prependLetter (ofInv y) w pr) (ofLetter x) with decA x y ... | inl x=y = w ... | inr x!=y = prependLetter (ofLetter x) (prependLetter (ofInv y) w pr) (wordEnding (succIsPositive _) (freeCompletionEqualFalse decA {ofLetter x} {ofLetter y} λ pr → x!=y (ofLetterInjective pr))) -prepend (prependLetter (ofLetter y) w pr) (ofInv x) with DecidableSet.eq decA x y +prepend (prependLetter (ofLetter y) w pr) (ofInv x) with decA x y ... | inl x=y = w ... | inr x!=y = prependLetter (ofInv x) (prependLetter (ofLetter y) w pr) (wordEnding (succIsPositive _) (freeCompletionEqualFalse decA λ pr → x!=y (ofInvInjective pr))) prepend (prependLetter (ofInv y) w pr) (ofInv x) = prependLetter (ofInv x) (prependLetter (ofInv y) w pr) (wordEnding (succIsPositive _) (freeCompletionEqualFalse decA {ofInv x} {ofLetter x} (λ ()))) @@ -30,50 +30,50 @@ prependLetter letter a x +W b = prepend (a +W b) letter prependValid : (w : ReducedWord) (l : A) → (x : PrependIsValid w (ofLetter l)) → prepend w (ofLetter l) ≡ prependLetter (ofLetter l) w x prependValid empty l (wordEmpty refl) = refl prependValid (prependLetter (ofLetter l2) w x) l pr = prependLetterRefl -prependValid (prependLetter (ofInv l2) w x) l pr with DecidableSet.eq decA l l2 +prependValid (prependLetter (ofInv l2) w x) l pr with decA l l2 prependValid (prependLetter (ofInv l2) w x) .l2 (wordEnding _ x1) | inl refl = exFalso (freeCompletionEqualFalse' decA x1 refl) ... | inr l!=l2 = prependLetterRefl prependValid' : (w : ReducedWord) (l : A) → (x : PrependIsValid w (ofInv l)) → prepend w (ofInv l) ≡ prependLetter (ofInv l) w x prependValid' empty l (wordEmpty refl) = refl -prependValid' (prependLetter (ofLetter l2) w x) l pr with DecidableSet.eq decA l l2 +prependValid' (prependLetter (ofLetter l2) w x) l pr with decA l l2 prependValid' (prependLetter (ofLetter l2) w x) .l2 (wordEnding _ x1) | inl refl = exFalso (freeCompletionEqualFalse' decA x1 refl) ... | inr l!=l2 = prependLetterRefl prependValid' (prependLetter (ofInv l2) w x) l pr = prependLetterRefl prependInv : (w : ReducedWord) (l : A) → prepend (prepend w (ofLetter l)) (ofInv l) ≡ w -prependInv empty l with DecidableSet.eq decA l l +prependInv empty l with decA l l ... | inl l=l = refl ... | inr l!=l = exFalso (l!=l refl) -prependInv (prependLetter (ofLetter l2) w x) l with DecidableSet.eq decA l l +prependInv (prependLetter (ofLetter l2) w x) l with decA l l ... | inl l=l = refl ... | inr l!=l = exFalso (l!=l refl) -prependInv (prependLetter (ofInv l2) w x) l with DecidableSet.eq decA l l2 +prependInv (prependLetter (ofInv l2) w x) l with decA l l2 prependInv (prependLetter (ofInv l2) w x) .l2 | inl refl = prependValid' w l2 x -... | inr l!=l2 with DecidableSet.eq decA l l +... | inr l!=l2 with decA l l prependInv (prependLetter (ofInv l2) w x) l | inr l!=l2 | inl refl = refl prependInv (prependLetter (ofInv l2) w x) l | inr l!=l2 | inr bad = exFalso (bad refl) prependInv' : (w : ReducedWord) (l : A) → prepend (prepend w (ofInv l)) (ofLetter l) ≡ w -prependInv' empty l with DecidableSet.eq decA l l +prependInv' empty l with decA l l ... | inl l=l = refl ... | inr l!=l = exFalso (l!=l refl) -prependInv' (prependLetter (ofLetter l2) w x) l with DecidableSet.eq decA l l2 +prependInv' (prependLetter (ofLetter l2) w x) l with decA l l2 prependInv' (prependLetter (ofLetter l2) w x) .l2 | inl refl = prependValid w l2 x -... | inr l!=l2 with DecidableSet.eq decA l l +... | inr l!=l2 with decA l l ... | inl refl = refl ... | inr l!=l = exFalso (l!=l refl) -prependInv' (prependLetter (ofInv l2) w x) l with DecidableSet.eq decA l l +prependInv' (prependLetter (ofInv l2) w x) l with decA l l prependInv' (prependLetter (ofInv l2) w x) l | inl refl = refl prependInv' (prependLetter (ofInv l2) w x) l | inr l!=l = exFalso (l!=l refl) prependAndAdd : (a b : ReducedWord) (l : FreeCompletion A) → prepend (a +W b) l ≡ (prepend a l) +W b prependAndAdd empty b l = refl prependAndAdd (prependLetter (ofLetter x) w pr) b (ofLetter y) = refl -prependAndAdd (prependLetter (ofLetter x) w pr) b (ofInv y) with DecidableSet.eq decA y x +prependAndAdd (prependLetter (ofLetter x) w pr) b (ofInv y) with decA y x prependAndAdd (prependLetter (ofLetter x) w pr) b (ofInv .x) | inl refl = prependInv _ _ ... | inr y!=x = refl -prependAndAdd (prependLetter (ofInv x) w pr) b (ofLetter y) with DecidableSet.eq decA y x +prependAndAdd (prependLetter (ofInv x) w pr) b (ofLetter y) with decA y x prependAndAdd (prependLetter (ofInv x) w pr) b (ofLetter .x) | inl refl = prependInv' _ _ ... | inr y!=x = refl prependAndAdd (prependLetter (ofInv x) w pr) b (ofInv y) = refl @@ -96,13 +96,13 @@ invLeftW empty = refl invLeftW (prependLetter (ofLetter l) a x) rewrite equalityCommutative (+WAssoc (inverseW a) (prependLetter (ofInv l) empty (wordEmpty refl)) (prependLetter (ofLetter l) a x)) = t where t : (inverseW a +W (prepend (prependLetter (ofLetter l) a x) (ofInv l))) ≡ empty - t with DecidableSet.eq decA l l + t with decA l l ... | inl refl = invLeftW a ... | inr l!=l = exFalso (l!=l refl) invLeftW (prependLetter (ofInv l) a x) rewrite equalityCommutative (+WAssoc (inverseW a) (prependLetter (ofLetter l) empty (wordEmpty refl)) (prependLetter (ofInv l) a x)) = t where t : (inverseW a +W (prepend (prependLetter (ofInv l) a x) (ofLetter l))) ≡ empty - t with DecidableSet.eq decA l l + t with decA l l ... | inl refl = invLeftW a ... | inr l!=l = exFalso (l!=l refl) @@ -111,13 +111,13 @@ invRightW empty = refl invRightW (prependLetter (ofLetter l) a x) rewrite +WAssoc a (inverseW a) (prependLetter (ofInv l) empty (wordEmpty refl)) | invRightW a = t where t : prepend (prependLetter (ofInv l) empty (wordEmpty refl)) (ofLetter l) ≡ empty - t with DecidableSet.eq decA l l + t with decA l l ... | inl refl = refl ... | inr l!=l = exFalso (l!=l refl) invRightW (prependLetter (ofInv l) a x) rewrite +WAssoc a (inverseW a) (prependLetter (ofLetter l) empty (wordEmpty refl)) | invRightW a = t where t : prepend (prependLetter (ofLetter l) empty (wordEmpty refl)) (ofInv l) ≡ empty - t with DecidableSet.eq decA l l + t with decA l l ... | inl refl = refl ... | inr l!=l = exFalso (l!=l refl) diff --git a/Groups/FreeGroup/Lemmas.agda b/Groups/FreeGroup/Lemmas.agda index 79e5d45..bcbd432 100644 --- a/Groups/FreeGroup/Lemmas.agda +++ b/Groups/FreeGroup/Lemmas.agda @@ -1,11 +1,13 @@ {-# OPTIONS --safe --warning=error #-} +open import Sets.Cardinality.Infinite.Definition open import Sets.EquivalenceRelations open import Setoids.Setoids open import Groups.FreeGroup.Definition open import Groups.Homomorphisms.Definition open import Groups.Definition open import Decidable.Sets +open import Numbers.Naturals.Semiring open import Numbers.Naturals.Order open import LogicalFormulae open import Semirings.Definition @@ -14,18 +16,116 @@ open import Groups.Isomorphisms.Definition open import Groups.FreeGroup.Word open import Groups.FreeGroup.Group open import Groups.FreeGroup.UniversalProperty +open import Groups.Abelian.Definition +open import Groups.QuotientGroup.Definition +open import Groups.Lemmas +open import Groups.Homomorphisms.Lemmas module Groups.FreeGroup.Lemmas {a : _} {A : Set a} (decA : DecidableSet A) where -freeGroupFunctorWellDefined : {b : _} {B : Set b} (decB : DecidableSet B) → {f : A → B} → Bijection f → GroupsIsomorphic (freeGroup decA) (freeGroup decB) -GroupsIsomorphic.isomorphism (freeGroupFunctorWellDefined decB {f} bij) = universalPropertyFunction decA (freeGroup decB) λ a → freeEmbedding decB (f a) -GroupIso.groupHom (GroupsIsomorphic.proof (freeGroupFunctorWellDefined decB {f} bij)) = universalPropertyHom decA (freeGroup decB) λ a → freeEmbedding decB (f a) -GroupIso.bij (GroupsIsomorphic.proof (freeGroupFunctorWellDefined decB {f} bij)) = {!!} +freeGroupNonAbelian : AbelianGroup (freeGroup decA) → (a : A) → Sg (A → True) Bijection +freeGroupNonAbelian record { commutative = commutative } a = (λ _ → record {}) , b + where + b : Bijection (λ _ → record {}) + Bijection.inj b {x} {y} _ with decA x y + ... | inl pr = pr + ... | inr neq = exFalso (neq (ofLetterInjective (prependLetterInjective' decA t))) + where + t : prependLetter {decA = decA} (ofLetter x) (prependLetter (ofLetter y) empty (wordEmpty refl)) (wordEnding (succIsPositive 0) refl) ≡ prependLetter (ofLetter y) (prependLetter (ofLetter x) empty (wordEmpty refl)) (wordEnding (succIsPositive 0) refl) + t = commutative {prependLetter (ofLetter x) empty (wordEmpty refl)} {prependLetter (ofLetter y) empty (wordEmpty refl)} + Bijection.surj b record {} = a , refl private - subgroupGeneratedBySquares : {c d : _} {C : Set c} {S : Setoid {c} {d} C} {_+_ : C → C → C} (G : Group S _+_) → Set - sub + iso : {b : _} {B : Set b} (decB : DecidableSet B) → {f : A → B} → Bijection f → ReducedWord decA → ReducedWord decB + iso decB {f} bij = universalPropertyFunction decA (freeGroup decB) λ a → freeEmbedding decB (f a) + isoHom : {b : _} {B : Set b} (decB : DecidableSet B) → {f : A → B} → (bij : Bijection f) → GroupHom (freeGroup decA) (freeGroup decB) (iso decB bij) + isoHom decB {f} bij = universalPropertyHom decA (freeGroup decB) λ a → iso decB bij (freeEmbedding decA a) + iso2 : {b : _} {B : Set b} (decB : DecidableSet B) → {f : A → B} → Bijection f → ReducedWord decB → ReducedWord decA + iso2 decB {f} bij = universalPropertyFunction decB (freeGroup decA) λ b → freeEmbedding decA (Invertible.inverse (bijectionImpliesInvertible bij) b) + + iso2Hom : {b : _} {B : Set b} (decB : DecidableSet B) → {f : A → B} → (bij : Bijection f) → GroupHom (freeGroup decB) (freeGroup decA) (iso2 decB bij) + iso2Hom decB {f} bij = universalPropertyHom decB (freeGroup decA) λ b → iso2 decB bij (freeEmbedding decB b) + + fixesF : {b : _} {B : Set b} (decB : DecidableSet B) → {f : A → B} → (bij : Bijection f) → (x : A) → iso2 decB bij (iso decB bij (freeEmbedding decA x)) ≡ freeEmbedding decA x + fixesF decB {f} bij x with Bijection.surj bij (f x) + ... | _ , pr rewrite Bijection.inj bij pr = refl + + fixesF' : {b : _} {B : Set b} (decB : DecidableSet B) → {f : A → B} → (bij : Bijection f) → (x : B) → iso decB bij (iso2 decB bij (freeEmbedding decB x)) ≡ freeEmbedding decB x + fixesF' decB {f} bij x with Bijection.surj bij x + ... | _ , pr rewrite pr = refl + + uniq : {b : _} {B : Set b} (decB : DecidableSet B) → {f : A → B} → (bij : Bijection f) → (x : ReducedWord decA) → x ≡ universalPropertyFunction decA (freeGroup decA) (λ x → iso2 decB bij (iso decB bij (freeEmbedding decA x))) x + uniq decB {f} bij x = universalPropertyUniqueness decA (freeGroup decA) (λ x → iso2 decB bij (iso decB bij (freeEmbedding decA x))) {id} (record { wellDefined = id ; groupHom = refl }) (fixesF decB bij) x + uniqLemm : {b : _} {B : Set b} (decB : DecidableSet B) → {f : A → B} → (bij : Bijection f) → (x : ReducedWord decA) → iso2 decB bij (iso decB bij x) ≡ universalPropertyFunction decA (freeGroup decA) (λ x → iso2 decB bij (iso decB bij (freeEmbedding decA x))) x + uniqLemm decB {f} bij x = universalPropertyUniqueness decA (freeGroup decA) (λ i → freeEmbedding decA (underlying (Bijection.surj bij (f i)))) {λ i → iso2 decB bij (iso decB bij i)} (groupHomsCompose (isoHom decB bij) (iso2Hom decB bij)) (λ _ → refl) x + uniq! : {b : _} {B : Set b} (decB : DecidableSet B) → {f : A → B} → (bij : Bijection f) → (x : ReducedWord decA) → iso2 decB bij (iso decB bij x) ≡ x + uniq! decB bij x = transitivity (uniqLemm decB bij x) (equalityCommutative (uniq decB bij x)) + + uniq' : {b : _} {B : Set b} (decB : DecidableSet B) → {f : A → B} → (bij : Bijection f) → (x : ReducedWord decB) → x ≡ universalPropertyFunction decB (freeGroup decB) (λ x → iso decB bij (iso2 decB bij (freeEmbedding decB x))) x + uniq' decB {f} bij x = universalPropertyUniqueness decB (freeGroup decB) (λ x → iso decB bij (iso2 decB bij (freeEmbedding decB x))) {id} (record { wellDefined = id ; groupHom = refl }) (fixesF' decB bij) x + uniq'Lemm : {b : _} {B : Set b} (decB : DecidableSet B) → {f : A → B} → (bij : Bijection f) → (x : ReducedWord decB) → iso decB bij (iso2 decB bij x) ≡ universalPropertyFunction decB (freeGroup decB) (λ x → iso decB bij (iso2 decB bij (freeEmbedding decB x))) x + uniq'Lemm decB {f} bij x = universalPropertyUniqueness decB (freeGroup decB) (λ i → freeEmbedding decB (f (Invertible.inverse (bijectionImpliesInvertible bij) i))) {λ i → iso decB bij (iso2 decB bij i)} (groupHomsCompose (iso2Hom decB bij) (isoHom decB bij)) (λ _ → refl) x + uniq'! : {b : _} {B : Set b} (decB : DecidableSet B) → {f : A → B} → (bij : Bijection f) → (x : ReducedWord decB) → iso decB bij (iso2 decB bij x) ≡ x + uniq'! decB bij x = transitivity (uniq'Lemm decB bij x) (equalityCommutative (uniq' decB bij x)) + + inBijection : {b : _} {B : Set b} (decB : DecidableSet B) {f : A → B} (bij : Bijection f) → Bijection (iso decB bij) + inBijection decB bij = invertibleImpliesBijection (record { inverse = iso2 decB bij ; isLeft = uniq'! decB bij ; isRight = uniq! decB bij }) + +freeGroupFunctorWellDefined : {b : _} {B : Set b} (decB : DecidableSet B) → {f : A → B} → Bijection f → GroupsIsomorphic (freeGroup decA) (freeGroup decB) +GroupsIsomorphic.isomorphism (freeGroupFunctorWellDefined decB {f} bij) = iso decB bij +GroupIso.groupHom (GroupsIsomorphic.proof (freeGroupFunctorWellDefined decB {f} bij)) = universalPropertyHom decA (freeGroup decB) λ a → freeEmbedding decB (f a) +SetoidInjection.wellDefined (SetoidBijection.inj (GroupIso.bij (GroupsIsomorphic.proof (freeGroupFunctorWellDefined decB {f} bij)))) refl = refl +SetoidInjection.injective (SetoidBijection.inj (GroupIso.bij (GroupsIsomorphic.proof (freeGroupFunctorWellDefined decB {f} bij)))) {x} {y} pr = Bijection.inj (inBijection decB bij) pr +SetoidSurjection.wellDefined (SetoidBijection.surj (GroupIso.bij (GroupsIsomorphic.proof (freeGroupFunctorWellDefined decB {f} bij)))) refl = refl +SetoidSurjection.surjective (SetoidBijection.surj (GroupIso.bij (GroupsIsomorphic.proof (freeGroupFunctorWellDefined decB {f} bij)))) {x} = Bijection.surj (inBijection decB bij) x + +{- freeGroupFunctorInjective : {b : _} {B : Set b} (decB : DecidableSet B) → GroupsIsomorphic (freeGroup decA) (freeGroup decB) → Sg (A → B) (λ f → Bijection f) freeGroupFunctorInjective decB iso = {!!} + +everyGroupQuotientOfFreeGroup : {b : _} → (S : Setoid {a} {b} A) → {_+_ : A → A → A} → (G : Group S _+_) → GroupsIsomorphic G (quotientGroupByHom (freeGroup decA) (universalPropertyHom decA {!!} {!!})) +everyGroupQuotientOfFreeGroup = {!!} + +everyFGGroupQuotientOfFGFreeGroup : {!!} +everyFGGroupQuotientOfFGFreeGroup = {!!} + +freeGroupTorsionFree : {!!} +freeGroupTorsionFree = {!!} +-} + +private + mapNToGrp : (a : A) → (n : ℕ) → ReducedWord decA + mapNToGrpLen : (a : A) → (n : ℕ) → wordLength decA (mapNToGrp a n) ≡ n + mapNToGrpFirstLetter : (a : A) → (n : ℕ) → .(pr : 0