We attempt a naïve multiplicative inverse which works most of the time!
From our initial development of Clifford multiplication we copy the relationship of a Cn number being the product of two other Cn numbers.
Each of these three numbers is expressed in terms of two Cn−1 numbers.
(a + bγn)(c+ dγn) = (ac − bd*) + (ad + bc*)γn
We take a and b as given and attempt to solve for c and d taking the product to be 1. There must be componentwise equality which yields:
ac − bd* = 1
ad + bc* = 0
Proceeding as a first year algebra student eliminating unknowns but appealing to * as automorphism, using (a*)* = a, and being careful not to commute, we get:
bc* + ad = 0
a*c* − b*d = 1
a−1bc* + d = 0
a*c* + b*a−1bc* = 1
(a* + b*a−1b)c* = 1
(a + ba−1*b*)c = 1
c = (a + ba−1*b*)−1 = (a + b(a−1b)*)−1
d = −(a−1b)c*
Now these equations will invert most Clifford numbers but will fail for γn (a = 0, b = 1), (and certain other elements of V) which has a fine inverse, namely −γn.
0 has no inverse, no matter what rank we are at.
There being no automorphism m such that x m(x) is real (as in division algebras), we resort to contingently eliminating c first which requires inverting b instead of a.
If neither a nor b is invertible we report “no inverse” to our caller.
(Presumably there are Clifford numbers beside 0 that have no inverse and these would cause the 2nd inverse operation to fail. I have found none.
(PS: See some zero divisors.))
b−1bc* + b−1ad = 0
c* + b−1ad = 0
−a*b−1ad − b*d = 1
(a*b−1a + b*)d = −1
d = −(a*b−1a + b*)−1
c = − (b−1ad)*
Note that there is another inverse from the lower algebra that we must have. If that fails we have not solved the equations. Note, however, that when we do get a solution it is unique for by induction on the rank of the algebra, our construction is unique; We have assumed a solution and deduced what it must be.
We read off these last two equations to define the inductive clifford inverse:
(define (G f) (apply (lambda (/ tr bar alpha sg zer zer? one + - * rls basis) (list (lambda (x) (let* ((a (car x))(b (cdr x))(ai (/ a))) (if ai (let* ((aib (* ai b))(c (/ (+ a (* b (alpha aib))))) (d (- (* aib (alpha c))))) (cons c d)) (let ((bi (/ b))) (if bi (let* ((bia (* bi a))(d (- (/ (+ (* (alpha a) bia) (alpha b))))) (c (alpha (- (* bia d))))) (cons c d)) #f))))) (lambda (x) (cons (tr (car x)) (bar (cdr x)))) ; tr (lambda (x) (cons (bar (car x)) (- (tr (cdr x))))) ; bar (lambda (x) (cons (alpha (car x)) (- (alpha (cdr x))))) ; alpha (lambda () (cons (sg) (sg))) ; sg (cons zer zer) ; zer (lambda (a) (and (zer? (car a)) (zer? (cdr a)))) ; zer? (cons one zer) ; one (lambda (a b) (cons (+ (car a)(car b))(+ (cdr a)(cdr b)))) ; + (lambda (a) (cons (-(car a))(-(cdr a)))) ; - (negation) (lambda (a b) (cons (+ (* (car a)(car b))(-(* (cdr a)(alpha (cdr b))))) ; * (+ (* (car a)(cdr b))(* (cdr a)(alpha (car b)))))) (lambda (x)(cons (rls x) zer)) ; rls (cons (cons zer one) (map (lambda (x) (cons x zer)) basis)) ; basis )) f)); Use definitions for Do and grc4 for a pseudo random number generator.
(define rr (let ((ig (grc4 "vjoe"))) (lambda ()(/ (ig 1)(+ 1 (ig 1)))))); As in the division algebras we boot the process with the reals:
(define reals (let ((i (lambda (x) x))) (list (lambda (x) (if (zero? x) #f (/ x))) i i i rr 0 zero? 1 + - * i '()))); Now we build the 4th order Clifford algebra C4 thus:
(define P (G (G (G (G reals))))); and unpack the tools from the result p:
(define C/ (car P)) ; multiplicative inverse (define tr (cadr P)) ; transpose (define bar (caddr P)) ; conjugate (bar) (define Ha (cadddr P)) ; main involution (define p (cddddr P)) ; rest (define Cr (car p)) ; sample generator (define C0 (cadr p)) ; 0 (define C0? (caddr p)) ; 0 predicate (define q (cdddr p)) ; rest of tools (define C1 (car q)) ; multiplicative identity (define C+ (cadr q)) ; addition (define C- (lambda (x y) (C+ x ((caddr q) y)))) ; subtraction (define C* (cadddr q)) ; multiplication (define r (cddddr q)) ; rest of tools (define Hrls (car r)) ; returns Clifford number corresponding to real. (define basis (cadr r)) ; list of basis vectors of V as Clifford numbers. ; Define. (define (even a)(C* (Hrls 1/2)(C+ a (Ha a)))) ; even part of Clifford number (define (odd a)(C* (Hrls 1/2)(C- a (Ha a)))) ; odd part of Clifford number (define (rv) (let rv ((x basis)) (if (null? x) C0 (C+ (C* (Hrls (rr)) (car x)) (rv (cdr x)))))) ; a random vector generator (define g3 (car basis)) ; individual Clifford number basis elements for V in C. (define g2 (cadr basis)) (define g1 (caddr basis)) (define g0 (cadddr basis)) (let ((a (Cr)))(list (C* a (C/ a)) a)) (let ((a (rv))) (equal? (Ha a)(C- C0 a))) ; => #t (let ((a (Cr))(b (Cr))) (list (C0? (C- (C* (tr a)(tr b))(tr (C* b a)))) (C0? (C- (C+ (tr a)(tr b))(tr (C+ a b)))) (C0? (C- (C* (Ha a)(Ha b))(Ha (C* a b)))) (C0? (C- (C+ (Ha a)(Ha b))(Ha (C+ a b)))) (C0? (C- (C* (bar a)(bar b))(bar (C* b a)))) (C0? (C- (C+ (bar a)(bar b))(bar (C+ a b)))))) ; => (#t #t #t #t #t #t)The expression above corroborates that Ha is an automorphism and that tr and bar are antiautomorphisms (note the reversed (C* b a)).