Term Rewriting System R:
[x, y, z]
plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

PLUS(s(x), y) -> PLUS(x, y)
TIMES(s(x), y) -> PLUS(y, times(x, y))
TIMES(s(x), y) -> TIMES(x, y)
DIV(x, y) -> QUOT(x, y, y)
DIV(div(x, y), z) -> DIV(x, times(y, z))
DIV(div(x, y), z) -> TIMES(y, z)
QUOT(s(x), s(y), z) -> QUOT(x, y, z)
QUOT(x, 0, s(z)) -> DIV(x, s(z))
EQ(s(x), s(y)) -> EQ(x, y)
DIVIDES(y, x) -> EQ(x, times(div(x, y), y))
DIVIDES(y, x) -> TIMES(div(x, y), y)
DIVIDES(y, x) -> DIV(x, y)
PRIME(s(s(x))) -> PR(s(s(x)), s(x))
PR(x, s(s(y))) -> IF(divides(s(s(y)), x), x, s(y))
PR(x, s(s(y))) -> DIVIDES(s(s(y)), x)
IF(false, x, y) -> PR(x, y)

Furthermore, R contains five SCCs.


   R
DPs
       →DP Problem 1
Forward Instantiation Transformation
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Nar


Dependency Pair:

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


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

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

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 6
Forward Instantiation Transformation
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Nar


Dependency Pair:

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


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

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

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 6
FwdInst
             ...
               →DP Problem 7
Polynomial Ordering
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Nar


Dependency Pair:

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


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




The following dependency pair can be strictly oriented:

PLUS(s(s(s(x''''))), y'''') -> PLUS(s(s(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(PLUS(x1, x2))=  1 + x1  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 6
FwdInst
             ...
               →DP Problem 8
Dependency Graph
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Nar


Dependency Pair:


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Forward Instantiation Transformation
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Nar


Dependency Pair:

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


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

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

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 9
Forward Instantiation Transformation
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Nar


Dependency Pair:

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


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

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

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 9
FwdInst
             ...
               →DP Problem 10
Polynomial Ordering
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Nar


Dependency Pair:

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


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




The following dependency pair can be strictly oriented:

EQ(s(s(s(x''''))), s(s(s(y'''')))) -> EQ(s(s(x'''')), s(s(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(EQ(x1, x2))=  1 + x1  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 9
FwdInst
             ...
               →DP Problem 11
Dependency Graph
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Nar


Dependency Pair:


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Forward Instantiation Transformation
       →DP Problem 4
Inst
       →DP Problem 5
Nar


Dependency Pair:

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


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

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

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
           →DP Problem 12
Forward Instantiation Transformation
       →DP Problem 4
Inst
       →DP Problem 5
Nar


Dependency Pair:

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


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

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

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
           →DP Problem 12
FwdInst
             ...
               →DP Problem 13
Polynomial Ordering
       →DP Problem 4
Inst
       →DP Problem 5
Nar


Dependency Pair:

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


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




The following dependency pair can be strictly oriented:

TIMES(s(s(s(x''''))), y'''') -> TIMES(s(s(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(TIMES(x1, x2))=  1 + x1  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
           →DP Problem 12
FwdInst
             ...
               →DP Problem 14
Dependency Graph
       →DP Problem 4
Inst
       →DP Problem 5
Nar


Dependency Pair:


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Instantiation Transformation
       →DP Problem 5
Nar


Dependency Pairs:

QUOT(x, 0, s(z)) -> DIV(x, s(z))
QUOT(s(x), s(y), z) -> QUOT(x, y, z)
DIV(x, y) -> QUOT(x, y, y)


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

DIV(x, y) -> QUOT(x, y, y)
one new Dependency Pair is created:

DIV(x'', s(z'')) -> QUOT(x'', s(z''), s(z''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
           →DP Problem 15
Forward Instantiation Transformation
       →DP Problem 5
Nar


Dependency Pairs:

QUOT(s(x), s(y), z) -> QUOT(x, y, z)
DIV(x'', s(z'')) -> QUOT(x'', s(z''), s(z''))
QUOT(x, 0, s(z)) -> DIV(x, s(z))


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

QUOT(s(x), s(y), z) -> QUOT(x, y, z)
two new Dependency Pairs are created:

QUOT(s(s(x'')), s(s(y'')), z'') -> QUOT(s(x''), s(y''), z'')
QUOT(s(x''), s(0), s(z'')) -> QUOT(x'', 0, s(z''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
           →DP Problem 15
FwdInst
             ...
               →DP Problem 16
Forward Instantiation Transformation
       →DP Problem 5
Nar


Dependency Pairs:

QUOT(x, 0, s(z)) -> DIV(x, s(z))
QUOT(s(x''), s(0), s(z'')) -> QUOT(x'', 0, s(z''))
QUOT(s(s(x'')), s(s(y'')), z'') -> QUOT(s(x''), s(y''), z'')
DIV(x'', s(z'')) -> QUOT(x'', s(z''), s(z''))


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

DIV(x'', s(z'')) -> QUOT(x'', s(z''), s(z''))
two new Dependency Pairs are created:

DIV(s(s(x'''')), s(s(y''''))) -> QUOT(s(s(x'''')), s(s(y'''')), s(s(y'''')))
DIV(s(x''''), s(0)) -> QUOT(s(x''''), s(0), s(0))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
           →DP Problem 15
FwdInst
             ...
               →DP Problem 17
Forward Instantiation Transformation
       →DP Problem 5
Nar


Dependency Pairs:

DIV(s(x''''), s(0)) -> QUOT(s(x''''), s(0), s(0))
QUOT(s(x''), s(0), s(z'')) -> QUOT(x'', 0, s(z''))
QUOT(s(s(x'')), s(s(y'')), z'') -> QUOT(s(x''), s(y''), z'')
DIV(s(s(x'''')), s(s(y''''))) -> QUOT(s(s(x'''')), s(s(y'''')), s(s(y'''')))
QUOT(x, 0, s(z)) -> DIV(x, s(z))


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

QUOT(x, 0, s(z)) -> DIV(x, s(z))
two new Dependency Pairs are created:

QUOT(s(s(x'''''')), 0, s(s(y''''''))) -> DIV(s(s(x'''''')), s(s(y'''''')))
QUOT(s(x''''''), 0, s(0)) -> DIV(s(x''''''), s(0))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
           →DP Problem 15
FwdInst
             ...
               →DP Problem 18
Forward Instantiation Transformation
       →DP Problem 5
Nar


Dependency Pairs:

QUOT(s(x''''''), 0, s(0)) -> DIV(s(x''''''), s(0))
QUOT(s(s(x'')), s(s(y'')), z'') -> QUOT(s(x''), s(y''), z'')
DIV(s(s(x'''')), s(s(y''''))) -> QUOT(s(s(x'''')), s(s(y'''')), s(s(y'''')))
QUOT(s(s(x'''''')), 0, s(s(y''''''))) -> DIV(s(s(x'''''')), s(s(y'''''')))
QUOT(s(x''), s(0), s(z'')) -> QUOT(x'', 0, s(z''))
DIV(s(x''''), s(0)) -> QUOT(s(x''''), s(0), s(0))


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

QUOT(s(s(x'')), s(s(y'')), z'') -> QUOT(s(x''), s(y''), z'')
two new Dependency Pairs are created:

QUOT(s(s(s(x''''))), s(s(s(y''''))), z'''') -> QUOT(s(s(x'''')), s(s(y'''')), z'''')
QUOT(s(s(x'''')), s(s(0)), s(z'''')) -> QUOT(s(x''''), s(0), s(z''''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
           →DP Problem 15
FwdInst
             ...
               →DP Problem 19
Forward Instantiation Transformation
       →DP Problem 5
Nar


Dependency Pairs:

QUOT(s(s(x'''')), s(s(0)), s(z'''')) -> QUOT(s(x''''), s(0), s(z''''))
QUOT(s(s(s(x''''))), s(s(s(y''''))), z'''') -> QUOT(s(s(x'''')), s(s(y'''')), z'''')
DIV(s(s(x'''')), s(s(y''''))) -> QUOT(s(s(x'''')), s(s(y'''')), s(s(y'''')))
QUOT(s(s(x'''''')), 0, s(s(y''''''))) -> DIV(s(s(x'''''')), s(s(y'''''')))
QUOT(s(x''), s(0), s(z'')) -> QUOT(x'', 0, s(z''))
DIV(s(x''''), s(0)) -> QUOT(s(x''''), s(0), s(0))
QUOT(s(x''''''), 0, s(0)) -> DIV(s(x''''''), s(0))


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

QUOT(s(x''), s(0), s(z'')) -> QUOT(x'', 0, s(z''))
two new Dependency Pairs are created:

QUOT(s(s(s(x''''''''))), s(0), s(s(y''''''''))) -> QUOT(s(s(x'''''''')), 0, s(s(y'''''''')))
QUOT(s(s(x'''''''')), s(0), s(0)) -> QUOT(s(x''''''''), 0, s(0))

The transformation is resulting in two new DP problems:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
           →DP Problem 15
FwdInst
             ...
               →DP Problem 20
Polynomial Ordering
       →DP Problem 5
Nar


Dependency Pairs:

DIV(s(x''''), s(0)) -> QUOT(s(x''''), s(0), s(0))
QUOT(s(x''''''), 0, s(0)) -> DIV(s(x''''''), s(0))
QUOT(s(s(x'''''''')), s(0), s(0)) -> QUOT(s(x''''''''), 0, s(0))


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




The following dependency pair can be strictly oriented:

QUOT(s(s(x'''''''')), s(0), s(0)) -> QUOT(s(x''''''''), 0, s(0))


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(QUOT(x1, x2, x3))=  x1  
  POL(0)=  0  
  POL(DIV(x1, x2))=  x1  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
           →DP Problem 15
FwdInst
             ...
               →DP Problem 22
Dependency Graph
       →DP Problem 5
Nar


Dependency Pairs:

DIV(s(x''''), s(0)) -> QUOT(s(x''''), s(0), s(0))
QUOT(s(x''''''), 0, s(0)) -> DIV(s(x''''''), s(0))


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
           →DP Problem 15
FwdInst
             ...
               →DP Problem 21
Polynomial Ordering
       →DP Problem 5
Nar


Dependency Pairs:

QUOT(s(s(s(x''''))), s(s(s(y''''))), z'''') -> QUOT(s(s(x'''')), s(s(y'''')), z'''')
DIV(s(s(x'''')), s(s(y''''))) -> QUOT(s(s(x'''')), s(s(y'''')), s(s(y'''')))
QUOT(s(s(x'''''')), 0, s(s(y''''''))) -> DIV(s(s(x'''''')), s(s(y'''''')))
QUOT(s(s(s(x''''''''))), s(0), s(s(y''''''''))) -> QUOT(s(s(x'''''''')), 0, s(s(y'''''''')))
QUOT(s(s(x'''')), s(s(0)), s(z'''')) -> QUOT(s(x''''), s(0), s(z''''))


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




The following dependency pairs can be strictly oriented:

QUOT(s(s(s(x''''))), s(s(s(y''''))), z'''') -> QUOT(s(s(x'''')), s(s(y'''')), z'''')
QUOT(s(s(s(x''''''''))), s(0), s(s(y''''''''))) -> QUOT(s(s(x'''''''')), 0, s(s(y'''''''')))
QUOT(s(s(x'''')), s(s(0)), s(z'''')) -> QUOT(s(x''''), s(0), s(z''''))


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(QUOT(x1, x2, x3))=  x1  
  POL(0)=  0  
  POL(DIV(x1, x2))=  x1  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
           →DP Problem 15
FwdInst
             ...
               →DP Problem 23
Dependency Graph
       →DP Problem 5
Nar


Dependency Pairs:

DIV(s(s(x'''')), s(s(y''''))) -> QUOT(s(s(x'''')), s(s(y'''')), s(s(y'''')))
QUOT(s(s(x'''''')), 0, s(s(y''''''))) -> DIV(s(s(x'''''')), s(s(y'''''')))


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Narrowing Transformation


Dependency Pairs:

IF(false, x, y) -> PR(x, y)
PR(x, s(s(y))) -> IF(divides(s(s(y)), x), x, s(y))


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

PR(x, s(s(y))) -> IF(divides(s(s(y)), x), x, s(y))
one new Dependency Pair is created:

PR(x'', s(s(y''))) -> IF(eq(x'', times(div(x'', s(s(y''))), s(s(y'')))), x'', s(y''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Nar
           →DP Problem 24
Narrowing Transformation


Dependency Pairs:

PR(x'', s(s(y''))) -> IF(eq(x'', times(div(x'', s(s(y''))), s(s(y'')))), x'', s(y''))
IF(false, x, y) -> PR(x, y)


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

PR(x'', s(s(y''))) -> IF(eq(x'', times(div(x'', s(s(y''))), s(s(y'')))), x'', s(y''))
two new Dependency Pairs are created:

PR(0, s(s(y'''))) -> IF(eq(0, times(0, s(s(y''')))), 0, s(y'''))
PR(x''', s(s(y'''))) -> IF(eq(x''', times(quot(x''', s(s(y''')), s(s(y'''))), s(s(y''')))), x''', s(y'''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Nar
           →DP Problem 24
Nar
             ...
               →DP Problem 25
Instantiation Transformation


Dependency Pairs:

PR(x''', s(s(y'''))) -> IF(eq(x''', times(quot(x''', s(s(y''')), s(s(y'''))), s(s(y''')))), x''', s(y'''))
PR(0, s(s(y'''))) -> IF(eq(0, times(0, s(s(y''')))), 0, s(y'''))
IF(false, x, y) -> PR(x, y)


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

IF(false, x, y) -> PR(x, y)
two new Dependency Pairs are created:

IF(false, 0, s(y''''')) -> PR(0, s(y'''''))
IF(false, x', s(y''''')) -> PR(x', s(y'''''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Nar
           →DP Problem 24
Nar
             ...
               →DP Problem 26
Forward Instantiation Transformation


Dependency Pairs:

IF(false, x', s(y''''')) -> PR(x', s(y'''''))
PR(0, s(s(y'''))) -> IF(eq(0, times(0, s(s(y''')))), 0, s(y'''))
IF(false, 0, s(y''''')) -> PR(0, s(y'''''))
PR(x''', s(s(y'''))) -> IF(eq(x''', times(quot(x''', s(s(y''')), s(s(y'''))), s(s(y''')))), x''', s(y'''))


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

IF(false, 0, s(y''''')) -> PR(0, s(y'''''))
one new Dependency Pair is created:

IF(false, 0, s(s(y''''''))) -> PR(0, s(s(y'''''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Nar
           →DP Problem 24
Nar
             ...
               →DP Problem 27
Forward Instantiation Transformation


Dependency Pairs:

PR(x''', s(s(y'''))) -> IF(eq(x''', times(quot(x''', s(s(y''')), s(s(y'''))), s(s(y''')))), x''', s(y'''))
IF(false, 0, s(s(y''''''))) -> PR(0, s(s(y'''''')))
PR(0, s(s(y'''))) -> IF(eq(0, times(0, s(s(y''')))), 0, s(y'''))
IF(false, x', s(y''''')) -> PR(x', s(y'''''))


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




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

IF(false, x', s(y''''')) -> PR(x', s(y'''''))
two new Dependency Pairs are created:

IF(false, 0, s(s(y''''''))) -> PR(0, s(s(y'''''')))
IF(false, x'', s(s(y''''''))) -> PR(x'', s(s(y'''''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Nar
           →DP Problem 24
Nar
             ...
               →DP Problem 28
Polynomial Ordering


Dependency Pairs:

IF(false, x'', s(s(y''''''))) -> PR(x'', s(s(y'''''')))
IF(false, 0, s(s(y''''''))) -> PR(0, s(s(y'''''')))
PR(0, s(s(y'''))) -> IF(eq(0, times(0, s(s(y''')))), 0, s(y'''))
IF(false, 0, s(s(y''''''))) -> PR(0, s(s(y'''''')))
PR(x''', s(s(y'''))) -> IF(eq(x''', times(quot(x''', s(s(y''')), s(s(y'''))), s(s(y''')))), x''', s(y'''))


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




The following dependency pairs can be strictly oriented:

PR(0, s(s(y'''))) -> IF(eq(0, times(0, s(s(y''')))), 0, s(y'''))
PR(x''', s(s(y'''))) -> IF(eq(x''', times(quot(x''', s(s(y''')), s(s(y'''))), s(s(y''')))), x''', s(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(PR(x1, x2))=  x2  
  POL(plus(x1, x2))=  0  
  POL(eq(x1, x2))=  0  
  POL(0)=  0  
  POL(false)=  0  
  POL(times(x1, x2))=  0  
  POL(true)=  0  
  POL(quot(x1, x2, x3))=  0  
  POL(s(x1))=  1 + x1  
  POL(div(x1, x2))=  0  
  POL(IF(x1, x2, x3))=  x3  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Inst
       →DP Problem 5
Nar
           →DP Problem 24
Nar
             ...
               →DP Problem 29
Dependency Graph


Dependency Pairs:

IF(false, x'', s(s(y''''''))) -> PR(x'', s(s(y'''''')))
IF(false, 0, s(s(y''''''))) -> PR(0, s(s(y'''''')))
IF(false, 0, s(s(y''''''))) -> PR(0, s(s(y'''''')))


Rules:


plus(x, 0) -> x
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
times(0, y) -> 0
times(s(0), y) -> y
times(s(x), y) -> plus(y, times(x, y))
div(0, y) -> 0
div(x, y) -> quot(x, y, y)
div(div(x, y), z) -> div(x, times(y, z))
quot(0, s(y), z) -> 0
quot(s(x), s(y), z) -> quot(x, y, z)
quot(x, 0, s(z)) -> s(div(x, s(z)))
eq(0, 0) -> true
eq(s(x), 0) -> false
eq(0, s(y)) -> false
eq(s(x), s(y)) -> eq(x, y)
divides(y, x) -> eq(x, times(div(x, y), y))
prime(s(s(x))) -> pr(s(s(x)), s(x))
pr(x, s(0)) -> true
pr(x, s(s(y))) -> if(divides(s(s(y)), x), x, s(y))
if(true, x, y) -> false
if(false, x, y) -> pr(x, y)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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