Term Rewriting System R:
[x, y, u, z]
perfectp(0) -> false
perfectp(s(x)) -> f(x, s(0), s(x), s(x))
f(0, y, 0, u) -> true
f(0, y, s(z), u) -> false
f(s(x), 0, z, u) -> f(x, u, minus(z, s(x)), u)
f(s(x), s(y), z, u) -> if(le(x, y), f(s(x), minus(y, x), z, u), f(x, u, z, u))
Innermost Termination of R to be shown.
R
↳Dependency Pair Analysis
R contains the following Dependency Pairs:
PERFECTP(s(x)) -> F(x, s(0), s(x), s(x))
F(s(x), 0, z, u) -> F(x, u, minus(z, s(x)), u)
F(s(x), s(y), z, u) -> F(s(x), minus(y, x), z, u)
F(s(x), s(y), z, u) -> F(x, u, z, u)
Furthermore, R contains one SCC.
R
↳DPs
→DP Problem 1
↳Usable Rules (Innermost)
Dependency Pairs:
F(s(x), 0, z, u) -> F(x, u, minus(z, s(x)), u)
F(s(x), s(y), z, u) -> F(x, u, z, u)
Rules:
perfectp(0) -> false
perfectp(s(x)) -> f(x, s(0), s(x), s(x))
f(0, y, 0, u) -> true
f(0, y, s(z), u) -> false
f(s(x), 0, z, u) -> f(x, u, minus(z, s(x)), u)
f(s(x), s(y), z, u) -> if(le(x, y), f(s(x), minus(y, x), z, u), f(x, u, z, u))
Strategy:
innermost
As we are in the innermost case, we can delete all 6 non-usable-rules.
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳Size-Change Principle
Dependency Pairs:
F(s(x), 0, z, u) -> F(x, u, minus(z, s(x)), u)
F(s(x), s(y), z, u) -> F(x, u, z, u)
Rule:
none
Strategy:
innermost
We number the DPs as follows:
- F(s(x), 0, z, u) -> F(x, u, minus(z, s(x)), u)
- F(s(x), s(y), z, u) -> F(x, u, z, u)
and get the following Size-Change Graph(s): {1, 2} | , | {1, 2} |
---|
1 | > | 1 |
4 | = | 2 |
4 | = | 4 |
|
{1, 2} | , | {1, 2} |
---|
1 | > | 1 |
3 | = | 3 |
4 | = | 2 |
4 | = | 4 |
|
which lead(s) to this/these maximal multigraph(s): {1, 2} | , | {1, 2} |
---|
1 | > | 1 |
4 | = | 2 |
4 | = | 4 |
|
{1, 2} | , | {1, 2} |
---|
1 | > | 1 |
3 | = | 3 |
4 | = | 2 |
4 | = | 4 |
|
DP: empty set
Oriented Rules: none
We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial
with Argument Filtering System:
minus(x1, x2) -> minus(x1, x2)
s(x1) -> s(x1)
We obtain no new DP problems.
Innermost Termination of R successfully shown.
Duration:
0:00 minutes