l3lab/ntp-mathlib huggingface dataset:
theorem GradedAlgebra.lift_ι_eq (i' : ZMod 2) (x' : evenOdd Q i') :
    -- porting note: added a second `by apply`
    lift Q ⟨by apply GradedAlgebra.ι Q, by apply GradedAlgebra.ι_sq_scalar Q⟩ x' =
      DirectSum.of (fun i => evenOdd Q i) i' x' := by
  cases' x' with x' hx'
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  induction hx' using Submodule.iSup_induction' with
  | hp i x hx =>
    obtain ⟨i, rfl⟩ := i
    -- porting note: `dsimp only [Subtype.coe_mk] at hx` doesn't work, use `change` instead
    change x ∈ LinearMap.range (ι Q) ^ i at hx
    

Proof state:
case mk.hp.mk
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
x' x : CliffordAlgebra Q
i : ℕ
hx : x ∈ LinearMap.range (ι Q) ^ i
⊢ ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      x =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i) { val := x, property := (_ : x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }

Next tactic:
induction hx using Submodule.pow_induction_on_left' with
    | hr r =>
      rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl
    | hadd x y i hx hy ihx ihy =>
      rw [AlgHom.map_add, ihx, ihy, ← map_add]
      rfl
    | hmul m hm i x hx ih =>
      obtain ⟨_, rfl⟩ := hm
      rw [AlgHom.map_mul, ih, lift_ι_apply, GradedAlgebra.ι_apply Q, DirectSum.of_mul_of]
      refine' DirectSum.of_eq_of_gradedMonoid_eq (Sigma.subtype_ext _ _) <;>
        dsimp only [GradedMonoid.mk, Subtype.coe_mk]
      · rw [Nat.succ_eq_add_one, add_comm, Nat.cast_add, Nat.cast_one]
      rfl
theorem GradedAlgebra.lift_ι_eq (i' : ZMod 2) (x' : evenOdd Q i') :
    -- porting note: added a second `by apply`
    lift Q ⟨by apply GradedAlgebra.ι Q, by apply GradedAlgebra.ι_sq_scalar Q⟩ x' =
      DirectSum.of (fun i => evenOdd Q i) i' x' := by
  cases' x' with x' hx'
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  induction hx' using Submodule.iSup_induction' with
  | hp i x hx =>
    obtain ⟨i, rfl⟩ := i
    -- porting note: `dsimp only [Subtype.coe_mk] at hx` doesn't work, use `change` instead
    change x ∈ LinearMap.range (ι Q) ^ i at hx
    induction hx using Submodule.pow_induction_on_left' with
    

Proof state:
case mk.hp.mk.hr
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
x' x : CliffordAlgebra Q
i : ℕ
r : R
⊢ ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      ((algebraMap R (CliffordAlgebra Q)) r) =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑0)
      { val := (algebraMap R (CliffordAlgebra Q)) r,
        property := (_ : (algebraMap R (CliffordAlgebra Q)) r ∈ ⨆ i, LinearMap.range (ι Q) ^ ↑i) }

Next tactic:
| hr r =>
      rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl
theorem GradedAlgebra.lift_ι_eq (i' : ZMod 2) (x' : evenOdd Q i') :
    -- porting note: added a second `by apply`
    lift Q ⟨by apply GradedAlgebra.ι Q, by apply GradedAlgebra.ι_sq_scalar Q⟩ x' =
      DirectSum.of (fun i => evenOdd Q i) i' x' := by
  cases' x' with x' hx'
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  induction hx' using Submodule.iSup_induction' with
  | hp i x hx =>
    obtain ⟨i, rfl⟩ := i
    -- porting note: `dsimp only [Subtype.coe_mk] at hx` doesn't work, use `change` instead
    change x ∈ LinearMap.range (ι Q) ^ i at hx
    induction hx using Submodule.pow_induction_on_left' with
    | hr r =>
      

Proof state:
case mk.hp.mk.hr
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
x' x : CliffordAlgebra Q
i : ℕ
r : R
⊢ ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      ((algebraMap R (CliffordAlgebra Q)) r) =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑0)
      { val := (algebraMap R (CliffordAlgebra Q)) r,
        property := (_ : (algebraMap R (CliffordAlgebra Q)) r ∈ ⨆ i, LinearMap.range (ι Q) ^ ↑i) }

Next tactic:
rw [AlgHom.commutes, DirectSum.algebraMap_apply]
theorem GradedAlgebra.lift_ι_eq (i' : ZMod 2) (x' : evenOdd Q i') :
    -- porting note: added a second `by apply`
    lift Q ⟨by apply GradedAlgebra.ι Q, by apply GradedAlgebra.ι_sq_scalar Q⟩ x' =
      DirectSum.of (fun i => evenOdd Q i) i' x' := by
  cases' x' with x' hx'
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  induction hx' using Submodule.iSup_induction' with
  | hp i x hx =>
    obtain ⟨i, rfl⟩ := i
    -- porting note: `dsimp only [Subtype.coe_mk] at hx` doesn't work, use `change` instead
    change x ∈ LinearMap.range (ι Q) ^ i at hx
    induction hx using Submodule.pow_induction_on_left' with
    | hr r =>
      rw [AlgHom.commutes, DirectSum.algebraMap_apply]; 

Proof state:
case mk.hp.mk.hr
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
x' x : CliffordAlgebra Q
i : ℕ
r : R
⊢ (DirectSum.of (fun i => ↥(evenOdd Q i)) 0) (DirectSum.GAlgebra.toFun r) =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑0)
      { val := (algebraMap R (CliffordAlgebra Q)) r,
        property := (_ : (algebraMap R (CliffordAlgebra Q)) r ∈ ⨆ i, LinearMap.range (ι Q) ^ ↑i) }

Next tactic:
rfl
theorem GradedAlgebra.lift_ι_eq (i' : ZMod 2) (x' : evenOdd Q i') :
    -- porting note: added a second `by apply`
    lift Q ⟨by apply GradedAlgebra.ι Q, by apply GradedAlgebra.ι_sq_scalar Q⟩ x' =
      DirectSum.of (fun i => evenOdd Q i) i' x' := by
  cases' x' with x' hx'
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  induction hx' using Submodule.iSup_induction' with
  | hp i x hx =>
    obtain ⟨i, rfl⟩ := i
    -- porting note: `dsimp only [Subtype.coe_mk] at hx` doesn't work, use `change` instead
    change x ∈ LinearMap.range (ι Q) ^ i at hx
    induction hx using Submodule.pow_induction_on_left' with
    | hr r =>
      rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl
    

Proof state:
case mk.hp.mk.hadd
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
x' x✝ : CliffordAlgebra Q
i✝ : ℕ
x y : CliffordAlgebra Q
i : ℕ
hx : x ∈ LinearMap.range (ι Q) ^ i
hy : y ∈ LinearMap.range (ι Q) ^ i
ihx :
  ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      x =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i) { val := x, property := (_ : x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }
ihy :
  ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      y =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i) { val := y, property := (_ : y ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }
⊢ ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      (x + y) =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i)
      { val := x + y, property := (_ : x + y ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }

Next tactic:
| hadd x y i hx hy ihx ihy =>
      rw [AlgHom.map_add, ihx, ihy, ← map_add]
      rfl
theorem GradedAlgebra.lift_ι_eq (i' : ZMod 2) (x' : evenOdd Q i') :
    -- porting note: added a second `by apply`
    lift Q ⟨by apply GradedAlgebra.ι Q, by apply GradedAlgebra.ι_sq_scalar Q⟩ x' =
      DirectSum.of (fun i => evenOdd Q i) i' x' := by
  cases' x' with x' hx'
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  induction hx' using Submodule.iSup_induction' with
  | hp i x hx =>
    obtain ⟨i, rfl⟩ := i
    -- porting note: `dsimp only [Subtype.coe_mk] at hx` doesn't work, use `change` instead
    change x ∈ LinearMap.range (ι Q) ^ i at hx
    induction hx using Submodule.pow_induction_on_left' with
    | hr r =>
      rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl
    | hadd x y i hx hy ihx ihy =>
      

Proof state:
case mk.hp.mk.hadd
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
x' x✝ : CliffordAlgebra Q
i✝ : ℕ
x y : CliffordAlgebra Q
i : ℕ
hx : x ∈ LinearMap.range (ι Q) ^ i
hy : y ∈ LinearMap.range (ι Q) ^ i
ihx :
  ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      x =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i) { val := x, property := (_ : x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }
ihy :
  ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      y =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i) { val := y, property := (_ : y ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }
⊢ ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      (x + y) =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i)
      { val := x + y, property := (_ : x + y ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }

Next tactic:
rw [AlgHom.map_add, ihx, ihy, ← map_add]
theorem GradedAlgebra.lift_ι_eq (i' : ZMod 2) (x' : evenOdd Q i') :
    -- porting note: added a second `by apply`
    lift Q ⟨by apply GradedAlgebra.ι Q, by apply GradedAlgebra.ι_sq_scalar Q⟩ x' =
      DirectSum.of (fun i => evenOdd Q i) i' x' := by
  cases' x' with x' hx'
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  induction hx' using Submodule.iSup_induction' with
  | hp i x hx =>
    obtain ⟨i, rfl⟩ := i
    -- porting note: `dsimp only [Subtype.coe_mk] at hx` doesn't work, use `change` instead
    change x ∈ LinearMap.range (ι Q) ^ i at hx
    induction hx using Submodule.pow_induction_on_left' with
    | hr r =>
      rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl
    | hadd x y i hx hy ihx ihy =>
      rw [AlgHom.map_add, ihx, ihy, ← map_add]
      

Proof state:
case mk.hp.mk.hadd
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
x' x✝ : CliffordAlgebra Q
i✝ : ℕ
x y : CliffordAlgebra Q
i : ℕ
hx : x ∈ LinearMap.range (ι Q) ^ i
hy : y ∈ LinearMap.range (ι Q) ^ i
ihx :
  ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      x =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i) { val := x, property := (_ : x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }
ihy :
  ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      y =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i) { val := y, property := (_ : y ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }
⊢ (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i)
      ({ val := x, property := (_ : x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) } +
        { val := y, property := (_ : y ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }) =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i)
      { val := x + y, property := (_ : x + y ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }

Next tactic:
rfl
theorem GradedAlgebra.lift_ι_eq (i' : ZMod 2) (x' : evenOdd Q i') :
    -- porting note: added a second `by apply`
    lift Q ⟨by apply GradedAlgebra.ι Q, by apply GradedAlgebra.ι_sq_scalar Q⟩ x' =
      DirectSum.of (fun i => evenOdd Q i) i' x' := by
  cases' x' with x' hx'
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  induction hx' using Submodule.iSup_induction' with
  | hp i x hx =>
    obtain ⟨i, rfl⟩ := i
    -- porting note: `dsimp only [Subtype.coe_mk] at hx` doesn't work, use `change` instead
    change x ∈ LinearMap.range (ι Q) ^ i at hx
    induction hx using Submodule.pow_induction_on_left' with
    | hr r =>
      rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl
    | hadd x y i hx hy ihx ihy =>
      rw [AlgHom.map_add, ihx, ihy, ← map_add]
      rfl
    

Proof state:
case mk.hp.mk.hmul
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
x' x✝ : CliffordAlgebra Q
i✝ : ℕ
m : CliffordAlgebra Q
hm : m ∈ LinearMap.range (ι Q)
i : ℕ
x : CliffordAlgebra Q
hx : x ∈ LinearMap.range (ι Q) ^ i
ih :
  ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      x =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i) { val := x, property := (_ : x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }
⊢ ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      (m * x) =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑(Nat.succ i))
      { val := m * x, property := (_ : m * x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }

Next tactic:
| hmul m hm i x hx ih =>
      obtain ⟨_, rfl⟩ := hm
      rw [AlgHom.map_mul, ih, lift_ι_apply, GradedAlgebra.ι_apply Q, DirectSum.of_mul_of]
      refine' DirectSum.of_eq_of_gradedMonoid_eq (Sigma.subtype_ext _ _) <;>
        dsimp only [GradedMonoid.mk, Subtype.coe_mk]
      · rw [Nat.succ_eq_add_one, add_comm, Nat.cast_add, Nat.cast_one]
      rfl
theorem GradedAlgebra.lift_ι_eq (i' : ZMod 2) (x' : evenOdd Q i') :
    -- porting note: added a second `by apply`
    lift Q ⟨by apply GradedAlgebra.ι Q, by apply GradedAlgebra.ι_sq_scalar Q⟩ x' =
      DirectSum.of (fun i => evenOdd Q i) i' x' := by
  cases' x' with x' hx'
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  induction hx' using Submodule.iSup_induction' with
  | hp i x hx =>
    obtain ⟨i, rfl⟩ := i
    -- porting note: `dsimp only [Subtype.coe_mk] at hx` doesn't work, use `change` instead
    change x ∈ LinearMap.range (ι Q) ^ i at hx
    induction hx using Submodule.pow_induction_on_left' with
    | hr r =>
      rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl
    | hadd x y i hx hy ihx ihy =>
      rw [AlgHom.map_add, ihx, ihy, ← map_add]
      rfl
    | hmul m hm i x hx ih =>
      

Proof state:
case mk.hp.mk.hmul
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
x' x✝ : CliffordAlgebra Q
i✝ : ℕ
m : CliffordAlgebra Q
hm : m ∈ LinearMap.range (ι Q)
i : ℕ
x : CliffordAlgebra Q
hx : x ∈ LinearMap.range (ι Q) ^ i
ih :
  ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      x =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i) { val := x, property := (_ : x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }
⊢ ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      (m * x) =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑(Nat.succ i))
      { val := m * x, property := (_ : m * x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }

Next tactic:
obtain ⟨_, rfl⟩ := hm
theorem GradedAlgebra.lift_ι_eq (i' : ZMod 2) (x' : evenOdd Q i') :
    -- porting note: added a second `by apply`
    lift Q ⟨by apply GradedAlgebra.ι Q, by apply GradedAlgebra.ι_sq_scalar Q⟩ x' =
      DirectSum.of (fun i => evenOdd Q i) i' x' := by
  cases' x' with x' hx'
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  induction hx' using Submodule.iSup_induction' with
  | hp i x hx =>
    obtain ⟨i, rfl⟩ := i
    -- porting note: `dsimp only [Subtype.coe_mk] at hx` doesn't work, use `change` instead
    change x ∈ LinearMap.range (ι Q) ^ i at hx
    induction hx using Submodule.pow_induction_on_left' with
    | hr r =>
      rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl
    | hadd x y i hx hy ihx ihy =>
      rw [AlgHom.map_add, ihx, ihy, ← map_add]
      rfl
    | hmul m hm i x hx ih =>
      obtain ⟨_, rfl⟩ := hm
      

Proof state:
case mk.hp.mk.hmul.intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
x' x✝ : CliffordAlgebra Q
i✝ i : ℕ
x : CliffordAlgebra Q
hx : x ∈ LinearMap.range (ι Q) ^ i
ih :
  ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      x =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i) { val := x, property := (_ : x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }
w✝ : M
⊢ ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      ((ι Q) w✝ * x) =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑(Nat.succ i))
      { val := (ι Q) w✝ * x, property := (_ : (ι Q) w✝ * x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }

Next tactic:
rw [AlgHom.map_mul, ih, lift_ι_apply, GradedAlgebra.ι_apply Q, DirectSum.of_mul_of]
theorem GradedAlgebra.lift_ι_eq (i' : ZMod 2) (x' : evenOdd Q i') :
    -- porting note: added a second `by apply`
    lift Q ⟨by apply GradedAlgebra.ι Q, by apply GradedAlgebra.ι_sq_scalar Q⟩ x' =
      DirectSum.of (fun i => evenOdd Q i) i' x' := by
  cases' x' with x' hx'
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  induction hx' using Submodule.iSup_induction' with
  | hp i x hx =>
    obtain ⟨i, rfl⟩ := i
    -- porting note: `dsimp only [Subtype.coe_mk] at hx` doesn't work, use `change` instead
    change x ∈ LinearMap.range (ι Q) ^ i at hx
    induction hx using Submodule.pow_induction_on_left' with
    | hr r =>
      rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl
    | hadd x y i hx hy ihx ihy =>
      rw [AlgHom.map_add, ihx, ihy, ← map_add]
      rfl
    | hmul m hm i x hx ih =>
      obtain ⟨_, rfl⟩ := hm
      rw [AlgHom.map_mul, ih, lift_ι_apply, GradedAlgebra.ι_apply Q, DirectSum.of_mul_of]
      

Proof state:
case mk.hp.mk.hmul.intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
x' x✝ : CliffordAlgebra Q
i✝ i : ℕ
x : CliffordAlgebra Q
hx : x ∈ LinearMap.range (ι Q) ^ i
ih :
  ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      x =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i) { val := x, property := (_ : x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }
w✝ : M
⊢ (DirectSum.of (fun i => ↥(evenOdd Q i)) (1 + ↑i))
      (GradedMonoid.GMul.mul { val := (ι Q) w✝, property := (_ : (ι Q) w✝ ∈ evenOdd Q 1) }
        { val := x, property := (_ : x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }) =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑(Nat.succ i))
      { val := (ι Q) w✝ * x, property := (_ : (ι Q) w✝ * x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }

Next tactic:
refine' DirectSum.of_eq_of_gradedMonoid_eq (Sigma.subtype_ext _ _)
theorem GradedAlgebra.lift_ι_eq (i' : ZMod 2) (x' : evenOdd Q i') :
    -- porting note: added a second `by apply`
    lift Q ⟨by apply GradedAlgebra.ι Q, by apply GradedAlgebra.ι_sq_scalar Q⟩ x' =
      DirectSum.of (fun i => evenOdd Q i) i' x' := by
  cases' x' with x' hx'
  dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
  induction hx' using Submodule.iSup_induction' with
  | hp i x hx =>
    obtain ⟨i, rfl⟩ := i
    -- porting note: `dsimp only [Subtype.coe_mk] at hx` doesn't work, use `change` instead
    change x ∈ LinearMap.range (ι Q) ^ i at hx
    induction hx using Submodule.pow_induction_on_left' with
    | hr r =>
      rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl
    | hadd x y i hx hy ihx ihy =>
      rw [AlgHom.map_add, ihx, ihy, ← map_add]
      rfl
    | hmul m hm i x hx ih =>
      obtain ⟨_, rfl⟩ := hm
      rw [AlgHom.map_mul, ih, lift_ι_apply, GradedAlgebra.ι_apply Q, DirectSum.of_mul_of]
      refine' DirectSum.of_eq_of_gradedMonoid_eq (Sigma.subtype_ext _ _) <;>
        

Proof state:
case mk.hp.mk.hmul.intro.refine'_1
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
x' x✝ : CliffordAlgebra Q
i✝ i : ℕ
x : CliffordAlgebra Q
hx : x ∈ LinearMap.range (ι Q) ^ i
ih :
  ((lift Q)
        { val := GradedAlgebra.ι Q,
          property :=
            (_ :
              ∀ (m : M),
                (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m =
                  (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)) })
      x =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) ↑i) { val := x, property := (_ : x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }
w✝ : M
⊢ (GradedMonoid.mk (1 + ↑i)
        (GradedMonoid.GMul.mul { val := (ι Q) w✝, property := (_ : (ι Q) w✝ ∈ evenOdd Q 1) }
          { val := x, property := (_ : x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) })).fst =
    (GradedMonoid.mk ↑(Nat.succ i)
        { val := (ι Q) w✝ * x, property := (_ : (ι Q) w✝ * x ∈ ⨆ i_1, LinearMap.range (ι Q) ^ ↑i_1) }).fst

Next tactic:
dsimp only [GradedMonoid.mk, Subtype.coe_mk]