; @origtpdbfilename ./TRS/SK90/4.61.trs
; @xtcfilename "./TRS_Standard/SK90/4.61.xml"
(format TRS)
(fun bsort 1)
(fun nil 0)
(fun . 2)
(fun last 1)
(fun bubble 1)
(fun butlast 1)
(fun if 3)
(fun <= 2)
(fun |0| 0)
(rule (bsort nil) nil)
(rule (bsort (. x y)) (last (. (bubble (. x y)) (bsort (butlast (bubble (. x y)))))))
(rule (bubble nil) nil)
(rule (bubble (. x nil)) (. x nil))
(rule (bubble (. x (. y z))) (if (<= x y) (. y (bubble (. x z))) (. x (bubble (. y z)))))
(rule (last nil) |0|)
(rule (last (. x nil)) x)
(rule (last (. x (. y z))) (last (. y z)))
(rule (butlast nil) nil)
(rule (butlast (. x nil)) nil)
(rule (butlast (. x (. y z))) (. x (butlast (. y z))))