Term Rewriting System R:
[x, y]
p(0) -> 0
p(s(x)) -> x
le(0, y) -> true
le(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

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

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)) -> LE(x, s(y))
MINUS(x, s(y)) -> P(minus(x, p(s(y))))
MINUS(x, s(y)) -> MINUS(x, p(s(y)))
MINUS(x, s(y)) -> P(s(y))

Furthermore, R contains two SCCs.


   R
DPs
       →DP Problem 1
Polynomial Ordering
       →DP Problem 2
Rw


Dependency Pair:

LE(s(x), s(y)) -> LE(x, y)


Rules:


p(0) -> 0
p(s(x)) -> x
le(0, y) -> true
le(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


Strategy:

innermost




The following dependency pair can be strictly oriented:

LE(s(x), s(y)) -> LE(x, y)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 3
Dependency Graph
       →DP Problem 2
Rw


Dependency Pair:


Rules:


p(0) -> 0
p(s(x)) -> x
le(0, y) -> true
le(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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Rewriting Transformation


Dependency Pair:

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


Rules:


p(0) -> 0
p(s(x)) -> x
le(0, y) -> true
le(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


Strategy:

innermost




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

MINUS(x, s(y)) -> MINUS(x, p(s(y)))
one new Dependency Pair is created:

MINUS(x, s(y)) -> MINUS(x, y)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Rw
           →DP Problem 4
Polynomial Ordering


Dependency Pair:

MINUS(x, s(y)) -> MINUS(x, y)


Rules:


p(0) -> 0
p(s(x)) -> x
le(0, y) -> true
le(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


Strategy:

innermost




The following dependency pair can be strictly oriented:

MINUS(x, s(y)) -> MINUS(x, y)


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Rw
           →DP Problem 4
Polo
             ...
               →DP Problem 5
Dependency Graph


Dependency Pair:


Rules:


p(0) -> 0
p(s(x)) -> x
le(0, y) -> true
le(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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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