 
 (def *out-count* (atom 1))
 
-(defn underived? [sp] (identical? sp (ts-sp (sp-ts sp))))
+(defn canonicalize [sp] (ts-sp (sp-ts sp)))
+(defn canonical? [sp] (identical? sp (ts-sp (sp-ts sp))))
 
 (traits/deftrait simple-subproblem
   [nm inp-set wrapped-ts eval!-fn ri-fn]

       (connect-and-watch! ss left-sp
         (fn left-output [left-sp]
           (summaries/summary-changed-local! ss)
           (when (connect-and-watch-ts! ss @right-sp
                   (fn [right-sp] (set-output-set! ret (get-output-set! right-sp))))
             (summaries/summary-changed! ret)))
         (fn left-child [left-sp left-child]
           (summaries/summary-changed-local! ss)

    (util/assert-is (and (not (identical? s c)) (get-output-set c)))
    (.add child-list c)
    (summaries/summary-changed-local! s)
    (when (canonical? s)
      (summaries/connect! (sp-ts s) (sp-ts c))
      (when (get-output-set s) (summaries/summary-changed! (sp-ts s)))) ;; TODO: remove this overhead from atomic.   
    (when (get-output-set s) (doseq [w (doall (seq child-watchers))] (swap! *out-count* inc) (w s c))))
