YES

The TRS could be proven terminating. The proof took 24 ms.

The following DP Processors were used


Problem 1 was processed with processor DependencyGraph (11ms).
 | – Problem 2 was processed with processor SubtermCriterion (1ms).

Problem 1: DependencyGraph



Dependency Pair Problem

Dependency Pairs

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))

Rewrite Rules

perfectp(0) → falseperfectp(s(x)) → f(x, s(0), s(x), s(x))
f(0, y, 0, u) → truef(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))

Original Signature

Termination of terms over the following signature is verified: f, 0, minus, s, le, if, perfectp, false, true

Strategy


The following SCCs where found

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)

Problem 2: SubtermCriterion



Dependency Pair Problem

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)

Rewrite Rules

perfectp(0) → falseperfectp(s(x)) → f(x, s(0), s(x), s(x))
f(0, y, 0, u) → truef(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))

Original Signature

Termination of terms over the following signature is verified: f, 0, minus, s, le, if, perfectp, false, true

Strategy


Projection

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)