Term Rewriting System R:
[y, x]
-(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

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

-'(x, s(y)) -> -'(x, p(s(y)))
-'(x, s(y)) -> P(s(y))

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Modular Removal of Rules


Dependency Pair:

-'(x, s(y)) -> -'(x, p(s(y)))


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





We have the following set of usable rules:

p(s(x)) -> x
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
  POL(-'(x1, x2))=  x1 + x2  
  POL(s(x1))=  x1  
  POL(p(x1))=  x1  

We have the following set D of usable symbols: {-', s, p}
No Dependency Pairs can be deleted.
4 non usable rules have been deleted.

The result of this processor delivers one new DP problem.



   R
DPs
       →DP Problem 1
MRR
           →DP Problem 2
Modular Removal of Rules


Dependency Pair:

-'(x, s(y)) -> -'(x, p(s(y)))


Rule:


p(s(x)) -> x





We have the following set of usable rules:

p(s(x)) -> x
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
  POL(-'(x1, x2))=  1 + x1 + x2  
  POL(s(x1))=  1 + x1  
  POL(p(x1))=  x1  

We have the following set D of usable symbols: {-', s, p}
No Dependency Pairs can be deleted.
The following rules can be deleted as the lhs is strictly greater than the corresponding rhs:

p(s(x)) -> x


The result of this processor delivers one new DP problem.



   R
DPs
       →DP Problem 1
MRR
           →DP Problem 2
MRR
             ...
               →DP Problem 3
Dependency Graph


Dependency Pair:

-'(x, s(y)) -> -'(x, p(s(y)))


Rule:

none





Using the Dependency Graph resulted in no new DP problems.

Termination of R successfully shown.
Duration:
0:00 minutes