Term Rewriting System R:
[X, Y, L, X1, X2]
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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

ACTIVE(eq(s(X), s(Y))) -> EQ(X, Y)
ACTIVE(inf(X)) -> CONS(X, inf(s(X)))
ACTIVE(inf(X)) -> INF(s(X))
ACTIVE(inf(X)) -> S(X)
ACTIVE(take(s(X), cons(Y, L))) -> CONS(Y, take(X, L))
ACTIVE(take(s(X), cons(Y, L))) -> TAKE(X, L)
ACTIVE(length(cons(X, L))) -> S(length(L))
ACTIVE(length(cons(X, L))) -> LENGTH(L)
ACTIVE(inf(X)) -> INF(active(X))
ACTIVE(inf(X)) -> ACTIVE(X)
ACTIVE(take(X1, X2)) -> TAKE(active(X1), X2)
ACTIVE(take(X1, X2)) -> ACTIVE(X1)
ACTIVE(take(X1, X2)) -> TAKE(X1, active(X2))
ACTIVE(take(X1, X2)) -> ACTIVE(X2)
ACTIVE(length(X)) -> LENGTH(active(X))
ACTIVE(length(X)) -> ACTIVE(X)
INF(mark(X)) -> INF(X)
INF(ok(X)) -> INF(X)
TAKE(mark(X1), X2) -> TAKE(X1, X2)
TAKE(X1, mark(X2)) -> TAKE(X1, X2)
TAKE(ok(X1), ok(X2)) -> TAKE(X1, X2)
LENGTH(mark(X)) -> LENGTH(X)
LENGTH(ok(X)) -> LENGTH(X)
PROPER(eq(X1, X2)) -> EQ(proper(X1), proper(X2))
PROPER(eq(X1, X2)) -> PROPER(X1)
PROPER(eq(X1, X2)) -> PROPER(X2)
PROPER(s(X)) -> S(proper(X))
PROPER(s(X)) -> PROPER(X)
PROPER(inf(X)) -> INF(proper(X))
PROPER(inf(X)) -> PROPER(X)
PROPER(cons(X1, X2)) -> CONS(proper(X1), proper(X2))
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(take(X1, X2)) -> TAKE(proper(X1), proper(X2))
PROPER(take(X1, X2)) -> PROPER(X1)
PROPER(take(X1, X2)) -> PROPER(X2)
PROPER(length(X)) -> LENGTH(proper(X))
PROPER(length(X)) -> PROPER(X)
EQ(ok(X1), ok(X2)) -> EQ(X1, X2)
S(ok(X)) -> S(X)
CONS(ok(X1), ok(X2)) -> CONS(X1, X2)
TOP(mark(X)) -> TOP(proper(X))
TOP(mark(X)) -> PROPER(X)
TOP(ok(X)) -> TOP(active(X))
TOP(ok(X)) -> ACTIVE(X)

Furthermore, R contains nine SCCs.


   R
DPs
       →DP Problem 1
Argument Filtering and Ordering
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
Remaining


Dependency Pair:

EQ(ok(X1), ok(X2)) -> EQ(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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





The following dependency pair can be strictly oriented:

EQ(ok(X1), ok(X2)) -> EQ(X1, X2)


There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
EQ(x1, x2) -> EQ(x1, x2)
ok(x1) -> ok(x1)


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 10
Dependency Graph
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
Remaining


Dependency Pair:


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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Argument Filtering and Ordering
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
Remaining


Dependency Pair:

CONS(ok(X1), ok(X2)) -> CONS(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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





The following dependency pair can be strictly oriented:

CONS(ok(X1), ok(X2)) -> CONS(X1, X2)


There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
CONS(x1, x2) -> CONS(x1, x2)
ok(x1) -> ok(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
           →DP Problem 11
Dependency Graph
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
Remaining


Dependency Pair:


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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Argument Filtering and Ordering
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
Remaining


Dependency Pairs:

INF(ok(X)) -> INF(X)
INF(mark(X)) -> INF(X)


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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





The following dependency pairs can be strictly oriented:

INF(ok(X)) -> INF(X)
INF(mark(X)) -> INF(X)


There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
INF(x1) -> INF(x1)
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
           →DP Problem 12
Dependency Graph
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
Remaining


Dependency Pair:


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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
Argument Filtering and Ordering
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
Remaining


Dependency Pair:

S(ok(X)) -> S(X)


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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





The following dependency pair can be strictly oriented:

S(ok(X)) -> S(X)


There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
S(x1) -> S(x1)
ok(x1) -> ok(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
           →DP Problem 13
Dependency Graph
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
Remaining


Dependency Pair:


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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
Argument Filtering and Ordering
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
Remaining


Dependency Pairs:

TAKE(ok(X1), ok(X2)) -> TAKE(X1, X2)
TAKE(X1, mark(X2)) -> TAKE(X1, X2)
TAKE(mark(X1), X2) -> TAKE(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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





The following dependency pairs can be strictly oriented:

TAKE(ok(X1), ok(X2)) -> TAKE(X1, X2)
TAKE(X1, mark(X2)) -> TAKE(X1, X2)
TAKE(mark(X1), X2) -> TAKE(X1, X2)


There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
TAKE(x1, x2) -> TAKE(x1, x2)
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
           →DP Problem 14
Dependency Graph
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
Remaining


Dependency Pair:


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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Argument Filtering and Ordering
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
Remaining


Dependency Pairs:

LENGTH(ok(X)) -> LENGTH(X)
LENGTH(mark(X)) -> LENGTH(X)


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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





The following dependency pairs can be strictly oriented:

LENGTH(ok(X)) -> LENGTH(X)
LENGTH(mark(X)) -> LENGTH(X)


There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
LENGTH(x1) -> LENGTH(x1)
ok(x1) -> ok(x1)
mark(x1) -> mark(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
           →DP Problem 15
Dependency Graph
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
Remaining


Dependency Pair:


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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
Argument Filtering and Ordering
       →DP Problem 8
AFS
       →DP Problem 9
Remaining


Dependency Pairs:

ACTIVE(length(X)) -> ACTIVE(X)
ACTIVE(take(X1, X2)) -> ACTIVE(X2)
ACTIVE(take(X1, X2)) -> ACTIVE(X1)
ACTIVE(inf(X)) -> ACTIVE(X)


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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





The following dependency pairs can be strictly oriented:

ACTIVE(length(X)) -> ACTIVE(X)
ACTIVE(take(X1, X2)) -> ACTIVE(X2)
ACTIVE(take(X1, X2)) -> ACTIVE(X1)
ACTIVE(inf(X)) -> ACTIVE(X)


There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
ACTIVE(x1) -> ACTIVE(x1)
take(x1, x2) -> take(x1, x2)
length(x1) -> length(x1)
inf(x1) -> inf(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
           →DP Problem 16
Dependency Graph
       →DP Problem 8
AFS
       →DP Problem 9
Remaining


Dependency Pair:


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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
Argument Filtering and Ordering
       →DP Problem 9
Remaining


Dependency Pairs:

PROPER(length(X)) -> PROPER(X)
PROPER(take(X1, X2)) -> PROPER(X2)
PROPER(take(X1, X2)) -> PROPER(X1)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(inf(X)) -> PROPER(X)
PROPER(s(X)) -> PROPER(X)
PROPER(eq(X1, X2)) -> PROPER(X2)
PROPER(eq(X1, X2)) -> PROPER(X1)


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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





The following dependency pairs can be strictly oriented:

PROPER(length(X)) -> PROPER(X)
PROPER(take(X1, X2)) -> PROPER(X2)
PROPER(take(X1, X2)) -> PROPER(X1)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(inf(X)) -> PROPER(X)
PROPER(s(X)) -> PROPER(X)
PROPER(eq(X1, X2)) -> PROPER(X2)
PROPER(eq(X1, X2)) -> PROPER(X1)


There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
PROPER(x1) -> PROPER(x1)
take(x1, x2) -> take(x1, x2)
length(x1) -> length(x1)
cons(x1, x2) -> cons(x1, x2)
eq(x1, x2) -> eq(x1, x2)
inf(x1) -> inf(x1)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
AFS
           →DP Problem 17
Dependency Graph
       →DP Problem 9
Remaining


Dependency Pair:


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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))


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))
inf(ok(X)) -> ok(inf(X))
take(mark(X1), X2) -> mark(take(X1, X2))
take(X1, mark(X2)) -> mark(take(X1, X2))
take(ok(X1), ok(X2)) -> ok(take(X1, X2))
length(mark(X)) -> mark(length(X))
length(ok(X)) -> ok(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))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))




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