YES
The TRS could be proven terminating. The proof took 24 ms.
Problem 1 was processed with processor DependencyGraph (11ms). | Problem 2 was processed with processor SubtermCriterion (1ms).
f#(s(x), s(y), z, u) | → | f#(s(x), minus(y, x), z, u) | 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) | perfectp#(s(x)) | → | f#(x, s(0), s(x), s(x)) |
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)) |
Termination of terms over the following signature is verified: f, 0, minus, s, le, if, perfectp, false, true
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) |
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) |
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)) |
Termination of terms over the following signature is verified: f, 0, minus, s, le, if, perfectp, false, true
The following projection was used:
Thus, the following dependency pairs are removed:
f#(s(x), s(y), z, u) | → | f#(x, u, z, u) | f#(s(x), 0, z, u) | → | f#(x, u, minus(z, s(x)), u) |