 
 (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)

       s
       (if (= :Atomic (first (sp-name inner-sp)))
         (let [ret (get-subproblem (sp-name s) ni)]
           (add-subsuming-sp! (canonicalize ret) inner-sp)
           ret)
         (make-output-collecting-subproblem (refine-input inner-sp ni)))))))

