; @origtpdbfilename ./TRS/Thiemann/factorial2.trs ; @xtcfilename "./TRS_Standard/AProVE_06/factorial2.xml" (format TRS) (fun plus 2) (fun |0| 0) (fun s 1) (fun times 2) (fun p 1) (fun minus 2) (fun isZero 1) (fun true 0) (fun false 0) (fun facIter 2) (fun if 4) (fun factorial 1) (rule (plus |0| x) x) (rule (plus (s x) y) (s (plus x y))) (rule (times |0| y) |0|) (rule (times (s x) y) (plus y (times x y))) (rule (p (s x)) x) (rule (p |0|) |0|) (rule (minus x |0|) x) (rule (minus |0| x) |0|) (rule (minus x (s y)) (p (minus x y))) (rule (isZero |0|) true) (rule (isZero (s x)) false) (rule (facIter x y) (if (isZero x) (minus x (s |0|)) y (times y x))) (rule (if true x y z) y) (rule (if false x y z) (facIter x z)) (rule (factorial x) (facIter x (s |0|)))