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

The program

(VAR X Y L X1 X2)
(RULES 
active(eq(0,0)) -> mark(true)
active(eq(s(X),s(Y))) -> mark(eq(X,Y))
active(eq(X,Y)) -> mark(false)
active(inf(X)) -> mark(cons(X,inf(s(X))))
active(take(0,X)) -> mark(nil)
active(take(s(X),cons(Y,L))) -> mark(cons(Y,take(X,L)))
active(length(nil)) -> mark(0)
active(length(cons(X,L))) -> mark(s(length(L)))
active(inf(X)) -> inf(active(X))
active(take(X1,X2)) -> take(active(X1),X2)
active(take(X1,X2)) -> take(X1,active(X2))
active(length(X)) -> length(active(X))
inf(mark(X)) -> mark(inf(X))
take(mark(X1),X2) -> mark(take(X1,X2))
take(X1,mark(X2)) -> mark(take(X1,X2))
length(mark(X)) -> mark(length(X))
proper(eq(X1,X2)) -> eq(proper(X1),proper(X2))
proper(0) -> ok(0)
proper(true) -> ok(true)
proper(s(X)) -> s(proper(X))
proper(false) -> ok(false)
proper(inf(X)) -> inf(proper(X))
proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
proper(take(X1,X2)) -> take(proper(X1),proper(X2))
proper(nil) -> ok(nil)
proper(length(X)) -> length(proper(X))
eq(ok(X1),ok(X2)) -> ok(eq(X1,X2))
s(ok(X)) -> ok(s(X))
inf(ok(X)) -> ok(inf(X))
cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
take(ok(X1),ok(X2)) -> ok(take(X1,X2))
length(ok(X)) -> ok(length(X))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
)

Submit to AProVE Web Frontend

Edit in AProVE Web Frontend