/-- The special case that more or less by definition `QuaternionGroup 0` is isomorphic to the
infinite dihedral group. -/
def quaternionGroupZeroEquivDihedralGroupZero : QuaternionGroup 0 ≃* DihedralGroup 0 where
  toFun i :=
    -- Porting note: Originally `QuaternionGroup.recOn i DihedralGroup.r DihedralGroup.sr`
    match i with
    | a j => DihedralGroup.r j
    | xa j => DihedralGroup.sr j
  invFun i :=
    match i with
    | DihedralGroup.r j => a j
    | DihedralGroup.sr j => xa j
  left_inv := by rintro (k | k) <;> rfl
  right_inv := by rintro (k | k) <;> rfl
  map_mul' := by 

Proof state:
n : ℕ
⊢ ∀ (x y : QuaternionGroup 0),
    Equiv.toFun
        {
          toFun := fun i =>
            match i with
            | a j => DihedralGroup.r j
            | xa j => DihedralGroup.sr j,
          invFun := fun i =>
            match i with
            | DihedralGroup.r j => a j
            | DihedralGroup.sr j => xa j,
          left_inv :=
            (_ :
              ∀ (x : QuaternionGroup 0),
                (fun i =>
                      match i with
                      | DihedralGroup.r j => a j
                      | DihedralGroup.sr j => xa j)
                    ((fun i =>
                        match i with
                        | a j => DihedralGroup.r j
                        | xa j => DihedralGroup.sr j)
                      x) =
                  x),
          right_inv :=
            (_ :
              ∀ (x : DihedralGroup 0),
                (fun i =>
                      match i with
                      | a j => DihedralGroup.r j
                      | xa j => DihedralGroup.sr j)
                    ((fun i =>
                        match i with
                        | DihedralGroup.r j => a j
                        | DihedralGroup.sr j => xa j)
                      x) =
                  x) }
        (x * y) =
      Equiv.toFun
          {
            toFun := fun i =>
              match i with
              | a j => DihedralGroup.r j
              | xa j => DihedralGroup.sr j,
            invFun := fun i =>
              match i with
              | DihedralGroup.r j => a j
              | DihedralGroup.sr j => xa j,
            left_inv :=
              (_ :
                ∀ (x : QuaternionGroup 0),
                  (fun i =>
                        match i with
                        | DihedralGroup.r j => a j
                        | DihedralGroup.sr j => xa j)
                      ((fun i =>
                          match i with
                          | a j => DihedralGroup.r j
                          | xa j => DihedralGroup.sr j)
                        x) =
                    x),
            right_inv :=
              (_ :
                ∀ (x : DihedralGroup 0),
                  (fun i =>
                        match i with
                        | a j => DihedralGroup.r j
                        | xa j => DihedralGroup.sr j)
                      ((fun i =>
                          match i with
                          | DihedralGroup.r j => a j
                          | DihedralGroup.sr j => xa j)
                        x) =
                    x) }
          x *
        Equiv.toFun
          {
            toFun := fun i =>
              match i with
              | a j => DihedralGroup.r j
              | xa j => DihedralGroup.sr j,
            invFun := fun i =>
              match i with
              | DihedralGroup.r j => a j
              | DihedralGroup.sr j => xa j,
            left_inv :=
              (_ :
                ∀ (x : QuaternionGroup 0),
                  (fun i =>
                        match i with
                        | DihedralGroup.r j => a j
                        | DihedralGroup.sr j => xa j)
                      ((fun i =>
                          match i with
                          | a j => DihedralGroup.r j
                          | xa j => DihedralGroup.sr j)
                        x) =
                    x),
            right_inv :=
              (_ :
                ∀ (x : DihedralGroup 0),
                  (fun i =>
                        match i with
                        | a j => DihedralGroup.r j
                        | xa j => DihedralGroup.sr j)
                      ((fun i =>
                          match i with
                          | DihedralGroup.r j => a j
                          | DihedralGroup.sr j => xa j)
                        x) =
                    x) }
          y

Next tactic:
rintro (k | k) (l | l)