l3lab/ntp-mathlib huggingface dataset:
private theorem fFold_fFold (m : M) (x : A × S f) : fFold f m (fFold f m x) = Q m • x := by
  obtain ⟨a, ⟨g, hg⟩⟩ := x
  ext : 2
  · change f.bilin m m * a = Q m • a
    rw [Algebra.smul_def, f.contract]
  · ext m₁
    change f.bilin _ _ * g m = Q m • g m₁
    apply Submodule.span_induction' _ _ _ _ hg
    · rintro _ ⟨b, m₃, rfl⟩
      change f.bilin _ _ * (f.bilin _ _ * b) = Q m • (f.bilin _ _ * b)
      rw [← smul_mul_assoc, ← mul_assoc, f.contract_mid]
    · change f.bilin m₁ m * 0 = Q m • (0 : A)  -- porting note: `•` now needs the type of `0`
      rw [mul_zero, smul_zero]
    · rintro x hx y hy ihx ihy
      rw [LinearMap.add_apply, LinearMap.add_apply, mul_add, smul_add, ihx, ihy]
    · rintro x hx c ihx
      

Proof state:
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
m : M
a : A
g : M →ₗ[R] A
hg : g ∈ CliffordAlgebra.even.lift.S f
m₁ : M
x : R
hx : M →ₗ[R] A
c :
  hx ∈ Submodule.span R {f' | ∃ x m₂, f' = (LinearMap.lcomp R A ((LinearMap.flip f.bilin) m₂)) (LinearMap.mulRight R x)}
ihx : (f.bilin m₁) m * hx m = Q m • hx m₁
⊢ (f.bilin m₁) m * (x • hx) m = Q m • (x • hx) m₁

Next tactic:
rw [LinearMap.smul_apply, LinearMap.smul_apply, mul_smul_comm, ihx, smul_comm]
/-- The final auxiliary construction for `CliffordAlgebra.even.lift`. This map is the forwards
direction of that equivalence, but not in the fully-bundled form. -/
@[simps! (config := .lemmasOnly) apply]
def aux (f : EvenHom Q A) : CliffordAlgebra.even Q →ₗ[R] A := by
  

Proof state:
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ f : EvenHom Q A
⊢ ↥(even Q) →ₗ[R] A

Next tactic:
refine ?_ ∘ₗ (even Q).val.toLinearMap
/-- The final auxiliary construction for `CliffordAlgebra.even.lift`. This map is the forwards
direction of that equivalence, but not in the fully-bundled form. -/
@[simps! (config := .lemmasOnly) apply]
def aux (f : EvenHom Q A) : CliffordAlgebra.even Q →ₗ[R] A := by
  refine ?_ ∘ₗ (even Q).val.toLinearMap
  -- porting note: added, can't be found otherwise
  

Proof state:
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ f : EvenHom Q A
⊢ CliffordAlgebra Q →ₗ[R] A

Next tactic:
letI : AddCommGroup (S f) := AddSubgroupClass.toAddCommGroup _
/-- The final auxiliary construction for `CliffordAlgebra.even.lift`. This map is the forwards
direction of that equivalence, but not in the fully-bundled form. -/
@[simps! (config := .lemmasOnly) apply]
def aux (f : EvenHom Q A) : CliffordAlgebra.even Q →ₗ[R] A := by
  refine ?_ ∘ₗ (even Q).val.toLinearMap
  -- porting note: added, can't be found otherwise
  letI : AddCommGroup (S f) := AddSubgroupClass.toAddCommGroup _
  

Proof state:
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝ f : EvenHom Q A
this : AddCommGroup ↥(CliffordAlgebra.even.lift.S f) := AddSubgroupClass.toAddCommGroup (CliffordAlgebra.even.lift.S f)
⊢ CliffordAlgebra Q →ₗ[R] A

Next tactic:
exact LinearMap.fst R _ _ ∘ₗ foldr Q (fFold f) (fFold_fFold f) (1, 0)
@[simp]
theorem aux_ι (m₁ m₂ : M) : aux f ((even.ι Q).bilin m₁ m₂) = f.bilin m₁ m₂ :=
  (congr_arg Prod.fst (foldr_mul _ _ _ _ _ _)).trans
    (by
      

Proof state:
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
m₁ m₂ : M
⊢ (((foldr Q (CliffordAlgebra.even.lift.fFold f)
            (_ :
              ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
          (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                (_ :
                  ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                    ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
              (1, 0))
            ((CliffordAlgebra.ι Q) m₂)))
        ((CliffordAlgebra.ι Q) m₁)).1 =
    (f.bilin m₁) m₂

Next tactic:
rw [foldr_ι, foldr_ι]
@[simp]
theorem aux_ι (m₁ m₂ : M) : aux f ((even.ι Q).bilin m₁ m₂) = f.bilin m₁ m₂ :=
  (congr_arg Prod.fst (foldr_mul _ _ _ _ _ _)).trans
    (by
      rw [foldr_ι, foldr_ι]
      

Proof state:
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
m₁ m₂ : M
⊢ (((CliffordAlgebra.even.lift.fFold f) m₁) (((CliffordAlgebra.even.lift.fFold f) m₂) (1, 0))).1 = (f.bilin m₁) m₂

Next tactic:
exact mul_one _
@[simp]
theorem aux_mul (x y : even Q) : aux f (x * y) = aux f x * aux f y := by
  

Proof state:
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
x y : ↥(even Q)
⊢ (aux f) (x * y) = (aux f) x * (aux f) y

Next tactic:
cases' x with x x_property
@[simp]
theorem aux_mul (x y : even Q) : aux f (x * y) = aux f x * aux f y := by
  cases' x with x x_property
  

Proof state:
case mk
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
y : ↥(even Q)
x : CliffordAlgebra Q
x_property : x ∈ even Q
⊢ (aux f) ({ val := x, property := x_property } * y) = (aux f) { val := x, property := x_property } * (aux f) y

Next tactic:
cases y
@[simp]
theorem aux_mul (x y : even Q) : aux f (x * y) = aux f x * aux f y := by
  cases' x with x x_property
  cases y
  

Proof state:
case mk.mk
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
x : CliffordAlgebra Q
x_property : x ∈ even Q
val✝ : CliffordAlgebra Q
property✝ : val✝ ∈ even Q
⊢ (aux f) ({ val := x, property := x_property } * { val := val✝, property := property✝ }) =
    (aux f) { val := x, property := x_property } * (aux f) { val := val✝, property := property✝ }

Next tactic:
refine' (congr_arg Prod.fst (foldr_mul _ _ _ _ _ _)).trans _
@[simp]
theorem aux_mul (x y : even Q) : aux f (x * y) = aux f x * aux f y := by
  cases' x with x x_property
  cases y
  refine' (congr_arg Prod.fst (foldr_mul _ _ _ _ _ _)).trans _
  

Proof state:
case mk.mk
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
x : CliffordAlgebra Q
x_property : x ∈ even Q
val✝ : CliffordAlgebra Q
property✝ : val✝ ∈ even Q
⊢ (((foldr Q (CliffordAlgebra.even.lift.fFold f)
            (_ :
              ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
          (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                (_ :
                  ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                    ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
              (1, 0))
            ↑{ val := val✝, property := property✝ }))
        ↑{ val := x, property := x_property }).1 =
    (aux f) { val := x, property := x_property } * (aux f) { val := val✝, property := property✝ }

Next tactic:
dsimp only
@[simp]
theorem aux_mul (x y : even Q) : aux f (x * y) = aux f x * aux f y := by
  cases' x with x x_property
  cases y
  refine' (congr_arg Prod.fst (foldr_mul _ _ _ _ _ _)).trans _
  dsimp only
  

Proof state:
case mk.mk
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
x : CliffordAlgebra Q
x_property : x ∈ even Q
val✝ : CliffordAlgebra Q
property✝ : val✝ ∈ even Q
⊢ (((foldr Q (CliffordAlgebra.even.lift.fFold f)
            (_ :
              ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
          (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                (_ :
                  ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                    ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
              (1, 0))
            val✝))
        x).1 =
    (aux f) { val := x, property := x_property } * (aux f) { val := val✝, property := property✝ }

Next tactic:
refine' even_induction Q _ _ _ _ x_property
@[simp]
theorem aux_mul (x y : even Q) : aux f (x * y) = aux f x * aux f y := by
  cases' x with x x_property
  cases y
  refine' (congr_arg Prod.fst (foldr_mul _ _ _ _ _ _)).trans _
  dsimp only
  refine' even_induction Q _ _ _ _ x_property
  · 

Proof state:
case mk.mk.refine'_1
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
x : CliffordAlgebra Q
x_property : x ∈ even Q
val✝ : CliffordAlgebra Q
property✝ : val✝ ∈ even Q
⊢ ∀ (r : R),
    (((foldr Q (CliffordAlgebra.even.lift.fFold f)
              (_ :
                ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                  ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
            (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                  (_ :
                    ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                      ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
                (1, 0))
              val✝))
          ((algebraMap R (CliffordAlgebra Q)) r)).1 =
      (aux f)
          { val := (algebraMap R (CliffordAlgebra Q)) r,
            property := (_ : (algebraMap R (CliffordAlgebra Q)) r ∈ evenOdd Q 0) } *
        (aux f) { val := val✝, property := property✝ }

Next tactic:
intro r
@[simp]
theorem aux_mul (x y : even Q) : aux f (x * y) = aux f x * aux f y := by
  cases' x with x x_property
  cases y
  refine' (congr_arg Prod.fst (foldr_mul _ _ _ _ _ _)).trans _
  dsimp only
  refine' even_induction Q _ _ _ _ x_property
  · intro r
    

Proof state:
case mk.mk.refine'_1
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
x : CliffordAlgebra Q
x_property : x ∈ even Q
val✝ : CliffordAlgebra Q
property✝ : val✝ ∈ even Q
r : R
⊢ (((foldr Q (CliffordAlgebra.even.lift.fFold f)
            (_ :
              ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
          (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                (_ :
                  ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                    ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
              (1, 0))
            val✝))
        ((algebraMap R (CliffordAlgebra Q)) r)).1 =
    (aux f)
        { val := (algebraMap R (CliffordAlgebra Q)) r,
          property := (_ : (algebraMap R (CliffordAlgebra Q)) r ∈ evenOdd Q 0) } *
      (aux f) { val := val✝, property := property✝ }

Next tactic:
rw [foldr_algebraMap, aux_algebraMap]
@[simp]
theorem aux_mul (x y : even Q) : aux f (x * y) = aux f x * aux f y := by
  cases' x with x x_property
  cases y
  refine' (congr_arg Prod.fst (foldr_mul _ _ _ _ _ _)).trans _
  dsimp only
  refine' even_induction Q _ _ _ _ x_property
  · intro r
    rw [foldr_algebraMap, aux_algebraMap]
    

Proof state:
case mk.mk.refine'_1
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
x : CliffordAlgebra Q
x_property : x ∈ even Q
val✝ : CliffordAlgebra Q
property✝ : val✝ ∈ even Q
r : R
⊢ (r •
        ((foldr Q (CliffordAlgebra.even.lift.fFold f)
              (_ :
                ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                  ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
            (1, 0))
          val✝).1 =
    (algebraMap R A) r * (aux f) { val := val✝, property := property✝ }

Next tactic:
exact Algebra.smul_def r _
@[simp]
theorem aux_mul (x y : even Q) : aux f (x * y) = aux f x * aux f y := by
  cases' x with x x_property
  cases y
  refine' (congr_arg Prod.fst (foldr_mul _ _ _ _ _ _)).trans _
  dsimp only
  refine' even_induction Q _ _ _ _ x_property
  · intro r
    rw [foldr_algebraMap, aux_algebraMap]
    exact Algebra.smul_def r _
  · 

Proof state:
case mk.mk.refine'_2
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
x : CliffordAlgebra Q
x_property : x ∈ even Q
val✝ : CliffordAlgebra Q
property✝ : val✝ ∈ even Q
⊢ ∀ {x y : CliffordAlgebra Q} {hx : x ∈ evenOdd Q 0} {hy : y ∈ evenOdd Q 0},
    (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                (_ :
                  ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                    ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
              (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                    (_ :
                      ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                        ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
                  (1, 0))
                val✝))
            x).1 =
        (aux f) { val := x, property := hx } * (aux f) { val := val✝, property := property✝ } →
      (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                  (_ :
                    ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                      ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
                (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                      (_ :
                        ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                          ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) =
                            Q m • x))
                    (1, 0))
                  val✝))
              y).1 =
          (aux f) { val := y, property := hy } * (aux f) { val := val✝, property := property✝ } →
        (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                  (_ :
                    ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                      ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
                (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                      (_ :
                        ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                          ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) =
                            Q m • x))
                    (1, 0))
                  val✝))
              (x + y)).1 =
          (aux f) { val := x + y, property := (_ : x + y ∈ evenOdd Q 0) } *
            (aux f) { val := val✝, property := property✝ }

Next tactic:
intro x y hx hy ihx ihy
@[simp]
theorem aux_mul (x y : even Q) : aux f (x * y) = aux f x * aux f y := by
  cases' x with x x_property
  cases y
  refine' (congr_arg Prod.fst (foldr_mul _ _ _ _ _ _)).trans _
  dsimp only
  refine' even_induction Q _ _ _ _ x_property
  · intro r
    rw [foldr_algebraMap, aux_algebraMap]
    exact Algebra.smul_def r _
  · intro x y hx hy ihx ihy
    

Proof state:
case mk.mk.refine'_2
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
x✝ : CliffordAlgebra Q
x_property : x✝ ∈ even Q
val✝ : CliffordAlgebra Q
property✝ : val✝ ∈ even Q
x y : CliffordAlgebra Q
hx : x ∈ evenOdd Q 0
hy : y ∈ evenOdd Q 0
ihx :
  (((foldr Q (CliffordAlgebra.even.lift.fFold f)
            (_ :
              ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
          (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                (_ :
                  ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                    ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
              (1, 0))
            val✝))
        x).1 =
    (aux f) { val := x, property := hx } * (aux f) { val := val✝, property := property✝ }
ihy :
  (((foldr Q (CliffordAlgebra.even.lift.fFold f)
            (_ :
              ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
          (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                (_ :
                  ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                    ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
              (1, 0))
            val✝))
        y).1 =
    (aux f) { val := y, property := hy } * (aux f) { val := val✝, property := property✝ }
⊢ (((foldr Q (CliffordAlgebra.even.lift.fFold f)
            (_ :
              ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
          (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                (_ :
                  ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                    ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
              (1, 0))
            val✝))
        (x + y)).1 =
    (aux f) { val := x + y, property := (_ : x + y ∈ evenOdd Q 0) } * (aux f) { val := val✝, property := property✝ }

Next tactic:
rw [LinearMap.map_add, Prod.fst_add, ihx, ihy, ← add_mul, ← LinearMap.map_add]
@[simp]
theorem aux_mul (x y : even Q) : aux f (x * y) = aux f x * aux f y := by
  cases' x with x x_property
  cases y
  refine' (congr_arg Prod.fst (foldr_mul _ _ _ _ _ _)).trans _
  dsimp only
  refine' even_induction Q _ _ _ _ x_property
  · intro r
    rw [foldr_algebraMap, aux_algebraMap]
    exact Algebra.smul_def r _
  · intro x y hx hy ihx ihy
    rw [LinearMap.map_add, Prod.fst_add, ihx, ihy, ← add_mul, ← LinearMap.map_add]
    

Proof state:
case mk.mk.refine'_2
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
x✝ : CliffordAlgebra Q
x_property : x✝ ∈ even Q
val✝ : CliffordAlgebra Q
property✝ : val✝ ∈ even Q
x y : CliffordAlgebra Q
hx : x ∈ evenOdd Q 0
hy : y ∈ evenOdd Q 0
ihx :
  (((foldr Q (CliffordAlgebra.even.lift.fFold f)
            (_ :
              ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
          (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                (_ :
                  ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                    ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
              (1, 0))
            val✝))
        x).1 =
    (aux f) { val := x, property := hx } * (aux f) { val := val✝, property := property✝ }
ihy :
  (((foldr Q (CliffordAlgebra.even.lift.fFold f)
            (_ :
              ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
          (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                (_ :
                  ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                    ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
              (1, 0))
            val✝))
        y).1 =
    (aux f) { val := y, property := hy } * (aux f) { val := val✝, property := property✝ }
⊢ (aux f) ({ val := x, property := hx } + { val := y, property := hy }) *
      (aux f) { val := val✝, property := property✝ } =
    (aux f) { val := x + y, property := (_ : x + y ∈ evenOdd Q 0) } * (aux f) { val := val✝, property := property✝ }

Next tactic:
rfl
@[simp]
theorem aux_mul (x y : even Q) : aux f (x * y) = aux f x * aux f y := by
  cases' x with x x_property
  cases y
  refine' (congr_arg Prod.fst (foldr_mul _ _ _ _ _ _)).trans _
  dsimp only
  refine' even_induction Q _ _ _ _ x_property
  · intro r
    rw [foldr_algebraMap, aux_algebraMap]
    exact Algebra.smul_def r _
  · intro x y hx hy ihx ihy
    rw [LinearMap.map_add, Prod.fst_add, ihx, ihy, ← add_mul, ← LinearMap.map_add]
    rfl
  · 

Proof state:
case mk.mk.refine'_3
R : Type uR
M : Type uM
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
Q : QuadraticForm R M
A : Type uA
B : Type uB
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : EvenHom Q A
x : CliffordAlgebra Q
x_property : x ∈ even Q
val✝ : CliffordAlgebra Q
property✝ : val✝ ∈ even Q
⊢ ∀ (m₁ m₂ : M) {x : CliffordAlgebra Q} {hx : x ∈ evenOdd Q 0},
    (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                (_ :
                  ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                    ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
              (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                    (_ :
                      ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                        ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
                  (1, 0))
                val✝))
            x).1 =
        (aux f) { val := x, property := hx } * (aux f) { val := val✝, property := property✝ } →
      (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                (_ :
                  ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                    ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
              (((foldr Q (CliffordAlgebra.even.lift.fFold f)
                    (_ :
                      ∀ (m : M) (x : A × ↥(CliffordAlgebra.even.lift.S f)),
                        ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x))
                  (1, 0))
                val✝))
            ((CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ * x)).1 =
        (aux f)
            { val := (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ * x,
              property := (_ : (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ * x ∈ evenOdd Q 0) } *
          (aux f) { val := val✝, property := property✝ }

Next tactic:
rintro m₁ m₂ x (hx : x ∈ even Q) ih