Term Rewriting System R:
[X, XS, N, X1, X2]
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
ahead(cons(X, XS)) -> mark(X)
ahead(X) -> head(X)
a2nd(cons(X, XS)) -> ahead(mark(XS))
a2nd(X) -> 2nd(X)
atake(0, XS) -> nil
atake(s(N), cons(X, XS)) -> cons(mark(X), take(N, XS))
atake(X1, X2) -> take(X1, X2)
asel(0, cons(X, XS)) -> mark(X)
asel(s(N), cons(X, XS)) -> asel(mark(N), mark(XS))
asel(X1, X2) -> sel(X1, X2)
mark(from(X)) -> afrom(mark(X))
mark(head(X)) -> ahead(mark(X))
mark(2nd(X)) -> a2nd(mark(X))
mark(take(X1, X2)) -> atake(mark(X1), mark(X2))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(0) -> 0
mark(nil) -> nil

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

AFROM(X) -> MARK(X)
AHEAD(cons(X, XS)) -> MARK(X)
A2ND(cons(X, XS)) -> AHEAD(mark(XS))
A2ND(cons(X, XS)) -> MARK(XS)
ATAKE(s(N), cons(X, XS)) -> MARK(X)
ASEL(0, cons(X, XS)) -> MARK(X)
ASEL(s(N), cons(X, XS)) -> ASEL(mark(N), mark(XS))
ASEL(s(N), cons(X, XS)) -> MARK(N)
ASEL(s(N), cons(X, XS)) -> MARK(XS)
MARK(from(X)) -> AFROM(mark(X))
MARK(from(X)) -> MARK(X)
MARK(head(X)) -> AHEAD(mark(X))
MARK(head(X)) -> MARK(X)
MARK(2nd(X)) -> A2ND(mark(X))
MARK(2nd(X)) -> MARK(X)
MARK(take(X1, X2)) -> ATAKE(mark(X1), mark(X2))
MARK(take(X1, X2)) -> MARK(X1)
MARK(take(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> ASEL(mark(X1), mark(X2))
MARK(sel(X1, X2)) -> MARK(X1)
MARK(sel(X1, X2)) -> MARK(X2)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(s(X)) -> MARK(X)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

ASEL(s(N), cons(X, XS)) -> MARK(XS)
ASEL(s(N), cons(X, XS)) -> MARK(N)
ASEL(s(N), cons(X, XS)) -> ASEL(mark(N), mark(XS))
MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(sel(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> MARK(X1)
ASEL(0, cons(X, XS)) -> MARK(X)
MARK(sel(X1, X2)) -> ASEL(mark(X1), mark(X2))
MARK(take(X1, X2)) -> MARK(X2)
MARK(take(X1, X2)) -> MARK(X1)
ATAKE(s(N), cons(X, XS)) -> MARK(X)
MARK(take(X1, X2)) -> ATAKE(mark(X1), mark(X2))
MARK(2nd(X)) -> MARK(X)
A2ND(cons(X, XS)) -> MARK(XS)
A2ND(cons(X, XS)) -> AHEAD(mark(XS))
MARK(2nd(X)) -> A2ND(mark(X))
MARK(head(X)) -> MARK(X)
AHEAD(cons(X, XS)) -> MARK(X)
MARK(head(X)) -> AHEAD(mark(X))
MARK(from(X)) -> MARK(X)
MARK(from(X)) -> AFROM(mark(X))
AFROM(X) -> MARK(X)


Rules:


afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
ahead(cons(X, XS)) -> mark(X)
ahead(X) -> head(X)
a2nd(cons(X, XS)) -> ahead(mark(XS))
a2nd(X) -> 2nd(X)
atake(0, XS) -> nil
atake(s(N), cons(X, XS)) -> cons(mark(X), take(N, XS))
atake(X1, X2) -> take(X1, X2)
asel(0, cons(X, XS)) -> mark(X)
asel(s(N), cons(X, XS)) -> asel(mark(N), mark(XS))
asel(X1, X2) -> sel(X1, X2)
mark(from(X)) -> afrom(mark(X))
mark(head(X)) -> ahead(mark(X))
mark(2nd(X)) -> a2nd(mark(X))
mark(take(X1, X2)) -> atake(mark(X1), mark(X2))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(0) -> 0
mark(nil) -> nil


Strategy:

innermost



Innermost Termination of R could not be shown.
Duration:
0:09 minutes