Clojure: some work on simplification and Euclidity test