YES

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

The following DP Processors were used


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

Problem 1: DependencyGraph



Dependency Pair Problem

Dependency Pairs

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

Rewrite Rules

-(0, y) → 0-(x, 0) → x
-(x, s(y)) → if(greater(x, s(y)), s(-(x, p(s(y)))), 0)p(0) → 0
p(s(x)) → x

Original Signature

Termination of terms over the following signature is verified: 0, greater, s, if, p, -

Strategy


The following SCCs where found

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

Problem 2: PolynomialOrderingProcessor



Dependency Pair Problem

Dependency Pairs

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

Rewrite Rules

-(0, y) → 0-(x, 0) → x
-(x, s(y)) → if(greater(x, s(y)), s(-(x, p(s(y)))), 0)p(0) → 0
p(s(x)) → x

Original Signature

Termination of terms over the following signature is verified: 0, greater, s, if, p, -

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:

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