# Documentation

Mathlib.GroupTheory.FreeGroup

# 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 over a : α × Bool modulo the relation a * x * x⁻¹ * b = a * b.
• FreeGroup.mk/FreeAddGroup.mk: the canonical quotient map List (α × Bool) → FreeGroup α.
• FreeGroup.of/FreeAddGroup.of: the canonical injection α → FreeGroup α.
• FreeGroup.lift f/FreeAddGroup.lift: the canonical group homomorphism FreeGroup α →* G given a group G and a function f : α → 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

inductive FreeAddGroup.Red.Step {α : Type u} :
List ()List ()Prop

Reduction step for the additive free group relation: w + x + (-x) + v ~> w + v

Instances For
inductive FreeGroup.Red.Step {α : Type u} :
List ()List ()Prop

Reduction step for the multiplicative free group relation: w * x * x⁻¹ * v ~> w * v

Instances For
def FreeAddGroup.Red {α : Type u} :
List ()List ()Prop

Reflexive-transitive closure of Red.Step

Instances For
def FreeGroup.Red {α : Type u} :
List ()List ()Prop

Reflexive-transitive closure of Red.Step

Instances For
theorem FreeAddGroup.Red.refl {α : Type u} {L : List ()} :
theorem FreeGroup.Red.refl {α : Type u} {L : List ()} :
theorem FreeAddGroup.Red.trans {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} :
theorem FreeGroup.Red.trans {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} :
FreeGroup.Red L₁ L₂FreeGroup.Red L₂ L₃FreeGroup.Red L₁ L₃
abbrev FreeAddGroup.Red.Step.length.match_1 {α : Type u_1} (motive : (x x_1 : List ()) → Prop) :
(x x_1 : List ()) → (x_2 : ) → ((L1 L2 : List ()) → (x : α) → (b : Bool) → motive (L1 ++ (x, b) :: (x, !b) :: L2) (L1 ++ L2) (_ : FreeAddGroup.Red.Step (L1 ++ (x, b) :: (x, !b) :: L2) (L1 ++ L2))) → motive x x_1 x_2
Instances For
theorem FreeAddGroup.Red.Step.length {α : Type u} {L₁ : List ()} {L₂ : List ()} :
+ 2 =

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₄

theorem FreeGroup.Red.Step.length {α : Type u} {L₁ : List ()} {L₂ : List ()} :
+ 2 =

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₄

@[simp]
theorem FreeAddGroup.Red.Step.not_rev {α : Type u} {L₁ : List ()} {L₂ : List ()} {x : α} {b : Bool} :
FreeAddGroup.Red.Step (L₁ ++ (x, !b) :: (x, b) :: L₂) (L₁ ++ L₂)
@[simp]
theorem FreeGroup.Red.Step.not_rev {α : Type u} {L₁ : List ()} {L₂ : List ()} {x : α} {b : Bool} :
FreeGroup.Red.Step (L₁ ++ (x, !b) :: (x, b) :: L₂) (L₁ ++ L₂)
@[simp]
theorem FreeAddGroup.Red.Step.cons_not {α : Type u} {L : List ()} {x : α} {b : Bool} :
FreeAddGroup.Red.Step ((x, b) :: (x, !b) :: L) L
@[simp]
theorem FreeGroup.Red.Step.cons_not {α : Type u} {L : List ()} {x : α} {b : Bool} :
FreeGroup.Red.Step ((x, b) :: (x, !b) :: L) L
@[simp]
theorem FreeAddGroup.Red.Step.cons_not_rev {α : Type u} {L : List ()} {x : α} {b : Bool} :
FreeAddGroup.Red.Step ((x, !b) :: (x, b) :: L) L
@[simp]
theorem FreeGroup.Red.Step.cons_not_rev {α : Type u} {L : List ()} {x : α} {b : Bool} :
FreeGroup.Red.Step ((x, !b) :: (x, b) :: L) L
abbrev FreeAddGroup.Red.Step.append_left.match_1 {α : Type u_1} (motive : List ()(x x_1 : List ()) → Prop) :
(x x_1 x_2 : List ()) → (x_3 : FreeAddGroup.Red.Step x_1 x_2) → ((x L₁ L₂ : List ()) → (x_4 : α) → (b : Bool) → motive x (L₁ ++ (x_4, b) :: (x_4, !b) :: L₂) (L₁ ++ L₂) (_ : FreeAddGroup.Red.Step (L₁ ++ (x_4, b) :: (x_4, !b) :: L₂) (L₁ ++ L₂))) → motive x x_1 x_2 x_3
Instances For
theorem FreeAddGroup.Red.Step.append_left {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} :
FreeAddGroup.Red.Step (L₁ ++ L₂) (L₁ ++ L₃)
theorem FreeGroup.Red.Step.append_left {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} :
FreeGroup.Red.Step (L₁ ++ L₂) (L₁ ++ L₃)
theorem FreeAddGroup.Red.Step.cons {α : Type u} {L₁ : List ()} {L₂ : List ()} {x : } (H : ) :
FreeAddGroup.Red.Step (x :: L₁) (x :: L₂)
theorem FreeGroup.Red.Step.cons {α : Type u} {L₁ : List ()} {L₂ : List ()} {x : } (H : ) :
FreeGroup.Red.Step (x :: L₁) (x :: L₂)
abbrev FreeAddGroup.Red.Step.append_right.match_1 {α : Type u_1} (motive : (x x_1 : List ()) → List ()Prop) :
(x x_1 x_2 : List ()) → (x_3 : ) → ((x L₁ L₂ : List ()) → (x_4 : α) → (b : Bool) → motive (L₁ ++ (x_4, b) :: (x_4, !b) :: L₂) (L₁ ++ L₂) x (_ : FreeAddGroup.Red.Step (L₁ ++ (x_4, b) :: (x_4, !b) :: L₂) (L₁ ++ L₂))) → motive x x_1 x_2 x_3
Instances For
theorem FreeAddGroup.Red.Step.append_right {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} :
FreeAddGroup.Red.Step (L₁ ++ L₃) (L₂ ++ L₃)
theorem FreeGroup.Red.Step.append_right {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} :
FreeGroup.Red.Step (L₁ ++ L₃) (L₂ ++ L₃)
theorem FreeAddGroup.Red.not_step_nil {α : Type u} {L : List ()} :
theorem FreeGroup.Red.not_step_nil {α : Type u} {L : List ()} :
theorem FreeAddGroup.Red.Step.cons_left_iff {α : Type u} {L₁ : List ()} {L₂ : List ()} {a : α} {b : Bool} :
FreeAddGroup.Red.Step ((a, b) :: L₁) L₂ (L, L₂ = (a, b) :: L) L₁ = (a, !b) :: L₂
theorem FreeGroup.Red.Step.cons_left_iff {α : Type u} {L₁ : List ()} {L₂ : List ()} {a : α} {b : Bool} :
FreeGroup.Red.Step ((a, b) :: L₁) L₂ (L, L₂ = (a, b) :: L) L₁ = (a, !b) :: L₂
theorem FreeAddGroup.Red.not_step_singleton {α : Type u} {L : List ()} {p : } :
abbrev FreeAddGroup.Red.not_step_singleton.match_1 {α : Type u_1} (motive : Prop) :
(x : ) → ((a : α) → (b : Bool) → motive (a, b)) → motive x
Instances For
theorem FreeGroup.Red.not_step_singleton {α : Type u} {L : List ()} {p : } :
theorem FreeAddGroup.Red.Step.cons_cons_iff {α : Type u} {L₁ : List ()} {L₂ : List ()} {p : } :
FreeAddGroup.Red.Step (p :: L₁) (p :: L₂)
theorem FreeGroup.Red.Step.cons_cons_iff {α : Type u} {L₁ : List ()} {L₂ : List ()} {p : } :
FreeGroup.Red.Step (p :: L₁) (p :: L₂)
abbrev FreeAddGroup.Red.Step.append_left_iff.match_1 {α : Type u_1} (motive : List ()Prop) :
(x : List ()) → (Unitmotive []) → ((p : ) → (l : List ()) → motive (p :: l)) → motive x
Instances For
theorem FreeAddGroup.Red.Step.append_left_iff {α : Type u} {L₁ : List ()} {L₂ : List ()} (L : List ()) :
FreeAddGroup.Red.Step (L ++ L₁) (L ++ L₂)
theorem FreeGroup.Red.Step.append_left_iff {α : Type u} {L₁ : List ()} {L₂ : List ()} (L : List ()) :
FreeGroup.Red.Step (L ++ L₁) (L ++ L₂)
abbrev FreeAddGroup.Red.Step.diamond_aux.match_2 {α : Type u_1} (x3 : α) (b3 : Bool) (tl : List ()) :
(x : List ()) → (x4 : α) → (b4 : Bool) → (tl2 x_1 : List ()) → (x_2 : α) → (x_3 : Bool) → (x_4 : α) → ∀ (x_5 : Bool) (motive : (x3, b3) = (x4, b4) List.append tl ((x_2, x_3) :: (x_2, !x_3) :: x) = List.append tl2 ((x_4, x_5) :: (x_4, !x_5) :: x_1)Prop) (x_6 : (x3, b3) = (x4, b4) List.append tl ((x_2, x_3) :: (x_2, !x_3) :: x) = List.append tl2 ((x_4, x_5) :: (x_4, !x_5) :: x_1)), (∀ (H1 : (x3, b3) = (x4, b4)) (H2 : List.append tl ((x_2, x_3) :: (x_2, !x_3) :: x) = List.append tl2 ((x_4, x_5) :: (x_4, !x_5) :: x_1)), motive (_ : (x3, b3) = (x4, b4) List.append tl ((x_2, x_3) :: (x_2, !x_3) :: x) = List.append tl2 ((x_4, x_5) :: (x_4, !x_5) :: x_1))) → motive x_6
Instances For
abbrev FreeAddGroup.Red.Step.diamond_aux.match_3 {α : Type u_1} (motive : (x x_1 x_2 x_3 : List ()) → (x_4 : α) → (x_5 : Bool) → (x_6 : α) → (x_7 : Bool) → x ++ (x_4, x_5) :: (x_4, !x_5) :: x_1 = x_2 ++ (x_6, x_7) :: (x_6, !x_7) :: x_3Prop) :
(x x_1 x_2 x_3 : List ()) → (x_4 : α) → (x_5 : Bool) → (x_6 : α) → (x_7 : Bool) → (x_8 : x ++ (x_4, x_5) :: (x_4, !x_5) :: x_1 = x_2 ++ (x_6, x_7) :: (x_6, !x_7) :: x_3) → ((x x_9 : List ()) → (x_10 : α) → (x_11 : Bool) → (x_12 : α) → (x_13 : Bool) → (H : [] ++ (x_10, x_11) :: (x_10, !x_11) :: x = [] ++ (x_12, x_13) :: (x_12, !x_13) :: x_9) → motive [] x [] x_9 x_10 x_11 x_12 x_13 H) → ((x : List ()) → (x3 : α) → (b3 : Bool) → (x_9 : List ()) → (x_10 : α) → (x_11 : Bool) → (x_12 : α) → (x_13 : Bool) → (H : [] ++ (x_10, x_11) :: (x_10, !x_11) :: x = [(x3, b3)] ++ (x_12, x_13) :: (x_12, !x_13) :: x_9) → motive [] x [(x3, b3)] x_9 x_10 x_11 x_12 x_13 H) → ((x3 : α) → (b3 : Bool) → (x x_9 : List ()) → (x_10 : α) → (x_11 : Bool) → (x_12 : α) → (x_13 : Bool) → (H : [(x3, b3)] ++ (x_10, x_11) :: (x_10, !x_11) :: x = [] ++ (x_12, x_13) :: (x_12, !x_13) :: x_9) → motive [(x3, b3)] x [] x_9 x_10 x_11 x_12 x_13 H) → ((x : List ()) → (x3 : α) → (b3 : Bool) → (x4 : α) → (b4 : Bool) → (tl x_9 : List ()) → (x_10 : α) → (x_11 : Bool) → (x_12 : α) → (x_13 : Bool) → (H : [] ++ (x_10, x_11) :: (x_10, !x_11) :: x = (x3, b3) :: (x4, b4) :: tl ++ (x_12, x_13) :: (x_12, !x_13) :: x_9) → motive [] x ((x3, b3) :: (x4, b4) :: tl) x_9 x_10 x_11 x_12 x_13 H) → ((x3 : α) → (b3 : Bool) → (x4 : α) → (b4 : Bool) → (tl x x_9 : List ()) → (x_10 : α) → (x_11 : Bool) → (x_12 : α) → (x_13 : Bool) → (H : (x3, b3) :: (x4, b4) :: tl ++ (x_10, x_11) :: (x_10, !x_11) :: x = [] ++ (x_12, x_13) :: (x_12, !x_13) :: x_9) → motive ((x3, b3) :: (x4, b4) :: tl) x [] x_9 x_10 x_11 x_12 x_13 H) → ((x3 : α) → (b3 : Bool) → (tl x : List ()) → (x4 : α) → (b4 : Bool) → (tl2 x_9 : List ()) → (x_10 : α) → (x_11 : Bool) → (x_12 : α) → (x_13 : Bool) → (H : (x3, b3) :: tl ++ (x_10, x_11) :: (x_10, !x_11) :: x = (x4, b4) :: tl2 ++ (x_12, x_13) :: (x_12, !x_13) :: x_9) → motive ((x3, b3) :: tl) x ((x4, b4) :: tl2) x_9 x_10 x_11 x_12 x_13 H) → motive x x_1 x_2 x_3 x_4 x_5 x_6 x_7 x_8
Instances For
abbrev FreeAddGroup.Red.Step.diamond_aux.match_1 {α : Type u_1} (tl : List ()) :
∀ (x tl2 x_1 : List ()) (motive : (tl ++ x = tl2 ++ x_1 L₅, FreeAddGroup.Red.Step (tl ++ x) L₅ FreeAddGroup.Red.Step (tl2 ++ x_1) L₅) → Prop) (x_2 : tl ++ x = tl2 ++ x_1 L₅, FreeAddGroup.Red.Step (tl ++ x) L₅ FreeAddGroup.Red.Step (tl2 ++ x_1) L₅), (∀ (H3 : tl ++ x = tl2 ++ x_1), motive (_ : tl ++ x = tl2 ++ x_1 L₅, FreeAddGroup.Red.Step (tl ++ x) L₅ FreeAddGroup.Red.Step (tl2 ++ x_1) L₅)) → (∀ (L₅ : List ()) (H3 : FreeAddGroup.Red.Step (tl ++ x) L₅) (H4 : FreeAddGroup.Red.Step (tl2 ++ x_1) L₅), motive (_ : tl ++ x = tl2 ++ x_1 L₅, FreeAddGroup.Red.Step (tl ++ x) L₅ FreeAddGroup.Red.Step (tl2 ++ x_1) L₅)) → motive x_2
Instances For
theorem FreeAddGroup.Red.Step.diamond_aux {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} {L₄ : List ()} {x1 : α} {b1 : Bool} {x2 : α} {b2 : Bool} :
L₁ ++ (x1, b1) :: (x1, !b1) :: L₂ = L₃ ++ (x2, b2) :: (x2, !b2) :: L₄L₁ ++ L₂ = L₃ ++ L₄ L₅, FreeAddGroup.Red.Step (L₁ ++ L₂) L₅ FreeAddGroup.Red.Step (L₃ ++ L₄) L₅
theorem FreeGroup.Red.Step.diamond_aux {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} {L₄ : List ()} {x1 : α} {b1 : Bool} {x2 : α} {b2 : Bool} :
L₁ ++ (x1, b1) :: (x1, !b1) :: L₂ = L₃ ++ (x2, b2) :: (x2, !b2) :: L₄L₁ ++ L₂ = L₃ ++ L₄ L₅, FreeGroup.Red.Step (L₁ ++ L₂) L₅ FreeGroup.Red.Step (L₃ ++ L₄) L₅
abbrev FreeAddGroup.Red.Step.diamond.match_1 {α : Type u_1} (motive : (x x_1 x_2 x_3 : List ()) → FreeAddGroup.Red.Step x_1 x_3x = x_1Prop) :
(x x_1 x_2 x_3 : List ()) → (x_4 : ) → (x_5 : FreeAddGroup.Red.Step x_1 x_3) → (x_6 : x = x_1) → ((L₁ L₂ : List ()) → (x : α) → (b : Bool) → (L₁_1 L₂_1 : List ()) → (x_7 : α) → (b_1 : Bool) → (H : L₁ ++ (x, b) :: (x, !b) :: L₂ = L₁_1 ++ (x_7, b_1) :: (x_7, !b_1) :: L₂_1) → motive (L₁ ++ (x, b) :: (x, !b) :: L₂) (L₁_1 ++ (x_7, b_1) :: (x_7, !b_1) :: L₂_1) (L₁ ++ L₂) (L₁_1 ++ L₂_1) (_ : FreeAddGroup.Red.Step (L₁ ++ (x, b) :: (x, !b) :: L₂) (L₁ ++ L₂)) (_ : FreeAddGroup.Red.Step (L₁_1 ++ (x_7, b_1) :: (x_7, !b_1) :: L₂_1) (L₁_1 ++ L₂_1)) H) → motive x x_1 x_2 x_3 x_4 x_5 x_6
Instances For
theorem FreeAddGroup.Red.Step.diamond {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} {L₄ : List ()} :
L₁ = L₂L₃ = L₄ L₅,
theorem FreeGroup.Red.Step.diamond {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} {L₄ : List ()} :
L₁ = L₂L₃ = L₄ L₅,
theorem FreeAddGroup.Red.Step.to_red {α : Type u} {L₁ : List ()} {L₂ : List ()} :
theorem FreeGroup.Red.Step.to_red {α : Type u} {L₁ : List ()} {L₂ : List ()} :
FreeGroup.Red L₁ L₂
theorem FreeAddGroup.Red.church_rosser {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} :

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.

abbrev FreeAddGroup.Red.church_rosser.match_1 {α : Type u_1} (a : List ()) (motive : (b c : List ()) → (b = c L₅, ) → ) :
(b c : List ()) → (x : b = c L₅, ) → (hab : ) → (hac : ) → ((b : List ()) → (hab hac : ) → motive b b (_ : b = b L₅, ) hab hac) → ((b c d : List ()) → (hbd : ) → (hcd : ) → (hab : ) → (hac : ) → motive b c (_ : b = c L₅, ) hab hac) → motive b c x hab hac
Instances For
theorem FreeGroup.Red.church_rosser {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} :
FreeGroup.Red L₁ L₂FreeGroup.Red L₁ L₃Relation.Join FreeGroup.Red L₂ L₃

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.

theorem FreeAddGroup.Red.cons_cons {α : Type u} {L₁ : List ()} {L₂ : List ()} {p : } :
theorem FreeGroup.Red.cons_cons {α : Type u} {L₁ : List ()} {L₂ : List ()} {p : } :
FreeGroup.Red L₁ L₂FreeGroup.Red (p :: L₁) (p :: L₂)
theorem FreeAddGroup.Red.cons_cons_iff {α : Type u} {L₁ : List ()} {L₂ : List ()} (p : ) :
theorem FreeGroup.Red.cons_cons_iff {α : Type u} {L₁ : List ()} {L₂ : List ()} (p : ) :
FreeGroup.Red (p :: L₁) (p :: L₂) FreeGroup.Red L₁ L₂
theorem FreeAddGroup.Red.append_append_left_iff {α : Type u} {L₁ : List ()} {L₂ : List ()} (L : List ()) :
theorem FreeGroup.Red.append_append_left_iff {α : Type u} {L₁ : List ()} {L₂ : List ()} (L : List ()) :
FreeGroup.Red (L ++ L₁) (L ++ L₂) FreeGroup.Red L₁ L₂
theorem FreeAddGroup.Red.append_append {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} {L₄ : List ()} (h₁ : FreeAddGroup.Red L₁ L₃) (h₂ : FreeAddGroup.Red L₂ L₄) :
FreeAddGroup.Red (L₁ ++ L₂) (L₃ ++ L₄)
theorem FreeGroup.Red.append_append {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} {L₄ : List ()} (h₁ : FreeGroup.Red L₁ L₃) (h₂ : FreeGroup.Red L₂ L₄) :
FreeGroup.Red (L₁ ++ L₂) (L₃ ++ L₄)
theorem FreeAddGroup.Red.to_append_iff {α : Type u} {L : List ()} {L₁ : List ()} {L₂ : List ()} :
FreeAddGroup.Red L (L₁ ++ L₂) L₃ L₄, L = L₃ ++ L₄ FreeAddGroup.Red L₃ L₁ FreeAddGroup.Red L₄ L₂
abbrev FreeAddGroup.Red.to_append_iff.match_1 {α : Type u_1} {L : List ()} {L₁ : List ()} {L₂ : List ()} (motive : (L₃ L₄, L = L₃ ++ L₄ FreeAddGroup.Red L₃ L₁ FreeAddGroup.Red L₄ L₂) → Prop) :
(x : L₃ L₄, L = L₃ ++ L₄ FreeAddGroup.Red L₃ L₁ FreeAddGroup.Red L₄ L₂) → ((L₃ L₄ : List ()) → (Eq : L = L₃ ++ L₄) → (h₃ : FreeAddGroup.Red L₃ L₁) → (h₄ : FreeAddGroup.Red L₄ L₂) → motive (_ : L₃ L₄, L = L₃ ++ L₄ FreeAddGroup.Red L₃ L₁ FreeAddGroup.Red L₄ L₂)) → motive x
Instances For
theorem FreeGroup.Red.to_append_iff {α : Type u} {L : List ()} {L₁ : List ()} {L₂ : List ()} :
FreeGroup.Red L (L₁ ++ L₂) L₃ L₄, L = L₃ ++ L₄ FreeGroup.Red L₃ L₁ FreeGroup.Red L₄ L₂
theorem FreeAddGroup.Red.nil_iff {α : Type u} {L : List ()} :
L = []

The empty word [] only reduces to itself.

theorem FreeGroup.Red.nil_iff {α : Type u} {L : List ()} :
L = []

The empty word [] only reduces to itself.

theorem FreeAddGroup.Red.singleton_iff {α : Type u} {L₁ : List ()} {x : } :
FreeAddGroup.Red [x] L₁ L₁ = [x]

A letter only reduces to itself.

theorem FreeGroup.Red.singleton_iff {α : Type u} {L₁ : List ()} {x : } :
FreeGroup.Red [x] L₁ L₁ = [x]

A letter only reduces to itself.

theorem FreeAddGroup.Red.cons_nil_iff_singleton {α : Type u} {L : List ()} {x : α} {b : Bool} :

If x is a letter and w is a word such that x + w reduces to the empty word, then w reduces to -x.

abbrev FreeAddGroup.Red.cons_nil_iff_singleton.match_1 {α : Type u_1} {L : List ()} {x : α} {b : Bool} (motive : Relation.Join FreeAddGroup.Red [(x, !b)] LProp) :
(x : Relation.Join FreeAddGroup.Red [(x, !b)] L) → ((L' : List ()) → (h₁ : FreeAddGroup.Red [(x, !b)] L') → (h₂ : ) → motive (_ : c, FreeAddGroup.Red [(x, !b)] c )) → motive x
Instances For
theorem FreeGroup.Red.cons_nil_iff_singleton {α : Type u} {L : List ()} {x : α} {b : Bool} :
FreeGroup.Red ((x, b) :: L) [] FreeGroup.Red L [(x, !b)]

If x is a letter and w is a word such that xw reduces to the empty word, then w reduces to x⁻¹

theorem FreeAddGroup.Red.red_iff_irreducible {α : Type u} {L : List ()} {x1 : α} {b1 : Bool} {x2 : α} {b2 : Bool} (h : (x1, b1) (x2, b2)) :
FreeAddGroup.Red [(x1, !b1), (x2, b2)] L L = [(x1, !b1), (x2, b2)]
theorem FreeGroup.Red.red_iff_irreducible {α : Type u} {L : List ()} {x1 : α} {b1 : Bool} {x2 : α} {b2 : Bool} (h : (x1, b1) (x2, b2)) :
FreeGroup.Red [(x1, !b1), (x2, b2)] L L = [(x1, !b1), (x2, b2)]
theorem FreeAddGroup.Red.neg_of_red_of_ne {α : Type u} {L₁ : List ()} {L₂ : List ()} {x1 : α} {b1 : Bool} {x2 : α} {b2 : Bool} (H1 : (x1, b1) (x2, b2)) (H2 : FreeAddGroup.Red ((x1, b1) :: L₁) ((x2, b2) :: L₂)) :
FreeAddGroup.Red L₁ ((x1, !b1) :: (x2, b2) :: L₂)

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₂.

theorem FreeGroup.Red.inv_of_red_of_ne {α : Type u} {L₁ : List ()} {L₂ : List ()} {x1 : α} {b1 : Bool} {x2 : α} {b2 : Bool} (H1 : (x1, b1) (x2, b2)) (H2 : FreeGroup.Red ((x1, b1) :: L₁) ((x2, b2) :: L₂)) :
FreeGroup.Red L₁ ((x1, !b1) :: (x2, b2) :: L₂)

If x and y are distinct letters and w₁ w₂ are words such that xw₁ reduces to yw₂, then w₁ reduces to x⁻¹yw₂.

theorem FreeAddGroup.Red.Step.sublist {α : Type u} {L₁ : List ()} {L₂ : List ()} (H : ) :
List.Sublist L₂ L₁
theorem FreeGroup.Red.Step.sublist {α : Type u} {L₁ : List ()} {L₂ : List ()} (H : ) :
List.Sublist L₂ L₁
theorem FreeAddGroup.Red.sublist {α : Type u} {L₁ : List ()} {L₂ : List ()} :

If w₁ w₂ are words such that w₁ reduces to w₂, then w₂ is a sublist of w₁.

theorem FreeGroup.Red.sublist {α : Type u} {L₁ : List ()} {L₂ : List ()} :
FreeGroup.Red L₁ L₂List.Sublist L₂ L₁

If w₁ w₂ are words such that w₁ reduces to w₂, then w₂ is a sublist of w₁.

theorem FreeAddGroup.Red.length_le {α : Type u} {L₁ : List ()} {L₂ : List ()} (h : FreeAddGroup.Red L₁ L₂) :
theorem FreeGroup.Red.length_le {α : Type u} {L₁ : List ()} {L₂ : List ()} (h : FreeGroup.Red L₁ L₂) :
theorem FreeAddGroup.Red.sizeof_of_step {α : Type u} {L₁ : List ()} {L₂ : List ()} :
sizeOf L₂ < sizeOf L₁
theorem FreeGroup.Red.sizeof_of_step {α : Type u} {L₁ : List ()} {L₂ : List ()} :
sizeOf L₂ < sizeOf L₁
theorem FreeAddGroup.Red.length {α : Type u} {L₁ : List ()} {L₂ : List ()} (h : FreeAddGroup.Red L₁ L₂) :
n, = + 2 * n
theorem FreeGroup.Red.length {α : Type u} {L₁ : List ()} {L₂ : List ()} (h : FreeGroup.Red L₁ L₂) :
n, = + 2 * n
theorem FreeAddGroup.Red.antisymm {α : Type u} {L₁ : List ()} {L₂ : List ()} (h₁₂ : FreeAddGroup.Red L₁ L₂) (h₂₁ : FreeAddGroup.Red L₂ L₁) :
L₁ = L₂
theorem FreeGroup.Red.antisymm {α : Type u} {L₁ : List ()} {L₂ : List ()} (h₁₂ : FreeGroup.Red L₁ L₂) (h₂₁ : FreeGroup.Red L₂ L₁) :
L₁ = L₂
theorem FreeAddGroup.join_red_of_step {α : Type u} {L₁ : List ()} {L₂ : List ()} (h : ) :
theorem FreeGroup.join_red_of_step {α : Type u} {L₁ : List ()} {L₂ : List ()} (h : ) :
Relation.Join FreeGroup.Red L₁ L₂
theorem FreeAddGroup.eqvGen_step_iff_join_red {α : Type u} {L₁ : List ()} {L₂ : List ()} :
theorem FreeGroup.eqvGen_step_iff_join_red {α : Type u} {L₁ : List ()} {L₂ : List ()} :
EqvGen FreeGroup.Red.Step L₁ L₂ Relation.Join FreeGroup.Red L₁ L₂
def FreeAddGroup (α : Type u) :

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.

Instances For
def FreeGroup (α : Type u) :

The free group over a type, i.e. the words formed by the elements of the type and their formal inverses, quotient by one step reduction.

Instances For
def FreeAddGroup.mk {α : Type u} (L : List ()) :

The canonical map from list (α × bool) to the free additive group on α.

Instances For
def FreeGroup.mk {α : Type u} (L : List ()) :

The canonical map from List (α × Bool) to the free group on α.

Instances For
@[simp]
theorem FreeAddGroup.quot_mk_eq_mk {α : Type u} {L : List ()} :
@[simp]
theorem FreeGroup.quot_mk_eq_mk {α : Type u} {L : List ()} :
Quot.mk FreeGroup.Red.Step L =
@[simp]
theorem FreeAddGroup.quot_lift_mk {α : Type u} {L : List ()} (β : Type v) (f : List ()β) (H : ∀ (L₁ L₂ : List ()), f L₁ = f L₂) :
Quot.lift f H () = f L
@[simp]
theorem FreeGroup.quot_lift_mk {α : Type u} {L : List ()} (β : Type v) (f : List ()β) (H : ∀ (L₁ L₂ : List ()), f L₁ = f L₂) :
Quot.lift f H () = f L
@[simp]
theorem FreeAddGroup.quot_liftOn_mk {α : Type u} {L : List ()} (β : Type v) (f : List ()β) (H : ∀ (L₁ L₂ : List ()), f L₁ = f L₂) :
= f L
@[simp]
theorem FreeGroup.quot_liftOn_mk {α : Type u} {L : List ()} (β : Type v) (f : List ()β) (H : ∀ (L₁ L₂ : List ()), f L₁ = f L₂) :
Quot.liftOn () f H = f L
@[simp]
theorem FreeAddGroup.quot_map_mk {α : Type u} {L : List ()} (β : Type v) (f : List ()List ()) (H : (FreeAddGroup.Red.Step FreeAddGroup.Red.Step) f f) :
@[simp]
theorem FreeGroup.quot_map_mk {α : Type u} {L : List ()} (β : Type v) (f : List ()List ()) (H : (FreeGroup.Red.Step FreeGroup.Red.Step) f f) :
Quot.map f H () = FreeGroup.mk (f L)
theorem FreeAddGroup.zero_eq_mk {α : Type u} :
0 =
theorem FreeGroup.one_eq_mk {α : Type u} :
1 =
theorem FreeAddGroup.instAddFreeAddGroup.proof_2 {α : Type u_1} (y : ) (_L₁ : List ()) (_L₂ : List ()) (H : FreeAddGroup.Red.Step _L₁ _L₂) :
(fun L₁ => Quot.liftOn y (fun L₂ => FreeAddGroup.mk (L₁ ++ L₂)) (_ : ∀ (_L₂ _L₃ : List ()), FreeAddGroup.Red.Step _L₂ _L₃Quot.mk FreeAddGroup.Red.Step (L₁ ++ _L₂) = Quot.mk FreeAddGroup.Red.Step (L₁ ++ _L₃))) _L₁ = (fun L₁ => Quot.liftOn y (fun L₂ => FreeAddGroup.mk (L₁ ++ L₂)) (_ : ∀ (_L₂ _L₃ : List ()), FreeAddGroup.Red.Step _L₂ _L₃Quot.mk FreeAddGroup.Red.Step (L₁ ++ _L₂) = Quot.mk FreeAddGroup.Red.Step (L₁ ++ _L₃))) _L₂
theorem FreeAddGroup.instAddFreeAddGroup.proof_1 {α : Type u_1} (L₁ : List ()) (_L₂ : List ()) (_L₃ : List ()) (H : FreeAddGroup.Red.Step _L₂ _L₃) :
@[simp]
theorem FreeAddGroup.add_mk {α : Type u} {L₁ : List ()} {L₂ : List ()} :
@[simp]
theorem FreeGroup.mul_mk {α : Type u} {L₁ : List ()} {L₂ : List ()} :
= FreeGroup.mk (L₁ ++ L₂)
def FreeAddGroup.negRev {α : Type u} (w : List ()) :
List ()

Transform a word representing a free group element into a word representing its negative.

Instances For
def FreeGroup.invRev {α : Type u} (w : List ()) :
List ()

Transform a word representing a free group element into a word representing its inverse.

Instances For
@[simp]
theorem FreeAddGroup.negRev_length {α : Type u} {L₁ : List ()} :
@[simp]
theorem FreeGroup.invRev_length {α : Type u} {L₁ : List ()} :
@[simp]
theorem FreeAddGroup.negRev_negRev {α : Type u} {L₁ : List ()} :
@[simp]
theorem FreeGroup.invRev_invRev {α : Type u} {L₁ : List ()} :
@[simp]
theorem FreeAddGroup.negRev_empty {α : Type u} :
= []
@[simp]
theorem FreeGroup.invRev_empty {α : Type u} :
= []
theorem FreeAddGroup.negRev_involutive {α : Type u} :
theorem FreeAddGroup.negRev_injective {α : Type u} :
theorem FreeGroup.invRev_injective {α : Type u} :
Function.Injective FreeGroup.invRev
theorem FreeAddGroup.negRev_surjective {α : Type u} :
theorem FreeAddGroup.negRev_bijective {α : Type u} :
theorem FreeGroup.invRev_bijective {α : Type u} :
Function.Bijective FreeGroup.invRev
theorem FreeAddGroup.instNegFreeAddGroup.proof_1 {α : Type u_1} ⦃a : List () ⦃b : List () (h : ) :
@[simp]
theorem FreeAddGroup.neg_mk {α : Type u} {L : List ()} :
@[simp]
theorem FreeGroup.inv_mk {α : Type u} {L : List ()} :
theorem FreeAddGroup.Red.Step.negRev {α : Type u} {L₁ : List ()} {L₂ : List ()} (h : ) :
theorem FreeGroup.Red.Step.invRev {α : Type u} {L₁ : List ()} {L₂ : List ()} (h : ) :
theorem FreeAddGroup.Red.negRev {α : Type u} {L₁ : List ()} {L₂ : List ()} (h : FreeAddGroup.Red L₁ L₂) :
theorem FreeGroup.Red.invRev {α : Type u} {L₁ : List ()} {L₂ : List ()} (h : FreeGroup.Red L₁ L₂) :
@[simp]
theorem FreeAddGroup.Red.step_negRev_iff {α : Type u} {L₁ : List ()} {L₂ : List ()} :
@[simp]
theorem FreeGroup.Red.step_invRev_iff {α : Type u} {L₁ : List ()} {L₂ : List ()} :
@[simp]
theorem FreeAddGroup.red_negRev_iff {α : Type u} {L₁ : List ()} {L₂ : List ()} :
@[simp]
theorem FreeGroup.red_invRev_iff {α : Type u} {L₁ : List ()} {L₂ : List ()} :
FreeGroup.Red L₁ L₂
∀ (a : ), -a + a = 0
∀ (a : ), 0 + a = a
∀ (x : ), nsmulRec 0 x = nsmulRec 0 x
∀ (a b c : ), a + b + c = a + (b + c)
∀ (a b : ), a - b = a - b
∀ (n : ) (a : ), zsmulRec () a = zsmulRec () a
∀ (n : ) (a : ), zsmulRec () a = zsmulRec () a
∀ (a : ), a + 0 = a
∀ (a : ), zsmulRec 0 a = zsmulRec 0 a
∀ (n : ) (x : ), nsmulRec (n + 1) x = nsmulRec (n + 1) x
def FreeAddGroup.of {α : Type u} (x : α) :

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
def FreeGroup.of {α : Type u} (x : α) :

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
theorem FreeAddGroup.Red.exact {α : Type u} {L₁ : List ()} {L₂ : List ()} :
theorem FreeGroup.Red.exact {α : Type u} {L₁ : List ()} {L₂ : List ()} :
Relation.Join FreeGroup.Red L₁ L₂
abbrev FreeAddGroup.of_injective.match_1 {α : Type u_1} :
(x x_1 : α) → ∀ (motive : Relation.Join FreeAddGroup.Red [(x, true)] [(x_1, true)]Prop) (x_2 : Relation.Join FreeAddGroup.Red [(x, true)] [(x_1, true)]), (∀ (L₁ : List ()) (hx : FreeAddGroup.Red [(x, true)] L₁) (hy : FreeAddGroup.Red [(x_1, true)] L₁), motive (_ : c, FreeAddGroup.Red [(x, true)] c FreeAddGroup.Red [(x_1, true)] c)) → motive x_2
Instances For
theorem FreeAddGroup.of_injective {α : Type u} :

The canonical map from the type to the additive free group is an injection.

theorem FreeGroup.of_injective {α : Type u} :
Function.Injective FreeGroup.of

The canonical map from the type to the free group is an injection.

def FreeAddGroup.Lift.aux {α : Type u} {β : Type v} [] (f : αβ) :
List ()β

Given f : α → β with β an additive group, the canonical map list (α × bool) → β

Instances For
def FreeGroup.Lift.aux {α : Type u} {β : Type v} [] (f : αβ) :
List ()β

Given f : α → β with β a group, the canonical map List (α × Bool) → β

Instances For
theorem FreeAddGroup.Red.Step.lift {α : Type u} {L₁ : List ()} {L₂ : List ()} {β : Type v} [] {f : αβ} (H : ) :
theorem FreeGroup.Red.Step.lift {α : Type u} {L₁ : List ()} {L₂ : List ()} {β : Type v} [] {f : αβ} (H : ) :
=
theorem FreeAddGroup.lift.proof_2 {α : Type u_1} {β : Type u_2} [] (f : αβ) :
(0 + fun x => (fun x => bif x.snd then f x.fst else -f x.fst) (x, true)) = fun x => (fun x => bif x.snd then f x.fst else -f x.fst) (x, true)
theorem FreeAddGroup.lift.proof_1 {α : Type u_1} {β : Type u_2} [] (f : αβ) :
∀ (a b : ), Quot.lift () (_ : ∀ (L₁ L₂ : List ()), ) (a + b) = Quot.lift () (_ : ∀ (L₁ L₂ : List ()), ) a + Quot.lift () (_ : ∀ (L₁ L₂ : List ()), ) b
theorem FreeAddGroup.lift.proof_3 {α : Type u_2} {β : Type u_1} [] (g : ) :
(fun f => AddMonoidHom.mk' (Quot.lift () (_ : ∀ (L₁ L₂ : List ()), )) (_ : ∀ (a b : ), Quot.lift () (_ : ∀ (L₁ L₂ : List ()), ) (a + b) = Quot.lift () (_ : ∀ (L₁ L₂ : List ()), ) a + Quot.lift () (_ : ∀ (L₁ L₂ : List ()), ) b)) ((fun g => g FreeAddGroup.of) g) = g
def FreeAddGroup.lift {α : Type u} {β : Type v} [] :
(αβ) ()

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
@[simp]
theorem FreeAddGroup.lift_symm_apply {α : Type u} {β : Type v} [] (g : ) :
@[simp]
theorem FreeGroup.lift_symm_apply {α : Type u} {β : Type v} [] (g : →* β) :
∀ (a : α), FreeGroup.lift.symm g a = (g FreeGroup.of) a
def FreeGroup.lift {α : Type u} {β : Type v} [] :
(αβ) ( →* β)

If β is a group, then any function from α to β extends uniquely to a group homomorphism from the free group over α to β

Instances For
@[simp]
theorem FreeAddGroup.lift.mk {α : Type u} {L : List ()} {β : Type v} [] {f : αβ} :
↑(FreeAddGroup.lift f) () = List.sum (List.map (fun x => bif x.snd then f x.fst else -f x.fst) L)
@[simp]
theorem FreeGroup.lift.mk {α : Type u} {L : List ()} {β : Type v} [] {f : αβ} :
↑(FreeGroup.lift f) () = List.prod (List.map (fun x => bif x.snd then f x.fst else (f x.fst)⁻¹) L)
@[simp]
theorem FreeAddGroup.lift.of {α : Type u} {β : Type v} [] {f : αβ} {x : α} :
↑(FreeAddGroup.lift f) () = f x
@[simp]
theorem FreeGroup.lift.of {α : Type u} {β : Type v} [] {f : αβ} {x : α} :
↑(FreeGroup.lift f) () = f x
theorem FreeAddGroup.lift.unique {α : Type u} {β : Type v} [] {f : αβ} (g : ) (hg : ∀ (x : α), g () = f x) {x : } :
g x = ↑(FreeAddGroup.lift f) x
theorem FreeGroup.lift.unique {α : Type u} {β : Type v} [] {f : αβ} (g : →* β) (hg : ∀ (x : α), g () = f x) {x : } :
g x = ↑(FreeGroup.lift f) x
theorem FreeAddGroup.ext_hom {α : Type u} {G : Type u_1} [] (f : ) (g : ) (h : ∀ (a : α), f () = g ()) :
f = g

Two homomorphisms out of a free additive group are equal if they are equal on generators. See note [partially-applied ext lemmas].

theorem FreeGroup.ext_hom {α : Type u} {G : Type u_1} [] (f : →* G) (g : →* G) (h : ∀ (a : α), f () = g ()) :
f = g

Two homomorphisms out of a free group are equal if they are equal on generators.

See note [partially-applied ext lemmas].

theorem FreeAddGroup.lift.of_eq {α : Type u} (x : ) :
theorem FreeGroup.lift.of_eq {α : Type u} (x : ) :
↑(FreeGroup.lift FreeGroup.of) x = x
theorem FreeAddGroup.lift.range_le {α : Type u} {β : Type v} [] {f : αβ} {s : } (H : s) :
theorem FreeGroup.lift.range_le {α : Type u} {β : Type v} [] {f : αβ} {s : } (H : s) :
MonoidHom.range (FreeGroup.lift f) s
theorem FreeAddGroup.lift.range_eq_closure {α : Type u} {β : Type v} [] {f : αβ} :
theorem FreeGroup.lift.range_eq_closure {α : Type u} {β : Type v} [] {f : αβ} :
MonoidHom.range (FreeGroup.lift f) =
def FreeAddGroup.map {α : Type u} {β : Type v} (f : αβ) :

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
theorem FreeAddGroup.map.proof_1 {α : Type u_1} {β : Type u_2} (f : αβ) (L₁ : List ()) (L₂ : List ()) (H : ) :
FreeAddGroup.Red.Step (List.map (fun x => (f x.fst, x.snd)) L₁) (List.map (fun x => (f x.fst, x.snd)) L₂)
theorem FreeAddGroup.map.proof_2 {α : Type u_1} {β : Type u_2} (f : αβ) :
∀ (a b : ), Quot.map (List.map fun x => (f x.fst, x.snd)) (_ : ∀ (L₁ L₂ : List ()), FreeAddGroup.Red.Step (List.map (fun x => (f x.fst, x.snd)) L₁) (List.map (fun x => (f x.fst, x.snd)) L₂)) (a + b) = Quot.map (List.map fun x => (f x.fst, x.snd)) (_ : ∀ (L₁ L₂ : List ()), FreeAddGroup.Red.Step (List.map (fun x => (f x.fst, x.snd)) L₁) (List.map (fun x => (f x.fst, x.snd)) L₂)) a + Quot.map (List.map fun x => (f x.fst, x.snd)) (_ : ∀ (L₁ L₂ : List ()), FreeAddGroup.Red.Step (List.map (fun x => (f x.fst, x.snd)) L₁) (List.map (fun x => (f x.fst, x.snd)) L₂)) b
def FreeGroup.map {α : Type u} {β : Type v} (f : αβ) :

Any function from α to β extends uniquely to a group homomorphism from the free group over α to the free group over β.

Instances For
@[simp]
theorem FreeAddGroup.map.mk {α : Type u} {L : List ()} {β : Type v} {f : αβ} :
↑() () = FreeAddGroup.mk (List.map (fun x => (f x.fst, x.snd)) L)
@[simp]
theorem FreeGroup.map.mk {α : Type u} {L : List ()} {β : Type v} {f : αβ} :
↑() () = FreeGroup.mk (List.map (fun x => (f x.fst, x.snd)) L)
@[simp]
theorem FreeAddGroup.map.id {α : Type u} (x : ) :
↑() x = x
@[simp]
theorem FreeGroup.map.id {α : Type u} (x : ) :
↑() x = x
@[simp]
theorem FreeAddGroup.map.id' {α : Type u} (x : ) :
↑(FreeAddGroup.map fun z => z) x = x
@[simp]
theorem FreeGroup.map.id' {α : Type u} (x : ) :
↑(FreeGroup.map fun z => z) x = x
theorem FreeAddGroup.map.comp {α : Type u} {β : Type v} {γ : Type w} (f : αβ) (g : βγ) (x : ) :
↑() (↑() x) = ↑(FreeAddGroup.map (g f)) x
theorem FreeGroup.map.comp {α : Type u} {β : Type v} {γ : Type w} (f : αβ) (g : βγ) (x : ) :
↑() (↑() x) = ↑(FreeGroup.map (g f)) x
@[simp]
theorem FreeAddGroup.map.of {α : Type u} {β : Type v} {f : αβ} {x : α} :
↑() () = FreeAddGroup.of (f x)
@[simp]
theorem FreeGroup.map.of {α : Type u} {β : Type v} {f : αβ} {x : α} :
↑() () = FreeGroup.of (f x)
theorem FreeAddGroup.map.unique {α : Type u} {β : Type v} {f : αβ} (g : ) (hg : ∀ (x : α), g () = FreeAddGroup.of (f x)) {x : } :
g x = ↑() x
theorem FreeGroup.map.unique {α : Type u} {β : Type v} {f : αβ} (g : ) (hg : ∀ (x : α), g () = FreeGroup.of (f x)) {x : } :
g x = ↑() x
theorem FreeAddGroup.map_eq_lift {α : Type u} {β : Type v} {f : αβ} {x : } :
theorem FreeGroup.map_eq_lift {α : Type u} {β : Type v} {f : αβ} {x : } :
↑() x = ↑(FreeGroup.lift (FreeGroup.of f)) x
theorem FreeAddGroup.freeAddGroupCongr.proof_2 {α : Type u_2} {β : Type u_1} (e : α β) (x : ) :
↑() (↑(FreeAddGroup.map e.symm) x) = x
theorem FreeAddGroup.freeAddGroupCongr.proof_3 {α : Type u_1} {β : Type u_2} (e : α β) (a : ) (b : ) :
↑() (a + b) = ↑() a + ↑() b
def FreeAddGroup.freeAddGroupCongr {α : Type u_1} {β : Type u_2} (e : α β) :

Instances For
theorem FreeAddGroup.freeAddGroupCongr.proof_1 {α : Type u_1} {β : Type u_2} (e : α β) (x : ) :
↑(FreeAddGroup.map e.symm) (↑() x) = x
@[simp]
theorem FreeAddGroup.freeAddGroupCongr_apply {α : Type u_1} {β : Type u_2} (e : α β) (a : ) :
= ↑() a
@[simp]
theorem FreeGroup.freeGroupCongr_apply {α : Type u_1} {β : Type u_2} (e : α β) (a : ) :
↑() a = ↑() a
def FreeGroup.freeGroupCongr {α : Type u_1} {β : Type u_2} (e : α β) :

Equivalent types give rise to multiplicatively equivalent free groups.

The converse can be found in GroupTheory.FreeAbelianGroupFinsupp, as Equiv.of_freeGroupEquiv

Instances For
@[simp]
@[simp]
theorem FreeAddGroup.freeAddGroupCongr_symm {α : Type u_1} {β : Type u_2} (e : α β) :
@[simp]
theorem FreeGroup.freeGroupCongr_symm {α : Type u_1} {β : Type u_2} (e : α β) :
theorem FreeAddGroup.freeAddGroupCongr_trans {α : Type u_1} {β : Type u_2} {γ : Type u_3} (e : α β) (f : β γ) :
theorem FreeGroup.freeGroupCongr_trans {α : Type u_1} {β : Type u_2} {γ : Type u_3} (e : α β) (f : β γ) :
def FreeAddGroup.sum {α : Type u} [] :

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
def FreeGroup.prod {α : Type u} [] :
→* α

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
@[simp]
theorem FreeAddGroup.sum_mk {α : Type u} {L : List ()} [] :
FreeAddGroup.sum () = List.sum (List.map (fun x => bif x.snd then x.fst else -x.fst) L)
@[simp]
theorem FreeGroup.prod_mk {α : Type u} {L : List ()} [] :
FreeGroup.prod () = List.prod (List.map (fun x => bif x.snd then x.fst else x.fst⁻¹) L)
@[simp]
theorem FreeAddGroup.sum.of {α : Type u} [] {x : α} :
@[simp]
theorem FreeGroup.prod.of {α : Type u} [] {x : α} :
FreeGroup.prod () = x
theorem FreeAddGroup.sum.unique {α : Type u} [] (g : ) (hg : ∀ (x : α), g () = x) {x : } :
theorem FreeGroup.prod.unique {α : Type u} [] (g : →* α) (hg : ∀ (x : α), g () = x) {x : } :
g x = FreeGroup.prod x
theorem FreeAddGroup.lift_eq_sum_map {α : Type u} {β : Type v} [] {f : αβ} {x : } :
theorem FreeGroup.lift_eq_prod_map {α : Type u} {β : Type v} [] {f : αβ} {x : } :
↑(FreeGroup.lift f) x = FreeGroup.prod (↑() x)
def FreeGroup.sum {α : Type u} [] (x : ) :
α

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
@[simp]
theorem FreeGroup.sum_mk {α : Type u} {L : List ()} [] :
= List.sum (List.map (fun x => bif x.snd then x.fst else -x.fst) L)
@[simp]
theorem FreeGroup.sum.of {α : Type u} [] {x : α} :
@[simp]
theorem FreeGroup.sum.map_mul {α : Type u} [] {x : } {y : } :
@[simp]
theorem FreeGroup.sum.map_one {α : Type u} [] :
@[simp]
theorem FreeGroup.sum.map_inv {α : Type u} [] {x : } :
∀ (x : ), (fun x => 0) ((fun x => ()) x) = x
(x : Unit) → (Unitmotive PUnit.unit) → motive x
Instances For
∀ (x : Unit), (fun x => ()) ((fun x => 0) x) = x

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 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
theorem FreeAddGroup.induction_on {α : Type u} {C : } (z : ) (C1 : C 0) (Cp : (x : α) → C (pure x)) (Ci : (x : α) → C (pure x)C (-pure x)) (Cm : (x y : ) → C xC yC (x + y)) :
C z
theorem FreeGroup.induction_on {α : Type u} {C : } (z : ) (C1 : C 1) (Cp : (x : α) → C (pure x)) (Ci : (x : α) → C (pure x)C (pure x)⁻¹) (Cm : (x y : ) → C xC yC (x * y)) :
C z
theorem FreeAddGroup.map_pure {α : Type u} {β : Type u} (f : αβ) (x : α) :
f <$> pure x = pure (f x) theorem FreeGroup.map_pure {α : Type u} {β : Type u} (f : αβ) (x : α) : f <$> pure x = pure (f x)
@[simp]
theorem FreeAddGroup.map_zero {α : Type u} {β : Type u} (f : αβ) :
f <$> 0 = 0 @[simp] theorem FreeGroup.map_one {α : Type u} {β : Type u} (f : αβ) : f <$> 1 = 1
@[simp]
theorem FreeAddGroup.map_add {α : Type u} {β : Type u} (f : αβ) (x : ) (y : ) :
f <$> (x + y) = f <$> x + f <$> y @[simp] theorem FreeGroup.map_mul {α : Type u} {β : Type u} (f : αβ) (x : ) (y : ) : f <$> (x * y) = f <$> x * f <$> y
@[simp]
theorem FreeAddGroup.map_neg {α : Type u} {β : Type u} (f : αβ) (x : ) :
f <$> (-x) = -f <$> x
@[simp]
theorem FreeGroup.map_inv {α : Type u} {β : Type u} (f : αβ) (x : ) :
f <$> x⁻¹ = (f <$> x)⁻¹
theorem FreeAddGroup.pure_bind {α : Type u} {β : Type u} (f : α) (x : α) :
pure x >>= f = f x
theorem FreeGroup.pure_bind {α : Type u} {β : Type u} (f : α) (x : α) :
pure x >>= f = f x
@[simp]
theorem FreeAddGroup.zero_bind {α : Type u} {β : Type u} (f : α) :
0 >>= f = 0
@[simp]
theorem FreeGroup.one_bind {α : Type u} {β : Type u} (f : α) :
1 >>= f = 1
@[simp]
theorem FreeAddGroup.add_bind {α : Type u} {β : Type u} (f : α) (x : ) (y : ) :
x + y >>= f = (x >>= f) + (y >>= f)
@[simp]
theorem FreeGroup.mul_bind {α : Type u} {β : Type u} (f : α) (x : ) (y : ) :
x * y >>= f = (x >>= f) * (y >>= f)
@[simp]
theorem FreeAddGroup.neg_bind {α : Type u} {β : Type u} (f : α) (x : ) :
-x >>= f = -(x >>= f)
@[simp]
theorem FreeGroup.inv_bind {α : Type u} {β : Type u} (f : α) (x : ) :
x⁻¹ >>= f = (x >>= f)⁻¹
def FreeAddGroup.reduce {α : Type u} [] (L : List ()) :
List ()

The maximal reduction of a word. It is computable iff α has decidable equality.

Instances For
def FreeGroup.reduce {α : Type u} [] (L : List ()) :
List ()

The maximal reduction of a word. It is computable iff α has decidable equality.

Instances For
@[simp]
theorem FreeAddGroup.reduce.cons {α : Type u} {L : List ()} [] (x : ) :
FreeAddGroup.reduce (x :: L) = List.casesOn () [x] fun hd tl => if x.fst = hd.fst x.snd = !hd.snd then tl else x :: hd :: tl
@[simp]
theorem FreeGroup.reduce.cons {α : Type u} {L : List ()} [] (x : ) :
FreeGroup.reduce (x :: L) = List.casesOn () [x] fun hd tl => if x.fst = hd.fst x.snd = !hd.snd then tl else x :: hd :: tl
theorem FreeAddGroup.reduce.red {α : Type u} {L : List ()} [] :

The first theorem that characterises the function reduce: a word reduces to its maximal reduction.

theorem FreeGroup.reduce.red {α : Type u} {L : List ()} [] :

The first theorem that characterises the function reduce: a word reduces to its maximal reduction.

abbrev FreeAddGroup.reduce.not.match_1 {α : Type u_1} (motive : List ()List ()List ()α) :
(x x_1 x_2 : List ()) → (x_3 : α) → (x_4 : Bool) → ((L2 L3 : List ()) → (x : α) → (x_5 : Bool) → motive [] L2 L3 x x_5) → ((x : α) → (b : Bool) → (L1 L2 L3 : List ()) → (x' : α) → (b' : Bool) → motive ((x, b) :: L1) L2 L3 x' b') → motive x x_1 x_2 x_3 x_4
Instances For
theorem FreeAddGroup.reduce.not {α : Type u} [] {p : Prop} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} {x : α} {b : Bool} :
= L₂ ++ (x, b) :: (x, !b) :: L₃p
theorem FreeGroup.reduce.not {α : Type u} [] {p : Prop} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} {x : α} {b : Bool} :
= L₂ ++ (x, b) :: (x, !b) :: L₃p
theorem FreeAddGroup.reduce.min {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : ) :
= L₂

The second theorem that characterises the function reduce: the maximal reduction of a word only reduces to itself.

theorem FreeGroup.reduce.min {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : ) :
= L₂

The second theorem that characterises the function reduce: the maximal reduction of a word only reduces to itself.

@[simp]
theorem FreeAddGroup.reduce.idem {α : Type u} {L : List ()} [] :

reduce is idempotent, i.e. the maximal reduction of the maximal reduction of a word is the maximal reduction of the word.

@[simp]
theorem FreeGroup.reduce.idem {α : Type u} {L : List ()} [] :

reduce is idempotent, i.e. the maximal reduction of the maximal reduction of a word is the maximal reduction of the word.

theorem FreeAddGroup.reduce.Step.eq {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : ) :
abbrev FreeAddGroup.reduce.Step.eq.match_1 {α : Type u_1} {L₁ : List ()} {L₂ : List ()} [] (motive : Relation.Join FreeAddGroup.Red () ()Prop) :
(x : Relation.Join FreeAddGroup.Red () ()) → ((_L₃ : List ()) → (HR13 : ) → (HR23 : ) → motive (_ : c, )) → motive x
Instances For
theorem FreeGroup.reduce.Step.eq {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : ) :
theorem FreeAddGroup.reduce.eq_of_red {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : FreeAddGroup.Red L₁ L₂) :

If a word reduces to another word, then they have a common maximal reduction.

theorem FreeGroup.reduce.eq_of_red {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : FreeGroup.Red L₁ L₂) :

If a word reduces to another word, then they have a common maximal reduction.

theorem FreeGroup.red.reduce_eq {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : FreeGroup.Red L₁ L₂) :

Alias of FreeGroup.reduce.eq_of_red.

If a word reduces to another word, then they have a common maximal reduction.

theorem FreeGroup.freeAddGroup.red.reduce_eq {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : FreeAddGroup.Red L₁ L₂) :

Alias of FreeAddGroup.reduce.eq_of_red.

If a word reduces to another word, then they have a common maximal reduction.

theorem FreeAddGroup.Red.reduce_right {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (h : FreeAddGroup.Red L₁ L₂) :
theorem FreeGroup.Red.reduce_right {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (h : FreeGroup.Red L₁ L₂) :
theorem FreeAddGroup.Red.reduce_left {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (h : FreeAddGroup.Red L₁ L₂) :
theorem FreeGroup.Red.reduce_left {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (h : FreeGroup.Red L₁ L₂) :
theorem FreeAddGroup.reduce.sound {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : ) :

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.

abbrev FreeAddGroup.reduce.sound.match_1 {α : Type u_1} {L₁ : List ()} {L₂ : List ()} (motive : Relation.Join FreeAddGroup.Red L₁ L₂Prop) :
(x : Relation.Join FreeAddGroup.Red L₁ L₂) → ((_L₃ : List ()) → (H13 : FreeAddGroup.Red L₁ _L₃) → (H23 : FreeAddGroup.Red L₂ _L₃) → motive (_ : c, )) → motive x
Instances For
theorem FreeGroup.reduce.sound {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : ) :

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.

theorem FreeAddGroup.reduce.exact {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : ) :

If two words have a common maximal reduction, then they correspond to the same element in the additive free group.

theorem FreeGroup.reduce.exact {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : ) :

If two words have a common maximal reduction, then they correspond to the same element in the free group.

theorem FreeAddGroup.reduce.self {α : Type u} {L : List ()} [] :

A word and its maximal reduction correspond to the same element of the additive free group.

theorem FreeGroup.reduce.self {α : Type u} {L : List ()} [] :

A word and its maximal reduction correspond to the same element of the free group.

theorem FreeAddGroup.reduce.rev {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : FreeAddGroup.Red L₁ L₂) :

If words w₁ w₂ are such that w₁ reduces to w₂, then w₂ reduces to the maximal reduction of w₁.

theorem FreeGroup.reduce.rev {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : FreeGroup.Red L₁ L₂) :

If words w₁ w₂ are such that w₁ reduces to w₂, then w₂ reduces to the maximal reduction of w₁.

def FreeAddGroup.toWord {α : Type u} [] :
List ()

The function that sends an element of the additive free group to its maximal reduction.

Instances For
theorem FreeAddGroup.toWord.proof_1 {α : Type u_1} [] (_L₁ : List ()) (_L₂ : List ()) (H : FreeAddGroup.Red.Step _L₁ _L₂) :
def FreeGroup.toWord {α : Type u} [] :
List ()

The function that sends an element of the free group to its maximal reduction.

Instances For
theorem FreeAddGroup.mk_toWord {α : Type u} [] {x : } :
theorem FreeGroup.mk_toWord {α : Type u} [] {x : } :
theorem FreeAddGroup.toWord_injective {α : Type u} [] :
theorem FreeGroup.toWord_injective {α : Type u} [] :
Function.Injective FreeGroup.toWord
@[simp]
theorem FreeAddGroup.toWord_inj {α : Type u} [] {x : } {y : } :
@[simp]
theorem FreeGroup.toWord_inj {α : Type u} [] {x : } {y : } :
x = y
@[simp]
theorem FreeAddGroup.toWord_mk {α : Type u} {L₁ : List ()} [] :
@[simp]
theorem FreeGroup.toWord_mk {α : Type u} {L₁ : List ()} [] :
@[simp]
theorem FreeAddGroup.reduce_toWord {α : Type u} [] (x : ) :
@[simp]
theorem FreeGroup.reduce_toWord {α : Type u} [] (x : ) :
@[simp]
theorem FreeAddGroup.toWord_zero {α : Type u} [] :
@[simp]
theorem FreeGroup.toWord_one {α : Type u} [] :
@[simp]
theorem FreeAddGroup.toWord_eq_nil_iff {α : Type u} [] {x : } :
x = 0
@[simp]
theorem FreeGroup.toWord_eq_nil_iff {α : Type u} [] {x : } :
x = 1
theorem FreeAddGroup.reduce_negRev {α : Type u} [] {w : List ()} :
theorem FreeGroup.reduce_invRev {α : Type u} [] {w : List ()} :
theorem FreeAddGroup.toWord_neg {α : Type u} [] {x : } :
theorem FreeGroup.toWord_inv {α : Type u} [] {x : } :
def FreeAddGroup.reduce.churchRosser {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} [] (H12 : FreeAddGroup.Red L₁ L₂) (H13 : FreeAddGroup.Red L₁ L₃) :

Constructive Church-Rosser theorem (compare church_rosser).

Instances For
theorem FreeAddGroup.reduce.churchRosser.proof_1 {α : Type u_1} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} [] (H12 : FreeAddGroup.Red L₁ L₂) (H13 : FreeAddGroup.Red L₁ L₃) :
def FreeGroup.reduce.churchRosser {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} [] (H12 : FreeGroup.Red L₁ L₂) (H13 : FreeGroup.Red L₁ L₃) :
{ L₄ // FreeGroup.Red L₂ L₄ FreeGroup.Red L₃ L₄ }

Constructive Church-Rosser theorem (compare church_rosser).

Instances For
instance FreeGroup.Red.decidableRel {α : Type u} [] :
DecidableRel FreeGroup.Red
Equations
def FreeGroup.Red.enum {α : Type u} [] (L₁ : List ()) :
List (List ())

A list containing every word that w₁ reduces to.

Instances For
theorem FreeGroup.Red.enum.sound {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : L₂ List.filter (fun b => decide ()) ()) :
FreeGroup.Red L₁ L₂
theorem FreeGroup.Red.enum.complete {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : FreeGroup.Red L₁ L₂) :
L₂
instance FreeGroup.instFintypeSubtypeListProdBoolRed {α : Type u} {L₁ : List ()} [] :
Fintype { L₂ // FreeGroup.Red L₁ L₂ }
def FreeAddGroup.norm {α : Type u} [] (x : ) :

The length of reduced words provides a norm on an additive free group.

Instances For
def FreeGroup.norm {α : Type u} [] (x : ) :

The length of reduced words provides a norm on a free group.

Instances For
@[simp]
theorem FreeAddGroup.norm_neg_eq {α : Type u} [] {x : } :
@[simp]
theorem FreeGroup.norm_inv_eq {α : Type u} [] {x : } :
@[simp]
theorem FreeAddGroup.norm_eq_zero {α : Type u} [] {x : } :
x = 0
@[simp]
theorem FreeGroup.norm_eq_zero {α : Type u} [] {x : } :
x = 1
@[simp]
theorem FreeAddGroup.norm_zero {α : Type u} [] :
@[simp]
theorem FreeGroup.norm_one {α : Type u} [] :
theorem FreeAddGroup.norm_mk_le {α : Type u} {L₁ : List ()} [] :
theorem FreeGroup.norm_mk_le {α : Type u} {L₁ : List ()} [] :
theorem FreeAddGroup.norm_add_le {α : Type u} [] (x : ) (y : ) :
theorem FreeGroup.norm_mul_le {α : Type u} [] (x : ) (y : ) :