Term Rewriting System R:
[X, Y, N, M, Z]
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)) -> f1(split(N, Y), N, M, Y)
f1(pair(X, Z), N, M, Y) -> f2(lt(N, M), N, M, Y, X, Z)
f2(true, N, M, Y, X, Z) -> pair(X, add(M, Z))
f2(false, N, M, Y, X, Z) -> pair(add(M, X), Z)
qsort(nil) -> nil
qsort(add(N, X)) -> f3(split(N, X), N, X)
f3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z)))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

LT(s(X), s(Y)) -> LT(X, Y)
APPEND(add(N, X), Y) -> APPEND(X, Y)
SPLIT(N, add(M, Y)) -> F1(split(N, Y), N, M, Y)
SPLIT(N, add(M, Y)) -> SPLIT(N, Y)
F1(pair(X, Z), N, M, Y) -> F2(lt(N, M), N, M, Y, X, Z)
F1(pair(X, Z), N, M, Y) -> LT(N, M)
QSORT(add(N, X)) -> F3(split(N, X), N, X)
QSORT(add(N, X)) -> SPLIT(N, X)
F3(pair(Y, Z), N, X) -> APPEND(qsort(Y), add(X, qsort(Z)))
F3(pair(Y, Z), N, X) -> QSORT(Y)
F3(pair(Y, Z), N, X) -> QSORT(Z)

Furthermore, R contains four SCCs.


   R
DPs
       →DP Problem 1
Argument Filtering and Ordering
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
Remaining


Dependency Pair:

LT(s(X), s(Y)) -> LT(X, Y)


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)) -> f1(split(N, Y), N, M, Y)
f1(pair(X, Z), N, M, Y) -> f2(lt(N, M), N, M, Y, X, Z)
f2(true, N, M, Y, X, Z) -> pair(X, add(M, Z))
f2(false, N, M, Y, X, Z) -> pair(add(M, X), Z)
qsort(nil) -> nil
qsort(add(N, X)) -> f3(split(N, X), N, X)
f3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z)))


Strategy:

innermost




The following dependency pair can be strictly oriented:

LT(s(X), s(Y)) -> LT(X, Y)


There are no usable rules for innermost that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
LT(x1, x2) -> LT(x1, x2)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 5
Dependency Graph
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
Remaining


Dependency Pair:


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)) -> f1(split(N, Y), N, M, Y)
f1(pair(X, Z), N, M, Y) -> f2(lt(N, M), N, M, Y, X, Z)
f2(true, N, M, Y, X, Z) -> pair(X, add(M, Z))
f2(false, N, M, Y, X, Z) -> pair(add(M, X), Z)
qsort(nil) -> nil
qsort(add(N, X)) -> f3(split(N, X), N, X)
f3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z)))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Argument Filtering and Ordering
       →DP Problem 3
AFS
       →DP Problem 4
Remaining


Dependency Pair:

APPEND(add(N, X), Y) -> APPEND(X, Y)


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)) -> f1(split(N, Y), N, M, Y)
f1(pair(X, Z), N, M, Y) -> f2(lt(N, M), N, M, Y, X, Z)
f2(true, N, M, Y, X, Z) -> pair(X, add(M, Z))
f2(false, N, M, Y, X, Z) -> pair(add(M, X), Z)
qsort(nil) -> nil
qsort(add(N, X)) -> f3(split(N, X), N, X)
f3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z)))


Strategy:

innermost




The following dependency pair can be strictly oriented:

APPEND(add(N, X), Y) -> APPEND(X, Y)


There are no usable rules for innermost that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
APPEND(x1, x2) -> APPEND(x1, x2)
add(x1, x2) -> add(x1, x2)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
           →DP Problem 6
Dependency Graph
       →DP Problem 3
AFS
       →DP Problem 4
Remaining


Dependency Pair:


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)) -> f1(split(N, Y), N, M, Y)
f1(pair(X, Z), N, M, Y) -> f2(lt(N, M), N, M, Y, X, Z)
f2(true, N, M, Y, X, Z) -> pair(X, add(M, Z))
f2(false, N, M, Y, X, Z) -> pair(add(M, X), Z)
qsort(nil) -> nil
qsort(add(N, X)) -> f3(split(N, X), N, X)
f3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z)))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Argument Filtering and Ordering
       →DP Problem 4
Remaining


Dependency Pair:

SPLIT(N, add(M, Y)) -> SPLIT(N, Y)


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)) -> f1(split(N, Y), N, M, Y)
f1(pair(X, Z), N, M, Y) -> f2(lt(N, M), N, M, Y, X, Z)
f2(true, N, M, Y, X, Z) -> pair(X, add(M, Z))
f2(false, N, M, Y, X, Z) -> pair(add(M, X), Z)
qsort(nil) -> nil
qsort(add(N, X)) -> f3(split(N, X), N, X)
f3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z)))


Strategy:

innermost




The following dependency pair can be strictly oriented:

SPLIT(N, add(M, Y)) -> SPLIT(N, Y)


There are no usable rules for innermost that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
SPLIT(x1, x2) -> SPLIT(x1, x2)
add(x1, x2) -> add(x1, x2)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
           →DP Problem 7
Dependency Graph
       →DP Problem 4
Remaining


Dependency Pair:


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)) -> f1(split(N, Y), N, M, Y)
f1(pair(X, Z), N, M, Y) -> f2(lt(N, M), N, M, Y, X, Z)
f2(true, N, M, Y, X, Z) -> pair(X, add(M, Z))
f2(false, N, M, Y, X, Z) -> pair(add(M, X), Z)
qsort(nil) -> nil
qsort(add(N, X)) -> f3(split(N, X), N, X)
f3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z)))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

F3(pair(Y, Z), N, X) -> QSORT(Z)
F3(pair(Y, Z), N, X) -> QSORT(Y)
QSORT(add(N, X)) -> F3(split(N, X), N, X)


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)) -> f1(split(N, Y), N, M, Y)
f1(pair(X, Z), N, M, Y) -> f2(lt(N, M), N, M, Y, X, Z)
f2(true, N, M, Y, X, Z) -> pair(X, add(M, Z))
f2(false, N, M, Y, X, Z) -> pair(add(M, X), Z)
qsort(nil) -> nil
qsort(add(N, X)) -> f3(split(N, X), N, X)
f3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z)))


Strategy:

innermost



Innermost Termination of R could not be shown.
Duration:
0:00 minutes