l3lab/ntp-mathlib huggingface dataset:
/-- `reverse` is a no-op over `CliffordAlgebraComplex.Q`. -/
theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x := by
  induction x using CliffordAlgebra.induction
  

Proof state:
case h_grade0
r✝ : ℝ
⊢ reverse ((algebraMap ℝ (CliffordAlgebra Q)) r✝) = (algebraMap ℝ (CliffordAlgebra Q)) r✝
case h_grade1
x✝ : ℝ
⊢ reverse ((ι Q) x✝) = (ι Q) x✝
case h_mul
a✝² b✝ : CliffordAlgebra Q
a✝¹ : reverse a✝² = a✝²
a✝ : reverse b✝ = b✝
⊢ reverse (a✝² * b✝) = a✝² * b✝
case h_add a✝² b✝ : CliffordAlgebra Q a✝¹ : reverse a✝² = a✝² a✝ : reverse b✝ = b✝ ⊢ reverse (a✝² + b✝) = a✝² + b✝

Next tactic:
case h_grade0 r => exact reverse.commutes _
/-- `reverse` is a no-op over `CliffordAlgebraComplex.Q`. -/
theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x := by
  induction x using CliffordAlgebra.induction
  

Proof state:
r : ℝ
⊢ reverse ((algebraMap ℝ (CliffordAlgebra Q)) r) = (algebraMap ℝ (CliffordAlgebra Q)) r

Next tactic:
case h_grade0 r => exact reverse.commutes _
/-- `reverse` is a no-op over `CliffordAlgebraComplex.Q`. -/
theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => 

Proof state:
r : ℝ
⊢ reverse ((algebraMap ℝ (CliffordAlgebra Q)) r) = (algebraMap ℝ (CliffordAlgebra Q)) r

Next tactic:
exact reverse.commutes _
/-- `reverse` is a no-op over `CliffordAlgebraComplex.Q`. -/
theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  

Proof state:
case h_grade1
x✝ : ℝ
⊢ reverse ((ι Q) x✝) = (ι Q) x✝
case h_mul
a✝² b✝ : CliffordAlgebra Q
a✝¹ : reverse a✝² = a✝²
a✝ : reverse b✝ = b✝
⊢ reverse (a✝² * b✝) = a✝² * b✝
case h_add a✝² b✝ : CliffordAlgebra Q a✝¹ : reverse a✝² = a✝² a✝ : reverse b✝ = b✝ ⊢ reverse (a✝² + b✝) = a✝² + b✝

Next tactic:
case h_grade1 x => rw [reverse_ι]
/-- `reverse` is a no-op over `CliffordAlgebraComplex.Q`. -/
theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  

Proof state:
x : ℝ
⊢ reverse ((ι Q) x) = (ι Q) x

Next tactic:
case h_grade1 x => rw [reverse_ι]
/-- `reverse` is a no-op over `CliffordAlgebraComplex.Q`. -/
theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  case h_grade1 x => 

Proof state:
x : ℝ
⊢ reverse ((ι Q) x) = (ι Q) x

Next tactic:
rw [reverse_ι]
/-- `reverse` is a no-op over `CliffordAlgebraComplex.Q`. -/
theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  case h_grade1 x => rw [reverse_ι]
  

Proof state:
case h_mul
a✝² b✝ : CliffordAlgebra Q
a✝¹ : reverse a✝² = a✝²
a✝ : reverse b✝ = b✝
⊢ reverse (a✝² * b✝) = a✝² * b✝
case h_add a✝² b✝ : CliffordAlgebra Q a✝¹ : reverse a✝² = a✝² a✝ : reverse b✝ = b✝ ⊢ reverse (a✝² + b✝) = a✝² + b✝

Next tactic:
case h_mul x₁ x₂ hx₁ hx₂ => rw [reverse.map_mul, mul_comm, hx₁, hx₂]
/-- `reverse` is a no-op over `CliffordAlgebraComplex.Q`. -/
theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  case h_grade1 x => rw [reverse_ι]
  

Proof state:
x₁ x₂ : CliffordAlgebra Q
hx₁ : reverse x₁ = x₁
hx₂ : reverse x₂ = x₂
⊢ reverse (x₁ * x₂) = x₁ * x₂

Next tactic:
case h_mul x₁ x₂ hx₁ hx₂ => rw [reverse.map_mul, mul_comm, hx₁, hx₂]
/-- `reverse` is a no-op over `CliffordAlgebraComplex.Q`. -/
theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  case h_grade1 x => rw [reverse_ι]
  case h_mul x₁ x₂ hx₁ hx₂ => 

Proof state:
x₁ x₂ : CliffordAlgebra Q
hx₁ : reverse x₁ = x₁
hx₂ : reverse x₂ = x₂
⊢ reverse (x₁ * x₂) = x₁ * x₂

Next tactic:
rw [reverse.map_mul, mul_comm, hx₁, hx₂]
/-- `reverse` is a no-op over `CliffordAlgebraComplex.Q`. -/
theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  case h_grade1 x => rw [reverse_ι]
  case h_mul x₁ x₂ hx₁ hx₂ => rw [reverse.map_mul, mul_comm, hx₁, hx₂]
  

Proof state:
case h_add
a✝² b✝ : CliffordAlgebra Q
a✝¹ : reverse a✝² = a✝²
a✝ : reverse b✝ = b✝
⊢ reverse (a✝² + b✝) = a✝² + b✝

Next tactic:
case h_add x₁ x₂ hx₁ hx₂ => rw [reverse.map_add, hx₁, hx₂]
/-- `reverse` is a no-op over `CliffordAlgebraComplex.Q`. -/
theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  case h_grade1 x => rw [reverse_ι]
  case h_mul x₁ x₂ hx₁ hx₂ => rw [reverse.map_mul, mul_comm, hx₁, hx₂]
  

Proof state:
x₁ x₂ : CliffordAlgebra Q
hx₁ : reverse x₁ = x₁
hx₂ : reverse x₂ = x₂
⊢ reverse (x₁ + x₂) = x₁ + x₂

Next tactic:
case h_add x₁ x₂ hx₁ hx₂ => rw [reverse.map_add, hx₁, hx₂]
/-- `reverse` is a no-op over `CliffordAlgebraComplex.Q`. -/
theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  case h_grade1 x => rw [reverse_ι]
  case h_mul x₁ x₂ hx₁ hx₂ => rw [reverse.map_mul, mul_comm, hx₁, hx₂]
  case h_add x₁ x₂ hx₁ hx₂ => 

Proof state:
x₁ x₂ : CliffordAlgebra Q
hx₁ : reverse x₁ = x₁
hx₂ : reverse x₂ = x₂
⊢ reverse (x₁ + x₂) = x₁ + x₂

Next tactic:
rw [reverse.map_add, hx₁, hx₂]
/-- `Complex.conj` is analogous to `CliffordAlgebra.involute`. -/
@[simp]
theorem ofComplex_conj (c : ℂ) : ofComplex (conj c) = involute (ofComplex c) :=
  CliffordAlgebraComplex.equiv.injective <| by
    

Proof state:
c : ℂ
⊢ CliffordAlgebraComplex.equiv (ofComplex ((starRingEnd ℂ) c)) = CliffordAlgebraComplex.equiv (involute (ofComplex c))

Next tactic:
rw [equiv_apply, equiv_apply, toComplex_involute, toComplex_ofComplex, toComplex_ofComplex]
/-- The quaternion basis vectors within the algebra. -/
@[simps i j k]
def quaternionBasis : QuaternionAlgebra.Basis (CliffordAlgebra (Q c₁ c₂)) c₁ c₂ where
  i := ι (Q c₁ c₂) (1, 0)
  j := ι (Q c₁ c₂) (0, 1)
  k := ι (Q c₁ c₂) (1, 0) * ι (Q c₁ c₂) (0, 1)
  i_mul_i := by
    

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (ι (Q c₁ c₂)) (1, 0) * (ι (Q c₁ c₂)) (1, 0) = c₁ • 1

Next tactic:
rw [ι_sq_scalar, Q_apply, ← Algebra.algebraMap_eq_smul_one]
/-- The quaternion basis vectors within the algebra. -/
@[simps i j k]
def quaternionBasis : QuaternionAlgebra.Basis (CliffordAlgebra (Q c₁ c₂)) c₁ c₂ where
  i := ι (Q c₁ c₂) (1, 0)
  j := ι (Q c₁ c₂) (0, 1)
  k := ι (Q c₁ c₂) (1, 0) * ι (Q c₁ c₂) (0, 1)
  i_mul_i := by
    rw [ι_sq_scalar, Q_apply, ← Algebra.algebraMap_eq_smul_one]
    

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (algebraMap R (CliffordAlgebra (Q c₁ c₂))) (c₁ * ((1, 0).1 * (1, 0).1) + c₂ * ((1, 0).2 * (1, 0).2)) =
    (algebraMap R (CliffordAlgebra (Q c₁ c₂))) c₁

Next tactic:
simp
/-- The quaternion basis vectors within the algebra. -/
@[simps i j k]
def quaternionBasis : QuaternionAlgebra.Basis (CliffordAlgebra (Q c₁ c₂)) c₁ c₂ where
  i := ι (Q c₁ c₂) (1, 0)
  j := ι (Q c₁ c₂) (0, 1)
  k := ι (Q c₁ c₂) (1, 0) * ι (Q c₁ c₂) (0, 1)
  i_mul_i := by
    rw [ι_sq_scalar, Q_apply, ← Algebra.algebraMap_eq_smul_one]
    simp
  j_mul_j := by
    

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (ι (Q c₁ c₂)) (0, 1) * (ι (Q c₁ c₂)) (0, 1) = c₂ • 1

Next tactic:
rw [ι_sq_scalar, Q_apply, ← Algebra.algebraMap_eq_smul_one]
/-- The quaternion basis vectors within the algebra. -/
@[simps i j k]
def quaternionBasis : QuaternionAlgebra.Basis (CliffordAlgebra (Q c₁ c₂)) c₁ c₂ where
  i := ι (Q c₁ c₂) (1, 0)
  j := ι (Q c₁ c₂) (0, 1)
  k := ι (Q c₁ c₂) (1, 0) * ι (Q c₁ c₂) (0, 1)
  i_mul_i := by
    rw [ι_sq_scalar, Q_apply, ← Algebra.algebraMap_eq_smul_one]
    simp
  j_mul_j := by
    rw [ι_sq_scalar, Q_apply, ← Algebra.algebraMap_eq_smul_one]
    

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (algebraMap R (CliffordAlgebra (Q c₁ c₂))) (c₁ * ((0, 1).1 * (0, 1).1) + c₂ * ((0, 1).2 * (0, 1).2)) =
    (algebraMap R (CliffordAlgebra (Q c₁ c₂))) c₂

Next tactic:
simp
/-- The quaternion basis vectors within the algebra. -/
@[simps i j k]
def quaternionBasis : QuaternionAlgebra.Basis (CliffordAlgebra (Q c₁ c₂)) c₁ c₂ where
  i := ι (Q c₁ c₂) (1, 0)
  j := ι (Q c₁ c₂) (0, 1)
  k := ι (Q c₁ c₂) (1, 0) * ι (Q c₁ c₂) (0, 1)
  i_mul_i := by
    rw [ι_sq_scalar, Q_apply, ← Algebra.algebraMap_eq_smul_one]
    simp
  j_mul_j := by
    rw [ι_sq_scalar, Q_apply, ← Algebra.algebraMap_eq_smul_one]
    simp
  i_mul_j := rfl
  j_mul_i := by
    

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (ι (Q c₁ c₂)) (0, 1) * (ι (Q c₁ c₂)) (1, 0) = -((ι (Q c₁ c₂)) (1, 0) * (ι (Q c₁ c₂)) (0, 1))

Next tactic:
rw [eq_neg_iff_add_eq_zero, ι_mul_ι_add_swap, QuadraticForm.polar]
/-- The quaternion basis vectors within the algebra. -/
@[simps i j k]
def quaternionBasis : QuaternionAlgebra.Basis (CliffordAlgebra (Q c₁ c₂)) c₁ c₂ where
  i := ι (Q c₁ c₂) (1, 0)
  j := ι (Q c₁ c₂) (0, 1)
  k := ι (Q c₁ c₂) (1, 0) * ι (Q c₁ c₂) (0, 1)
  i_mul_i := by
    rw [ι_sq_scalar, Q_apply, ← Algebra.algebraMap_eq_smul_one]
    simp
  j_mul_j := by
    rw [ι_sq_scalar, Q_apply, ← Algebra.algebraMap_eq_smul_one]
    simp
  i_mul_j := rfl
  j_mul_i := by
    rw [eq_neg_iff_add_eq_zero, ι_mul_ι_add_swap, QuadraticForm.polar]
    

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (algebraMap R (CliffordAlgebra (Q c₁ c₂))) ((Q c₁ c₂) ((0, 1) + (1, 0)) - (Q c₁ c₂) (0, 1) - (Q c₁ c₂) (1, 0)) = 0

Next tactic:
simp
/-- Intermediate result of `CliffordAlgebraQuaternion.equiv`: clifford algebras over
`CliffordAlgebraQuaternion.Q` can be converted to `ℍ[R,c₁,c₂]`. -/
def toQuaternion : CliffordAlgebra (Q c₁ c₂) →ₐ[R] ℍ[R,c₁,c₂] :=
  CliffordAlgebra.lift (Q c₁ c₂)
    ⟨{  toFun := fun v => (⟨0, v.1, v.2, 0⟩ : ℍ[R,c₁,c₂])
        map_add' := fun v₁ v₂ => by 

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
v₁ v₂ : R × R
⊢ (fun v => { re := 0, imI := v.1, imJ := v.2, imK := 0 }) (v₁ + v₂) =
    (fun v => { re := 0, imI := v.1, imJ := v.2, imK := 0 }) v₁ +
      (fun v => { re := 0, imI := v.1, imJ := v.2, imK := 0 }) v₂

Next tactic:
simp
/-- Intermediate result of `CliffordAlgebraQuaternion.equiv`: clifford algebras over
`CliffordAlgebraQuaternion.Q` can be converted to `ℍ[R,c₁,c₂]`. -/
def toQuaternion : CliffordAlgebra (Q c₁ c₂) →ₐ[R] ℍ[R,c₁,c₂] :=
  CliffordAlgebra.lift (Q c₁ c₂)
    ⟨{  toFun := fun v => (⟨0, v.1, v.2, 0⟩ : ℍ[R,c₁,c₂])
        map_add' := fun v₁ v₂ => by simp
        map_smul' := fun r v => by 

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ r : R
v : R × R
⊢ AddHom.toFun
      { toFun := fun v => { re := 0, imI := v.1, imJ := v.2, imK := 0 },
        map_add' :=
          (_ :
            ∀ (v₁ v₂ : R × R),
              { re := 0, imI := v₁.1 + v₂.1, imJ := v₁.2 + v₂.2, imK := 0 } =
                { re := 0 + 0, imI := v₁.1 + v₂.1, imJ := v₁.2 + v₂.2, imK := 0 + 0 }) }
      (r • v) =
    (RingHom.id R) r •
      AddHom.toFun
        { toFun := fun v => { re := 0, imI := v.1, imJ := v.2, imK := 0 },
          map_add' :=
            (_ :
              ∀ (v₁ v₂ : R × R),
                { re := 0, imI := v₁.1 + v₂.1, imJ := v₁.2 + v₂.2, imK := 0 } =
                  { re := 0 + 0, imI := v₁.1 + v₂.1, imJ := v₁.2 + v₂.2, imK := 0 + 0 }) }
        v

Next tactic:
dsimp
/-- Intermediate result of `CliffordAlgebraQuaternion.equiv`: clifford algebras over
`CliffordAlgebraQuaternion.Q` can be converted to `ℍ[R,c₁,c₂]`. -/
def toQuaternion : CliffordAlgebra (Q c₁ c₂) →ₐ[R] ℍ[R,c₁,c₂] :=
  CliffordAlgebra.lift (Q c₁ c₂)
    ⟨{  toFun := fun v => (⟨0, v.1, v.2, 0⟩ : ℍ[R,c₁,c₂])
        map_add' := fun v₁ v₂ => by simp
        map_smul' := fun r v => by dsimp; 

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ r : R
v : R × R
⊢ { re := 0, imI := (r • v).1, imJ := (r • v).2, imK := 0 } =
    { re := r * 0, imI := r * v.1, imJ := r * v.2, imK := r * 0 }

Next tactic:
rw [mul_zero]
/-- Intermediate result of `CliffordAlgebraQuaternion.equiv`: clifford algebras over
`CliffordAlgebraQuaternion.Q` can be converted to `ℍ[R,c₁,c₂]`. -/
def toQuaternion : CliffordAlgebra (Q c₁ c₂) →ₐ[R] ℍ[R,c₁,c₂] :=
  CliffordAlgebra.lift (Q c₁ c₂)
    ⟨{  toFun := fun v => (⟨0, v.1, v.2, 0⟩ : ℍ[R,c₁,c₂])
        map_add' := fun v₁ v₂ => by simp
        map_smul' := fun r v => by dsimp; rw [mul_zero]; 

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ r : R
v : R × R
⊢ { re := 0, imI := (r • v).1, imJ := (r • v).2, imK := 0 } = { re := 0, imI := r * v.1, imJ := r * v.2, imK := 0 }

Next tactic:
rfl
/-- Intermediate result of `CliffordAlgebraQuaternion.equiv`: clifford algebras over
`CliffordAlgebraQuaternion.Q` can be converted to `ℍ[R,c₁,c₂]`. -/
def toQuaternion : CliffordAlgebra (Q c₁ c₂) →ₐ[R] ℍ[R,c₁,c₂] :=
  CliffordAlgebra.lift (Q c₁ c₂)
    ⟨{  toFun := fun v => (⟨0, v.1, v.2, 0⟩ : ℍ[R,c₁,c₂])
        map_add' := fun v₁ v₂ => by simp
        map_smul' := fun r v => by dsimp; rw [mul_zero]; rfl }, fun v => by
      dsimp
      

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
v : R × R
⊢ { re := 0 * 0 + c₁ * v.1 * v.1 + c₂ * v.2 * v.2 - c₁ * c₂ * 0 * 0,
      imI := 0 * v.1 + v.1 * 0 - c₂ * v.2 * 0 + c₂ * 0 * v.2, imJ := 0 * v.2 + c₁ * v.1 * 0 + v.2 * 0 - c₁ * 0 * v.1,
      imK := 0 * 0 + v.1 * v.2 - v.2 * v.1 + 0 * 0 } =
    ↑(c₁ * (v.1 * v.1) + c₂ * (v.2 * v.2))

Next tactic:
ext
/-- Intermediate result of `CliffordAlgebraQuaternion.equiv`: clifford algebras over
`CliffordAlgebraQuaternion.Q` can be converted to `ℍ[R,c₁,c₂]`. -/
def toQuaternion : CliffordAlgebra (Q c₁ c₂) →ₐ[R] ℍ[R,c₁,c₂] :=
  CliffordAlgebra.lift (Q c₁ c₂)
    ⟨{  toFun := fun v => (⟨0, v.1, v.2, 0⟩ : ℍ[R,c₁,c₂])
        map_add' := fun v₁ v₂ => by simp
        map_smul' := fun r v => by dsimp; rw [mul_zero]; rfl }, fun v => by
      dsimp
      ext
      

Proof state:
case re
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
v : R × R
⊢ { re := 0 * 0 + c₁ * v.1 * v.1 + c₂ * v.2 * v.2 - c₁ * c₂ * 0 * 0,
        imI := 0 * v.1 + v.1 * 0 - c₂ * v.2 * 0 + c₂ * 0 * v.2, imJ := 0 * v.2 + c₁ * v.1 * 0 + v.2 * 0 - c₁ * 0 * v.1,
        imK := 0 * 0 + v.1 * v.2 - v.2 * v.1 + 0 * 0 }.re =
    (↑(c₁ * (v.1 * v.1) + c₂ * (v.2 * v.2))).re
case imI
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
v : R × R
⊢ { re := 0 * 0 + c₁ * v.1 * v.1 + c₂ * v.2 * v.2 - c₁ * c₂ * 0 * 0,
        imI := 0 * v.1 + v.1 * 0 - c₂ * v.2 * 0 + c₂ * 0 * v.2, imJ := 0 * v.2 + c₁ * v.1 * 0 + v.2 * 0 - c₁ * 0 * v.1,
        imK := 0 * 0 + v.1 * v.2 - v.2 * v.1 + 0 * 0 }.imI =
    (↑(c₁ * (v.1 * v.1) + c₂ * (v.2 * v.2))).imI
case imJ
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
v : R × R
⊢ { re := 0 * 0 + c₁ * v.1 * v.1 + c₂ * v.2 * v.2 - c₁ * c₂ * 0 * 0,
        imI := 0 * v.1 + v.1 * 0 - c₂ * v.2 * 0 + c₂ * 0 * v.2, imJ := 0 * v.2 + c₁ * v.1 * 0 + v.2 * 0 - c₁ * 0 * v.1,
        imK := 0 * 0 + v.1 * v.2 - v.2 * v.1 + 0 * 0 }.imJ =
    (↑(c₁ * (v.1 * v.1) + c₂ * (v.2 * v.2))).imJ
case imK
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
v : R × R
⊢ { re := 0 * 0 + c₁ * v.1 * v.1 + c₂ * v.2 * v.2 - c₁ * c₂ * 0 * 0,
        imI := 0 * v.1 + v.1 * 0 - c₂ * v.2 * 0 + c₂ * 0 * v.2, imJ := 0 * v.2 + c₁ * v.1 * 0 + v.2 * 0 - c₁ * 0 * v.1,
        imK := 0 * 0 + v.1 * v.2 - v.2 * v.1 + 0 * 0 }.imK =
    (↑(c₁ * (v.1 * v.1) + c₂ * (v.2 * v.2))).imK

Next tactic:
all_goals dsimp; ring
/-- Intermediate result of `CliffordAlgebraQuaternion.equiv`: clifford algebras over
`CliffordAlgebraQuaternion.Q` can be converted to `ℍ[R,c₁,c₂]`. -/
def toQuaternion : CliffordAlgebra (Q c₁ c₂) →ₐ[R] ℍ[R,c₁,c₂] :=
  CliffordAlgebra.lift (Q c₁ c₂)
    ⟨{  toFun := fun v => (⟨0, v.1, v.2, 0⟩ : ℍ[R,c₁,c₂])
        map_add' := fun v₁ v₂ => by simp
        map_smul' := fun r v => by dsimp; rw [mul_zero]; rfl }, fun v => by
      dsimp
      ext
      all_goals 

Proof state:
case re
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
v : R × R
⊢ { re := 0 * 0 + c₁ * v.1 * v.1 + c₂ * v.2 * v.2 - c₁ * c₂ * 0 * 0,
        imI := 0 * v.1 + v.1 * 0 - c₂ * v.2 * 0 + c₂ * 0 * v.2, imJ := 0 * v.2 + c₁ * v.1 * 0 + v.2 * 0 - c₁ * 0 * v.1,
        imK := 0 * 0 + v.1 * v.2 - v.2 * v.1 + 0 * 0 }.re =
    (↑(c₁ * (v.1 * v.1) + c₂ * (v.2 * v.2))).re

Next tactic:
dsimp
/-- Intermediate result of `CliffordAlgebraQuaternion.equiv`: clifford algebras over
`CliffordAlgebraQuaternion.Q` can be converted to `ℍ[R,c₁,c₂]`. -/
def toQuaternion : CliffordAlgebra (Q c₁ c₂) →ₐ[R] ℍ[R,c₁,c₂] :=
  CliffordAlgebra.lift (Q c₁ c₂)
    ⟨{  toFun := fun v => (⟨0, v.1, v.2, 0⟩ : ℍ[R,c₁,c₂])
        map_add' := fun v₁ v₂ => by simp
        map_smul' := fun r v => by dsimp; rw [mul_zero]; rfl }, fun v => by
      dsimp
      ext
      all_goals dsimp; 

Proof state:
case re
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
v : R × R
⊢ 0 * 0 + c₁ * v.1 * v.1 + c₂ * v.2 * v.2 - c₁ * c₂ * 0 * 0 = c₁ * (v.1 * v.1) + c₂ * (v.2 * v.2)

Next tactic:
ring
/-- Intermediate result of `CliffordAlgebraQuaternion.equiv`: clifford algebras over
`CliffordAlgebraQuaternion.Q` can be converted to `ℍ[R,c₁,c₂]`. -/
def toQuaternion : CliffordAlgebra (Q c₁ c₂) →ₐ[R] ℍ[R,c₁,c₂] :=
  CliffordAlgebra.lift (Q c₁ c₂)
    ⟨{  toFun := fun v => (⟨0, v.1, v.2, 0⟩ : ℍ[R,c₁,c₂])
        map_add' := fun v₁ v₂ => by simp
        map_smul' := fun r v => by dsimp; rw [mul_zero]; rfl }, fun v => by
      dsimp
      ext
      all_goals 

Proof state:
case imI
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
v : R × R
⊢ { re := 0 * 0 + c₁ * v.1 * v.1 + c₂ * v.2 * v.2 - c₁ * c₂ * 0 * 0,
        imI := 0 * v.1 + v.1 * 0 - c₂ * v.2 * 0 + c₂ * 0 * v.2, imJ := 0 * v.2 + c₁ * v.1 * 0 + v.2 * 0 - c₁ * 0 * v.1,
        imK := 0 * 0 + v.1 * v.2 - v.2 * v.1 + 0 * 0 }.imI =
    (↑(c₁ * (v.1 * v.1) + c₂ * (v.2 * v.2))).imI

Next tactic:
dsimp
/-- Intermediate result of `CliffordAlgebraQuaternion.equiv`: clifford algebras over
`CliffordAlgebraQuaternion.Q` can be converted to `ℍ[R,c₁,c₂]`. -/
def toQuaternion : CliffordAlgebra (Q c₁ c₂) →ₐ[R] ℍ[R,c₁,c₂] :=
  CliffordAlgebra.lift (Q c₁ c₂)
    ⟨{  toFun := fun v => (⟨0, v.1, v.2, 0⟩ : ℍ[R,c₁,c₂])
        map_add' := fun v₁ v₂ => by simp
        map_smul' := fun r v => by dsimp; rw [mul_zero]; rfl }, fun v => by
      dsimp
      ext
      all_goals dsimp; 

Proof state:
case imI
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
v : R × R
⊢ 0 * v.1 + v.1 * 0 - c₂ * v.2 * 0 + c₂ * 0 * v.2 = 0

Next tactic:
ring
/-- Intermediate result of `CliffordAlgebraQuaternion.equiv`: clifford algebras over
`CliffordAlgebraQuaternion.Q` can be converted to `ℍ[R,c₁,c₂]`. -/
def toQuaternion : CliffordAlgebra (Q c₁ c₂) →ₐ[R] ℍ[R,c₁,c₂] :=
  CliffordAlgebra.lift (Q c₁ c₂)
    ⟨{  toFun := fun v => (⟨0, v.1, v.2, 0⟩ : ℍ[R,c₁,c₂])
        map_add' := fun v₁ v₂ => by simp
        map_smul' := fun r v => by dsimp; rw [mul_zero]; rfl }, fun v => by
      dsimp
      ext
      all_goals 

Proof state:
case imJ
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
v : R × R
⊢ { re := 0 * 0 + c₁ * v.1 * v.1 + c₂ * v.2 * v.2 - c₁ * c₂ * 0 * 0,
        imI := 0 * v.1 + v.1 * 0 - c₂ * v.2 * 0 + c₂ * 0 * v.2, imJ := 0 * v.2 + c₁ * v.1 * 0 + v.2 * 0 - c₁ * 0 * v.1,
        imK := 0 * 0 + v.1 * v.2 - v.2 * v.1 + 0 * 0 }.imJ =
    (↑(c₁ * (v.1 * v.1) + c₂ * (v.2 * v.2))).imJ

Next tactic:
dsimp
/-- Intermediate result of `CliffordAlgebraQuaternion.equiv`: clifford algebras over
`CliffordAlgebraQuaternion.Q` can be converted to `ℍ[R,c₁,c₂]`. -/
def toQuaternion : CliffordAlgebra (Q c₁ c₂) →ₐ[R] ℍ[R,c₁,c₂] :=
  CliffordAlgebra.lift (Q c₁ c₂)
    ⟨{  toFun := fun v => (⟨0, v.1, v.2, 0⟩ : ℍ[R,c₁,c₂])
        map_add' := fun v₁ v₂ => by simp
        map_smul' := fun r v => by dsimp; rw [mul_zero]; rfl }, fun v => by
      dsimp
      ext
      all_goals dsimp; 

Proof state:
case imJ
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
v : R × R
⊢ 0 * v.2 + c₁ * v.1 * 0 + v.2 * 0 - c₁ * 0 * v.1 = 0

Next tactic:
ring
/-- Intermediate result of `CliffordAlgebraQuaternion.equiv`: clifford algebras over
`CliffordAlgebraQuaternion.Q` can be converted to `ℍ[R,c₁,c₂]`. -/
def toQuaternion : CliffordAlgebra (Q c₁ c₂) →ₐ[R] ℍ[R,c₁,c₂] :=
  CliffordAlgebra.lift (Q c₁ c₂)
    ⟨{  toFun := fun v => (⟨0, v.1, v.2, 0⟩ : ℍ[R,c₁,c₂])
        map_add' := fun v₁ v₂ => by simp
        map_smul' := fun r v => by dsimp; rw [mul_zero]; rfl }, fun v => by
      dsimp
      ext
      all_goals 

Proof state:
case imK
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
v : R × R
⊢ { re := 0 * 0 + c₁ * v.1 * v.1 + c₂ * v.2 * v.2 - c₁ * c₂ * 0 * 0,
        imI := 0 * v.1 + v.1 * 0 - c₂ * v.2 * 0 + c₂ * 0 * v.2, imJ := 0 * v.2 + c₁ * v.1 * 0 + v.2 * 0 - c₁ * 0 * v.1,
        imK := 0 * 0 + v.1 * v.2 - v.2 * v.1 + 0 * 0 }.imK =
    (↑(c₁ * (v.1 * v.1) + c₂ * (v.2 * v.2))).imK

Next tactic:
dsimp
/-- Intermediate result of `CliffordAlgebraQuaternion.equiv`: clifford algebras over
`CliffordAlgebraQuaternion.Q` can be converted to `ℍ[R,c₁,c₂]`. -/
def toQuaternion : CliffordAlgebra (Q c₁ c₂) →ₐ[R] ℍ[R,c₁,c₂] :=
  CliffordAlgebra.lift (Q c₁ c₂)
    ⟨{  toFun := fun v => (⟨0, v.1, v.2, 0⟩ : ℍ[R,c₁,c₂])
        map_add' := fun v₁ v₂ => by simp
        map_smul' := fun r v => by dsimp; rw [mul_zero]; rfl }, fun v => by
      dsimp
      ext
      all_goals dsimp; 

Proof state:
case imK
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
v : R × R
⊢ 0 * 0 + v.1 * v.2 - v.2 * v.1 + 0 * 0 = 0

Next tactic:
ring
/-- The "clifford conjugate" maps to the quaternion conjugate. -/
theorem toQuaternion_star (c : CliffordAlgebra (Q c₁ c₂)) :
    toQuaternion (star c) = star (toQuaternion c) := by
  

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
c : CliffordAlgebra (Q c₁ c₂)
⊢ toQuaternion (star c) = star (toQuaternion c)

Next tactic:
simp only [CliffordAlgebra.star_def']
/-- The "clifford conjugate" maps to the quaternion conjugate. -/
theorem toQuaternion_star (c : CliffordAlgebra (Q c₁ c₂)) :
    toQuaternion (star c) = star (toQuaternion c) := by
  simp only [CliffordAlgebra.star_def']
  

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
c : CliffordAlgebra (Q c₁ c₂)
⊢ toQuaternion (involute (reverse c)) = star (toQuaternion c)

Next tactic:
induction c using CliffordAlgebra.induction
/-- The "clifford conjugate" maps to the quaternion conjugate. -/
theorem toQuaternion_star (c : CliffordAlgebra (Q c₁ c₂)) :
    toQuaternion (star c) = star (toQuaternion c) := by
  simp only [CliffordAlgebra.star_def']
  induction c using CliffordAlgebra.induction
  

Proof state:
case h_grade0
R : Type u_1
inst✝ : CommRing R
c₁ c₂ r✝ : R
⊢ toQuaternion (involute (reverse ((algebraMap R (CliffordAlgebra (Q c₁ c₂))) r✝))) =
    star (toQuaternion ((algebraMap R (CliffordAlgebra (Q c₁ c₂))) r✝))
case h_grade1
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
x✝ : R × R
⊢ toQuaternion (involute (reverse ((ι (Q c₁ c₂)) x✝))) = star (toQuaternion ((ι (Q c₁ c₂)) x✝))
case h_mul
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
a✝² b✝ : CliffordAlgebra (Q c₁ c₂)
a✝¹ : toQuaternion (involute (reverse a✝²)) = star (toQuaternion a✝²)
a✝ : toQuaternion (involute (reverse b✝)) = star (toQuaternion b✝)
⊢ toQuaternion (involute (reverse (a✝² * b✝))) = star (toQuaternion (a✝² * b✝))
case h_add
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
a✝² b✝ : CliffordAlgebra (Q c₁ c₂)
a✝¹ : toQuaternion (involute (reverse a✝²)) = star (toQuaternion a✝²)
a✝ : toQuaternion (involute (reverse b✝)) = star (toQuaternion b✝)
⊢ toQuaternion (involute (reverse (a✝² + b✝))) = star (toQuaternion (a✝² + b✝))

Next tactic:
case h_grade0 r =>
    simp only [reverse.commutes, AlgHom.commutes, QuaternionAlgebra.coe_algebraMap,
      QuaternionAlgebra.star_coe]
/-- The "clifford conjugate" maps to the quaternion conjugate. -/
theorem toQuaternion_star (c : CliffordAlgebra (Q c₁ c₂)) :
    toQuaternion (star c) = star (toQuaternion c) := by
  simp only [CliffordAlgebra.star_def']
  induction c using CliffordAlgebra.induction
  

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ r : R
⊢ toQuaternion (involute (reverse ((algebraMap R (CliffordAlgebra (Q c₁ c₂))) r))) =
    star (toQuaternion ((algebraMap R (CliffordAlgebra (Q c₁ c₂))) r))

Next tactic:
case h_grade0 r =>
    simp only [reverse.commutes, AlgHom.commutes, QuaternionAlgebra.coe_algebraMap,
      QuaternionAlgebra.star_coe]