Term Rewriting System R:
[x, y, n, m]
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
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:

MINUS(s(x), s(y)) -> MINUS(x, y)
QUOT(s(x), s(y)) -> QUOT(minus(x, y), s(y))
QUOT(s(x), s(y)) -> MINUS(x, y)
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 seven SCCs.


   R
DPs
       →DP Problem 1
Polynomial Ordering
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo


Dependency Pair:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
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:

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


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

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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 8
Dependency Graph
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo


Dependency Pair:


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
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
Polo
       →DP Problem 2
Polynomial Ordering
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo


Dependency Pair:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
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(x), s(y)) -> LE(x, y)


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

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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
           →DP Problem 9
Dependency Graph
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo


Dependency Pair:


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
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
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polynomial Ordering
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo


Dependency Pair:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
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, x), y) -> APP(x, y)


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

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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
           →DP Problem 10
Dependency Graph
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo


Dependency Pair:


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
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
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polynomial Ordering
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo


Dependency Pair:

QUOT(s(x), s(y)) -> QUOT(minus(x, y), s(y))


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
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:

QUOT(s(x), s(y)) -> QUOT(minus(x, y), s(y))


Additionally, the following usable rules for innermost can be oriented:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)


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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
           →DP Problem 11
Dependency Graph
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo


Dependency Pair:


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
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
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polynomial Ordering
       →DP Problem 6
Polo
       →DP Problem 7
Polo


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:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
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, n, add(m, x)) -> LOW(n, x)
IFLOW(true, n, add(m, x)) -> LOW(n, x)


Additionally, the following usable rules for innermost can be oriented:

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


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(0)=  0  
  POL(LOW(x1, x2))=  x2  
  POL(false)=  0  
  POL(IF_LOW(x1, x2, x3))=  x3  
  POL(true)=  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
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
           →DP Problem 12
Dependency Graph
       →DP Problem 6
Polo
       →DP Problem 7
Polo


Dependency Pair:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
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
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polynomial Ordering
       →DP Problem 7
Polo


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:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
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, n, add(m, x)) -> HIGH(n, x)
IFHIGH(true, n, add(m, x)) -> HIGH(n, x)


Additionally, the following usable rules for innermost can be oriented:

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


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(0)=  0  
  POL(false)=  0  
  POL(IF_HIGH(x1, x2, x3))=  x3  
  POL(HIGH(x1, x2))=  x2  
  POL(true)=  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
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
           →DP Problem 13
Dependency Graph
       →DP Problem 7
Polo


Dependency Pair:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
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
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polynomial Ordering


Dependency Pairs:

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


Rules:


minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
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(n, x)) -> QUICKSORT(high(n, x))
QUICKSORT(add(n, x)) -> QUICKSORT(low(n, x))


Additionally, the following usable rules for innermost can be oriented:

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


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(QUICKSORT(x1))=  1 + x1  
  POL(0)=  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(nil)=  0  
  POL(true)=  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
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
           →DP Problem 14
Dependency Graph


Dependency Pair:


Rules:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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