Term Rewriting System R:
[X, Y, X1, X2, X3]
active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

ACTIVE(fact(X)) -> IF(zero(X), s(0), prod(X, fact(p(X))))
ACTIVE(fact(X)) -> ZERO(X)
ACTIVE(fact(X)) -> S(0)
ACTIVE(fact(X)) -> PROD(X, fact(p(X)))
ACTIVE(fact(X)) -> FACT(p(X))
ACTIVE(fact(X)) -> P(X)
ACTIVE(add(s(X), Y)) -> S(add(X, Y))
ACTIVE(add(s(X), Y)) -> ADD(X, Y)
ACTIVE(prod(s(X), Y)) -> ADD(Y, prod(X, Y))
ACTIVE(prod(s(X), Y)) -> PROD(X, Y)
ACTIVE(fact(X)) -> FACT(active(X))
ACTIVE(fact(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> IF(active(X1), X2, X3)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(zero(X)) -> ZERO(active(X))
ACTIVE(zero(X)) -> ACTIVE(X)
ACTIVE(s(X)) -> S(active(X))
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(prod(X1, X2)) -> PROD(active(X1), X2)
ACTIVE(prod(X1, X2)) -> ACTIVE(X1)
ACTIVE(prod(X1, X2)) -> PROD(X1, active(X2))
ACTIVE(prod(X1, X2)) -> ACTIVE(X2)
ACTIVE(p(X)) -> P(active(X))
ACTIVE(p(X)) -> ACTIVE(X)
ACTIVE(add(X1, X2)) -> ADD(active(X1), X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(add(X1, X2)) -> ADD(X1, active(X2))
ACTIVE(add(X1, X2)) -> ACTIVE(X2)
FACT(mark(X)) -> FACT(X)
FACT(ok(X)) -> FACT(X)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)
IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
ZERO(mark(X)) -> ZERO(X)
ZERO(ok(X)) -> ZERO(X)
S(mark(X)) -> S(X)
S(ok(X)) -> S(X)
PROD(mark(X1), X2) -> PROD(X1, X2)
PROD(X1, mark(X2)) -> PROD(X1, X2)
PROD(ok(X1), ok(X2)) -> PROD(X1, X2)
P(mark(X)) -> P(X)
P(ok(X)) -> P(X)
ADD(mark(X1), X2) -> ADD(X1, X2)
ADD(X1, mark(X2)) -> ADD(X1, X2)
ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
PROPER(fact(X)) -> FACT(proper(X))
PROPER(fact(X)) -> PROPER(X)
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(zero(X)) -> ZERO(proper(X))
PROPER(zero(X)) -> PROPER(X)
PROPER(s(X)) -> S(proper(X))
PROPER(s(X)) -> PROPER(X)
PROPER(prod(X1, X2)) -> PROD(proper(X1), proper(X2))
PROPER(prod(X1, X2)) -> PROPER(X1)
PROPER(prod(X1, X2)) -> PROPER(X2)
PROPER(p(X)) -> P(proper(X))
PROPER(p(X)) -> PROPER(X)
PROPER(add(X1, X2)) -> ADD(proper(X1), proper(X2))
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(add(X1, X2)) -> PROPER(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 10 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
AFS
       →DP Problem 10
Remaining


Dependency Pairs:

IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
IF(mark(X1), X2, X3) -> IF(X1, X2, X3)


There are no usable rules for innermost 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:
IF(x1, x2, x3) -> IF(x1, x2, x3)
ok(x1) -> ok(x1)
mark(x1) -> mark(x1)


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 11
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
AFS
       →DP Problem 10
Remaining


Dependency Pair:


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




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
AFS
       →DP Problem 10
Remaining


Dependency Pairs:

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


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

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


There are no usable rules for innermost 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:
PROD(x1, x2) -> PROD(x1, x2)
ok(x1) -> ok(x1)
mark(x1) -> mark(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
           →DP Problem 12
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
AFS
       →DP Problem 10
Remaining


Dependency Pair:


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




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
AFS
       →DP Problem 10
Remaining


Dependency Pairs:

FACT(ok(X)) -> FACT(X)
FACT(mark(X)) -> FACT(X)


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

FACT(ok(X)) -> FACT(X)
FACT(mark(X)) -> FACT(X)


There are no usable rules for innermost 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:
FACT(x1) -> FACT(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 13
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
AFS
       →DP Problem 10
Remaining


Dependency Pair:


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




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
AFS
       →DP Problem 10
Remaining


Dependency Pairs:

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


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

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


There are no usable rules for innermost 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)
mark(x1) -> mark(x1)


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


Dependency Pair:


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




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
AFS
       →DP Problem 10
Remaining


Dependency Pairs:

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


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

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


There are no usable rules for innermost 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:
ADD(x1, x2) -> ADD(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 15
Dependency Graph
       →DP Problem 6
AFS
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
AFS
       →DP Problem 10
Remaining


Dependency Pair:


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




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
AFS
       →DP Problem 10
Remaining


Dependency Pairs:

ZERO(ok(X)) -> ZERO(X)
ZERO(mark(X)) -> ZERO(X)


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

ZERO(ok(X)) -> ZERO(X)
ZERO(mark(X)) -> ZERO(X)


There are no usable rules for innermost 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:
ZERO(x1) -> ZERO(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 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
AFS
           →DP Problem 16
Dependency Graph
       →DP Problem 7
AFS
       →DP Problem 8
AFS
       →DP Problem 9
AFS
       →DP Problem 10
Remaining


Dependency Pair:


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




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
AFS
       →DP Problem 10
Remaining


Dependency Pairs:

P(ok(X)) -> P(X)
P(mark(X)) -> P(X)


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

P(ok(X)) -> P(X)
P(mark(X)) -> P(X)


There are no usable rules for innermost 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:
P(x1) -> P(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 7
AFS
           →DP Problem 17
Dependency Graph
       →DP Problem 8
AFS
       →DP Problem 9
AFS
       →DP Problem 10
Remaining


Dependency Pair:


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




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
AFS
       →DP Problem 10
Remaining


Dependency Pairs:

ACTIVE(add(X1, X2)) -> ACTIVE(X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(p(X)) -> ACTIVE(X)
ACTIVE(prod(X1, X2)) -> ACTIVE(X2)
ACTIVE(prod(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(zero(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(fact(X)) -> ACTIVE(X)


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

ACTIVE(add(X1, X2)) -> ACTIVE(X2)
ACTIVE(add(X1, X2)) -> ACTIVE(X1)
ACTIVE(p(X)) -> ACTIVE(X)
ACTIVE(prod(X1, X2)) -> ACTIVE(X2)
ACTIVE(prod(X1, X2)) -> ACTIVE(X1)
ACTIVE(s(X)) -> ACTIVE(X)
ACTIVE(zero(X)) -> ACTIVE(X)
ACTIVE(if(X1, X2, X3)) -> ACTIVE(X1)
ACTIVE(fact(X)) -> ACTIVE(X)


There are no usable rules for innermost 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)
add(x1, x2) -> add(x1, x2)
s(x1) -> s(x1)
fact(x1) -> fact(x1)
prod(x1, x2) -> prod(x1, x2)
zero(x1) -> zero(x1)
p(x1) -> p(x1)
if(x1, x2, x3) -> if(x1, x2, x3)


   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 18
Dependency Graph
       →DP Problem 9
AFS
       →DP Problem 10
Remaining


Dependency Pair:


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




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
Argument Filtering and Ordering
       →DP Problem 10
Remaining


Dependency Pairs:

PROPER(add(X1, X2)) -> PROPER(X2)
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(p(X)) -> PROPER(X)
PROPER(prod(X1, X2)) -> PROPER(X2)
PROPER(prod(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(zero(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(fact(X)) -> PROPER(X)


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

PROPER(add(X1, X2)) -> PROPER(X2)
PROPER(add(X1, X2)) -> PROPER(X1)
PROPER(p(X)) -> PROPER(X)
PROPER(prod(X1, X2)) -> PROPER(X2)
PROPER(prod(X1, X2)) -> PROPER(X1)
PROPER(s(X)) -> PROPER(X)
PROPER(zero(X)) -> PROPER(X)
PROPER(if(X1, X2, X3)) -> PROPER(X3)
PROPER(if(X1, X2, X3)) -> PROPER(X2)
PROPER(if(X1, X2, X3)) -> PROPER(X1)
PROPER(fact(X)) -> PROPER(X)


There are no usable rules for innermost 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)
add(x1, x2) -> add(x1, x2)
zero(x1) -> zero(x1)
p(x1) -> p(x1)
prod(x1, x2) -> prod(x1, x2)
if(x1, x2, x3) -> if(x1, x2, x3)
fact(x1) -> fact(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 9
AFS
           →DP Problem 19
Dependency Graph
       →DP Problem 10
Remaining


Dependency Pair:


Rules:


active(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost




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
AFS
       →DP Problem 10
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(fact(X)) -> mark(if(zero(X), s(0), prod(X, fact(p(X)))))
active(add(0, X)) -> mark(X)
active(add(s(X), Y)) -> mark(s(add(X, Y)))
active(prod(0, X)) -> mark(0)
active(prod(s(X), Y)) -> mark(add(Y, prod(X, Y)))
active(if(true, X, Y)) -> mark(X)
active(if(false, X, Y)) -> mark(Y)
active(zero(0)) -> mark(true)
active(zero(s(X))) -> mark(false)
active(p(s(X))) -> mark(X)
active(fact(X)) -> fact(active(X))
active(if(X1, X2, X3)) -> if(active(X1), X2, X3)
active(zero(X)) -> zero(active(X))
active(s(X)) -> s(active(X))
active(prod(X1, X2)) -> prod(active(X1), X2)
active(prod(X1, X2)) -> prod(X1, active(X2))
active(p(X)) -> p(active(X))
active(add(X1, X2)) -> add(active(X1), X2)
active(add(X1, X2)) -> add(X1, active(X2))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
prod(mark(X1), X2) -> mark(prod(X1, X2))
prod(X1, mark(X2)) -> mark(prod(X1, X2))
prod(ok(X1), ok(X2)) -> ok(prod(X1, X2))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(X))
add(mark(X1), X2) -> mark(add(X1, X2))
add(X1, mark(X2)) -> mark(add(X1, X2))
add(ok(X1), ok(X2)) -> ok(add(X1, X2))
proper(fact(X)) -> fact(proper(X))
proper(if(X1, X2, X3)) -> if(proper(X1), proper(X2), proper(X3))
proper(zero(X)) -> zero(proper(X))
proper(s(X)) -> s(proper(X))
proper(0) -> ok(0)
proper(prod(X1, X2)) -> prod(proper(X1), proper(X2))
proper(p(X)) -> p(proper(X))
proper(add(X1, X2)) -> add(proper(X1), proper(X2))
proper(true) -> ok(true)
proper(false) -> ok(false)
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))


Strategy:

innermost



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