l3lab/ntp-mathlib huggingface dataset:
/-- If `f, g` are functions `α → 𝕜`, both continuous on a preconnected set `S`, with
`f ^ 2 = g ^ 2` on `S`, and `g z ≠ 0` all `z ∈ S`, then as soon as `f = g` holds at
one point of `S` it holds for all points. -/
theorem IsPreconnected.eq_of_sq_eq [Field 𝕜] [HasContinuousInv₀ 𝕜] [ContinuousMul 𝕜]
    (hS : IsPreconnected S) (hf : ContinuousOn f S) (hg : ContinuousOn g S)
    (hsq : EqOn (f ^ 2) (g ^ 2) S) (hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0) {y : α} (hy : y ∈ S)
    (hy' : f y = g y) : EqOn f g S := fun x hx => by
  rcases hS.eq_or_eq_neg_of_sq_eq hf hg @hsq @hg_ne with (h | h)
  · exact h hx
  · rw [h _, Pi.neg_apply, neg_eq_iff_add_eq_zero, ← two_mul, mul_eq_zero,
      iff_false_iff.2 (hg_ne _)] at hy' ⊢ <;> 

Proof state:
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
y : α
hy : y ∈ S
hy' : 2 = 0 ∨ False
x : α
hx : x ∈ S
h : EqOn f (-g) S
⊢ x ∈ S

Next tactic:
assumption
/-- If `f, g` are functions `α → 𝕜`, both continuous on a preconnected set `S`, with
`f ^ 2 = g ^ 2` on `S`, and `g z ≠ 0` all `z ∈ S`, then as soon as `f = g` holds at
one point of `S` it holds for all points. -/
theorem IsPreconnected.eq_of_sq_eq [Field 𝕜] [HasContinuousInv₀ 𝕜] [ContinuousMul 𝕜]
    (hS : IsPreconnected S) (hf : ContinuousOn f S) (hg : ContinuousOn g S)
    (hsq : EqOn (f ^ 2) (g ^ 2) S) (hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0) {y : α} (hy : y ∈ S)
    (hy' : f y = g y) : EqOn f g S := fun x hx => by
  rcases hS.eq_or_eq_neg_of_sq_eq hf hg @hsq @hg_ne with (h | h)
  · exact h hx
  · rw [h _, Pi.neg_apply, neg_eq_iff_add_eq_zero, ← two_mul, mul_eq_zero,
      iff_false_iff.2 (hg_ne _)] at hy' ⊢ <;> 

Proof state:
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
y : α
hy : y ∈ S
hy' : 2 = 0 ∨ g y = 0
x : α
hx : x ∈ S
h : EqOn f (-g) S
⊢ y ∈ S

Next tactic:
assumption
/-- If `f, g` are functions `α → 𝕜`, both continuous on a preconnected set `S`, with
`f ^ 2 = g ^ 2` on `S`, and `g z ≠ 0` all `z ∈ S`, then as soon as `f = g` holds at
one point of `S` it holds for all points. -/
theorem IsPreconnected.eq_of_sq_eq [Field 𝕜] [HasContinuousInv₀ 𝕜] [ContinuousMul 𝕜]
    (hS : IsPreconnected S) (hf : ContinuousOn f S) (hg : ContinuousOn g S)
    (hsq : EqOn (f ^ 2) (g ^ 2) S) (hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0) {y : α} (hy : y ∈ S)
    (hy' : f y = g y) : EqOn f g S := fun x hx => by
  rcases hS.eq_or_eq_neg_of_sq_eq hf hg @hsq @hg_ne with (h | h)
  · exact h hx
  · rw [h _, Pi.neg_apply, neg_eq_iff_add_eq_zero, ← two_mul, mul_eq_zero,
      iff_false_iff.2 (hg_ne _)] at hy' ⊢ <;> 

Proof state:
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
y : α
hy : y ∈ S
hy' : (-g) y = g y
x : α
hx : x ∈ S
h : EqOn f (-g) S
⊢ x ∈ S

Next tactic:
assumption
/-- If `f, g` are functions `α → 𝕜`, both continuous on a preconnected set `S`, with
`f ^ 2 = g ^ 2` on `S`, and `g z ≠ 0` all `z ∈ S`, then as soon as `f = g` holds at
one point of `S` it holds for all points. -/
theorem IsPreconnected.eq_of_sq_eq [Field 𝕜] [HasContinuousInv₀ 𝕜] [ContinuousMul 𝕜]
    (hS : IsPreconnected S) (hf : ContinuousOn f S) (hg : ContinuousOn g S)
    (hsq : EqOn (f ^ 2) (g ^ 2) S) (hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0) {y : α} (hy : y ∈ S)
    (hy' : f y = g y) : EqOn f g S := fun x hx => by
  rcases hS.eq_or_eq_neg_of_sq_eq hf hg @hsq @hg_ne with (h | h)
  · exact h hx
  · rw [h _, Pi.neg_apply, neg_eq_iff_add_eq_zero, ← two_mul, mul_eq_zero,
      iff_false_iff.2 (hg_ne _)] at hy' ⊢ <;> 

Proof state:
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
y : α
hy : y ∈ S
hy' : f y = g y
x : α
hx : x ∈ S
h : EqOn f (-g) S
⊢ y ∈ S

Next tactic:
assumption
theorem one_le_evenOdd_zero : 1 ≤ evenOdd Q 0 := by
  

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
⊢ 1 ≤ evenOdd Q 0

Next tactic:
refine' le_trans _ (le_iSup _ ⟨0, Nat.cast_zero⟩)
theorem one_le_evenOdd_zero : 1 ≤ evenOdd Q 0 := by
  refine' le_trans _ (le_iSup _ ⟨0, Nat.cast_zero⟩)
  

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
⊢ 1 ≤ LinearMap.range (ι Q) ^ ↑{ val := 0, property := (_ : ↑0 = 0) }

Next tactic:
exact (pow_zero _).ge
theorem range_ι_le_evenOdd_one : LinearMap.range (ι Q) ≤ evenOdd Q 1 := by
  

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
⊢ LinearMap.range (ι Q) ≤ evenOdd Q 1

Next tactic:
refine' le_trans _ (le_iSup _ ⟨1, Nat.cast_one⟩)
theorem range_ι_le_evenOdd_one : LinearMap.range (ι Q) ≤ evenOdd Q 1 := by
  refine' le_trans _ (le_iSup _ ⟨1, Nat.cast_one⟩)
  

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
⊢ LinearMap.range (ι Q) ≤ LinearMap.range (ι Q) ^ ↑{ val := 1, property := (_ : ↑1 = 1) }

Next tactic:
exact (pow_one _).ge
theorem ι_mul_ι_mem_evenOdd_zero (m₁ m₂ : M) : ι Q m₁ * ι Q m₂ ∈ evenOdd Q 0 :=
  Submodule.mem_iSup_of_mem ⟨2, rfl⟩
    (by
      

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
m₁ m₂ : M
⊢ (ι Q) m₁ * (ι Q) m₂ ∈ LinearMap.range (ι Q) ^ ↑{ val := 2, property := (_ : ↑2 = ↑2) }

Next tactic:
rw [Subtype.coe_mk, pow_two]
theorem ι_mul_ι_mem_evenOdd_zero (m₁ m₂ : M) : ι Q m₁ * ι Q m₂ ∈ evenOdd Q 0 :=
  Submodule.mem_iSup_of_mem ⟨2, rfl⟩
    (by
      rw [Subtype.coe_mk, pow_two]
      

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
m₁ m₂ : M
⊢ (ι Q) m₁ * (ι Q) m₂ ∈ LinearMap.range (ι Q) * LinearMap.range (ι Q)

Next tactic:
exact
        Submodule.mul_mem_mul (LinearMap.mem_range_self (ι Q) m₁)
          (LinearMap.mem_range_self (ι Q) m₂)
theorem evenOdd_mul_le (i j : ZMod 2) : evenOdd Q i * evenOdd Q j ≤ evenOdd Q (i + j) := by
  

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i j : ZMod 2
⊢ evenOdd Q i * evenOdd Q j ≤ evenOdd Q (i + j)

Next tactic:
simp_rw [evenOdd, Submodule.iSup_eq_span, Submodule.span_mul_span]
theorem evenOdd_mul_le (i j : ZMod 2) : evenOdd Q i * evenOdd Q j ≤ evenOdd Q (i + j) := by
  simp_rw [evenOdd, Submodule.iSup_eq_span, Submodule.span_mul_span]
  

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i j : ZMod 2
⊢ Submodule.span R ((⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1)) * ⋃ i, ↑(LinearMap.range (ι Q) ^ ↑i)) ≤
    Submodule.span R (⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1))

Next tactic:
apply Submodule.span_mono
theorem evenOdd_mul_le (i j : ZMod 2) : evenOdd Q i * evenOdd Q j ≤ evenOdd Q (i + j) := by
  simp_rw [evenOdd, Submodule.iSup_eq_span, Submodule.span_mul_span]
  apply Submodule.span_mono
  

Proof state:
case h
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i j : ZMod 2
⊢ (⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1)) * ⋃ i, ↑(LinearMap.range (ι Q) ^ ↑i) ⊆ ⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1)

Next tactic:
intro z hz
theorem evenOdd_mul_le (i j : ZMod 2) : evenOdd Q i * evenOdd Q j ≤ evenOdd Q (i + j) := by
  simp_rw [evenOdd, Submodule.iSup_eq_span, Submodule.span_mul_span]
  apply Submodule.span_mono
  intro z hz
  

Proof state:
case h
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i j : ZMod 2
z : CliffordAlgebra Q
hz : z ∈ (⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1)) * ⋃ i, ↑(LinearMap.range (ι Q) ^ ↑i)
⊢ z ∈ ⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1)

Next tactic:
obtain ⟨x, y, hx, hy, rfl⟩ := hz
theorem evenOdd_mul_le (i j : ZMod 2) : evenOdd Q i * evenOdd Q j ≤ evenOdd Q (i + j) := by
  simp_rw [evenOdd, Submodule.iSup_eq_span, Submodule.span_mul_span]
  apply Submodule.span_mono
  intro z hz
  obtain ⟨x, y, hx, hy, rfl⟩ := hz
  

Proof state:
case h.intro.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i j : ZMod 2
x y : CliffordAlgebra Q
hx : x ∈ ⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1)
hy : y ∈ ⋃ i, ↑(LinearMap.range (ι Q) ^ ↑i)
⊢ (fun x x_1 => x * x_1) x y ∈ ⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1)

Next tactic:
obtain ⟨xi, hx'⟩ := Set.mem_iUnion.mp hx
theorem evenOdd_mul_le (i j : ZMod 2) : evenOdd Q i * evenOdd Q j ≤ evenOdd Q (i + j) := by
  simp_rw [evenOdd, Submodule.iSup_eq_span, Submodule.span_mul_span]
  apply Submodule.span_mono
  intro z hz
  obtain ⟨x, y, hx, hy, rfl⟩ := hz
  obtain ⟨xi, hx'⟩ := Set.mem_iUnion.mp hx
  

Proof state:
case h.intro.intro.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i j : ZMod 2
x y : CliffordAlgebra Q
hx : x ∈ ⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1)
hy : y ∈ ⋃ i, ↑(LinearMap.range (ι Q) ^ ↑i)
xi : { n // ↑n = i }
hx' : x ∈ ↑(LinearMap.range (ι Q) ^ ↑xi)
⊢ (fun x x_1 => x * x_1) x y ∈ ⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1)

Next tactic:
obtain ⟨yi, hy'⟩ := Set.mem_iUnion.mp hy
theorem evenOdd_mul_le (i j : ZMod 2) : evenOdd Q i * evenOdd Q j ≤ evenOdd Q (i + j) := by
  simp_rw [evenOdd, Submodule.iSup_eq_span, Submodule.span_mul_span]
  apply Submodule.span_mono
  intro z hz
  obtain ⟨x, y, hx, hy, rfl⟩ := hz
  obtain ⟨xi, hx'⟩ := Set.mem_iUnion.mp hx
  obtain ⟨yi, hy'⟩ := Set.mem_iUnion.mp hy
  

Proof state:
case h.intro.intro.intro.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i j : ZMod 2
x y : CliffordAlgebra Q
hx : x ∈ ⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1)
hy : y ∈ ⋃ i, ↑(LinearMap.range (ι Q) ^ ↑i)
xi : { n // ↑n = i }
hx' : x ∈ ↑(LinearMap.range (ι Q) ^ ↑xi)
yi : { n // ↑n = j }
hy' : y ∈ ↑(LinearMap.range (ι Q) ^ ↑yi)
⊢ (fun x x_1 => x * x_1) x y ∈ ⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1)

Next tactic:
refine' Set.mem_iUnion.mpr ⟨⟨xi + yi, by simp only [Nat.cast_add, xi.prop, yi.prop]⟩, _⟩
theorem evenOdd_mul_le (i j : ZMod 2) : evenOdd Q i * evenOdd Q j ≤ evenOdd Q (i + j) := by
  simp_rw [evenOdd, Submodule.iSup_eq_span, Submodule.span_mul_span]
  apply Submodule.span_mono
  intro z hz
  obtain ⟨x, y, hx, hy, rfl⟩ := hz
  obtain ⟨xi, hx'⟩ := Set.mem_iUnion.mp hx
  obtain ⟨yi, hy'⟩ := Set.mem_iUnion.mp hy
  refine' Set.mem_iUnion.mpr ⟨⟨xi + yi, by 

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i j : ZMod 2
x y : CliffordAlgebra Q
hx : x ∈ ⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1)
hy : y ∈ ⋃ i, ↑(LinearMap.range (ι Q) ^ ↑i)
xi : { n // ↑n = i }
hx' : x ∈ ↑(LinearMap.range (ι Q) ^ ↑xi)
yi : { n // ↑n = j }
hy' : y ∈ ↑(LinearMap.range (ι Q) ^ ↑yi)
⊢ ↑(↑xi + ↑yi) = i + j

Next tactic:
simp only [Nat.cast_add, xi.prop, yi.prop]
theorem evenOdd_mul_le (i j : ZMod 2) : evenOdd Q i * evenOdd Q j ≤ evenOdd Q (i + j) := by
  simp_rw [evenOdd, Submodule.iSup_eq_span, Submodule.span_mul_span]
  apply Submodule.span_mono
  intro z hz
  obtain ⟨x, y, hx, hy, rfl⟩ := hz
  obtain ⟨xi, hx'⟩ := Set.mem_iUnion.mp hx
  obtain ⟨yi, hy'⟩ := Set.mem_iUnion.mp hy
  refine' Set.mem_iUnion.mpr ⟨⟨xi + yi, by simp only [Nat.cast_add, xi.prop, yi.prop]⟩, _⟩
  

Proof state:
case h.intro.intro.intro.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i j : ZMod 2
x y : CliffordAlgebra Q
hx : x ∈ ⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1)
hy : y ∈ ⋃ i, ↑(LinearMap.range (ι Q) ^ ↑i)
xi : { n // ↑n = i }
hx' : x ∈ ↑(LinearMap.range (ι Q) ^ ↑xi)
yi : { n // ↑n = j }
hy' : y ∈ ↑(LinearMap.range (ι Q) ^ ↑yi)
⊢ (fun x x_1 => x * x_1) x y ∈ ↑(LinearMap.range (ι Q) ^ ↑{ val := ↑xi + ↑yi, property := (_ : ↑(↑xi + ↑yi) = i + j) })

Next tactic:
simp only [Subtype.coe_mk, Nat.cast_add, pow_add]
theorem evenOdd_mul_le (i j : ZMod 2) : evenOdd Q i * evenOdd Q j ≤ evenOdd Q (i + j) := by
  simp_rw [evenOdd, Submodule.iSup_eq_span, Submodule.span_mul_span]
  apply Submodule.span_mono
  intro z hz
  obtain ⟨x, y, hx, hy, rfl⟩ := hz
  obtain ⟨xi, hx'⟩ := Set.mem_iUnion.mp hx
  obtain ⟨yi, hy'⟩ := Set.mem_iUnion.mp hy
  refine' Set.mem_iUnion.mpr ⟨⟨xi + yi, by simp only [Nat.cast_add, xi.prop, yi.prop]⟩, _⟩
  simp only [Subtype.coe_mk, Nat.cast_add, pow_add]
  

Proof state:
case h.intro.intro.intro.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i j : ZMod 2
x y : CliffordAlgebra Q
hx : x ∈ ⋃ i_1, ↑(LinearMap.range (ι Q) ^ ↑i_1)
hy : y ∈ ⋃ i, ↑(LinearMap.range (ι Q) ^ ↑i)
xi : { n // ↑n = i }
hx' : x ∈ ↑(LinearMap.range (ι Q) ^ ↑xi)
yi : { n // ↑n = j }
hy' : y ∈ ↑(LinearMap.range (ι Q) ^ ↑yi)
⊢ x * y ∈ ↑(LinearMap.range (ι Q) ^ ↑xi * LinearMap.range (ι Q) ^ ↑yi)

Next tactic:
exact Submodule.mul_mem_mul hx' hy'
nonrec theorem GradedAlgebra.ι_sq_scalar (m : M) :
    GradedAlgebra.ι Q m * GradedAlgebra.ι Q m = algebraMap R _ (Q m) := by
  

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
m : M
⊢ (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m = (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)

Next tactic:
rw [GradedAlgebra.ι_apply Q, DirectSum.of_mul_of, DirectSum.algebraMap_apply]
nonrec theorem GradedAlgebra.ι_sq_scalar (m : M) :
    GradedAlgebra.ι Q m * GradedAlgebra.ι Q m = algebraMap R _ (Q m) := by
  rw [GradedAlgebra.ι_apply Q, DirectSum.of_mul_of, DirectSum.algebraMap_apply]
  

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
m : M
⊢ (DirectSum.of (fun i => ↥(evenOdd Q i)) (1 + 1))
      (GradedMonoid.GMul.mul { val := (ι Q) m, property := (_ : (ι Q) m ∈ evenOdd Q 1) }
        { val := (ι Q) m, property := (_ : (ι Q) m ∈ evenOdd Q 1) }) =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) 0) (DirectSum.GAlgebra.toFun (Q m))

Next tactic:
refine' DirectSum.of_eq_of_gradedMonoid_eq (Sigma.subtype_ext rfl <| ι_sq_scalar _ _)
theorem GradedAlgebra.lift_ι_eq (i' : ZMod 2) (x' : evenOdd Q i') :
    -- porting note: added a second `by apply`
    lift Q ⟨by 

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i' : ZMod 2
x' : ↥(evenOdd Q i')
⊢ M →ₗ[R] ⨁ (i : ZMod 2), ↥(evenOdd Q i)

Next tactic:
apply GradedAlgebra.ι Q
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 

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i' : ZMod 2
x' : ↥(evenOdd Q i')
⊢ ∀ (m : M), (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m = (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)

Next tactic:
apply GradedAlgebra.ι_sq_scalar Q
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
  

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i' : ZMod 2
x' : ↥(evenOdd 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') x'

Next tactic:
cases' x' with x' hx'
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'
  

Proof state:
case mk
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i' : ZMod 2
x' : CliffordAlgebra Q
hx' : x' ∈ evenOdd 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)) })
      ↑{ val := x', property := hx' } =
    (DirectSum.of (fun i => ↥(evenOdd Q i)) i') { val := x', property := hx' }

Next tactic:
dsimp only [Subtype.coe_mk, DirectSum.lof_eq_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]
  

Proof state:
case mk
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i' : ZMod 2
x' : CliffordAlgebra Q
hx' : x' ∈ evenOdd 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 := hx' }

Next tactic:
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 _ _) <;>
        dsimp only [GradedMonoid.mk, Subtype.coe_mk]
      · rw [Nat.succ_eq_add_one, add_comm, Nat.cast_add, Nat.cast_one]
      rfl
  | h0 =>
    rw [AlgHom.map_zero]
    apply Eq.symm
    apply DFinsupp.single_eq_zero.mpr; rfl
  | hadd x y 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
  

Proof state:
case mk.hp
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i' : ZMod 2
x' : CliffordAlgebra Q
i : { n // ↑n = i' }
x : CliffordAlgebra Q
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, LinearMap.range (ι Q) ^ ↑i) }

Next tactic:
| 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 _ _) <;>
        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 =>
    

Proof state:
case mk.hp
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i' : ZMod 2
x' : CliffordAlgebra Q
i : { n // ↑n = i' }
x : CliffordAlgebra Q
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, LinearMap.range (ι Q) ^ ↑i) }

Next tactic:
obtain ⟨i, rfl⟩ := i
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
    

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) ^ ↑{ val := i, property := (_ : ↑i = ↑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:
change x ∈ LinearMap.range (ι Q) ^ i at hx