Provedmachine-checked: its own exact check passesid std-algebra.ga-py-product, version 1
\texttt{GA.mul} is associative and unital with $e_i^{2} = Q(e_i)$, $e_i e_j = -e_j e_i$, so it is the product of $\Cl(p, q, r)$.
The computer checks in this store all rest on one small program that multiplies elements of the algebra. This result tests that program against the definition, so the checks built on it can be trusted to compute the right thing.
For every diagonal signature $(p, q, r)$, the bilinear product \texttt{GA.mul} on the $2^{n}$-dimensional space with basis the blade tuples, with \texttt{GA.sig(p, q, r)}, is associative with unit $()$, and its generators satisfy $e_i^{2} = Q(e_i)$ and $e_i e_j = -e_j e_i$ for $i \ne j$. Consequently the linear map sending the basis blade $e_I$ of $\Cl(p, q, r)$ to the tuple $I$ is an algebra isomorphism: every exact check that computes with \texttt{GA.mul} computes in $\Cl(p, q, r)$. The same holds for \texttt{GA.grade\_inv} and \texttt{GA.reverse} by The three involutions on each grade.
Write $e_I$ for the basis blade of $\Cl(p, q, r)$ on the increasing tuple $I$ (The blade basis, degenerate forms included). \texttt{GA.blade\_mul(I, J)} starts from the concatenated word $I J$ with coefficient $1$ and repeatedly applies one of two moves to an adjacent pair of indices: if $i > j$ it swaps them and negates the coefficient; if $i = j$ it deletes both and multiplies the coefficient by $Q(e_i)$, stopping with coefficient $0$ when that is $0$. Read the word with its coefficient as the element $c\, e_{k_1} \cdots e_{k_m}$ of $\Cl(p, q, r)$. Each move leaves that element unchanged: a swap of distinct orthogonal generators because $e_i e_j = -e_j e_i$ (Orthogonal vectors anticommute), a deletion because $e_i e_i = Q(e_i)$ (the defining relation of The Clifford algebra of a quadratic space). Every move lowers the number of inversions or the length, so the procedure stops, and it stops only at an increasing word without repeats, that is at $c\, e_K$. By induction on the number of moves, \texttt{blade\_mul(I, J)} returns $(c, K)$ with $e_I e_J = c\, e_K$ in $\Cl(p, q, r)$, for every $n$. \texttt{GA.mul} extends this bilinearly.
So the linear bijection from $\Cl(p, q, r)$ to the library's space of blade tuples sending $e_I$ to $I$ carries the Clifford product to \texttt{GA.mul}. It is an isomorphism of algebras, and in particular \texttt{GA.mul} is associative with unit $()$ and satisfies $e_i^{2} = Q(e_i)$ and $e_i e_j = -e_j e_i$ for $i \ne j$, because the Clifford product does. The check is an independent cross-check of the code: it runs associativity and the relations exhaustively on basis triples for $n \le 3$ and on sampled triples for $n = 4$. The universal property (The Clifford algebra exists and is unique) is what makes $\Cl(p, q, r)$, and so the blade basis used here, well defined.
none
check.py::check_product_associative_unital_and_relationsRun them on a clone of the repository: python -m tp check-one std-algebra.ga-py-product --store store
Leon Butler (direction); Claude Opus 5.5 (proposal and drafting).