YES
The TRS could be proven terminating. The proof took 37 ms.
The following DP Processors were used
Problem 1 was processed with processor DependencyGraph (16ms).
| Problem 2 was processed with processor SubtermCriterion (1ms).
| | Problem 4 was processed with processor DependencyGraph (3ms).
| | | Problem 5 was processed with processor SubtermCriterion (4ms).
| Problem 3 was processed with processor SubtermCriterion (1ms).
Problem 1: DependencyGraph
Dependency Pair Problem
Dependency Pairs
sort#(cons(x, y)) | → | sort#(y) | | insert#(x, cons(v, w)) | → | choose#(x, cons(v, w), x, v) |
choose#(x, cons(v, w), s(y), s(z)) | → | choose#(x, cons(v, w), y, z) | | sort#(cons(x, y)) | → | insert#(x, sort(y)) |
choose#(x, cons(v, w), 0, s(z)) | → | insert#(x, w) |
Rewrite Rules
sort(nil) | → | nil | | sort(cons(x, y)) | → | insert(x, sort(y)) |
insert(x, nil) | → | cons(x, nil) | | insert(x, cons(v, w)) | → | choose(x, cons(v, w), x, v) |
choose(x, cons(v, w), y, 0) | → | cons(x, cons(v, w)) | | choose(x, cons(v, w), 0, s(z)) | → | cons(v, insert(x, w)) |
choose(x, cons(v, w), s(y), s(z)) | → | choose(x, cons(v, w), y, z) |
Original Signature
Termination of terms over the following signature is verified: sort, 0, s, insert, choose, nil, cons
Strategy
The following SCCs where found
sort#(cons(x, y)) → sort#(y) |
insert#(x, cons(v, w)) → choose#(x, cons(v, w), x, v) | choose#(x, cons(v, w), s(y), s(z)) → choose#(x, cons(v, w), y, z) |
choose#(x, cons(v, w), 0, s(z)) → insert#(x, w) |
Problem 2: SubtermCriterion
Dependency Pair Problem
Dependency Pairs
insert#(x, cons(v, w)) | → | choose#(x, cons(v, w), x, v) | | choose#(x, cons(v, w), s(y), s(z)) | → | choose#(x, cons(v, w), y, z) |
choose#(x, cons(v, w), 0, s(z)) | → | insert#(x, w) |
Rewrite Rules
sort(nil) | → | nil | | sort(cons(x, y)) | → | insert(x, sort(y)) |
insert(x, nil) | → | cons(x, nil) | | insert(x, cons(v, w)) | → | choose(x, cons(v, w), x, v) |
choose(x, cons(v, w), y, 0) | → | cons(x, cons(v, w)) | | choose(x, cons(v, w), 0, s(z)) | → | cons(v, insert(x, w)) |
choose(x, cons(v, w), s(y), s(z)) | → | choose(x, cons(v, w), y, z) |
Original Signature
Termination of terms over the following signature is verified: sort, 0, s, insert, choose, nil, cons
Strategy
Projection
The following projection was used:
- π (choose#): 2
- π (insert#): 2
Thus, the following dependency pairs are removed:
choose#(x, cons(v, w), 0, s(z)) | → | insert#(x, w) |
Problem 4: DependencyGraph
Dependency Pair Problem
Dependency Pairs
insert#(x, cons(v, w)) | → | choose#(x, cons(v, w), x, v) | | choose#(x, cons(v, w), s(y), s(z)) | → | choose#(x, cons(v, w), y, z) |
Rewrite Rules
sort(nil) | → | nil | | sort(cons(x, y)) | → | insert(x, sort(y)) |
insert(x, nil) | → | cons(x, nil) | | insert(x, cons(v, w)) | → | choose(x, cons(v, w), x, v) |
choose(x, cons(v, w), y, 0) | → | cons(x, cons(v, w)) | | choose(x, cons(v, w), 0, s(z)) | → | cons(v, insert(x, w)) |
choose(x, cons(v, w), s(y), s(z)) | → | choose(x, cons(v, w), y, z) |
Original Signature
Termination of terms over the following signature is verified: 0, sort, s, insert, choose, cons, nil
Strategy
The following SCCs where found
choose#(x, cons(v, w), s(y), s(z)) → choose#(x, cons(v, w), y, z) |
Problem 5: SubtermCriterion
Dependency Pair Problem
Dependency Pairs
choose#(x, cons(v, w), s(y), s(z)) | → | choose#(x, cons(v, w), y, z) |
Rewrite Rules
sort(nil) | → | nil | | sort(cons(x, y)) | → | insert(x, sort(y)) |
insert(x, nil) | → | cons(x, nil) | | insert(x, cons(v, w)) | → | choose(x, cons(v, w), x, v) |
choose(x, cons(v, w), y, 0) | → | cons(x, cons(v, w)) | | choose(x, cons(v, w), 0, s(z)) | → | cons(v, insert(x, w)) |
choose(x, cons(v, w), s(y), s(z)) | → | choose(x, cons(v, w), y, z) |
Original Signature
Termination of terms over the following signature is verified: 0, sort, s, insert, choose, cons, nil
Strategy
Projection
The following projection was used:
Thus, the following dependency pairs are removed:
choose#(x, cons(v, w), s(y), s(z)) | → | choose#(x, cons(v, w), y, z) |
Problem 3: SubtermCriterion
Dependency Pair Problem
Dependency Pairs
sort#(cons(x, y)) | → | sort#(y) |
Rewrite Rules
sort(nil) | → | nil | | sort(cons(x, y)) | → | insert(x, sort(y)) |
insert(x, nil) | → | cons(x, nil) | | insert(x, cons(v, w)) | → | choose(x, cons(v, w), x, v) |
choose(x, cons(v, w), y, 0) | → | cons(x, cons(v, w)) | | choose(x, cons(v, w), 0, s(z)) | → | cons(v, insert(x, w)) |
choose(x, cons(v, w), s(y), s(z)) | → | choose(x, cons(v, w), y, z) |
Original Signature
Termination of terms over the following signature is verified: sort, 0, s, insert, choose, nil, cons
Strategy
Projection
The following projection was used:
Thus, the following dependency pairs are removed:
sort#(cons(x, y)) | → | sort#(y) |