l3lab/ntp-mathlib huggingface dataset:
/-- Since the vector space is empty the ring is commutative. -/
instance : CommRing (CliffordAlgebra (0 : QuadraticForm R Unit)) :=
  { CliffordAlgebra.instRing _ with
    mul_comm := fun x y => by
      induction x using CliffordAlgebra.induction
      

Proof state:
R : Type u_1
inst✝ : CommRing R
src✝ : Ring (CliffordAlgebra 0) := instRing 0
y : CliffordAlgebra 0
r : R
⊢ (algebraMap R (CliffordAlgebra 0)) r * y = y * (algebraMap R (CliffordAlgebra 0)) r

Next tactic:
case h_grade0 r => apply Algebra.commutes
/-- Since the vector space is empty the ring is commutative. -/
instance : CommRing (CliffordAlgebra (0 : QuadraticForm R Unit)) :=
  { CliffordAlgebra.instRing _ with
    mul_comm := fun x y => by
      induction x using CliffordAlgebra.induction
      case h_grade0 r => 

Proof state:
R : Type u_1
inst✝ : CommRing R
src✝ : Ring (CliffordAlgebra 0) := instRing 0
y : CliffordAlgebra 0
r : R
⊢ (algebraMap R (CliffordAlgebra 0)) r * y = y * (algebraMap R (CliffordAlgebra 0)) r

Next tactic:
apply Algebra.commutes
/-- Since the vector space is empty the ring is commutative. -/
instance : CommRing (CliffordAlgebra (0 : QuadraticForm R Unit)) :=
  { CliffordAlgebra.instRing _ with
    mul_comm := fun x y => by
      induction x using CliffordAlgebra.induction
      case h_grade0 r => apply Algebra.commutes
      

Proof state:
case h_grade1
R : Type u_1
inst✝ : CommRing R
src✝ : Ring (CliffordAlgebra 0) := instRing 0
y : CliffordAlgebra 0
x✝ : Unit
⊢ (ι 0) x✝ * y = y * (ι 0) x✝
case h_mul
R : Type u_1
inst✝ : CommRing R
src✝ : Ring (CliffordAlgebra 0) := instRing 0
y a✝² b✝ : CliffordAlgebra 0
a✝¹ : a✝² * y = y * a✝²
a✝ : b✝ * y = y * b✝
⊢ a✝² * b✝ * y = y * (a✝² * b✝)
case h_add
R : Type u_1
inst✝ : CommRing R
src✝ : Ring (CliffordAlgebra 0) := instRing 0
y a✝² b✝ : CliffordAlgebra 0
a✝¹ : a✝² * y = y * a✝²
a✝ : b✝ * y = y * b✝
⊢ (a✝² + b✝) * y = y * (a✝² + b✝)

Next tactic:
case h_grade1 x => simp
/-- Since the vector space is empty the ring is commutative. -/
instance : CommRing (CliffordAlgebra (0 : QuadraticForm R Unit)) :=
  { CliffordAlgebra.instRing _ with
    mul_comm := fun x y => by
      induction x using CliffordAlgebra.induction
      case h_grade0 r => apply Algebra.commutes
      

Proof state:
R : Type u_1
inst✝ : CommRing R
src✝ : Ring (CliffordAlgebra 0) := instRing 0
y : CliffordAlgebra 0
x : Unit
⊢ (ι 0) x * y = y * (ι 0) x

Next tactic:
case h_grade1 x => simp
/-- Since the vector space is empty the ring is commutative. -/
instance : CommRing (CliffordAlgebra (0 : QuadraticForm R Unit)) :=
  { CliffordAlgebra.instRing _ with
    mul_comm := fun x y => by
      induction x using CliffordAlgebra.induction
      case h_grade0 r => apply Algebra.commutes
      case h_grade1 x => 

Proof state:
R : Type u_1
inst✝ : CommRing R
src✝ : Ring (CliffordAlgebra 0) := instRing 0
y : CliffordAlgebra 0
x : Unit
⊢ (ι 0) x * y = y * (ι 0) x

Next tactic:
simp
/-- Since the vector space is empty the ring is commutative. -/
instance : CommRing (CliffordAlgebra (0 : QuadraticForm R Unit)) :=
  { CliffordAlgebra.instRing _ with
    mul_comm := fun x y => by
      induction x using CliffordAlgebra.induction
      case h_grade0 r => apply Algebra.commutes
      case h_grade1 x => simp
      

Proof state:
case h_mul
R : Type u_1
inst✝ : CommRing R
src✝ : Ring (CliffordAlgebra 0) := instRing 0
y a✝² b✝ : CliffordAlgebra 0
a✝¹ : a✝² * y = y * a✝²
a✝ : b✝ * y = y * b✝
⊢ a✝² * b✝ * y = y * (a✝² * b✝)
case h_add
R : Type u_1
inst✝ : CommRing R
src✝ : Ring (CliffordAlgebra 0) := instRing 0
y a✝² b✝ : CliffordAlgebra 0
a✝¹ : a✝² * y = y * a✝²
a✝ : b✝ * y = y * b✝
⊢ (a✝² + b✝) * y = y * (a✝² + b✝)

Next tactic:
case h_add x₁ x₂ hx₁ hx₂ => rw [mul_add, add_mul, hx₁, hx₂]
/-- Since the vector space is empty the ring is commutative. -/
instance : CommRing (CliffordAlgebra (0 : QuadraticForm R Unit)) :=
  { CliffordAlgebra.instRing _ with
    mul_comm := fun x y => by
      induction x using CliffordAlgebra.induction
      case h_grade0 r => apply Algebra.commutes
      case h_grade1 x => simp
      

Proof state:
R : Type u_1
inst✝ : CommRing R
src✝ : Ring (CliffordAlgebra 0) := instRing 0
y x₁ x₂ : CliffordAlgebra 0
hx₁ : x₁ * y = y * x₁
hx₂ : x₂ * y = y * x₂
⊢ (x₁ + x₂) * y = y * (x₁ + x₂)

Next tactic:
case h_add x₁ x₂ hx₁ hx₂ => rw [mul_add, add_mul, hx₁, hx₂]
/-- Since the vector space is empty the ring is commutative. -/
instance : CommRing (CliffordAlgebra (0 : QuadraticForm R Unit)) :=
  { CliffordAlgebra.instRing _ with
    mul_comm := fun x y => by
      induction x using CliffordAlgebra.induction
      case h_grade0 r => apply Algebra.commutes
      case h_grade1 x => simp
      case h_add x₁ x₂ hx₁ hx₂ => 

Proof state:
R : Type u_1
inst✝ : CommRing R
src✝ : Ring (CliffordAlgebra 0) := instRing 0
y x₁ x₂ : CliffordAlgebra 0
hx₁ : x₁ * y = y * x₁
hx₂ : x₂ * y = y * x₂
⊢ (x₁ + x₂) * y = y * (x₁ + x₂)

Next tactic:
rw [mul_add, add_mul, hx₁, hx₂]
/-- Since the vector space is empty the ring is commutative. -/
instance : CommRing (CliffordAlgebra (0 : QuadraticForm R Unit)) :=
  { CliffordAlgebra.instRing _ with
    mul_comm := fun x y => by
      induction x using CliffordAlgebra.induction
      case h_grade0 r => apply Algebra.commutes
      case h_grade1 x => simp
      case h_add x₁ x₂ hx₁ hx₂ => rw [mul_add, add_mul, hx₁, hx₂]
      

Proof state:
case h_mul
R : Type u_1
inst✝ : CommRing R
src✝ : Ring (CliffordAlgebra 0) := instRing 0
y a✝² b✝ : CliffordAlgebra 0
a✝¹ : a✝² * y = y * a✝²
a✝ : b✝ * y = y * b✝
⊢ a✝² * b✝ * y = y * (a✝² * b✝)

Next tactic:
case h_mul x₁ x₂ hx₁ hx₂ => rw [mul_assoc, hx₂, ← mul_assoc, hx₁, ← mul_assoc]
/-- Since the vector space is empty the ring is commutative. -/
instance : CommRing (CliffordAlgebra (0 : QuadraticForm R Unit)) :=
  { CliffordAlgebra.instRing _ with
    mul_comm := fun x y => by
      induction x using CliffordAlgebra.induction
      case h_grade0 r => apply Algebra.commutes
      case h_grade1 x => simp
      case h_add x₁ x₂ hx₁ hx₂ => rw [mul_add, add_mul, hx₁, hx₂]
      

Proof state:
R : Type u_1
inst✝ : CommRing R
src✝ : Ring (CliffordAlgebra 0) := instRing 0
y x₁ x₂ : CliffordAlgebra 0
hx₁ : x₁ * y = y * x₁
hx₂ : x₂ * y = y * x₂
⊢ x₁ * x₂ * y = y * (x₁ * x₂)

Next tactic:
case h_mul x₁ x₂ hx₁ hx₂ => rw [mul_assoc, hx₂, ← mul_assoc, hx₁, ← mul_assoc]
/-- Since the vector space is empty the ring is commutative. -/
instance : CommRing (CliffordAlgebra (0 : QuadraticForm R Unit)) :=
  { CliffordAlgebra.instRing _ with
    mul_comm := fun x y => by
      induction x using CliffordAlgebra.induction
      case h_grade0 r => apply Algebra.commutes
      case h_grade1 x => simp
      case h_add x₁ x₂ hx₁ hx₂ => rw [mul_add, add_mul, hx₁, hx₂]
      case h_mul x₁ x₂ hx₁ hx₂ => 

Proof state:
R : Type u_1
inst✝ : CommRing R
src✝ : Ring (CliffordAlgebra 0) := instRing 0
y x₁ x₂ : CliffordAlgebra 0
hx₁ : x₁ * y = y * x₁
hx₂ : x₂ * y = y * x₂
⊢ x₁ * x₂ * y = y * (x₁ * x₂)

Next tactic:
rw [mul_assoc, hx₂, ← mul_assoc, hx₁, ← mul_assoc]
theorem reverse_apply (x : CliffordAlgebra (0 : QuadraticForm R Unit)) :
    reverse (R := R) x = x := by
  

Proof state:
R : Type u_1
inst✝ : CommRing R
x : CliffordAlgebra 0
⊢ reverse x = x

Next tactic:
induction x using CliffordAlgebra.induction
theorem reverse_apply (x : CliffordAlgebra (0 : QuadraticForm R Unit)) :
    reverse (R := R) x = x := by
  induction x using CliffordAlgebra.induction
  

Proof state:
case h_grade0
R : Type u_1
inst✝ : CommRing R
r✝ : R
⊢ reverse ((algebraMap R (CliffordAlgebra 0)) r✝) = (algebraMap R (CliffordAlgebra 0)) r✝
case h_grade1
R : Type u_1
inst✝ : CommRing R
x✝ : Unit
⊢ reverse ((ι 0) x✝) = (ι 0) x✝
case h_mul
R : Type u_1
inst✝ : CommRing R
a✝² b✝ : CliffordAlgebra 0
a✝¹ : reverse a✝² = a✝²
a✝ : reverse b✝ = b✝
⊢ reverse (a✝² * b✝) = a✝² * b✝
case h_add
R : Type u_1
inst✝ : CommRing R
a✝² b✝ : CliffordAlgebra 0
a✝¹ : reverse a✝² = a✝²
a✝ : reverse b✝ = b✝
⊢ reverse (a✝² + b✝) = a✝² + b✝

Next tactic:
case h_grade0 r => exact reverse.commutes _
theorem reverse_apply (x : CliffordAlgebra (0 : QuadraticForm R Unit)) :
    reverse (R := R) x = x := by
  induction x using CliffordAlgebra.induction
  

Proof state:
R : Type u_1
inst✝ : CommRing R
r : R
⊢ reverse ((algebraMap R (CliffordAlgebra 0)) r) = (algebraMap R (CliffordAlgebra 0)) r

Next tactic:
case h_grade0 r => exact reverse.commutes _
theorem reverse_apply (x : CliffordAlgebra (0 : QuadraticForm R Unit)) :
    reverse (R := R) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => 

Proof state:
R : Type u_1
inst✝ : CommRing R
r : R
⊢ reverse ((algebraMap R (CliffordAlgebra 0)) r) = (algebraMap R (CliffordAlgebra 0)) r

Next tactic:
exact reverse.commutes _
theorem reverse_apply (x : CliffordAlgebra (0 : QuadraticForm R Unit)) :
    reverse (R := R) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  

Proof state:
case h_grade1
R : Type u_1
inst✝ : CommRing R
x✝ : Unit
⊢ reverse ((ι 0) x✝) = (ι 0) x✝
case h_mul
R : Type u_1
inst✝ : CommRing R
a✝² b✝ : CliffordAlgebra 0
a✝¹ : reverse a✝² = a✝²
a✝ : reverse b✝ = b✝
⊢ reverse (a✝² * b✝) = a✝² * b✝
case h_add
R : Type u_1
inst✝ : CommRing R
a✝² b✝ : CliffordAlgebra 0
a✝¹ : reverse a✝² = a✝²
a✝ : reverse b✝ = b✝
⊢ reverse (a✝² + b✝) = a✝² + b✝

Next tactic:
case h_grade1 x => rw [ι_eq_zero, LinearMap.zero_apply, reverse.map_zero]
theorem reverse_apply (x : CliffordAlgebra (0 : QuadraticForm R Unit)) :
    reverse (R := R) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  

Proof state:
R : Type u_1
inst✝ : CommRing R
x : Unit
⊢ reverse ((ι 0) x) = (ι 0) x

Next tactic:
case h_grade1 x => rw [ι_eq_zero, LinearMap.zero_apply, reverse.map_zero]
theorem reverse_apply (x : CliffordAlgebra (0 : QuadraticForm R Unit)) :
    reverse (R := R) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  case h_grade1 x => 

Proof state:
R : Type u_1
inst✝ : CommRing R
x : Unit
⊢ reverse ((ι 0) x) = (ι 0) x

Next tactic:
rw [ι_eq_zero, LinearMap.zero_apply, reverse.map_zero]
theorem reverse_apply (x : CliffordAlgebra (0 : QuadraticForm R Unit)) :
    reverse (R := R) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  case h_grade1 x => rw [ι_eq_zero, LinearMap.zero_apply, reverse.map_zero]
  

Proof state:
case h_mul
R : Type u_1
inst✝ : CommRing R
a✝² b✝ : CliffordAlgebra 0
a✝¹ : reverse a✝² = a✝²
a✝ : reverse b✝ = b✝
⊢ reverse (a✝² * b✝) = a✝² * b✝
case h_add
R : Type u_1
inst✝ : CommRing R
a✝² b✝ : CliffordAlgebra 0
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₂]
theorem reverse_apply (x : CliffordAlgebra (0 : QuadraticForm R Unit)) :
    reverse (R := R) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  case h_grade1 x => rw [ι_eq_zero, LinearMap.zero_apply, reverse.map_zero]
  

Proof state:
R : Type u_1
inst✝ : CommRing R
x₁ x₂ : CliffordAlgebra 0
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₂]
theorem reverse_apply (x : CliffordAlgebra (0 : QuadraticForm R Unit)) :
    reverse (R := R) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  case h_grade1 x => rw [ι_eq_zero, LinearMap.zero_apply, reverse.map_zero]
  case h_mul x₁ x₂ hx₁ hx₂ => 

Proof state:
R : Type u_1
inst✝ : CommRing R
x₁ x₂ : CliffordAlgebra 0
hx₁ : reverse x₁ = x₁
hx₂ : reverse x₂ = x₂
⊢ reverse (x₁ * x₂) = x₁ * x₂

Next tactic:
rw [reverse.map_mul, mul_comm, hx₁, hx₂]
theorem reverse_apply (x : CliffordAlgebra (0 : QuadraticForm R Unit)) :
    reverse (R := R) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  case h_grade1 x => rw [ι_eq_zero, LinearMap.zero_apply, reverse.map_zero]
  case h_mul x₁ x₂ hx₁ hx₂ => rw [reverse.map_mul, mul_comm, hx₁, hx₂]
  

Proof state:
case h_add
R : Type u_1
inst✝ : CommRing R
a✝² b✝ : CliffordAlgebra 0
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₂]
theorem reverse_apply (x : CliffordAlgebra (0 : QuadraticForm R Unit)) :
    reverse (R := R) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  case h_grade1 x => rw [ι_eq_zero, LinearMap.zero_apply, reverse.map_zero]
  case h_mul x₁ x₂ hx₁ hx₂ => rw [reverse.map_mul, mul_comm, hx₁, hx₂]
  

Proof state:
R : Type u_1
inst✝ : CommRing R
x₁ x₂ : CliffordAlgebra 0
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₂]
theorem reverse_apply (x : CliffordAlgebra (0 : QuadraticForm R Unit)) :
    reverse (R := R) x = x := by
  induction x using CliffordAlgebra.induction
  case h_grade0 r => exact reverse.commutes _
  case h_grade1 x => rw [ι_eq_zero, LinearMap.zero_apply, reverse.map_zero]
  case h_mul x₁ x₂ hx₁ hx₂ => rw [reverse.map_mul, mul_comm, hx₁, hx₂]
  case h_add x₁ x₂ hx₁ hx₂ => 

Proof state:
R : Type u_1
inst✝ : CommRing R
x₁ x₂ : CliffordAlgebra 0
hx₁ : reverse x₁ = x₁
hx₂ : reverse x₂ = x₂
⊢ reverse (x₁ + x₂) = x₁ + x₂

Next tactic:
rw [reverse.map_add, hx₁, hx₂]
@[simp]
theorem involute_eq_id :
    (involute : CliffordAlgebra (0 : QuadraticForm R Unit) →ₐ[R] _) = AlgHom.id R _ := by 

Proof state:
R : Type u_1
inst✝ : CommRing R
⊢ involute = AlgHom.id R (CliffordAlgebra 0)

Next tactic:
ext
@[simp]
theorem involute_eq_id :
    (involute : CliffordAlgebra (0 : QuadraticForm R Unit) →ₐ[R] _) = AlgHom.id R _ := by ext; 

Proof state:
case a.h
R : Type u_1
inst✝ : CommRing R
x✝ : Unit
⊢ (AlgHom.toLinearMap involute ∘ₗ ι 0) x✝ = (AlgHom.toLinearMap (AlgHom.id R (CliffordAlgebra 0)) ∘ₗ ι 0) x✝

Next tactic:
simp
/-- The clifford algebra over a 0-dimensional vector space is isomorphic to its scalars. -/
protected def equiv : CliffordAlgebra (0 : QuadraticForm R Unit) ≃ₐ[R] R :=
  AlgEquiv.ofAlgHom
    (CliffordAlgebra.lift (0 : QuadraticForm R Unit) <|
      ⟨0, fun m : Unit => (zero_mul (0 : R)).trans (algebraMap R _).map_zero.symm⟩)
    (Algebra.ofId R _) (by 

Proof state:
R : Type u_1
inst✝ : CommRing R
⊢ AlgHom.comp ((lift 0) { val := 0, property := (_ : ∀ (m : Unit), 0 * 0 = (algebraMap R R) (0 m)) })
      (Algebra.ofId R (CliffordAlgebra 0)) =
    AlgHom.id R R

Next tactic:
ext
/-- The clifford algebra over a 0-dimensional vector space is isomorphic to its scalars. -/
protected def equiv : CliffordAlgebra (0 : QuadraticForm R Unit) ≃ₐ[R] R :=
  AlgEquiv.ofAlgHom
    (CliffordAlgebra.lift (0 : QuadraticForm R Unit) <|
      ⟨0, fun m : Unit => (zero_mul (0 : R)).trans (algebraMap R _).map_zero.symm⟩)
    (Algebra.ofId R _) (by ext)
    (by 

Proof state:
R : Type u_1
inst✝ : CommRing R
⊢ AlgHom.comp (Algebra.ofId R (CliffordAlgebra 0))
      ((lift 0) { val := 0, property := (_ : ∀ (m : Unit), 0 * 0 = (algebraMap R R) (0 m)) }) =
    AlgHom.id R (CliffordAlgebra 0)

Next tactic:
ext : 1
/-- The clifford algebra over a 0-dimensional vector space is isomorphic to its scalars. -/
protected def equiv : CliffordAlgebra (0 : QuadraticForm R Unit) ≃ₐ[R] R :=
  AlgEquiv.ofAlgHom
    (CliffordAlgebra.lift (0 : QuadraticForm R Unit) <|
      ⟨0, fun m : Unit => (zero_mul (0 : R)).trans (algebraMap R _).map_zero.symm⟩)
    (Algebra.ofId R _) (by ext)
    (by ext : 1; 

Proof state:
case a
R : Type u_1
inst✝ : CommRing R
⊢ AlgHom.toLinearMap
        (AlgHom.comp (Algebra.ofId R (CliffordAlgebra 0))
          ((lift 0) { val := 0, property := (_ : ∀ (m : Unit), 0 * 0 = (algebraMap R R) (0 m)) })) ∘ₗ
      ι 0 =
    AlgHom.toLinearMap (AlgHom.id R (CliffordAlgebra 0)) ∘ₗ ι 0

Next tactic:
rw [ι_eq_zero, LinearMap.comp_zero, LinearMap.comp_zero]
/-- Intermediate result for `CliffordAlgebraComplex.equiv`: clifford algebras over
`CliffordAlgebraComplex.Q` above can be converted to `ℂ`. -/
def toComplex : CliffordAlgebra Q →ₐ[ℝ] ℂ :=
  CliffordAlgebra.lift Q
    ⟨LinearMap.toSpanSingleton _ _ Complex.I, fun r => by
      

Proof state:
r : ℝ
⊢ (LinearMap.toSpanSingleton ℝ ℂ Complex.I) r * (LinearMap.toSpanSingleton ℝ ℂ Complex.I) r = (algebraMap ℝ ℂ) (Q r)

Next tactic:
dsimp [LinearMap.toSpanSingleton, LinearMap.id]
/-- Intermediate result for `CliffordAlgebraComplex.equiv`: clifford algebras over
`CliffordAlgebraComplex.Q` above can be converted to `ℂ`. -/
def toComplex : CliffordAlgebra Q →ₐ[ℝ] ℂ :=
  CliffordAlgebra.lift Q
    ⟨LinearMap.toSpanSingleton _ _ Complex.I, fun r => by
      dsimp [LinearMap.toSpanSingleton, LinearMap.id]
      

Proof state:
r : ℝ
⊢ ↑r * Complex.I * (↑r * Complex.I) = ↑(-(r * r))

Next tactic:
rw [mul_mul_mul_comm]
/-- Intermediate result for `CliffordAlgebraComplex.equiv`: clifford algebras over
`CliffordAlgebraComplex.Q` above can be converted to `ℂ`. -/
def toComplex : CliffordAlgebra Q →ₐ[ℝ] ℂ :=
  CliffordAlgebra.lift Q
    ⟨LinearMap.toSpanSingleton _ _ Complex.I, fun r => by
      dsimp [LinearMap.toSpanSingleton, LinearMap.id]
      rw [mul_mul_mul_comm]
      

Proof state:
r : ℝ
⊢ ↑r * ↑r * (Complex.I * Complex.I) = ↑(-(r * r))

Next tactic:
simp
/-- `CliffordAlgebra.involute` is analogous to `Complex.conj`. -/
@[simp]
theorem toComplex_involute (c : CliffordAlgebra Q) :
    toComplex (involute c) = conj (toComplex c) := by
  

Proof state:
c : CliffordAlgebra Q
⊢ toComplex (involute c) = (starRingEnd ℂ) (toComplex c)

Next tactic:
have : toComplex (involute (ι Q 1)) = conj (toComplex (ι Q 1)) := by
    simp only [involute_ι, toComplex_ι, AlgHom.map_neg, one_smul, Complex.conj_I]
/-- `CliffordAlgebra.involute` is analogous to `Complex.conj`. -/
@[simp]
theorem toComplex_involute (c : CliffordAlgebra Q) :
    toComplex (involute c) = conj (toComplex c) := by
  have : toComplex (involute (ι Q 1)) = conj (toComplex (ι Q 1)) := by
    

Proof state:
c : CliffordAlgebra Q
⊢ toComplex (involute ((ι Q) 1)) = (starRingEnd ℂ) (toComplex ((ι Q) 1))

Next tactic:
simp only [involute_ι, toComplex_ι, AlgHom.map_neg, one_smul, Complex.conj_I]
/-- `CliffordAlgebra.involute` is analogous to `Complex.conj`. -/
@[simp]
theorem toComplex_involute (c : CliffordAlgebra Q) :
    toComplex (involute c) = conj (toComplex c) := by
  have : toComplex (involute (ι Q 1)) = conj (toComplex (ι Q 1)) := by
    simp only [involute_ι, toComplex_ι, AlgHom.map_neg, one_smul, Complex.conj_I]
  

Proof state:
c : CliffordAlgebra Q
this : toComplex (involute ((ι Q) 1)) = (starRingEnd ℂ) (toComplex ((ι Q) 1))
⊢ toComplex (involute c) = (starRingEnd ℂ) (toComplex c)

Next tactic:
suffices toComplex.comp involute = Complex.conjAe.toAlgHom.comp toComplex by
    exact AlgHom.congr_fun this c
/-- `CliffordAlgebra.involute` is analogous to `Complex.conj`. -/
@[simp]
theorem toComplex_involute (c : CliffordAlgebra Q) :
    toComplex (involute c) = conj (toComplex c) := by
  have : toComplex (involute (ι Q 1)) = conj (toComplex (ι Q 1)) := by
    simp only [involute_ι, toComplex_ι, AlgHom.map_neg, one_smul, Complex.conj_I]
  suffices toComplex.comp involute = Complex.conjAe.toAlgHom.comp toComplex by
    

Proof state:
c : CliffordAlgebra Q
this✝ : toComplex (involute ((ι Q) 1)) = (starRingEnd ℂ) (toComplex ((ι Q) 1))
this : AlgHom.comp toComplex involute = AlgHom.comp (↑Complex.conjAe) toComplex
⊢ toComplex (involute c) = (starRingEnd ℂ) (toComplex c)

Next tactic:
exact AlgHom.congr_fun this c
/-- `CliffordAlgebra.involute` is analogous to `Complex.conj`. -/
@[simp]
theorem toComplex_involute (c : CliffordAlgebra Q) :
    toComplex (involute c) = conj (toComplex c) := by
  have : toComplex (involute (ι Q 1)) = conj (toComplex (ι Q 1)) := by
    simp only [involute_ι, toComplex_ι, AlgHom.map_neg, one_smul, Complex.conj_I]
  suffices toComplex.comp involute = Complex.conjAe.toAlgHom.comp toComplex by
    exact AlgHom.congr_fun this c
  

Proof state:
c : CliffordAlgebra Q
this : toComplex (involute ((ι Q) 1)) = (starRingEnd ℂ) (toComplex ((ι Q) 1))
⊢ AlgHom.comp toComplex involute = AlgHom.comp (↑Complex.conjAe) toComplex

Next tactic:
ext : 2
/-- `CliffordAlgebra.involute` is analogous to `Complex.conj`. -/
@[simp]
theorem toComplex_involute (c : CliffordAlgebra Q) :
    toComplex (involute c) = conj (toComplex c) := by
  have : toComplex (involute (ι Q 1)) = conj (toComplex (ι Q 1)) := by
    simp only [involute_ι, toComplex_ι, AlgHom.map_neg, one_smul, Complex.conj_I]
  suffices toComplex.comp involute = Complex.conjAe.toAlgHom.comp toComplex by
    exact AlgHom.congr_fun this c
  ext : 2
  

Proof state:
case a.h
c : CliffordAlgebra Q
this : toComplex (involute ((ι Q) 1)) = (starRingEnd ℂ) (toComplex ((ι Q) 1))
⊢ (AlgHom.toLinearMap (AlgHom.comp toComplex involute) ∘ₗ ι Q) 1 =
    (AlgHom.toLinearMap (AlgHom.comp (↑Complex.conjAe) toComplex) ∘ₗ ι Q) 1

Next tactic:
exact this
/-- Intermediate result for `CliffordAlgebraComplex.equiv`: `ℂ` can be converted to
`CliffordAlgebraComplex.Q` above can be converted to. -/
def ofComplex : ℂ →ₐ[ℝ] CliffordAlgebra Q :=
  Complex.lift
    ⟨CliffordAlgebra.ι Q 1, by
      

Proof state:
⊢ (ι Q) 1 * (ι Q) 1 = -1

Next tactic:
rw [CliffordAlgebra.ι_sq_scalar, Q_apply, one_mul, RingHom.map_neg, RingHom.map_one]
@[simp]
theorem ofComplex_I : ofComplex Complex.I = ι Q 1 :=
  Complex.liftAux_apply_I _ (by 

Proof state:
⊢ ↑{ val := (ι Q) 1, property := ofComplex.proof_1 } * ↑{ val := (ι Q) 1, property := ofComplex.proof_1 } = -1

Next tactic:
simp
@[simp]
theorem toComplex_comp_ofComplex : toComplex.comp ofComplex = AlgHom.id ℝ ℂ := by
  

Proof state:
⊢ AlgHom.comp toComplex ofComplex = AlgHom.id ℝ ℂ

Next tactic:
ext1
@[simp]
theorem toComplex_comp_ofComplex : toComplex.comp ofComplex = AlgHom.id ℝ ℂ := by
  ext1
  

Proof state:
case h
⊢ (AlgHom.comp toComplex ofComplex) Complex.I = (AlgHom.id ℝ ℂ) Complex.I

Next tactic:
dsimp only [AlgHom.comp_apply, Subtype.coe_mk, AlgHom.id_apply]
@[simp]
theorem toComplex_comp_ofComplex : toComplex.comp ofComplex = AlgHom.id ℝ ℂ := by
  ext1
  dsimp only [AlgHom.comp_apply, Subtype.coe_mk, AlgHom.id_apply]
  

Proof state:
case h
⊢ toComplex (ofComplex Complex.I) = Complex.I

Next tactic:
rw [ofComplex_I, toComplex_ι, one_smul]
@[simp]
theorem ofComplex_comp_toComplex : ofComplex.comp toComplex = AlgHom.id ℝ (CliffordAlgebra Q) := by
  

Proof state:
⊢ AlgHom.comp ofComplex toComplex = AlgHom.id ℝ (CliffordAlgebra Q)

Next tactic:
ext
@[simp]
theorem ofComplex_comp_toComplex : ofComplex.comp toComplex = AlgHom.id ℝ (CliffordAlgebra Q) := by
  ext
  

Proof state:
case a.h
⊢ (AlgHom.toLinearMap (AlgHom.comp ofComplex toComplex) ∘ₗ ι Q) 1 =
    (AlgHom.toLinearMap (AlgHom.id ℝ (CliffordAlgebra Q)) ∘ₗ ι Q) 1

Next tactic:
dsimp only [LinearMap.comp_apply, Subtype.coe_mk, AlgHom.id_apply, AlgHom.toLinearMap_apply,
    AlgHom.comp_apply]
@[simp]
theorem ofComplex_comp_toComplex : ofComplex.comp toComplex = AlgHom.id ℝ (CliffordAlgebra Q) := by
  ext
  dsimp only [LinearMap.comp_apply, Subtype.coe_mk, AlgHom.id_apply, AlgHom.toLinearMap_apply,
    AlgHom.comp_apply]
  

Proof state:
case a.h
⊢ ofComplex (toComplex ((ι Q) 1)) = (ι Q) 1

Next tactic:
rw [toComplex_ι, one_smul, ofComplex_I]
/-- The clifford algebra is commutative since it is isomorphic to the complex numbers.

TODO: prove this is true for all `CliffordAlgebra`s over a 1-dimensional vector space. -/
instance : CommRing (CliffordAlgebra Q) :=
  { CliffordAlgebra.instRing _ with
    mul_comm := fun x y =>
      CliffordAlgebraComplex.equiv.injective <| by
        

Proof state:
src✝ : Ring (CliffordAlgebra Q) := instRing Q
x y : CliffordAlgebra Q
⊢ CliffordAlgebraComplex.equiv (x * y) = CliffordAlgebraComplex.equiv (y * x)

Next tactic:
rw [AlgEquiv.map_mul, mul_comm, AlgEquiv.map_mul]
/-- `reverse` is a no-op over `CliffordAlgebraComplex.Q`. -/
theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x := by
  

Proof state:
x : CliffordAlgebra Q
⊢ reverse x = x

Next tactic:
induction x using CliffordAlgebra.induction