(let ((testAlg (lambda (name alg) (apply (lambda (sg conj zer zer? one + - * inv) (let* ((a (sg))(b (sg))(c (sg))(ai (inv a)) (ta (lambda (val prop) (string-append (if (zer? val) "" "dont ") prop)))) (list name (ta (- (+ a (+ b c))(+ (+ a b) c)) "+ associate") (ta (- (* (conj a) (conj b)) (conj (* b a))) "conjugate") (ta (- (* a (+ b c))(+ (* a b)(* a c))) "left distribute") (ta (- (* (+ a b) c)(+ (* a c)(* b c))) "right distribute") (ta (- (* (* b a) ai) b) "undo multiply") (ta (- one (* ai a)) "have * inverse") (ta (- (* a (* b c))(* (* a b) c)) "* associate") (ta (- (* a b)(* b a)) "* commute") (ta (- (* (* a a) b)(* a (* a b))) "left alternate") (ta (- (* (* a b) b)(* a (* b b))) "right alternate") (ta (- (* a (* ai b)) b) "solve") ))) alg)))) (ylppa (fileVal "DivisionAlgebra") (lambda (G reals dum) (let tst ((a reals)(names (list "reals" "complexes" "quaternions" "octonions" "sedenions" "32nions"))) (if (null? names) '() (cons (testAlg (car names) a) (tst (G a) (cdr names))))))))