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
Polynomial 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 w.r.t. to the implicit AFS that need to be oriented.

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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 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
Polynomial 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 w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(APP(x1, x2))=  1 + x1  
  POL(add(x1, x2))=  1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 9
FwdInst
             ...
               →DP Problem 11
Dependency Graph
       →DP Problem 3
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
Polynomial 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''''''')))
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(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'''))
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'''))
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(0, add(s(s(x''''''''')), x''''''')))) -> LOW(s(s(y''''')), add(0, add(s(s(x''''''''')), x''''''')))


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

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

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 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'''))
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''''')))
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'')))
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''''')))
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))
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''''')))


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 12
Nar
             ...
               →DP Problem 25
Polynomial Ordering
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

LOW(n'', add(0, add(0, x'''''))) -> IFLOW(true, n'', add(0, add(0, x''''')))
IFLOW(true, n''', add(0, add(0, x'''))) -> LOW(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:

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


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

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

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


Dependency Pair:

IFLOW(true, n''', add(0, add(0, x'''))) -> LOW(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
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 27
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 27
Nar
             ...
               →DP Problem 28
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 27
Nar
             ...
               →DP Problem 29
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 27
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(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 27
Nar
             ...
               →DP Problem 31
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 27
Nar
             ...
               →DP Problem 32
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 27
Nar
             ...
               →DP Problem 33
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 27
Nar
             ...
               →DP Problem 34
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 27
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(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 27
Nar
             ...
               →DP Problem 36
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 27
Nar
             ...
               →DP Problem 37
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 27
Nar
             ...
               →DP Problem 38
Polynomial 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''''''')))


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

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

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 27
Nar
             ...
               →DP Problem 39
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 27
Nar
             ...
               →DP Problem 40
Polynomial 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 w.r.t. to the implicit AFS that need to be oriented.

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

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 27
Nar
             ...
               →DP Problem 41
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 42
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 42
Nar
             ...
               →DP Problem 43
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 42
Nar
             ...
               →DP Problem 44
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 42
Nar
             ...
               →DP Problem 45
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 42
Nar
             ...
               →DP Problem 46
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 42
Nar
             ...
               →DP Problem 47
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 42
Nar
             ...
               →DP Problem 48
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 42
Nar
             ...
               →DP Problem 49
Polynomial 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 pairs can be strictly oriented:

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


Additionally, the following usable rules for innermost w.r.t. to the implicit AFS can be oriented:

ifhigh(true, n, add(m, x)) -> high(n, x)
ifhigh(false, n, add(m, x)) -> add(m, high(n, x))
high(n, nil) -> nil
high(n, add(m, x)) -> ifhigh(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)
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))


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

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 42
Nar
             ...
               →DP Problem 50
Dependency Graph


Dependency Pairs:

QUICKSORT(add(s(y'), add(s(x'), x''))) -> QUICKSORT(ifhigh(le(x', y'), s(y'), add(s(x'), 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




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


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 42
Nar
             ...
               →DP Problem 51
Polynomial Ordering


Dependency Pair:

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




The following dependency pair can be strictly oriented:

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


Additionally, the following usable rules for innermost w.r.t. to the implicit AFS can be oriented:

iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, x))


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

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 42
Nar
             ...
               →DP Problem 53
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.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 42
Nar
             ...
               →DP Problem 52
Polynomial Ordering


Dependency Pairs:

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




The following dependency pairs can be strictly oriented:

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'')))


Additionally, the following usable rules for innermost w.r.t. to the implicit AFS can be oriented:

iflow(true, n, add(m, x)) -> add(m, low(n, x))
iflow(false, n, add(m, x)) -> low(n, x)
low(n, nil) -> nil
low(n, add(m, x)) -> iflow(le(m, n), n, add(m, 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))


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

resulting in one new DP problem.


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