Free groups #
This file defines free groups over a type. Furthermore, it is shown that the free group construction
is an instance of a monad. For the result that FreeGroup
is the left adjoint to the forgetful
functor from groups to types, see Algebra/Category/Group/Adjunctions
.
Main definitions #
FreeGroup
/FreeAddGroup
: the free group (resp. free additive group) associated to a typeα
defined as the words overa : α × Bool
modulo the relationa * x * x⁻¹ * b = a * b
.FreeGroup.mk
/FreeAddGroup.mk
: the canonical quotient mapList (α × Bool) → FreeGroup α
.FreeGroup.of
/FreeAddGroup.of
: the canonical injectionα → FreeGroup α
.FreeGroup.lift f
/FreeAddGroup.lift
: the canonical group homomorphismFreeGroup α →* G
given a groupG
and a functionf : α → G
.
Main statements #
FreeGroup.Red.church_rosser
/FreeAddGroup.Red.church_rosser
: The Church-Rosser theorem for word reduction (also known as Newman's diamond lemma).FreeGroup.freeGroupUnitEquivInt
: The free group over the one-point type is isomorphic to the integers.- The free group construction is an instance of a monad.
Implementation details #
First we introduce the one step reduction relation FreeGroup.Red.Step
:
w * x * x⁻¹ * v ~> w * v
, its reflexive transitive closure FreeGroup.Red.trans
and prove that its join is an equivalence relation. Then we introduce FreeGroup α
as a quotient
over FreeGroup.Red.Step
.
For the additive version we introduce the same relation under a different name so that we can distinguish the quotient types more easily.
Tags #
free group, Newman's diamond lemma, Church-Rosser theorem
Predicate asserting that the word w₁
can be reduced to w₂
in one step, i.e. there are words
w₃ w₄
and letter x
such that w₁ = w₃xx⁻¹w₄
and w₂ = w₃w₄
Predicate asserting that the word w₁
can be reduced to w₂
in one step, i.e. there
are words w₃ w₄
and letter x
such that w₁ = w₃ + x + (-x) + w₄
and w₂ = w₃w₄
Church-Rosser theorem for word reduction: If w1 w2 w3
are words such that w1
reduces
to w2
and w3
respectively, then there is a word w4
such that w2
and w3
reduce to w4
respectively. This is also known as Newman's diamond lemma.
Church-Rosser theorem for word reduction: If w1 w2 w3
are words such that w1
reduces
to w2
and w3
respectively, then there is a word w4
such that w2
and w3
reduce to w4
respectively. This is also known as Newman's diamond lemma.
The empty word []
only reduces to itself.
The empty word []
only reduces to itself.
If x
is a letter and w
is a word such that xw
reduces to the empty word, then w
reduces
to x⁻¹
If x
is a letter and w
is a word such that x + w
reduces to the empty word, then w
reduces to -x
.
If x
and y
are distinct letters and w₁ w₂
are words such that xw₁
reduces to yw₂
, then
w₁
reduces to x⁻¹yw₂
.
If x
and y
are distinct letters and w₁ w₂
are words such that x + w₁
reduces
to y + w₂
, then w₁
reduces to -x + y + w₂
.
If w₁ w₂
are words such that w₁
reduces to w₂
, then w₂
is a sublist of w₁
.
If w₁ w₂
are words such that w₁
reduces to w₂
, then w₂
is a sublist of
w₁
.
The free additive group over a type, i.e. the words formed by the elements of the type and their formal inverses, quotient by one step reduction.
Equations
- FreeAddGroup α = Quot FreeAddGroup.Red.Step
Instances For
The canonical map from list (α × bool)
to the free additive group on α
.
Equations
- FreeAddGroup.mk L = Quot.mk FreeAddGroup.Red.Step L
Instances For
Equations
- FreeGroup.instOne = { one := FreeGroup.mk [] }
Equations
- FreeAddGroup.instZero = { zero := FreeAddGroup.mk [] }
Equations
- FreeAddGroup.instInhabited = { default := 0 }
Equations
- FreeGroup.instMul = { mul := fun (x y : FreeGroup α) => Quot.liftOn x (fun (L₁ : List (α × Bool)) => Quot.liftOn y (fun (L₂ : List (α × Bool)) => FreeGroup.mk (L₁ ++ L₂)) ⋯) ⋯ }
Equations
- One or more equations did not get rendered due to their size.
Equations
- FreeAddGroup.instAddGroup = AddGroup.mk ⋯
of
is the canonical injection from the type to the free group over that type by sending each
element to the equivalence class of the letter that is the element.
Equations
- FreeGroup.of x = FreeGroup.mk [(x, true)]
Instances For
of
is the canonical injection from the type to the free group over that type
by sending each element to the equivalence class of the letter that is the element.
Equations
- FreeAddGroup.of x = FreeAddGroup.mk [(x, true)]
Instances For
The canonical map from the type to the free group is an injection.
The canonical map from the type to the additive free group is an injection.
Given f : α → β
with β
an additive group, the canonical map
list (α × bool) → β
Equations
Instances For
If β
is a group, then any function from α
to β
extends uniquely to a group homomorphism
from the free group over α
to β
Equations
- FreeGroup.lift = { toFun := fun (f : α → β) => MonoidHom.mk' (Quot.lift (FreeGroup.Lift.aux f) ⋯) ⋯, invFun := fun (g : FreeGroup α →* β) => ⇑g ∘ FreeGroup.of, left_inv := ⋯, right_inv := ⋯ }
Instances For
If β
is an additive group, then any function from α
to β
extends uniquely to an
additive group homomorphism from the free additive group over α
to β
Equations
- One or more equations did not get rendered due to their size.
Instances For
Two homomorphisms out of a free additive group are equal if they are equal on generators. See note [partially-applied ext lemmas].
Two homomorphisms out of a free group are equal if they are equal on generators.
See note [partially-applied ext lemmas].
Any function from α
to β
extends uniquely to a group homomorphism from the free group over
α
to the free group over β
.
Equations
- FreeGroup.map f = MonoidHom.mk' (Quot.map (List.map fun (x : α × Bool) => (f x.1, x.2)) ⋯) ⋯
Instances For
Any function from α
to β
extends uniquely to an additive group homomorphism from
the additive free group over α
to the additive free group over β
.
Equations
- FreeAddGroup.map f = AddMonoidHom.mk' (Quot.map (List.map fun (x : α × Bool) => (f x.1, x.2)) ⋯) ⋯
Instances For
Equivalent types give rise to multiplicatively equivalent free groups.
The converse can be found in GroupTheory.FreeAbelianGroupFinsupp
,
as Equiv.of_freeGroupEquiv
Equations
- FreeGroup.freeGroupCongr e = { toFun := ⇑(FreeGroup.map ⇑e), invFun := ⇑(FreeGroup.map ⇑e.symm), left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯ }
Instances For
Equivalent types give rise to additively equivalent additive free groups.
Equations
- FreeAddGroup.freeAddGroupCongr e = { toFun := ⇑(FreeAddGroup.map ⇑e), invFun := ⇑(FreeAddGroup.map ⇑e.symm), left_inv := ⋯, right_inv := ⋯, map_add' := ⋯ }
Instances For
If α
is a group, then any function from α
to α
extends uniquely to a homomorphism from the
free group over α
to α
. This is the multiplicative version of FreeGroup.sum
.
Equations
- FreeGroup.prod = FreeGroup.lift id
Instances For
If α
is an additive group, then any function from α
to α
extends uniquely to an
additive homomorphism from the additive free group over α
to α
.
Equations
- FreeAddGroup.sum = FreeAddGroup.lift id
Instances For
The bijection between the additive free group on the empty type, and a type with one element.
Equations
- One or more equations did not get rendered due to their size.