awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
hR : Nontrivial R
hV : 1 ≤ Module.finrank R V
hr :
  ⋯.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) ^
      Module.finrank R V =
    1
⊢ let r :=
    ⋯.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);
  r ^ Module.finrank R V = 1

Tactic:
set r := (mem_center_iff.mp g.prop).choose

Premises used: SpecialLinearGroup.mem_center_iff, Subtype.prop, Iff.mp, Exists.choose
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
hR : Nontrivial R
hV : 1 ≤ Module.finrank R V
r : R :=
  ⋯.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)
hr : r ^ Module.finrank R V = 1
⊢ r ^ max (Module.finrank R V) 1 = 1

Tactic:
rw [← Nat.max_eq_left hV] at hr

Premises used: Nat.max_eq_left
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
hR : Nontrivial R
hV : 1 ≤ Module.finrank R V
r : R :=
  ⋯.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)
hr : r ^ max (Module.finrank R V) 1 = 1
rw : IsUnit.{u_1} (M := R) 1
rw₁ : max (Module.finrank R V) 1 ≠ 0
⊢ IsUnit r

Tactic:
rw [← isUnit_pow_iff _, hr]

Premises used: isUnit_pow_iff
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
hR : Nontrivial R
hV : 1 ≤ Module.finrank R V
r : R :=
  ⋯.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)
hr : r ^ max (Module.finrank R V) 1 = 1
⊢ IsUnit.{u_1} (M := R) 1

Tactic:
isUnit_one

Premises used: isUnit_one
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
hR : Nontrivial R
hV : 1 ≤ Module.finrank R V
r : R :=
  ⋯.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)
hr : r ^ max (Module.finrank R V) 1 = 1
⊢ IsUnit.{u_1} (M := R) 1

Tactic:
exact isUnit_one

Premises used: isUnit_one
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
hR : Nontrivial R
hV : 1 ≤ Module.finrank R V
r : R :=
  ⋯.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)
hr : r ^ max (Module.finrank R V) 1 = 1
rw : Module.finrank R V ≠ 0
⊢ max (Module.finrank R V) 1 ≠ 0

Tactic:
rw [Nat.max_eq_left hV]

Premises used: Nat.max_eq_left
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
hR : Nontrivial R
hV : 1 ≤ Module.finrank R V
r : R :=
  ⋯.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)
hr : r ^ max (Module.finrank R V) 1 = 1
⊢ Module.finrank R V ≠ 0

Tactic:
Nat.ne_zero_of_lt hV

Premises used: Nat.ne_zero_of_lt
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
hR : Nontrivial R
hV : 1 ≤ Module.finrank R V
r : R :=
  ⋯.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)
hr : r ^ max (Module.finrank R V) 1 = 1
⊢ Module.finrank R V ≠ 0

Tactic:
exact Nat.ne_zero_of_lt hV

Premises used: Nat.ne_zero_of_lt
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
hR : Nontrivial R
hV : 1 ≤ Module.finrank R V
r : R :=
  ⋯.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)
hr : r ^ max (Module.finrank R V) 1 = 1
⊢ IsUnit r

Tactic:
have : IsUnit r := by
          rw [← isUnit_pow_iff _, hr]
          · exact isUnit_one
          rw [Nat.max_eq_left hV]
          exact Nat.ne_zero_of_lt hV
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
hR : Nontrivial R
hV : 1 ≤ Module.finrank R V
r : R :=
  ⋯.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)
hr : r ^ max (Module.finrank R V) 1 = 1
this : IsUnit r
⊢ Membership.mem (γ := Subgroup Rˣ) (rootsOfUnity (max (Module.finrank R V) 1) R) this.unit

Tactic:
simp [mem_rootsOfUnity, ← Units.val_inj, hr]

Premises used: mem_rootsOfUnity, Units.val_inj
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
hR : Nontrivial R
hV : 1 ≤ Module.finrank R V
r : R :=
  ⋯.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)
hr : r ^ max (Module.finrank R V) 1 = 1
this : IsUnit r
⊢ ↥(rootsOfUnity (max (Module.finrank R V) 1) R)

Tactic:
exact ⟨this.unit, by simp [mem_rootsOfUnity, ← Units.val_inj, hr]⟩
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
simp :
  HSMul.hSMul.{u_1, u_2, u_2} (α := R) (β := V →ₗ[R] V)
      (↑(↑(⋯.by_cases (fun (x : Subsingleton R) ↦ 1) fun (hR : Nontrivial R) ↦
                ⋯.by_cases (fun (x : Subsingleton V) ↦ 1) fun (hV : Nontrivial V) ↦
                  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))
                      ⋯)
                    ⋯) :
            Rˣ) :
        R)
      LinearMap.id =
    (↑(↑(↑g : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V)
⊢ centerEquivRootsOfUnity_invFun
      ((fun (g : ↥(Subgroup.center (SpecialLinearGroup R V))) ↦
          (⋯.by_cases (fun (x : Subsingleton R) ↦ 1) fun (hR : Nontrivial R) ↦
              ⋯.by_cases (fun (x : Subsingleton V) ↦ 1) fun (hV : Nontrivial V) ↦
                have hV : 1 ≤ Module.finrank R V := ⋯;
                have hr := ⋯;
                let r :=
                  ⋯.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);
                have this : IsUnit r := ⋯;
                Subtype.mk (p := fun (x : Rˣ) ↦
                  Membership.mem (γ := Subgroup Rˣ) (rootsOfUnity (max (Module.finrank R V) 1) R) x) this.unit ⋯ :
            ↥(rootsOfUnity (max (Module.finrank R V) 1) R)))
        g) =
    g

Tactic:
simp only [centerEquivRootsOfUnity_invFun, ← Subtype.val_inj,
      ← LinearEquiv.toLinearMap_inj, LinearMap.coe_equivOfIsUnitDet]

Premises used: SpecialLinearGroup.centerEquivRootsOfUnity_invFun, LinearEquiv.toLinearMap_inj, Subtype.val_inj, LinearMap.coe_equivOfIsUnitDet
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
simp :
  HSMul.hSMul.{u_1, u_2, u_2} (α := R) (β := V →ₗ[R] V)
      (↑(↑(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))
                      ⋯)
                    ⋯) :
            Rˣ) :
        R)
      LinearMap.id =
    (↑(↑(↑g : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V)
⊢ HSMul.hSMul.{u_1, u_2, u_2} (α := R) (β := V →ₗ[R] V)
      (↑(↑(⋯.by_cases (fun (x : Subsingleton R) ↦ 1) fun (hR : Nontrivial R) ↦
                ⋯.by_cases (fun (x : Subsingleton V) ↦ 1) fun (hV : Nontrivial V) ↦
                  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))
                      ⋯)
                    ⋯) :
            Rˣ) :
        R)
      LinearMap.id =
    (↑(↑(↑g : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V)

Tactic:
simp only [Or.by_cases]

Premises used: Or.by_cases
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
pos :
  ∀ (hR : Subsingleton R),
    HSMul.hSMul.{u_1, u_2, u_2} (α := R) (β := V →ₗ[R] V) (↑(↑1 : Rˣ) : R) LinearMap.id =
      (↑(↑(↑g : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V)
pos₁ :
  ∀ (hR : ¬Subsingleton R) (hV : Subsingleton V),
    HSMul.hSMul.{u_1, u_2, u_2} (α := R) (β := V →ₗ[R] V) (↑(↑1 : Rˣ) : R) LinearMap.id =
      (↑(↑(↑g : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V)
neg :
  ∀ (hR : ¬Subsingleton R) (hV : ¬Subsingleton V),
    HSMul.hSMul (β := V →ₗ[R] V)
        (↑(↑(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))
                    ⋯)
                  ⋯) :
              Rˣ) :
          R)
        LinearMap.id =
      (↑(↑(↑g : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V)
⊢ HSMul.hSMul.{u_1, u_2, u_2} (α := R) (β := V →ₗ[R] V)
      (↑(↑(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))
                      ⋯)
                    ⋯) :
            Rˣ) :
        R)
      LinearMap.id =
    (↑(↑(↑g : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V)

Tactic:
split_ifs with hR hV
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
hR : Subsingleton R
⊢ HSMul.hSMul.{u_1, u_2, u_2} (α := R) (β := V →ₗ[R] V) (↑(↑1 : Rˣ) : R) LinearMap.id =
    (↑(↑(↑g : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V)

Tactic:
simp [Subsingleton.eq_one g]

Premises used: Subsingleton.eq_one
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
hR : ¬Subsingleton R
hV : Subsingleton V
⊢ HSMul.hSMul.{u_1, u_2, u_2} (α := R) (β := V →ₗ[R] V) (↑(↑1 : Rˣ) : R) LinearMap.id =
    (↑(↑(↑g : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V)

Tactic:
simp [Subsingleton.eq_one g]

Premises used: Subsingleton.eq_one
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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 : ↥(Subgroup.center (SpecialLinearGroup R V))
hR : ¬Subsingleton R
hV : ¬Subsingleton V
⊢ HSMul.hSMul (β := V →ₗ[R] V)
      (↑(↑(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))
                  ⋯)
                ⋯) :
            Rˣ) :
        R)
      LinearMap.id =
    (↑(↑(↑g : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V)

Tactic:
simp only [IsUnit.unit_spec, ← (mem_center_iff.mp g.prop).choose_spec.2]

Premises used: Exists.choose_spec, SpecialLinearGroup.mem_center_iff, And.right, Subtype.prop, Iff.mp, IsUnit.unit_spec
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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
r : ↥(rootsOfUnity (max (Module.finrank R V) 1) R)
pos : ∀ (hR : Subsingleton R), 1 = r
pos₁ : ∀ (hR : ¬Subsingleton R) (hV : Subsingleton V), 1 = r
neg :
  ∀ (hR : ¬Subsingleton R) (hV : ¬Subsingleton V),
    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_1 : R) ↦
            r_1 ^ Module.finrank R V = 1 ∧
              (↑(↑(↑(centerEquivRootsOfUnity_invFun r) : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
                HSMul.hSMul (β := V →ₗ[R] V) r_1 LinearMap.id))
          ⋯)
        ⋯ =
      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_1 : R) ↦
              r_1 ^ Module.finrank R V = 1 ∧
                (↑(↑(↑(centerEquivRootsOfUnity_invFun r) : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
                  HSMul.hSMul (β := V →ₗ[R] V) r_1 LinearMap.id))
            ⋯)
          ⋯) =
    r

Tactic:
split_ifs with hR hV
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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
r : ↥(rootsOfUnity (max (Module.finrank R V) 1) R)
hR : Subsingleton R
⊢ 1 = r

Tactic:
simp [Subsingleton.eq_one r]

Premises used: Subsingleton.eq_one
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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
r : ↥(rootsOfUnity (max (Module.finrank R V) 1) R)
hR : ¬Subsingleton R
hV : Subsingleton V
⊢ Nontrivial R

Tactic:
replace hR := not_subsingleton_iff_nontrivial.mp hR
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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
r : ↥(rootsOfUnity (max (Module.finrank R V) 1) R)
hV : Subsingleton V
hR : Nontrivial R
pos : r = 1
⊢ 1 = r

Tactic:
symm
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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
r : ↥(rootsOfUnity (max (Module.finrank R V) 1) R)
hV : Subsingleton V
hR : Nontrivial R
⊢ Module.finrank R V = 0

Tactic:
rw [← Module.finrank_eq_zero_iff_of_free (R := R)] at hV

Premises used: Module.finrank_eq_zero_iff_of_free
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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
r : ↥(rootsOfUnity (max (Module.finrank R V) 1) R)
hV : Subsingleton V
hR : Nontrivial R
hV₁ : Module.finrank R V = 0
⊢ Nontrivial R

Tactic:
rw [← Module.finrank_eq_zero_iff_of_free (R := R)] at hV

Premises used: Module.finrank_eq_zero_iff_of_free
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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
r : ↥(rootsOfUnity (max (Module.finrank R V) 1) R)
hV : Module.finrank R V = 0
hR : Nontrivial R
⊢ r = 1

Tactic:
simpa [hV] using (mem_rootsOfUnity _ _).mp r.prop

Premises used: mem_rootsOfUnity, Subtype.prop, Iff.mp
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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
r : ↥(rootsOfUnity (max (Module.finrank R V) 1) R)
hR : ¬Subsingleton R
hV : ¬Subsingleton V
⊢ Nontrivial V

Tactic:
rw [not_subsingleton_iff_nontrivial] at hV

Premises used: not_subsingleton_iff_nontrivial
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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
r : ↥(rootsOfUnity (max (Module.finrank R V) 1) R)
hR : ¬Subsingleton R
hV_1 : ¬Subsingleton V
hV : Nontrivial V
⊢ FaithfulSMul R V

Tactic:
have := Module.Free.instFaithfulSMulOfNontrivial R V
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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
r : ↥(rootsOfUnity (max (Module.finrank R V) 1) R)
hR : ¬Subsingleton R
hV_1 : ¬Subsingleton V
hV : Nontrivial V
this : FaithfulSMul R V
neg :
  ⋯.choose (p := fun (r_1 : R) ↦
      r_1 ^ Module.finrank R V = 1 ∧
        (↑(↑(↑(centerEquivRootsOfUnity_invFun r) : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
          HSMul.hSMul (β := V →ₗ[R] V) r_1 LinearMap.id) =
    (↑(↑r : Rˣ) : R)
⊢ 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_1 : R) ↦
          r_1 ^ Module.finrank R V = 1 ∧
            (↑(↑(↑(centerEquivRootsOfUnity_invFun r) : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
              HSMul.hSMul (β := V →ₗ[R] V) r_1 LinearMap.id))
        ⋯)
      ⋯ =
    r

Tactic:
simp only [← Subtype.val_inj, ← Units.val_inj, IsUnit.unit_spec]

Premises used: Subtype.val_inj, Units.val_inj, IsUnit.unit_spec
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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
r : ↥(rootsOfUnity (max (Module.finrank R V) 1) R)
hR : ¬Subsingleton R
hV_1 : ¬Subsingleton V
hV : Nontrivial V
this : FaithfulSMul R V
⊢ ∃ (r_1 : R),
    r_1 ^ Module.finrank R V = 1 ∧
      (↑(↑(↑(centerEquivRootsOfUnity_invFun r) : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
        HSMul.hSMul (β := V →ₗ[R] V) r_1 LinearMap.id

Tactic:
have H := mem_center_iff.mp (Subtype.prop (centerEquivRootsOfUnity_invFun r))
-- Module: Mathlib.LinearAlgebra.SpecialLinearGroup
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
r : ↥(rootsOfUnity (max (Module.finrank R V) 1) R)
hR : ¬Subsingleton R
hV_1 : ¬Subsingleton V
hV : Nontrivial V
this_1 : FaithfulSMul R V
H :
  ∃ (r_1 : R),
    r_1 ^ Module.finrank R V = 1 ∧
      (↑(↑(↑(centerEquivRootsOfUnity_invFun r) : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
        HSMul.hSMul (β := V →ₗ[R] V) r_1 LinearMap.id
this :
  HSMul.hSMul (β := V →ₗ[R] V)
      (H.choose (p := fun (r_1 : R) ↦
        r_1 ^ Module.finrank R V = 1 ∧
          (↑(↑(↑(centerEquivRootsOfUnity_invFun r) : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
            HSMul.hSMul (β := V →ₗ[R] V) r_1 LinearMap.id))
      LinearMap.id =
    HSMul.hSMul (β := V →ₗ[R] V) (↑(↑r : Rˣ) : R) LinearMap.id
apply :
  ∀ (a : V),
    ⋯.choose (p := fun (r_1 : R) ↦
          r_1 ^ Module.finrank R V = 1 ∧
            (↑(↑(↑(centerEquivRootsOfUnity_invFun r) : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
              HSMul.hSMul (β := V →ₗ[R] V) r_1 LinearMap.id) •
        a =
      (↑(↑r : Rˣ) : R) • a
⊢ ⋯.choose (p := fun (r_1 : R) ↦
      r_1 ^ Module.finrank R V = 1 ∧
        (↑(↑(↑(centerEquivRootsOfUnity_invFun r) : SpecialLinearGroup R V) : V ≃ₗ[R] V) : V →ₗ[R] V) =
          HSMul.hSMul (β := V →ₗ[R] V) r_1 LinearMap.id) =
    (↑(↑r : Rˣ) : R)

Tactic:
apply FaithfulSMul.eq_of_smul_eq_smul (α := V)

Premises used: FaithfulSMul.eq_of_smul_eq_smul