YES
The TRS could be proven terminating. The proof took 705 ms.
The following DP Processors were used
Problem 1 was processed with processor DependencyGraph (38ms).
| Problem 2 was processed with processor PolynomialLinearRange4iUR (331ms).
| | Problem 6 was processed with processor DependencyGraph (0ms).
| Problem 3 was processed with processor SubtermCriterion (0ms).
| Problem 4 was processed with processor SubtermCriterion (1ms).
| | Problem 5 was processed with processor DependencyGraph (0ms).
Problem 1: DependencyGraph
Dependency Pair Problem
Dependency Pairs
mod#(s(x), s(y)) | → | le#(y, x) | | if_minus#(false, s(x), y) | → | minus#(x, y) |
le#(s(x), s(y)) | → | le#(x, y) | | mod#(s(x), s(y)) | → | if_mod#(le(y, x), s(x), s(y)) |
minus#(s(x), y) | → | le#(s(x), y) | | if_mod#(true, s(x), s(y)) | → | minus#(x, y) |
minus#(s(x), y) | → | if_minus#(le(s(x), y), s(x), y) | | if_mod#(true, s(x), s(y)) | → | mod#(minus(x, y), s(y)) |
Rewrite Rules
le(0, y) | → | true | | le(s(x), 0) | → | false |
le(s(x), s(y)) | → | le(x, y) | | minus(0, y) | → | 0 |
minus(s(x), y) | → | if_minus(le(s(x), y), s(x), y) | | if_minus(true, s(x), y) | → | 0 |
if_minus(false, s(x), y) | → | s(minus(x, y)) | | mod(0, y) | → | 0 |
mod(s(x), 0) | → | 0 | | mod(s(x), s(y)) | → | if_mod(le(y, x), s(x), s(y)) |
if_mod(true, s(x), s(y)) | → | mod(minus(x, y), s(y)) | | if_mod(false, s(x), s(y)) | → | s(x) |
Original Signature
Termination of terms over the following signature is verified: if_minus, 0, minus, le, s, mod, true, false, if_mod
Strategy
The following SCCs where found
if_minus#(false, s(x), y) → minus#(x, y) | minus#(s(x), y) → if_minus#(le(s(x), y), s(x), y) |
le#(s(x), s(y)) → le#(x, y) |
mod#(s(x), s(y)) → if_mod#(le(y, x), s(x), s(y)) | if_mod#(true, s(x), s(y)) → mod#(minus(x, y), s(y)) |
Problem 2: PolynomialLinearRange4iUR
Dependency Pair Problem
Dependency Pairs
mod#(s(x), s(y)) | → | if_mod#(le(y, x), s(x), s(y)) | | if_mod#(true, s(x), s(y)) | → | mod#(minus(x, y), s(y)) |
Rewrite Rules
le(0, y) | → | true | | le(s(x), 0) | → | false |
le(s(x), s(y)) | → | le(x, y) | | minus(0, y) | → | 0 |
minus(s(x), y) | → | if_minus(le(s(x), y), s(x), y) | | if_minus(true, s(x), y) | → | 0 |
if_minus(false, s(x), y) | → | s(minus(x, y)) | | mod(0, y) | → | 0 |
mod(s(x), 0) | → | 0 | | mod(s(x), s(y)) | → | if_mod(le(y, x), s(x), s(y)) |
if_mod(true, s(x), s(y)) | → | mod(minus(x, y), s(y)) | | if_mod(false, s(x), s(y)) | → | s(x) |
Original Signature
Termination of terms over the following signature is verified: if_minus, 0, minus, le, s, mod, true, false, if_mod
Strategy
Polynomial Interpretation
- 0: 2
- false: 0
- if_minus(x,y,z): y
- if_mod(x,y,z): 0
- if_mod#(x,y,z): y
- le(x,y): 0
- minus(x,y): x
- mod(x,y): 0
- mod#(x,y): x
- s(x): 2x + 2
- true: 0
Improved Usable rules
minus(0, y) | → | 0 | | minus(s(x), y) | → | if_minus(le(s(x), y), s(x), y) |
if_minus(true, s(x), y) | → | 0 | | if_minus(false, s(x), y) | → | s(minus(x, y)) |
The following dependency pairs are strictly oriented by an ordering on the given polynomial interpretation, thus they are removed:
if_mod#(true, s(x), s(y)) | → | mod#(minus(x, y), s(y)) |
Problem 6: DependencyGraph
Dependency Pair Problem
Dependency Pairs
mod#(s(x), s(y)) | → | if_mod#(le(y, x), s(x), s(y)) |
Rewrite Rules
le(0, y) | → | true | | le(s(x), 0) | → | false |
le(s(x), s(y)) | → | le(x, y) | | minus(0, y) | → | 0 |
minus(s(x), y) | → | if_minus(le(s(x), y), s(x), y) | | if_minus(true, s(x), y) | → | 0 |
if_minus(false, s(x), y) | → | s(minus(x, y)) | | mod(0, y) | → | 0 |
mod(s(x), 0) | → | 0 | | mod(s(x), s(y)) | → | if_mod(le(y, x), s(x), s(y)) |
if_mod(true, s(x), s(y)) | → | mod(minus(x, y), s(y)) | | if_mod(false, s(x), s(y)) | → | s(x) |
Original Signature
Termination of terms over the following signature is verified: if_minus, minus, 0, s, le, mod, false, true, if_mod
Strategy
There are no SCCs!
Problem 3: SubtermCriterion
Dependency Pair Problem
Dependency Pairs
le#(s(x), s(y)) | → | le#(x, y) |
Rewrite Rules
le(0, y) | → | true | | le(s(x), 0) | → | false |
le(s(x), s(y)) | → | le(x, y) | | minus(0, y) | → | 0 |
minus(s(x), y) | → | if_minus(le(s(x), y), s(x), y) | | if_minus(true, s(x), y) | → | 0 |
if_minus(false, s(x), y) | → | s(minus(x, y)) | | mod(0, y) | → | 0 |
mod(s(x), 0) | → | 0 | | mod(s(x), s(y)) | → | if_mod(le(y, x), s(x), s(y)) |
if_mod(true, s(x), s(y)) | → | mod(minus(x, y), s(y)) | | if_mod(false, s(x), s(y)) | → | s(x) |
Original Signature
Termination of terms over the following signature is verified: if_minus, 0, minus, le, s, mod, true, false, if_mod
Strategy
Projection
The following projection was used:
Thus, the following dependency pairs are removed:
le#(s(x), s(y)) | → | le#(x, y) |
Problem 4: SubtermCriterion
Dependency Pair Problem
Dependency Pairs
if_minus#(false, s(x), y) | → | minus#(x, y) | | minus#(s(x), y) | → | if_minus#(le(s(x), y), s(x), y) |
Rewrite Rules
le(0, y) | → | true | | le(s(x), 0) | → | false |
le(s(x), s(y)) | → | le(x, y) | | minus(0, y) | → | 0 |
minus(s(x), y) | → | if_minus(le(s(x), y), s(x), y) | | if_minus(true, s(x), y) | → | 0 |
if_minus(false, s(x), y) | → | s(minus(x, y)) | | mod(0, y) | → | 0 |
mod(s(x), 0) | → | 0 | | mod(s(x), s(y)) | → | if_mod(le(y, x), s(x), s(y)) |
if_mod(true, s(x), s(y)) | → | mod(minus(x, y), s(y)) | | if_mod(false, s(x), s(y)) | → | s(x) |
Original Signature
Termination of terms over the following signature is verified: if_minus, 0, minus, le, s, mod, true, false, if_mod
Strategy
Projection
The following projection was used:
- π (if_minus#): 2
- π (minus#): 1
Thus, the following dependency pairs are removed:
if_minus#(false, s(x), y) | → | minus#(x, y) |
Problem 5: DependencyGraph
Dependency Pair Problem
Dependency Pairs
minus#(s(x), y) | → | if_minus#(le(s(x), y), s(x), y) |
Rewrite Rules
le(0, y) | → | true | | le(s(x), 0) | → | false |
le(s(x), s(y)) | → | le(x, y) | | minus(0, y) | → | 0 |
minus(s(x), y) | → | if_minus(le(s(x), y), s(x), y) | | if_minus(true, s(x), y) | → | 0 |
if_minus(false, s(x), y) | → | s(minus(x, y)) | | mod(0, y) | → | 0 |
mod(s(x), 0) | → | 0 | | mod(s(x), s(y)) | → | if_mod(le(y, x), s(x), s(y)) |
if_mod(true, s(x), s(y)) | → | mod(minus(x, y), s(y)) | | if_mod(false, s(x), s(y)) | → | s(x) |
Original Signature
Termination of terms over the following signature is verified: if_minus, minus, 0, s, le, mod, false, true, if_mod
Strategy
There are no SCCs!