awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.LinearAlgebra.CliffordAlgebra.BaseChange (goal)
Goal:
R : Type u_1
A : Type u_2
V : Type u_3
inst : CommRing R
inst_1 : CommRing A
inst_2 : AddCommGroup V
inst_3 : Algebra R A
inst_4 : Module R V
inst_5 : Invertible (α := R) 2
Q : QuadraticForm R V
v : V
rw :
  Eq (α := CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
          (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
        (HSMul.hSMul.{u_1, u_2, u_2} (α := R) ((Q : (a : V) → R) v : R) (HMul.hMul (α := A) 1 1)) :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((algebraMap R (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
          (a : R) → CliffordAlgebra (QuadraticForm.baseChange A Q))
        ((Q : (a : V) → R) v) :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
rw₁ :
  Eq (α := CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
          (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
        (HSMul.hSMul.{u_1, u_2, u_2} (α := R) (β := A) ((Q : (a : V) → R) v : R) 1) :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((algebraMap R (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
          (a : R) → CliffordAlgebra (QuadraticForm.baseChange A Q))
        ((Q : (a : V) → R) v) :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
⊢ Eq (α := CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
          (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
        ((QuadraticForm.baseChange A Q : (a : A ⊗[R] V) → A) (1 ⊗ₜ[R] v)) :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((algebraMap R (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
          (a : R) → CliffordAlgebra (QuadraticForm.baseChange A Q))
        ((Q : (a : V) → R) v) :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
have rw₂ : Eq (α := CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
  ((algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
        (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
      ((algebraMap R A : (a : R) → A) ((Q : (a : V) → R) v : R)) :
    CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
  ((algebraMap R (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
        (a : R) → CliffordAlgebra (QuadraticForm.baseChange A Q))
      ((Q : (a : V) → R) v) :
    CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
Tactic: rw [QuadraticForm.baseChange_tmul, one_mul, ← Algebra.algebraMap_eq_smul_one,
      ← IsScalarTower.algebraMap_apply]
-- Lean 4 proof step from Mathlib.LinearAlgebra.CliffordAlgebra.BaseChange (goal)
Goal:
R : Type u_1
A : Type u_2
V : Type u_3
inst : CommRing R
inst_1 : CommRing A
inst_2 : AddCommGroup V
inst_3 : Algebra R A
inst_4 : Module R V
inst_5 : Invertible (α := R) 2
Q : QuadraticForm R V
z : A
v : V
⊢ Eq (α := CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((ofBaseChange A Q : (a : A ⊗[R] CliffordAlgebra Q) → CliffordAlgebra (QuadraticForm.baseChange A Q))
        (z ⊗ₜ[R] (ι Q : (a : V) → CliffordAlgebra Q) v) :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((ι (QuadraticForm.baseChange A Q) : (a : A ⊗[R] V) → CliffordAlgebra (QuadraticForm.baseChange A Q)) (z ⊗ₜ[R] v) :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
have change : HMul.hMul (α := CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) (β :=
    CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
          (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
        z :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((ofBaseChangeAux A Q : (a : CliffordAlgebra Q) → CliffordAlgebra (QuadraticForm.baseChange A Q))
        ((ι Q : (a : V) → CliffordAlgebra Q) v) :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) =
  (ι (QuadraticForm.baseChange A Q) : (a : A ⊗[R] V) → CliffordAlgebra (QuadraticForm.baseChange A Q)) (z ⊗ₜ[R] v)
Tactic: change algebraMap _ _ z * ofBaseChangeAux A Q (ι Q v) = ι (Q.baseChange A) (z ⊗ₜ[R] v)
-- Lean 4 proof step from Mathlib.LinearAlgebra.CliffordAlgebra.BaseChange (goal)
Goal:
R : Type u_1
A : Type u_2
V : Type u_3
inst : CommRing R
inst_1 : CommRing A
inst_2 : AddCommGroup V
inst_3 : Algebra R A
inst_4 : Module R V
inst_5 : Invertible (α := R) 2
Q : QuadraticForm R V
z : A
⊢ Eq (α := CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((ofBaseChange A Q : (a : A ⊗[R] CliffordAlgebra Q) → CliffordAlgebra (QuadraticForm.baseChange A Q)) (z ⊗ₜ[R] 1) :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
          (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
        z :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
have change : HMul.hMul (α := CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) (β :=
    CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
          (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
        z :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((ofBaseChangeAux A Q : (a : CliffordAlgebra Q) → CliffordAlgebra (QuadraticForm.baseChange A Q)) 1 :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) =
  (algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
      (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
    z
Tactic: change algebraMap _ _ z * ofBaseChangeAux A Q 1 = _
-- Lean 4 proof step from Mathlib.LinearAlgebra.CliffordAlgebra.BaseChange (goal)
Goal:
R : Type u_1
A : Type u_2
V : Type u_3
inst : CommRing R
inst_1 : CommRing A
inst_2 : AddCommGroup V
inst_3 : Algebra R A
inst_4 : Module R V
inst_5 : Invertible (α := R) 2
Q : QuadraticForm R V
z : A
⊢ HMul.hMul (α := CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) (β :=
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
      ((algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
            (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
          z :
        CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
      ((ofBaseChangeAux A Q : (a : CliffordAlgebra Q) → CliffordAlgebra (QuadraticForm.baseChange A Q)) 1 :
        CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) =
    (algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
        (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
      z
have rw : HMul.hMul (α := CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) (β :=
    CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    ((algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
          (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
        z :
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
    (1 : CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) =
  (algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
      (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
    z
Tactic: rw [map_one, mul_one]
-- Lean 4 proof step from Mathlib.LinearAlgebra.CliffordAlgebra.BaseChange (goal)
Goal:
R : Type u_1
A : Type u_2
V : Type u_3
inst : CommRing R
inst_1 : CommRing A
inst_2 : AddCommGroup V
inst_3 : Algebra R A
inst_4 : Module R V
inst_5 : Invertible (α := R) 2
Q : QuadraticForm R V
z : A
rw :
  HMul.hMul (α := CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) (β :=
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
      ((algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
            (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
          z :
        CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
      (1 : CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) =
    (algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
        (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
      z
⊢ HMul.hMul (α := CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) (β :=
      CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
      ((algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
            (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
          z :
        CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
      ((ofBaseChangeAux A Q : (a : CliffordAlgebra Q) → CliffordAlgebra (QuadraticForm.baseChange A Q)) 1 :
        CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) =
    (algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
        (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
      z
have rw₁ : Eq (α := CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
  ((algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
        (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
      z :
    CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
  ((algebraMap A (CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q)) :
        (a : A) → CliffordAlgebra (QuadraticForm.baseChange A Q))
      z :
    CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q))
Tactic: rw [map_one, mul_one]
-- Lean 4 proof step from Mathlib.LinearAlgebra.CliffordAlgebra.BaseChange (goal)
Goal:
R : Type u_1
A : Type u_2
V : Type u_3
inst : CommRing R
inst_1 : CommRing A
inst_2 : AddCommGroup V
inst_3 : Algebra R A
inst_4 : Module R V
inst_5 : Invertible (α := R) 2
Q : QuadraticForm R V
⊢ { f : A ⊗[R] V →ₗ[A] A ⊗[R] CliffordAlgebra Q //
    ∀ (m : A ⊗[R] V),
      HMul.hMul (α := A ⊗[R] CliffordAlgebra Q) (β := A ⊗[R] CliffordAlgebra Q)
          ((f : (a : A ⊗[R] V) → A ⊗[R] CliffordAlgebra Q) m : A ⊗[R] CliffordAlgebra Q)
          ((f : (a : A ⊗[R] V) → A ⊗[R] CliffordAlgebra Q) m : A ⊗[R] CliffordAlgebra Q) =
        (algebraMap A (A ⊗[R] CliffordAlgebra Q) : (a : A) → A ⊗[R] CliffordAlgebra Q)
          ((QuadraticForm.baseChange A Q : (a : A ⊗[R] V) → A) m) }
have refine : ∀ (m : A ⊗[R] V),
  HMul.hMul (α := A ⊗[R] CliffordAlgebra Q) (β := A ⊗[R] CliffordAlgebra Q)
      (((TensorProduct.AlgebraTensorModule.map LinearMap.id (ι Q) : A ⊗[R] V →ₗ[A] A ⊗[R] CliffordAlgebra Q) :
            (a : A ⊗[R] V) → A ⊗[R] CliffordAlgebra Q)
          m :
        A ⊗[R] CliffordAlgebra Q)
      (((TensorProduct.AlgebraTensorModule.map LinearMap.id (ι Q) : A ⊗[R] V →ₗ[A] A ⊗[R] CliffordAlgebra Q) :
            (a : A ⊗[R] V) → A ⊗[R] CliffordAlgebra Q)
          m :
        A ⊗[R] CliffordAlgebra Q) =
    (algebraMap A (A ⊗[R] CliffordAlgebra Q) : (a : A) → A ⊗[R] CliffordAlgebra Q)
      ((QuadraticForm.baseChange A Q : (a : A ⊗[R] V) → A) m)
Tactic: refine ⟨TensorProduct.AlgebraTensorModule.map (LinearMap.id : A →ₗ[A] A) (ι Q), ?_⟩
-- Lean 4 proof step from Mathlib.LinearAlgebra.CliffordAlgebra.BaseChange (goal)
Goal:
R : Type u_1
A : Type u_2
V : Type u_3
inst : CommRing R
inst_1 : CommRing A
inst_2 : AddCommGroup V
inst_3 : Algebra R A
inst_4 : Module R V
inst_5 : Invertible (α := R) 2
Q : QuadraticForm R V
this_1 : Invertible (α := A) 2 :=
  Invertible.copy (r := (algebraMap R A : (a : R) → A) 2) (Invertible.map (algebraMap R A) 2) 2 ⋯
this : Invertible (α := A ⊗[R] CliffordAlgebra Q) 2 :=
  Invertible.copy (r := (algebraMap R (A ⊗[R] CliffordAlgebra Q) : (a : R) → A ⊗[R] CliffordAlgebra Q) 2)
    (Invertible.map (algebraMap R (A ⊗[R] CliffordAlgebra Q)) 2 :
      Invertible (α := A ⊗[R] CliffordAlgebra Q)
        ((algebraMap R (A ⊗[R] CliffordAlgebra Q) : (a : R) → A ⊗[R] CliffordAlgebra Q) 2))
    2 ⋯
hpure_tensor :
  ∀ (v w : V),
    HAdd.hAdd (α := A ⊗[R] CliffordAlgebra Q)
        (HMul.hMul (α := A) 1 1 ⊗ₜ[R]
          HMul.hMul (α := CliffordAlgebra Q) (β := CliffordAlgebra Q)
            ((ι Q : (a : V) → CliffordAlgebra Q) v : CliffordAlgebra Q)
            ((ι Q : (a : V) → CliffordAlgebra Q) w : CliffordAlgebra Q))
        (HMul.hMul (α := A) 1 1 ⊗ₜ[R]
          HMul.hMul (α := CliffordAlgebra Q) (β := CliffordAlgebra Q)
            ((ι Q : (a : V) → CliffordAlgebra Q) w : CliffordAlgebra Q)
            ((ι Q : (a : V) → CliffordAlgebra Q) v : CliffordAlgebra Q)) =
      ((((QuadraticMap.polarBilin (R := A) (M := A ⊗[R] V) (N := A) (QuadraticForm.baseChange A Q) :
                    LinearMap.BilinMap A (A ⊗[R] V) A) :
                  (a : A ⊗[R] V) → A ⊗[R] V →ₗ[A] A)
                (1 ⊗ₜ[R] v) :
              A ⊗[R] V →ₗ[A] A) :
            (a : A ⊗[R] V) → A)
          (1 ⊗ₜ[R] w) ⊗ₜ[R]
        1
⊢ ∀ (m : A ⊗[R] V),
    HMul.hMul (α := A ⊗[R] CliffordAlgebra Q) (β := A ⊗[R] CliffordAlgebra Q)
        (((TensorProduct.AlgebraTensorModule.map LinearMap.id (ι Q) : A ⊗[R] V →ₗ[A] A ⊗[R] CliffordAlgebra Q) :
              (a : A ⊗[R] V) → A ⊗[R] CliffordAlgebra Q)
            m :
          A ⊗[R] CliffordAlgebra Q)
        (((TensorProduct.AlgebraTensorModule.map LinearMap.id (ι Q) : A ⊗[R] V →ₗ[A] A ⊗[R] CliffordAlgebra Q) :
              (a : A ⊗[R] V) → A ⊗[R] CliffordAlgebra Q)
            m :
          A ⊗[R] CliffordAlgebra Q) =
      (algebraMap A (A ⊗[R] CliffordAlgebra Q) : (a : A) → A ⊗[R] CliffordAlgebra Q)
        ((QuadraticForm.baseChange A Q : (a : A ⊗[R] V) → A) m)
have rw : HAdd.hAdd (α := A ⊗[R] V →ₗ[A] A ⊗[R] V →ₗ[A] A ⊗[R] CliffordAlgebra Q)
    (LinearMap.compl₂ (LinearMap.mul A (A ⊗[R] CliffordAlgebra Q))
        (TensorProduct.AlgebraTensorModule.map LinearMap.id (ι Q)) ∘ₗ
      TensorProduct.AlgebraTensorModule.map LinearMap.id (ι Q))
    (LinearMap.compl₂ (LinearMap.flip (LinearMap.mul A (A ⊗[R] CliffordAlgebra Q)))
        (TensorProduct.AlgebraTensorModule.map LinearMap.id (ι Q)) ∘ₗ
      TensorProduct.AlgebraTensorModule.map LinearMap.id (ι Q)) =
  LinearMap.compr₂ (QuadraticMap.polarBilin (R := A) (M := A ⊗[R] V) (N := A) (QuadraticForm.baseChange A Q))
    (Algebra.linearMap A (A ⊗[R] CliffordAlgebra Q))
Tactic: rw [CliffordAlgebra.forall_mul_self_eq_iff (isUnit_of_invertible _)]
-- Lean 4 proof step from Mathlib.LinearAlgebra.CliffordAlgebra.BaseChange (goal)
Goal:
R : Type u_1
A : Type u_2
V : Type u_3
inst : CommRing R
inst_1 : CommRing A
inst_2 : AddCommGroup V
inst_3 : Algebra R A
inst_4 : Module R V
inst_5 : Invertible (α := R) 2
Q : QuadraticForm R V
this_1 : Invertible (α := A) 2 :=
  Invertible.copy (r := (algebraMap R A : (a : R) → A) 2) (Invertible.map (algebraMap R A) 2) 2 ⋯
this : Invertible (α := A ⊗[R] CliffordAlgebra Q) 2 :=
  Invertible.copy (r := (algebraMap R (A ⊗[R] CliffordAlgebra Q) : (a : R) → A ⊗[R] CliffordAlgebra Q) 2)
    (Invertible.map (algebraMap R (A ⊗[R] CliffordAlgebra Q)) 2 :
      Invertible (α := A ⊗[R] CliffordAlgebra Q)
        ((algebraMap R (A ⊗[R] CliffordAlgebra Q) : (a : R) → A ⊗[R] CliffordAlgebra Q) 2))
    2 ⋯
⊢ ∀ (m : A ⊗[R] V),
    HMul.hMul (α := A ⊗[R] CliffordAlgebra Q) (β := A ⊗[R] CliffordAlgebra Q)
        (((TensorProduct.AlgebraTensorModule.map LinearMap.id (ι Q) : A ⊗[R] V →ₗ[A] A ⊗[R] CliffordAlgebra Q) :
              (a : A ⊗[R] V) → A ⊗[R] CliffordAlgebra Q)
            m :
          A ⊗[R] CliffordAlgebra Q)
        (((TensorProduct.AlgebraTensorModule.map LinearMap.id (ι Q) : A ⊗[R] V →ₗ[A] A ⊗[R] CliffordAlgebra Q) :
              (a : A ⊗[R] V) → A ⊗[R] CliffordAlgebra Q)
            m :
          A ⊗[R] CliffordAlgebra Q) =
      (algebraMap A (A ⊗[R] CliffordAlgebra Q) : (a : A) → A ⊗[R] CliffordAlgebra Q)
        ((QuadraticForm.baseChange A Q : (a : A ⊗[R] V) → A) m)
have suffices : ∀ (v w : V),
  HAdd.hAdd (α := A ⊗[R] CliffordAlgebra Q)
      (HMul.hMul (α := A) 1 1 ⊗ₜ[R]
        HMul.hMul (α := CliffordAlgebra Q) (β := CliffordAlgebra Q)
          ((ι Q : (a : V) → CliffordAlgebra Q) v : CliffordAlgebra Q)
          ((ι Q : (a : V) → CliffordAlgebra Q) w : CliffordAlgebra Q))
      (HMul.hMul (α := A) 1 1 ⊗ₜ[R]
        HMul.hMul (α := CliffordAlgebra Q) (β := CliffordAlgebra Q)
          ((ι Q : (a : V) → CliffordAlgebra Q) w : CliffordAlgebra Q)
          ((ι Q : (a : V) → CliffordAlgebra Q) v : CliffordAlgebra Q)) =
    ((((QuadraticMap.polarBilin (R := A) (M := A ⊗[R] V) (N := A) (QuadraticForm.baseChange A Q) :
                  LinearMap.BilinMap A (A ⊗[R] V) A) :
                (a : A ⊗[R] V) → A ⊗[R] V →ₗ[A] A)
              (1 ⊗ₜ[R] v) :
            A ⊗[R] V →ₗ[A] A) :
          (a : A ⊗[R] V) → A)
        (1 ⊗ₜ[R] w) ⊗ₜ[R]
      1
Tactic: suffices hpure_tensor : ∀ v w, (1 * 1) ⊗ₜ[R] (ι Q v * ι Q w) + (1 * 1) ⊗ₜ[R] (ι Q w * ι Q v) =
        QuadraticMap.polarBilin (Q.baseChange A) (1 ⊗ₜ[R] v) (1 ⊗ₜ[R] w) ⊗ₜ[R] 1 by
      -- the crux is that by converting to a statement about linear maps instead of quadratic forms,
      -- we then have access to all the partially-applied `ext` lemmas.
      rw [CliffordAlgebra.forall_mul_self_eq_iff (isUnit_of_invertible _)]
      refine TensorProduct.AlgebraTensorModule.curry_injective ?_
      ext v w
      dsimp
      exact hpure_tensor v w
-- Lean 4 proof step from Mathlib.LinearAlgebra.CliffordAlgebra.BaseChange (goal)
Goal:
R : Type u_1
A : Type u_2
V : Type u_3
inst : CommRing R
inst_1 : CommRing A
inst_2 : AddCommGroup V
inst_3 : Algebra R A
inst_4 : Module R V
inst_5 : Invertible (α := R) 2
Q : QuadraticForm R V
this_1 : Invertible (α := A) 2 :=
  Invertible.copy (r := (algebraMap R A : (a : R) → A) 2) (Invertible.map (algebraMap R A) 2) 2 ⋯
this : Invertible (α := A ⊗[R] CliffordAlgebra Q) 2 :=
  Invertible.copy (r := (algebraMap R (A ⊗[R] CliffordAlgebra Q) : (a : R) → A ⊗[R] CliffordAlgebra Q) 2)
    (Invertible.map (algebraMap R (A ⊗[R] CliffordAlgebra Q)) 2 :
      Invertible (α := A ⊗[R] CliffordAlgebra Q)
        ((algebraMap R (A ⊗[R] CliffordAlgebra Q) : (a : R) → A ⊗[R] CliffordAlgebra Q) 2))
    2 ⋯
v w : V
⊢ HAdd.hAdd (α := A ⊗[R] CliffordAlgebra Q)
      (HMul.hMul (α := A) 1 1 ⊗ₜ[R]
        HMul.hMul (α := CliffordAlgebra Q) (β := CliffordAlgebra Q)
          ((ι Q : (a : V) → CliffordAlgebra Q) v : CliffordAlgebra Q)
          ((ι Q : (a : V) → CliffordAlgebra Q) w : CliffordAlgebra Q))
      (HMul.hMul (α := A) 1 1 ⊗ₜ[R]
        HMul.hMul (α := CliffordAlgebra Q) (β := CliffordAlgebra Q)
          ((ι Q : (a : V) → CliffordAlgebra Q) w : CliffordAlgebra Q)
          ((ι Q : (a : V) → CliffordAlgebra Q) v : CliffordAlgebra Q)) =
    ((((QuadraticMap.polarBilin (R := A) (M := A ⊗[R] V) (N := A) (QuadraticForm.baseChange A Q) :
                  LinearMap.BilinMap A (A ⊗[R] V) A) :
                (a : A ⊗[R] V) → A ⊗[R] V →ₗ[A] A)
              (1 ⊗ₜ[R] v) :
            A ⊗[R] V →ₗ[A] A) :
          (a : A ⊗[R] V) → A)
        (1 ⊗ₜ[R] w) ⊗ₜ[R]
      1
have rw : Eq (α := A ⊗[R] CliffordAlgebra Q)
  (HMul.hMul (α := A) 1 1 ⊗ₜ[R]
    (HMul.hMul (α := CliffordAlgebra Q) (β := CliffordAlgebra Q)
        ((ι Q : (a : V) → CliffordAlgebra Q) v : CliffordAlgebra Q)
        ((ι Q : (a : V) → CliffordAlgebra Q) w : CliffordAlgebra Q) +
      HMul.hMul (α := CliffordAlgebra Q) (β := CliffordAlgebra Q)
        ((ι Q : (a : V) → CliffordAlgebra Q) w : CliffordAlgebra Q)
        ((ι Q : (a : V) → CliffordAlgebra Q) v : CliffordAlgebra Q)))
  (((((QuadraticMap.polarBilin (R := A) (M := A ⊗[R] V) (N := A) (QuadraticForm.baseChange A Q) :
                LinearMap.BilinMap A (A ⊗[R] V) A) :
              (a : A ⊗[R] V) → A ⊗[R] V →ₗ[A] A)
            (1 ⊗ₜ[R] v) :
          A ⊗[R] V →ₗ[A] A) :
        (a : A ⊗[R] V) → A)
      (1 ⊗ₜ[R] w) ⊗ₜ[R]
    1)
Tactic: rw [← TensorProduct.tmul_add, CliffordAlgebra.ι_mul_ι_add_swap,
      QuadraticForm.polarBilin_baseChange, LinearMap.BilinForm.baseChange_tmul, one_mul,
      TensorProduct.smul_tmul, Algebra.algebraMap_eq_smul_one, QuadraticMap.polarBilin_apply_apply]
-- Lean 4 proof step from Mathlib.LinearAlgebra.CliffordAlgebra.BaseChange (goal)
Goal:
R : Type u_1
A : Type u_2
V : Type u_3
inst : CommRing R
inst_1 : CommRing A
inst_2 : AddCommGroup V
inst_3 : Algebra R A
inst_4 : Module R V
inst_5 : Invertible (α := R) 2
Q : QuadraticForm R V
⊢ Eq (α := CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q) →ₐ[A] A ⊗[R] CliffordAlgebra Q)
    (AlgHom.comp (toBaseChange A Q) involute)
    (AlgHom.comp
      (Algebra.TensorProduct.map (AlgHom.id A A) involute : A ⊗[R] CliffordAlgebra Q →ₐ[A] A ⊗[R] CliffordAlgebra Q)
      (toBaseChange A Q :
        CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q) →ₐ[A] A ⊗[R] CliffordAlgebra Q))
have a : ∀ (v : V),
  Eq (α := A ⊗[R] CliffordAlgebra Q)
    ((((TensorProduct.AlgebraTensorModule.curry
                  (AlgHom.toLinearMap (AlgHom.comp (toBaseChange A Q) involute) ∘ₗ ι (QuadraticForm.baseChange A Q)) :
                A →ₗ[A] V →ₗ[R] A ⊗[R] CliffordAlgebra Q) :
              (a : A) → V →ₗ[R] A ⊗[R] CliffordAlgebra Q)
            1 :
          (a : V) → A ⊗[R] CliffordAlgebra Q)
        v :
      A ⊗[R] CliffordAlgebra Q)
    ((((TensorProduct.AlgebraTensorModule.curry
                  (AlgHom.toLinearMap
                      (AlgHom.comp
                        (Algebra.TensorProduct.map (AlgHom.id A A) involute :
                          A ⊗[R] CliffordAlgebra Q →ₐ[A] A ⊗[R] CliffordAlgebra Q)
                        (toBaseChange A Q :
                          CliffordAlgebra (R := A) (M := A ⊗[R] V) (QuadraticForm.baseChange A Q) →ₐ[A]
                            A ⊗[R] CliffordAlgebra Q)) ∘ₗ
                    ι (QuadraticForm.baseChange A Q)) :
                A →ₗ[A] V →ₗ[R] A ⊗[R] CliffordAlgebra Q) :
              (a : A) → V →ₗ[R] A ⊗[R] CliffordAlgebra Q)
            1 :
          (a : V) → A ⊗[R] CliffordAlgebra Q)
        v :
      A ⊗[R] CliffordAlgebra Q)
Tactic: ext v