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

The program

(VAR X Y Z X1 X2)
(RULES 
active(fst(0,Z)) -> mark(nil)
active(fst(s(X),cons(Y,Z))) -> mark(cons(Y,fst(X,Z)))
active(from(X)) -> mark(cons(X,from(s(X))))
active(add(0,X)) -> mark(X)
active(add(s(X),Y)) -> mark(s(add(X,Y)))
active(len(nil)) -> mark(0)
active(len(cons(X,Z))) -> mark(s(len(Z)))
active(cons(X1,X2)) -> cons(active(X1),X2)
active(fst(X1,X2)) -> fst(active(X1),X2)
active(fst(X1,X2)) -> fst(X1,active(X2))
active(from(X)) -> from(active(X))
active(add(X1,X2)) -> add(active(X1),X2)
active(add(X1,X2)) -> add(X1,active(X2))
active(len(X)) -> len(active(X))
cons(mark(X1),X2) -> mark(cons(X1,X2))
fst(mark(X1),X2) -> mark(fst(X1,X2))
fst(X1,mark(X2)) -> mark(fst(X1,X2))
from(mark(X)) -> mark(from(X))
add(mark(X1),X2) -> mark(add(X1,X2))
add(X1,mark(X2)) -> mark(add(X1,X2))
len(mark(X)) -> mark(len(X))
proper(0) -> ok(0)
proper(s(X)) -> s(proper(X))
proper(nil) -> ok(nil)
proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
proper(fst(X1,X2)) -> fst(proper(X1),proper(X2))
proper(from(X)) -> from(proper(X))
proper(add(X1,X2)) -> add(proper(X1),proper(X2))
proper(len(X)) -> len(proper(X))
s(ok(X)) -> ok(s(X))
cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
fst(ok(X1),ok(X2)) -> ok(fst(X1,X2))
from(ok(X)) -> ok(from(X))
add(ok(X1),ok(X2)) -> ok(add(X1,X2))
len(ok(X)) -> ok(len(X))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
)

Submit to AProVE Web Frontend

Edit in AProVE Web Frontend