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 Mathlib/Algebra/Category/Grp/Adjunctions.lean.
Main definitions #
FreeGroup/FreeAddGroup: the free group (resp. free additive group) associated to a typeαdefined as the words overa : α × Boolmodulo 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 α →* Ggiven a groupGand 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
Reflexive-transitive closure of Red.Step
Instances For
Reflexive-transitive closure of Red.Step
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₃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.
A letter only reduces to itself.
A letter 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₁.
Reduced words #
Predicate asserting that the word L admits no reduction steps, i.e., no two neighboring
elements of the word cancel.
Instances For
Predicate asserting the word L admits no reduction steps,
i.e., no two neighboring elements of the word cancel.
Instances For
If α is a type, then FreeGroup α is the free group generated by α.
This is a group equipped with a function FreeGroup.of : α → FreeGroup α which has
the following universal property: if G is any group, and f : α → G is any function,
then this function is the composite of FreeGroup.of and a unique group homomorphism
FreeGroup.lift f : FreeGroup α →* G.
A typical element of FreeGroup α is a formal product of
elements of α and their formal inverses, quotient by reduction.
For example if x and y are terms of type α then x⁻¹ * y * y * x * y⁻¹ is a
"typical" element of FreeGroup α. In particular if α is empty
then FreeGroup α is isomorphic to the trivial group, and if α has one term
then FreeGroup α is isomorphic to Multiplicative ℤ.
If α has two or more terms then FreeGroup α is not commutative.
Instances For
If α is a type, then FreeAddGroup α is the free additive group generated by α.
This is a group equipped with a function FreeAddGroup.of : α → FreeAddGroup α which has
the following universal property: if G is any group, and f : α → G is any function,
then this function is the composite of FreeAddGroup.of and a unique group homomorphism
FreeAddGroup.lift f : FreeAddGroup α →+ G.
A typical element of FreeAddGroup α is a formal sum of
elements of α and their formal inverses, quotient by reduction.
For example if x and y are terms of type α then -x + y + y + x + -y is a
"typical" element of FreeAddGroup α. In particular if α is empty
then FreeAddGroup α is isomorphic to the trivial group, and if α has one term
then FreeAddGroup α is isomorphic to ℤ.
If α has two or more terms then FreeAddGroup α is not commutative.
Instances For
The canonical map from List (α × Bool) to the free group on α.
Instances For
The canonical map from List (α × Bool) to the free additive group on α.
Instances For
Transform a word representing a free group element into a word representing its inverse.
Instances For
Transform a word representing a free group element into a word representing its negative.
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.
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.
Instances For
Two homomorphisms out of a free additive group are equal if they are equal on generators. See note [partially-applied ext lemmas].
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 β a group, the canonical map List (α × Bool) → β
Instances For
Given f : α → β with β an additive group, the canonical map
List (α × Bool) → β
Instances For
If β is a group, then any function from α to β extends uniquely to a group homomorphism
from the free group over α to β
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 β
Instances For
Any function from α to β extends uniquely to a group homomorphism from the free group over
α to the free group over β.
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 β.
Instances For
If α and β are arbitrary types and there is a surjection between them,
then the induced map on their free groups is also surjective.
If α and β are arbitrary types and there is a surjection between them,
then the induced map on their additive free groups is also surjective.
If α and β are arbitrary types and there is an injection between them,
then the induced map on their free groups is also injective.
If α and β are arbitrary types and there is an injection between them,
then the induced map on their additive free groups is also injective.
If α and β are arbitrary types and there is a bijection between them,
then the induced map on their free groups is also bijective.
If α and β are arbitrary types and there is a bijection between them,
then the induced map on their additive free groups is also bijective.
Equivalent types give rise to multiplicatively equivalent free groups.
The converse can be found in Mathlib/GroupTheory/FreeGroup/GeneratorEquiv.lean, as
Equiv.ofFreeGroupEquiv.
Instances For
Equivalent types give rise to additively equivalent additive free groups.
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.
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 α.
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.
Instances For
The bijection between the free group on the empty type, and a type with one element.
Instances For
The bijection between the additive free group on the empty type, and a type with one element.
Instances For
The bijection between the free group on a singleton, and the integers.
Instances For
The bijection between the free group on a unique type and the integers.
Instances For
The isomorphism between the free group on a unique type and the integers.
Instances For
A free group over one generator is an instance of a cyclic group.
The isomorphism between the free additive group on a unique type and the integers.
Instances For
A free additive group over one generator is an instance of a cyclic group.