(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

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:

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

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(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:

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)) → IF_LOW(le(m, n), n, add(m, x))
LOW(n, add(m, x)) → LE(m, n)
IF_LOW(true, n, add(m, x)) → LOW(n, x)
IF_LOW(false, n, add(m, x)) → LOW(n, x)
HIGH(n, add(m, x)) → IF_HIGH(le(m, n), n, add(m, x))
HIGH(n, add(m, x)) → LE(m, n)
IF_HIGH(true, n, add(m, x)) → HIGH(n, x)
IF_HIGH(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)

The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(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 7 SCCs with 6 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

APP(add(n, x), y) → APP(x, y)

The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(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(add(n, x), y) → APP(x, y)
The remaining pairs can at least be oriented weakly.
Used ordering: Lexicographic path order with status [LPO].
Quasi-Precedence:
[APP2, add2]

Status:
add2: [2,1]
APP2: [2,1]


The following usable rules [FROCOS05] were oriented: none

(9) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(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:

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

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(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)  =  x1
s(x1)  =  s(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
s1: [1]


The following usable rules [FROCOS05] were oriented: none

(14) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(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, add(m, x)) → IF_HIGH(le(m, n), n, add(m, x))
IF_HIGH(true, n, add(m, x)) → HIGH(n, x)
IF_HIGH(false, n, add(m, x)) → HIGH(n, x)

The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(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.


IF_HIGH(true, n, add(m, x)) → HIGH(n, x)
IF_HIGH(false, n, add(m, x)) → HIGH(n, x)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
HIGH(x1, x2)  =  x2
add(x1, x2)  =  add(x1, x2)
IF_HIGH(x1, x2, x3)  =  x3
le(x1, x2)  =  le
true  =  true
false  =  false
s(x1)  =  s
0  =  0

Lexicographic path order with status [LPO].
Quasi-Precedence:
add2 > [le, true]
s > [le, true]
s > false

Status:
add2: [1,2]
true: []
false: []
s: []
0: []
le: []


The following usable rules [FROCOS05] were oriented: none

(19) Obligation:

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

HIGH(n, add(m, x)) → IF_HIGH(le(m, n), n, add(m, x))

The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(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, add(m, x)) → IF_LOW(le(m, n), n, add(m, x))
IF_LOW(true, n, add(m, x)) → LOW(n, x)
IF_LOW(false, n, add(m, x)) → LOW(n, x)

The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(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.


IF_LOW(true, n, add(m, x)) → LOW(n, x)
IF_LOW(false, n, add(m, x)) → LOW(n, x)
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)
add(x1, x2)  =  add(x1, x2)
IF_LOW(x1, x2, x3)  =  IF_LOW(x2, x3)
le(x1, x2)  =  le
true  =  true
false  =  false
s(x1)  =  s(x1)
0  =  0

Lexicographic path order with status [LPO].
Quasi-Precedence:
s1 > [LOW2, add2, IFLOW2]
0 > [le, true] > [LOW2, add2, IFLOW2]
0 > false > [LOW2, add2, IFLOW2]

Status:
add2: [2,1]
true: []
false: []
s1: [1]
LOW2: [1,2]
IFLOW2: [1,2]
0: []
le: []


The following usable rules [FROCOS05] were oriented: none

(24) Obligation:

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

LOW(n, add(m, x)) → IF_LOW(le(m, n), n, add(m, x))

The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(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(add(n, x)) → QUICKSORT(high(n, x))
QUICKSORT(add(n, x)) → QUICKSORT(low(n, x))

The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(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(add(n, x)) → QUICKSORT(high(n, x))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
QUICKSORT(x1)  =  QUICKSORT(x1)
add(x1, x2)  =  add(x2)
high(x1, x2)  =  x2
low(x1, x2)  =  low(x2)
if_high(x1, x2, x3)  =  x3
false  =  false
if_low(x1, x2, x3)  =  if_low(x3)
true  =  true
le(x1, x2)  =  le
nil  =  nil
s(x1)  =  x1
0  =  0

Lexicographic path order with status [LPO].
Quasi-Precedence:
QUICKSORT1 > [add1, low1, iflow1] > [false, le, nil]
0 > true > [add1, low1, iflow1] > [false, le, nil]

Status:
add1: [1]
low1: [1]
true: []
iflow1: [1]
false: []
QUICKSORT1: [1]
0: []
nil: []
le: []


The following usable rules [FROCOS05] were oriented:

if_high(false, n, add(m, x)) → add(m, high(n, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
low(n, nil) → nil
high(n, nil) → nil

(29) Obligation:

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

QUICKSORT(add(n, x)) → QUICKSORT(low(n, x))

The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(x0, x1))

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

(30) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


QUICKSORT(add(n, x)) → QUICKSORT(low(n, x))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
QUICKSORT(x1)  =  QUICKSORT(x1)
add(x1, x2)  =  add(x1, x2)
low(x1, x2)  =  x2
if_low(x1, x2, x3)  =  x3
true  =  true
false  =  false
le(x1, x2)  =  le
nil  =  nil
s(x1)  =  s
0  =  0

Lexicographic path order with status [LPO].
Quasi-Precedence:
QUICKSORT1 > le
true > add2 > le
[false, 0] > le
nil > le
s > le

Status:
add2: [1,2]
true: []
false: []
s: []
QUICKSORT1: [1]
0: []
nil: []
le: []


The following usable rules [FROCOS05] were oriented:

if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
low(n, nil) → nil

(31) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(x0, x1))

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

(32) PisEmptyProof (EQUIVALENT transformation)

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

(33) TRUE

(34) Obligation:

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

MINUS(s(x), s(y)) → MINUS(x, y)

The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(x0, x1))

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

(35) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MINUS(s(x), s(y)) → MINUS(x, y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MINUS(x1, x2)  =  x1
s(x1)  =  s(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:
trivial

Status:
s1: [1]


The following usable rules [FROCOS05] were oriented: none

(36) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(x0, x1))

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

(37) PisEmptyProof (EQUIVALENT transformation)

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

(38) TRUE

(39) Obligation:

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

QUOT(s(x), s(y)) → QUOT(minus(x, y), s(y))

The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(x0, x1))

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

(40) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


QUOT(s(x), s(y)) → QUOT(minus(x, y), s(y))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
QUOT(x1, x2)  =  QUOT(x1, x2)
s(x1)  =  s(x1)
minus(x1, x2)  =  x1
0  =  0

Lexicographic path order with status [LPO].
Quasi-Precedence:
s1 > QUOT2

Status:
QUOT2: [2,1]
s1: [1]
0: []


The following usable rules [FROCOS05] were oriented:

minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x

(41) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following 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)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(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))))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(x0, x1))

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

(42) PisEmptyProof (EQUIVALENT transformation)

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

(43) TRUE