We produce computational Clifford algebras just as this produces the division algebras.
This may provide enough Scheme to read the program.
The nth order Clifford algebra, Cn, has 2n dimensions, like the nth member of the division algebras.
I remove the reciprocal operation—Clifford algebras have none such.
I see in the multiplication logic, a need for a mechanism to flip the signs of odd elements.
Hence forth let v* be such a “conjugate”.
Wikipedia writes this function α(x).
This is an automorphism.
Most Clifford literature calls this “involution” but that terminology conflicts with a correspondence this development has with the division algebras where the literature calls the similar function “conjugate”.
Alas qq* is not real however.
We represent a Clifford n-value as a pair of Clifford (n–1)-values.
A new γn is acknowledged and we are to multiply two n-values
where a, b, c and d are Clifford (n–1)-values:
(a + bγn)(c+ dγn)
= (ac + bγndγn) + (adγn + bγnc)
Note that γn does not occur in any of a, b, c or d.
Since it does not appear in c or d we have:
γnc = c*γn and
γnd = d*γn.
We continue our calculation:
(a + bγn)(c+ dγn)
= (ac – bd*) + (ad + bc*)γn
This is almost, but not quite the formula for multiplying division algebra values, in terms of the next simplest division algebra.
It may indeed be isomorphic.
The conjugate function it uses is critically different, however.
We thus define G which takes the mechanisms of a n–1 degree Clifford algebra, and returns the corresponding mechanisms of an n degree Clifford algebra:
(define (G f)
(apply (lambda (alpha sg zer zer? one + - *) (list
(lambda (x) (cons (alpha (car x)) (- zer (alpha (cdr x)))))
(lambda () (cons (sg) (sg)))
(cons zer zer)
(lambda (a) (and (zer? (car a)) (zer? (cdr a))))
(cons one zer)
(lambda (a b) (cons (+ (car a)(car b))(+ (cdr a)(cdr b))))
(lambda (a b) (cons (- (car a)(car b))(- (cdr a)(cdr b))))
(lambda (a b) (cons (- (* (car a)(car b))(* (cdr a)(alpha (cdr b))))
(+ (* (car a)(cdr b))(* (cdr a)(alpha (car b))))))
)) f))
; We need two auxiliary functions to generate test cases:
(define (rand31 seed) (lambda()(let* ((hi (quotient seed 127773))
(lo (- seed (* 127773 hi)))(test (- (* 16807 lo) (* 2836 hi))))
(set! seed (if (> test 0) test (+ test 2147483647))) seed)))
(define rr (let ((ig (rand31 24435))) (lambda ()(/ (ig)(ig)))))
; As in the division algebras we boot the process with the reals as C0, the 0 degree Clifford algebra:
(define reals (list (lambda (x) x) rr 0 zero? 1 + - *)); Now we build C3 thus:
(define C3 (G (G (G reals)))); and extract the mechanisms from the result C3:
(define alpha (car C3)) ; Flip sign of odd terms (define Cr (cadr C3)) ; Generate sample (define C0 (caddr C3)) ; 0 (Clifford number) (define C0? (cadddr C3)) ; 0 predicate (define Hrst (cddddr C3)) ; rest of tools (define C1 (car Hrst)) ; 1 (Clifford number) (define C+ (cadr Hrst)) ; add Clifford numbers (define C- (caddr Hrst)) ; subtract Clifford numbers (define C* (cadddr Hrst)) ; multiply Clifford numbers; and illustrate associativity, which octonions lack.
(define a (Cr)) (define b (Cr)) (define c (Cr)) (C- (C* a (C* b c)) (C* (C* a b) c)); Common axioms for Clifford algebras:
(C0? (C- (C+ a b)(C+ b a))) ;=> #t (C0? (C- (C+ a (C+ c b)) (C+ (C+ a b) c))) ;=> #t (C0? (C- (C* a (C* b c)) (C* (C* a b) c))) ;=> #t (C0? (C* C0 a)) ;=> #t (C0? (C- (C* a (C+ b c)) (C+ (C* a b) (C* a c)))) ;=> #t (C0? (C- (C* (C+ a b) c) (C+ (C* a c) (C* b c)))) ;=> #t; The code above restricts itself to fundamentals. Below we see that alpha is an automorphism.
(let ((a (Cr))(b (Cr))) (list (C- (alpha (C* a b))(C* (alpha a)(alpha b))) (C- (alpha (C+ a b))(C+ (alpha a)(alpha b)))))Next we add some tools with which to explore.