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