File: Mathlib/GroupTheory/HNNExtension.lean

full_name: HNNExtension.con
code: /-- The relation we quotient the coproduct by to form an `HNNExtension`. -/
def HNNExtension.con (G : Type*) [Group G] (A B : Subgroup G) (φ : A ≃* B) :
    Con (G ∗ Multiplicative ℤ) 
goal: Con (G ∗ Multiplicative ℤ)

full_name: HNNExtension
code: /-- The HNN Extension of a group `G`, `HNNExtension G A B φ`. Given a group `G`, subgroups `A` and
`B` and an isomorphism `φ` of `A` and `B`, we adjoin a letter `t` to `G`, such that for
any `a ∈ A`, the conjugate of `of a` by `t` is `of (φ a)`, where `of` is the canonical
map from `G` into the `HNNExtension`.  -/
def HNNExtension (G : Type*) [Group G] (A B : Subgroup G) (φ : A ≃* B) : Type _ 
goal: Type u_1

full_name: instGroupHNNExtension
code: instance : Group (HNNExtension G A B φ) 
goal: Group (HNNExtension G A B φ)

full_name: HNNExtension.of
code: /-- The canonical embedding `G →* HNNExtension G A B φ` -/
def of : G →* HNNExtension G A B φ 
goal: G →* HNNExtension G A B φ

full_name: HNNExtension.t
code: /-- The stable letter of the `HNNExtension` -/
def t : HNNExtension G A B φ 
goal: HNNExtension G A B φ

full_name: HNNExtension.t_mul_of
code: theorem t_mul_of (a : A) :
    t * (of (a : G) : HNNExtension G A B φ) = of (φ a : G) * t 
goal: HNNExtension.t * HNNExtension.of ↑a = HNNExtension.of ↑(φ a) * HNNExtension.t

full_name: HNNExtension.of_mul_t
code: theorem of_mul_t (b : B) :
    (of (b : G) : HNNExtension G A B φ) * t = t * of (φ.symm b : G) 
goal: HNNExtension.of ↑b * HNNExtension.t = HNNExtension.t * HNNExtension.of ↑(φ.symm b)

full_name: HNNExtension.equiv_eq_conj
code: theorem equiv_eq_conj (a : A) :
    (of (φ a : G) : HNNExtension G A B φ) = t * of (a : G) * t⁻¹ 
goal: HNNExtension.of ↑(φ a) = HNNExtension.t * HNNExtension.of ↑a * HNNExtension.t⁻¹

full_name: HNNExtension.equiv_symm_eq_conj
code: theorem equiv_symm_eq_conj (b : B) :
    (of (φ.symm b : G) : HNNExtension G A B φ) = t⁻¹ * of (b : G) * t 
goal: HNNExtension.of ↑(φ.symm b) = HNNExtension.t⁻¹ * HNNExtension.of ↑b * HNNExtension.t

full_name: HNNExtension.inv_t_mul_of
code: theorem inv_t_mul_of (b : B) :
    t⁻¹ * (of (b : G) : HNNExtension G A B φ) = of (φ.symm b : G) * t⁻¹ 
goal: HNNExtension.t⁻¹ * HNNExtension.of ↑b = HNNExtension.of ↑(φ.symm b) * HNNExtension.t⁻¹

full_name: HNNExtension.of_mul_inv_t
code: theorem of_mul_inv_t (a : A) :
    (of (a : G) : HNNExtension G A B φ) * t⁻¹ = t⁻¹ * of (φ a : G) 
goal: HNNExtension.of ↑a * HNNExtension.t⁻¹ = HNNExtension.t⁻¹ * HNNExtension.of ↑(φ a)

full_name: HNNExtension.lift
code: /-- Define a function `HNNExtension G A B φ →* H`, by defining it on `G` and `t` -/
def lift (f : G →* H) (x : H) (hx : ∀ a : A, x * f ↑a = f (φ a : G) * x) :
    HNNExtension G A B φ →* H 
goal: HNNExtension G A B φ →* H

full_name: HNNExtension.lift_t
code: @[simp]
theorem lift_t (f : G →* H) (x : H) (hx : ∀ a : A, x * f ↑a = f (φ a : G) * x) :
    lift f x hx t = x 
goal: (HNNExtension.lift f x hx) HNNExtension.t = x

full_name: HNNExtension.lift_of
code: @[simp]
theorem lift_of (f : G →* H) (x : H) (hx : ∀ a : A, x * f ↑a = f (φ a : G) * x) (g : G) :
    lift f x hx (of g) = f g 
goal: (HNNExtension.lift f x hx) (HNNExtension.of g) = f g

full_name: HNNExtension.hom_ext
code: @[ext high]
theorem hom_ext {f g : HNNExtension G A B φ →* M}
    (hg : f.comp of = g.comp of) (ht : f t = g t) : f = g 
goal: f = g

full_name: HNNExtension.induction_on
code: @[elab_as_elim]
theorem induction_on {motive : HNNExtension G A B φ → Prop}
    (x : HNNExtension G A B φ) (of : ∀ g, motive (of g))
    (t : motive t) (mul : ∀ x y, motive x → motive y → motive (x * y))
    (inv : ∀ x, motive x → motive x⁻¹) : motive x 
goal: motive x

full_name: HNNExtension.toSubgroup
code: /-- To avoid duplicating code, we define `toSubgroup A B u` and `toSubgroupEquiv u`
where `u : ℤˣ` is `1` or `-1`. `toSubgroup A B u` is `A` when `u = 1` and `B` when `u = -1`,
and `toSubgroupEquiv` is `φ` when `u = 1` and `φ⁻¹` when `u = -1`. `toSubgroup u` is the subgroup
such that for any `a ∈ toSubgroup u`, `t ^ (u : ℤ) * a = toSubgroupEquiv a * t ^ (u : ℤ)`. -/
def toSubgroup (u : ℤˣ) : Subgroup G 
goal: Subgroup G

full_name: HNNExtension.toSubgroup_one
code: @[simp]
theorem toSubgroup_one : toSubgroup A B 1 = A 
goal: HNNExtension.toSubgroup A B 1 = A

full_name: HNNExtension.toSubgroup_neg_one
code: @[simp]
theorem toSubgroup_neg_one : toSubgroup A B (-1) = B 
goal: HNNExtension.toSubgroup A B (-1) = B

full_name: HNNExtension.toSubgroupEquiv
code: /-- To avoid duplicating code, we define `toSubgroup A B u` and `toSubgroupEquiv u`
where `u : ℤˣ` is `1` or `-1`. `toSubgroup A B u` is `A` when `u = 1` and `B` when `u = -1`,
and `toSubgroupEquiv` is the group ismorphism from `toSubgroup A B u` to `toSubgroup A B (-u)`.
It is defined to be `φ` when `u = 1` and `φ⁻¹` when `u = -1`. -/
def toSubgroupEquiv (u : ℤˣ) : toSubgroup A B u ≃* toSubgroup A B (-u) 
goal: ↥(HNNExtension.toSubgroup A B u) ≃* ↥(HNNExtension.toSubgroup A B (-u))

full_name: HNNExtension.toSubgroupEquiv_one
code: @[simp]
theorem toSubgroupEquiv_one : toSubgroupEquiv φ 1 = φ 
goal: HNNExtension.toSubgroupEquiv φ 1 = φ

full_name: HNNExtension.toSubgroupEquiv_neg_one
code: @[simp]
theorem toSubgroupEquiv_neg_one : toSubgroupEquiv φ (-1) = φ.symm 
goal: HNNExtension.toSubgroupEquiv φ (-1) = φ.symm

full_name: HNNExtension.toSubgroupEquiv_neg_apply
code: @[simp]
theorem toSubgroupEquiv_neg_apply (u : ℤˣ) (a : toSubgroup A B u) :
    (toSubgroupEquiv φ (-u) (toSubgroupEquiv φ u a) : G) = a 
goal: ↑((HNNExtension.toSubgroupEquiv φ (-u)) ((HNNExtension.toSubgroupEquiv φ u) a)) = ↑a

full_name: HNNExtension.NormalWord.TransversalPair.compl
code: /-- To put word in the HNN Extension into a normal form, we must choose an element of each right
coset of both `A` and `B`, such that the chosen element of the subgroup itself is `1`. -/
structure TransversalPair : Type _ :=
  /-- The transversal of each subgroup -/
  set : ℤˣ → Set G
  /-- We have exactly one element of each coset of the subgroup -/
  compl : ∀ u, IsComplement (toSubgroup A B u : Subgroup G) (set u)
goal: Subgroup.IsComplement (↑(HNNExtension.toSubgroup A B u)) (self.set u)

full_name: HNNExtension.NormalWord.TransversalPair
code: /-- To put word in the HNN Extension into a normal form, we must choose an element of each right
coset of both `A` and `B`, such that the chosen element of the subgroup itself is `1`. -/
structure TransversalPair : Type _ :=
  /-- The transversal of each subgroup -/
  set : ℤˣ → Set G
  /-- We have exactly one element of each coset of the subgroup -/
  compl : ∀ u, IsComplement (toSubgroup A B u : Subgroup G) (set u)
goal: Type u_1

full_name: HNNExtension.NormalWord.TransversalPair.set
code: /-- To put word in the HNN Extension into a normal form, we must choose an element of each right
coset of both `A` and `B`, such that the chosen element of the subgroup itself is `1`. -/
structure TransversalPair : Type _ :=
  /-- The transversal of each subgroup -/
  set : ℤˣ → Set G
  /-- We have exactly one element of each coset of the subgroup -/
  compl : ∀ u, IsComplement (toSubgroup A B u : Subgroup G) (set u)
goal: ℤˣ → Set G

full_name: HNNExtension.NormalWord.TransversalPair.nonempty
code: instance TransversalPair.nonempty : Nonempty (TransversalPair G A B) 
goal: Nonempty (HNNExtension.NormalWord.TransversalPair G A B)

full_name: HNNExtension.NormalWord.ReducedWord.chain
code: /-- A reduced word is a `head`, which is an element of `G`, followed by the product list of pairs.
There should also be no sequences of the form `t^u * g * t^-u`, where `g` is in
`toSubgroup A B u` This is a less strict condition than required for `NormalWord`. -/
structure ReducedWord : Type _ :=
  /-- Every `ReducedWord` is the product of an element of the group and a word made up
  of letters each of which is in the transversal. `head` is that element of the base group. -/
  head : G
  /-- The list of pairs `(ℤˣ × G)`, where each pair `(u, g)` represents the element `t^u * g` of
  `HNNExtension G A B φ` -/
  toList : List (ℤˣ × G)
  /-- There are no sequences of the form `t^u * g * t^-u` where `g ∈ toSubgroup A B u` -/
  chain : toList.Chain' (fun a b => a.2 ∈ toSubgroup A B a.1 → a.1 = b.1)
goal: List.Chain' (fun a b => a.2 ∈ HNNExtension.toSubgroup A B a.1 → a.1 = b.1) self.toList

full_name: HNNExtension.NormalWord.ReducedWord
code: /-- A reduced word is a `head`, which is an element of `G`, followed by the product list of pairs.
There should also be no sequences of the form `t^u * g * t^-u`, where `g` is in
`toSubgroup A B u` This is a less strict condition than required for `NormalWord`. -/
structure ReducedWord : Type _ :=
  /-- Every `ReducedWord` is the product of an element of the group and a word made up
  of letters each of which is in the transversal. `head` is that element of the base group. -/
  head : G
  /-- The list of pairs `(ℤˣ × G)`, where each pair `(u, g)` represents the element `t^u * g` of
  `HNNExtension G A B φ` -/
  toList : List (ℤˣ × G)
  /-- There are no sequences of the form `t^u * g * t^-u` where `g ∈ toSubgroup A B u` -/
  chain : toList.Chain' (fun a b => a.2 ∈ toSubgroup A B a.1 → a.1 = b.1)
goal: Type u_1

full_name: HNNExtension.NormalWord.ReducedWord.head
code: /-- A reduced word is a `head`, which is an element of `G`, followed by the product list of pairs.
There should also be no sequences of the form `t^u * g * t^-u`, where `g` is in
`toSubgroup A B u` This is a less strict condition than required for `NormalWord`. -/
structure ReducedWord : Type _ :=
  /-- Every `ReducedWord` is the product of an element of the group and a word made up
  of letters each of which is in the transversal. `head` is that element of the base group. -/
  head : G
  /-- The list of pairs `(ℤˣ × G)`, where each pair `(u, g)` represents the element `t^u * g` of
  `HNNExtension G A B φ` -/
  toList : List (ℤˣ × G)
  /-- There are no sequences of the form `t^u * g * t^-u` where `g ∈ toSubgroup A B u` -/
  chain : toList.Chain' (fun a b => a.2 ∈ toSubgroup A B a.1 → a.1 = b.1)
goal: G

full_name: HNNExtension.NormalWord.ReducedWord.toList
code: /-- A reduced word is a `head`, which is an element of `G`, followed by the product list of pairs.
There should also be no sequences of the form `t^u * g * t^-u`, where `g` is in
`toSubgroup A B u` This is a less strict condition than required for `NormalWord`. -/
structure ReducedWord : Type _ :=
  /-- Every `ReducedWord` is the product of an element of the group and a word made up
  of letters each of which is in the transversal. `head` is that element of the base group. -/
  head : G
  /-- The list of pairs `(ℤˣ × G)`, where each pair `(u, g)` represents the element `t^u * g` of
  `HNNExtension G A B φ` -/
  toList : List (ℤˣ × G)
  /-- There are no sequences of the form `t^u * g * t^-u` where `g ∈ toSubgroup A B u` -/
  chain : toList.Chain' (fun a b => a.2 ∈ toSubgroup A B a.1 → a.1 = b.1)
goal: List (ℤˣ × G)

full_name: HNNExtension.NormalWord.ReducedWord.empty_head
code: /-- The empty reduced word. -/
@[simps]
def ReducedWord.empty : ReducedWord G A B 
goal: (HNNExtension.NormalWord.ReducedWord.empty G A B).head = 1

full_name: HNNExtension.NormalWord.ReducedWord.empty
code: /-- The empty reduced word. -/
@[simps]
def ReducedWord.empty : ReducedWord G A B 
goal: HNNExtension.NormalWord.ReducedWord G A B

full_name: HNNExtension.NormalWord.ReducedWord.empty_toList
code: /-- The empty reduced word. -/
@[simps]
def ReducedWord.empty : ReducedWord G A B 
goal: (HNNExtension.NormalWord.ReducedWord.empty G A B).toList = []

full_name: HNNExtension.NormalWord.ReducedWord.prod
code: /-- The product of a `ReducedWord` as an element of the `HNNExtension` -/
def ReducedWord.prod : ReducedWord G A B → HNNExtension G A B φ 
goal: HNNExtension.NormalWord.ReducedWord G A B → HNNExtension G A B φ

full_name: HNNExtension.NormalWord.mem_set
code: /-- Given a `TransversalPair`, we can make a normal form for words in the `HNNExtension G A B φ`.
The normal form is a `head`, which is an element of `G`, followed by the product list of pairs,
`t ^ u * g`, where `u` is `1` or `-1` and `g` is the chosen element of its right coset of
`toSubgroup A B u`. There should also be no sequences of the form `t^u * g * t^-u`
where `g ∈ toSubgroup A B u` -/
structure _root_.HNNExtension.NormalWord (d : TransversalPair G A B)
    extends ReducedWord G A B : Type _ :=
  /-- Every element `g : G` in the list is the chosen element of its coset -/
  mem_set : ∀ (u : ℤˣ) (g : G), (u, g) ∈ toList → g ∈ d.set u
goal: (u, g) ∈ self.toList → g ∈ d.set u

full_name: HNNExtension.NormalWord
code: /-- Given a `TransversalPair`, we can make a normal form for words in the `HNNExtension G A B φ`.
The normal form is a `head`, which is an element of `G`, followed by the product list of pairs,
`t ^ u * g`, where `u` is `1` or `-1` and `g` is the chosen element of its right coset of
`toSubgroup A B u`. There should also be no sequences of the form `t^u * g * t^-u`
where `g ∈ toSubgroup A B u` -/
structure _root_.HNNExtension.NormalWord (d : TransversalPair G A B)
    extends ReducedWord G A B : Type _ :=
  /-- Every element `g : G` in the list is the chosen element of its coset -/
  mem_set : ∀ (u : ℤˣ) (g : G), (u, g) ∈ toList → g ∈ d.set u
goal: Type u_1

full_name: HNNExtension.NormalWord.ext
code: @[ext]
theorem ext {w w' : NormalWord d}
    (h1 : w.head = w'.head) (h2 : w.toList = w'.toList) : w = w' 
goal: w = w'

full_name: HNNExtension.NormalWord.empty_toList
code: /-- The empty word -/
@[simps]
def empty : NormalWord d 
goal: HNNExtension.NormalWord.empty.toList = []

full_name: HNNExtension.NormalWord.empty_head
code: /-- The empty word -/
@[simps]
def empty : NormalWord d 
goal: HNNExtension.NormalWord.empty.head = 1

full_name: HNNExtension.NormalWord.empty
code: /-- The empty word -/
@[simps]
def empty : NormalWord d 
goal: HNNExtension.NormalWord d

full_name: HNNExtension.NormalWord.ofGroup_head
code: /-- The `NormalWord` representing an element `g` of the group `G`, which is just the element `g`
itself. -/
@[simps]
def ofGroup (g : G) : NormalWord d 
goal: (HNNExtension.NormalWord.ofGroup g).head = g

full_name: HNNExtension.NormalWord.ofGroup_toList
code: /-- The `NormalWord` representing an element `g` of the group `G`, which is just the element `g`
itself. -/
@[simps]
def ofGroup (g : G) : NormalWord d 
goal: (HNNExtension.NormalWord.ofGroup g).toList = []

full_name: HNNExtension.NormalWord.ofGroup
code: /-- The `NormalWord` representing an element `g` of the group `G`, which is just the element `g`
itself. -/
@[simps]
def ofGroup (g : G) : NormalWord d 
goal: HNNExtension.NormalWord d

full_name: HNNExtension.NormalWord.instInhabited
code: instance : Inhabited (NormalWord d) 
goal: Inhabited (HNNExtension.NormalWord d)

full_name: HNNExtension.NormalWord.instMulAction
code: instance : MulAction G (NormalWord d) 
goal: MulAction G (HNNExtension.NormalWord d)

full_name: HNNExtension.NormalWord.group_smul_def
code: theorem group_smul_def (g : G) (w : NormalWord d) :
    g • w = { w with head := g * w.head } 
goal: g • w = { head := g * w.head, toList := w.toList, chain := ⋯, mem_set := ⋯ }

full_name: HNNExtension.NormalWord.group_smul_head
code: @[simp]
theorem group_smul_head (g : G) (w : NormalWord d) : (g • w).head = g * w.head 
goal: (g • w).head = g * w.head

full_name: HNNExtension.NormalWord.group_smul_toList
code: @[simp]
theorem group_smul_toList (g : G) (w : NormalWord d) : (g • w).toList = w.toList 
goal: (g • w).toList = w.toList

full_name: HNNExtension.NormalWord.instFaithfulSMul
code: instance : FaithfulSMul G (NormalWord d) 
goal: FaithfulSMul G (HNNExtension.NormalWord d)

full_name: HNNExtension.NormalWord.cons
code: /-- A constructor to append an element `g` of `G` and `u : ℤˣ` to a word `w` with sufficient
hypotheses that no normalization or cancellation need take place for the result to be in normal form
-/
@[simps]
def cons (g : G) (u : ℤˣ) (w : NormalWord d) (h1 : w.head ∈ d.set u)
    (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ toSubgroup A B u → u = u') :
    NormalWord d 
goal: HNNExtension.NormalWord d

full_name: HNNExtension.NormalWord.cons_toList
code: /-- A constructor to append an element `g` of `G` and `u : ℤˣ` to a word `w` with sufficient
hypotheses that no normalization or cancellation need take place for the result to be in normal form
-/
@[simps]
def cons (g : G) (u : ℤˣ) (w : NormalWord d) (h1 : w.head ∈ d.set u)
    (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ toSubgroup A B u → u = u') :
    NormalWord d 
goal: (HNNExtension.NormalWord.cons g u w h1 h2).toList = (u, w.head) :: w.toList

full_name: HNNExtension.NormalWord.cons_head
code: /-- A constructor to append an element `g` of `G` and `u : ℤˣ` to a word `w` with sufficient
hypotheses that no normalization or cancellation need take place for the result to be in normal form
-/
@[simps]
def cons (g : G) (u : ℤˣ) (w : NormalWord d) (h1 : w.head ∈ d.set u)
    (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ toSubgroup A B u → u = u') :
    NormalWord d 
goal: (HNNExtension.NormalWord.cons g u w h1 h2).head = g

full_name: HNNExtension.NormalWord.consRecOn
code: /-- A recursor to induct on a `NormalWord`, by proving the propert is preserved under `cons` -/
@[elab_as_elim]
def consRecOn {motive : NormalWord d → Sort*} (w : NormalWord d)
    (ofGroup : ∀g, motive (ofGroup g))
    (cons : ∀ (g : G) (u : ℤˣ) (w : NormalWord d) (h1 : w.head ∈ d.set u)
      (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?,
        w.head ∈ toSubgroup A B u → u = u'),
      motive w → motive (cons g u w h1 h2)) : motive w 
goal: motive w

full_name: HNNExtension.NormalWord.consRecOn_ofGroup
code: @[simp]
theorem consRecOn_ofGroup {motive : NormalWord d → Sort*}
    (g : G) (ofGroup : ∀g, motive (ofGroup g))
    (cons : ∀ (g : G) (u : ℤˣ) (w : NormalWord d) (h1 : w.head ∈ d.set u)
      (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head
        ∈ toSubgroup A B u → u = u'),
      motive w → motive (cons g u w h1 h2)) :
    consRecOn (.ofGroup g) ofGroup cons = ofGroup g 
goal: HNNExtension.NormalWord.consRecOn (HNNExtension.NormalWord.ofGroup g) ofGroup cons = ofGroup g

full_name: HNNExtension.NormalWord.consRecOn_cons
code: @[simp]
theorem consRecOn_cons {motive : NormalWord d → Sort*}
    (g : G) (u : ℤˣ) (w : NormalWord d) (h1 : w.head ∈ d.set u)
    (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ toSubgroup A B u → u = u')
    (ofGroup : ∀g, motive (ofGroup g))
    (cons : ∀ (g : G) (u : ℤˣ) (w : NormalWord d) (h1 : w.head ∈ d.set u)
      (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?,
        w.head ∈ toSubgroup A B u → u = u'),
      motive w → motive (cons g u w h1 h2)) :
    consRecOn (.cons g u w h1 h2) ofGroup cons = cons g u w h1 h2
      (consRecOn w ofGroup cons) 
goal: HNNExtension.NormalWord.consRecOn (HNNExtension.NormalWord.cons g u w h1 h2) ofGroup cons =
  cons g u w h1 h2 (HNNExtension.NormalWord.consRecOn w ofGroup cons)

full_name: HNNExtension.NormalWord.smul_cons
code: @[simp]
theorem smul_cons (g₁ g₂ : G) (u : ℤˣ) (w : NormalWord d) (h1 : w.head ∈ d.set u)
    (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ toSubgroup A B u → u = u') :
    g₁ • cons g₂ u w h1 h2 = cons (g₁ * g₂) u w h1 h2 
goal: g₁ • HNNExtension.NormalWord.cons g₂ u w h1 h2 = HNNExtension.NormalWord.cons (g₁ * g₂) u w h1 h2

full_name: HNNExtension.NormalWord.smul_ofGroup
code: @[simp]
theorem smul_ofGroup (g₁ g₂ : G) :
    g₁ • (ofGroup g₂ : NormalWord d) = ofGroup (g₁ * g₂) 
goal: g₁ • HNNExtension.NormalWord.ofGroup g₂ = HNNExtension.NormalWord.ofGroup (g₁ * g₂)

full_name: HNNExtension.NormalWord.unitsSMulGroup
code: /-- The action of `t^u` on `ofGroup g`. The normal form will be
`a * t^u * g'` where `a ∈ toSubgroup A B (-u)` -/
noncomputable def unitsSMulGroup (u : ℤˣ) (g : G) :
    (toSubgroup A B (-u)) × d.set u 
goal: ↥(HNNExtension.toSubgroup A B (-u)) × ↑(d.set u)

full_name: HNNExtension.NormalWord.unitsSMulGroup_snd
code: theorem unitsSMulGroup_snd (u : ℤˣ) (g : G) :
    (unitsSMulGroup φ d u g).2 = ((d.compl u).equiv g).2 
goal: (HNNExtension.NormalWord.unitsSMulGroup φ d u g).2 = (⋯.equiv g).2

full_name: HNNExtension.NormalWord.Cancels
code: /-- `Cancels u w` is a predicate expressing whether `t^u` cancels with some occurence
of `t^-u` when when we multiply `t^u` by `w`. -/
def Cancels (u : ℤˣ) (w : NormalWord d) : Prop 
goal: Prop

full_name: HNNExtension.NormalWord.unitsSMulWithCancel
code: /-- Multiplying `t^u` by `w` in the special case where cancellation happens -/
def unitsSMulWithCancel (u : ℤˣ) (w : NormalWord d) : Cancels u w → NormalWord d 
goal: HNNExtension.NormalWord.Cancels u w → HNNExtension.NormalWord d

full_name: HNNExtension.NormalWord.unitsSMul
code: /-- Multiplying `t^u` by a `NormalWord`, `w` and putting the result in normal form. -/
noncomputable def unitsSMul (u : ℤˣ) (w : NormalWord d) : NormalWord d 
goal: HNNExtension.NormalWord d

full_name: HNNExtension.NormalWord.not_cancels_of_cons_hyp
code: /-- A condition for not cancelling whose hypothese are the same as those of the `cons` function. -/
theorem not_cancels_of_cons_hyp (u : ℤˣ) (w : NormalWord d)
    (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?,
      w.head ∈ toSubgroup A B u → u = u') :
    ¬ Cancels u w 
goal: ¬HNNExtension.NormalWord.Cancels u w

full_name: HNNExtension.NormalWord.unitsSMul_cancels_iff
code: theorem unitsSMul_cancels_iff (u : ℤˣ) (w : NormalWord d) :
    Cancels (-u) (unitsSMul φ u w) ↔ ¬ Cancels u w 
goal: HNNExtension.NormalWord.Cancels (-u) (HNNExtension.NormalWord.unitsSMul φ u w) ↔ ¬HNNExtension.NormalWord.Cancels u w

full_name: HNNExtension.NormalWord.unitsSMul_neg
code: theorem unitsSMul_neg (u : ℤˣ) (w : NormalWord d) :
    unitsSMul φ (-u) (unitsSMul φ u w) = w 
goal: HNNExtension.NormalWord.unitsSMul φ (-u) (HNNExtension.NormalWord.unitsSMul φ u w) = w

full_name: HNNExtension.NormalWord.unitsSMulEquiv_apply
code: /-- the equivalence given by multiplication on the left by `t`  -/
@[simps]
noncomputable def unitsSMulEquiv : NormalWord d ≃ NormalWord d 
goal: (HNNExtension.NormalWord.unitsSMulEquiv φ) w = HNNExtension.NormalWord.unitsSMul φ 1 w

full_name: HNNExtension.NormalWord.unitsSMulEquiv
code: /-- the equivalence given by multiplication on the left by `t`  -/
@[simps]
noncomputable def unitsSMulEquiv : NormalWord d ≃ NormalWord d 
goal: HNNExtension.NormalWord d ≃ HNNExtension.NormalWord d

full_name: HNNExtension.NormalWord.unitsSMulEquiv_symm_apply
code: /-- the equivalence given by multiplication on the left by `t`  -/
@[simps]
noncomputable def unitsSMulEquiv : NormalWord d ≃ NormalWord d 
goal: (HNNExtension.NormalWord.unitsSMulEquiv φ).symm w = HNNExtension.NormalWord.unitsSMul φ (-1) w

full_name: HNNExtension.NormalWord.unitsSMul_one_group_smul
code: theorem unitsSMul_one_group_smul (g : A) (w : NormalWord d) :
    unitsSMul φ 1 ((g : G) • w) = (φ g : G) • (unitsSMul φ 1 w) 
goal: HNNExtension.NormalWord.unitsSMul φ 1 (↑g • w) = ↑(φ g) • HNNExtension.NormalWord.unitsSMul φ 1 w

full_name: HNNExtension.NormalWord.instMulAction_1
code: noncomputable instance : MulAction (HNNExtension G A B φ) (NormalWord d) 
goal: MulAction (HNNExtension G A B φ) (HNNExtension.NormalWord d)

full_name: HNNExtension.NormalWord.prod_group_smul
code: @[simp]
theorem prod_group_smul (g : G) (w : NormalWord d) :
    (g • w).prod φ = of g * (w.prod φ) 
goal: HNNExtension.NormalWord.ReducedWord.prod φ (g • w).toReducedWord =
  HNNExtension.of g * HNNExtension.NormalWord.ReducedWord.prod φ w.toReducedWord

full_name: HNNExtension.NormalWord.of_smul_eq_smul
code: theorem of_smul_eq_smul (g : G) (w : NormalWord d) :
    (of g : HNNExtension G A B φ) • w = g • w 
goal: HNNExtension.of g • w = g • w

full_name: HNNExtension.NormalWord.t_smul_eq_unitsSMul
code: theorem t_smul_eq_unitsSMul (w : NormalWord d) :
    (t : HNNExtension G A B φ) • w = unitsSMul φ 1 w 
goal: HNNExtension.t • w = HNNExtension.NormalWord.unitsSMul φ 1 w

full_name: HNNExtension.NormalWord.t_pow_smul_eq_unitsSMul
code: theorem t_pow_smul_eq_unitsSMul (u : ℤˣ) (w : NormalWord d) :
    (t ^ (u : ℤ) : HNNExtension G A B φ) • w = unitsSMul φ u w 
goal: HNNExtension.t ^ ↑u • w = HNNExtension.NormalWord.unitsSMul φ u w

full_name: HNNExtension.NormalWord.prod_cons
code: @[simp]
theorem prod_cons (g : G) (u : ℤˣ) (w : NormalWord d) (h1 : w.head ∈ d.set u)
    (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?,
      w.head ∈ toSubgroup A B u → u = u') :
    (cons g u w h1 h2).prod φ = of g * (t ^ (u : ℤ) * w.prod φ) 
goal: HNNExtension.NormalWord.ReducedWord.prod φ (HNNExtension.NormalWord.cons g u w h1 h2).toReducedWord =
  HNNExtension.of g * (HNNExtension.t ^ ↑u * HNNExtension.NormalWord.ReducedWord.prod φ w.toReducedWord)

full_name: HNNExtension.NormalWord.prod_unitsSMul
code: theorem prod_unitsSMul (u : ℤˣ) (w : NormalWord d) :
    (unitsSMul φ u w).prod φ = (t^(u : ℤ) * w.prod φ : HNNExtension G A B φ) 
goal: HNNExtension.NormalWord.ReducedWord.prod φ (HNNExtension.NormalWord.unitsSMul φ u w).toReducedWord =
  HNNExtension.t ^ ↑u * HNNExtension.NormalWord.ReducedWord.prod φ w.toReducedWord

full_name: HNNExtension.NormalWord.prod_empty
code: @[simp]
theorem prod_empty : (empty : NormalWord d).prod φ = 1 
goal: HNNExtension.NormalWord.ReducedWord.prod φ HNNExtension.NormalWord.empty.toReducedWord = 1

full_name: HNNExtension.NormalWord.prod_smul
code: @[simp]
theorem prod_smul (g : HNNExtension G A B φ) (w : NormalWord d) :
    (g • w).prod φ = g * w.prod φ 
goal: HNNExtension.NormalWord.ReducedWord.prod φ (g • w).toReducedWord =
  g * HNNExtension.NormalWord.ReducedWord.prod φ w.toReducedWord

full_name: HNNExtension.NormalWord.prod_smul_empty
code: @[simp]
theorem prod_smul_empty (w : NormalWord d) :
    (w.prod φ) • empty = w 
goal: HNNExtension.NormalWord.ReducedWord.prod φ w.toReducedWord • HNNExtension.NormalWord.empty = w

full_name: HNNExtension.NormalWord.equiv
code: /-- The equivalence between elements of the HNN extension and words in normal form. -/
noncomputable def equiv : HNNExtension G A B φ ≃ NormalWord d 
goal: HNNExtension G A B φ ≃ HNNExtension.NormalWord d

full_name: HNNExtension.NormalWord.prod_injective
code: theorem prod_injective : Injective
    (fun w => w.prod φ : NormalWord d → HNNExtension G A B φ) 
goal: Function.Injective fun w => HNNExtension.NormalWord.ReducedWord.prod φ w.toReducedWord

full_name: HNNExtension.NormalWord.instFaithfulSMul_1
code: instance : FaithfulSMul (HNNExtension G A B φ) (NormalWord d) 
goal: FaithfulSMul (HNNExtension G A B φ) (HNNExtension.NormalWord d)

full_name: HNNExtension.of_injective
code: theorem of_injective : Function.Injective (of : G → HNNExtension G A B φ) 
goal: Function.Injective ⇑HNNExtension.of

full_name: HNNExtension.ReducedWord.exists_normalWord_prod_eq
code: theorem exists_normalWord_prod_eq
    (d : TransversalPair G A B) (w : ReducedWord G A B) :
    ∃ w' : NormalWord d, w'.prod φ = w.prod φ ∧
      w'.toList.map Prod.fst = w.toList.map Prod.fst ∧
      ∀ u ∈ w.toList.head?.map Prod.fst,
      w'.head⁻¹ * w.head ∈ toSubgroup A B (-u) 
goal: ∃ w',
  HNNExtension.NormalWord.ReducedWord.prod φ w'.toReducedWord = HNNExtension.NormalWord.ReducedWord.prod φ w ∧
    List.map Prod.fst w'.toList = List.map Prod.fst w.toList ∧
      ∀ u ∈ Option.map Prod.fst w.toList.head?, w'.head⁻¹ * w.head ∈ HNNExtension.toSubgroup A B (-u)

full_name: HNNExtension.ReducedWord.map_fst_eq_and_of_prod_eq
code: /-- Two reduced words representing the same element of the `HNNExtension G A B φ` have the same
length corresponding list, with the same pattern of occurences of `t^1` and `t^(-1)`,
and also the `head` is in the same left coset of `toSubgroup A B (-u)`, where `u : ℤˣ`
is the exponent of the first occurence of `t` in the word. -/
theorem map_fst_eq_and_of_prod_eq {w₁ w₂ : ReducedWord G A B}
    (hprod : w₁.prod φ = w₂.prod φ) :
    w₁.toList.map Prod.fst = w₂.toList.map Prod.fst ∧
     ∀ u ∈ w₁.toList.head?.map Prod.fst,
      w₁.head⁻¹ * w₂.head ∈ toSubgroup A B (-u) 
goal: List.map Prod.fst w₁.toList = List.map Prod.fst w₂.toList ∧
  ∀ u ∈ Option.map Prod.fst w₁.toList.head?, w₁.head⁻¹ * w₂.head ∈ HNNExtension.toSubgroup A B (-u)

full_name: HNNExtension.ReducedWord.toList_eq_nil_of_mem_of_range
code: /-- **Britton's Lemma**. Any reduced word whose product is an element of `G`, has no
occurences of `t`.  -/
theorem toList_eq_nil_of_mem_of_range (w : ReducedWord G A B)
    (hw : w.prod φ ∈ (of.range : Subgroup (HNNExtension G A B φ))) :
    w.toList = [] 
goal: w.toList = []