-- Lean 4 proof step from Mathlib.LinearAlgebra.SpecialLinearGroup (goal)
Goal:
R : Type u_1
V : Type u_2
inst : CommRing R
inst_1 : AddCommGroup V
inst_2 : Module R V
inst_3 : Module.Free R V
inst_4 : Module.Finite R V
g h : ↥(Subgroup.center (SpecialLinearGroup R V))
pos : ∀ (hR : Subsingleton R), Eq.{u_1 + 1} (α := ↥(rootsOfUnity (max (Module.finrank R V) 1) R)) 1 1
⊢ Eq.{u_1 + 1} (α := ↥(rootsOfUnity (max (Module.finrank R V) 1) R))
    (if h : Subsingleton R then 1
    else
      if h : Subsingleton V then 1
      else
        Subtype.mk (p := fun (x : Rˣ) ↦
          Membership.mem (γ := Subgroup Rˣ) (rootsOfUnity (max (Module.finrank R V) 1) R) x)
          (IsUnit.unit (a :=
            ⋯.choose (p := fun (r : R) ↦
              r ^ Module.finrank R V = 1 ∧
                (↑(↑(↑g : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) *
                    (↑(↑(↑h : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
                  HSMul.hSMul (β := V →ₗ[R] V) r LinearMap.id))
            ⋯)
          ⋯)
    (if h : Subsingleton R then
      if h : Subsingleton R then 1
      else
        if h : Subsingleton V then 1
        else
          Subtype.mk (p := fun (x : Rˣ) ↦
            Membership.mem (γ := Subgroup Rˣ) (rootsOfUnity (max (Module.finrank R V) 1) R) x)
            (IsUnit.unit (a :=
              ⋯.choose (p := fun (r : R) ↦
                r ^ Module.finrank R V = 1 ∧
                  (↑(↑(↑g : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
                    HSMul.hSMul (β := V →ₗ[R] V) r LinearMap.id))
              ⋯)
            ⋯
    else
      if h : Subsingleton V then
        if h : Subsingleton R then 1
        else
          if h : Subsingleton V then 1
          else
            Subtype.mk (p := fun (x : Rˣ) ↦
              Membership.mem (γ := Subgroup Rˣ) (rootsOfUnity (max (Module.finrank R V) 1) R) x)
              (IsUnit.unit (a :=
                ⋯.choose (p := fun (r : R) ↦
                  r ^ Module.finrank R V = 1 ∧
                    (↑(↑(↑g : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
                      HSMul.hSMul (β := V →ₗ[R] V) r LinearMap.id))
                ⋯)
              ⋯
      else
        if h_1 : Subsingleton R then
          Subtype.mk (p := fun (x : Rˣ) ↦
            Membership.mem (γ := Subgroup Rˣ) (rootsOfUnity (max (Module.finrank R V) 1) R) x)
            (IsUnit.unit (a :=
              ⋯.choose (p := fun (r : R) ↦
                r ^ Module.finrank R V = 1 ∧
                  (↑(↑(↑h : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
                    HSMul.hSMul (β := V →ₗ[R] V) r LinearMap.id))
              ⋯)
            ⋯
        else
          if h_2 : Subsingleton V then
            Subtype.mk (p := fun (x : Rˣ) ↦
              Membership.mem (γ := Subgroup Rˣ) (rootsOfUnity (max (Module.finrank R V) 1) R) x)
              (IsUnit.unit (a :=
                ⋯.choose (p := fun (r : R) ↦
                  r ^ Module.finrank R V = 1 ∧
                    (↑(↑(↑h : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
                      HSMul.hSMul (β := V →ₗ[R] V) r LinearMap.id))
                ⋯)
              ⋯
          else
            Subtype.mk (p := fun (x : Rˣ) ↦
              Membership.mem (γ := Subgroup Rˣ) (rootsOfUnity (max (Module.finrank R V) 1) R) x)
              (HMul.hMul (α := Rˣ)
                (IsUnit.unit (a :=
                  ⋯.choose (p := fun (r : R) ↦
                    r ^ Module.finrank R V = 1 ∧
                      (↑(↑(↑g : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
                        HSMul.hSMul (β := V →ₗ[R] V) r LinearMap.id))
                  ⋯)
                (IsUnit.unit (a :=
                  ⋯.choose (p := fun (r : R) ↦
                    r ^ Module.finrank R V = 1 ∧
                      (↑(↑(↑h : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
                        HSMul.hSMul (β := V →ₗ[R] V) r LinearMap.id))
                  ⋯))
              ⋯)
have pos₁ : ∀ (hR : ¬Subsingleton R) (hV : Subsingleton V), Eq.{u_1 + 1} (α := ↥(rootsOfUnity (max (Module.finrank R V) 1) R)) 1 1
Tactic: split_ifs with hR hV