(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)  =  APP(x1, x2)
cons(x1, x2)  =  cons(x1, x2)
le(x1, x2)  =  le(x1)
0  =  0
true  =  true
s(x1)  =  s(x1)
false  =  false
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 with status [RPO].
Quasi-Precedence:
0 > [APP2, cons2, le1, true, false, app2, nil]
s1 > [APP2, cons2, le1, true, false, app2, nil]
quicksort1 > [APP2, cons2, le1, true, false, app2, nil]

Status:
APP2: [1,2]
cons2: [1,2]
le1: multiset
0: multiset
true: multiset
s1: multiset
false: multiset
app2: [1,2]
nil: multiset
quicksort1: multiset


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)  =  le(x1, x2)
0  =  0
true  =  true
false  =  false
app(x1, x2)  =  x2
nil  =  nil
cons(x1, x2)  =  x2
low(x1, x2)  =  low
iflow(x1, x2, x3)  =  iflow
high(x1, x2)  =  high
ifhigh(x1, x2, x3)  =  ifhigh
quicksort(x1)  =  quicksort(x1)

Recursive path order with status [RPO].
Quasi-Precedence:
s1 > [LE1, le2, true, false, nil, low, iflow, high, ifhigh]
0 > [LE1, le2, true, false, nil, low, iflow, high, ifhigh]
quicksort1 > [LE1, le2, true, false, nil, low, iflow, high, ifhigh]

Status:
LE1: [1]
s1: [1]
le2: multiset
0: multiset
true: multiset
false: multiset
nil: multiset
low: []
iflow: []
high: []
ifhigh: []
quicksort1: multiset


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.


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(x1, x2)
cons(x1, x2)  =  cons(x1, x2)
IFHIGH(x1, x2, x3)  =  IFHIGH(x2, x3)
le(x1, x2)  =  le(x1)
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 with status [RPO].
Quasi-Precedence:
0 > [HIGH2, cons2, IFHIGH2, le1, true, false, app2, nil]
s1 > [HIGH2, cons2, IFHIGH2, le1, true, false, app2, nil]
quicksort1 > [HIGH2, cons2, IFHIGH2, le1, true, false, app2, nil]

Status:
HIGH2: [1,2]
cons2: [1,2]
IFHIGH2: [1,2]
le1: [1]
true: multiset
false: multiset
0: multiset
s1: [1]
app2: [1,2]
nil: multiset
quicksort1: multiset


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:
The TRS P consists of the following rules:

HIGH(N, cons(M, L)) → IFHIGH(le(M, N), N, cons(M, 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.

(20) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(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.


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(x1, x2)
cons(x1, x2)  =  cons(x1, x2)
IFLOW(x1, x2, x3)  =  IFLOW(x2, x3)
le(x1, x2)  =  le(x1)
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 with status [RPO].
Quasi-Precedence:
0 > [LOW2, cons2, IFLOW2, le1, true, false, app2, nil]
s1 > [LOW2, cons2, IFLOW2, le1, true, false, app2, nil]
quicksort1 > [LOW2, cons2, IFLOW2, le1, true, false, app2, nil]

Status:
LOW2: [1,2]
cons2: [1,2]
IFLOW2: [1,2]
le1: [1]
true: multiset
false: multiset
0: multiset
s1: [1]
app2: [1,2]
nil: multiset
quicksort1: multiset


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:
The TRS P consists of the following rules:

LOW(N, cons(M, L)) → IFLOW(le(M, N), N, cons(M, 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.

(25) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(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)  =  QUICKSORT(x1)
cons(x1, x2)  =  cons(x2)
high(x1, x2)  =  x2
low(x1, x2)  =  x2
le(x1, x2)  =  le
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 with status [RPO].
Quasi-Precedence:
QUICKSORT1 > [true, nil]
[le, false] > cons1 > [true, nil]
0 > [true, nil]
s1 > [true, nil]
quicksort1 > app2 > cons1 > [true, nil]

Status:
QUICKSORT1: [1]
cons1: multiset
le: multiset
0: multiset
true: multiset
s1: [1]
false: multiset
app2: [2,1]
nil: multiset
quicksort1: multiset


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