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

The program

(VAR X Y Z X1 X2 X3)
(RULES 
active(and(true,X)) -> mark(X)
active(and(false,Y)) -> mark(false)
active(if(true,X,Y)) -> mark(X)
active(if(false,X,Y)) -> mark(Y)
active(add(0,X)) -> mark(X)
active(add(s(X),Y)) -> mark(s(add(X,Y)))
active(first(0,X)) -> mark(nil)
active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z)))
active(from(X)) -> mark(cons(X,from(s(X))))
active(and(X1,X2)) -> and(active(X1),X2)
active(if(X1,X2,X3)) -> if(active(X1),X2,X3)
active(add(X1,X2)) -> add(active(X1),X2)
active(first(X1,X2)) -> first(active(X1),X2)
active(first(X1,X2)) -> first(X1,active(X2))
and(mark(X1),X2) -> mark(and(X1,X2))
if(mark(X1),X2,X3) -> mark(if(X1,X2,X3))
add(mark(X1),X2) -> mark(add(X1,X2))
first(mark(X1),X2) -> mark(first(X1,X2))
first(X1,mark(X2)) -> mark(first(X1,X2))
proper(and(X1,X2)) -> and(proper(X1),proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
proper(if(X1,X2,X3)) -> if(proper(X1),proper(X2),proper(X3))
proper(add(X1,X2)) -> add(proper(X1),proper(X2))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(first(X1,X2)) -> first(proper(X1),proper(X2))
proper(nil) -> ok(nil)
proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
proper(from(X)) -> from(proper(X))
and(ok(X1),ok(X2)) -> ok(and(X1,X2))
if(ok(X1),ok(X2),ok(X3)) -> ok(if(X1,X2,X3))
add(ok(X1),ok(X2)) -> ok(add(X1,X2))
s(ok(X)) -> ok(s(X))
first(ok(X1),ok(X2)) -> ok(first(X1,X2))
cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
from(ok(X)) -> ok(from(X))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
)

Submit to AProVE Web Frontend

Edit in AProVE Web Frontend