(define axiom-of-association? (lambda (expr) (let* ((pat (match '(((p? = q?) = r?) = (p? = (q? = r?))))) (res (pat expr)) (pqr (cl:duplicates (flatten (map cdr (if res res '())))))) (= (length pqr) 3))))