Term Rewriting System R:
[X, Y, Z, X1, X2, X3]
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))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(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))
s(ok(X)) -> ok(s(X))
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))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

ACTIVE(add(s(X), Y)) -> S(add(X, Y))
ACTIVE(add(s(X), Y)) -> ADD(X, Y)
ACTIVE(first(s(X), cons(Y, Z))) -> CONS(Y, first(X, Z))
ACTIVE(first(s(X), cons(Y, Z))) -> FIRST(X, Z)
ACTIVE(from(X)) -> CONS(X, from(s(X)))
ACTIVE(from(X)) -> FROM(s(X))
ACTIVE(from(X)) -> S(X)
ACTIVE(and(X1, X2)) -> AND(active(X1), X2)
ACTIVE(and(X1, X2)) -> ACTIVE(X1)
ACTIVE(if(X1, X2, X3)) -> IF(active(X1), X2, X3)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(add(X1, X2)) -> ADD(active(X1), X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(first(X1, X2)) -> FIRST(active(X1), X2)
ACTIVE(first(X1, X2)) -> ACTIVE(X1)
ACTIVE(first(X1, X2)) -> FIRST(X1, active(X2))
ACTIVE(first(X1, X2)) -> ACTIVE(X2)
AND(mark(X1), X2) -> AND(X1, X2)
AND(ok(X1), ok(X2)) -> AND(X1, X2)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
ADD(mark(X1), X2) -> ADD(X1, X2)
ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
FIRST(mark(X1), X2) -> FIRST(X1, X2)
FIRST(X1, mark(X2)) -> FIRST(X1, X2)
FIRST(ok(X1), ok(X2)) -> FIRST(X1, X2)
PROPER(and(X1, X2)) -> AND(proper(X1), proper(X2))
PROPER(and(X1, X2)) -> PROPER(X1)
PROPER(and(X1, X2)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> IF(proper(X1), proper(X2), proper(X3))
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(add(X1, X2)) -> ADD(proper(X1), proper(X2))
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(add(X1, X2)) -> PROPER(X2)
PROPER(s(X)) -> S(proper(X))
PROPER(s(X)) -> PROPER(X)
PROPER(first(X1, X2)) -> FIRST(proper(X1), proper(X2))
PROPER(first(X1, X2)) -> PROPER(X1)
PROPER(first(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> CONS(proper(X1), proper(X2))
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(from(X)) -> FROM(proper(X))
PROPER(from(X)) -> PROPER(X)
S(ok(X)) -> S(X)
CONS(ok(X1), ok(X2)) -> CONS(X1, X2)
FROM(ok(X)) -> FROM(X)
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 10 SCCs.


   R
DPs
       →DP Problem 1
Size-Change Principle
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
Neg POLO


Dependency Pair:

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


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))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(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))
s(ok(X)) -> ok(s(X))
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))





We number the DPs as follows:
  1. S(ok(X)) -> S(X)
and get the following Size-Change Graph(s):
{1} , {1}
1>1

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
Size-Change Principle
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
Neg POLO


Dependency Pairs:

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


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))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(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))
s(ok(X)) -> ok(s(X))
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))





We number the DPs as follows:
  1. ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
  2. ADD(mark(X1), X2) -> ADD(X1, X2)
and get the following Size-Change Graph(s):
{2, 1} , {2, 1}
1>1
2>2
{2, 1} , {2, 1}
1>1
2=2

which lead(s) to this/these maximal multigraph(s):
{2, 1} , {2, 1}
1>1
2=2
{2, 1} , {2, 1}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
Size-Change Principle
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
Neg POLO


Dependency Pair:

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


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))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(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))
s(ok(X)) -> ok(s(X))
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))





We number the DPs as follows:
  1. CONS(ok(X1), ok(X2)) -> CONS(X1, X2)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
Size-Change Principle
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
Neg POLO


Dependency Pairs:

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


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))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(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))
s(ok(X)) -> ok(s(X))
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))





We number the DPs as follows:
  1. FIRST(ok(X1), ok(X2)) -> FIRST(X1, X2)
  2. FIRST(X1, mark(X2)) -> FIRST(X1, X2)
  3. FIRST(mark(X1), X2) -> FIRST(X1, X2)
and get the following Size-Change Graph(s):
{3, 2, 1} , {3, 2, 1}
1>1
2>2
{3, 2, 1} , {3, 2, 1}
1=1
2>2
{3, 2, 1} , {3, 2, 1}
1>1
2=2

which lead(s) to this/these maximal multigraph(s):
{3, 2, 1} , {3, 2, 1}
1>1
2=2
{3, 2, 1} , {3, 2, 1}
1=1
2>2
{3, 2, 1} , {3, 2, 1}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
Size-Change Principle
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
Neg POLO


Dependency Pair:

FROM(ok(X)) -> FROM(X)


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))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(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))
s(ok(X)) -> ok(s(X))
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))





We number the DPs as follows:
  1. FROM(ok(X)) -> FROM(X)
and get the following Size-Change Graph(s):
{1} , {1}
1>1

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
Size-Change Principle
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
Neg POLO


Dependency Pairs:

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


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))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(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))
s(ok(X)) -> ok(s(X))
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))





We number the DPs as follows:
  1. AND(ok(X1), ok(X2)) -> AND(X1, X2)
  2. AND(mark(X1), X2) -> AND(X1, X2)
and get the following Size-Change Graph(s):
{2, 1} , {2, 1}
1>1
2>2
{2, 1} , {2, 1}
1>1
2=2

which lead(s) to this/these maximal multigraph(s):
{2, 1} , {2, 1}
1>1
2>2
{2, 1} , {2, 1}
1>1
2=2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
Size-Change Principle
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
Neg POLO


Dependency Pairs:

IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
IF(mark(X1), X2, X3) -> IF(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))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(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))
s(ok(X)) -> ok(s(X))
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))





We number the DPs as follows:
  1. IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
  2. IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
and get the following Size-Change Graph(s):
{2, 1} , {2, 1}
1>1
2>2
3>3
{2, 1} , {2, 1}
1>1
2=2
3=3

which lead(s) to this/these maximal multigraph(s):
{2, 1} , {2, 1}
1>1
2>2
3>3
{2, 1} , {2, 1}
1>1
2=2
3=3

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
mark(x1) -> mark(x1)
ok(x1) -> ok(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
Size-Change Principle
       →DP Problem 9
SCP
       →DP Problem 10
Neg POLO


Dependency Pairs:

ACTIVE(first(X1, X2)) -> ACTIVE(X2)
ACTIVE(first(X1, X2)) -> ACTIVE(X1)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(and(X1, X2)) -> ACTIVE(X1)


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))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(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))
s(ok(X)) -> ok(s(X))
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))





We number the DPs as follows:
  1. ACTIVE(first(X1, X2)) -> ACTIVE(X2)
  2. ACTIVE(first(X1, X2)) -> ACTIVE(X1)
  3. ACTIVE(add(X1, X2)) -> ACTIVE(X1)
  4. ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
  5. ACTIVE(and(X1, X2)) -> ACTIVE(X1)
and get the following Size-Change Graph(s):
{5, 4, 3, 2, 1} , {5, 4, 3, 2, 1}
1>1

which lead(s) to this/these maximal multigraph(s):
{5, 4, 3, 2, 1} , {5, 4, 3, 2, 1}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
and(x1, x2) -> and(x1, x2)
if(x1, x2, x3) -> if(x1, x2, x3)
first(x1, x2) -> first(x1, x2)
add(x1, x2) -> add(x1, x2)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
Size-Change Principle
       →DP Problem 10
Neg POLO


Dependency Pairs:

PROPER(from(X)) -> PROPER(X)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(first(X1, X2)) -> PROPER(X2)
PROPER(first(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(add(X1, X2)) -> PROPER(X2)
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(and(X1, X2)) -> PROPER(X2)
PROPER(and(X1, X2)) -> PROPER(X1)


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))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(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))
s(ok(X)) -> ok(s(X))
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))





We number the DPs as follows:
  1. PROPER(from(X)) -> PROPER(X)
  2. PROPER(cons(X1, X2)) -> PROPER(X2)
  3. PROPER(cons(X1, X2)) -> PROPER(X1)
  4. PROPER(first(X1, X2)) -> PROPER(X2)
  5. PROPER(first(X1, X2)) -> PROPER(X1)
  6. PROPER(s(X)) -> PROPER(X)
  7. PROPER(add(X1, X2)) -> PROPER(X2)
  8. PROPER(add(X1, X2)) -> PROPER(X1)
  9. PROPER(if(X1, X2, X3)) -> PROPER(X3)
  10. PROPER(if(X1, X2, X3)) -> PROPER(X2)
  11. PROPER(if(X1, X2, X3)) -> PROPER(X1)
  12. PROPER(and(X1, X2)) -> PROPER(X2)
  13. PROPER(and(X1, X2)) -> PROPER(X1)
and get the following Size-Change Graph(s):
{13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1} , {13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}
1>1

which lead(s) to this/these maximal multigraph(s):
{13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1} , {13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
from(x1) -> from(x1)
and(x1, x2) -> and(x1, x2)
if(x1, x2, x3) -> if(x1, x2, x3)
first(x1, x2) -> first(x1, x2)
cons(x1, x2) -> cons(x1, x2)
s(x1) -> s(x1)
add(x1, x2) -> add(x1, x2)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
Negative Polynomial Order


Dependency Pairs:

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


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))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(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))
s(ok(X)) -> ok(s(X))
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))





The following Dependency Pair can be strictly oriented using the given order.

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


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

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))
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(mark(X1), X2) -> mark(and(X1, X2))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(first(X1, X2))
s(ok(X)) -> ok(s(X))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
from(ok(X)) -> ok(from(X))


Used ordering:
Polynomial Order with Interpretation:

POL( TOP(x1) ) = x1

POL( mark(x1) ) = x1 + 1

POL( proper(x1) ) = x1

POL( ok(x1) ) = x1

POL( active(x1) ) = x1

POL( and(x1, x2) ) = x1 + x2 + 1

POL( false ) = 0

POL( if(x1, ..., x3) ) = x1 + x2 + x3 + 1

POL( add(x1, x2) ) = x1 + x2 + 1

POL( s(x1) ) = 0

POL( first(x1, x2) ) = x1 + x2 + 1

POL( 0 ) = 0

POL( nil ) = 0

POL( cons(x1, x2) ) = 0

POL( from(x1) ) = 1

POL( true ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
Neg POLO
           →DP Problem 11
Negative Polynomial Order


Dependency Pair:

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


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))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(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))
s(ok(X)) -> ok(s(X))
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))





The following Dependency Pair can be strictly oriented using the given order.

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


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

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))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(first(X1, X2))
s(ok(X)) -> ok(s(X))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
from(ok(X)) -> ok(from(X))


Used ordering:
Polynomial Order with Interpretation:

POL( TOP(x1) ) = x1

POL( ok(x1) ) = x1 + 1

POL( active(x1) ) = x1

POL( and(x1, x2) ) = x2

POL( mark(x1) ) = 0

POL( if(x1, ..., x3) ) = x3

POL( add(x1, x2) ) = x2

POL( first(x1, x2) ) = x2

POL( s(x1) ) = x1

POL( cons(x1, x2) ) = x2

POL( from(x1) ) = x1


This results in one new DP problem.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
SCP
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP
       →DP Problem 6
SCP
       →DP Problem 7
SCP
       →DP Problem 8
SCP
       →DP Problem 9
SCP
       →DP Problem 10
Neg POLO
           →DP Problem 11
Neg POLO
             ...
               →DP Problem 12
Dependency Graph


Dependency Pair:


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))
and(ok(X1), ok(X2)) -> ok(and(X1, X2))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
add(mark(X1), X2) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
first(mark(X1), X2) -> mark(first(X1, X2))
first(X1, mark(X2)) -> mark(first(X1, X2))
first(ok(X1), ok(X2)) -> ok(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))
s(ok(X)) -> ok(s(X))
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))





Using the Dependency Graph resulted in no new DP problems.

Termination of R successfully shown.
Duration:
0:07 minutes