Term Rewriting System R:
[X, Y]
p(0) -> 0
p(s(X)) -> X
leq(0, Y) -> true
leq(s(X), 0) -> false
leq(s(X), s(Y)) -> leq(X, Y)
if(true, X, Y) -> X
if(false, X, Y) -> Y
diff(X, Y) -> if(leq(X, Y), 0, s(diff(p(X), Y)))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

LEQ(s(X), s(Y)) -> LEQ(X, Y)
DIFF(X, Y) -> IF(leq(X, Y), 0, s(diff(p(X), Y)))
DIFF(X, Y) -> LEQ(X, Y)
DIFF(X, Y) -> DIFF(p(X), Y)
DIFF(X, Y) -> P(X)

Furthermore, R contains two SCCs.


   R
DPs
       →DP Problem 1
Forward Instantiation Transformation
       →DP Problem 2
Remaining


Dependency Pair:

LEQ(s(X), s(Y)) -> LEQ(X, Y)


Rules:


p(0) -> 0
p(s(X)) -> X
leq(0, Y) -> true
leq(s(X), 0) -> false
leq(s(X), s(Y)) -> leq(X, Y)
if(true, X, Y) -> X
if(false, X, Y) -> Y
diff(X, Y) -> if(leq(X, Y), 0, s(diff(p(X), Y)))


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

LEQ(s(X), s(Y)) -> LEQ(X, Y)
one new Dependency Pair is created:

LEQ(s(s(X'')), s(s(Y''))) -> LEQ(s(X''), s(Y''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
Forward Instantiation Transformation
       →DP Problem 2
Remaining


Dependency Pair:

LEQ(s(s(X'')), s(s(Y''))) -> LEQ(s(X''), s(Y''))


Rules:


p(0) -> 0
p(s(X)) -> X
leq(0, Y) -> true
leq(s(X), 0) -> false
leq(s(X), s(Y)) -> leq(X, Y)
if(true, X, Y) -> X
if(false, X, Y) -> Y
diff(X, Y) -> if(leq(X, Y), 0, s(diff(p(X), Y)))


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

LEQ(s(s(X'')), s(s(Y''))) -> LEQ(s(X''), s(Y''))
one new Dependency Pair is created:

LEQ(s(s(s(X''''))), s(s(s(Y'''')))) -> LEQ(s(s(X'''')), s(s(Y'''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 4
Polynomial Ordering
       →DP Problem 2
Remaining


Dependency Pair:

LEQ(s(s(s(X''''))), s(s(s(Y'''')))) -> LEQ(s(s(X'''')), s(s(Y'''')))


Rules:


p(0) -> 0
p(s(X)) -> X
leq(0, Y) -> true
leq(s(X), 0) -> false
leq(s(X), s(Y)) -> leq(X, Y)
if(true, X, Y) -> X
if(false, X, Y) -> Y
diff(X, Y) -> if(leq(X, Y), 0, s(diff(p(X), Y)))


Strategy:

innermost




The following dependency pair can be strictly oriented:

LEQ(s(s(s(X''''))), s(s(s(Y'''')))) -> LEQ(s(s(X'''')), s(s(Y'''')))


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(LEQ(x1, x2))=  1 + x1  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 5
Dependency Graph
       →DP Problem 2
Remaining


Dependency Pair:


Rules:


p(0) -> 0
p(s(X)) -> X
leq(0, Y) -> true
leq(s(X), 0) -> false
leq(s(X), s(Y)) -> leq(X, Y)
if(true, X, Y) -> X
if(false, X, Y) -> Y
diff(X, Y) -> if(leq(X, Y), 0, s(diff(p(X), Y)))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Remaining Obligation(s)




The following remains to be proven:
Dependency Pair:

DIFF(X, Y) -> DIFF(p(X), Y)


Rules:


p(0) -> 0
p(s(X)) -> X
leq(0, Y) -> true
leq(s(X), 0) -> false
leq(s(X), s(Y)) -> leq(X, Y)
if(true, X, Y) -> X
if(false, X, Y) -> Y
diff(X, Y) -> if(leq(X, Y), 0, s(diff(p(X), Y)))


Strategy:

innermost



Innermost Termination of R could not be shown.
Duration:
0:00 minutes