(0) Obligation:

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

lt(0, s(X)) → true
lt(s(X), 0) → false
lt(s(X), s(Y)) → lt(X, Y)
append(nil, Y) → Y
append(add(N, X), Y) → add(N, append(X, Y))
split(N, nil) → pair(nil, nil)
split(N, add(M, Y)) → f_1(split(N, Y), N, M, Y)
f_1(pair(X, Z), N, M, Y) → f_2(lt(N, M), N, M, Y, X, Z)
f_2(true, N, M, Y, X, Z) → pair(X, add(M, Z))
f_2(false, N, M, Y, X, Z) → pair(add(M, X), Z)
qsort(nil) → nil
qsort(add(N, X)) → f_3(split(N, X), N, X)
f_3(pair(Y, Z), N, X) → append(qsort(Y), add(X, qsort(Z)))

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:

lt(0, s(X)) → true
lt(s(X), 0) → false
lt(s(X), s(Y)) → lt(X, Y)
append(nil, Y) → Y
append(add(N, X), Y) → add(N, append(X, Y))
split(N, nil) → pair(nil, nil)
split(N, add(M, Y)) → f_1(split(N, Y), N, M, Y)
f_1(pair(X, Z), N, M, Y) → f_2(lt(N, M), N, M, Y, X, Z)
f_2(true, N, M, Y, X, Z) → pair(X, add(M, Z))
f_2(false, N, M, Y, X, Z) → pair(add(M, X), Z)
qsort(nil) → nil
qsort(add(N, X)) → f_3(split(N, X), N, X)
f_3(pair(Y, Z), N, X) → append(qsort(Y), add(X, qsort(Z)))

The set Q consists of the following terms:

lt(0, s(x0))
lt(s(x0), 0)
lt(s(x0), s(x1))
append(nil, x0)
append(add(x0, x1), x2)
split(x0, nil)
split(x0, add(x1, x2))
f_1(pair(x0, x1), x2, x3, x4)
f_2(true, x0, x1, x2, x3, x4)
f_2(false, x0, x1, x2, x3, x4)
qsort(nil)
qsort(add(x0, x1))
f_3(pair(x0, x1), x2, x3)

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

LT(s(X), s(Y)) → LT(X, Y)
APPEND(add(N, X), Y) → APPEND(X, Y)
SPLIT(N, add(M, Y)) → F_1(split(N, Y), N, M, Y)
SPLIT(N, add(M, Y)) → SPLIT(N, Y)
F_1(pair(X, Z), N, M, Y) → F_2(lt(N, M), N, M, Y, X, Z)
F_1(pair(X, Z), N, M, Y) → LT(N, M)
QSORT(add(N, X)) → F_3(split(N, X), N, X)
QSORT(add(N, X)) → SPLIT(N, X)
F_3(pair(Y, Z), N, X) → APPEND(qsort(Y), add(X, qsort(Z)))
F_3(pair(Y, Z), N, X) → QSORT(Y)
F_3(pair(Y, Z), N, X) → QSORT(Z)

The TRS R consists of the following rules:

lt(0, s(X)) → true
lt(s(X), 0) → false
lt(s(X), s(Y)) → lt(X, Y)
append(nil, Y) → Y
append(add(N, X), Y) → add(N, append(X, Y))
split(N, nil) → pair(nil, nil)
split(N, add(M, Y)) → f_1(split(N, Y), N, M, Y)
f_1(pair(X, Z), N, M, Y) → f_2(lt(N, M), N, M, Y, X, Z)
f_2(true, N, M, Y, X, Z) → pair(X, add(M, Z))
f_2(false, N, M, Y, X, Z) → pair(add(M, X), Z)
qsort(nil) → nil
qsort(add(N, X)) → f_3(split(N, X), N, X)
f_3(pair(Y, Z), N, X) → append(qsort(Y), add(X, qsort(Z)))

The set Q consists of the following terms:

lt(0, s(x0))
lt(s(x0), 0)
lt(s(x0), s(x1))
append(nil, x0)
append(add(x0, x1), x2)
split(x0, nil)
split(x0, add(x1, x2))
f_1(pair(x0, x1), x2, x3, x4)
f_2(true, x0, x1, x2, x3, x4)
f_2(false, x0, x1, x2, x3, x4)
qsort(nil)
qsort(add(x0, x1))
f_3(pair(x0, x1), x2, x3)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

APPEND(add(N, X), Y) → APPEND(X, Y)

The TRS R consists of the following rules:

lt(0, s(X)) → true
lt(s(X), 0) → false
lt(s(X), s(Y)) → lt(X, Y)
append(nil, Y) → Y
append(add(N, X), Y) → add(N, append(X, Y))
split(N, nil) → pair(nil, nil)
split(N, add(M, Y)) → f_1(split(N, Y), N, M, Y)
f_1(pair(X, Z), N, M, Y) → f_2(lt(N, M), N, M, Y, X, Z)
f_2(true, N, M, Y, X, Z) → pair(X, add(M, Z))
f_2(false, N, M, Y, X, Z) → pair(add(M, X), Z)
qsort(nil) → nil
qsort(add(N, X)) → f_3(split(N, X), N, X)
f_3(pair(Y, Z), N, X) → append(qsort(Y), add(X, qsort(Z)))

The set Q consists of the following terms:

lt(0, s(x0))
lt(s(x0), 0)
lt(s(x0), s(x1))
append(nil, x0)
append(add(x0, x1), x2)
split(x0, nil)
split(x0, add(x1, x2))
f_1(pair(x0, x1), x2, x3, x4)
f_2(true, x0, x1, x2, x3, x4)
f_2(false, x0, x1, x2, x3, x4)
qsort(nil)
qsort(add(x0, x1))
f_3(pair(x0, x1), x2, x3)

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

(8) Obligation:

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

LT(s(X), s(Y)) → LT(X, Y)

The TRS R consists of the following rules:

lt(0, s(X)) → true
lt(s(X), 0) → false
lt(s(X), s(Y)) → lt(X, Y)
append(nil, Y) → Y
append(add(N, X), Y) → add(N, append(X, Y))
split(N, nil) → pair(nil, nil)
split(N, add(M, Y)) → f_1(split(N, Y), N, M, Y)
f_1(pair(X, Z), N, M, Y) → f_2(lt(N, M), N, M, Y, X, Z)
f_2(true, N, M, Y, X, Z) → pair(X, add(M, Z))
f_2(false, N, M, Y, X, Z) → pair(add(M, X), Z)
qsort(nil) → nil
qsort(add(N, X)) → f_3(split(N, X), N, X)
f_3(pair(Y, Z), N, X) → append(qsort(Y), add(X, qsort(Z)))

The set Q consists of the following terms:

lt(0, s(x0))
lt(s(x0), 0)
lt(s(x0), s(x1))
append(nil, x0)
append(add(x0, x1), x2)
split(x0, nil)
split(x0, add(x1, x2))
f_1(pair(x0, x1), x2, x3, x4)
f_2(true, x0, x1, x2, x3, x4)
f_2(false, x0, x1, x2, x3, x4)
qsort(nil)
qsort(add(x0, x1))
f_3(pair(x0, x1), x2, x3)

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

(9) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


LT(s(X), s(Y)) → LT(X, Y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
LT(x1, x2)  =  LT(x1)
s(x1)  =  s(x1)
lt(x1, x2)  =  lt(x1, x2)
0  =  0
true  =  true
false  =  false
append(x1, x2)  =  x2
nil  =  nil
add(x1, x2)  =  x2
split(x1, x2)  =  split(x2)
pair(x1, x2)  =  pair(x2)
f_1(x1, x2, x3, x4)  =  x1
f_2(x1, x2, x3, x4, x5, x6)  =  f_2(x6)
qsort(x1)  =  qsort(x1)
f_3(x1, x2, x3)  =  x1

Lexicographic Path Order [LPO].
Precedence:
s1 > true
lt2 > true
lt2 > false > [split1, pair1, f21, qsort1] > nil


The following usable rules [FROCOS05] were oriented:

lt(0, s(X)) → true
lt(s(X), 0) → false
lt(s(X), s(Y)) → lt(X, Y)
append(nil, Y) → Y
append(add(N, X), Y) → add(N, append(X, Y))
split(N, nil) → pair(nil, nil)
split(N, add(M, Y)) → f_1(split(N, Y), N, M, Y)
f_1(pair(X, Z), N, M, Y) → f_2(lt(N, M), N, M, Y, X, Z)
f_2(true, N, M, Y, X, Z) → pair(X, add(M, Z))
f_2(false, N, M, Y, X, Z) → pair(add(M, X), Z)
qsort(nil) → nil
qsort(add(N, X)) → f_3(split(N, X), N, X)
f_3(pair(Y, Z), N, X) → append(qsort(Y), add(X, qsort(Z)))

(10) Obligation:

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

lt(0, s(X)) → true
lt(s(X), 0) → false
lt(s(X), s(Y)) → lt(X, Y)
append(nil, Y) → Y
append(add(N, X), Y) → add(N, append(X, Y))
split(N, nil) → pair(nil, nil)
split(N, add(M, Y)) → f_1(split(N, Y), N, M, Y)
f_1(pair(X, Z), N, M, Y) → f_2(lt(N, M), N, M, Y, X, Z)
f_2(true, N, M, Y, X, Z) → pair(X, add(M, Z))
f_2(false, N, M, Y, X, Z) → pair(add(M, X), Z)
qsort(nil) → nil
qsort(add(N, X)) → f_3(split(N, X), N, X)
f_3(pair(Y, Z), N, X) → append(qsort(Y), add(X, qsort(Z)))

The set Q consists of the following terms:

lt(0, s(x0))
lt(s(x0), 0)
lt(s(x0), s(x1))
append(nil, x0)
append(add(x0, x1), x2)
split(x0, nil)
split(x0, add(x1, x2))
f_1(pair(x0, x1), x2, x3, x4)
f_2(true, x0, x1, x2, x3, x4)
f_2(false, x0, x1, x2, x3, x4)
qsort(nil)
qsort(add(x0, x1))
f_3(pair(x0, x1), x2, x3)

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

(11) PisEmptyProof (EQUIVALENT transformation)

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

(12) TRUE

(13) Obligation:

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

SPLIT(N, add(M, Y)) → SPLIT(N, Y)

The TRS R consists of the following rules:

lt(0, s(X)) → true
lt(s(X), 0) → false
lt(s(X), s(Y)) → lt(X, Y)
append(nil, Y) → Y
append(add(N, X), Y) → add(N, append(X, Y))
split(N, nil) → pair(nil, nil)
split(N, add(M, Y)) → f_1(split(N, Y), N, M, Y)
f_1(pair(X, Z), N, M, Y) → f_2(lt(N, M), N, M, Y, X, Z)
f_2(true, N, M, Y, X, Z) → pair(X, add(M, Z))
f_2(false, N, M, Y, X, Z) → pair(add(M, X), Z)
qsort(nil) → nil
qsort(add(N, X)) → f_3(split(N, X), N, X)
f_3(pair(Y, Z), N, X) → append(qsort(Y), add(X, qsort(Z)))

The set Q consists of the following terms:

lt(0, s(x0))
lt(s(x0), 0)
lt(s(x0), s(x1))
append(nil, x0)
append(add(x0, x1), x2)
split(x0, nil)
split(x0, add(x1, x2))
f_1(pair(x0, x1), x2, x3, x4)
f_2(true, x0, x1, x2, x3, x4)
f_2(false, x0, x1, x2, x3, x4)
qsort(nil)
qsort(add(x0, x1))
f_3(pair(x0, x1), x2, x3)

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

(14) Obligation:

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

QSORT(add(N, X)) → F_3(split(N, X), N, X)
F_3(pair(Y, Z), N, X) → QSORT(Y)
F_3(pair(Y, Z), N, X) → QSORT(Z)

The TRS R consists of the following rules:

lt(0, s(X)) → true
lt(s(X), 0) → false
lt(s(X), s(Y)) → lt(X, Y)
append(nil, Y) → Y
append(add(N, X), Y) → add(N, append(X, Y))
split(N, nil) → pair(nil, nil)
split(N, add(M, Y)) → f_1(split(N, Y), N, M, Y)
f_1(pair(X, Z), N, M, Y) → f_2(lt(N, M), N, M, Y, X, Z)
f_2(true, N, M, Y, X, Z) → pair(X, add(M, Z))
f_2(false, N, M, Y, X, Z) → pair(add(M, X), Z)
qsort(nil) → nil
qsort(add(N, X)) → f_3(split(N, X), N, X)
f_3(pair(Y, Z), N, X) → append(qsort(Y), add(X, qsort(Z)))

The set Q consists of the following terms:

lt(0, s(x0))
lt(s(x0), 0)
lt(s(x0), s(x1))
append(nil, x0)
append(add(x0, x1), x2)
split(x0, nil)
split(x0, add(x1, x2))
f_1(pair(x0, x1), x2, x3, x4)
f_2(true, x0, x1, x2, x3, x4)
f_2(false, x0, x1, x2, x3, x4)
qsort(nil)
qsort(add(x0, x1))
f_3(pair(x0, x1), x2, x3)

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