(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

Q is empty.

(1) Overlay + Local Confluence (EQUIVALENT transformation)

The TRS is overlay and locally confluent. By [NOC] we can switch to innermost.

(2) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
iflow(true, x0, cons(x1, x2))
iflow(false, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
ifhigh(true, x0, cons(x1, x2))
ifhigh(false, x0, cons(x1, x2))
quicksort(nil)
quicksort(cons(x0, x1))

(3) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(4) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LE(s(X), s(Y)) → LE(X, Y)
APP(cons(N, L), Y) → APP(L, Y)
LOW(N, cons(M, L)) → IFLOW(le(M, N), N, cons(M, L))
LOW(N, cons(M, L)) → LE(M, N)
IFLOW(true, N, cons(M, L)) → LOW(N, L)
IFLOW(false, N, cons(M, L)) → LOW(N, L)
HIGH(N, cons(M, L)) → IFHIGH(le(M, N), N, cons(M, L))
HIGH(N, cons(M, L)) → LE(M, N)
IFHIGH(true, N, cons(M, L)) → HIGH(N, L)
IFHIGH(false, N, cons(M, L)) → HIGH(N, L)
QUICKSORT(cons(N, L)) → APP(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))
QUICKSORT(cons(N, L)) → QUICKSORT(low(N, L))
QUICKSORT(cons(N, L)) → LOW(N, L)
QUICKSORT(cons(N, L)) → QUICKSORT(high(N, L))
QUICKSORT(cons(N, L)) → HIGH(N, L)

The TRS R consists of the following rules:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
iflow(true, x0, cons(x1, x2))
iflow(false, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
ifhigh(true, x0, cons(x1, x2))
ifhigh(false, x0, cons(x1, x2))
quicksort(nil)
quicksort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 5 SCCs with 5 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

Q DP problem:
The TRS P consists of the following rules:

APP(cons(N, L), Y) → APP(L, Y)

The TRS R consists of the following rules:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
iflow(true, x0, cons(x1, x2))
iflow(false, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
ifhigh(true, x0, cons(x1, x2))
ifhigh(false, x0, cons(x1, x2))
quicksort(nil)
quicksort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


APP(cons(N, L), Y) → APP(L, Y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
APP(x1, x2)  =  x1
cons(x1, x2)  =  cons(x1, x2)
le(x1, x2)  =  le(x1, x2)
0  =  0
true  =  true
s(x1)  =  s(x1)
false  =  false
app(x1, x2)  =  app(x1, x2)
nil  =  nil
low(x1, x2)  =  low(x2)
iflow(x1, x2, x3)  =  iflow(x3)
high(x1, x2)  =  x2
ifhigh(x1, x2, x3)  =  x3
quicksort(x1)  =  quicksort(x1)

Recursive Path Order [RPO].
Precedence:
le2 > [true, false]
0 > [true, false]
s1 > [true, false]
quicksort1 > app2 > [cons2, low1, iflow1] > nil > [true, false]


The following usable rules [FROCOS05] were oriented:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

(9) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
iflow(true, x0, cons(x1, x2))
iflow(false, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
ifhigh(true, x0, cons(x1, x2))
ifhigh(false, x0, cons(x1, x2))
quicksort(nil)
quicksort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(10) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(11) TRUE

(12) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LE(s(X), s(Y)) → LE(X, Y)

The TRS R consists of the following rules:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
iflow(true, x0, cons(x1, x2))
iflow(false, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
ifhigh(true, x0, cons(x1, x2))
ifhigh(false, x0, cons(x1, x2))
quicksort(nil)
quicksort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


LE(s(X), s(Y)) → LE(X, Y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
LE(x1, x2)  =  LE(x2)
s(x1)  =  s(x1)
le(x1, x2)  =  x1
0  =  0
true  =  true
false  =  false
app(x1, x2)  =  x2
nil  =  nil
cons(x1, x2)  =  x2
low(x1, x2)  =  x2
iflow(x1, x2, x3)  =  x3
high(x1, x2)  =  high(x1)
ifhigh(x1, x2, x3)  =  ifhigh(x2)
quicksort(x1)  =  quicksort

Recursive Path Order [RPO].
Precedence:
[LE1, s1, false] > [high1, ifhigh1] > nil
[0, true] > [high1, ifhigh1] > nil
quicksort > [high1, ifhigh1] > nil


The following usable rules [FROCOS05] were oriented:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

(14) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
iflow(true, x0, cons(x1, x2))
iflow(false, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
ifhigh(true, x0, cons(x1, x2))
ifhigh(false, x0, cons(x1, x2))
quicksort(nil)
quicksort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(15) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(16) TRUE

(17) Obligation:

Q DP problem:
The TRS P consists of the following rules:

HIGH(N, cons(M, L)) → IFHIGH(le(M, N), N, cons(M, L))
IFHIGH(true, N, cons(M, L)) → HIGH(N, L)
IFHIGH(false, N, cons(M, L)) → HIGH(N, L)

The TRS R consists of the following rules:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
iflow(true, x0, cons(x1, x2))
iflow(false, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
ifhigh(true, x0, cons(x1, x2))
ifhigh(false, x0, cons(x1, x2))
quicksort(nil)
quicksort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(18) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


HIGH(N, cons(M, L)) → IFHIGH(le(M, N), N, cons(M, L))
IFHIGH(true, N, cons(M, L)) → HIGH(N, L)
IFHIGH(false, N, cons(M, L)) → HIGH(N, L)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
HIGH(x1, x2)  =  HIGH(x2)
cons(x1, x2)  =  cons(x1, x2)
IFHIGH(x1, x2, x3)  =  x3
le(x1, x2)  =  le(x1, x2)
true  =  true
false  =  false
0  =  0
s(x1)  =  x1
app(x1, x2)  =  app(x1, x2)
nil  =  nil
low(x1, x2)  =  x2
iflow(x1, x2, x3)  =  x3
high(x1, x2)  =  x2
ifhigh(x1, x2, x3)  =  x3
quicksort(x1)  =  quicksort(x1)

Recursive Path Order [RPO].
Precedence:
0 > false > cons2 > HIGH1 > [le2, true, nil]
quicksort1 > app2 > cons2 > HIGH1 > [le2, true, nil]


The following usable rules [FROCOS05] were oriented:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

(19) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
iflow(true, x0, cons(x1, x2))
iflow(false, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
ifhigh(true, x0, cons(x1, x2))
ifhigh(false, x0, cons(x1, x2))
quicksort(nil)
quicksort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(20) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(21) TRUE

(22) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LOW(N, cons(M, L)) → IFLOW(le(M, N), N, cons(M, L))
IFLOW(true, N, cons(M, L)) → LOW(N, L)
IFLOW(false, N, cons(M, L)) → LOW(N, L)

The TRS R consists of the following rules:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
iflow(true, x0, cons(x1, x2))
iflow(false, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
ifhigh(true, x0, cons(x1, x2))
ifhigh(false, x0, cons(x1, x2))
quicksort(nil)
quicksort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(23) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


LOW(N, cons(M, L)) → IFLOW(le(M, N), N, cons(M, L))
IFLOW(true, N, cons(M, L)) → LOW(N, L)
IFLOW(false, N, cons(M, L)) → LOW(N, L)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
LOW(x1, x2)  =  LOW(x2)
cons(x1, x2)  =  cons(x2)
IFLOW(x1, x2, x3)  =  IFLOW(x1, x3)
le(x1, x2)  =  le
true  =  true
false  =  false
0  =  0
s(x1)  =  s(x1)
app(x1, x2)  =  app(x1, x2)
nil  =  nil
low(x1, x2)  =  x2
iflow(x1, x2, x3)  =  x3
high(x1, x2)  =  x2
ifhigh(x1, x2, x3)  =  x3
quicksort(x1)  =  quicksort(x1)

Recursive Path Order [RPO].
Precedence:
quicksort1 > app2 > [LOW1, cons1, le, false, 0] > IFLOW2
quicksort1 > app2 > [LOW1, cons1, le, false, 0] > true
quicksort1 > nil


The following usable rules [FROCOS05] were oriented:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

(24) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
iflow(true, x0, cons(x1, x2))
iflow(false, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
ifhigh(true, x0, cons(x1, x2))
ifhigh(false, x0, cons(x1, x2))
quicksort(nil)
quicksort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(25) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(26) TRUE

(27) Obligation:

Q DP problem:
The TRS P consists of the following rules:

QUICKSORT(cons(N, L)) → QUICKSORT(high(N, L))
QUICKSORT(cons(N, L)) → QUICKSORT(low(N, L))

The TRS R consists of the following rules:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
iflow(true, x0, cons(x1, x2))
iflow(false, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
ifhigh(true, x0, cons(x1, x2))
ifhigh(false, x0, cons(x1, x2))
quicksort(nil)
quicksort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(28) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


QUICKSORT(cons(N, L)) → QUICKSORT(high(N, L))
QUICKSORT(cons(N, L)) → QUICKSORT(low(N, L))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
QUICKSORT(x1)  =  x1
cons(x1, x2)  =  cons(x1, x2)
high(x1, x2)  =  x2
low(x1, x2)  =  x2
le(x1, x2)  =  le(x1, x2)
0  =  0
true  =  true
s(x1)  =  s(x1)
false  =  false
app(x1, x2)  =  app(x1, x2)
nil  =  nil
iflow(x1, x2, x3)  =  x3
ifhigh(x1, x2, x3)  =  x3
quicksort(x1)  =  quicksort(x1)

Recursive Path Order [RPO].
Precedence:
0 > [s1, false] > cons2 > [le2, true]
nil > [le2, true]
quicksort1 > app2 > cons2 > [le2, true]


The following usable rules [FROCOS05] were oriented:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

(29) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
app(nil, Y) → Y
app(cons(N, L), Y) → cons(N, app(L, Y))
low(N, nil) → nil
low(N, cons(M, L)) → iflow(le(M, N), N, cons(M, L))
iflow(true, N, cons(M, L)) → cons(M, low(N, L))
iflow(false, N, cons(M, L)) → low(N, L)
high(N, nil) → nil
high(N, cons(M, L)) → ifhigh(le(M, N), N, cons(M, L))
ifhigh(true, N, cons(M, L)) → high(N, L)
ifhigh(false, N, cons(M, L)) → cons(M, high(N, L))
quicksort(nil) → nil
quicksort(cons(N, L)) → app(quicksort(low(N, L)), cons(N, quicksort(high(N, L))))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
iflow(true, x0, cons(x1, x2))
iflow(false, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
ifhigh(true, x0, cons(x1, x2))
ifhigh(false, x0, cons(x1, x2))
quicksort(nil)
quicksort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(30) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(31) TRUE