/home/nowonder/forschung/aprove/TPDB05/TRS/TRCSR/ExIntrod_Zan97_C.trs

The program

(VAR X Y X1 X2 X3)
(RULES 
active(fact(X)) -> mark(if(zero(X),s(0),prod(X,fact(p(X)))))
active(add(0,X)) -> mark(X)
active(add(s(X),Y)) -> mark(s(add(X,Y)))
active(prod(0,X)) -> mark(0)
active(prod(s(X),Y)) -> mark(add(Y,prod(X,Y)))
active(if(true,X,Y)) -> mark(X)
active(if(false,X,Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1,X2,X3)) -> if(active(X1),X2,X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1,X2)) -> prod(active(X1),X2)
active(prod(X1,X2)) -> prod(X1,active(X2))
active(p(X)) -> p(active(X))
active(add(X1,X2)) -> add(active(X1),X2)
active(add(X1,X2)) -> add(X1,active(X2))
fact(mark(X)) -> mark(fact(X))
if(mark(X1),X2,X3) -> mark(if(X1,X2,X3))
zero(mark(X)) -> mark(zero(X))
s(mark(X)) -> mark(s(X))
prod(mark(X1),X2) -> mark(prod(X1,X2))
prod(X1,mark(X2)) -> mark(prod(X1,X2))
p(mark(X)) -> mark(p(X))
add(mark(X1),X2) -> mark(add(X1,X2))
add(X1,mark(X2)) -> mark(add(X1,X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1,X2)) -> prod(proper(X1),proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1,X2)) -> add(proper(X1),proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
fact(ok(X)) -> ok(fact(X))
if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3))
zero(ok(X)) -> ok(zero(X))
s(ok(X)) -> ok(s(X))
prod(ok(X1),ok(X2)) -> ok(prod(X1,X2))
p(ok(X)) -> ok(p(X))
add(ok(X1),ok(X2)) -> ok(add(X1,X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
)

Submit to AProVE Web Frontend

Edit in AProVE Web Frontend