HepLean Documentation

Mathlib.GroupTheory.FreeGroup.Basic

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 #

Main statements #

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 (α × Bool)List (α × Bool)Prop

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

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

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

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

      Reflexive-transitive closure of Red.Step

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

        Reflexive-transitive closure of Red.Step

        Equations
        Instances For
          theorem FreeGroup.Red.refl {α : Type u} {L : List (α × Bool)} :
          theorem FreeAddGroup.Red.refl {α : Type u} {L : List (α × Bool)} :
          theorem FreeGroup.Red.trans {α : Type u} {L₁ L₂ L₃ : List (α × Bool)} :
          FreeGroup.Red L₁ L₂FreeGroup.Red L₂ L₃FreeGroup.Red L₁ L₃
          theorem FreeAddGroup.Red.trans {α : Type u} {L₁ L₂ L₃ : List (α × Bool)} :
          FreeAddGroup.Red L₁ L₂FreeAddGroup.Red L₂ L₃FreeAddGroup.Red L₁ L₃
          theorem FreeGroup.Red.Step.length {α : Type u} {L₁ L₂ : List (α × Bool)} :
          FreeGroup.Red.Step L₁ L₂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₄

          theorem FreeAddGroup.Red.Step.length {α : Type u} {L₁ L₂ : List (α × Bool)} :
          FreeAddGroup.Red.Step L₁ L₂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₄

          @[simp]
          theorem FreeGroup.Red.Step.not_rev {α : Type u} {L₁ L₂ : List (α × Bool)} {x : α} {b : Bool} :
          FreeGroup.Red.Step (L₁ ++ (x, !b) :: (x, b) :: L₂) (L₁ ++ L₂)
          @[simp]
          theorem FreeAddGroup.Red.Step.not_rev {α : Type u} {L₁ L₂ : List (α × Bool)} {x : α} {b : Bool} :
          FreeAddGroup.Red.Step (L₁ ++ (x, !b) :: (x, b) :: L₂) (L₁ ++ L₂)
          @[simp]
          theorem FreeGroup.Red.Step.cons_not {α : Type u} {L : List (α × Bool)} {x : α} {b : Bool} :
          FreeGroup.Red.Step ((x, b) :: (x, !b) :: L) L
          @[simp]
          theorem FreeAddGroup.Red.Step.cons_not {α : Type u} {L : List (α × Bool)} {x : α} {b : Bool} :
          FreeAddGroup.Red.Step ((x, b) :: (x, !b) :: L) L
          @[simp]
          theorem FreeGroup.Red.Step.cons_not_rev {α : Type u} {L : List (α × Bool)} {x : α} {b : Bool} :
          FreeGroup.Red.Step ((x, !b) :: (x, b) :: L) L
          @[simp]
          theorem FreeAddGroup.Red.Step.cons_not_rev {α : Type u} {L : List (α × Bool)} {x : α} {b : Bool} :
          FreeAddGroup.Red.Step ((x, !b) :: (x, b) :: L) L
          theorem FreeGroup.Red.Step.append_left {α : Type u} {L₁ L₂ L₃ : List (α × Bool)} :
          FreeGroup.Red.Step L₂ L₃FreeGroup.Red.Step (L₁ ++ L₂) (L₁ ++ L₃)
          theorem FreeAddGroup.Red.Step.append_left {α : Type u} {L₁ L₂ L₃ : List (α × Bool)} :
          FreeAddGroup.Red.Step L₂ L₃FreeAddGroup.Red.Step (L₁ ++ L₂) (L₁ ++ L₃)
          theorem FreeGroup.Red.Step.cons {α : Type u} {L₁ L₂ : List (α × Bool)} {x : α × Bool} (H : FreeGroup.Red.Step L₁ L₂) :
          FreeGroup.Red.Step (x :: L₁) (x :: L₂)
          theorem FreeAddGroup.Red.Step.cons {α : Type u} {L₁ L₂ : List (α × Bool)} {x : α × Bool} (H : FreeAddGroup.Red.Step L₁ L₂) :
          FreeAddGroup.Red.Step (x :: L₁) (x :: L₂)
          theorem FreeGroup.Red.Step.append_right {α : Type u} {L₁ L₂ L₃ : List (α × Bool)} :
          FreeGroup.Red.Step L₁ L₂FreeGroup.Red.Step (L₁ ++ L₃) (L₂ ++ L₃)
          theorem FreeAddGroup.Red.Step.append_right {α : Type u} {L₁ L₂ L₃ : List (α × Bool)} :
          FreeAddGroup.Red.Step L₁ L₂FreeAddGroup.Red.Step (L₁ ++ L₃) (L₂ ++ L₃)
          theorem FreeGroup.Red.Step.cons_left_iff {α : Type u} {L₁ L₂ : List (α × Bool)} {a : α} {b : Bool} :
          FreeGroup.Red.Step ((a, b) :: L₁) L₂ (∃ (L : List (α × Bool)), FreeGroup.Red.Step L₁ L L₂ = (a, b) :: L) L₁ = (a, !b) :: L₂
          theorem FreeAddGroup.Red.Step.cons_left_iff {α : Type u} {L₁ L₂ : List (α × Bool)} {a : α} {b : Bool} :
          FreeAddGroup.Red.Step ((a, b) :: L₁) L₂ (∃ (L : List (α × Bool)), FreeAddGroup.Red.Step L₁ L L₂ = (a, b) :: L) L₁ = (a, !b) :: L₂
          theorem FreeGroup.Red.Step.cons_cons_iff {α : Type u} {L₁ L₂ : List (α × Bool)} {p : α × Bool} :
          FreeGroup.Red.Step (p :: L₁) (p :: L₂) FreeGroup.Red.Step L₁ L₂
          theorem FreeAddGroup.Red.Step.cons_cons_iff {α : Type u} {L₁ L₂ : List (α × Bool)} {p : α × Bool} :
          theorem FreeGroup.Red.Step.append_left_iff {α : Type u} {L₁ L₂ : List (α × Bool)} (L : List (α × Bool)) :
          FreeGroup.Red.Step (L ++ L₁) (L ++ L₂) FreeGroup.Red.Step L₁ L₂
          theorem FreeAddGroup.Red.Step.append_left_iff {α : Type u} {L₁ L₂ : List (α × Bool)} (L : List (α × Bool)) :
          theorem FreeGroup.Red.Step.diamond_aux {α : Type u} {L₁ L₂ L₃ L₄ : List (α × Bool)} {x1 : α} {b1 : Bool} {x2 : α} {b2 : Bool} :
          L₁ ++ (x1, b1) :: (x1, !b1) :: L₂ = L₃ ++ (x2, b2) :: (x2, !b2) :: L₄L₁ ++ L₂ = L₃ ++ L₄ ∃ (L₅ : List (α × Bool)), FreeGroup.Red.Step (L₁ ++ L₂) L₅ FreeGroup.Red.Step (L₃ ++ L₄) L₅
          theorem FreeAddGroup.Red.Step.diamond_aux {α : Type u} {L₁ L₂ L₃ L₄ : List (α × Bool)} {x1 : α} {b1 : Bool} {x2 : α} {b2 : Bool} :
          L₁ ++ (x1, b1) :: (x1, !b1) :: L₂ = L₃ ++ (x2, b2) :: (x2, !b2) :: L₄L₁ ++ L₂ = L₃ ++ L₄ ∃ (L₅ : List (α × Bool)), FreeAddGroup.Red.Step (L₁ ++ L₂) L₅ FreeAddGroup.Red.Step (L₃ ++ L₄) L₅
          theorem FreeGroup.Red.Step.diamond {α : Type u} {L₁ L₂ L₃ L₄ : List (α × Bool)} :
          FreeGroup.Red.Step L₁ L₃FreeGroup.Red.Step L₂ L₄L₁ = L₂L₃ = L₄ ∃ (L₅ : List (α × Bool)), FreeGroup.Red.Step L₃ L₅ FreeGroup.Red.Step L₄ L₅
          theorem FreeAddGroup.Red.Step.diamond {α : Type u} {L₁ L₂ L₃ L₄ : List (α × Bool)} :
          FreeAddGroup.Red.Step L₁ L₃FreeAddGroup.Red.Step L₂ L₄L₁ = L₂L₃ = L₄ ∃ (L₅ : List (α × Bool)), FreeAddGroup.Red.Step L₃ L₅ FreeAddGroup.Red.Step L₄ L₅
          theorem FreeGroup.Red.Step.to_red {α : Type u} {L₁ L₂ : List (α × Bool)} :
          FreeGroup.Red.Step L₁ L₂FreeGroup.Red L₁ L₂
          theorem FreeAddGroup.Red.Step.to_red {α : Type u} {L₁ L₂ : List (α × Bool)} :
          FreeAddGroup.Red.Step L₁ L₂FreeAddGroup.Red L₁ L₂
          theorem FreeGroup.Red.church_rosser {α : Type u} {L₁ L₂ L₃ : List (α × Bool)} :
          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.church_rosser {α : Type u} {L₁ L₂ L₃ : List (α × Bool)} :
          FreeAddGroup.Red L₁ L₂FreeAddGroup.Red L₁ L₃Relation.Join FreeAddGroup.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 FreeGroup.Red.cons_cons {α : Type u} {L₁ L₂ : List (α × Bool)} {p : α × Bool} :
          FreeGroup.Red L₁ L₂FreeGroup.Red (p :: L₁) (p :: L₂)
          theorem FreeAddGroup.Red.cons_cons {α : Type u} {L₁ L₂ : List (α × Bool)} {p : α × Bool} :
          FreeAddGroup.Red L₁ L₂FreeAddGroup.Red (p :: L₁) (p :: L₂)
          theorem FreeGroup.Red.cons_cons_iff {α : Type u} {L₁ L₂ : List (α × Bool)} (p : α × Bool) :
          FreeGroup.Red (p :: L₁) (p :: L₂) FreeGroup.Red L₁ L₂
          theorem FreeAddGroup.Red.cons_cons_iff {α : Type u} {L₁ L₂ : List (α × Bool)} (p : α × Bool) :
          FreeAddGroup.Red (p :: L₁) (p :: L₂) FreeAddGroup.Red L₁ L₂
          theorem FreeGroup.Red.append_append_left_iff {α : Type u} {L₁ L₂ : List (α × Bool)} (L : List (α × Bool)) :
          FreeGroup.Red (L ++ L₁) (L ++ L₂) FreeGroup.Red L₁ L₂
          theorem FreeAddGroup.Red.append_append_left_iff {α : Type u} {L₁ L₂ : List (α × Bool)} (L : List (α × Bool)) :
          FreeAddGroup.Red (L ++ L₁) (L ++ L₂) FreeAddGroup.Red L₁ L₂
          theorem FreeGroup.Red.append_append {α : Type u} {L₁ L₂ L₃ L₄ : List (α × Bool)} (h₁ : FreeGroup.Red L₁ L₃) (h₂ : FreeGroup.Red L₂ L₄) :
          FreeGroup.Red (L₁ ++ L₂) (L₃ ++ L₄)
          theorem FreeAddGroup.Red.append_append {α : Type u} {L₁ L₂ L₃ L₄ : List (α × Bool)} (h₁ : FreeAddGroup.Red L₁ L₃) (h₂ : FreeAddGroup.Red L₂ L₄) :
          FreeAddGroup.Red (L₁ ++ L₂) (L₃ ++ L₄)
          theorem FreeGroup.Red.to_append_iff {α : Type u} {L L₁ L₂ : List (α × Bool)} :
          FreeGroup.Red L (L₁ ++ L₂) ∃ (L₃ : List (α × Bool)) (L₄ : List (α × Bool)), L = L₃ ++ L₄ FreeGroup.Red L₃ L₁ FreeGroup.Red L₄ L₂
          theorem FreeAddGroup.Red.to_append_iff {α : Type u} {L L₁ L₂ : List (α × Bool)} :
          FreeAddGroup.Red L (L₁ ++ L₂) ∃ (L₃ : List (α × Bool)) (L₄ : List (α × Bool)), L = L₃ ++ L₄ FreeAddGroup.Red L₃ L₁ FreeAddGroup.Red L₄ L₂
          theorem FreeGroup.Red.nil_iff {α : Type u} {L : List (α × Bool)} :
          FreeGroup.Red [] L L = []

          The empty word [] only reduces to itself.

          theorem FreeAddGroup.Red.nil_iff {α : Type u} {L : List (α × Bool)} :

          The empty word [] only reduces to itself.

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

          A letter only reduces to itself.

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

          A letter only reduces to itself.

          theorem FreeGroup.Red.cons_nil_iff_singleton {α : Type u} {L : List (α × Bool)} {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.cons_nil_iff_singleton {α : Type u} {L : List (α × Bool)} {x : α} {b : Bool} :
          FreeAddGroup.Red ((x, b) :: L) [] FreeAddGroup.Red L [(x, !b)]

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

          theorem FreeGroup.Red.red_iff_irreducible {α : Type u} {L : List (α × Bool)} {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.red_iff_irreducible {α : Type u} {L : List (α × Bool)} {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.inv_of_red_of_ne {α : Type u} {L₁ L₂ : List (α × Bool)} {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.neg_of_red_of_ne {α : Type u} {L₁ L₂ : List (α × Bool)} {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.Step.sublist {α : Type u} {L₁ L₂ : List (α × Bool)} (H : FreeGroup.Red.Step L₁ L₂) :
          L₂.Sublist L₁
          theorem FreeAddGroup.Red.Step.sublist {α : Type u} {L₁ L₂ : List (α × Bool)} (H : FreeAddGroup.Red.Step L₁ L₂) :
          L₂.Sublist L₁
          theorem FreeGroup.Red.sublist {α : Type u} {L₁ L₂ : List (α × Bool)} :
          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.sublist {α : Type u} {L₁ L₂ : List (α × Bool)} :
          FreeAddGroup.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 FreeGroup.Red.length_le {α : Type u} {L₁ L₂ : List (α × Bool)} (h : FreeGroup.Red L₁ L₂) :
          L₂.length L₁.length
          theorem FreeAddGroup.Red.length_le {α : Type u} {L₁ L₂ : List (α × Bool)} (h : FreeAddGroup.Red L₁ L₂) :
          L₂.length L₁.length
          theorem FreeGroup.Red.sizeof_of_step {α : Type u} {L₁ L₂ : List (α × Bool)} :
          FreeGroup.Red.Step L₁ L₂sizeOf L₂ < sizeOf L₁
          theorem FreeAddGroup.Red.sizeof_of_step {α : Type u} {L₁ L₂ : List (α × Bool)} :
          FreeAddGroup.Red.Step L₁ L₂sizeOf L₂ < sizeOf L₁
          theorem FreeGroup.Red.length {α : Type u} {L₁ L₂ : List (α × Bool)} (h : FreeGroup.Red L₁ L₂) :
          ∃ (n : ), L₁.length = L₂.length + 2 * n
          theorem FreeAddGroup.Red.length {α : Type u} {L₁ L₂ : List (α × Bool)} (h : FreeAddGroup.Red L₁ L₂) :
          ∃ (n : ), L₁.length = L₂.length + 2 * n
          theorem FreeGroup.Red.antisymm {α : Type u} {L₁ L₂ : List (α × Bool)} (h₁₂ : FreeGroup.Red L₁ L₂) (h₂₁ : FreeGroup.Red L₂ L₁) :
          L₁ = L₂
          theorem FreeAddGroup.Red.antisymm {α : Type u} {L₁ L₂ : List (α × Bool)} (h₁₂ : FreeAddGroup.Red L₁ L₂) (h₂₁ : FreeAddGroup.Red L₂ L₁) :
          L₁ = L₂
          theorem FreeGroup.join_red_of_step {α : Type u} {L₁ L₂ : List (α × Bool)} (h : FreeGroup.Red.Step L₁ L₂) :
          Relation.Join FreeGroup.Red L₁ L₂
          theorem FreeAddGroup.join_red_of_step {α : Type u} {L₁ L₂ : List (α × Bool)} (h : FreeAddGroup.Red.Step L₁ L₂) :
          Relation.Join FreeAddGroup.Red L₁ L₂
          theorem FreeGroup.eqvGen_step_iff_join_red {α : Type u} {L₁ L₂ : List (α × Bool)} :
          Relation.EqvGen FreeGroup.Red.Step L₁ L₂ Relation.Join FreeGroup.Red L₁ L₂
          theorem FreeAddGroup.eqvGen_step_iff_join_red {α : Type u} {L₁ L₂ : List (α × Bool)} :
          Relation.EqvGen FreeAddGroup.Red.Step L₁ L₂ Relation.Join FreeAddGroup.Red L₁ L₂
          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
          Instances For
            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.mk {α : Type u} (L : List (α × Bool)) :

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

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

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

                Equations
                Instances For
                  @[simp]
                  theorem FreeGroup.quot_mk_eq_mk {α : Type u} {L : List (α × Bool)} :
                  Quot.mk FreeGroup.Red.Step L = FreeGroup.mk L
                  @[simp]
                  theorem FreeAddGroup.quot_mk_eq_mk {α : Type u} {L : List (α × Bool)} :
                  Quot.mk FreeAddGroup.Red.Step L = FreeAddGroup.mk L
                  @[simp]
                  theorem FreeGroup.quot_lift_mk {α : Type u} {L : List (α × Bool)} (β : Type v) (f : List (α × Bool)β) (H : ∀ (L₁ L₂ : List (α × Bool)), FreeGroup.Red.Step L₁ L₂f L₁ = f L₂) :
                  @[simp]
                  theorem FreeAddGroup.quot_lift_mk {α : Type u} {L : List (α × Bool)} (β : Type v) (f : List (α × Bool)β) (H : ∀ (L₁ L₂ : List (α × Bool)), FreeAddGroup.Red.Step L₁ L₂f L₁ = f L₂) :
                  @[simp]
                  theorem FreeGroup.quot_liftOn_mk {α : Type u} {L : List (α × Bool)} (β : Type v) (f : List (α × Bool)β) (H : ∀ (L₁ L₂ : List (α × Bool)), FreeGroup.Red.Step L₁ L₂f L₁ = f L₂) :
                  @[simp]
                  theorem FreeAddGroup.quot_liftOn_mk {α : Type u} {L : List (α × Bool)} (β : Type v) (f : List (α × Bool)β) (H : ∀ (L₁ L₂ : List (α × Bool)), FreeAddGroup.Red.Step L₁ L₂f L₁ = f L₂) :
                  @[simp]
                  theorem FreeGroup.quot_map_mk {α : Type u} {L : List (α × Bool)} (β : Type v) (f : List (α × Bool)List (β × Bool)) (H : (FreeGroup.Red.Step FreeGroup.Red.Step) f f) :
                  @[simp]
                  theorem FreeAddGroup.quot_map_mk {α : Type u} {L : List (α × Bool)} (β : Type v) (f : List (α × Bool)List (β × Bool)) (H : (FreeAddGroup.Red.Step FreeAddGroup.Red.Step) f f) :
                  instance FreeGroup.instOne {α : Type u} :
                  Equations
                  Equations
                  Equations
                  • FreeGroup.instInhabited = { default := 1 }
                  Equations
                  • FreeAddGroup.instInhabited = { default := 0 }
                  Equations
                  • FreeGroup.instUniqueOfIsEmpty = id inferInstance
                  Equations
                  • FreeAddGroup.instUniqueOfIsEmpty = id inferInstance
                  instance FreeGroup.instMul {α : Type u} :
                  Equations
                  instance FreeAddGroup.instAdd {α : Type u} :
                  Equations
                  • One or more equations did not get rendered due to their size.
                  @[simp]
                  theorem FreeGroup.mul_mk {α : Type u} {L₁ L₂ : List (α × Bool)} :
                  FreeGroup.mk L₁ * FreeGroup.mk L₂ = FreeGroup.mk (L₁ ++ L₂)
                  @[simp]
                  theorem FreeAddGroup.add_mk {α : Type u} {L₁ L₂ : List (α × Bool)} :
                  def FreeGroup.invRev {α : Type u} (w : List (α × Bool)) :
                  List (α × Bool)

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

                  Equations
                  Instances For
                    def FreeAddGroup.negRev {α : Type u} (w : List (α × Bool)) :
                    List (α × Bool)

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

                    Equations
                    Instances For
                      @[simp]
                      theorem FreeGroup.invRev_length {α : Type u} {L₁ : List (α × Bool)} :
                      (FreeGroup.invRev L₁).length = L₁.length
                      @[simp]
                      theorem FreeAddGroup.negRev_length {α : Type u} {L₁ : List (α × Bool)} :
                      (FreeAddGroup.negRev L₁).length = L₁.length
                      @[simp]
                      theorem FreeGroup.invRev_invRev {α : Type u} {L₁ : List (α × Bool)} :
                      @[simp]
                      @[simp]
                      theorem FreeAddGroup.negRev_involutive {α : Type u} :
                      Function.Involutive FreeAddGroup.negRev
                      theorem FreeGroup.invRev_injective {α : Type u} :
                      Function.Injective FreeGroup.invRev
                      theorem FreeAddGroup.negRev_injective {α : Type u} :
                      Function.Injective FreeAddGroup.negRev
                      theorem FreeAddGroup.negRev_surjective {α : Type u} :
                      Function.Surjective FreeAddGroup.negRev
                      theorem FreeGroup.invRev_bijective {α : Type u} :
                      Function.Bijective FreeGroup.invRev
                      theorem FreeAddGroup.negRev_bijective {α : Type u} :
                      Function.Bijective FreeAddGroup.negRev
                      instance FreeGroup.instInv {α : Type u} :
                      Equations
                      • FreeGroup.instInv = { inv := Quot.map FreeGroup.invRev }
                      instance FreeAddGroup.instNeg {α : Type u} :
                      Equations
                      • FreeAddGroup.instNeg = { neg := Quot.map FreeAddGroup.negRev }
                      theorem FreeGroup.Red.invRev {α : Type u} {L₁ L₂ : List (α × Bool)} (h : FreeGroup.Red L₁ L₂) :
                      @[simp]
                      theorem FreeGroup.red_invRev_iff {α : Type u} {L₁ L₂ : List (α × Bool)} :
                      instance FreeGroup.instGroup {α : Type u} :
                      Equations
                      Equations
                      @[simp]
                      theorem FreeGroup.pow_mk {α : Type u} {L : List (α × Bool)} (n : ) :
                      @[simp]
                      theorem FreeAddGroup.nsmul_mk {α : Type u} {L : List (α × Bool)} (n : ) :
                      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
                        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
                          theorem FreeGroup.Red.exact {α : Type u} {L₁ L₂ : List (α × Bool)} :
                          FreeGroup.mk L₁ = FreeGroup.mk L₂ Relation.Join FreeGroup.Red L₁ L₂
                          theorem FreeAddGroup.Red.exact {α : Type u} {L₁ L₂ : List (α × Bool)} :
                          FreeAddGroup.mk L₁ = FreeAddGroup.mk L₂ Relation.Join FreeAddGroup.Red L₁ L₂
                          theorem FreeGroup.of_injective {α : Type u} :
                          Function.Injective FreeGroup.of

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

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

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

                          def FreeGroup.Lift.aux {α : Type u} {β : Type v} [Group β] (f : αβ) :
                          List (α × Bool)β

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

                          Equations
                          Instances For
                            def FreeAddGroup.Lift.aux {α : Type u} {β : Type v} [AddGroup β] (f : αβ) :
                            List (α × Bool)β

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

                            Equations
                            Instances For
                              theorem FreeGroup.Red.Step.lift {α : Type u} {L₁ L₂ : List (α × Bool)} {β : Type v} [Group β] {f : αβ} (H : FreeGroup.Red.Step L₁ L₂) :
                              theorem FreeAddGroup.Red.Step.lift {α : Type u} {L₁ L₂ : List (α × Bool)} {β : Type v} [AddGroup β] {f : αβ} (H : FreeAddGroup.Red.Step L₁ L₂) :
                              def FreeGroup.lift {α : Type u} {β : Type v} [Group β] :
                              (αβ) (FreeGroup α →* β)

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

                              Equations
                              Instances For
                                def FreeAddGroup.lift {α : Type u} {β : Type v} [AddGroup β] :
                                (αβ) (FreeAddGroup α →+ β)

                                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
                                  @[simp]
                                  theorem FreeGroup.lift_symm_apply {α : Type u} {β : Type v} [Group β] (g : FreeGroup α →* β) (a✝ : α) :
                                  FreeGroup.lift.symm g a✝ = (g FreeGroup.of) a✝
                                  @[simp]
                                  theorem FreeAddGroup.lift_symm_apply {α : Type u} {β : Type v} [AddGroup β] (g : FreeAddGroup α →+ β) (a✝ : α) :
                                  FreeAddGroup.lift.symm g a✝ = (g FreeAddGroup.of) a✝
                                  @[simp]
                                  theorem FreeGroup.lift.mk {α : Type u} {L : List (α × Bool)} {β : Type v} [Group β] {f : αβ} :
                                  (FreeGroup.lift f) (FreeGroup.mk L) = (List.map (fun (x : α × Bool) => bif x.2 then f x.1 else (f x.1)⁻¹) L).prod
                                  @[simp]
                                  theorem FreeAddGroup.lift.mk {α : Type u} {L : List (α × Bool)} {β : Type v} [AddGroup β] {f : αβ} :
                                  (FreeAddGroup.lift f) (FreeAddGroup.mk L) = (List.map (fun (x : α × Bool) => bif x.2 then f x.1 else -f x.1) L).sum
                                  @[simp]
                                  theorem FreeGroup.lift.of {α : Type u} {β : Type v} [Group β] {f : αβ} {x : α} :
                                  (FreeGroup.lift f) (FreeGroup.of x) = f x
                                  @[simp]
                                  theorem FreeAddGroup.lift.of {α : Type u} {β : Type v} [AddGroup β] {f : αβ} {x : α} :
                                  (FreeAddGroup.lift f) (FreeAddGroup.of x) = f x
                                  theorem FreeGroup.lift.unique {α : Type u} {β : Type v} [Group β] {f : αβ} (g : FreeGroup α →* β) (hg : ∀ (x : α), g (FreeGroup.of x) = f x) {x : FreeGroup α} :
                                  g x = (FreeGroup.lift f) x
                                  theorem FreeAddGroup.lift.unique {α : Type u} {β : Type v} [AddGroup β] {f : αβ} (g : FreeAddGroup α →+ β) (hg : ∀ (x : α), g (FreeAddGroup.of x) = f x) {x : FreeAddGroup α} :
                                  g x = (FreeAddGroup.lift f) x
                                  theorem FreeAddGroup.ext_hom {α : Type u} {G : Type u_1} [AddGroup G] (f g : FreeAddGroup α →+ G) (h : ∀ (a : α), f (FreeAddGroup.of a) = g (FreeAddGroup.of a)) :
                                  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} [Group G] (f g : FreeGroup α →* G) (h : ∀ (a : α), f (FreeGroup.of a) = g (FreeGroup.of a)) :
                                  f = g

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

                                  See note [partially-applied ext lemmas].

                                  theorem FreeGroup.lift_of_eq_id (α : Type u_1) :
                                  FreeGroup.lift FreeGroup.of = MonoidHom.id (FreeGroup α)
                                  theorem FreeAddGroup.lift_of_eq_id (α : Type u_1) :
                                  FreeAddGroup.lift FreeAddGroup.of = AddMonoidHom.id (FreeAddGroup α)
                                  theorem FreeGroup.lift.of_eq {α : Type u} (x : FreeGroup α) :
                                  (FreeGroup.lift FreeGroup.of) x = x
                                  theorem FreeAddGroup.lift.of_eq {α : Type u} (x : FreeAddGroup α) :
                                  (FreeAddGroup.lift FreeAddGroup.of) x = x
                                  theorem FreeGroup.lift.range_le {α : Type u} {β : Type v} [Group β] {f : αβ} {s : Subgroup β} (H : Set.range f s) :
                                  (FreeGroup.lift f).range s
                                  theorem FreeAddGroup.lift.range_le {α : Type u} {β : Type v} [AddGroup β] {f : αβ} {s : AddSubgroup β} (H : Set.range f s) :
                                  (FreeAddGroup.lift f).range s
                                  theorem FreeGroup.lift.range_eq_closure {α : Type u} {β : Type v} [Group β] {f : αβ} :
                                  (FreeGroup.lift f).range = Subgroup.closure (Set.range f)
                                  theorem FreeAddGroup.lift.range_eq_closure {α : Type u} {β : Type v} [AddGroup β] {f : αβ} :
                                  (FreeAddGroup.lift f).range = AddSubgroup.closure (Set.range f)
                                  @[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 .

                                  @[simp]
                                  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
                                    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
                                      @[simp]
                                      theorem FreeGroup.map.mk {α : Type u} {L : List (α × Bool)} {β : Type v} {f : αβ} :
                                      (FreeGroup.map f) (FreeGroup.mk L) = FreeGroup.mk (List.map (fun (x : α × Bool) => (f x.1, x.2)) L)
                                      @[simp]
                                      theorem FreeAddGroup.map.mk {α : Type u} {L : List (α × Bool)} {β : Type v} {f : αβ} :
                                      (FreeAddGroup.map f) (FreeAddGroup.mk L) = FreeAddGroup.mk (List.map (fun (x : α × Bool) => (f x.1, x.2)) L)
                                      @[simp]
                                      theorem FreeGroup.map.id {α : Type u} (x : FreeGroup α) :
                                      (FreeGroup.map id) x = x
                                      @[simp]
                                      theorem FreeAddGroup.map.id {α : Type u} (x : FreeAddGroup α) :
                                      @[simp]
                                      theorem FreeGroup.map.id' {α : Type u} (x : FreeGroup α) :
                                      (FreeGroup.map fun (z : α) => z) x = x
                                      @[simp]
                                      theorem FreeAddGroup.map.id' {α : Type u} (x : FreeAddGroup α) :
                                      (FreeAddGroup.map fun (z : α) => z) x = x
                                      theorem FreeGroup.map.comp {α : Type u} {β : Type v} {γ : Type w} (f : αβ) (g : βγ) (x : FreeGroup α) :
                                      theorem FreeAddGroup.map.comp {α : Type u} {β : Type v} {γ : Type w} (f : αβ) (g : βγ) (x : FreeAddGroup α) :
                                      @[simp]
                                      theorem FreeGroup.map.of {α : Type u} {β : Type v} {f : αβ} {x : α} :
                                      @[simp]
                                      theorem FreeAddGroup.map.of {α : Type u} {β : Type v} {f : αβ} {x : α} :
                                      theorem FreeGroup.map.unique {α : Type u} {β : Type v} {f : αβ} (g : FreeGroup α →* FreeGroup β) (hg : ∀ (x : α), g (FreeGroup.of x) = FreeGroup.of (f x)) {x : FreeGroup α} :
                                      g x = (FreeGroup.map f) x
                                      theorem FreeAddGroup.map.unique {α : Type u} {β : Type v} {f : αβ} (g : FreeAddGroup α →+ FreeAddGroup β) (hg : ∀ (x : α), g (FreeAddGroup.of x) = FreeAddGroup.of (f x)) {x : FreeAddGroup α} :
                                      theorem FreeGroup.map_eq_lift {α : Type u} {β : Type v} {f : αβ} {x : FreeGroup α} :
                                      (FreeGroup.map f) x = (FreeGroup.lift (FreeGroup.of f)) x
                                      theorem FreeAddGroup.map_eq_lift {α : Type u} {β : Type v} {f : αβ} {x : FreeAddGroup α} :
                                      (FreeAddGroup.map f) x = (FreeAddGroup.lift (FreeAddGroup.of f)) x
                                      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
                                      Instances For
                                        def FreeAddGroup.freeAddGroupCongr {α : Type u_1} {β : Type u_2} (e : α β) :

                                        Equivalent types give rise to additively equivalent additive free groups.

                                        Equations
                                        Instances For
                                          @[simp]
                                          theorem FreeGroup.freeGroupCongr_apply {α : Type u_1} {β : Type u_2} (e : α β) (a : FreeGroup α) :
                                          @[simp]
                                          theorem FreeAddGroup.freeAddGroupCongr_apply {α : Type u_1} {β : Type u_2} (e : α β) (a : FreeAddGroup α) :
                                          @[simp]
                                          theorem FreeGroup.freeGroupCongr_symm {α : Type u_1} {β : Type u_2} (e : α β) :
                                          theorem FreeGroup.freeGroupCongr_trans {α : Type u_1} {β : Type u_2} {γ : Type u_3} (e : α β) (f : β γ) :
                                          theorem FreeAddGroup.freeAddGroupCongr_trans {α : Type u_1} {β : Type u_2} {γ : Type u_3} (e : α β) (f : β γ) :
                                          def FreeGroup.prod {α : Type u} [Group α] :

                                          If α is a group, then any function from α to α extends uniquely to a homomorphism from the free group over α to α. This is the multiplicative version of FreeGroup.sum.

                                          Equations
                                          • FreeGroup.prod = FreeGroup.lift id
                                          Instances For

                                            If α is an additive group, then any function from α to α extends uniquely to an additive homomorphism from the additive free group over α to α.

                                            Equations
                                            • FreeAddGroup.sum = FreeAddGroup.lift id
                                            Instances For
                                              @[simp]
                                              theorem FreeGroup.prod_mk {α : Type u} {L : List (α × Bool)} [Group α] :
                                              FreeGroup.prod (FreeGroup.mk L) = (List.map (fun (x : α × Bool) => bif x.2 then x.1 else x.1⁻¹) L).prod
                                              @[simp]
                                              theorem FreeAddGroup.sum_mk {α : Type u} {L : List (α × Bool)} [AddGroup α] :
                                              FreeAddGroup.sum (FreeAddGroup.mk L) = (List.map (fun (x : α × Bool) => bif x.2 then x.1 else -x.1) L).sum
                                              @[simp]
                                              theorem FreeGroup.prod.of {α : Type u} [Group α] {x : α} :
                                              FreeGroup.prod (FreeGroup.of x) = x
                                              @[simp]
                                              theorem FreeAddGroup.sum.of {α : Type u} [AddGroup α] {x : α} :
                                              FreeAddGroup.sum (FreeAddGroup.of x) = x
                                              theorem FreeGroup.prod.unique {α : Type u} [Group α] (g : FreeGroup α →* α) (hg : ∀ (x : α), g (FreeGroup.of x) = x) {x : FreeGroup α} :
                                              g x = FreeGroup.prod x
                                              theorem FreeAddGroup.sum.unique {α : Type u} [AddGroup α] (g : FreeAddGroup α →+ α) (hg : ∀ (x : α), g (FreeAddGroup.of x) = x) {x : FreeAddGroup α} :
                                              g x = FreeAddGroup.sum x
                                              theorem FreeGroup.lift_eq_prod_map {α : Type u} {β : Type v} [Group β] {f : αβ} {x : FreeGroup α} :
                                              (FreeGroup.lift f) x = FreeGroup.prod ((FreeGroup.map f) x)
                                              theorem FreeAddGroup.lift_eq_sum_map {α : Type u} {β : Type v} [AddGroup β] {f : αβ} {x : FreeAddGroup α} :
                                              (FreeAddGroup.lift f) x = FreeAddGroup.sum ((FreeAddGroup.map f) x)
                                              def FreeGroup.sum {α : Type u} [AddGroup α] (x : FreeGroup α) :
                                              α

                                              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 (α × Bool)} [AddGroup α] :
                                                (FreeGroup.mk L).sum = (List.map (fun (x : α × Bool) => bif x.2 then x.1 else -x.1) L).sum
                                                @[simp]
                                                theorem FreeGroup.sum.of {α : Type u} [AddGroup α] {x : α} :
                                                (FreeGroup.of x).sum = x
                                                @[simp]
                                                theorem FreeGroup.sum.map_mul {α : Type u} [AddGroup α] {x y : FreeGroup α} :
                                                (x * y).sum = x.sum + y.sum
                                                @[simp]
                                                @[simp]
                                                theorem FreeGroup.sum.map_inv {α : Type u} [AddGroup α] {x : FreeGroup α} :
                                                x⁻¹.sum = -x.sum

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

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