free-group.scm 423 B

1234567891011121314
  1. (use-modules (trs examples))
  2. (use-modules (srfi srfi-64))
  3. (test-begin "free-group")
  4. (test-equal (free-group `(* (* (/ a) a) (* b (/ b))))
  5. '(e))
  6. (test-equal "free-group"
  7. ;; verify the axiom from
  8. ;; G. Higman and B. H. Neumann. Groups as groupoids with one law [1952]
  9. (let ((/ (lambda (a b) `(* ,a (/ ,b)))))
  10. (free-group (/ 'x (/ (/ (/ (/ 'x 'x) 'y) 'z) (/ (/ (/ 'x 'x) 'x) 'z)))))
  11. 'y)
  12. (test-end "free-group")