l3lab/ntp-mathlib huggingface dataset:
/-- 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
  case h_grade0 r =>
    

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:
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
  case h_grade0 r =>
    simp only [reverse.commutes, AlgHom.commutes, QuaternionAlgebra.coe_algebraMap,
      QuaternionAlgebra.star_coe]
  

Proof state:
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_grade1 x =>
    rw [reverse_ι, involute_ι, toQuaternion_ι, AlgHom.map_neg, toQuaternion_ι,
      QuaternionAlgebra.neg_mk, star_mk, neg_zero]
/-- 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
  case h_grade0 r =>
    simp only [reverse.commutes, AlgHom.commutes, QuaternionAlgebra.coe_algebraMap,
      QuaternionAlgebra.star_coe]
  

Proof state:
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))

Next tactic:
case h_grade1 x =>
    rw [reverse_ι, involute_ι, toQuaternion_ι, AlgHom.map_neg, toQuaternion_ι,
      QuaternionAlgebra.neg_mk, star_mk, neg_zero]
/-- 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
  case h_grade0 r =>
    simp only [reverse.commutes, AlgHom.commutes, QuaternionAlgebra.coe_algebraMap,
      QuaternionAlgebra.star_coe]
  case h_grade1 x =>
    

Proof state:
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))

Next tactic:
rw [reverse_ι, involute_ι, toQuaternion_ι, AlgHom.map_neg, toQuaternion_ι,
      QuaternionAlgebra.neg_mk, star_mk, neg_zero]
/-- 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
  case h_grade0 r =>
    simp only [reverse.commutes, AlgHom.commutes, QuaternionAlgebra.coe_algebraMap,
      QuaternionAlgebra.star_coe]
  case h_grade1 x =>
    rw [reverse_ι, involute_ι, toQuaternion_ι, AlgHom.map_neg, toQuaternion_ι,
      QuaternionAlgebra.neg_mk, star_mk, neg_zero]
  

Proof state:
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_mul x₁ x₂ hx₁ hx₂ => simp only [reverse.map_mul, AlgHom.map_mul, hx₁, hx₂, star_mul]
/-- 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
  case h_grade0 r =>
    simp only [reverse.commutes, AlgHom.commutes, QuaternionAlgebra.coe_algebraMap,
      QuaternionAlgebra.star_coe]
  case h_grade1 x =>
    rw [reverse_ι, involute_ι, toQuaternion_ι, AlgHom.map_neg, toQuaternion_ι,
      QuaternionAlgebra.neg_mk, star_mk, neg_zero]
  

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

Next tactic:
case h_mul x₁ x₂ hx₁ hx₂ => simp only [reverse.map_mul, AlgHom.map_mul, hx₁, hx₂, star_mul]
/-- 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
  case h_grade0 r =>
    simp only [reverse.commutes, AlgHom.commutes, QuaternionAlgebra.coe_algebraMap,
      QuaternionAlgebra.star_coe]
  case h_grade1 x =>
    rw [reverse_ι, involute_ι, toQuaternion_ι, AlgHom.map_neg, toQuaternion_ι,
      QuaternionAlgebra.neg_mk, star_mk, neg_zero]
  case h_mul x₁ x₂ hx₁ hx₂ => 

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

Next tactic:
simp only [reverse.map_mul, AlgHom.map_mul, hx₁, hx₂, star_mul]
/-- 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
  case h_grade0 r =>
    simp only [reverse.commutes, AlgHom.commutes, QuaternionAlgebra.coe_algebraMap,
      QuaternionAlgebra.star_coe]
  case h_grade1 x =>
    rw [reverse_ι, involute_ι, toQuaternion_ι, AlgHom.map_neg, toQuaternion_ι,
      QuaternionAlgebra.neg_mk, star_mk, neg_zero]
  case h_mul x₁ x₂ hx₁ hx₂ => simp only [reverse.map_mul, AlgHom.map_mul, hx₁, hx₂, star_mul]
  

Proof state:
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_add x₁ x₂ hx₁ hx₂ => simp only [reverse.map_add, AlgHom.map_add, hx₁, hx₂, star_add]
/-- 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
  case h_grade0 r =>
    simp only [reverse.commutes, AlgHom.commutes, QuaternionAlgebra.coe_algebraMap,
      QuaternionAlgebra.star_coe]
  case h_grade1 x =>
    rw [reverse_ι, involute_ι, toQuaternion_ι, AlgHom.map_neg, toQuaternion_ι,
      QuaternionAlgebra.neg_mk, star_mk, neg_zero]
  case h_mul x₁ x₂ hx₁ hx₂ => simp only [reverse.map_mul, AlgHom.map_mul, hx₁, hx₂, star_mul]
  

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

Next tactic:
case h_add x₁ x₂ hx₁ hx₂ => simp only [reverse.map_add, AlgHom.map_add, hx₁, hx₂, star_add]
/-- 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
  case h_grade0 r =>
    simp only [reverse.commutes, AlgHom.commutes, QuaternionAlgebra.coe_algebraMap,
      QuaternionAlgebra.star_coe]
  case h_grade1 x =>
    rw [reverse_ι, involute_ι, toQuaternion_ι, AlgHom.map_neg, toQuaternion_ι,
      QuaternionAlgebra.neg_mk, star_mk, neg_zero]
  case h_mul x₁ x₂ hx₁ hx₂ => simp only [reverse.map_mul, AlgHom.map_mul, hx₁, hx₂, star_mul]
  case h_add x₁ x₂ hx₁ hx₂ => 

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

Next tactic:
simp only [reverse.map_add, AlgHom.map_add, hx₁, hx₂, star_add]
@[simp]
theorem ofQuaternion_comp_toQuaternion :
    ofQuaternion.comp toQuaternion = AlgHom.id R (CliffordAlgebra (Q c₁ c₂)) := by
  

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ AlgHom.comp ofQuaternion toQuaternion = AlgHom.id R (CliffordAlgebra (Q c₁ c₂))

Next tactic:
ext : 1
@[simp]
theorem ofQuaternion_comp_toQuaternion :
    ofQuaternion.comp toQuaternion = AlgHom.id R (CliffordAlgebra (Q c₁ c₂)) := by
  ext : 1
  

Proof state:
case a
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ AlgHom.toLinearMap (AlgHom.comp ofQuaternion toQuaternion) ∘ₗ ι (Q c₁ c₂) =
    AlgHom.toLinearMap (AlgHom.id R (CliffordAlgebra (Q c₁ c₂))) ∘ₗ ι (Q c₁ c₂)

Next tactic:
dsimp
@[simp]
theorem ofQuaternion_comp_toQuaternion :
    ofQuaternion.comp toQuaternion = AlgHom.id R (CliffordAlgebra (Q c₁ c₂)) := by
  ext : 1
  dsimp -- before we end up with two goals and have to do this twice
  

Proof state:
case a
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (AlgHom.toLinearMap ofQuaternion ∘ₗ AlgHom.toLinearMap toQuaternion) ∘ₗ ι (Q c₁ c₂) =
    AlgHom.toLinearMap (AlgHom.id R (CliffordAlgebra (Q c₁ c₂))) ∘ₗ ι (Q c₁ c₂)

Next tactic:
ext
@[simp]
theorem ofQuaternion_comp_toQuaternion :
    ofQuaternion.comp toQuaternion = AlgHom.id R (CliffordAlgebra (Q c₁ c₂)) := by
  ext : 1
  dsimp -- before we end up with two goals and have to do this twice
  ext
  

Proof state:
case a.hl.h
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (((AlgHom.toLinearMap ofQuaternion ∘ₗ AlgHom.toLinearMap toQuaternion) ∘ₗ ι (Q c₁ c₂)) ∘ₗ LinearMap.inl R R R) 1 =
    ((AlgHom.toLinearMap (AlgHom.id R (CliffordAlgebra (Q c₁ c₂))) ∘ₗ ι (Q c₁ c₂)) ∘ₗ LinearMap.inl R R R) 1
case a.hr.h
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (((AlgHom.toLinearMap ofQuaternion ∘ₗ AlgHom.toLinearMap toQuaternion) ∘ₗ ι (Q c₁ c₂)) ∘ₗ LinearMap.inr R R R) 1 =
    ((AlgHom.toLinearMap (AlgHom.id R (CliffordAlgebra (Q c₁ c₂))) ∘ₗ ι (Q c₁ c₂)) ∘ₗ LinearMap.inr R R R) 1

Next tactic:
all_goals
    dsimp
    rw [toQuaternion_ι]
    dsimp
    simp only [toQuaternion_ι, zero_smul, one_smul, zero_add, add_zero, RingHom.map_zero]
@[simp]
theorem ofQuaternion_comp_toQuaternion :
    ofQuaternion.comp toQuaternion = AlgHom.id R (CliffordAlgebra (Q c₁ c₂)) := by
  ext : 1
  dsimp -- before we end up with two goals and have to do this twice
  ext
  all_goals
    

Proof state:
case a.hl.h
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (((AlgHom.toLinearMap ofQuaternion ∘ₗ AlgHom.toLinearMap toQuaternion) ∘ₗ ι (Q c₁ c₂)) ∘ₗ LinearMap.inl R R R) 1 =
    ((AlgHom.toLinearMap (AlgHom.id R (CliffordAlgebra (Q c₁ c₂))) ∘ₗ ι (Q c₁ c₂)) ∘ₗ LinearMap.inl R R R) 1

Next tactic:
dsimp
@[simp]
theorem ofQuaternion_comp_toQuaternion :
    ofQuaternion.comp toQuaternion = AlgHom.id R (CliffordAlgebra (Q c₁ c₂)) := by
  ext : 1
  dsimp -- before we end up with two goals and have to do this twice
  ext
  all_goals
    dsimp
    

Proof state:
case a.hl.h
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ ofQuaternion (toQuaternion ((ι (Q c₁ c₂)) (1, 0))) = (ι (Q c₁ c₂)) (1, 0)

Next tactic:
rw [toQuaternion_ι]
@[simp]
theorem ofQuaternion_comp_toQuaternion :
    ofQuaternion.comp toQuaternion = AlgHom.id R (CliffordAlgebra (Q c₁ c₂)) := by
  ext : 1
  dsimp -- before we end up with two goals and have to do this twice
  ext
  all_goals
    dsimp
    rw [toQuaternion_ι]
    

Proof state:
case a.hl.h
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ ofQuaternion { re := 0, imI := (1, 0).1, imJ := (1, 0).2, imK := 0 } = (ι (Q c₁ c₂)) (1, 0)

Next tactic:
dsimp
@[simp]
theorem ofQuaternion_comp_toQuaternion :
    ofQuaternion.comp toQuaternion = AlgHom.id R (CliffordAlgebra (Q c₁ c₂)) := by
  ext : 1
  dsimp -- before we end up with two goals and have to do this twice
  ext
  all_goals
    dsimp
    rw [toQuaternion_ι]
    dsimp
    

Proof state:
case a.hl.h
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (algebraMap R (CliffordAlgebra (Q c₁ c₂))) 0 + 1 • (ι (Q c₁ c₂)) (1, 0) + 0 • (ι (Q c₁ c₂)) (0, 1) +
      0 • ((ι (Q c₁ c₂)) (1, 0) * (ι (Q c₁ c₂)) (0, 1)) =
    (ι (Q c₁ c₂)) (1, 0)

Next tactic:
simp only [toQuaternion_ι, zero_smul, one_smul, zero_add, add_zero, RingHom.map_zero]
@[simp]
theorem ofQuaternion_comp_toQuaternion :
    ofQuaternion.comp toQuaternion = AlgHom.id R (CliffordAlgebra (Q c₁ c₂)) := by
  ext : 1
  dsimp -- before we end up with two goals and have to do this twice
  ext
  all_goals
    

Proof state:
case a.hr.h
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (((AlgHom.toLinearMap ofQuaternion ∘ₗ AlgHom.toLinearMap toQuaternion) ∘ₗ ι (Q c₁ c₂)) ∘ₗ LinearMap.inr R R R) 1 =
    ((AlgHom.toLinearMap (AlgHom.id R (CliffordAlgebra (Q c₁ c₂))) ∘ₗ ι (Q c₁ c₂)) ∘ₗ LinearMap.inr R R R) 1

Next tactic:
dsimp
@[simp]
theorem ofQuaternion_comp_toQuaternion :
    ofQuaternion.comp toQuaternion = AlgHom.id R (CliffordAlgebra (Q c₁ c₂)) := by
  ext : 1
  dsimp -- before we end up with two goals and have to do this twice
  ext
  all_goals
    dsimp
    

Proof state:
case a.hr.h
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ ofQuaternion (toQuaternion ((ι (Q c₁ c₂)) (0, 1))) = (ι (Q c₁ c₂)) (0, 1)

Next tactic:
rw [toQuaternion_ι]
@[simp]
theorem ofQuaternion_comp_toQuaternion :
    ofQuaternion.comp toQuaternion = AlgHom.id R (CliffordAlgebra (Q c₁ c₂)) := by
  ext : 1
  dsimp -- before we end up with two goals and have to do this twice
  ext
  all_goals
    dsimp
    rw [toQuaternion_ι]
    

Proof state:
case a.hr.h
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ ofQuaternion { re := 0, imI := (0, 1).1, imJ := (0, 1).2, imK := 0 } = (ι (Q c₁ c₂)) (0, 1)

Next tactic:
dsimp
@[simp]
theorem ofQuaternion_comp_toQuaternion :
    ofQuaternion.comp toQuaternion = AlgHom.id R (CliffordAlgebra (Q c₁ c₂)) := by
  ext : 1
  dsimp -- before we end up with two goals and have to do this twice
  ext
  all_goals
    dsimp
    rw [toQuaternion_ι]
    dsimp
    

Proof state:
case a.hr.h
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (algebraMap R (CliffordAlgebra (Q c₁ c₂))) 0 + 0 • (ι (Q c₁ c₂)) (1, 0) + 1 • (ι (Q c₁ c₂)) (0, 1) +
      0 • ((ι (Q c₁ c₂)) (1, 0) * (ι (Q c₁ c₂)) (0, 1)) =
    (ι (Q c₁ c₂)) (0, 1)

Next tactic:
simp only [toQuaternion_ι, zero_smul, one_smul, zero_add, add_zero, RingHom.map_zero]
@[simp]
theorem toQuaternion_comp_ofQuaternion :
    toQuaternion.comp ofQuaternion = AlgHom.id R ℍ[R,c₁,c₂] := by
  

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ AlgHom.comp toQuaternion ofQuaternion = AlgHom.id R ℍ[R,c₁,c₂]

Next tactic:
apply QuaternionAlgebra.lift.symm.injective
@[simp]
theorem toQuaternion_comp_ofQuaternion :
    toQuaternion.comp ofQuaternion = AlgHom.id R ℍ[R,c₁,c₂] := by
  apply QuaternionAlgebra.lift.symm.injective
  

Proof state:
case a
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ QuaternionAlgebra.lift.symm (AlgHom.comp toQuaternion ofQuaternion) =
    QuaternionAlgebra.lift.symm (AlgHom.id R ℍ[R,c₁,c₂])

Next tactic:
ext1
@[simp]
theorem toQuaternion_comp_ofQuaternion :
    toQuaternion.comp ofQuaternion = AlgHom.id R ℍ[R,c₁,c₂] := by
  apply QuaternionAlgebra.lift.symm.injective
  ext1 <;> 

Proof state:
case a.hi
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (QuaternionAlgebra.lift.symm (AlgHom.comp toQuaternion ofQuaternion)).i =
    (QuaternionAlgebra.lift.symm (AlgHom.id R ℍ[R,c₁,c₂])).i

Next tactic:
dsimp [QuaternionAlgebra.Basis.lift]
@[simp]
theorem toQuaternion_comp_ofQuaternion :
    toQuaternion.comp ofQuaternion = AlgHom.id R ℍ[R,c₁,c₂] := by
  apply QuaternionAlgebra.lift.symm.injective
  ext1 <;> 

Proof state:
case a.hj
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ (QuaternionAlgebra.lift.symm (AlgHom.comp toQuaternion ofQuaternion)).j =
    (QuaternionAlgebra.lift.symm (AlgHom.id R ℍ[R,c₁,c₂])).j

Next tactic:
dsimp [QuaternionAlgebra.Basis.lift]
@[simp]
theorem toQuaternion_comp_ofQuaternion :
    toQuaternion.comp ofQuaternion = AlgHom.id R ℍ[R,c₁,c₂] := by
  apply QuaternionAlgebra.lift.symm.injective
  ext1 <;> dsimp [QuaternionAlgebra.Basis.lift] <;> 

Proof state:
case a.hi
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ toQuaternion
      ((algebraMap R (CliffordAlgebra (Q c₁ c₂))) 0 + 1 • (ι (Q c₁ c₂)) (1, 0) + 0 • (ι (Q c₁ c₂)) (0, 1) +
        0 • ((ι (Q c₁ c₂)) (1, 0) * (ι (Q c₁ c₂)) (0, 1))) =
    { re := 0, imI := 1, imJ := 0, imK := 0 }

Next tactic:
simp
@[simp]
theorem toQuaternion_comp_ofQuaternion :
    toQuaternion.comp ofQuaternion = AlgHom.id R ℍ[R,c₁,c₂] := by
  apply QuaternionAlgebra.lift.symm.injective
  ext1 <;> dsimp [QuaternionAlgebra.Basis.lift] <;> 

Proof state:
case a.hj
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
⊢ toQuaternion
      ((algebraMap R (CliffordAlgebra (Q c₁ c₂))) 0 + 0 • (ι (Q c₁ c₂)) (1, 0) + 1 • (ι (Q c₁ c₂)) (0, 1) +
        0 • ((ι (Q c₁ c₂)) (1, 0) * (ι (Q c₁ c₂)) (0, 1))) =
    { re := 0, imI := 0, imJ := 1, imK := 0 }

Next tactic:
simp
/-- The quaternion conjugate maps to the "clifford conjugate" (aka `star`). -/
@[simp]
theorem ofQuaternion_star (q : ℍ[R,c₁,c₂]) : ofQuaternion (star q) = star (ofQuaternion q) :=
  CliffordAlgebraQuaternion.equiv.injective <| by
    

Proof state:
R : Type u_1
inst✝ : CommRing R
c₁ c₂ : R
q : ℍ[R,c₁,c₂]
⊢ CliffordAlgebraQuaternion.equiv (ofQuaternion (star q)) = CliffordAlgebraQuaternion.equiv (star (ofQuaternion q))

Next tactic:
rw [equiv_apply, equiv_apply, toQuaternion_star, toQuaternion_ofQuaternion,
      toQuaternion_ofQuaternion]
theorem ι_mul_ι (r₁ r₂) : ι (0 : QuadraticForm R R) r₁ * ι (0 : QuadraticForm R R) r₂ = 0 := by
  

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r₁ r₂ : R
⊢ (ι 0) r₁ * (ι 0) r₂ = 0

Next tactic:
rw [← mul_one r₁, ← mul_one r₂, ← smul_eq_mul R, ← smul_eq_mul R, LinearMap.map_smul,
    LinearMap.map_smul, smul_mul_smul, ι_sq_scalar, QuadraticForm.zero_apply, RingHom.map_zero,
    smul_zero]
/-- The clifford algebra over a 1-dimensional vector space with 0 quadratic form is isomorphic to
the dual numbers. -/
protected def equiv : CliffordAlgebra (0 : QuadraticForm R R) ≃ₐ[R] R[ε] :=
  AlgEquiv.ofAlgHom
    (CliffordAlgebra.lift (0 : QuadraticForm R R) ⟨inrHom R _, fun m => inr_mul_inr _ m m⟩)
    (DualNumber.lift ⟨
      (Algebra.ofId _ _, ι (R := R) _ 1),
      ι_mul_ι (1 : R) 1,
      fun _ => (Algebra.commutes _ _).symm⟩)
    (by
      

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
⊢ AlgHom.comp ((CliffordAlgebra.lift 0) { val := inrHom R R, property := (_ : ∀ (m : R), inr m * inr m = 0) })
      (DualNumber.lift
        { val := (Algebra.ofId R (CliffordAlgebra 0), (ι 0) 1),
          property :=
            (_ :
              (Algebra.ofId R (CliffordAlgebra 0), (ι 0) 1).2 * (Algebra.ofId R (CliffordAlgebra 0), (ι 0) 1).2 = 0 ∧
                ∀ (a : R),
                  Commute (Algebra.ofId R (CliffordAlgebra 0), (ι 0) 1).2
                    ((Algebra.ofId R (CliffordAlgebra 0), (ι 0) 1).1 a)) }) =
    AlgHom.id R R[ε]

Next tactic:
ext : 1
/-- The clifford algebra over a 1-dimensional vector space with 0 quadratic form is isomorphic to
the dual numbers. -/
protected def equiv : CliffordAlgebra (0 : QuadraticForm R R) ≃ₐ[R] R[ε] :=
  AlgEquiv.ofAlgHom
    (CliffordAlgebra.lift (0 : QuadraticForm R R) ⟨inrHom R _, fun m => inr_mul_inr _ m m⟩)
    (DualNumber.lift ⟨
      (Algebra.ofId _ _, ι (R := R) _ 1),
      ι_mul_ι (1 : R) 1,
      fun _ => (Algebra.commutes _ _).symm⟩)
    (by
      ext : 1
      -- This used to be a single `simp` before leanprover/lean4#2644
      

Proof state:
case hε
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
⊢ (AlgHom.comp ((CliffordAlgebra.lift 0) { val := inrHom R R, property := (_ : ∀ (m : R), inr m * inr m = 0) })
        (DualNumber.lift
          { val := (Algebra.ofId R (CliffordAlgebra 0), (ι 0) 1),
            property :=
              (_ :
                (Algebra.ofId R (CliffordAlgebra 0), (ι 0) 1).2 * (Algebra.ofId R (CliffordAlgebra 0), (ι 0) 1).2 = 0 ∧
                  ∀ (a : R),
                    Commute (Algebra.ofId R (CliffordAlgebra 0), (ι 0) 1).2
                      ((Algebra.ofId R (CliffordAlgebra 0), (ι 0) 1).1 a)) }))
      ε =
    (AlgHom.id R R[ε]) ε

Next tactic:
simp
/-- The clifford algebra over a 1-dimensional vector space with 0 quadratic form is isomorphic to
the dual numbers. -/
protected def equiv : CliffordAlgebra (0 : QuadraticForm R R) ≃ₐ[R] R[ε] :=
  AlgEquiv.ofAlgHom
    (CliffordAlgebra.lift (0 : QuadraticForm R R) ⟨inrHom R _, fun m => inr_mul_inr _ m m⟩)
    (DualNumber.lift ⟨
      (Algebra.ofId _ _, ι (R := R) _ 1),
      ι_mul_ι (1 : R) 1,
      fun _ => (Algebra.commutes _ _).symm⟩)
    (by
      ext : 1
      -- This used to be a single `simp` before leanprover/lean4#2644
      simp; 

Proof state:
case hε
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
⊢ ((CliffordAlgebra.lift 0) { val := inrHom R R, property := (_ : ∀ (m : R), inr m * inr m = 0) }) ((ι 0) 1) = ε

Next tactic:
erw [lift_ι_apply]
/-- The clifford algebra over a 1-dimensional vector space with 0 quadratic form is isomorphic to
the dual numbers. -/
protected def equiv : CliffordAlgebra (0 : QuadraticForm R R) ≃ₐ[R] R[ε] :=
  AlgEquiv.ofAlgHom
    (CliffordAlgebra.lift (0 : QuadraticForm R R) ⟨inrHom R _, fun m => inr_mul_inr _ m m⟩)
    (DualNumber.lift ⟨
      (Algebra.ofId _ _, ι (R := R) _ 1),
      ι_mul_ι (1 : R) 1,
      fun _ => (Algebra.commutes _ _).symm⟩)
    (by
      ext : 1
      -- This used to be a single `simp` before leanprover/lean4#2644
      simp; erw [lift_ι_apply]; 

Proof state:
case hε
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
⊢ (inrHom R R) 1 = ε

Next tactic:
simp