File: Mathlib/LinearAlgebra/CliffordAlgebra/Even.lean

full_name: CliffordAlgebra.even
code: /-- The even submodule `CliffordAlgebra.evenOdd Q 0` is also a subalgebra. -/
def even : Subalgebra R (CliffordAlgebra Q) 
goal: Subalgebra R (CliffordAlgebra Q)

full_name: CliffordAlgebra.instAddCommMonoidSubtypeMemSubalgebraEven
code: instance : AddCommMonoid (even Q) 
goal: AddCommMonoid ↥(CliffordAlgebra.even Q)

full_name: CliffordAlgebra.even_toSubmodule
code: @[simp]
theorem even_toSubmodule : Subalgebra.toSubmodule (even Q) = evenOdd Q 0 
goal: Subalgebra.toSubmodule (CliffordAlgebra.even Q) = CliffordAlgebra.evenOdd Q 0

full_name: CliffordAlgebra.EvenHom.contract
code: /-- The type of bilinear maps which are accepted by `CliffordAlgebra.even.lift`. -/
@[ext]
structure EvenHom : Type max uA uM where
  bilin : M →ₗ[R] M →ₗ[R] A
  contract (m : M) : bilin m m = algebraMap R A (Q m)
  contract_mid (m₁ m₂ m₃ : M) : bilin m₁ m₂ * bilin m₂ m₃ = Q m₂ • bilin m₁ m₃
goal: (self.bilin m) m = (algebraMap R A) (Q m)

full_name: CliffordAlgebra.EvenHom.contract_mid
code: /-- The type of bilinear maps which are accepted by `CliffordAlgebra.even.lift`. -/
@[ext]
structure EvenHom : Type max uA uM where
  bilin : M →ₗ[R] M →ₗ[R] A
  contract (m : M) : bilin m m = algebraMap R A (Q m)
  contract_mid (m₁ m₂ m₃ : M) : bilin m₁ m₂ * bilin m₂ m₃ = Q m₂ • bilin m₁ m₃
goal: (self.bilin m₁) m₂ * (self.bilin m₂) m₃ = Q m₂ • (self.bilin m₁) m₃

full_name: CliffordAlgebra.EvenHom.bilin
code: /-- The type of bilinear maps which are accepted by `CliffordAlgebra.even.lift`. -/
@[ext]
structure EvenHom : Type max uA uM where
  bilin : M →ₗ[R] M →ₗ[R] A
  contract (m : M) : bilin m m = algebraMap R A (Q m)
  contract_mid (m₁ m₂ m₃ : M) : bilin m₁ m₂ * bilin m₂ m₃ = Q m₂ • bilin m₁ m₃
goal: M →ₗ[R] M →ₗ[R] A

full_name: CliffordAlgebra.EvenHom
code: /-- The type of bilinear maps which are accepted by `CliffordAlgebra.even.lift`. -/
@[ext]
structure EvenHom : Type max uA uM where
  bilin : M →ₗ[R] M →ₗ[R] A
  contract (m : M) : bilin m m = algebraMap R A (Q m)
  contract_mid (m₁ m₂ m₃ : M) : bilin m₁ m₂ * bilin m₂ m₃ = Q m₂ • bilin m₁ m₃
goal: Type (max uA uM)

full_name: CliffordAlgebra.EvenHom.compr₂
code: /-- Compose an `EvenHom` with an `AlgHom` on the output. -/
@[simps]
def EvenHom.compr₂ (g : EvenHom Q A) (f : A →ₐ[R] B) : EvenHom Q B 
goal: CliffordAlgebra.EvenHom Q B

full_name: CliffordAlgebra.EvenHom.compr₂_bilin
code: /-- Compose an `EvenHom` with an `AlgHom` on the output. -/
@[simps]
def EvenHom.compr₂ (g : EvenHom Q A) (f : A →ₐ[R] B) : EvenHom Q B 
goal: (g.compr₂ f).bilin = g.bilin.compr₂ f.toLinearMap

full_name: CliffordAlgebra.even.ι
code: /-- The embedding of pairs of vectors into the even subalgebra, as a bilinear map. -/
nonrec def even.ι : EvenHom Q (even Q) 
goal: CliffordAlgebra.EvenHom Q ↥(CliffordAlgebra.even Q)

full_name: CliffordAlgebra.instInhabitedEvenHomSubtypeMemSubalgebraEven
code: instance : Inhabited (EvenHom Q (even Q)) 
goal: Inhabited (CliffordAlgebra.EvenHom Q ↥(CliffordAlgebra.even Q))

full_name: CliffordAlgebra.even.algHom_ext
code: /-- 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 
goal: f = g

full_name: _private.Mathlib.LinearAlgebra.CliffordAlgebra.Even.0.CliffordAlgebra.even.lift.S
code: /-- An auxiliary submodule used to store the half-applied values of `f`.
This is the span of elements `f'` such that `∃ x m₂, ∀ m₁, f' m₁ = f m₁ m₂ * x`.  -/
private def S : Submodule R (M →ₗ[R] A) 
goal: Submodule R (M →ₗ[R] A)

full_name: _private.Mathlib.LinearAlgebra.CliffordAlgebra.Even.0.CliffordAlgebra.even.lift.fFold
code: /-- An auxiliary bilinear map that is later passed into `CliffordAlgebra.foldr`. Our desired result
is stored in the `A` part of the accumulator, while auxiliary recursion state is stored in the `S f`
part. -/
private def fFold : M →ₗ[R] A × S f →ₗ[R] A × S f 
goal: M →ₗ[R] A × ↥(CliffordAlgebra.even.lift.S f) →ₗ[R] A × ↥(CliffordAlgebra.even.lift.S f)

full_name: _private.Mathlib.LinearAlgebra.CliffordAlgebra.Even.0.CliffordAlgebra.even.lift.fst_fFold_fFold
code: @[simp]
private theorem fst_fFold_fFold (m₁ m₂ : M) (x : A × S f) :
    (fFold f m₁ (fFold f m₂ x)).fst = f.bilin m₁ m₂ * x.fst 
goal: (((CliffordAlgebra.even.lift.fFold f) m₁) (((CliffordAlgebra.even.lift.fFold f) m₂) x)).1 = (f.bilin m₁) m₂ * x.1

full_name: _private.Mathlib.LinearAlgebra.CliffordAlgebra.Even.0.CliffordAlgebra.even.lift.snd_fFold_fFold
code: @[simp]
private theorem snd_fFold_fFold (m₁ m₂ m₃ : M) (x : A × S f) :
    ((fFold f m₁ (fFold f m₂ x)).snd : M →ₗ[R] A) m₃ = f.bilin m₃ m₁ * (x.snd : M →ₗ[R] A) m₂ 
goal: ↑(((CliffordAlgebra.even.lift.fFold f) m₁) (((CliffordAlgebra.even.lift.fFold f) m₂) x)).2 m₃ =
  (f.bilin m₃) m₁ * ↑x.2 m₂

full_name: _private.Mathlib.LinearAlgebra.CliffordAlgebra.Even.0.CliffordAlgebra.even.lift.fFold_fFold
code: private theorem fFold_fFold (m : M) (x : A × S f) : fFold f m (fFold f m x) = Q m • x 
goal: ((CliffordAlgebra.even.lift.fFold f) m) (((CliffordAlgebra.even.lift.fFold f) m) x) = Q m • x

full_name: CliffordAlgebra.even.lift.aux
code: /-- 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 
goal: ↥(CliffordAlgebra.even Q) →ₗ[R] A

full_name: CliffordAlgebra.even.lift.aux_apply
code: /-- 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 
goal: ∀ (a : ↥(CliffordAlgebra.even Q)),
  (CliffordAlgebra.even.lift.aux f) a = (((CliffordAlgebra.foldr Q (CliffordAlgebra.even.lift.fFold f) ⋯) (1, 0)) ↑a).1

full_name: CliffordAlgebra.even.lift.aux_one
code: @[simp, nolint simpNF] -- Added `nolint simpNF` to avoid a timeout #8386
theorem aux_one : aux f 1 = 1 
goal: (CliffordAlgebra.even.lift.aux f) 1 = 1

full_name: CliffordAlgebra.even.lift.aux_ι
code: @[simp, nolint simpNF] -- Added `nolint simpNF` to avoid a timeout #8386
theorem aux_ι (m₁ m₂ : M) : aux f ((even.ι Q).bilin m₁ m₂) = f.bilin m₁ m₂ 
goal: (CliffordAlgebra.even.lift.aux f) (((CliffordAlgebra.even.ι Q).bilin m₁) m₂) = (f.bilin m₁) m₂

full_name: CliffordAlgebra.even.lift.aux_algebraMap
code: @[simp, nolint simpNF] -- Added `nolint simpNF` to avoid a timeout #8386
theorem aux_algebraMap (r) (hr) : aux f ⟨algebraMap R _ r, hr⟩ = algebraMap R _ r 
goal: (CliffordAlgebra.even.lift.aux f) ⟨(algebraMap R (CliffordAlgebra Q)) r, hr⟩ = (algebraMap R A) r

full_name: CliffordAlgebra.even.lift.aux_mul
code: @[simp, nolint simpNF] -- Added `nolint simpNF` to avoid a timeout #8386
theorem aux_mul (x y : even Q) : aux f (x * y) = aux f x * aux f y 
goal: (CliffordAlgebra.even.lift.aux f) (x * y) = (CliffordAlgebra.even.lift.aux f) x * (CliffordAlgebra.even.lift.aux f) y

full_name: CliffordAlgebra.even.lift
code: /-- Every algebra morphism from the even subalgebra is in one-to-one correspondence with a
bilinear map that sends duplicate arguments to the quadratic form, and contracts across
multiplication. -/
@[simps! symm_apply_bilin]
def even.lift : EvenHom Q A ≃ (CliffordAlgebra.even Q →ₐ[R] A) 
goal: CliffordAlgebra.EvenHom Q A ≃ (↥(CliffordAlgebra.even Q) →ₐ[R] A)

full_name: CliffordAlgebra.even.lift_symm_apply_bilin
code: /-- Every algebra morphism from the even subalgebra is in one-to-one correspondence with a
bilinear map that sends duplicate arguments to the quadratic form, and contracts across
multiplication. -/
@[simps! symm_apply_bilin]
def even.lift : EvenHom Q A ≃ (CliffordAlgebra.even Q →ₐ[R] A) 
goal: ((CliffordAlgebra.even.lift Q).symm F).bilin = (CliffordAlgebra.even.ι Q).bilin.compr₂ F.toLinearMap

full_name: CliffordAlgebra.even.lift_ι
code: theorem even.lift_ι (f : EvenHom Q A) (m₁ m₂ : M) :
    even.lift Q f ((even.ι Q).bilin m₁ m₂) = f.bilin m₁ m₂ 
goal: ((CliffordAlgebra.even.lift Q) f) (((CliffordAlgebra.even.ι Q).bilin m₁) m₂) = (f.bilin m₁) m₂