Term Rewriting System R:
[y, x, n, m]
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))

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)
APP(add(n, x), y) -> APP(x, y)
LOW(n, add(m, x)) -> IFLOW(le(m, n), n, add(m, x))
LOW(n, add(m, x)) -> LE(m, n)
IFLOW(true, n, add(m, x)) -> LOW(n, x)
IFLOW(false, n, add(m, x)) -> LOW(n, x)
HIGH(n, add(m, x)) -> IFHIGH(le(m, n), n, add(m, x))
HIGH(n, add(m, x)) -> LE(m, n)
IFHIGH(true, n, add(m, x)) -> HIGH(n, x)
IFHIGH(false, n, add(m, x)) -> HIGH(n, x)
QUICKSORT(add(n, x)) -> APP(quicksort(low(n, x)), add(n, quicksort(high(n, x))))
QUICKSORT(add(n, x)) -> QUICKSORT(low(n, x))
QUICKSORT(add(n, x)) -> LOW(n, x)
QUICKSORT(add(n, x)) -> QUICKSORT(high(n, x))
QUICKSORT(add(n, x)) -> HIGH(n, x)

Furthermore, R contains five SCCs.


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


Dependency Pair:

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


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


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 6
Forward Instantiation Transformation
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:

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


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


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 6
FwdInst
             ...
               →DP Problem 7
Argument Filtering and Ordering
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:

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


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


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 + x2  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.
Used Argument Filtering System:
LE(x1, x2) -> LE(x1, x2)
s(x1) -> s(x1)


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


Dependency Pair:


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


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
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:

APP(add(n, x), y) -> APP(x, y)


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

APP(add(n, x), y) -> APP(x, y)
one new Dependency Pair is created:

APP(add(n, add(n'', x'')), y'') -> APP(add(n'', x''), 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
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:

APP(add(n, add(n'', x'')), y'') -> APP(add(n'', x''), y'')


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

APP(add(n, add(n'', x'')), y'') -> APP(add(n'', x''), y'')
one new Dependency Pair is created:

APP(add(n, add(n'''', add(n''''', x''''))), y'''') -> APP(add(n'''', add(n''''', x'''')), 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
Argument Filtering and Ordering
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:

APP(add(n, add(n'''', add(n''''', x''''))), y'''') -> APP(add(n'''', add(n''''', x'''')), y'''')


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




The following dependency pair can be strictly oriented:

APP(add(n, add(n'''', add(n''''', x''''))), y'''') -> APP(add(n'''', add(n''''', x'''')), y'''')


There are no usable rules for innermost that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(APP(x1, x2))=  1 + x1 + x2  
  POL(add(x1, x2))=  1 + x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
APP(x1, x2) -> APP(x1, x2)
add(x1, x2) -> add(x1, x2)


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


Dependency Pair:


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


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
Narrowing Transformation
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

IFLOW(false, n, add(m, x)) -> LOW(n, x)
IFLOW(true, n, add(m, x)) -> LOW(n, x)
LOW(n, add(m, x)) -> IFLOW(le(m, n), n, add(m, x))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

LOW(n, add(m, x)) -> IFLOW(le(m, n), n, add(m, x))
three new Dependency Pairs are created:

LOW(n', add(0, x)) -> IFLOW(true, n', add(0, x))
LOW(0, add(s(x''), x)) -> IFLOW(false, 0, add(s(x''), x))
LOW(s(y'), add(s(x''), x)) -> IFLOW(le(x'', y'), s(y'), add(s(x''), x))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

LOW(s(y'), add(s(x''), x)) -> IFLOW(le(x'', y'), s(y'), add(s(x''), x))
LOW(0, add(s(x''), x)) -> IFLOW(false, 0, add(s(x''), x))
IFLOW(true, n, add(m, x)) -> LOW(n, x)
LOW(n', add(0, x)) -> IFLOW(true, n', add(0, x))
IFLOW(false, n, add(m, x)) -> LOW(n, x)


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

LOW(s(y'), add(s(x''), x)) -> IFLOW(le(x'', y'), s(y'), add(s(x''), x))
three new Dependency Pairs are created:

LOW(s(y''), add(s(0), x)) -> IFLOW(true, s(y''), add(s(0), x))
LOW(s(0), add(s(s(x''')), x)) -> IFLOW(false, s(0), add(s(s(x''')), x))
LOW(s(s(y'')), add(s(s(x''')), x)) -> IFLOW(le(x''', y''), s(s(y'')), add(s(s(x''')), x))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

LOW(s(s(y'')), add(s(s(x''')), x)) -> IFLOW(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
LOW(s(0), add(s(s(x''')), x)) -> IFLOW(false, s(0), add(s(s(x''')), x))
LOW(s(y''), add(s(0), x)) -> IFLOW(true, s(y''), add(s(0), x))
IFLOW(true, n, add(m, x)) -> LOW(n, x)
LOW(n', add(0, x)) -> IFLOW(true, n', add(0, x))
IFLOW(false, n, add(m, x)) -> LOW(n, x)
LOW(0, add(s(x''), x)) -> IFLOW(false, 0, add(s(x''), x))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFLOW(true, n, add(m, x)) -> LOW(n, x)
three new Dependency Pairs are created:

IFLOW(true, n', add(0, x'')) -> LOW(n', x'')
IFLOW(true, s(y''''), add(s(0), x'')) -> LOW(s(y''''), x'')
IFLOW(true, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFLOW(true, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')
LOW(s(0), add(s(s(x''')), x)) -> IFLOW(false, s(0), add(s(s(x''')), x))
IFLOW(true, s(y''''), add(s(0), x'')) -> LOW(s(y''''), x'')
LOW(s(y''), add(s(0), x)) -> IFLOW(true, s(y''), add(s(0), x))
LOW(0, add(s(x''), x)) -> IFLOW(false, 0, add(s(x''), x))
IFLOW(true, n', add(0, x'')) -> LOW(n', x'')
LOW(n', add(0, x)) -> IFLOW(true, n', add(0, x))
IFLOW(false, n, add(m, x)) -> LOW(n, x)
LOW(s(s(y'')), add(s(s(x''')), x)) -> IFLOW(le(x''', y''), s(s(y'')), add(s(s(x''')), x))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFLOW(false, n, add(m, x)) -> LOW(n, x)
three new Dependency Pairs are created:

IFLOW(false, 0, add(s(x''''), x'')) -> LOW(0, x'')
IFLOW(false, s(0), add(s(s(x''''')), x'')) -> LOW(s(0), x'')
IFLOW(false, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFLOW(false, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')
LOW(s(s(y'')), add(s(s(x''')), x)) -> IFLOW(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFLOW(false, s(0), add(s(s(x''''')), x'')) -> LOW(s(0), x'')
LOW(s(0), add(s(s(x''')), x)) -> IFLOW(false, s(0), add(s(s(x''')), x))
IFLOW(true, s(y''''), add(s(0), x'')) -> LOW(s(y''''), x'')
LOW(s(y''), add(s(0), x)) -> IFLOW(true, s(y''), add(s(0), x))
IFLOW(false, 0, add(s(x''''), x'')) -> LOW(0, x'')
LOW(0, add(s(x''), x)) -> IFLOW(false, 0, add(s(x''), x))
IFLOW(true, n', add(0, x'')) -> LOW(n', x'')
LOW(n', add(0, x)) -> IFLOW(true, n', add(0, x))
IFLOW(true, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFLOW(true, n', add(0, x'')) -> LOW(n', x'')
five new Dependency Pairs are created:

IFLOW(true, n''', add(0, add(0, x'''))) -> LOW(n''', add(0, x'''))
IFLOW(true, 0, add(0, add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
IFLOW(true, s(y''''), add(0, add(s(0), x'''))) -> LOW(s(y''''), add(s(0), x'''))
IFLOW(true, s(0), add(0, add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> LOW(s(s(y'''')), add(s(s(x''''')), x'''))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFLOW(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> LOW(s(s(y'''')), add(s(s(x''''')), x'''))
IFLOW(true, s(0), add(0, add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(true, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')
LOW(s(s(y'')), add(s(s(x''')), x)) -> IFLOW(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFLOW(false, s(0), add(s(s(x''''')), x'')) -> LOW(s(0), x'')
LOW(s(0), add(s(s(x''')), x)) -> IFLOW(false, s(0), add(s(s(x''')), x))
IFLOW(true, s(y''''), add(s(0), x'')) -> LOW(s(y''''), x'')
LOW(s(y''), add(s(0), x)) -> IFLOW(true, s(y''), add(s(0), x))
IFLOW(true, s(y''''), add(0, add(s(0), x'''))) -> LOW(s(y''''), add(s(0), x'''))
IFLOW(false, 0, add(s(x''''), x'')) -> LOW(0, x'')
LOW(0, add(s(x''), x)) -> IFLOW(false, 0, add(s(x''), x))
IFLOW(true, 0, add(0, add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
IFLOW(true, n''', add(0, add(0, x'''))) -> LOW(n''', add(0, x'''))
LOW(n', add(0, x)) -> IFLOW(true, n', add(0, x))
IFLOW(false, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

LOW(n', add(0, x)) -> IFLOW(true, n', add(0, x))
five new Dependency Pairs are created:

LOW(n'', add(0, add(0, x'''''))) -> IFLOW(true, n'', add(0, add(0, x''''')))
LOW(0, add(0, add(s(x''''''), x'0''))) -> IFLOW(true, 0, add(0, add(s(x''''''), x'0'')))
LOW(s(y''''''), add(0, add(s(0), x'''''))) -> IFLOW(true, s(y''''''), add(0, add(s(0), x''''')))
LOW(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(0), add(0, add(s(s(x''''''')), x''''')))
LOW(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFLOW(false, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')
LOW(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFLOW(true, s(0), add(0, add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
LOW(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFLOW(true, s(y''''), add(0, add(s(0), x'''))) -> LOW(s(y''''), add(s(0), x'''))
LOW(s(y''''''), add(0, add(s(0), x'''''))) -> IFLOW(true, s(y''''''), add(0, add(s(0), x''''')))
IFLOW(false, 0, add(s(x''''), x'')) -> LOW(0, x'')
LOW(0, add(s(x''), x)) -> IFLOW(false, 0, add(s(x''), x))
IFLOW(true, 0, add(0, add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
LOW(0, add(0, add(s(x''''''), x'0''))) -> IFLOW(true, 0, add(0, add(s(x''''''), x'0'')))
IFLOW(true, n''', add(0, add(0, x'''))) -> LOW(n''', add(0, x'''))
LOW(n'', add(0, add(0, x'''''))) -> IFLOW(true, n'', add(0, add(0, x''''')))
IFLOW(false, s(0), add(s(s(x''''')), x'')) -> LOW(s(0), x'')
LOW(s(0), add(s(s(x''')), x)) -> IFLOW(false, s(0), add(s(s(x''')), x))
IFLOW(true, s(y''''), add(s(0), x'')) -> LOW(s(y''''), x'')
LOW(s(y''), add(s(0), x)) -> IFLOW(true, s(y''), add(s(0), x))
IFLOW(true, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')
LOW(s(s(y'')), add(s(s(x''')), x)) -> IFLOW(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFLOW(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> LOW(s(s(y'''')), add(s(s(x''''')), x'''))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFLOW(true, s(y''''), add(s(0), x'')) -> LOW(s(y''''), x'')
seven new Dependency Pairs are created:

IFLOW(true, s(y'''''), add(s(0), add(s(0), x'''))) -> LOW(s(y'''''), add(s(0), x'''))
IFLOW(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> LOW(s(y'''''), add(0, add(0, x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> LOW(s(y'''''), add(0, add(s(0), x''''''')))
IFLOW(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFLOW(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> LOW(s(y'''''), add(0, add(s(0), x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> LOW(s(y'''''), add(0, add(0, x''''''')))
IFLOW(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(true, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')
LOW(s(s(y'')), add(s(s(x''')), x)) -> IFLOW(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFLOW(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> LOW(s(s(y'''')), add(s(s(x''''')), x'''))
LOW(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFLOW(true, s(0), add(0, add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
LOW(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFLOW(true, s(y''''), add(0, add(s(0), x'''))) -> LOW(s(y''''), add(s(0), x'''))
LOW(s(y''''''), add(0, add(s(0), x'''''))) -> IFLOW(true, s(y''''''), add(0, add(s(0), x''''')))
IFLOW(false, 0, add(s(x''''), x'')) -> LOW(0, x'')
LOW(0, add(s(x''), x)) -> IFLOW(false, 0, add(s(x''), x))
IFLOW(true, 0, add(0, add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
LOW(0, add(0, add(s(x''''''), x'0''))) -> IFLOW(true, 0, add(0, add(s(x''''''), x'0'')))
IFLOW(true, n''', add(0, add(0, x'''))) -> LOW(n''', add(0, x'''))
LOW(n'', add(0, add(0, x'''''))) -> IFLOW(true, n'', add(0, add(0, x''''')))
IFLOW(false, s(0), add(s(s(x''''')), x'')) -> LOW(s(0), x'')
LOW(s(0), add(s(s(x''')), x)) -> IFLOW(false, s(0), add(s(s(x''')), x))
IFLOW(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(true, s(y'''''), add(s(0), add(s(0), x'''))) -> LOW(s(y'''''), add(s(0), x'''))
LOW(s(y''), add(s(0), x)) -> IFLOW(true, s(y''), add(s(0), x))
IFLOW(false, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFLOW(true, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')
five new Dependency Pairs are created:

IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> LOW(s(s(y''''')), add(s(0), x'''))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> LOW(s(s(y''''')), add(0, add(0, x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(0), x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(0), x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> LOW(s(s(y''''')), add(0, add(0, x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> LOW(s(s(y''''')), add(s(0), x'''))
IFLOW(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> LOW(s(y'''''), add(0, add(s(0), x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> LOW(s(y'''''), add(0, add(0, x''''''')))
IFLOW(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(true, s(0), add(0, add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
LOW(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFLOW(true, s(y''''), add(0, add(s(0), x'''))) -> LOW(s(y''''), add(s(0), x'''))
LOW(s(y''''''), add(0, add(s(0), x'''''))) -> IFLOW(true, s(y''''''), add(0, add(s(0), x''''')))
IFLOW(false, 0, add(s(x''''), x'')) -> LOW(0, x'')
LOW(0, add(s(x''), x)) -> IFLOW(false, 0, add(s(x''), x))
IFLOW(true, 0, add(0, add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
LOW(0, add(0, add(s(x''''''), x'0''))) -> IFLOW(true, 0, add(0, add(s(x''''''), x'0'')))
IFLOW(true, n''', add(0, add(0, x'''))) -> LOW(n''', add(0, x'''))
LOW(n'', add(0, add(0, x'''''))) -> IFLOW(true, n'', add(0, add(0, x''''')))
IFLOW(false, s(0), add(s(s(x''''')), x'')) -> LOW(s(0), x'')
LOW(s(0), add(s(s(x''')), x)) -> IFLOW(false, s(0), add(s(s(x''')), x))
IFLOW(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(true, s(y'''''), add(s(0), add(s(0), x'''))) -> LOW(s(y'''''), add(s(0), x'''))
LOW(s(y''), add(s(0), x)) -> IFLOW(true, s(y''), add(s(0), x))
IFLOW(false, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')
LOW(s(s(y'')), add(s(s(x''')), x)) -> IFLOW(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFLOW(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> LOW(s(s(y'''')), add(s(s(x''''')), x'''))
LOW(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFLOW(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFLOW(false, 0, add(s(x''''), x'')) -> LOW(0, x'')
three new Dependency Pairs are created:

IFLOW(false, 0, add(s(x''''), add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
IFLOW(false, 0, add(s(x''''), add(0, add(0, x''''''')))) -> LOW(0, add(0, add(0, x''''''')))
IFLOW(false, 0, add(s(x''''), add(0, add(s(x''''''''), x'0'''')))) -> LOW(0, add(0, add(s(x''''''''), x'0'''')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(0), x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> LOW(s(s(y''''')), add(0, add(0, x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> LOW(s(s(y''''')), add(s(0), x'''))
IFLOW(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> LOW(s(y'''''), add(0, add(s(0), x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> LOW(s(y'''''), add(0, add(0, x''''''')))
IFLOW(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(true, s(0), add(0, add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
LOW(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFLOW(true, s(y''''), add(0, add(s(0), x'''))) -> LOW(s(y''''), add(s(0), x'''))
LOW(s(y''''''), add(0, add(s(0), x'''''))) -> IFLOW(true, s(y''''''), add(0, add(s(0), x''''')))
IFLOW(false, 0, add(s(x''''), add(0, add(s(x''''''''), x'0'''')))) -> LOW(0, add(0, add(s(x''''''''), x'0'''')))
IFLOW(false, 0, add(s(x''''), add(0, add(0, x''''''')))) -> LOW(0, add(0, add(0, x''''''')))
IFLOW(false, 0, add(s(x''''), add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
LOW(0, add(s(x''), x)) -> IFLOW(false, 0, add(s(x''), x))
IFLOW(true, 0, add(0, add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
LOW(0, add(0, add(s(x''''''), x'0''))) -> IFLOW(true, 0, add(0, add(s(x''''''), x'0'')))
IFLOW(true, n''', add(0, add(0, x'''))) -> LOW(n''', add(0, x'''))
LOW(n'', add(0, add(0, x'''''))) -> IFLOW(true, n'', add(0, add(0, x''''')))
IFLOW(false, s(0), add(s(s(x''''')), x'')) -> LOW(s(0), x'')
LOW(s(0), add(s(s(x''')), x)) -> IFLOW(false, s(0), add(s(s(x''')), x))
IFLOW(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(true, s(y'''''), add(s(0), add(s(0), x'''))) -> LOW(s(y'''''), add(s(0), x'''))
LOW(s(y''), add(s(0), x)) -> IFLOW(true, s(y''), add(s(0), x))
IFLOW(false, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')
LOW(s(s(y'')), add(s(s(x''')), x)) -> IFLOW(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFLOW(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> LOW(s(s(y'''')), add(s(s(x''''')), x'''))
LOW(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

LOW(0, add(s(x''), x)) -> IFLOW(false, 0, add(s(x''), x))
three new Dependency Pairs are created:

LOW(0, add(s(x'''), add(s(x'''''''), x'0''))) -> IFLOW(false, 0, add(s(x'''), add(s(x'''''''), x'0'')))
LOW(0, add(s(x'''), add(0, add(0, x''''''''')))) -> IFLOW(false, 0, add(s(x'''), add(0, add(0, x'''''''''))))
LOW(0, add(s(x'''), add(0, add(s(x''''''''''), x'0'''''')))) -> IFLOW(false, 0, add(s(x'''), add(0, add(s(x''''''''''), x'0''''''))))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFLOW(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> LOW(s(y'''''), add(0, add(s(0), x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> LOW(s(y'''''), add(0, add(0, x''''''')))
IFLOW(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> LOW(s(s(y''''')), add(0, add(0, x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> LOW(s(s(y''''')), add(s(0), x'''))
IFLOW(false, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')
LOW(s(s(y'')), add(s(s(x''')), x)) -> IFLOW(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFLOW(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> LOW(s(s(y'''')), add(s(s(x''''')), x'''))
LOW(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFLOW(true, s(0), add(0, add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
LOW(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFLOW(false, 0, add(s(x''''), add(0, add(s(x''''''''), x'0'''')))) -> LOW(0, add(0, add(s(x''''''''), x'0'''')))
LOW(0, add(s(x'''), add(0, add(s(x''''''''''), x'0'''''')))) -> IFLOW(false, 0, add(s(x'''), add(0, add(s(x''''''''''), x'0''''''))))
IFLOW(false, 0, add(s(x''''), add(0, add(0, x''''''')))) -> LOW(0, add(0, add(0, x''''''')))
LOW(0, add(s(x'''), add(0, add(0, x''''''''')))) -> IFLOW(false, 0, add(s(x'''), add(0, add(0, x'''''''''))))
IFLOW(false, 0, add(s(x''''), add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
LOW(0, add(s(x'''), add(s(x'''''''), x'0''))) -> IFLOW(false, 0, add(s(x'''), add(s(x'''''''), x'0'')))
IFLOW(true, 0, add(0, add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
LOW(0, add(0, add(s(x''''''), x'0''))) -> IFLOW(true, 0, add(0, add(s(x''''''), x'0'')))
IFLOW(true, n''', add(0, add(0, x'''))) -> LOW(n''', add(0, x'''))
LOW(n'', add(0, add(0, x'''''))) -> IFLOW(true, n'', add(0, add(0, x''''')))
IFLOW(false, s(0), add(s(s(x''''')), x'')) -> LOW(s(0), x'')
LOW(s(0), add(s(s(x''')), x)) -> IFLOW(false, s(0), add(s(s(x''')), x))
IFLOW(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(true, s(y'''''), add(s(0), add(s(0), x'''))) -> LOW(s(y'''''), add(s(0), x'''))
LOW(s(y''), add(s(0), x)) -> IFLOW(true, s(y''), add(s(0), x))
IFLOW(true, s(y''''), add(0, add(s(0), x'''))) -> LOW(s(y''''), add(s(0), x'''))
LOW(s(y''''''), add(0, add(s(0), x'''''))) -> IFLOW(true, s(y''''''), add(0, add(s(0), x''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(0), x''''''')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFLOW(false, s(0), add(s(s(x''''')), x'')) -> LOW(s(0), x'')
five new Dependency Pairs are created:

IFLOW(false, s(0), add(s(s(x''''')), add(s(0), x'''))) -> LOW(s(0), add(s(0), x'''))
IFLOW(false, s(0), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(false, s(0), add(s(s(x''''')), add(0, add(0, x''''''')))) -> LOW(s(0), add(0, add(0, x''''''')))
IFLOW(false, s(0), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> LOW(s(0), add(0, add(s(0), x''''''')))
IFLOW(false, s(0), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(0), add(0, add(s(s(x''''''''')), x''''''')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(0), x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> LOW(s(s(y''''')), add(0, add(0, x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> LOW(s(s(y''''')), add(s(0), x'''))
IFLOW(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> LOW(s(y'''''), add(0, add(s(0), x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> LOW(s(y'''''), add(0, add(0, x''''''')))
IFLOW(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(false, s(0), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(false, s(0), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> LOW(s(0), add(0, add(s(0), x''''''')))
IFLOW(true, s(0), add(0, add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
LOW(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFLOW(true, s(y''''), add(0, add(s(0), x'''))) -> LOW(s(y''''), add(s(0), x'''))
LOW(s(y''''''), add(0, add(s(0), x'''''))) -> IFLOW(true, s(y''''''), add(0, add(s(0), x''''')))
IFLOW(false, 0, add(s(x''''), add(0, add(s(x''''''''), x'0'''')))) -> LOW(0, add(0, add(s(x''''''''), x'0'''')))
LOW(0, add(s(x'''), add(0, add(s(x''''''''''), x'0'''''')))) -> IFLOW(false, 0, add(s(x'''), add(0, add(s(x''''''''''), x'0''''''))))
IFLOW(false, 0, add(s(x''''), add(0, add(0, x''''''')))) -> LOW(0, add(0, add(0, x''''''')))
LOW(0, add(s(x'''), add(0, add(0, x''''''''')))) -> IFLOW(false, 0, add(s(x'''), add(0, add(0, x'''''''''))))
IFLOW(false, 0, add(s(x''''), add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
LOW(0, add(s(x'''), add(s(x'''''''), x'0''))) -> IFLOW(false, 0, add(s(x'''), add(s(x'''''''), x'0'')))
IFLOW(true, 0, add(0, add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
LOW(0, add(0, add(s(x''''''), x'0''))) -> IFLOW(true, 0, add(0, add(s(x''''''), x'0'')))
IFLOW(true, n''', add(0, add(0, x'''))) -> LOW(n''', add(0, x'''))
LOW(n'', add(0, add(0, x'''''))) -> IFLOW(true, n'', add(0, add(0, x''''')))
IFLOW(false, s(0), add(s(s(x''''')), add(0, add(0, x''''''')))) -> LOW(s(0), add(0, add(0, x''''''')))
IFLOW(false, s(0), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(false, s(0), add(s(s(x''''')), add(s(0), x'''))) -> LOW(s(0), add(s(0), x'''))
LOW(s(0), add(s(s(x''')), x)) -> IFLOW(false, s(0), add(s(s(x''')), x))
IFLOW(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(true, s(y'''''), add(s(0), add(s(0), x'''))) -> LOW(s(y'''''), add(s(0), x'''))
LOW(s(y''), add(s(0), x)) -> IFLOW(true, s(y''), add(s(0), x))
IFLOW(false, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')
LOW(s(s(y'')), add(s(s(x''')), x)) -> IFLOW(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFLOW(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> LOW(s(s(y'''')), add(s(s(x''''')), x'''))
LOW(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFLOW(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFLOW(false, s(s(y'''')), add(s(s(x''''')), x')) -> LOW(s(s(y'''')), x')
five new Dependency Pairs are created:

IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> LOW(s(s(y''''')), add(s(0), x'''))
IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> LOW(s(s(y''''')), add(0, add(0, x''''''')))
IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(0), x''''''')))
IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 23
Argument Filtering and Ordering
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(0), x''''''')))
IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> LOW(s(s(y''''')), add(0, add(0, x''''''')))
IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> LOW(s(s(y''''')), add(s(0), x'''))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(0), x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> LOW(s(s(y''''')), add(0, add(0, x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> LOW(s(y'''''), add(0, add(s(0), x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> LOW(s(y'''''), add(0, add(0, x''''''')))
IFLOW(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(false, s(0), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(false, s(0), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> LOW(s(0), add(0, add(s(0), x''''''')))
IFLOW(true, s(0), add(0, add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
LOW(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFLOW(true, s(y''''), add(0, add(s(0), x'''))) -> LOW(s(y''''), add(s(0), x'''))
LOW(s(y''''''), add(0, add(s(0), x'''''))) -> IFLOW(true, s(y''''''), add(0, add(s(0), x''''')))
IFLOW(false, 0, add(s(x''''), add(0, add(s(x''''''''), x'0'''')))) -> LOW(0, add(0, add(s(x''''''''), x'0'''')))
LOW(0, add(s(x'''), add(0, add(s(x''''''''''), x'0'''''')))) -> IFLOW(false, 0, add(s(x'''), add(0, add(s(x''''''''''), x'0''''''))))
IFLOW(false, 0, add(s(x''''), add(0, add(0, x''''''')))) -> LOW(0, add(0, add(0, x''''''')))
LOW(0, add(s(x'''), add(0, add(0, x''''''''')))) -> IFLOW(false, 0, add(s(x'''), add(0, add(0, x'''''''''))))
IFLOW(false, 0, add(s(x''''), add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
LOW(0, add(s(x'''), add(s(x'''''''), x'0''))) -> IFLOW(false, 0, add(s(x'''), add(s(x'''''''), x'0'')))
IFLOW(true, 0, add(0, add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
LOW(0, add(0, add(s(x''''''), x'0''))) -> IFLOW(true, 0, add(0, add(s(x''''''), x'0'')))
IFLOW(true, n''', add(0, add(0, x'''))) -> LOW(n''', add(0, x'''))
LOW(n'', add(0, add(0, x'''''))) -> IFLOW(true, n'', add(0, add(0, x''''')))
IFLOW(false, s(0), add(s(s(x''''')), add(0, add(0, x''''''')))) -> LOW(s(0), add(0, add(0, x''''''')))
IFLOW(false, s(0), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(false, s(0), add(s(s(x''''')), add(s(0), x'''))) -> LOW(s(0), add(s(0), x'''))
LOW(s(0), add(s(s(x''')), x)) -> IFLOW(false, s(0), add(s(s(x''')), x))
IFLOW(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(true, s(y'''''), add(s(0), add(s(0), x'''))) -> LOW(s(y'''''), add(s(0), x'''))
LOW(s(y''), add(s(0), x)) -> IFLOW(true, s(y''), add(s(0), x))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> LOW(s(s(y''''')), add(s(0), x'''))
LOW(s(s(y'')), add(s(s(x''')), x)) -> IFLOW(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFLOW(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> LOW(s(s(y'''')), add(s(s(x''''')), x'''))
LOW(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(0), x''''''')))
IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> LOW(s(s(y''''')), add(0, add(0, x''''''')))
IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(false, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> LOW(s(s(y''''')), add(s(0), x'''))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(0), x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> LOW(s(s(y''''')), add(0, add(0, x''''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> LOW(s(y'''''), add(0, add(s(0), x''''''')))
IFLOW(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> LOW(s(y'''''), add(0, add(0, x''''''')))
IFLOW(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(s(y''''')), add(s(s(x''''')), x'''))
IFLOW(false, s(0), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFLOW(false, s(0), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> LOW(s(0), add(0, add(s(0), x''''''')))
LOW(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(0), add(0, add(s(s(x''''''')), x''''')))
LOW(s(y''''''), add(0, add(s(0), x'''''))) -> IFLOW(true, s(y''''''), add(0, add(s(0), x''''')))
LOW(0, add(s(x'''), add(0, add(s(x''''''''''), x'0'''''')))) -> IFLOW(false, 0, add(s(x'''), add(0, add(s(x''''''''''), x'0''''''))))
LOW(0, add(s(x'''), add(0, add(0, x''''''''')))) -> IFLOW(false, 0, add(s(x'''), add(0, add(0, x'''''''''))))
LOW(0, add(s(x'''), add(s(x'''''''), x'0''))) -> IFLOW(false, 0, add(s(x'''), add(s(x'''''''), x'0'')))
LOW(0, add(0, add(s(x''''''), x'0''))) -> IFLOW(true, 0, add(0, add(s(x''''''), x'0'')))
LOW(n'', add(0, add(0, x'''''))) -> IFLOW(true, n'', add(0, add(0, x''''')))
IFLOW(false, s(0), add(s(s(x''''')), add(0, add(0, x''''''')))) -> LOW(s(0), add(0, add(0, x''''''')))
IFLOW(false, s(0), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(false, s(0), add(s(s(x''''')), add(s(0), x'''))) -> LOW(s(0), add(s(0), x'''))
LOW(s(0), add(s(s(x''')), x)) -> IFLOW(false, s(0), add(s(s(x''')), x))
IFLOW(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(true, s(y'''''), add(s(0), add(s(0), x'''))) -> LOW(s(y'''''), add(s(0), x'''))
LOW(s(y''), add(s(0), x)) -> IFLOW(true, s(y''), add(s(0), x))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> LOW(s(s(y''''')), add(s(0), x'''))
LOW(s(s(y'')), add(s(s(x''')), x)) -> IFLOW(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
LOW(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFLOW(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFLOW(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))


The following usable rules for innermost can be oriented:

le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(0)=  1  
  POL(LOW(x1, x2))=  1 + x1 + x2  
  POL(false)=  0  
  POL(IF_LOW(x1, x2, x3))=  x1 + x2 + x3  
  POL(true)=  0  
  POL(s(x1))=  1 + x1  
  POL(le)=  0  
  POL(add(x1, x2))=  x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
LOW(x1, x2) -> LOW(x1, x2)
IFLOW(x1, x2, x3) -> IFLOW(x1, x2, x3)
s(x1) -> s(x1)
add(x1, x2) -> add(x1, x2)
le(x1, x2) -> le


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


Dependency Pairs:

IFLOW(true, s(0), add(0, add(s(s(x''''')), x'''))) -> LOW(s(0), add(s(s(x''''')), x'''))
IFLOW(true, s(y''''), add(0, add(s(0), x'''))) -> LOW(s(y''''), add(s(0), x'''))
IFLOW(false, 0, add(s(x''''), add(0, add(s(x''''''''), x'0'''')))) -> LOW(0, add(0, add(s(x''''''''), x'0'''')))
IFLOW(false, 0, add(s(x''''), add(0, add(0, x''''''')))) -> LOW(0, add(0, add(0, x''''''')))
IFLOW(false, 0, add(s(x''''), add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
IFLOW(true, 0, add(0, add(s(x''''), x'0))) -> LOW(0, add(s(x''''), x'0))
IFLOW(true, n''', add(0, add(0, x'''))) -> LOW(n''', add(0, x'''))
IFLOW(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> LOW(s(s(y'''')), add(s(s(x''''')), x'''))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


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
Nar
       →DP Problem 4
Narrowing Transformation
       →DP Problem 5
Nar


Dependency Pairs:

IFHIGH(false, n, add(m, x)) -> HIGH(n, x)
IFHIGH(true, n, add(m, x)) -> HIGH(n, x)
HIGH(n, add(m, x)) -> IFHIGH(le(m, n), n, add(m, x))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

HIGH(n, add(m, x)) -> IFHIGH(le(m, n), n, add(m, x))
three new Dependency Pairs are created:

HIGH(n', add(0, x)) -> IFHIGH(true, n', add(0, x))
HIGH(0, add(s(x''), x)) -> IFHIGH(false, 0, add(s(x''), x))
HIGH(s(y'), add(s(x''), x)) -> IFHIGH(le(x'', y'), s(y'), add(s(x''), x))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

HIGH(s(y'), add(s(x''), x)) -> IFHIGH(le(x'', y'), s(y'), add(s(x''), x))
HIGH(0, add(s(x''), x)) -> IFHIGH(false, 0, add(s(x''), x))
IFHIGH(true, n, add(m, x)) -> HIGH(n, x)
HIGH(n', add(0, x)) -> IFHIGH(true, n', add(0, x))
IFHIGH(false, n, add(m, x)) -> HIGH(n, x)


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

HIGH(s(y'), add(s(x''), x)) -> IFHIGH(le(x'', y'), s(y'), add(s(x''), x))
three new Dependency Pairs are created:

HIGH(s(y''), add(s(0), x)) -> IFHIGH(true, s(y''), add(s(0), x))
HIGH(s(0), add(s(s(x''')), x)) -> IFHIGH(false, s(0), add(s(s(x''')), x))
HIGH(s(s(y'')), add(s(s(x''')), x)) -> IFHIGH(le(x''', y''), s(s(y'')), add(s(s(x''')), x))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

HIGH(s(s(y'')), add(s(s(x''')), x)) -> IFHIGH(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
HIGH(s(0), add(s(s(x''')), x)) -> IFHIGH(false, s(0), add(s(s(x''')), x))
HIGH(s(y''), add(s(0), x)) -> IFHIGH(true, s(y''), add(s(0), x))
IFHIGH(true, n, add(m, x)) -> HIGH(n, x)
HIGH(n', add(0, x)) -> IFHIGH(true, n', add(0, x))
IFHIGH(false, n, add(m, x)) -> HIGH(n, x)
HIGH(0, add(s(x''), x)) -> IFHIGH(false, 0, add(s(x''), x))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFHIGH(true, n, add(m, x)) -> HIGH(n, x)
three new Dependency Pairs are created:

IFHIGH(true, n', add(0, x'')) -> HIGH(n', x'')
IFHIGH(true, s(y''''), add(s(0), x'')) -> HIGH(s(y''''), x'')
IFHIGH(true, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFHIGH(true, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')
HIGH(s(0), add(s(s(x''')), x)) -> IFHIGH(false, s(0), add(s(s(x''')), x))
IFHIGH(true, s(y''''), add(s(0), x'')) -> HIGH(s(y''''), x'')
HIGH(s(y''), add(s(0), x)) -> IFHIGH(true, s(y''), add(s(0), x))
HIGH(0, add(s(x''), x)) -> IFHIGH(false, 0, add(s(x''), x))
IFHIGH(true, n', add(0, x'')) -> HIGH(n', x'')
HIGH(n', add(0, x)) -> IFHIGH(true, n', add(0, x))
IFHIGH(false, n, add(m, x)) -> HIGH(n, x)
HIGH(s(s(y'')), add(s(s(x''')), x)) -> IFHIGH(le(x''', y''), s(s(y'')), add(s(s(x''')), x))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFHIGH(false, n, add(m, x)) -> HIGH(n, x)
three new Dependency Pairs are created:

IFHIGH(false, 0, add(s(x''''), x'')) -> HIGH(0, x'')
IFHIGH(false, s(0), add(s(s(x''''')), x'')) -> HIGH(s(0), x'')
IFHIGH(false, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFHIGH(false, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')
HIGH(s(s(y'')), add(s(s(x''')), x)) -> IFHIGH(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFHIGH(false, s(0), add(s(s(x''''')), x'')) -> HIGH(s(0), x'')
HIGH(s(0), add(s(s(x''')), x)) -> IFHIGH(false, s(0), add(s(s(x''')), x))
IFHIGH(true, s(y''''), add(s(0), x'')) -> HIGH(s(y''''), x'')
HIGH(s(y''), add(s(0), x)) -> IFHIGH(true, s(y''), add(s(0), x))
IFHIGH(false, 0, add(s(x''''), x'')) -> HIGH(0, x'')
HIGH(0, add(s(x''), x)) -> IFHIGH(false, 0, add(s(x''), x))
IFHIGH(true, n', add(0, x'')) -> HIGH(n', x'')
HIGH(n', add(0, x)) -> IFHIGH(true, n', add(0, x))
IFHIGH(true, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFHIGH(true, n', add(0, x'')) -> HIGH(n', x'')
five new Dependency Pairs are created:

IFHIGH(true, n''', add(0, add(0, x'''))) -> HIGH(n''', add(0, x'''))
IFHIGH(true, 0, add(0, add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
IFHIGH(true, s(y''''), add(0, add(s(0), x'''))) -> HIGH(s(y''''), add(s(0), x'''))
IFHIGH(true, s(0), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
IFHIGH(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(s(y'''')), add(s(s(x''''')), x'''))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFHIGH(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(s(y'''')), add(s(s(x''''')), x'''))
IFHIGH(true, s(0), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
IFHIGH(true, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')
HIGH(s(s(y'')), add(s(s(x''')), x)) -> IFHIGH(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFHIGH(false, s(0), add(s(s(x''''')), x'')) -> HIGH(s(0), x'')
HIGH(s(0), add(s(s(x''')), x)) -> IFHIGH(false, s(0), add(s(s(x''')), x))
IFHIGH(true, s(y''''), add(s(0), x'')) -> HIGH(s(y''''), x'')
HIGH(s(y''), add(s(0), x)) -> IFHIGH(true, s(y''), add(s(0), x))
IFHIGH(true, s(y''''), add(0, add(s(0), x'''))) -> HIGH(s(y''''), add(s(0), x'''))
IFHIGH(false, 0, add(s(x''''), x'')) -> HIGH(0, x'')
HIGH(0, add(s(x''), x)) -> IFHIGH(false, 0, add(s(x''), x))
IFHIGH(true, 0, add(0, add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
IFHIGH(true, n''', add(0, add(0, x'''))) -> HIGH(n''', add(0, x'''))
HIGH(n', add(0, x)) -> IFHIGH(true, n', add(0, x))
IFHIGH(false, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

HIGH(n', add(0, x)) -> IFHIGH(true, n', add(0, x))
five new Dependency Pairs are created:

HIGH(n'', add(0, add(0, x'''''))) -> IFHIGH(true, n'', add(0, add(0, x''''')))
HIGH(0, add(0, add(s(x''''''), x'0''))) -> IFHIGH(true, 0, add(0, add(s(x''''''), x'0'')))
HIGH(s(y''''''), add(0, add(s(0), x'''''))) -> IFHIGH(true, s(y''''''), add(0, add(s(0), x''''')))
HIGH(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(0), add(0, add(s(s(x''''''')), x''''')))
HIGH(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFHIGH(false, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')
HIGH(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(true, s(0), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
HIGH(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(true, s(y''''), add(0, add(s(0), x'''))) -> HIGH(s(y''''), add(s(0), x'''))
HIGH(s(y''''''), add(0, add(s(0), x'''''))) -> IFHIGH(true, s(y''''''), add(0, add(s(0), x''''')))
IFHIGH(false, 0, add(s(x''''), x'')) -> HIGH(0, x'')
HIGH(0, add(s(x''), x)) -> IFHIGH(false, 0, add(s(x''), x))
IFHIGH(true, 0, add(0, add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
HIGH(0, add(0, add(s(x''''''), x'0''))) -> IFHIGH(true, 0, add(0, add(s(x''''''), x'0'')))
IFHIGH(true, n''', add(0, add(0, x'''))) -> HIGH(n''', add(0, x'''))
HIGH(n'', add(0, add(0, x'''''))) -> IFHIGH(true, n'', add(0, add(0, x''''')))
IFHIGH(false, s(0), add(s(s(x''''')), x'')) -> HIGH(s(0), x'')
HIGH(s(0), add(s(s(x''')), x)) -> IFHIGH(false, s(0), add(s(s(x''')), x))
IFHIGH(true, s(y''''), add(s(0), x'')) -> HIGH(s(y''''), x'')
HIGH(s(y''), add(s(0), x)) -> IFHIGH(true, s(y''), add(s(0), x))
IFHIGH(true, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')
HIGH(s(s(y'')), add(s(s(x''')), x)) -> IFHIGH(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFHIGH(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(s(y'''')), add(s(s(x''''')), x'''))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFHIGH(true, s(y''''), add(s(0), x'')) -> HIGH(s(y''''), x'')
seven new Dependency Pairs are created:

IFHIGH(true, s(y'''''), add(s(0), add(s(0), x'''))) -> HIGH(s(y'''''), add(s(0), x'''))
IFHIGH(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
IFHIGH(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> HIGH(s(y'''''), add(0, add(0, x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> HIGH(s(y'''''), add(0, add(s(0), x''''''')))
IFHIGH(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFHIGH(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> HIGH(s(y'''''), add(0, add(s(0), x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> HIGH(s(y'''''), add(0, add(0, x''''''')))
IFHIGH(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(true, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')
HIGH(s(s(y'')), add(s(s(x''')), x)) -> IFHIGH(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFHIGH(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(s(y'''')), add(s(s(x''''')), x'''))
HIGH(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(true, s(0), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
HIGH(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(true, s(y''''), add(0, add(s(0), x'''))) -> HIGH(s(y''''), add(s(0), x'''))
HIGH(s(y''''''), add(0, add(s(0), x'''''))) -> IFHIGH(true, s(y''''''), add(0, add(s(0), x''''')))
IFHIGH(false, 0, add(s(x''''), x'')) -> HIGH(0, x'')
HIGH(0, add(s(x''), x)) -> IFHIGH(false, 0, add(s(x''), x))
IFHIGH(true, 0, add(0, add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
HIGH(0, add(0, add(s(x''''''), x'0''))) -> IFHIGH(true, 0, add(0, add(s(x''''''), x'0'')))
IFHIGH(true, n''', add(0, add(0, x'''))) -> HIGH(n''', add(0, x'''))
HIGH(n'', add(0, add(0, x'''''))) -> IFHIGH(true, n'', add(0, add(0, x''''')))
IFHIGH(false, s(0), add(s(s(x''''')), x'')) -> HIGH(s(0), x'')
HIGH(s(0), add(s(s(x''')), x)) -> IFHIGH(false, s(0), add(s(s(x''')), x))
IFHIGH(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
IFHIGH(true, s(y'''''), add(s(0), add(s(0), x'''))) -> HIGH(s(y'''''), add(s(0), x'''))
HIGH(s(y''), add(s(0), x)) -> IFHIGH(true, s(y''), add(s(0), x))
IFHIGH(false, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFHIGH(true, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')
five new Dependency Pairs are created:

IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> HIGH(s(s(y''''')), add(s(0), x'''))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> HIGH(s(s(y''''')), add(0, add(0, x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(0), x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(0), x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> HIGH(s(s(y''''')), add(0, add(0, x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> HIGH(s(s(y''''')), add(s(0), x'''))
IFHIGH(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> HIGH(s(y'''''), add(0, add(s(0), x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> HIGH(s(y'''''), add(0, add(0, x''''''')))
IFHIGH(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(true, s(0), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
HIGH(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(true, s(y''''), add(0, add(s(0), x'''))) -> HIGH(s(y''''), add(s(0), x'''))
HIGH(s(y''''''), add(0, add(s(0), x'''''))) -> IFHIGH(true, s(y''''''), add(0, add(s(0), x''''')))
IFHIGH(false, 0, add(s(x''''), x'')) -> HIGH(0, x'')
HIGH(0, add(s(x''), x)) -> IFHIGH(false, 0, add(s(x''), x))
IFHIGH(true, 0, add(0, add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
HIGH(0, add(0, add(s(x''''''), x'0''))) -> IFHIGH(true, 0, add(0, add(s(x''''''), x'0'')))
IFHIGH(true, n''', add(0, add(0, x'''))) -> HIGH(n''', add(0, x'''))
HIGH(n'', add(0, add(0, x'''''))) -> IFHIGH(true, n'', add(0, add(0, x''''')))
IFHIGH(false, s(0), add(s(s(x''''')), x'')) -> HIGH(s(0), x'')
HIGH(s(0), add(s(s(x''')), x)) -> IFHIGH(false, s(0), add(s(s(x''')), x))
IFHIGH(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
IFHIGH(true, s(y'''''), add(s(0), add(s(0), x'''))) -> HIGH(s(y'''''), add(s(0), x'''))
HIGH(s(y''), add(s(0), x)) -> IFHIGH(true, s(y''), add(s(0), x))
IFHIGH(false, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')
HIGH(s(s(y'')), add(s(s(x''')), x)) -> IFHIGH(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFHIGH(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(s(y'''')), add(s(s(x''''')), x'''))
HIGH(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFHIGH(false, 0, add(s(x''''), x'')) -> HIGH(0, x'')
three new Dependency Pairs are created:

IFHIGH(false, 0, add(s(x''''), add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
IFHIGH(false, 0, add(s(x''''), add(0, add(0, x''''''')))) -> HIGH(0, add(0, add(0, x''''''')))
IFHIGH(false, 0, add(s(x''''), add(0, add(s(x''''''''), x'0'''')))) -> HIGH(0, add(0, add(s(x''''''''), x'0'''')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(0), x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> HIGH(s(s(y''''')), add(0, add(0, x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> HIGH(s(s(y''''')), add(s(0), x'''))
IFHIGH(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> HIGH(s(y'''''), add(0, add(s(0), x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> HIGH(s(y'''''), add(0, add(0, x''''''')))
IFHIGH(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(true, s(0), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
HIGH(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(true, s(y''''), add(0, add(s(0), x'''))) -> HIGH(s(y''''), add(s(0), x'''))
HIGH(s(y''''''), add(0, add(s(0), x'''''))) -> IFHIGH(true, s(y''''''), add(0, add(s(0), x''''')))
IFHIGH(false, 0, add(s(x''''), add(0, add(s(x''''''''), x'0'''')))) -> HIGH(0, add(0, add(s(x''''''''), x'0'''')))
IFHIGH(false, 0, add(s(x''''), add(0, add(0, x''''''')))) -> HIGH(0, add(0, add(0, x''''''')))
IFHIGH(false, 0, add(s(x''''), add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
HIGH(0, add(s(x''), x)) -> IFHIGH(false, 0, add(s(x''), x))
IFHIGH(true, 0, add(0, add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
HIGH(0, add(0, add(s(x''''''), x'0''))) -> IFHIGH(true, 0, add(0, add(s(x''''''), x'0'')))
IFHIGH(true, n''', add(0, add(0, x'''))) -> HIGH(n''', add(0, x'''))
HIGH(n'', add(0, add(0, x'''''))) -> IFHIGH(true, n'', add(0, add(0, x''''')))
IFHIGH(false, s(0), add(s(s(x''''')), x'')) -> HIGH(s(0), x'')
HIGH(s(0), add(s(s(x''')), x)) -> IFHIGH(false, s(0), add(s(s(x''')), x))
IFHIGH(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
IFHIGH(true, s(y'''''), add(s(0), add(s(0), x'''))) -> HIGH(s(y'''''), add(s(0), x'''))
HIGH(s(y''), add(s(0), x)) -> IFHIGH(true, s(y''), add(s(0), x))
IFHIGH(false, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')
HIGH(s(s(y'')), add(s(s(x''')), x)) -> IFHIGH(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFHIGH(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(s(y'''')), add(s(s(x''''')), x'''))
HIGH(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

HIGH(0, add(s(x''), x)) -> IFHIGH(false, 0, add(s(x''), x))
three new Dependency Pairs are created:

HIGH(0, add(s(x'''), add(s(x'''''''), x'0''))) -> IFHIGH(false, 0, add(s(x'''), add(s(x'''''''), x'0'')))
HIGH(0, add(s(x'''), add(0, add(0, x''''''''')))) -> IFHIGH(false, 0, add(s(x'''), add(0, add(0, x'''''''''))))
HIGH(0, add(s(x'''), add(0, add(s(x''''''''''), x'0'''''')))) -> IFHIGH(false, 0, add(s(x'''), add(0, add(s(x''''''''''), x'0''''''))))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFHIGH(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> HIGH(s(y'''''), add(0, add(s(0), x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> HIGH(s(y'''''), add(0, add(0, x''''''')))
IFHIGH(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> HIGH(s(s(y''''')), add(0, add(0, x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> HIGH(s(s(y''''')), add(s(0), x'''))
IFHIGH(false, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')
HIGH(s(s(y'')), add(s(s(x''')), x)) -> IFHIGH(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFHIGH(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(s(y'''')), add(s(s(x''''')), x'''))
HIGH(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(true, s(0), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
HIGH(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(false, 0, add(s(x''''), add(0, add(s(x''''''''), x'0'''')))) -> HIGH(0, add(0, add(s(x''''''''), x'0'''')))
HIGH(0, add(s(x'''), add(0, add(s(x''''''''''), x'0'''''')))) -> IFHIGH(false, 0, add(s(x'''), add(0, add(s(x''''''''''), x'0''''''))))
IFHIGH(false, 0, add(s(x''''), add(0, add(0, x''''''')))) -> HIGH(0, add(0, add(0, x''''''')))
HIGH(0, add(s(x'''), add(0, add(0, x''''''''')))) -> IFHIGH(false, 0, add(s(x'''), add(0, add(0, x'''''''''))))
IFHIGH(false, 0, add(s(x''''), add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
HIGH(0, add(s(x'''), add(s(x'''''''), x'0''))) -> IFHIGH(false, 0, add(s(x'''), add(s(x'''''''), x'0'')))
IFHIGH(true, 0, add(0, add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
HIGH(0, add(0, add(s(x''''''), x'0''))) -> IFHIGH(true, 0, add(0, add(s(x''''''), x'0'')))
IFHIGH(true, n''', add(0, add(0, x'''))) -> HIGH(n''', add(0, x'''))
HIGH(n'', add(0, add(0, x'''''))) -> IFHIGH(true, n'', add(0, add(0, x''''')))
IFHIGH(false, s(0), add(s(s(x''''')), x'')) -> HIGH(s(0), x'')
HIGH(s(0), add(s(s(x''')), x)) -> IFHIGH(false, s(0), add(s(s(x''')), x))
IFHIGH(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
IFHIGH(true, s(y'''''), add(s(0), add(s(0), x'''))) -> HIGH(s(y'''''), add(s(0), x'''))
HIGH(s(y''), add(s(0), x)) -> IFHIGH(true, s(y''), add(s(0), x))
IFHIGH(true, s(y''''), add(0, add(s(0), x'''))) -> HIGH(s(y''''), add(s(0), x'''))
HIGH(s(y''''''), add(0, add(s(0), x'''''))) -> IFHIGH(true, s(y''''''), add(0, add(s(0), x''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(0), x''''''')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFHIGH(false, s(0), add(s(s(x''''')), x'')) -> HIGH(s(0), x'')
five new Dependency Pairs are created:

IFHIGH(false, s(0), add(s(s(x''''')), add(s(0), x'''))) -> HIGH(s(0), add(s(0), x'''))
IFHIGH(false, s(0), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
IFHIGH(false, s(0), add(s(s(x''''')), add(0, add(0, x''''''')))) -> HIGH(s(0), add(0, add(0, x''''''')))
IFHIGH(false, s(0), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> HIGH(s(0), add(0, add(s(0), x''''''')))
IFHIGH(false, s(0), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(0), add(0, add(s(s(x''''''''')), x''''''')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(0), x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> HIGH(s(s(y''''')), add(0, add(0, x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> HIGH(s(s(y''''')), add(s(0), x'''))
IFHIGH(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> HIGH(s(y'''''), add(0, add(s(0), x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> HIGH(s(y'''''), add(0, add(0, x''''''')))
IFHIGH(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(false, s(0), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(false, s(0), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> HIGH(s(0), add(0, add(s(0), x''''''')))
IFHIGH(true, s(0), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
HIGH(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(true, s(y''''), add(0, add(s(0), x'''))) -> HIGH(s(y''''), add(s(0), x'''))
HIGH(s(y''''''), add(0, add(s(0), x'''''))) -> IFHIGH(true, s(y''''''), add(0, add(s(0), x''''')))
IFHIGH(false, 0, add(s(x''''), add(0, add(s(x''''''''), x'0'''')))) -> HIGH(0, add(0, add(s(x''''''''), x'0'''')))
HIGH(0, add(s(x'''), add(0, add(s(x''''''''''), x'0'''''')))) -> IFHIGH(false, 0, add(s(x'''), add(0, add(s(x''''''''''), x'0''''''))))
IFHIGH(false, 0, add(s(x''''), add(0, add(0, x''''''')))) -> HIGH(0, add(0, add(0, x''''''')))
HIGH(0, add(s(x'''), add(0, add(0, x''''''''')))) -> IFHIGH(false, 0, add(s(x'''), add(0, add(0, x'''''''''))))
IFHIGH(false, 0, add(s(x''''), add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
HIGH(0, add(s(x'''), add(s(x'''''''), x'0''))) -> IFHIGH(false, 0, add(s(x'''), add(s(x'''''''), x'0'')))
IFHIGH(true, 0, add(0, add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
HIGH(0, add(0, add(s(x''''''), x'0''))) -> IFHIGH(true, 0, add(0, add(s(x''''''), x'0'')))
IFHIGH(true, n''', add(0, add(0, x'''))) -> HIGH(n''', add(0, x'''))
HIGH(n'', add(0, add(0, x'''''))) -> IFHIGH(true, n'', add(0, add(0, x''''')))
IFHIGH(false, s(0), add(s(s(x''''')), add(0, add(0, x''''''')))) -> HIGH(s(0), add(0, add(0, x''''''')))
IFHIGH(false, s(0), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
IFHIGH(false, s(0), add(s(s(x''''')), add(s(0), x'''))) -> HIGH(s(0), add(s(0), x'''))
HIGH(s(0), add(s(s(x''')), x)) -> IFHIGH(false, s(0), add(s(s(x''')), x))
IFHIGH(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
IFHIGH(true, s(y'''''), add(s(0), add(s(0), x'''))) -> HIGH(s(y'''''), add(s(0), x'''))
HIGH(s(y''), add(s(0), x)) -> IFHIGH(true, s(y''), add(s(0), x))
IFHIGH(false, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')
HIGH(s(s(y'')), add(s(s(x''')), x)) -> IFHIGH(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFHIGH(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(s(y'''')), add(s(s(x''''')), x'''))
HIGH(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

IFHIGH(false, s(s(y'''')), add(s(s(x''''')), x')) -> HIGH(s(s(y'''')), x')
five new Dependency Pairs are created:

IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> HIGH(s(s(y''''')), add(s(0), x'''))
IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> HIGH(s(s(y''''')), add(0, add(0, x''''''')))
IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(0), x''''''')))
IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 25
Nar
             ...
               →DP Problem 36
Argument Filtering and Ordering
       →DP Problem 5
Nar


Dependency Pairs:

IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(0), x''''''')))
IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> HIGH(s(s(y''''')), add(0, add(0, x''''''')))
IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> HIGH(s(s(y''''')), add(s(0), x'''))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(0), x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> HIGH(s(s(y''''')), add(0, add(0, x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> HIGH(s(y'''''), add(0, add(s(0), x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> HIGH(s(y'''''), add(0, add(0, x''''''')))
IFHIGH(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(false, s(0), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(false, s(0), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> HIGH(s(0), add(0, add(s(0), x''''''')))
IFHIGH(true, s(0), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
HIGH(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(true, s(y''''), add(0, add(s(0), x'''))) -> HIGH(s(y''''), add(s(0), x'''))
HIGH(s(y''''''), add(0, add(s(0), x'''''))) -> IFHIGH(true, s(y''''''), add(0, add(s(0), x''''')))
IFHIGH(false, 0, add(s(x''''), add(0, add(s(x''''''''), x'0'''')))) -> HIGH(0, add(0, add(s(x''''''''), x'0'''')))
HIGH(0, add(s(x'''), add(0, add(s(x''''''''''), x'0'''''')))) -> IFHIGH(false, 0, add(s(x'''), add(0, add(s(x''''''''''), x'0''''''))))
IFHIGH(false, 0, add(s(x''''), add(0, add(0, x''''''')))) -> HIGH(0, add(0, add(0, x''''''')))
HIGH(0, add(s(x'''), add(0, add(0, x''''''''')))) -> IFHIGH(false, 0, add(s(x'''), add(0, add(0, x'''''''''))))
IFHIGH(false, 0, add(s(x''''), add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
HIGH(0, add(s(x'''), add(s(x'''''''), x'0''))) -> IFHIGH(false, 0, add(s(x'''), add(s(x'''''''), x'0'')))
IFHIGH(true, 0, add(0, add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
HIGH(0, add(0, add(s(x''''''), x'0''))) -> IFHIGH(true, 0, add(0, add(s(x''''''), x'0'')))
IFHIGH(true, n''', add(0, add(0, x'''))) -> HIGH(n''', add(0, x'''))
HIGH(n'', add(0, add(0, x'''''))) -> IFHIGH(true, n'', add(0, add(0, x''''')))
IFHIGH(false, s(0), add(s(s(x''''')), add(0, add(0, x''''''')))) -> HIGH(s(0), add(0, add(0, x''''''')))
IFHIGH(false, s(0), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
IFHIGH(false, s(0), add(s(s(x''''')), add(s(0), x'''))) -> HIGH(s(0), add(s(0), x'''))
HIGH(s(0), add(s(s(x''')), x)) -> IFHIGH(false, s(0), add(s(s(x''')), x))
IFHIGH(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
IFHIGH(true, s(y'''''), add(s(0), add(s(0), x'''))) -> HIGH(s(y'''''), add(s(0), x'''))
HIGH(s(y''), add(s(0), x)) -> IFHIGH(true, s(y''), add(s(0), x))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> HIGH(s(s(y''''')), add(s(0), x'''))
HIGH(s(s(y'')), add(s(s(x''')), x)) -> IFHIGH(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFHIGH(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(s(y'''')), add(s(s(x''''')), x'''))
HIGH(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(0), x''''''')))
IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> HIGH(s(s(y''''')), add(0, add(0, x''''''')))
IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(false, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> HIGH(s(s(y''''')), add(s(0), x'''))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(0), x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(0, x''''''')))) -> HIGH(s(s(y''''')), add(0, add(0, x''''''')))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(true, s(s(y'''''''')), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y'''''''')), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(0), add(s(0), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(s(0), x''''''')))) -> HIGH(s(y'''''), add(0, add(s(0), x''''''')))
IFHIGH(true, s(y'''''), add(s(0), add(0, add(0, x''''''')))) -> HIGH(s(y'''''), add(0, add(0, x''''''')))
IFHIGH(true, s(s(y''''')), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(s(y''''')), add(s(s(x''''')), x'''))
IFHIGH(false, s(0), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(0), add(0, add(s(s(x''''''''')), x''''''')))
IFHIGH(false, s(0), add(s(s(x''''')), add(0, add(s(0), x''''''')))) -> HIGH(s(0), add(0, add(s(0), x''''''')))
IFHIGH(false, 0, add(s(x''''), add(0, add(s(x''''''''), x'0'''')))) -> HIGH(0, add(0, add(s(x''''''''), x'0'''')))
IFHIGH(false, 0, add(s(x''''), add(0, add(0, x''''''')))) -> HIGH(0, add(0, add(0, x''''''')))
IFHIGH(false, 0, add(s(x''''), add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
IFHIGH(false, s(0), add(s(s(x''''')), add(0, add(0, x''''''')))) -> HIGH(s(0), add(0, add(0, x''''''')))
IFHIGH(false, s(0), add(s(s(x''''')), add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
IFHIGH(false, s(0), add(s(s(x''''')), add(s(0), x'''))) -> HIGH(s(0), add(s(0), x'''))
IFHIGH(true, s(0), add(s(0), add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
IFHIGH(true, s(y'''''), add(s(0), add(s(0), x'''))) -> HIGH(s(y'''''), add(s(0), x'''))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(s(0), x'''))) -> HIGH(s(s(y''''')), add(s(0), x'''))
IFHIGH(true, s(s(y''''')), add(s(s(x''''')), add(0, add(s(s(x''''''''')), x''''''')))) -> HIGH(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))


The following usable rules for innermost can be oriented:

le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(0)=  0  
  POL(IF_HIGH(x1, x2, x3))=  x1 + x2 + x3  
  POL(false)=  0  
  POL(HIGH(x1, x2))=  x1 + x2  
  POL(true)=  0  
  POL(s(x1))=  1 + x1  
  POL(le)=  0  
  POL(add(x1, x2))=  x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
IFHIGH(x1, x2, x3) -> IFHIGH(x1, x2, x3)
HIGH(x1, x2) -> HIGH(x1, x2)
s(x1) -> s(x1)
add(x1, x2) -> add(x1, x2)
le(x1, x2) -> le


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 25
Nar
             ...
               →DP Problem 37
Dependency Graph
       →DP Problem 5
Nar


Dependency Pairs:

IFHIGH(true, s(0), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(0), add(s(s(x''''')), x'''))
HIGH(s(0), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(0), add(0, add(s(s(x''''''')), x''''')))
IFHIGH(true, s(y''''), add(0, add(s(0), x'''))) -> HIGH(s(y''''), add(s(0), x'''))
HIGH(s(y''''''), add(0, add(s(0), x'''''))) -> IFHIGH(true, s(y''''''), add(0, add(s(0), x''''')))
HIGH(0, add(s(x'''), add(0, add(s(x''''''''''), x'0'''''')))) -> IFHIGH(false, 0, add(s(x'''), add(0, add(s(x''''''''''), x'0''''''))))
HIGH(0, add(s(x'''), add(0, add(0, x''''''''')))) -> IFHIGH(false, 0, add(s(x'''), add(0, add(0, x'''''''''))))
HIGH(0, add(s(x'''), add(s(x'''''''), x'0''))) -> IFHIGH(false, 0, add(s(x'''), add(s(x'''''''), x'0'')))
IFHIGH(true, 0, add(0, add(s(x''''), x'0))) -> HIGH(0, add(s(x''''), x'0))
HIGH(0, add(0, add(s(x''''''), x'0''))) -> IFHIGH(true, 0, add(0, add(s(x''''''), x'0'')))
IFHIGH(true, n''', add(0, add(0, x'''))) -> HIGH(n''', add(0, x'''))
HIGH(n'', add(0, add(0, x'''''))) -> IFHIGH(true, n'', add(0, add(0, x''''')))
HIGH(s(0), add(s(s(x''')), x)) -> IFHIGH(false, s(0), add(s(s(x''')), x))
HIGH(s(y''), add(s(0), x)) -> IFHIGH(true, s(y''), add(s(0), x))
HIGH(s(s(y'')), add(s(s(x''')), x)) -> IFHIGH(le(x''', y''), s(s(y'')), add(s(s(x''')), x))
IFHIGH(true, s(s(y'''')), add(0, add(s(s(x''''')), x'''))) -> HIGH(s(s(y'''')), add(s(s(x''''')), x'''))
HIGH(s(s(y'''''')), add(0, add(s(s(x''''''')), x'''''))) -> IFHIGH(true, s(s(y'''''')), add(0, add(s(s(x''''''')), x''''')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 25
Nar
             ...
               →DP Problem 38
Argument Filtering and Ordering
       →DP Problem 5
Nar


Dependency Pairs:

HIGH(n'', add(0, add(0, x'''''))) -> IFHIGH(true, n'', add(0, add(0, x''''')))
IFHIGH(true, n''', add(0, add(0, x'''))) -> HIGH(n''', add(0, x'''))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




The following dependency pair can be strictly oriented:

HIGH(n'', add(0, add(0, x'''''))) -> IFHIGH(true, n'', add(0, add(0, x''''')))


There are no usable rules for innermost that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(0)=  0  
  POL(IF_HIGH(x1, x2, x3))=  x1 + x2 + x3  
  POL(HIGH(x1, x2))=  1 + x1 + x2  
  POL(true)=  0  
  POL(add(x1, x2))=  1 + x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
HIGH(x1, x2) -> HIGH(x1, x2)
IFHIGH(x1, x2, x3) -> IFHIGH(x1, x2, x3)
add(x1, x2) -> add(x1, x2)


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 25
Nar
             ...
               →DP Problem 39
Dependency Graph
       →DP Problem 5
Nar


Dependency Pair:

IFHIGH(true, n''', add(0, add(0, x'''))) -> HIGH(n''', add(0, x'''))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


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
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Narrowing Transformation


Dependency Pairs:

QUICKSORT(add(n, x)) -> QUICKSORT(high(n, x))
QUICKSORT(add(n, x)) -> QUICKSORT(low(n, x))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

QUICKSORT(add(n, x)) -> QUICKSORT(low(n, x))
two new Dependency Pairs are created:

QUICKSORT(add(n'', nil)) -> QUICKSORT(nil)
QUICKSORT(add(n'', add(m', x''))) -> QUICKSORT(iflow(le(m', n''), n'', add(m', x'')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

QUICKSORT(add(n'', add(m', x''))) -> QUICKSORT(iflow(le(m', n''), n'', add(m', x'')))
QUICKSORT(add(n, x)) -> QUICKSORT(high(n, x))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

QUICKSORT(add(n, x)) -> QUICKSORT(high(n, x))
two new Dependency Pairs are created:

QUICKSORT(add(n'', nil)) -> QUICKSORT(nil)
QUICKSORT(add(n'', add(m', x''))) -> QUICKSORT(ifhigh(le(m', n''), n'', add(m', x'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 40
Nar
             ...
               →DP Problem 41
Narrowing Transformation


Dependency Pairs:

QUICKSORT(add(n'', add(m', x''))) -> QUICKSORT(ifhigh(le(m', n''), n'', add(m', x'')))
QUICKSORT(add(n'', add(m', x''))) -> QUICKSORT(iflow(le(m', n''), n'', add(m', x'')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

QUICKSORT(add(n'', add(m', x''))) -> QUICKSORT(iflow(le(m', n''), n'', add(m', x'')))
three new Dependency Pairs are created:

QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(iflow(true, n''', add(0, x'')))
QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(iflow(false, 0, add(s(x'), x'')))
QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(iflow(le(x', y'), s(y'), add(s(x'), x'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 40
Nar
             ...
               →DP Problem 42
Rewriting Transformation


Dependency Pairs:

QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(iflow(le(x', y'), s(y'), add(s(x'), x'')))
QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(iflow(false, 0, add(s(x'), x'')))
QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(iflow(true, n''', add(0, x'')))
QUICKSORT(add(n'', add(m', x''))) -> QUICKSORT(ifhigh(le(m', n''), n'', add(m', x'')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(iflow(true, n''', add(0, x'')))
one new Dependency Pair is created:

QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(add(0, low(n''', x'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 40
Nar
             ...
               →DP Problem 43
Rewriting Transformation


Dependency Pairs:

QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(add(0, low(n''', x'')))
QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(iflow(false, 0, add(s(x'), x'')))
QUICKSORT(add(n'', add(m', x''))) -> QUICKSORT(ifhigh(le(m', n''), n'', add(m', x'')))
QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(iflow(le(x', y'), s(y'), add(s(x'), x'')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(iflow(false, 0, add(s(x'), x'')))
one new Dependency Pair is created:

QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(low(0, x''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 40
Nar
             ...
               →DP Problem 44
Narrowing Transformation


Dependency Pairs:

QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(low(0, x''))
QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(iflow(le(x', y'), s(y'), add(s(x'), x'')))
QUICKSORT(add(n'', add(m', x''))) -> QUICKSORT(ifhigh(le(m', n''), n'', add(m', x'')))
QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(add(0, low(n''', x'')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

QUICKSORT(add(n'', add(m', x''))) -> QUICKSORT(ifhigh(le(m', n''), n'', add(m', x'')))
three new Dependency Pairs are created:

QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(ifhigh(true, n''', add(0, x'')))
QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(ifhigh(false, 0, add(s(x'), x'')))
QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(ifhigh(le(x', y'), s(y'), add(s(x'), x'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 40
Nar
             ...
               →DP Problem 45
Rewriting Transformation


Dependency Pairs:

QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(ifhigh(le(x', y'), s(y'), add(s(x'), x'')))
QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(ifhigh(false, 0, add(s(x'), x'')))
QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(ifhigh(true, n''', add(0, x'')))
QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(add(0, low(n''', x'')))
QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(iflow(le(x', y'), s(y'), add(s(x'), x'')))
QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(low(0, x''))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(ifhigh(true, n''', add(0, x'')))
one new Dependency Pair is created:

QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(high(n''', x''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 40
Nar
             ...
               →DP Problem 46
Rewriting Transformation


Dependency Pairs:

QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(high(n''', x''))
QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(ifhigh(false, 0, add(s(x'), x'')))
QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(low(0, x''))
QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(add(0, low(n''', x'')))
QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(iflow(le(x', y'), s(y'), add(s(x'), x'')))
QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(ifhigh(le(x', y'), s(y'), add(s(x'), x'')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




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

QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(ifhigh(false, 0, add(s(x'), x'')))
one new Dependency Pair is created:

QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(add(s(x'), high(0, x'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 40
Nar
             ...
               →DP Problem 47
Argument Filtering and Ordering


Dependency Pairs:

QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(add(s(x'), high(0, x'')))
QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(ifhigh(le(x', y'), s(y'), add(s(x'), x'')))
QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(low(0, x''))
QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(add(0, low(n''', x'')))
QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(iflow(le(x', y'), s(y'), add(s(x'), x'')))
QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(high(n''', x''))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




The following dependency pair can be strictly oriented:

QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(high(n''', x''))


The following usable rules for innermost can be oriented:

high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(QUICKSORT(x1))=  1 + x1  
  POL(0)=  1  
  POL(if_low(x1, x2, x3))=  x1 + x2 + x3  
  POL(false)=  0  
  POL(high(x1, x2))=  x1 + x2  
  POL(if_high(x1, x2, x3))=  x1 + x2 + x3  
  POL(low(x1, x2))=  x1 + x2  
  POL(nil)=  0  
  POL(true)=  0  
  POL(s(x1))=  x1  
  POL(le)=  0  
  POL(add(x1, x2))=  x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
QUICKSORT(x1) -> QUICKSORT(x1)
add(x1, x2) -> add(x1, x2)
high(x1, x2) -> high(x1, x2)
s(x1) -> s(x1)
low(x1, x2) -> low(x1, x2)
ifhigh(x1, x2, x3) -> ifhigh(x1, x2, x3)
le(x1, x2) -> le
iflow(x1, x2, x3) -> iflow(x1, x2, x3)


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 40
Nar
             ...
               →DP Problem 48
Argument Filtering and Ordering


Dependency Pairs:

QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(add(s(x'), high(0, x'')))
QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(ifhigh(le(x', y'), s(y'), add(s(x'), x'')))
QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(low(0, x''))
QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(add(0, low(n''', x'')))
QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(iflow(le(x', y'), s(y'), add(s(x'), x'')))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(add(s(x'), high(0, x'')))
QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(ifhigh(le(x', y'), s(y'), add(s(x'), x'')))
QUICKSORT(add(0, add(s(x'), x''))) -> QUICKSORT(low(0, x''))
QUICKSORT(add(n''', add(0, x''))) -> QUICKSORT(add(0, low(n''', x'')))
QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(iflow(le(x', y'), s(y'), add(s(x'), x'')))


The following usable rules for innermost can be oriented:

low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(QUICKSORT(x1))=  1 + x1  
  POL(0)=  0  
  POL(if_low(x1, x2, x3))=  x1 + x2 + x3  
  POL(false)=  0  
  POL(high(x1, x2))=  x1 + x2  
  POL(if_high(x1, x2, x3))=  x1 + x2 + x3  
  POL(low(x1, x2))=  x1 + x2  
  POL(nil)=  0  
  POL(true)=  0  
  POL(s(x1))=  x1  
  POL(le)=  0  
  POL(add(x1, x2))=  1 + x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
QUICKSORT(x1) -> QUICKSORT(x1)
add(x1, x2) -> add(x1, x2)
low(x1, x2) -> low(x1, x2)
s(x1) -> s(x1)
high(x1, x2) -> high(x1, x2)
ifhigh(x1, x2, x3) -> ifhigh(x1, x2, x3)
le(x1, x2) -> le
iflow(x1, x2, x3) -> iflow(x1, x2, x3)


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 40
Nar
             ...
               →DP Problem 49
Dependency Graph


Dependency Pair:


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))
iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(le(m, n), n, add(m, x))
ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
quicksort(nil) -> nil
quicksort(add(n, x)) -> app(quicksort(low(n, x)), add(n, quicksort(high(n, x))))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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