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
Forward Instantiation Transformation
       →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




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

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

LE(s(s(x'')), s(s(y''))) -> LE(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
Rw


Dependency Pair:

LE(s(s(x'')), s(s(y''))) -> LE(s(x''), 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 Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

LE(s(s(x'')), s(s(y''))) -> LE(s(x''), s(y''))
one new Dependency Pair is created:

LE(s(s(s(x''''))), s(s(s(y'''')))) -> LE(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
Rw


Dependency Pair:

LE(s(s(s(x''''))), s(s(s(y'''')))) -> LE(s(s(x'''')), s(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




The following dependency pair can be strictly oriented:

LE(s(s(s(x''''))), s(s(s(y'''')))) -> LE(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(LE(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
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
FwdInst
       →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
FwdInst
       →DP Problem 2
Rw
           →DP Problem 6
Forward Instantiation Transformation


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




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

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

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Rw
           →DP Problem 6
FwdInst
             ...
               →DP Problem 7
Polynomial Ordering


Dependency Pair:

MINUS(x'', s(s(y''))) -> MINUS(x'', 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




The following dependency pair can be strictly oriented:

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


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

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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Rw
           →DP Problem 6
FwdInst
             ...
               →DP Problem 8
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