 ;;;; Not for distribution.
 
 (ns algebolic.expression.algebra
-  "This namespace implements some basic computer algebra operations on algebolic expressions."
+  "This namespace implements some basic computer algebra operations on algebolic expressions. And by 'basic'
+  I really mean basic. The functions here make no attempt at being a complete computer algebra system, but
+  rather offer a few useful transformations that can be used both in the EA, and also by hand for
+  understanding expressions."
   (:require [algebolic.expression.core :as expression]
             [clojure.core.match :as match]
             [clojure.walk :as walk]

               [[:plus a [:plus b c]]] [:plus [:plus a b] c]
               [[:minus a [:minus b c]]] [:minus [:minus a b] c]
               [[:times a [:times b c]]] [:times [:times a b] c]
               ;; times to the right
               ;;[[:times [:times a b] c]] [:times a [:times b c]]
               ;;[[:plus [:plus a b] c]] [:plus a [:plus b c]]
               ;; always move numbers to the left
               [[:plus (a :guard not-number?) (b :guard number?)]] [:plus b a]
               [[:minus (a :guard not-number?) (b :guard number?)]] [:minus b a]

               [x] x
               ))

(defn expand-full
  "Tries to expand an expression as much as possible, and transform it to a canonical form."
  [expr]
  (operate-full expand-expr expr))