; @origtpdbfilename ./TRS/higher-order/ToyamaRTA04/Ex5Folding.trs ; @xtcfilename "./TRS_Standard/Applicative_05/Ex5Folding.xml" (format TRS) (fun app 2) (fun fold 0) (fun nil 0) (fun cons 0) (fun plus 0) (fun |0| 0) (fun s 0) (fun times 0) (fun sum 0) (fun add 0) (fun prod 0) (fun mul 0) (rule (app (app (app fold f) x) nil) x) (rule (app (app (app fold f) x) (app (app cons y) z)) (app (app f y) (app (app (app fold f) x) z))) (rule (app (app plus |0|) y) y) (rule (app (app plus (app s x)) y) (app s (app (app plus x) y))) (rule (app (app times |0|) y) |0|) (rule (app (app times (app s x)) y) (app (app plus (app (app times x) y)) y)) (rule sum (app (app fold add) |0|)) (rule prod (app (app fold mul) (app s |0|)))