; @origtpdbfilename ./TRS/higher-order/Lifantsev/Ex6Folding.trs ; @xtcfilename "./TRS_Standard/Applicative_05/Ex6Folding.xml" (format TRS) (fun app 2) (fun fold 0) (fun nil 0) (fun cons 0) (fun sum 0) (fun add 0) (fun |0| 0) (fun mul 0) (fun |1| 0) (fun prod 0) (rule (app (app (app fold f) nil) x) x) (rule (app (app (app fold f) (app (app cons h) t)) x) (app (app (app fold f) t) (app (app f x) h))) (rule (app sum l) (app (app (app fold add) l) |0|)) (rule (app (app (app fold mul) l) |1|) (app prod l))