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))
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
↳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
↳Nar
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))
We number the DPs as follows:
- IF(ok(X1), ok(X2), ok(X3)) -> IF(X1, X2, X3)
- 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
↳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
↳Nar
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))
We number the DPs as follows:
- ZERO(ok(X)) -> ZERO(X)
- ZERO(mark(X)) -> ZERO(X)
and get the following Size-Change Graph(s):
which lead(s) to this/these maximal multigraph(s):
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
↳Nar
Dependency Pairs:
PROD(ok(X1), ok(X2)) -> PROD(X1, X2)
PROD(X1, mark(X2)) -> PROD(X1, X2)
PROD(mark(X1), 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))
We number the DPs as follows:
- PROD(ok(X1), ok(X2)) -> PROD(X1, X2)
- PROD(X1, mark(X2)) -> PROD(X1, X2)
- PROD(mark(X1), X2) -> PROD(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
↳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
↳Nar
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))
We number the DPs as follows:
- FACT(ok(X)) -> FACT(X)
- FACT(mark(X)) -> FACT(X)
and get the following Size-Change Graph(s):
which lead(s) to this/these maximal multigraph(s):
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
↳Nar
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))
We number the DPs as follows:
- P(ok(X)) -> P(X)
- P(mark(X)) -> P(X)
and get the following Size-Change Graph(s):
which lead(s) to this/these maximal multigraph(s):
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
↳Size-Change Principle
→DP Problem 7
↳SCP
→DP Problem 8
↳SCP
→DP Problem 9
↳SCP
→DP Problem 10
↳Nar
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))
We number the DPs as follows:
- S(ok(X)) -> S(X)
- S(mark(X)) -> S(X)
and get the following Size-Change Graph(s):
which lead(s) to this/these maximal multigraph(s):
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
↳Nar
Dependency Pairs:
ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
ADD(X1, mark(X2)) -> ADD(X1, X2)
ADD(mark(X1), 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))
We number the DPs as follows:
- ADD(ok(X1), ok(X2)) -> ADD(X1, X2)
- ADD(X1, mark(X2)) -> ADD(X1, X2)
- ADD(mark(X1), X2) -> ADD(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
↳SCP
→DP Problem 6
↳SCP
→DP Problem 7
↳SCP
→DP Problem 8
↳Size-Change Principle
→DP Problem 9
↳SCP
→DP Problem 10
↳Nar
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))
We number the DPs as follows:
- 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)
and get the following Size-Change Graph(s): {9, 8, 7, 6, 5, 4, 3, 2, 1} | , | {9, 8, 7, 6, 5, 4, 3, 2, 1} |
---|
1 | > | 1 |
|
which lead(s) to this/these maximal multigraph(s): {9, 8, 7, 6, 5, 4, 3, 2, 1} | , | {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:
if(x1, x2, x3) -> if(x1, x2, x3)
prod(x1, x2) -> prod(x1, x2)
fact(x1) -> fact(x1)
s(x1) -> s(x1)
zero(x1) -> zero(x1)
p(x1) -> p(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
↳Size-Change Principle
→DP Problem 10
↳Nar
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))
We number the DPs as follows:
- 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)
and get the following Size-Change Graph(s): {11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1} | , | {11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1} |
---|
1 | > | 1 |
|
which lead(s) to this/these maximal multigraph(s): {11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1} | , | {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:
if(x1, x2, x3) -> if(x1, x2, x3)
prod(x1, x2) -> prod(x1, x2)
fact(x1) -> fact(x1)
s(x1) -> s(x1)
zero(x1) -> zero(x1)
p(x1) -> p(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
↳Narrowing Transformation
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))
On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule
TOP(mark(X)) -> TOP(proper(X))
10 new Dependency Pairs
are created:
TOP(mark(fact(X''))) -> TOP(fact(proper(X'')))
TOP(mark(if(X1', X2', X3'))) -> TOP(if(proper(X1'), proper(X2'), proper(X3')))
TOP(mark(zero(X''))) -> TOP(zero(proper(X'')))
TOP(mark(s(X''))) -> TOP(s(proper(X'')))
TOP(mark(0)) -> TOP(ok(0))
TOP(mark(prod(X1', X2'))) -> TOP(prod(proper(X1'), proper(X2')))
TOP(mark(p(X''))) -> TOP(p(proper(X'')))
TOP(mark(add(X1', X2'))) -> TOP(add(proper(X1'), proper(X2')))
TOP(mark(true)) -> TOP(ok(true))
TOP(mark(false)) -> TOP(ok(false))
The transformation is resulting 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
↳Nar
→DP Problem 11
↳Narrowing Transformation
Dependency Pairs:
TOP(mark(false)) -> TOP(ok(false))
TOP(mark(true)) -> TOP(ok(true))
TOP(mark(add(X1', X2'))) -> TOP(add(proper(X1'), proper(X2')))
TOP(mark(p(X''))) -> TOP(p(proper(X'')))
TOP(mark(prod(X1', X2'))) -> TOP(prod(proper(X1'), proper(X2')))
TOP(mark(0)) -> TOP(ok(0))
TOP(mark(s(X''))) -> TOP(s(proper(X'')))
TOP(mark(zero(X''))) -> TOP(zero(proper(X'')))
TOP(mark(if(X1', X2', X3'))) -> TOP(if(proper(X1'), proper(X2'), proper(X3')))
TOP(mark(fact(X''))) -> TOP(fact(proper(X'')))
TOP(ok(X)) -> TOP(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))
On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule
TOP(ok(X)) -> TOP(active(X))
19 new Dependency Pairs
are created:
TOP(ok(fact(X''))) -> TOP(mark(if(zero(X''), s(0), prod(X'', fact(p(X''))))))
TOP(ok(add(0, X''))) -> TOP(mark(X''))
TOP(ok(add(s(X''), Y'))) -> TOP(mark(s(add(X'', Y'))))
TOP(ok(prod(0, X''))) -> TOP(mark(0))
TOP(ok(prod(s(X''), Y'))) -> TOP(mark(add(Y', prod(X'', Y'))))
TOP(ok(if(true, X'', Y'))) -> TOP(mark(X''))
TOP(ok(if(false, X'', Y'))) -> TOP(mark(Y'))
TOP(ok(zero(0))) -> TOP(mark(true))
TOP(ok(zero(s(X'')))) -> TOP(mark(false))
TOP(ok(p(s(X'')))) -> TOP(mark(X''))
TOP(ok(fact(X''))) -> TOP(fact(active(X'')))
TOP(ok(if(X1', X2', X3'))) -> TOP(if(active(X1'), X2', X3'))
TOP(ok(zero(X''))) -> TOP(zero(active(X'')))
TOP(ok(s(X''))) -> TOP(s(active(X'')))
TOP(ok(prod(X1', X2'))) -> TOP(prod(active(X1'), X2'))
TOP(ok(prod(X1', X2'))) -> TOP(prod(X1', active(X2')))
TOP(ok(p(X''))) -> TOP(p(active(X'')))
TOP(ok(add(X1', X2'))) -> TOP(add(active(X1'), X2'))
TOP(ok(add(X1', X2'))) -> TOP(add(X1', active(X2')))
The transformation is resulting 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
↳Nar
→DP Problem 11
↳Nar
...
→DP Problem 12
↳Negative Polynomial Order
Dependency Pairs:
TOP(ok(add(X1', X2'))) -> TOP(add(X1', active(X2')))
TOP(ok(add(X1', X2'))) -> TOP(add(active(X1'), X2'))
TOP(ok(p(X''))) -> TOP(p(active(X'')))
TOP(ok(prod(X1', X2'))) -> TOP(prod(X1', active(X2')))
TOP(ok(prod(X1', X2'))) -> TOP(prod(active(X1'), X2'))
TOP(ok(s(X''))) -> TOP(s(active(X'')))
TOP(ok(zero(X''))) -> TOP(zero(active(X'')))
TOP(ok(if(X1', X2', X3'))) -> TOP(if(active(X1'), X2', X3'))
TOP(ok(fact(X''))) -> TOP(fact(active(X'')))
TOP(ok(p(s(X'')))) -> TOP(mark(X''))
TOP(ok(if(false, X'', Y'))) -> TOP(mark(Y'))
TOP(ok(if(true, X'', Y'))) -> TOP(mark(X''))
TOP(ok(prod(s(X''), Y'))) -> TOP(mark(add(Y', prod(X'', Y'))))
TOP(ok(add(s(X''), Y'))) -> TOP(mark(s(add(X'', Y'))))
TOP(ok(add(0, X''))) -> TOP(mark(X''))
TOP(ok(fact(X''))) -> TOP(mark(if(zero(X''), s(0), prod(X'', fact(p(X''))))))
TOP(mark(p(X''))) -> TOP(p(proper(X'')))
TOP(mark(prod(X1', X2'))) -> TOP(prod(proper(X1'), proper(X2')))
TOP(mark(s(X''))) -> TOP(s(proper(X'')))
TOP(mark(zero(X''))) -> TOP(zero(proper(X'')))
TOP(mark(if(X1', X2', X3'))) -> TOP(if(proper(X1'), proper(X2'), proper(X3')))
TOP(mark(fact(X''))) -> TOP(fact(proper(X'')))
TOP(mark(add(X1', X2'))) -> TOP(add(proper(X1'), proper(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))
The following Dependency Pair can be strictly oriented using the given order.
TOP(ok(p(s(X'')))) -> TOP(mark(X''))
Moreover, the following usable rules (regarding the implicit AFS) are oriented.
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))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(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))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
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))
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)
Used ordering:
Polynomial Order with Interpretation:
POL( TOP(x1) ) = x1
POL( ok(x1) ) = x1
POL( p(x1) ) = x1 + 1
POL( s(x1) ) = x1
POL( mark(x1) ) = x1
POL( if(x1, ..., x3) ) = x2 + x3
POL( proper(x1) ) = x1
POL( active(x1) ) = x1
POL( fact(x1) ) = 0
POL( add(x1, x2) ) = x2
POL( zero(x1) ) = 0
POL( prod(x1, x2) ) = 0
POL( 0 ) = 0
POL( true ) = 0
POL( false ) = 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
↳Nar
→DP Problem 11
↳Nar
...
→DP Problem 13
↳Negative Polynomial Order
Dependency Pairs:
TOP(ok(add(X1', X2'))) -> TOP(add(X1', active(X2')))
TOP(ok(add(X1', X2'))) -> TOP(add(active(X1'), X2'))
TOP(ok(p(X''))) -> TOP(p(active(X'')))
TOP(ok(prod(X1', X2'))) -> TOP(prod(X1', active(X2')))
TOP(ok(prod(X1', X2'))) -> TOP(prod(active(X1'), X2'))
TOP(ok(s(X''))) -> TOP(s(active(X'')))
TOP(ok(zero(X''))) -> TOP(zero(active(X'')))
TOP(ok(if(X1', X2', X3'))) -> TOP(if(active(X1'), X2', X3'))
TOP(ok(fact(X''))) -> TOP(fact(active(X'')))
TOP(ok(if(false, X'', Y'))) -> TOP(mark(Y'))
TOP(ok(if(true, X'', Y'))) -> TOP(mark(X''))
TOP(ok(prod(s(X''), Y'))) -> TOP(mark(add(Y', prod(X'', Y'))))
TOP(ok(add(s(X''), Y'))) -> TOP(mark(s(add(X'', Y'))))
TOP(ok(add(0, X''))) -> TOP(mark(X''))
TOP(ok(fact(X''))) -> TOP(mark(if(zero(X''), s(0), prod(X'', fact(p(X''))))))
TOP(mark(p(X''))) -> TOP(p(proper(X'')))
TOP(mark(prod(X1', X2'))) -> TOP(prod(proper(X1'), proper(X2')))
TOP(mark(s(X''))) -> TOP(s(proper(X'')))
TOP(mark(zero(X''))) -> TOP(zero(proper(X'')))
TOP(mark(if(X1', X2', X3'))) -> TOP(if(proper(X1'), proper(X2'), proper(X3')))
TOP(mark(fact(X''))) -> TOP(fact(proper(X'')))
TOP(mark(add(X1', X2'))) -> TOP(add(proper(X1'), proper(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))
The following Dependency Pairs can be strictly oriented using the given order.
TOP(ok(if(false, X'', Y'))) -> TOP(mark(Y'))
TOP(ok(if(true, X'', Y'))) -> TOP(mark(X''))
Moreover, the following usable rules (regarding the implicit AFS) are oriented.
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))
p(mark(X)) -> mark(p(X))
p(ok(X)) -> ok(p(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))
s(mark(X)) -> mark(s(X))
s(ok(X)) -> ok(s(X))
zero(mark(X)) -> mark(zero(X))
zero(ok(X)) -> ok(zero(X))
if(mark(X1), X2, X3) -> mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) -> ok(if(X1, X2, X3))
fact(mark(X)) -> mark(fact(X))
fact(ok(X)) -> ok(fact(X))
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))
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)
Used ordering:
Polynomial Order with Interpretation:
POL( TOP(x1) ) = x1
POL( ok(x1) ) = x1
POL( if(x1, ..., x3) ) = x2 + x3 + 1
POL( mark(x1) ) = x1
POL( proper(x1) ) = x1
POL( s(x1) ) = x1
POL( active(x1) ) = x1
POL( fact(x1) ) = 1
POL( add(x1, x2) ) = x2
POL( zero(x1) ) = 0
POL( prod(x1, x2) ) = 0
POL( 0 ) = 0
POL( p(x1) ) = x1
POL( true ) = 0
POL( false ) = 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
↳Nar
→DP Problem 11
↳Nar
...
→DP Problem 14
↳Remaining Obligation(s)
The following remains to be proven:
Dependency Pairs:
TOP(ok(add(X1', X2'))) -> TOP(add(X1', active(X2')))
TOP(ok(add(X1', X2'))) -> TOP(add(active(X1'), X2'))
TOP(ok(p(X''))) -> TOP(p(active(X'')))
TOP(ok(prod(X1', X2'))) -> TOP(prod(X1', active(X2')))
TOP(ok(prod(X1', X2'))) -> TOP(prod(active(X1'), X2'))
TOP(ok(s(X''))) -> TOP(s(active(X'')))
TOP(ok(zero(X''))) -> TOP(zero(active(X'')))
TOP(ok(if(X1', X2', X3'))) -> TOP(if(active(X1'), X2', X3'))
TOP(ok(fact(X''))) -> TOP(fact(active(X'')))
TOP(ok(prod(s(X''), Y'))) -> TOP(mark(add(Y', prod(X'', Y'))))
TOP(ok(add(s(X''), Y'))) -> TOP(mark(s(add(X'', Y'))))
TOP(ok(add(0, X''))) -> TOP(mark(X''))
TOP(ok(fact(X''))) -> TOP(mark(if(zero(X''), s(0), prod(X'', fact(p(X''))))))
TOP(mark(p(X''))) -> TOP(p(proper(X'')))
TOP(mark(prod(X1', X2'))) -> TOP(prod(proper(X1'), proper(X2')))
TOP(mark(s(X''))) -> TOP(s(proper(X'')))
TOP(mark(zero(X''))) -> TOP(zero(proper(X'')))
TOP(mark(if(X1', X2', X3'))) -> TOP(if(proper(X1'), proper(X2'), proper(X3')))
TOP(mark(fact(X''))) -> TOP(fact(proper(X'')))
TOP(mark(add(X1', X2'))) -> TOP(add(proper(X1'), proper(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))
The Proof could not be continued due to a Timeout.
Termination of R could not be shown.
Duration:
1:00 minutes