The areas / V08. Multilinear algebra and forms
Mathlib.LinearAlgebra.CliffordAlgebra.Fold
24 declarations. Mathlib docs · Source
Recursive computation rules for the Clifford algebra
This file provides API for a special case CliffordAlgebra.foldr of the universal property
CliffordAlgebra.lift with A = Module.End R N for some arbitrary module N. This specialization
resembles the list.foldr operation, allowing a bilinear map to be "folded" along the generators.
For convenience, this file also provides CliffordAlgebra.foldl, implemented via
CliffordAlgebra.reverse
Main definitions
CliffordAlgebra.foldr: a computation rule for building linear maps out of the clifford algebra starting on the right, analogous to usinglist.foldron the generators.CliffordAlgebra.foldl: a computation rule for building linear maps out of the clifford algebra starting on the left, analogous to usinglist.foldlon the generators.
Main statements
CliffordAlgebra.right_induction: an induction rule that adds generators from the right.CliffordAlgebra.left_induction: an induction rule that adds generators from the left.
Versions with extra state
theorem CliffordAlgebra.foldr.congr_simp E1 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f f_1 : M →ₗ[R] N →ₗ[R] N) (e_f : f = f_1)
(hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x), CliffordAlgebra.foldr Q f hf = CliffordAlgebra.foldr Q f_1 ⋯
def CliffordAlgebra.foldr E3 #
{R : Type u_1} →
{M : Type u_2} →
{N : Type u_3} →
[inst : CommRing R] →
[inst_1 : AddCommGroup M] →
[inst_2 : AddCommGroup N] →
[inst_3 : Module R M] →
[inst_4 : Module R N] →
(Q : QuadraticForm R M) →
(f : M →ₗ[R] N →ₗ[R] N) →
(∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x) → N →ₗ[R] CliffordAlgebra Q →ₗ[R] N
Fold a bilinear map along the generators of a term of the clifford algebra, with the rule
given by foldr Q f hf n (ι Q m * x) = f m (foldr Q f hf n x).
For example, foldr f hf n (r • ι R u + ι R v * ι R w) = r • f u n + f v (f w n).
theorem CliffordAlgebra.foldr_ι E0 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] N →ₗ[R] N)
(hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x) (n : N) (m : M),
((CliffordAlgebra.foldr Q f hf) n) ((CliffordAlgebra.ι Q) m) = (f m) n
theorem CliffordAlgebra.foldr_algebraMap E0 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] N →ₗ[R] N)
(hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x) (n : N) (r : R),
((CliffordAlgebra.foldr Q f hf) n) ((algebraMap R (CliffordAlgebra Q)) r) = r • n
theorem CliffordAlgebra.foldr_one E0 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] N →ₗ[R] N)
(hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x) (n : N), ((CliffordAlgebra.foldr Q f hf) n) 1 = n
theorem CliffordAlgebra.foldr_mul E0 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] N →ₗ[R] N)
(hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x) (n : N) (a b : CliffordAlgebra Q),
((CliffordAlgebra.foldr Q f hf) n) (a * b) = ((CliffordAlgebra.foldr Q f hf) (((CliffordAlgebra.foldr Q f hf) n) b)) a
theorem CliffordAlgebra.foldr_prod_map_ι E2 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (l : List M) (f : M →ₗ[R] N →ₗ[R] N)
(hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x) (n : N),
((CliffordAlgebra.foldr Q f hf) n) (List.map (⇑(CliffordAlgebra.ι Q)) l).prod = List.foldr (fun m n ↦ (f m) n) n l
This lemma demonstrates the origin of the foldr name.
def CliffordAlgebra.foldl E3 #
{R : Type u_1} →
{M : Type u_2} →
{N : Type u_3} →
[inst : CommRing R] →
[inst_1 : AddCommGroup M] →
[inst_2 : AddCommGroup N] →
[inst_3 : Module R M] →
[inst_4 : Module R N] →
(Q : QuadraticForm R M) →
(f : M →ₗ[R] N →ₗ[R] N) →
(∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x) → N →ₗ[R] CliffordAlgebra Q →ₗ[R] N
Fold a bilinear map along the generators of a term of the clifford algebra, with the rule
given by foldl Q f hf n (ι Q m * x) = f m (foldl Q f hf n x).
For example, foldl f hf n (r • ι R u + ι R v * ι R w) = r • f u n + f v (f w n).
theorem CliffordAlgebra.foldl_reverse E0 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] N →ₗ[R] N)
(hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x) (n : N) (x : CliffordAlgebra Q),
((CliffordAlgebra.foldl Q f hf) n) (CliffordAlgebra.reverse x) = ((CliffordAlgebra.foldr Q f hf) n) x
theorem CliffordAlgebra.foldr_reverse E0 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] N →ₗ[R] N)
(hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x) (n : N) (x : CliffordAlgebra Q),
((CliffordAlgebra.foldr Q f hf) n) (CliffordAlgebra.reverse x) = ((CliffordAlgebra.foldl Q f hf) n) x
theorem CliffordAlgebra.foldl_ι E0 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] N →ₗ[R] N)
(hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x) (n : N) (m : M),
((CliffordAlgebra.foldl Q f hf) n) ((CliffordAlgebra.ι Q) m) = (f m) n
theorem CliffordAlgebra.foldl_algebraMap E0 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] N →ₗ[R] N)
(hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x) (n : N) (r : R),
((CliffordAlgebra.foldl Q f hf) n) ((algebraMap R (CliffordAlgebra Q)) r) = r • n
theorem CliffordAlgebra.foldl_one E0 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] N →ₗ[R] N)
(hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x) (n : N), ((CliffordAlgebra.foldl Q f hf) n) 1 = n
theorem CliffordAlgebra.foldl_mul E0 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] N →ₗ[R] N)
(hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x) (n : N) (a b : CliffordAlgebra Q),
((CliffordAlgebra.foldl Q f hf) n) (a * b) = ((CliffordAlgebra.foldl Q f hf) (((CliffordAlgebra.foldl Q f hf) n) a)) b
theorem CliffordAlgebra.foldl_prod_map_ι E2 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (l : List M) (f : M →ₗ[R] N →ₗ[R] N)
(hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x) (n : N),
((CliffordAlgebra.foldl Q f hf) n) (List.map (⇑(CliffordAlgebra.ι Q)) l).prod = List.foldl (fun m n ↦ (f n) m) n l
This lemma demonstrates the origin of the foldl name.
theorem CliffordAlgebra.right_induction E3 #
∀ {R : Type u_1} {M : Type u_2} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : Module R M]
(Q : QuadraticForm R M) {P : CliffordAlgebra Q → Prop},
(∀ (r : R), P ((algebraMap R (CliffordAlgebra Q)) r)) →
(∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)) →
(∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * (CliffordAlgebra.ι Q) m)) → ∀ (x : CliffordAlgebra Q), P x
theorem CliffordAlgebra.left_induction E3 #
∀ {R : Type u_1} {M : Type u_2} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : Module R M]
(Q : QuadraticForm R M) {P : CliffordAlgebra Q → Prop},
(∀ (r : R), P ((algebraMap R (CliffordAlgebra Q)) r)) →
(∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)) →
(∀ (x : CliffordAlgebra Q) (m : M), P x → P ((CliffordAlgebra.ι Q) m * x)) → ∀ (x : CliffordAlgebra Q), P x
def CliffordAlgebra.foldr'Aux E0 #
{R : Type u_1} →
{M : Type u_2} →
{N : Type u_3} →
[inst : CommRing R] →
[inst_1 : AddCommGroup M] →
[inst_2 : AddCommGroup N] →
[inst_3 : Module R M] →
[inst_4 : Module R N] →
(Q : QuadraticForm R M) →
(M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N) → M →ₗ[R] Module.End R (CliffordAlgebra Q × N)
Auxiliary definition for CliffordAlgebra.foldr'
theorem CliffordAlgebra.foldr'Aux_apply_apply E0 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N)
(m : M) (x_fx : CliffordAlgebra Q × N),
((CliffordAlgebra.foldr'Aux Q f) m) x_fx = ((CliffordAlgebra.ι Q) m * x_fx.1, (f m) x_fx)
theorem CliffordAlgebra.foldr'Aux_foldr'Aux E0 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N),
(∀ (m : M) (x : CliffordAlgebra Q) (fx : N), (f m) ((CliffordAlgebra.ι Q) m * x, (f m) (x, fx)) = Q m • fx) →
∀ (v : M) (x_fx : CliffordAlgebra Q × N),
((CliffordAlgebra.foldr'Aux Q f) v) (((CliffordAlgebra.foldr'Aux Q f) v) x_fx) = Q v • x_fx
def CliffordAlgebra.foldr' E1 #
{R : Type u_1} →
{M : Type u_2} →
{N : Type u_3} →
[inst : CommRing R] →
[inst_1 : AddCommGroup M] →
[inst_2 : AddCommGroup N] →
[inst_3 : Module R M] →
[inst_4 : Module R N] →
(Q : QuadraticForm R M) →
(f : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N) →
(∀ (m : M) (x : CliffordAlgebra Q) (fx : N),
(f m) ((CliffordAlgebra.ι Q) m * x, (f m) (x, fx)) = Q m • fx) →
N → CliffordAlgebra Q →ₗ[R] N
Fold a bilinear map along the generators of a term of the clifford algebra, with the rule
given by foldr' Q f hf n (ι Q m * x) = f m (x, foldr' Q f hf n x).
Note this is like CliffordAlgebra.foldr, but with an extra x argument.
Implement the recursion scheme F[n0](m * x) = f(m, (x, F[n0](x))).
theorem CliffordAlgebra.foldr'_algebraMap E1 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N)
(hf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), (f m) ((CliffordAlgebra.ι Q) m * x, (f m) (x, fx)) = Q m • fx)
(n : N) (r : R), (CliffordAlgebra.foldr' Q f hf n) ((algebraMap R (CliffordAlgebra Q)) r) = r • n
theorem CliffordAlgebra.foldr'_ι E1 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N)
(hf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), (f m) ((CliffordAlgebra.ι Q) m * x, (f m) (x, fx)) = Q m • fx)
(n : N) (m : M), (CliffordAlgebra.foldr' Q f hf n) ((CliffordAlgebra.ι Q) m) = (f m) (1, n)
theorem CliffordAlgebra.foldr'_ι_mul E1 #
∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup M] [inst_2 : AddCommGroup N]
[inst_3 : Module R M] [inst_4 : Module R N] (Q : QuadraticForm R M) (f : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N)
(hf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), (f m) ((CliffordAlgebra.ι Q) m * x, (f m) (x, fx)) = Q m • fx)
(n : N) (m : M) (x : CliffordAlgebra Q),
(CliffordAlgebra.foldr' Q f hf n) ((CliffordAlgebra.ι Q) m * x) = (f m) (x, (CliffordAlgebra.foldr' Q f hf n) x)