# mathlibdocumentation

linear_algebra.clifford_algebra.fold

# Recursive computation rules for the Clifford algebra #

This file provides API for a special case clifford_algebra.foldr of the universal property clifford_algebra.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 clifford_algebra.foldl, implemented via clifford_algebra.reverse

## Main definitions #

• clifford_algebra.foldr: a computation rule for building linear maps out of the clifford algebra starting on the right, analogous to using list.foldr on the generators.
• clifford_algebra.foldl: a computation rule for building linear maps out of the clifford algebra starting on the left, analogous to using list.foldl on the generators.

## Main statements #

• clifford_algebra.right_induction: an induction rule that adds generators from the right.
• clifford_algebra.left_induction: an induction rule that adds generators from the left.
def clifford_algebra.foldr {R : Type u_1} {M : Type u_2} {N : Type u_3} [comm_ring R] [ M] [ N] (Q : M) (f : M →ₗ[R] N →ₗ[R] N) (hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m x) :

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).

Equations
@[simp]
theorem clifford_algebra.foldr_ι {R : Type u_1} {M : Type u_2} {N : Type u_3} [comm_ring R] [ M] [ N] (Q : M) (f : M →ₗ[R] N →ₗ[R] N) (hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m x) (n : N) (m : M) :
( hf) n) ( m) = (f m) n
@[simp]
theorem clifford_algebra.foldr_algebra_map {R : Type u_1} {M : Type u_2} {N : Type u_3} [comm_ring R] [ M] [ N] (Q : M) (f : M →ₗ[R] N →ₗ[R] N) (hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m x) (n : N) (r : R) :
( hf) n) ( (clifford_algebra Q)) r) = r n
@[simp]
theorem clifford_algebra.foldr_one {R : Type u_1} {M : Type u_2} {N : Type u_3} [comm_ring R] [ M] [ N] (Q : M) (f : M →ₗ[R] N →ₗ[R] N) (hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m x) (n : N) :
( hf) n) 1 = n
@[simp]
theorem clifford_algebra.foldr_mul {R : Type u_1} {M : Type u_2} {N : Type u_3} [comm_ring R] [ M] [ N] (Q : M) (f : M →ₗ[R] N →ₗ[R] N) (hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m x) (n : N) (a b : clifford_algebra Q) :
( hf) n) (a * b) = ( hf) (( hf) n) b)) a
theorem clifford_algebra.foldr_prod_map_ι {R : Type u_1} {M : Type u_2} {N : Type u_3} [comm_ring R] [ M] [ N] (Q : 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) :
( hf) n) l).prod = list.foldr (λ (m : M) (n : N), (f m) n) n l

This lemma demonstrates the origin of the foldr name.

def clifford_algebra.foldl {R : Type u_1} {M : Type u_2} {N : Type u_3} [comm_ring R] [ M] [ N] (Q : M) (f : M →ₗ[R] N →ₗ[R] N) (hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m x) :

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).

Equations
@[simp]
theorem clifford_algebra.foldl_reverse {R : Type u_1} {M : Type u_2} {N : Type u_3} [comm_ring R] [ M] [ N] (Q : M) (f : M →ₗ[R] N →ₗ[R] N) (hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m x) (n : N) (x : clifford_algebra Q) :
( hf) n) = ( hf) n) x
@[simp]
theorem clifford_algebra.foldr_reverse {R : Type u_1} {M : Type u_2} {N : Type u_3} [comm_ring R] [ M] [ N] (Q : M) (f : M →ₗ[R] N →ₗ[R] N) (hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m x) (n : N) (x : clifford_algebra Q) :
( hf) n) = ( hf) n) x
@[simp]
theorem clifford_algebra.foldl_ι {R : Type u_1} {M : Type u_2} {N : Type u_3} [comm_ring R] [ M] [ N] (Q : M) (f : M →ₗ[R] N →ₗ[R] N) (hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m x) (n : N) (m : M) :
( hf) n) ( m) = (f m) n
@[simp]
theorem clifford_algebra.foldl_algebra_map {R : Type u_1} {M : Type u_2} {N : Type u_3} [comm_ring R] [ M] [ N] (Q : M) (f : M →ₗ[R] N →ₗ[R] N) (hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m x) (n : N) (r : R) :
( hf) n) ( (clifford_algebra Q)) r) = r n
@[simp]
theorem clifford_algebra.foldl_one {R : Type u_1} {M : Type u_2} {N : Type u_3} [comm_ring R] [ M] [ N] (Q : M) (f : M →ₗ[R] N →ₗ[R] N) (hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m x) (n : N) :
( hf) n) 1 = n
@[simp]
theorem clifford_algebra.foldl_mul {R : Type u_1} {M : Type u_2} {N : Type u_3} [comm_ring R] [ M] [ N] (Q : M) (f : M →ₗ[R] N →ₗ[R] N) (hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m x) (n : N) (a b : clifford_algebra Q) :
( hf) n) (a * b) = ( hf) (( hf) n) a)) b
theorem clifford_algebra.foldl_prod_map_ι {R : Type u_1} {M : Type u_2} {N : Type u_3} [comm_ring R] [ M] [ N] (Q : 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) :
( hf) n) l).prod = list.foldl (λ (m : N) (n : M), (f n) m) n l

This lemma demonstrates the origin of the foldl name.

theorem clifford_algebra.right_induction {R : Type u_1} {M : Type u_2} [comm_ring R] [ M] (Q : M) {P : → Prop} (hr : ∀ (r : R), P ( (clifford_algebra Q)) r)) (h_add : ∀ (x y : , P xP yP (x + y)) (h_ι_mul : ∀ (m : M) (x : , P xP (x * m)) (x : clifford_algebra Q) :
P x
theorem clifford_algebra.left_induction {R : Type u_1} {M : Type u_2} [comm_ring R] [ M] (Q : M) {P : → Prop} (hr : ∀ (r : R), P ( (clifford_algebra Q)) r)) (h_add : ∀ (x y : , P xP yP (x + y)) (h_mul_ι : ∀ (x : (m : M), P xP ( m * x)) (x : clifford_algebra Q) :
P x