# 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

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

Reflexive-transitive closure of Red.Step

Equations
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) )motive x x_1 x_2
Equations
• =
Instances For
theorem FreeAddGroup.Red.Step.length {α : Type u} {L₁ : List ()} {L₂ : List ()} :
L₂.length + 2 = L₁.length

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 ()} :
L₂.length + 2 = L₁.length

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₂) )motive x x_1 x_2 x_3
Equations
• =
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 )motive x x_1 x_2 x_3
Equations
• =
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 : List ()), 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 : List ()), L₂ = (a, b) :: L) L₁ = (a, !b) :: L₂
abbrev FreeAddGroup.Red.not_step_singleton.match_1 {α : Type u_1} (motive : Prop) :
∀ (x : ), (∀ (a : α) (b : Bool), motive (a, b))motive x
Equations
• =
Instances For
theorem FreeAddGroup.Red.not_step_singleton {α : Type u} {L : List ()} {p : } :
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
Equations
• =
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_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
Equations
• =
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₅ : List ()), FreeAddGroup.Red.Step (L₁ ++ L₂) L₅ FreeAddGroup.Red.Step (L₃ ++ L₄) L₅
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₅ : List ()), FreeAddGroup.Red.Step (tl ++ x) L₅ FreeAddGroup.Red.Step (tl2 ++ x_1) L₅)Prop) (x_2 : tl ++ x = tl2 ++ x_1 ∃ (L₅ : List ()), FreeAddGroup.Red.Step (tl ++ x) L₅ FreeAddGroup.Red.Step (tl2 ++ x_1) L₅), (∀ (H3 : tl ++ x = tl2 ++ x_1), motive )(∀ (L₅ : List ()) (H3 : FreeAddGroup.Red.Step (tl ++ x) L₅) (H4 : FreeAddGroup.Red.Step (tl2 ++ x_1) L₅), motive )motive x_2
Equations
• =
Instances For
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) tl.append ((x_2, x_3) :: (x_2, !x_3) :: x) = tl2.append ((x_4, x_5) :: (x_4, !x_5) :: x_1)Prop) (x_6 : (x3, b3) = (x4, b4) tl.append ((x_2, x_3) :: (x_2, !x_3) :: x) = tl2.append ((x_4, x_5) :: (x_4, !x_5) :: x_1)), (∀ (H1 : (x3, b3) = (x4, b4)) (H2 : tl.append ((x_2, x_3) :: (x_2, !x_3) :: x) = tl2.append ((x_4, x_5) :: (x_4, !x_5) :: x_1)), motive )motive x_6
Equations
• =
Instances For
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₅ : List ()), FreeGroup.Red.Step (L₁ ++ L₂) L₅ FreeGroup.Red.Step (L₃ ++ L₄) L₅
theorem FreeAddGroup.Red.Step.diamond {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} {L₄ : List ()} :
L₁ = L₂L₃ = L₄ ∃ (L₅ : List ()),
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) H)motive x x_1 x_2 x_3 x_4 x_5 x_6
Equations
• =
Instances For
theorem FreeGroup.Red.Step.diamond {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} {L₄ : List ()} :
L₁ = L₂L₃ = L₄ ∃ (L₅ : List ()),
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₅ : List ()), )) :
∀ (b c : List ()) (x : b = c ∃ (L₅ : List ()), ) (hab : ) (hac : ), (∀ (b : List ()) (hab hac : ), motive b b hab hac)(∀ (b c d : List ()) (hbd : ) (hcd : ) (hab : ) (hac : ), motive b c hab hac)motive b c x hab hac
Equations
• =
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₄)
abbrev FreeAddGroup.Red.to_append_iff.match_1 {α : Type u_1} {L : List ()} {L₁ : List ()} {L₂ : List ()} (motive : (∃ (L₃ : List ()) (L₄ : List ()), L = L₃ ++ L₄ FreeAddGroup.Red L₃ L₁ FreeAddGroup.Red L₄ L₂)Prop) :
∀ (x : ∃ (L₃ : List ()) (L₄ : List ()), 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 )motive x
Equations
• =
Instances For
theorem FreeAddGroup.Red.to_append_iff {α : Type u} {L : List ()} {L₁ : List ()} {L₂ : List ()} :
FreeAddGroup.Red L (L₁ ++ L₂) ∃ (L₃ : List ()) (L₄ : List ()), L = L₃ ++ L₄ FreeAddGroup.Red L₃ L₁ FreeAddGroup.Red L₄ L₂
theorem FreeGroup.Red.to_append_iff {α : Type u} {L : List ()} {L₁ : List ()} {L₂ : List ()} :
FreeGroup.Red L (L₁ ++ L₂) ∃ (L₃ : List ()) (L₄ : List ()), 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_1 : Relation.Join FreeAddGroup.Red [(x, !b)] L), (∀ (L' : List ()) (h₁ : FreeAddGroup.Red [(x, !b)] L') (h₂ : ), motive )motive x_1
Equations
• =
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 : ) :
L₂.Sublist L₁
theorem FreeGroup.Red.Step.sublist {α : Type u} {L₁ : List ()} {L₂ : List ()} (H : ) :
L₂.Sublist 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₂L₂.Sublist 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₂) :
L₂.length L₁.length
theorem FreeGroup.Red.length_le {α : Type u} {L₁ : List ()} {L₂ : List ()} (h : FreeGroup.Red L₁ L₂) :
L₂.length L₁.length
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 : ), L₁.length = L₂.length + 2 * n
theorem FreeGroup.Red.length {α : Type u} {L₁ : List ()} {L₂ : List ()} (h : FreeGroup.Red L₁ L₂) :
∃ (n : ), L₁.length = L₂.length + 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.

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

Equations
• = Quot FreeGroup.Red.Step
Instances For
def FreeAddGroup.mk {α : Type u} (L : List ()) :

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

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

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

Equations
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)
instance FreeAddGroup.instZero {α : Type u} :
Zero ()
Equations
• FreeAddGroup.instZero = { zero := }
instance FreeGroup.instOne {α : Type u} :
One ()
Equations
• FreeGroup.instOne = { one := }
theorem FreeAddGroup.zero_eq_mk {α : Type u} :
0 =
theorem FreeGroup.one_eq_mk {α : Type u} :
1 =
instance FreeAddGroup.instInhabited {α : Type u} :
Equations
• FreeAddGroup.instInhabited = { default := 0 }
instance FreeGroup.instInhabited {α : Type u} :
Equations
• FreeGroup.instInhabited = { default := 1 }
instance FreeAddGroup.instUniqueOfIsEmpty {α : Type u} [] :
Equations
instance FreeGroup.instUniqueOfIsEmpty {α : Type u} [] :
Equations
• FreeGroup.instUniqueOfIsEmpty = id inferInstance
Equations
• One or more equations did not get rendered due to their size.
theorem FreeAddGroup.instAdd.proof_1 {α : Type u_1} (L₁ : List ()) (_L₂ : List ()) (_L₃ : List ()) (H : FreeAddGroup.Red.Step _L₂ _L₃) :
theorem FreeAddGroup.instAdd.proof_2 {α : Type u_1} (y : ) (_L₁ : List ()) (_L₂ : List ()) (H : FreeAddGroup.Red.Step _L₁ _L₂) :
(fun (L₁ : List ()) => Quot.liftOn y (fun (L₂ : List ()) => FreeAddGroup.mk (L₁ ++ L₂)) ) _L₁ = (fun (L₁ : List ()) => Quot.liftOn y (fun (L₂ : List ()) => FreeAddGroup.mk (L₁ ++ L₂)) ) _L₂
instance FreeGroup.instMul {α : Type u} :
Mul ()
Equations
@[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.

Equations
• = (List.map (fun (g : ) => (g.1, !g.2)) w).reverse
Instances For
def FreeGroup.invRev {α : Type u} (w : List ()) :
List ()

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

Equations
• = (List.map (fun (g : ) => (g.1, !g.2)) w).reverse
Instances For
@[simp]
theorem FreeAddGroup.negRev_length {α : Type u} {L₁ : List ()} :
().length = L₁.length
@[simp]
theorem FreeGroup.invRev_length {α : Type u} {L₁ : List ()} :
().length = L₁.length
@[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
instance FreeAddGroup.instNeg {α : Type u} :
Neg ()
Equations
theorem FreeAddGroup.instNeg.proof_1 {α : Type u_1} ⦃a : List () ⦃b : List () (h : ) :
instance FreeGroup.instInv {α : Type u} :
Inv ()
Equations
• FreeGroup.instInv = { inv := Quot.map FreeGroup.invRev }
@[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₂
∀ (n : ) (a : ), zsmulRec (Int.ofNat n.succ) a = zsmulRec (Int.ofNat n.succ) a
∀ (n : ) (a : ), zsmulRec () a = zsmulRec () a
Equations
∀ (a : ), zsmulRec 0 a = zsmulRec 0 a
∀ (a b c : ), a + b + c = a + (b + c)
∀ (x : ), nsmulRec 0 x = nsmulRec 0 x
∀ (a : ), 0 + a = a
∀ (n : ) (x : ), nsmulRec (n + 1) x = nsmulRec (n + 1) x
∀ (a : ), -a + a = 0
∀ (a b : ), a - b = a - b
∀ (a : ), a + 0 = a
instance FreeGroup.instGroup {α : Type u} :
Equations
• FreeGroup.instGroup =
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.

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

Equations
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₂
theorem FreeAddGroup.of_injective {α : Type u} :

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

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 )motive x_2
Equations
• =
Instances For
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) → β

Equations
• = (List.map (fun (x : ) => bif x.2 then f x.1 else -f x.1) L).sum
Instances For
def FreeGroup.Lift.aux {α : Type u} {β : Type v} [] (f : αβ) :
List ()β

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

Equations
• = (List.map (fun (x : ) => bif x.2 then f x.1 else (f x.1)⁻¹) L).prod
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_3 {α : Type u_2} {β : Type u_1} [] (g : ) :
(fun (f : αβ) => ) ((fun (g : ) => g FreeAddGroup.of) g) = g
theorem FreeAddGroup.lift.proof_1 {α : Type u_1} {β : Type u_2} [] (f : αβ) :
∀ (a b : ), Quot.lift (a + b) = +
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 β

Equations
• One or more equations did not get rendered due to their size.
Instances For
theorem FreeAddGroup.lift.proof_2 {α : Type u_1} {β : Type u_2} [] (f : αβ) :
(0 + fun (x : α) => (fun (x : ) => bif x.2 then f x.1 else -f x.1) (x, true)) = fun (x : α) => (fun (x : ) => bif x.2 then f x.1 else -f x.1) (x, true)
@[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 β

Equations
• FreeGroup.lift = { toFun := fun (f : αβ) => MonoidHom.mk' () , invFun := fun (g : →* β) => g FreeGroup.of, left_inv := , right_inv := }
Instances For
@[simp]
theorem FreeAddGroup.lift.mk {α : Type u} {L : List ()} {β : Type v} [] {f : αβ} :
(FreeAddGroup.lift f) () = (List.map (fun (x : ) => bif x.2 then f x.1 else -f x.1) L).sum
@[simp]
theorem FreeGroup.lift.mk {α : Type u} {L : List ()} {β : Type v} [] {f : αβ} :
(FreeGroup.lift f) () = (List.map (fun (x : ) => bif x.2 then f x.1 else (f x.1)⁻¹) L).prod
@[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_id (α : Type u_1) :
theorem FreeGroup.lift_of_eq_id (α : Type u_1) :
FreeGroup.lift FreeGroup.of =
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) :
(FreeGroup.lift f).range s
theorem FreeAddGroup.lift.range_eq_closure {α : Type u} {β : Type v} [] {f : αβ} :
theorem FreeGroup.lift.range_eq_closure {α : Type u} {β : Type v} [] {f : αβ} :
(FreeGroup.lift f).range =
@[simp]
@[simp]
theorem FreeGroup.closure_range_of (α : Type u_1) :

The generators of FreeGroup α generate FreeGroup α. That is, the subgroup closure of the set of generators equals ⊤.

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.1, x.2)) L₁) (List.map (fun (x : ) => (f x.1, x.2)) L₂)
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 β.

Equations
Instances For
theorem FreeAddGroup.map.proof_2 {α : Type u_1} {β : Type u_2} (f : αβ) :
∀ (a b : ), Quot.map (List.map fun (x : ) => (f x.1, x.2)) (a + b) = Quot.map (List.map fun (x : ) => (f x.1, x.2)) a + Quot.map (List.map fun (x : ) => (f x.1, x.2)) 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 β.

Equations
Instances For
@[simp]
theorem FreeAddGroup.map.mk {α : Type u} {L : List ()} {β : Type v} {f : αβ} :
() () = FreeAddGroup.mk (List.map (fun (x : ) => (f x.1, x.2)) L)
@[simp]
theorem FreeGroup.map.mk {α : Type u} {L : List ()} {β : Type v} {f : αβ} :
() () = FreeGroup.mk (List.map (fun (x : ) => (f x.1, x.2)) 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_3 {α : Type u_1} {β : Type u_2} (e : α β) (a : ) (b : ) :
() (a + b) = () a + () b
theorem FreeAddGroup.freeAddGroupCongr.proof_2 {α : Type u_2} {β : Type u_1} (e : α β) (x : ) :
() ((FreeAddGroup.map e.symm) x) = x
def FreeAddGroup.freeAddGroupCongr {α : Type u_1} {β : Type u_2} (e : α β) :

Equations
• = { toFun := (), invFun := (FreeAddGroup.map e.symm), left_inv := , right_inv := , map_add' := }
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
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

Equations
• = { toFun := (), invFun := (FreeGroup.map e.symm), left_inv := , right_inv := , map_mul' := }
Instances For
@[simp]
@[simp]
theorem FreeAddGroup.freeAddGroupCongr_symm {α : Type u_1} {β : Type u_2} (e : α β) :
.symm =
@[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 : β γ) :
.trans = FreeGroup.freeGroupCongr (e.trans 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 α.

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

Equations
• FreeGroup.prod = FreeGroup.lift id
Instances For
@[simp]
theorem FreeAddGroup.sum_mk {α : Type u} {L : List ()} [] :
FreeAddGroup.sum () = (List.map (fun (x : ) => bif x.2 then x.1 else -x.1) L).sum
@[simp]
theorem FreeGroup.prod_mk {α : Type u} {L : List ()} [] :
FreeGroup.prod () = (List.map (fun (x : ) => bif x.2 then x.1 else x.1⁻¹) L).prod
@[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.

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

The bijection between the 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

The bijection between the free group on a singleton, and the integers.

Equations
• One or more equations did not get rendered due to their size.
Instances For
Equations
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)⁻¹
Equations
Equations
def FreeAddGroup.reduce {α : Type u} [] (L : List ()) :
List ()

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
def FreeGroup.reduce {α : Type u} [] (L : List ()) :
List ()

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
@[simp]
theorem FreeAddGroup.reduce.cons {α : Type u} {L : List ()} [] (x : ) :
FreeAddGroup.reduce (x :: L) = List.casesOn [x] fun (hd : ) (tl : List ()) => if x.1 = hd.1 x.2 = !hd.2 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 : List ()) => if x.1 = hd.1 x.2 = !hd.2 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
Equations
• =
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.

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 )motive x
Equations
• =
Instances For
theorem FreeAddGroup.reduce.Step.eq {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : ) :
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 )motive x
Equations
• =
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.

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

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

Equations
Instances For
theorem FreeAddGroup.mk_toWord {α : Type u} [] {x : } :
theorem FreeGroup.mk_toWord {α : Type u} [] {x : } :
FreeGroup.mk x.toWord = 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 : } :
x.toWord = y.toWord x = y
@[simp]
theorem FreeGroup.toWord_inj {α : Type u} [] {x : } {y : } :
x.toWord = y.toWord x = y
@[simp]
theorem FreeAddGroup.toWord_mk {α : Type u} {L₁ : List ()} [] :
().toWord =
@[simp]
theorem FreeGroup.toWord_mk {α : Type u} {L₁ : List ()} [] :
().toWord =
@[simp]
theorem FreeAddGroup.reduce_toWord {α : Type u} [] (x : ) :
@[simp]
theorem FreeGroup.reduce_toWord {α : Type u} [] (x : ) :
FreeGroup.reduce x.toWord = x.toWord
@[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.toWord = [] x = 0
@[simp]
theorem FreeGroup.toWord_eq_nil_iff {α : Type u} [] {x : } :
x.toWord = [] 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 : } :
x⁻¹.toWord = FreeGroup.invRev x.toWord
def FreeAddGroup.reduce.churchRosser {α : Type u} {L₁ : List ()} {L₂ : List ()} {L₃ : List ()} [] (H12 : FreeAddGroup.Red L₁ L₂) (H13 : FreeAddGroup.Red L₁ L₃) :
{ L₄ : List () // FreeAddGroup.Red L₂ L₄ FreeAddGroup.Red L₃ L₄ }

Constructive Church-Rosser theorem (compare church_rosser).

Equations
• = ⟨,
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₄ : List () // FreeGroup.Red L₂ L₄ FreeGroup.Red L₃ L₄ }

Constructive Church-Rosser theorem (compare church_rosser).

Equations
• = ⟨,
Instances For
instance FreeAddGroup.instDecidableEq {α : Type u} [] :
Equations
instance FreeGroup.instDecidableEq {α : Type u} [] :
Equations
• FreeGroup.instDecidableEq = .decidableEq
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.

Equations
Instances For
theorem FreeGroup.Red.enum.sound {α : Type u} {L₁ : List ()} {L₂ : List ()} [] (H : L₂ List.filter (fun (b : List ()) => decide ()) L₁.sublists) :
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₂ : List () // FreeGroup.Red L₁ L₂ }
Equations
def FreeAddGroup.norm {α : Type u} [] (x : ) :

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

Equations
• x.norm = x.toWord.length
Instances For
def FreeGroup.norm {α : Type u} [] (x : ) :

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

Equations
• x.norm = x.toWord.length
Instances For
@[simp]
theorem FreeAddGroup.norm_neg_eq {α : Type u} [] {x : } :
(-x).norm = x.norm
@[simp]
theorem FreeGroup.norm_inv_eq {α : Type u} [] {x : } :
x⁻¹.norm = x.norm
@[simp]
theorem FreeAddGroup.norm_eq_zero {α : Type u} [] {x : } :
x.norm = 0 x = 0
@[simp]
theorem FreeGroup.norm_eq_zero {α : Type u} [] {x : } :
x.norm = 0 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 ()} [] :
().norm L₁.length
theorem FreeGroup.norm_mk_le {α : Type u} {L₁ : List ()} [] :
().norm L₁.length
theorem FreeAddGroup.norm_add_le {α : Type u} [] (x : ) (y : ) :
(x + y).norm x.norm + y.norm
theorem FreeGroup.norm_mul_le {α : Type u} [] (x : ) (y : ) :
(x * y).norm x.norm + y.norm