YES

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

The following DP Processors were used


Problem 1 was processed with processor DependencyGraph (17ms).
 | – Problem 2 was processed with processor PolynomialOrderingProcessor (122ms).
 | – Problem 3 was processed with processor SubtermCriterion (1ms).

Problem 1: DependencyGraph



Dependency Pair Problem

Dependency Pairs

minus#(x, s(y)) → p#(minus(x, p(s(y))))minus#(x, s(y)) → minus#(x, p(s(y)))
le#(s(x), s(y)) → le#(x, y)minus#(x, s(y)) → if#(le(x, s(y)), 0, p(minus(x, p(s(y)))))
minus#(x, s(y)) → p#(s(y))minus#(x, s(y)) → le#(x, s(y))

Rewrite Rules

p(0) → 0p(s(x)) → x
le(0, y) → truele(s(x), 0) → false
le(s(x), s(y)) → le(x, y)minus(x, 0) → x
minus(x, s(y)) → if(le(x, s(y)), 0, p(minus(x, p(s(y)))))if(true, x, y) → x
if(false, x, y) → y

Original Signature

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

Strategy


The following SCCs where found

minus#(x, s(y)) → minus#(x, p(s(y)))

le#(s(x), s(y)) → le#(x, y)

Problem 2: PolynomialOrderingProcessor



Dependency Pair Problem

Dependency Pairs

minus#(x, s(y)) → minus#(x, p(s(y)))

Rewrite Rules

p(0) → 0p(s(x)) → x
le(0, y) → truele(s(x), 0) → false
le(s(x), s(y)) → le(x, y)minus(x, 0) → x
minus(x, s(y)) → if(le(x, s(y)), 0, p(minus(x, p(s(y)))))if(true, x, y) → x
if(false, x, y) → y

Original Signature

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

Strategy


Polynomial Interpretation

Improved Usable rules

p(s(x)) → xp(0) → 0

The following dependency pairs are strictly oriented by an ordering on the given polynomial interpretation, thus they are removed:

minus#(x, s(y)) → minus#(x, p(s(y)))

Problem 3: SubtermCriterion



Dependency Pair Problem

Dependency Pairs

le#(s(x), s(y)) → le#(x, y)

Rewrite Rules

p(0) → 0p(s(x)) → x
le(0, y) → truele(s(x), 0) → false
le(s(x), s(y)) → le(x, y)minus(x, 0) → x
minus(x, s(y)) → if(le(x, s(y)), 0, p(minus(x, p(s(y)))))if(true, x, y) → x
if(false, x, y) → y

Original Signature

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

Strategy


Projection

The following projection was used:

Thus, the following dependency pairs are removed:

le#(s(x), s(y)) → le#(x, y)