File: Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean

full_name: CliffordAlgebra.contractLeftAux
code: /-- Auxiliary construction for `CliffordAlgebra.contractLeft` -/
@[simps!]
def contractLeftAux (d : Module.Dual R M) :
    M →ₗ[R] CliffordAlgebra Q × CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q 
goal: M →ₗ[R] CliffordAlgebra Q × CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q

full_name: CliffordAlgebra.contractLeftAux_apply_apply
code: /-- Auxiliary construction for `CliffordAlgebra.contractLeft` -/
@[simps!]
def contractLeftAux (d : Module.Dual R M) :
    M →ₗ[R] CliffordAlgebra Q × CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q 
goal: ∀ (a_1 : CliffordAlgebra Q × CliffordAlgebra Q),
  ((CliffordAlgebra.contractLeftAux Q d) a) a_1 = d a • a_1.1 - (CliffordAlgebra.ι Q) a * a_1.2

full_name: CliffordAlgebra.contractLeftAux_contractLeftAux
code: theorem contractLeftAux_contractLeftAux (v : M) (x : CliffordAlgebra Q) (fx : CliffordAlgebra Q) :
    contractLeftAux Q d v (ι Q v * x, contractLeftAux Q d v (x, fx)) = Q v • fx 
goal: ((CliffordAlgebra.contractLeftAux Q d) v)
    ((CliffordAlgebra.ι Q) v * x, ((CliffordAlgebra.contractLeftAux Q d) v) (x, fx)) =
  Q v • fx

full_name: CliffordAlgebra.contractLeft
code: /-- Contract an element of the clifford algebra with an element `d : Module.Dual R M` from the left.

Note that $v ⌋ x$ is spelt `contractLeft (Q.associated v) x`.

This includes [grinberg_clifford_2016][] Theorem 10.75 -/
def contractLeft : Module.Dual R M →ₗ[R] CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q 
goal: Module.Dual R M →ₗ[R] CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q

full_name: CliffordAlgebra.contractRight
code: /-- Contract an element of the clifford algebra with an element `d : Module.Dual R M` from the
right.

Note that $x ⌊ v$ is spelt `contractRight x (Q.associated v)`.

This includes [grinberg_clifford_2016][] Theorem 16.75 -/
def contractRight : CliffordAlgebra Q →ₗ[R] Module.Dual R M →ₗ[R] CliffordAlgebra Q 
goal: CliffordAlgebra Q →ₗ[R] Module.Dual R M →ₗ[R] CliffordAlgebra Q

full_name: CliffordAlgebra.contractRight_eq
code: theorem contractRight_eq (x : CliffordAlgebra Q) :
    contractRight (Q := Q) x d = reverse (contractLeft (R := R) (M := M) d <| reverse x) 
goal: (CliffordAlgebra.contractRight x) d =
  CliffordAlgebra.reverse ((CliffordAlgebra.contractLeft d) (CliffordAlgebra.reverse x))

full_name: CliffordAlgebra.«_aux_Mathlib_LinearAlgebra_CliffordAlgebra_Contraction___macroRules_CliffordAlgebra_term_⌋__1»
code: local infixl:70 "⌋" => contractLeft (R := R) (M := M)
goal: Lean.Macro

full_name: CliffordAlgebra.«_aux_Mathlib_LinearAlgebra_CliffordAlgebra_Contraction___macroRules_CliffordAlgebra_term_⌊__1»
code: local infixl:70 "⌊" => contractRight (R := R) (M := M) (Q := Q)
goal: Lean.Macro

full_name: CliffordAlgebra.instSMul
code: instance : SMul R (CliffordAlgebra Q) 
goal: SMul R (CliffordAlgebra Q)

full_name: CliffordAlgebra.contractLeft_ι_mul
code: /-- This is [grinberg_clifford_2016][] Theorem 6  -/
theorem contractLeft_ι_mul (a : M) (b : CliffordAlgebra Q) :
    d⌋(ι Q a * b) = d a • b - ι Q a * (d⌋b) 
goal: (CliffordAlgebra.contractLeft d) ((CliffordAlgebra.ι Q) a * b) =
  d a • b - (CliffordAlgebra.ι Q) a * (CliffordAlgebra.contractLeft d) b

full_name: CliffordAlgebra.contractRight_mul_ι
code: /-- This is [grinberg_clifford_2016][] Theorem 12  -/
theorem contractRight_mul_ι (a : M) (b : CliffordAlgebra Q) :
    b * ι Q a⌊d = d a • b - b⌊d * ι Q a 
goal: (CliffordAlgebra.contractRight (b * (CliffordAlgebra.ι Q) a)) d =
  d a • b - (CliffordAlgebra.contractRight b) d * (CliffordAlgebra.ι Q) a

full_name: CliffordAlgebra.contractLeft_algebraMap_mul
code: theorem contractLeft_algebraMap_mul (r : R) (b : CliffordAlgebra Q) :
    d⌋(algebraMap _ _ r * b) = algebraMap _ _ r * (d⌋b) 
goal: (CliffordAlgebra.contractLeft d) ((algebraMap R (CliffordAlgebra Q)) r * b) =
  (algebraMap R (CliffordAlgebra Q)) r * (CliffordAlgebra.contractLeft d) b

full_name: CliffordAlgebra.contractLeft_mul_algebraMap
code: theorem contractLeft_mul_algebraMap (a : CliffordAlgebra Q) (r : R) :
    d⌋(a * algebraMap _ _ r) = d⌋a * algebraMap _ _ r 
goal: (CliffordAlgebra.contractLeft d) (a * (algebraMap R (CliffordAlgebra Q)) r) =
  (CliffordAlgebra.contractLeft d) a * (algebraMap R (CliffordAlgebra Q)) r

full_name: CliffordAlgebra.contractRight_algebraMap_mul
code: theorem contractRight_algebraMap_mul (r : R) (b : CliffordAlgebra Q) :
    algebraMap _ _ r * b⌊d = algebraMap _ _ r * (b⌊d) 
goal: (CliffordAlgebra.contractRight ((algebraMap R (CliffordAlgebra Q)) r * b)) d =
  (algebraMap R (CliffordAlgebra Q)) r * (CliffordAlgebra.contractRight b) d

full_name: CliffordAlgebra.contractRight_mul_algebraMap
code: theorem contractRight_mul_algebraMap (a : CliffordAlgebra Q) (r : R) :
    a * algebraMap _ _ r⌊d = a⌊d * algebraMap _ _ r 
goal: (CliffordAlgebra.contractRight (a * (algebraMap R (CliffordAlgebra Q)) r)) d =
  (CliffordAlgebra.contractRight a) d * (algebraMap R (CliffordAlgebra Q)) r

full_name: CliffordAlgebra.contractLeft_ι
code: @[simp]
theorem contractLeft_ι (x : M) : d⌋ι Q x = algebraMap R _ (d x) 
goal: (CliffordAlgebra.contractLeft d) ((CliffordAlgebra.ι Q) x) = (algebraMap R (CliffordAlgebra Q)) (d x)

full_name: CliffordAlgebra.contractRight_ι
code: @[simp]
theorem contractRight_ι (x : M) : ι Q x⌊d = algebraMap R _ (d x) 
goal: (CliffordAlgebra.contractRight ((CliffordAlgebra.ι Q) x)) d = (algebraMap R (CliffordAlgebra Q)) (d x)

full_name: CliffordAlgebra.contractLeft_algebraMap
code: @[simp]
theorem contractLeft_algebraMap (r : R) : d⌋algebraMap R (CliffordAlgebra Q) r = 0 
goal: (CliffordAlgebra.contractLeft d) ((algebraMap R (CliffordAlgebra Q)) r) = 0

full_name: CliffordAlgebra.contractRight_algebraMap
code: @[simp]
theorem contractRight_algebraMap (r : R) : algebraMap R (CliffordAlgebra Q) r⌊d = 0 
goal: (CliffordAlgebra.contractRight ((algebraMap R (CliffordAlgebra Q)) r)) d = 0

full_name: CliffordAlgebra.contractLeft_one
code: @[simp]
theorem contractLeft_one : d⌋(1 : CliffordAlgebra Q) = 0 
goal: (CliffordAlgebra.contractLeft d) 1 = 0

full_name: CliffordAlgebra.contractRight_one
code: @[simp]
theorem contractRight_one : (1 : CliffordAlgebra Q)⌊d = 0 
goal: (CliffordAlgebra.contractRight 1) d = 0

full_name: CliffordAlgebra.contractLeft_contractLeft
code: /-- This is [grinberg_clifford_2016][] Theorem 7 -/
theorem contractLeft_contractLeft (x : CliffordAlgebra Q) : d⌋(d⌋x) = 0 
goal: (CliffordAlgebra.contractLeft d) ((CliffordAlgebra.contractLeft d) x) = 0

full_name: CliffordAlgebra.contractRight_contractRight
code: /-- This is [grinberg_clifford_2016][] Theorem 13 -/
theorem contractRight_contractRight (x : CliffordAlgebra Q) : x⌊d⌊d = 0 
goal: (CliffordAlgebra.contractRight ((CliffordAlgebra.contractRight x) d)) d = 0

full_name: CliffordAlgebra.contractLeft_comm
code: /-- This is [grinberg_clifford_2016][] Theorem 8 -/
theorem contractLeft_comm (x : CliffordAlgebra Q) : d⌋(d'⌋x) = -(d'⌋(d⌋x)) 
goal: (CliffordAlgebra.contractLeft d) ((CliffordAlgebra.contractLeft d') x) =
  -(CliffordAlgebra.contractLeft d') ((CliffordAlgebra.contractLeft d) x)

full_name: CliffordAlgebra.contractRight_comm
code: /-- This is [grinberg_clifford_2016][] Theorem 14 -/
theorem contractRight_comm (x : CliffordAlgebra Q) : x⌊d⌊d' = -(x⌊d'⌊d) 
goal: (CliffordAlgebra.contractRight ((CliffordAlgebra.contractRight x) d)) d' =
  -(CliffordAlgebra.contractRight ((CliffordAlgebra.contractRight x) d')) d

full_name: CliffordAlgebra.«_aux_Mathlib_LinearAlgebra_CliffordAlgebra_Contraction___macroRules_CliffordAlgebra_term_⌋__2»
code: local infixl:70 "⌋" => contractLeft
goal: Lean.Macro

full_name: CliffordAlgebra._aux_Mathlib_LinearAlgebra_CliffordAlgebra_Contraction___unexpand_CliffordAlgebra_contractLeft_1
code: local infixl:70 "⌋" => contractLeft
goal: Lean.PrettyPrinter.Unexpander

full_name: CliffordAlgebra._aux_Mathlib_LinearAlgebra_CliffordAlgebra_Contraction___unexpand_CliffordAlgebra_contractRight_1
code: local infixl:70 "⌊" => contractRight
goal: Lean.PrettyPrinter.Unexpander

full_name: CliffordAlgebra.«_aux_Mathlib_LinearAlgebra_CliffordAlgebra_Contraction___macroRules_CliffordAlgebra_term_⌊__2»
code: local infixl:70 "⌊" => contractRight
goal: Lean.Macro

full_name: CliffordAlgebra.changeFormAux_apply_apply
code: /-- Auxiliary construction for `CliffordAlgebra.changeForm` -/
@[simps!]
def changeFormAux (B : BilinForm R M) : M →ₗ[R] CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q 
goal: ∀ (a_1 : CliffordAlgebra Q),
  ((CliffordAlgebra.changeFormAux Q B) a) a_1 = (CliffordAlgebra.ι Q) a * a_1 - (CliffordAlgebra.contractLeft (B a)) a_1

full_name: CliffordAlgebra.changeFormAux
code: /-- Auxiliary construction for `CliffordAlgebra.changeForm` -/
@[simps!]
def changeFormAux (B : BilinForm R M) : M →ₗ[R] CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q 
goal: M →ₗ[R] CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q

full_name: CliffordAlgebra.changeFormAux_changeFormAux
code: theorem changeFormAux_changeFormAux (B : BilinForm R M) (v : M) (x : CliffordAlgebra Q) :
    changeFormAux Q B v (changeFormAux Q B v x) = (Q v - B v v) • x 
goal: ((CliffordAlgebra.changeFormAux Q B) v) (((CliffordAlgebra.changeFormAux Q B) v) x) = (Q v - (B v) v) • x

full_name: CliffordAlgebra.changeForm
code: /-- Convert between two algebras of different quadratic form, sending vector to vectors, scalars to
scalars, and adjusting products by a contraction term.

This is $\lambda_B$ from [bourbaki2007][] $9 Lemma 2. -/
def changeForm (h : B.toQuadraticMap = Q' - Q) : CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q' 
goal: CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q'

full_name: CliffordAlgebra.changeForm.zero_proof
code: /-- Auxiliary lemma used as an argument to `CliffordAlgebra.changeForm` -/
theorem changeForm.zero_proof : (0 : BilinForm R M).toQuadraticMap = Q - Q 
goal: LinearMap.BilinMap.toQuadraticMap 0 = Q - Q

full_name: CliffordAlgebra.changeForm.add_proof
code: /-- Auxiliary lemma used as an argument to `CliffordAlgebra.changeForm` -/
theorem changeForm.add_proof : (B + B').toQuadraticMap = Q'' - Q 
goal: LinearMap.BilinMap.toQuadraticMap (B + B') = Q'' - Q

full_name: CliffordAlgebra.changeForm.neg_proof
code: /-- Auxiliary lemma used as an argument to `CliffordAlgebra.changeForm` -/
theorem changeForm.neg_proof : (-B).toQuadraticMap = Q - Q' 
goal: LinearMap.BilinMap.toQuadraticMap (-B) = Q - Q'

full_name: CliffordAlgebra.changeForm.associated_neg_proof
code: theorem changeForm.associated_neg_proof [Invertible (2 : R)] :
    (QuadraticMap.associated (R := R) (M := M) (-Q)).toQuadraticMap = 0 - Q 
goal: (QuadraticMap.associated (-Q)).toQuadraticMap = 0 - Q

full_name: CliffordAlgebra.changeForm_algebraMap
code: @[simp]
theorem changeForm_algebraMap (r : R) : changeForm h (algebraMap R _ r) = algebraMap R _ r 
goal: (CliffordAlgebra.changeForm h) ((algebraMap R (CliffordAlgebra Q)) r) = (algebraMap R (CliffordAlgebra Q')) r

full_name: CliffordAlgebra.changeForm_one
code: @[simp]
theorem changeForm_one : changeForm h (1 : CliffordAlgebra Q) = 1 
goal: (CliffordAlgebra.changeForm h) 1 = 1

full_name: CliffordAlgebra.changeForm_ι
code: @[simp]
theorem changeForm_ι (m : M) : changeForm h (ι (M := M) Q m) = ι (M := M) Q' m 
goal: (CliffordAlgebra.changeForm h) ((CliffordAlgebra.ι Q) m) = (CliffordAlgebra.ι Q') m

full_name: CliffordAlgebra.changeForm_ι_mul
code: theorem changeForm_ι_mul (m : M) (x : CliffordAlgebra Q) :
    changeForm h (ι (M := M) Q m * x) = ι (M := M) Q' m * changeForm h x
    - contractLeft (Q := Q') (B m) (changeForm h x) 
goal: (CliffordAlgebra.changeForm h) ((CliffordAlgebra.ι Q) m * x) =
  (CliffordAlgebra.ι Q') m * (CliffordAlgebra.changeForm h) x -
    (CliffordAlgebra.contractLeft (B m)) ((CliffordAlgebra.changeForm h) x)

full_name: CliffordAlgebra.changeForm_ι_mul_ι
code: theorem changeForm_ι_mul_ι (m₁ m₂ : M) :
    changeForm h (ι Q m₁ * ι Q m₂) = ι Q' m₁ * ι Q' m₂ - algebraMap _ _ (B m₁ m₂) 
goal: (CliffordAlgebra.changeForm h) ((CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂) =
  (CliffordAlgebra.ι Q') m₁ * (CliffordAlgebra.ι Q') m₂ - (algebraMap R (CliffordAlgebra Q')) ((B m₁) m₂)

full_name: CliffordAlgebra.changeForm_contractLeft
code: /-- Theorem 23 of [grinberg_clifford_2016][] -/
theorem changeForm_contractLeft (d : Module.Dual R M) (x : CliffordAlgebra Q) :
    -- Porting note: original statement
    --    changeForm h (d⌋x) = d⌋changeForm h x := by
    changeForm h (contractLeft (Q := Q) d x) = contractLeft (Q := Q') d (changeForm h x) 
goal: (CliffordAlgebra.changeForm h) ((CliffordAlgebra.contractLeft d) x) =
  (CliffordAlgebra.contractLeft d) ((CliffordAlgebra.changeForm h) x)

full_name: CliffordAlgebra.changeForm_self_apply
code: theorem changeForm_self_apply (x : CliffordAlgebra Q) : changeForm (Q' := Q)
    changeForm.zero_proof x = x 
goal: (CliffordAlgebra.changeForm ⋯) x = x

full_name: CliffordAlgebra.changeForm_self
code: @[simp]
theorem changeForm_self :
    changeForm changeForm.zero_proof = (LinearMap.id : CliffordAlgebra Q →ₗ[R] _) 
goal: CliffordAlgebra.changeForm ⋯ = LinearMap.id

full_name: CliffordAlgebra.changeForm_changeForm
code: /-- This is [bourbaki2007][] $9 Lemma 3. -/
theorem changeForm_changeForm (x : CliffordAlgebra Q) :
    changeForm h' (changeForm h x) = changeForm (changeForm.add_proof h h') x 
goal: (CliffordAlgebra.changeForm h') ((CliffordAlgebra.changeForm h) x) = (CliffordAlgebra.changeForm ⋯) x

full_name: CliffordAlgebra.changeForm_comp_changeForm
code: theorem changeForm_comp_changeForm :
    (changeForm h').comp (changeForm h) = changeForm (changeForm.add_proof h h') 
goal: CliffordAlgebra.changeForm h' ∘ₗ CliffordAlgebra.changeForm h = CliffordAlgebra.changeForm ⋯

full_name: CliffordAlgebra.changeFormEquiv_apply
code: /-- Any two algebras whose quadratic forms differ by a bilinear form are isomorphic as modules.

This is $\bar \lambda_B$ from [bourbaki2007][] $9 Proposition 3. -/
@[simps apply]
def changeFormEquiv : CliffordAlgebra Q ≃ₗ[R] CliffordAlgebra Q' 
goal: (CliffordAlgebra.changeFormEquiv h) a = (CliffordAlgebra.changeForm h) a

full_name: CliffordAlgebra.changeFormEquiv
code: /-- Any two algebras whose quadratic forms differ by a bilinear form are isomorphic as modules.

This is $\bar \lambda_B$ from [bourbaki2007][] $9 Proposition 3. -/
@[simps apply]
def changeFormEquiv : CliffordAlgebra Q ≃ₗ[R] CliffordAlgebra Q' 
goal: CliffordAlgebra Q ≃ₗ[R] CliffordAlgebra Q'

full_name: CliffordAlgebra.changeFormEquiv_symm
code: @[simp]
theorem changeFormEquiv_symm :
    (changeFormEquiv h).symm = changeFormEquiv (changeForm.neg_proof h) 
goal: (CliffordAlgebra.changeFormEquiv h).symm = CliffordAlgebra.changeFormEquiv ⋯

full_name: CliffordAlgebra.equivExterior
code: /-- The module isomorphism to the exterior algebra.

Note that this holds more generally when `Q` is divisible by two, rather than only when `1` is
divisible by two; but that would be more awkward to use. -/
@[simp]
def equivExterior [Invertible (2 : R)] : CliffordAlgebra Q ≃ₗ[R] ExteriorAlgebra R M 
goal: CliffordAlgebra Q ≃ₗ[R] ExteriorAlgebra R M

full_name: CliffordAlgebra.instNontrivialOfInvertibleOfNat
code: /-- A `CliffordAlgebra` over a nontrivial ring is nontrivial, in characteristic not two. -/
instance [Nontrivial R] [Invertible (2 : R)] :
    Nontrivial (CliffordAlgebra Q) 
goal: Nontrivial (CliffordAlgebra Q)