l3lab/ntp-mathlib huggingface dataset:
theorem mem_dlookup_kunion {a} {b : β a} {l₁ l₂ : List (Sigma β)} :
    b ∈ dlookup a (kunion l₁ l₂) ↔ b ∈ dlookup a l₁ ∨ a ∉ l₁.keys ∧ b ∈ dlookup a l₂ := by
  induction l₁ generalizing l₂ with
  | nil => simp
  | cons s _ ih =>
    cases' s with a'
    by_cases h₁ : a = a'
    · subst h₁
      simp
    · let h₂ := @ih (kerase a' l₂)
      

Proof state:
case neg
α : Type u
β : α → Type v
l l₁ l₂✝ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
tail✝ : List (Sigma β)
ih : ∀ {l₂ : List (Sigma β)}, b ∈ dlookup a (kunion tail✝ l₂) ↔ b ∈ dlookup a tail✝ ∨ a ∉ keys tail✝ ∧ b ∈ dlookup a l₂
l₂ : List (Sigma β)
a' : α
snd✝ : β a'
h₁ : ¬a = a'
h₂ : b ∈ dlookup a (kunion tail✝ (kerase a' l₂)) ↔
  b ∈ dlookup a tail✝ ∨ a ∉ keys tail✝ ∧ b ∈ dlookup a (kerase a' l₂) :=
  ih
⊢ b ∈ dlookup a (kunion ({ fst := a', snd := snd✝ } :: tail✝) l₂) ↔
    b ∈ dlookup a ({ fst := a', snd := snd✝ } :: tail✝) ∨
      a ∉ keys ({ fst := a', snd := snd✝ } :: tail✝) ∧ b ∈ dlookup a l₂

Next tactic:
simp? [h₁] at h₂ says
        simp only [Option.mem_def, ne_eq, h₁, not_false_eq_true, dlookup_kerase_ne] at h₂
theorem mem_dlookup_kunion {a} {b : β a} {l₁ l₂ : List (Sigma β)} :
    b ∈ dlookup a (kunion l₁ l₂) ↔ b ∈ dlookup a l₁ ∨ a ∉ l₁.keys ∧ b ∈ dlookup a l₂ := by
  induction l₁ generalizing l₂ with
  | nil => simp
  | cons s _ ih =>
    cases' s with a'
    by_cases h₁ : a = a'
    · subst h₁
      simp
    · let h₂ := @ih (kerase a' l₂)
      simp? [h₁] at h₂ says
        

Proof state:
case neg
α : Type u
β : α → Type v
l l₁ l₂✝ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
tail✝ : List (Sigma β)
ih : ∀ {l₂ : List (Sigma β)}, b ∈ dlookup a (kunion tail✝ l₂) ↔ b ∈ dlookup a tail✝ ∨ a ∉ keys tail✝ ∧ b ∈ dlookup a l₂
l₂ : List (Sigma β)
a' : α
snd✝ : β a'
h₁ : ¬a = a'
h₂ : b ∈ dlookup a (kunion tail✝ (kerase a' l₂)) ↔
  b ∈ dlookup a tail✝ ∨ a ∉ keys tail✝ ∧ b ∈ dlookup a (kerase a' l₂) :=
  ih
⊢ b ∈ dlookup a (kunion ({ fst := a', snd := snd✝ } :: tail✝) l₂) ↔
    b ∈ dlookup a ({ fst := a', snd := snd✝ } :: tail✝) ∨
      a ∉ keys ({ fst := a', snd := snd✝ } :: tail✝) ∧ b ∈ dlookup a l₂

Next tactic:
simp only [Option.mem_def, ne_eq, h₁, not_false_eq_true, dlookup_kerase_ne] at h₂
theorem mem_dlookup_kunion {a} {b : β a} {l₁ l₂ : List (Sigma β)} :
    b ∈ dlookup a (kunion l₁ l₂) ↔ b ∈ dlookup a l₁ ∨ a ∉ l₁.keys ∧ b ∈ dlookup a l₂ := by
  induction l₁ generalizing l₂ with
  | nil => simp
  | cons s _ ih =>
    cases' s with a'
    by_cases h₁ : a = a'
    · subst h₁
      simp
    · let h₂ := @ih (kerase a' l₂)
      simp? [h₁] at h₂ says
        simp only [Option.mem_def, ne_eq, h₁, not_false_eq_true, dlookup_kerase_ne] at h₂
      

Proof state:
case neg
α : Type u
β : α → Type v
l l₁ l₂✝ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
tail✝ : List (Sigma β)
ih : ∀ {l₂ : List (Sigma β)}, b ∈ dlookup a (kunion tail✝ l₂) ↔ b ∈ dlookup a tail✝ ∨ a ∉ keys tail✝ ∧ b ∈ dlookup a l₂
l₂ : List (Sigma β)
a' : α
snd✝ : β a'
h₁ : ¬a = a'
h₂ :
  dlookup a (kunion tail✝ (kerase a' l₂)) = some b ↔ dlookup a tail✝ = some b ∨ a ∉ keys tail✝ ∧ dlookup a l₂ = some b
⊢ b ∈ dlookup a (kunion ({ fst := a', snd := snd✝ } :: tail✝) l₂) ↔
    b ∈ dlookup a ({ fst := a', snd := snd✝ } :: tail✝) ∨
      a ∉ keys ({ fst := a', snd := snd✝ } :: tail✝) ∧ b ∈ dlookup a l₂

Next tactic:
simp [h₁, h₂]
theorem dist_eq' (m n : ℤ) : dist m n = |m - n| := by 

Proof state:
m n : ℤ
⊢ dist m n = ↑|m - n|

Next tactic:
rw [dist_eq]
theorem dist_eq' (m n : ℤ) : dist m n = |m - n| := by rw [dist_eq]; 

Proof state:
m n : ℤ
⊢ |↑m - ↑n| = ↑|m - n|

Next tactic:
norm_cast
theorem pairwise_one_le_dist : Pairwise fun m n : ℤ => 1 ≤ dist m n := by
  

Proof state:
⊢ Pairwise fun m n => 1 ≤ dist m n

Next tactic:
intro m n hne
theorem pairwise_one_le_dist : Pairwise fun m n : ℤ => 1 ≤ dist m n := by
  intro m n hne
  

Proof state:
m n : ℤ
hne : m ≠ n
⊢ 1 ≤ dist m n

Next tactic:
rw [dist_eq]
theorem pairwise_one_le_dist : Pairwise fun m n : ℤ => 1 ≤ dist m n := by
  intro m n hne
  rw [dist_eq]; 

Proof state:
m n : ℤ
hne : m ≠ n
⊢ 1 ≤ |↑m - ↑n|

Next tactic:
norm_cast
theorem pairwise_one_le_dist : Pairwise fun m n : ℤ => 1 ≤ dist m n := by
  intro m n hne
  rw [dist_eq]; norm_cast; 

Proof state:
m n : ℤ
hne : m ≠ n
⊢ 1 ≤ |m - n|

Next tactic:
rwa [← zero_add (1 : ℤ), Int.add_one_le_iff, abs_pos, sub_ne_zero]
theorem ball_eq_Ioo (x : ℤ) (r : ℝ) : ball x r = Ioo ⌊↑x - r⌋ ⌈↑x + r⌉ := by
  

Proof state:
x : ℤ
r : ℝ
⊢ ball x r = Ioo ⌊↑x - r⌋ ⌈↑x + r⌉

Next tactic:
rw [← preimage_ball, Real.ball_eq_Ioo, preimage_Ioo]
theorem closedBall_eq_Icc (x : ℤ) (r : ℝ) : closedBall x r = Icc ⌈↑x - r⌉ ⌊↑x + r⌋ := by
  

Proof state:
x : ℤ
r : ℝ
⊢ closedBall x r = Icc ⌈↑x - r⌉ ⌊↑x + r⌋

Next tactic:
rw [← preimage_closedBall, Real.closedBall_eq_Icc, preimage_Icc]
instance : ProperSpace ℤ :=
  ⟨fun x r => by
    

Proof state:
x : ℤ
r : ℝ
⊢ IsCompact (closedBall x r)

Next tactic:
rw [closedBall_eq_Icc]
instance : ProperSpace ℤ :=
  ⟨fun x r => by
    rw [closedBall_eq_Icc]
    

Proof state:
x : ℤ
r : ℝ
⊢ IsCompact (Icc ⌈↑x - r⌉ ⌊↑x + r⌋)

Next tactic:
exact (Set.finite_Icc _ _).isCompact
@[simp]
theorem cobounded_eq : Bornology.cobounded ℤ = atBot ⊔ atTop := by
  

Proof state:
⊢ Bornology.cobounded ℤ = atBot ⊔ atTop

Next tactic:
simp_rw [← comap_dist_right_atTop (0 : ℤ), dist_eq', sub_zero,
    ← comap_abs_atTop, ← @Int.comap_cast_atTop ℝ, comap_comap]
@[simp]
theorem cobounded_eq : Bornology.cobounded ℤ = atBot ⊔ atTop := by
  simp_rw [← comap_dist_right_atTop (0 : ℤ), dist_eq', sub_zero,
    ← comap_abs_atTop, ← @Int.comap_cast_atTop ℝ, comap_comap]; 

Proof state:
⊢ comap (fun x => ↑|x|) atTop = comap (Int.cast ∘ abs) atTop

Next tactic:
rfl
@[simp]
theorem cocompact_eq : cocompact ℤ = atBot ⊔ atTop := by
  

Proof state:
⊢ cocompact ℤ = atBot ⊔ atTop

Next tactic:
rw [← cobounded_eq_cocompact, cobounded_eq]
@[simp]
theorem cofinite_eq : (cofinite : Filter ℤ) = atBot ⊔ atTop := by
  

Proof state:
⊢ cofinite = atBot ⊔ atTop

Next tactic:
rw [← cocompact_eq_cofinite, cocompact_eq]
/-- The embedding of pairs of vectors into the even subalgebra, as a bilinear map. -/
@[simps! bilin_apply_apply_coe]
nonrec def even.ι : EvenHom Q (even Q) where
  bilin :=
    LinearMap.mk₂ R (fun m₁ m₂ => ⟨ι Q m₁ * ι Q m₂, ι_mul_ι_mem_evenOdd_zero Q _ _⟩)
      (fun _ _ _ => 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
x✝² x✝¹ x✝ : M
⊢ (fun m₁ m₂ =>
        { val := (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂,
          property := (_ : (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ ∈ evenOdd Q 0) })
      (x✝² + x✝¹) x✝ =
    (fun m₁ m₂ =>
          { val := (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂,
            property := (_ : (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ ∈ evenOdd Q 0) })
        x✝² x✝ +
      (fun m₁ m₂ =>
          { val := (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂,
            property := (_ : (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ ∈ evenOdd Q 0) })
        x✝¹ x✝

Next tactic:
simp only [LinearMap.map_add, add_mul]
/-- The embedding of pairs of vectors into the even subalgebra, as a bilinear map. -/
@[simps! bilin_apply_apply_coe]
nonrec def even.ι : EvenHom Q (even Q) where
  bilin :=
    LinearMap.mk₂ R (fun m₁ m₂ => ⟨ι Q m₁ * ι Q m₂, ι_mul_ι_mem_evenOdd_zero Q _ _⟩)
      (fun _ _ _ => by simp only [LinearMap.map_add, add_mul]; 

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
x✝² x✝¹ x✝ : M
⊢ { val := (CliffordAlgebra.ι Q) x✝² * (CliffordAlgebra.ι Q) x✝ + (CliffordAlgebra.ι Q) x✝¹ * (CliffordAlgebra.ι Q) x✝,
      property :=
        (_ :
          (fun x => x ∈ even Q)
            ((CliffordAlgebra.ι Q) x✝² * (CliffordAlgebra.ι Q) x✝ +
              (CliffordAlgebra.ι Q) x✝¹ * (CliffordAlgebra.ι Q) x✝)) } =
    { val := (CliffordAlgebra.ι Q) x✝² * (CliffordAlgebra.ι Q) x✝,
        property := (_ : (CliffordAlgebra.ι Q) x✝² * (CliffordAlgebra.ι Q) x✝ ∈ evenOdd Q 0) } +
      { val := (CliffordAlgebra.ι Q) x✝¹ * (CliffordAlgebra.ι Q) x✝,
        property := (_ : (CliffordAlgebra.ι Q) x✝¹ * (CliffordAlgebra.ι Q) x✝ ∈ evenOdd Q 0) }

Next tactic:
rfl
/-- The embedding of pairs of vectors into the even subalgebra, as a bilinear map. -/
@[simps! bilin_apply_apply_coe]
nonrec def even.ι : EvenHom Q (even Q) where
  bilin :=
    LinearMap.mk₂ R (fun m₁ m₂ => ⟨ι Q m₁ * ι Q m₂, ι_mul_ι_mem_evenOdd_zero Q _ _⟩)
      (fun _ _ _ => by simp only [LinearMap.map_add, add_mul]; rfl)
      (fun _ _ _ => 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
x✝² : R
x✝¹ x✝ : M
⊢ (fun m₁ m₂ =>
        { val := (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂,
          property := (_ : (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ ∈ evenOdd Q 0) })
      (x✝² • x✝¹) x✝ =
    x✝² •
      (fun m₁ m₂ =>
          { val := (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂,
            property := (_ : (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ ∈ evenOdd Q 0) })
        x✝¹ x✝

Next tactic:
simp only [LinearMap.map_smul, smul_mul_assoc]
/-- The embedding of pairs of vectors into the even subalgebra, as a bilinear map. -/
@[simps! bilin_apply_apply_coe]
nonrec def even.ι : EvenHom Q (even Q) where
  bilin :=
    LinearMap.mk₂ R (fun m₁ m₂ => ⟨ι Q m₁ * ι Q m₂, ι_mul_ι_mem_evenOdd_zero Q _ _⟩)
      (fun _ _ _ => by simp only [LinearMap.map_add, add_mul]; rfl)
      (fun _ _ _ => by simp only [LinearMap.map_smul, smul_mul_assoc]; 

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
x✝² : R
x✝¹ x✝ : M
⊢ { val := x✝² • ((CliffordAlgebra.ι Q) x✝¹ * (CliffordAlgebra.ι Q) x✝),
      property := (_ : (fun x => x ∈ even Q) (x✝² • ((CliffordAlgebra.ι Q) x✝¹ * (CliffordAlgebra.ι Q) x✝))) } =
    x✝² •
      { val := (CliffordAlgebra.ι Q) x✝¹ * (CliffordAlgebra.ι Q) x✝,
        property := (_ : (CliffordAlgebra.ι Q) x✝¹ * (CliffordAlgebra.ι Q) x✝ ∈ evenOdd Q 0) }

Next tactic:
rfl
/-- The embedding of pairs of vectors into the even subalgebra, as a bilinear map. -/
@[simps! bilin_apply_apply_coe]
nonrec def even.ι : EvenHom Q (even Q) where
  bilin :=
    LinearMap.mk₂ R (fun m₁ m₂ => ⟨ι Q m₁ * ι Q m₂, ι_mul_ι_mem_evenOdd_zero Q _ _⟩)
      (fun _ _ _ => by simp only [LinearMap.map_add, add_mul]; rfl)
      (fun _ _ _ => by simp only [LinearMap.map_smul, smul_mul_assoc]; rfl)
      (fun _ _ _ => 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
x✝² x✝¹ x✝ : M
⊢ (fun m₁ m₂ =>
        { val := (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂,
          property := (_ : (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ ∈ evenOdd Q 0) })
      x✝² (x✝¹ + x✝) =
    (fun m₁ m₂ =>
          { val := (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂,
            property := (_ : (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ ∈ evenOdd Q 0) })
        x✝² x✝¹ +
      (fun m₁ m₂ =>
          { val := (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂,
            property := (_ : (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ ∈ evenOdd Q 0) })
        x✝² x✝

Next tactic:
simp only [LinearMap.map_add, mul_add]
/-- The embedding of pairs of vectors into the even subalgebra, as a bilinear map. -/
@[simps! bilin_apply_apply_coe]
nonrec def even.ι : EvenHom Q (even Q) where
  bilin :=
    LinearMap.mk₂ R (fun m₁ m₂ => ⟨ι Q m₁ * ι Q m₂, ι_mul_ι_mem_evenOdd_zero Q _ _⟩)
      (fun _ _ _ => by simp only [LinearMap.map_add, add_mul]; rfl)
      (fun _ _ _ => by simp only [LinearMap.map_smul, smul_mul_assoc]; rfl)
      (fun _ _ _ => by simp only [LinearMap.map_add, mul_add]; 

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
x✝² x✝¹ x✝ : M
⊢ { val := (CliffordAlgebra.ι Q) x✝² * (CliffordAlgebra.ι Q) x✝¹ + (CliffordAlgebra.ι Q) x✝² * (CliffordAlgebra.ι Q) x✝,
      property :=
        (_ :
          (fun x => x ∈ even Q)
            ((CliffordAlgebra.ι Q) x✝² * (CliffordAlgebra.ι Q) x✝¹ +
              (CliffordAlgebra.ι Q) x✝² * (CliffordAlgebra.ι Q) x✝)) } =
    { val := (CliffordAlgebra.ι Q) x✝² * (CliffordAlgebra.ι Q) x✝¹,
        property := (_ : (CliffordAlgebra.ι Q) x✝² * (CliffordAlgebra.ι Q) x✝¹ ∈ evenOdd Q 0) } +
      { val := (CliffordAlgebra.ι Q) x✝² * (CliffordAlgebra.ι Q) x✝,
        property := (_ : (CliffordAlgebra.ι Q) x✝² * (CliffordAlgebra.ι Q) x✝ ∈ evenOdd Q 0) }

Next tactic:
rfl
/-- The embedding of pairs of vectors into the even subalgebra, as a bilinear map. -/
@[simps! bilin_apply_apply_coe]
nonrec def even.ι : EvenHom Q (even Q) where
  bilin :=
    LinearMap.mk₂ R (fun m₁ m₂ => ⟨ι Q m₁ * ι Q m₂, ι_mul_ι_mem_evenOdd_zero Q _ _⟩)
      (fun _ _ _ => by simp only [LinearMap.map_add, add_mul]; rfl)
      (fun _ _ _ => by simp only [LinearMap.map_smul, smul_mul_assoc]; rfl)
      (fun _ _ _ => by simp only [LinearMap.map_add, mul_add]; rfl) fun _ _ _ => 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
x✝² : R
x✝¹ x✝ : M
⊢ (fun m₁ m₂ =>
        { val := (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂,
          property := (_ : (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ ∈ evenOdd Q 0) })
      x✝¹ (x✝² • x✝) =
    x✝² •
      (fun m₁ m₂ =>
          { val := (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂,
            property := (_ : (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ ∈ evenOdd Q 0) })
        x✝¹ x✝

Next tactic:
simp only [LinearMap.map_smul, mul_smul_comm]
/-- The embedding of pairs of vectors into the even subalgebra, as a bilinear map. -/
@[simps! bilin_apply_apply_coe]
nonrec def even.ι : EvenHom Q (even Q) where
  bilin :=
    LinearMap.mk₂ R (fun m₁ m₂ => ⟨ι Q m₁ * ι Q m₂, ι_mul_ι_mem_evenOdd_zero Q _ _⟩)
      (fun _ _ _ => by simp only [LinearMap.map_add, add_mul]; rfl)
      (fun _ _ _ => by simp only [LinearMap.map_smul, smul_mul_assoc]; rfl)
      (fun _ _ _ => by simp only [LinearMap.map_add, mul_add]; rfl) fun _ _ _ => by
      simp only [LinearMap.map_smul, mul_smul_comm]; 

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
x✝² : R
x✝¹ x✝ : M
⊢ { val := x✝² • ((CliffordAlgebra.ι Q) x✝¹ * (CliffordAlgebra.ι Q) x✝),
      property := (_ : (fun x => x ∈ even Q) (x✝² • ((CliffordAlgebra.ι Q) x✝¹ * (CliffordAlgebra.ι Q) x✝))) } =
    x✝² •
      { val := (CliffordAlgebra.ι Q) x✝¹ * (CliffordAlgebra.ι Q) x✝,
        property := (_ : (CliffordAlgebra.ι Q) x✝¹ * (CliffordAlgebra.ι Q) x✝ ∈ evenOdd Q 0) }

Next tactic:
rfl
/-- The embedding of pairs of vectors into the even subalgebra, as a bilinear map. -/
@[simps! bilin_apply_apply_coe]
nonrec def even.ι : EvenHom Q (even Q) where
  bilin :=
    LinearMap.mk₂ R (fun m₁ m₂ => ⟨ι Q m₁ * ι Q m₂, ι_mul_ι_mem_evenOdd_zero Q _ _⟩)
      (fun _ _ _ => by simp only [LinearMap.map_add, add_mul]; rfl)
      (fun _ _ _ => by simp only [LinearMap.map_smul, smul_mul_assoc]; rfl)
      (fun _ _ _ => by simp only [LinearMap.map_add, mul_add]; rfl) fun _ _ _ => by
      simp only [LinearMap.map_smul, mul_smul_comm]; rfl
  contract m := Subtype.ext <| ι_sq_scalar Q m
  contract_mid m₁ m₂ m₃ :=
    Subtype.ext <|
      calc
        ι Q m₁ * ι Q m₂ * (ι Q m₂ * ι Q m₃) = ι Q m₁ * (ι Q m₂ * ι Q m₂ * ι Q m₃) := 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
m₁ m₂ m₃ : M
⊢ (CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ * ((CliffordAlgebra.ι Q) m₂ * (CliffordAlgebra.ι Q) m₃) =
    (CliffordAlgebra.ι Q) m₁ * ((CliffordAlgebra.ι Q) m₂ * (CliffordAlgebra.ι Q) m₂ * (CliffordAlgebra.ι Q) m₃)

Next tactic:
simp only [mul_assoc]
/-- The embedding of pairs of vectors into the even subalgebra, as a bilinear map. -/
@[simps! bilin_apply_apply_coe]
nonrec def even.ι : EvenHom Q (even Q) where
  bilin :=
    LinearMap.mk₂ R (fun m₁ m₂ => ⟨ι Q m₁ * ι Q m₂, ι_mul_ι_mem_evenOdd_zero Q _ _⟩)
      (fun _ _ _ => by simp only [LinearMap.map_add, add_mul]; rfl)
      (fun _ _ _ => by simp only [LinearMap.map_smul, smul_mul_assoc]; rfl)
      (fun _ _ _ => by simp only [LinearMap.map_add, mul_add]; rfl) fun _ _ _ => by
      simp only [LinearMap.map_smul, mul_smul_comm]; rfl
  contract m := Subtype.ext <| ι_sq_scalar Q m
  contract_mid m₁ m₂ m₃ :=
    Subtype.ext <|
      calc
        ι Q m₁ * ι Q m₂ * (ι Q m₂ * ι Q m₃) = ι Q m₁ * (ι Q m₂ * ι Q m₂ * ι Q m₃) := by
          simp only [mul_assoc]
        _ = Q m₂ • (ι Q m₁ * ι Q m₃) := 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
m₁ m₂ m₃ : M
⊢ (CliffordAlgebra.ι Q) m₁ * ((CliffordAlgebra.ι Q) m₂ * (CliffordAlgebra.ι Q) m₂ * (CliffordAlgebra.ι Q) m₃) =
    Q m₂ • ((CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₃)

Next tactic:
rw [Algebra.smul_def, ι_sq_scalar, Algebra.left_comm]
/-- Two algebra morphisms from the even subalgebra are equal if they agree on pairs of generators.

See note [partially-applied ext lemmas]. -/
@[ext high]
theorem even.algHom_ext ⦃f g : even Q →ₐ[R] A⦄ (h : (even.ι Q).compr₂ f = (even.ι Q).compr₂ g) :
    f = g := 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
f g : ↥(even Q) →ₐ[R] A
h : EvenHom.compr₂ (ι Q) f = EvenHom.compr₂ (ι Q) g
⊢ f = g

Next tactic:
rw [EvenHom.ext_iff] at h
/-- Two algebra morphisms from the even subalgebra are equal if they agree on pairs of generators.

See note [partially-applied ext lemmas]. -/
@[ext high]
theorem even.algHom_ext ⦃f g : even Q →ₐ[R] A⦄ (h : (even.ι Q).compr₂ f = (even.ι Q).compr₂ g) :
    f = g := by
  rw [EvenHom.ext_iff] at h
  

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
f g : ↥(even Q) →ₐ[R] A
h : (EvenHom.compr₂ (ι Q) f).bilin = (EvenHom.compr₂ (ι Q) g).bilin
⊢ f = g

Next tactic:
ext ⟨x, hx⟩
/-- Two algebra morphisms from the even subalgebra are equal if they agree on pairs of generators.

See note [partially-applied ext lemmas]. -/
@[ext high]
theorem even.algHom_ext ⦃f g : even Q →ₐ[R] A⦄ (h : (even.ι Q).compr₂ f = (even.ι Q).compr₂ g) :
    f = g := by
  rw [EvenHom.ext_iff] at h
  ext ⟨x, hx⟩
  

Proof state:
case H.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
f g : ↥(even Q) →ₐ[R] A
h : (EvenHom.compr₂ (ι Q) f).bilin = (EvenHom.compr₂ (ι Q) g).bilin
x : CliffordAlgebra Q
hx : x ∈ even Q
⊢ f { val := x, property := hx } = g { val := x, property := hx }

Next tactic:
refine' even_induction _ _ _ _ _ hx
/-- Two algebra morphisms from the even subalgebra are equal if they agree on pairs of generators.

See note [partially-applied ext lemmas]. -/
@[ext high]
theorem even.algHom_ext ⦃f g : even Q →ₐ[R] A⦄ (h : (even.ι Q).compr₂ f = (even.ι Q).compr₂ g) :
    f = g := by
  rw [EvenHom.ext_iff] at h
  ext ⟨x, hx⟩
  refine' even_induction _ _ _ _ _ hx
  · 

Proof state:
case H.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
f g : ↥(even Q) →ₐ[R] A
h : (EvenHom.compr₂ (ι Q) f).bilin = (EvenHom.compr₂ (ι Q) g).bilin
x : CliffordAlgebra Q
hx : x ∈ even Q
⊢ ∀ (r : R),
    f
        { val := (algebraMap R (CliffordAlgebra ?m.109335)) r,
          property := (_ : (algebraMap R (CliffordAlgebra ?m.109335)) r ∈ evenOdd ?m.109335 0) } =
      g
        { val := (algebraMap R (CliffordAlgebra ?m.109335)) r,
          property := (_ : (algebraMap R (CliffordAlgebra ?m.109335)) r ∈ evenOdd ?m.109335 0) }

Next tactic:
intro r
/-- Two algebra morphisms from the even subalgebra are equal if they agree on pairs of generators.

See note [partially-applied ext lemmas]. -/
@[ext high]
theorem even.algHom_ext ⦃f g : even Q →ₐ[R] A⦄ (h : (even.ι Q).compr₂ f = (even.ι Q).compr₂ g) :
    f = g := by
  rw [EvenHom.ext_iff] at h
  ext ⟨x, hx⟩
  refine' even_induction _ _ _ _ _ hx
  · intro r
    

Proof state:
case H.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
f g : ↥(even Q) →ₐ[R] A
h : (EvenHom.compr₂ (ι Q) f).bilin = (EvenHom.compr₂ (ι Q) g).bilin
x : CliffordAlgebra Q
hx : x ∈ even Q
r : R
⊢ f
      { val := (algebraMap R (CliffordAlgebra ?m.109335)) r,
        property := (_ : (algebraMap R (CliffordAlgebra ?m.109335)) r ∈ evenOdd ?m.109335 0) } =
    g
      { val := (algebraMap R (CliffordAlgebra ?m.109335)) r,
        property := (_ : (algebraMap R (CliffordAlgebra ?m.109335)) r ∈ evenOdd ?m.109335 0) }

Next tactic:
exact (f.commutes r).trans (g.commutes r).symm
/-- Two algebra morphisms from the even subalgebra are equal if they agree on pairs of generators.

See note [partially-applied ext lemmas]. -/
@[ext high]
theorem even.algHom_ext ⦃f g : even Q →ₐ[R] A⦄ (h : (even.ι Q).compr₂ f = (even.ι Q).compr₂ g) :
    f = g := by
  rw [EvenHom.ext_iff] at h
  ext ⟨x, hx⟩
  refine' even_induction _ _ _ _ _ hx
  · intro r
    exact (f.commutes r).trans (g.commutes r).symm
  · 

Proof state:
case H.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
f g : ↥(even Q) →ₐ[R] A
h : (EvenHom.compr₂ (ι Q) f).bilin = (EvenHom.compr₂ (ι Q) g).bilin
x : CliffordAlgebra Q
hx : x ∈ even Q
⊢ ∀ {x y : CliffordAlgebra Q} {hx : x ∈ evenOdd Q 0} {hy : y ∈ evenOdd Q 0},
    f { val := x, property := hx } = g { val := x, property := hx } →
      f { val := y, property := hy } = g { val := y, property := hy } →
        f { val := x + y, property := (_ : x + y ∈ evenOdd Q 0) } =
          g { val := x + y, property := (_ : x + y ∈ evenOdd Q 0) }

Next tactic:
intro x y hx hy ihx ihy