Term Rewriting System R:
[X, XS, X1, X2]
active(zeros) -> mark(cons(0, zeros))
active(tail(cons(X, XS))) -> mark(XS)
active(cons(X1, X2)) -> cons(active(X1), X2)
active(tail(X)) -> tail(active(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
proper(zeros) -> ok(zeros)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(0) -> ok(0)
proper(tail(X)) -> tail(proper(X))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
Termination of R to be shown.
R
↳Removing Redundant Rules
Removing the following rules from R which fullfill a polynomial ordering:
active(tail(cons(X, XS))) -> mark(XS)
where the Polynomial interpretation:
POL(top(x1)) | = 1 + x1 |
POL(active(x1)) | = x1 |
POL(proper(x1)) | = x1 |
POL(0) | = 0 |
POL(cons(x1, x2)) | = x1 + x2 |
POL(tail(x1)) | = 1 + x1 |
POL(zeros) | = 0 |
POL(mark(x1)) | = x1 |
POL(ok(x1)) | = x1 |
was used.
Not all Rules of R can be deleted, so we still have to regard a part of R.
R
↳RRRPolo
→TRS2
↳Dependency Pair Analysis
R contains the following Dependency Pairs:
ACTIVE(cons(X1, X2)) -> CONS(active(X1), X2)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
ACTIVE(zeros) -> CONS(0, zeros)
ACTIVE(tail(X)) -> TAIL(active(X))
ACTIVE(tail(X)) -> ACTIVE(X)
CONS(mark(X1), X2) -> CONS(X1, X2)
CONS(ok(X1), ok(X2)) -> CONS(X1, X2)
PROPER(cons(X1, X2)) -> CONS(proper(X1), proper(X2))
PROPER(cons(X1, X2)) -> PROPER(X1)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(tail(X)) -> TAIL(proper(X))
PROPER(tail(X)) -> PROPER(X)
TAIL(mark(X)) -> TAIL(X)
TAIL(ok(X)) -> TAIL(X)
TOP(mark(X)) -> TOP(proper(X))
TOP(mark(X)) -> PROPER(X)
TOP(ok(X)) -> TOP(active(X))
TOP(ok(X)) -> ACTIVE(X)
Furthermore, R contains five SCCs.
R
↳RRRPolo
→TRS2
↳DPs
→DP Problem 1
↳Size-Change Principle
→DP Problem 2
↳SCP
→DP Problem 3
↳SCP
→DP Problem 4
↳SCP
→DP Problem 5
↳MRR
Dependency Pairs:
CONS(ok(X1), ok(X2)) -> CONS(X1, X2)
CONS(mark(X1), X2) -> CONS(X1, X2)
Rules:
active(cons(X1, X2)) -> cons(active(X1), X2)
active(zeros) -> mark(cons(0, zeros))
active(tail(X)) -> tail(active(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
proper(zeros) -> ok(zeros)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(tail(X)) -> tail(proper(X))
proper(0) -> ok(0)
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
We number the DPs as follows:
- CONS(ok(X1), ok(X2)) -> CONS(X1, X2)
- CONS(mark(X1), X2) -> CONS(X1, X2)
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
↳RRRPolo
→TRS2
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳Size-Change Principle
→DP Problem 3
↳SCP
→DP Problem 4
↳SCP
→DP Problem 5
↳MRR
Dependency Pairs:
TAIL(ok(X)) -> TAIL(X)
TAIL(mark(X)) -> TAIL(X)
Rules:
active(cons(X1, X2)) -> cons(active(X1), X2)
active(zeros) -> mark(cons(0, zeros))
active(tail(X)) -> tail(active(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
proper(zeros) -> ok(zeros)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(tail(X)) -> tail(proper(X))
proper(0) -> ok(0)
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
We number the DPs as follows:
- TAIL(ok(X)) -> TAIL(X)
- TAIL(mark(X)) -> TAIL(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
↳RRRPolo
→TRS2
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳SCP
→DP Problem 3
↳Size-Change Principle
→DP Problem 4
↳SCP
→DP Problem 5
↳MRR
Dependency Pairs:
ACTIVE(tail(X)) -> ACTIVE(X)
ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
Rules:
active(cons(X1, X2)) -> cons(active(X1), X2)
active(zeros) -> mark(cons(0, zeros))
active(tail(X)) -> tail(active(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
proper(zeros) -> ok(zeros)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(tail(X)) -> tail(proper(X))
proper(0) -> ok(0)
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
We number the DPs as follows:
- ACTIVE(tail(X)) -> ACTIVE(X)
- ACTIVE(cons(X1, X2)) -> ACTIVE(X1)
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:
cons(x1, x2) -> cons(x1, x2)
tail(x1) -> tail(x1)
We obtain no new DP problems.
R
↳RRRPolo
→TRS2
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳SCP
→DP Problem 3
↳SCP
→DP Problem 4
↳Size-Change Principle
→DP Problem 5
↳MRR
Dependency Pairs:
PROPER(tail(X)) -> PROPER(X)
PROPER(cons(X1, X2)) -> PROPER(X2)
PROPER(cons(X1, X2)) -> PROPER(X1)
Rules:
active(cons(X1, X2)) -> cons(active(X1), X2)
active(zeros) -> mark(cons(0, zeros))
active(tail(X)) -> tail(active(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
proper(zeros) -> ok(zeros)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(tail(X)) -> tail(proper(X))
proper(0) -> ok(0)
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
We number the DPs as follows:
- PROPER(tail(X)) -> PROPER(X)
- PROPER(cons(X1, X2)) -> PROPER(X2)
- PROPER(cons(X1, X2)) -> PROPER(X1)
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:
cons(x1, x2) -> cons(x1, x2)
tail(x1) -> tail(x1)
We obtain no new DP problems.
R
↳RRRPolo
→TRS2
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳SCP
→DP Problem 3
↳SCP
→DP Problem 4
↳SCP
→DP Problem 5
↳Modular Removal of Rules
Dependency Pairs:
TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))
Rules:
active(cons(X1, X2)) -> cons(active(X1), X2)
active(zeros) -> mark(cons(0, zeros))
active(tail(X)) -> tail(active(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
proper(zeros) -> ok(zeros)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(tail(X)) -> tail(proper(X))
proper(0) -> ok(0)
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
top(mark(X)) -> top(proper(X))
top(ok(X)) -> top(active(X))
We have the following set of usable rules:
active(cons(X1, X2)) -> cons(active(X1), X2)
active(zeros) -> mark(cons(0, zeros))
active(tail(X)) -> tail(active(X))
proper(zeros) -> ok(zeros)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(tail(X)) -> tail(proper(X))
proper(0) -> ok(0)
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
POL(active(x1)) | = x1 |
POL(proper(x1)) | = x1 |
POL(0) | = 0 |
POL(cons(x1, x2)) | = x1 + x2 |
POL(tail(x1)) | = x1 |
POL(mark(x1)) | = x1 |
POL(zeros) | = 0 |
POL(TOP(x1)) | = x1 |
POL(ok(x1)) | = x1 |
We have the following set D of usable symbols: {proper, active, 0, cons, tail, zeros, mark, TOP, ok}
No Dependency Pairs can be deleted.
2 non usable rules have been deleted.
The result of this processor delivers one new DP problem.
R
↳RRRPolo
→TRS2
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳SCP
→DP Problem 3
↳SCP
→DP Problem 4
↳SCP
→DP Problem 5
↳MRR
...
→DP Problem 6
↳Negative Polynomial Order
Dependency Pairs:
TOP(ok(X)) -> TOP(active(X))
TOP(mark(X)) -> TOP(proper(X))
Rules:
active(cons(X1, X2)) -> cons(active(X1), X2)
active(zeros) -> mark(cons(0, zeros))
active(tail(X)) -> tail(active(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
proper(zeros) -> ok(zeros)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(tail(X)) -> tail(proper(X))
proper(0) -> ok(0)
The following Dependency Pair can be strictly oriented using the given order.
TOP(ok(X)) -> TOP(active(X))
Moreover, the following usable rules (regarding the implicit AFS) are oriented.
active(cons(X1, X2)) -> cons(active(X1), X2)
active(zeros) -> mark(cons(0, zeros))
active(tail(X)) -> tail(active(X))
proper(zeros) -> ok(zeros)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(tail(X)) -> tail(proper(X))
proper(0) -> ok(0)
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
Used ordering:
Polynomial Order with Interpretation:
POL( TOP(x1) ) = x1
POL( ok(x1) ) = x1 + 1
POL( active(x1) ) = x1
POL( mark(x1) ) = x1 + 1
POL( proper(x1) ) = x1 + 1
POL( cons(x1, x2) ) = x1
POL( zeros ) = 1
POL( 0 ) = 0
POL( tail(x1) ) = x1
This results in one new DP problem.
R
↳RRRPolo
→TRS2
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳SCP
→DP Problem 3
↳SCP
→DP Problem 4
↳SCP
→DP Problem 5
↳MRR
...
→DP Problem 7
↳Modular Removal of Rules
Dependency Pair:
TOP(mark(X)) -> TOP(proper(X))
Rules:
active(cons(X1, X2)) -> cons(active(X1), X2)
active(zeros) -> mark(cons(0, zeros))
active(tail(X)) -> tail(active(X))
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
proper(zeros) -> ok(zeros)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(tail(X)) -> tail(proper(X))
proper(0) -> ok(0)
We have the following set of usable rules:
proper(zeros) -> ok(zeros)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(tail(X)) -> tail(proper(X))
proper(0) -> ok(0)
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
POL(proper(x1)) | = x1 |
POL(0) | = 0 |
POL(cons(x1, x2)) | = x1 + x2 |
POL(tail(x1)) | = x1 |
POL(mark(x1)) | = x1 |
POL(zeros) | = 0 |
POL(TOP(x1)) | = x1 |
POL(ok(x1)) | = x1 |
We have the following set D of usable symbols: {proper, 0, cons, tail, mark, zeros, TOP, ok}
No Dependency Pairs can be deleted.
3 non usable rules have been deleted.
The result of this processor delivers one new DP problem.
R
↳RRRPolo
→TRS2
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳SCP
→DP Problem 3
↳SCP
→DP Problem 4
↳SCP
→DP Problem 5
↳MRR
...
→DP Problem 8
↳Modular Removal of Rules
Dependency Pair:
TOP(mark(X)) -> TOP(proper(X))
Rules:
proper(zeros) -> ok(zeros)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(tail(X)) -> tail(proper(X))
proper(0) -> ok(0)
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
We have the following set of usable rules:
proper(zeros) -> ok(zeros)
proper(cons(X1, X2)) -> cons(proper(X1), proper(X2))
proper(tail(X)) -> tail(proper(X))
proper(0) -> ok(0)
cons(mark(X1), X2) -> mark(cons(X1, X2))
cons(ok(X1), ok(X2)) -> ok(cons(X1, X2))
tail(mark(X)) -> mark(tail(X))
tail(ok(X)) -> ok(tail(X))
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
POL(proper(x1)) | = x1 |
POL(0) | = 0 |
POL(cons(x1, x2)) | = x1 + x2 |
POL(tail(x1)) | = x1 |
POL(mark(x1)) | = 1 + x1 |
POL(zeros) | = 0 |
POL(TOP(x1)) | = x1 |
POL(ok(x1)) | = x1 |
We have the following set D of usable symbols: {proper, 0, cons, tail, mark, zeros, TOP, ok}
The following Dependency Pairs can be deleted as the lhs is strictly greater than the corresponding rhs:
TOP(mark(X)) -> TOP(proper(X))
No Rules can be deleted.
After the removal, there are no SCCs in the dependency graph which results in no DP problems which have to be solved.
Termination of R successfully shown.
Duration:
0:01 minutes