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
Equations
- (_ : motive x✝¹ x✝ x) = (_ : motive x✝¹ x✝ x)
Instances For
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₄
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₄
Equations
- (_ : motive x) = (_ : motive x)
Instances For
Equations
- (_ : motive x) = (_ : motive x)
Instances For
Equations
- (_ : motive x✝⁷ x✝⁶ x✝⁵ x✝⁴ x✝³ x✝² x✝¹ x✝ x) = (_ : motive x✝⁷ x✝⁶ x✝⁵ x✝⁴ x✝³ x✝² x✝¹ x✝ x)
Instances For
Equations
- (_ : motive x✝⁵ x✝⁴ x✝³ x✝² x✝¹ x✝ x) = (_ : motive x✝⁵ x✝⁴ x✝³ x✝² x✝¹ x✝ x)
Instances For
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.
Equations
- (_ : motive b c x hab hac) = (_ : motive b c x hab hac)
Instances For
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.
Equations
- (_ : motive x) = (_ : motive x)
Instances For
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 x + w
reduces to the empty word, then w
reduces to -x
.
Equations
- (_ : motive x) = (_ : motive x)
Instances For
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
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 x
and y
are distinct letters and w₁ w₂
are words such that xw₁
reduces to yw₂
, then
w₁
reduces to x⁻¹yw₂
.
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
- FreeAddGroup.instZeroFreeAddGroup = { zero := FreeAddGroup.mk [] }
Equations
- FreeGroup.instOneFreeGroup = { one := FreeGroup.mk [] }
Equations
- FreeAddGroup.instInhabitedFreeAddGroup = { default := 0 }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- FreeAddGroup.instAddGroupFreeAddGroup = AddGroup.mk (_ : ∀ (a : FreeAddGroup α), -a + a = 0)
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
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
The canonical map from the type to the additive free group is an injection.
Equations
- (_ : motive x) = (_ : motive x)
Instances For
The canonical map from the type to the free group is an injection.
Given f : α → β
with β
an additive group, the canonical map
list (α × bool) → β
Equations
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 an additive group homomorphism from
the additive free group over α
to the additive free group over β
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equivalent types give rise to additively equivalent additive free groups.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equivalent types give rise to multiplicatively equivalent free groups.
The converse can be found in GroupTheory.FreeAbelianGroupFinsupp
,
as Equiv.of_freeGroupEquiv
Equations
- One or more equations did not get rendered due to their size.
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
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 a group, then any function from α
to α
extends uniquely to a homomorphism from the
free group over α
to α
. This is the additive version of prod
.
Equations
- FreeGroup.sum x = FreeGroup.prod x
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.
Instances For
Equations
- (_ : motive x) = (_ : motive x)
Instances For
Equations
- FreeAddGroup.instMonadFreeAddGroup = Monad.mk
Equations
- FreeGroup.instMonadFreeGroup = Monad.mk
The maximal reduction of a word. It is computable iff α
has decidable equality.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The maximal reduction of a word. It is computable
iff α
has decidable equality.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The first theorem that characterises the function reduce
: a word reduces to its
maximal reduction.
The first theorem that characterises the function reduce
: a word reduces to its maximal
reduction.
The second theorem that characterises the function reduce
: the maximal reduction of
a word only reduces to itself.
The second theorem that characterises the function reduce
: the maximal reduction of a word
only reduces to itself.
reduce
is idempotent, i.e. the maximal reduction of the maximal
reduction of a word is the maximal reduction of the word.
reduce
is idempotent, i.e. the maximal reduction of the maximal reduction of a word is the
maximal reduction of the word.
Equations
- (_ : motive x) = (_ : motive x)
Instances For
If a word reduces to another word, then they have a common maximal reduction.
If a word reduces to another word, then they have a common maximal reduction.
Alias of FreeGroup.reduce.eq_of_red
.
If a word reduces to another word, then they have a common maximal reduction.
Alias of FreeAddGroup.reduce.eq_of_red
.
If a word reduces to another word, then they have a common maximal reduction.
If two words correspond to the same element in the additive free group, then they have a common maximal reduction. This is the proof that the function that sends an element of the free group to its maximal reduction is well-defined.
Equations
- (_ : motive x) = (_ : motive x)
Instances For
If two words correspond to the same element in the free group, then they have a common maximal reduction. This is the proof that the function that sends an element of the free group to its maximal reduction is well-defined.
If two words have a common maximal reduction, then they correspond to the same element in the additive free group.
If two words have a common maximal reduction, then they correspond to the same element in the free group.
A word and its maximal reduction correspond to the same element of the additive free group.
A word and its maximal reduction correspond to the same element of the free group.
If words w₁ w₂
are such that w₁
reduces to w₂
, then w₂
reduces to the maximal
reduction of w₁
.
If words w₁ w₂
are such that w₁
reduces to w₂
, then w₂
reduces to the maximal reduction
of w₁
.
The function that sends an element of the additive free group to its maximal reduction.
Equations
- FreeAddGroup.toWord = Quot.lift FreeAddGroup.reduce (_ : ∀ (_L₁ _L₂ : List (α × Bool)), FreeAddGroup.Red.Step _L₁ _L₂ → FreeAddGroup.reduce _L₁ = FreeAddGroup.reduce _L₂)
Instances For
The function that sends an element of the free group to its maximal reduction.
Equations
- FreeGroup.toWord = Quot.lift FreeGroup.reduce (_ : ∀ (_L₁ _L₂ : List (α × Bool)), FreeGroup.Red.Step _L₁ _L₂ → FreeGroup.reduce _L₁ = FreeGroup.reduce _L₂)
Instances For
Constructive Church-Rosser theorem (compare church_rosser
).
Equations
- FreeAddGroup.reduce.churchRosser H12 H13 = { val := FreeAddGroup.reduce L₁, property := (_ : FreeAddGroup.Red L₂ (FreeAddGroup.reduce L₁) ∧ FreeAddGroup.Red L₃ (FreeAddGroup.reduce L₁)) }
Instances For
Constructive Church-Rosser theorem (compare church_rosser
).
Equations
- FreeGroup.reduce.churchRosser H12 H13 = { val := FreeGroup.reduce L₁, property := (_ : FreeGroup.Red L₂ (FreeGroup.reduce L₁) ∧ FreeGroup.Red L₃ (FreeGroup.reduce L₁)) }
Instances For
Equations
- FreeAddGroup.instDecidableEqFreeAddGroup = Function.Injective.decidableEq (_ : Function.Injective FreeAddGroup.toWord)
Equations
- FreeGroup.instDecidableEqFreeGroup = Function.Injective.decidableEq (_ : Function.Injective FreeGroup.toWord)
Equations
- One or more equations did not get rendered due to their size.
- FreeGroup.Red.decidableRel [] [] = isTrue (_ : FreeGroup.Red [] [])
- FreeGroup.Red.decidableRel [] (_hd2 :: _tl2) = isFalse (_ : FreeGroup.Red [] (_hd2 :: _tl2) → List.noConfusionType False (_hd2 :: _tl2) [])
A list containing every word that w₁
reduces to.
Equations
- FreeGroup.Red.enum L₁ = List.filter (fun (b : List (α × Bool)) => decide (FreeGroup.Red L₁ b)) (List.sublists L₁)
Instances For
Equations
- One or more equations did not get rendered due to their size.
The length of reduced words provides a norm on an additive free group.
Equations
Instances For
The length of reduced words provides a norm on a free group.