Termination w.r.t. Q of the following Term Rewriting System could not be shown:

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

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.


QTRS
  ↳ DependencyPairsProof

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

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

SORTITER(x, y) → EMPTY(x)
IF_MIN(false, cons(n, cons(m, x))) → MIN(cons(m, x))
IF(false, x, y, z) → TAIL(x)
IF_MIN(true, cons(n, cons(m, x))) → MIN(cons(n, x))
IF(false, x, y, z) → REPLACE(min(x), head(x), tail(x))
LE(s(n), s(m)) → LE(n, m)
IF_REPLACE(false, n, m, cons(k, x)) → REPLACE(n, m, x)
REPLACE(n, m, cons(k, x)) → IF_REPLACE(eq(n, k), n, m, cons(k, x))
IF(false, x, y, z) → SORTITER(replace(min(x), head(x), tail(x)), z)
EQ(s(n), s(m)) → EQ(n, m)
MIN(cons(n, cons(m, x))) → IF_MIN(le(n, m), cons(n, cons(m, x)))
SORT(x) → SORTITER(x, nil)
SORTITER(x, y) → MIN(x)
IF(false, x, y, z) → HEAD(x)
MIN(cons(n, cons(m, x))) → LE(n, m)
REPLACE(n, m, cons(k, x)) → EQ(n, k)
IF(false, x, y, z) → MIN(x)
SORTITER(x, y) → IF(empty(x), x, y, append(y, cons(min(x), nil)))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

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

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

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

SORTITER(x, y) → EMPTY(x)
IF_MIN(false, cons(n, cons(m, x))) → MIN(cons(m, x))
IF(false, x, y, z) → TAIL(x)
IF_MIN(true, cons(n, cons(m, x))) → MIN(cons(n, x))
IF(false, x, y, z) → REPLACE(min(x), head(x), tail(x))
LE(s(n), s(m)) → LE(n, m)
IF_REPLACE(false, n, m, cons(k, x)) → REPLACE(n, m, x)
REPLACE(n, m, cons(k, x)) → IF_REPLACE(eq(n, k), n, m, cons(k, x))
IF(false, x, y, z) → SORTITER(replace(min(x), head(x), tail(x)), z)
EQ(s(n), s(m)) → EQ(n, m)
MIN(cons(n, cons(m, x))) → IF_MIN(le(n, m), cons(n, cons(m, x)))
SORT(x) → SORTITER(x, nil)
SORTITER(x, y) → MIN(x)
IF(false, x, y, z) → HEAD(x)
MIN(cons(n, cons(m, x))) → LE(n, m)
REPLACE(n, m, cons(k, x)) → EQ(n, k)
IF(false, x, y, z) → MIN(x)
SORTITER(x, y) → IF(empty(x), x, y, append(y, cons(min(x), nil)))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 5 SCCs with 9 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

LE(s(n), s(m)) → LE(n, m)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


LE(s(n), s(m)) → LE(n, m)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(s(x1)) = 4 + (2)x_1   
POL(LE(x1, x2)) = (3)x_2   
The value of delta used in the strict ordering is 12.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

IF_MIN(false, cons(n, cons(m, x))) → MIN(cons(m, x))
IF_MIN(true, cons(n, cons(m, x))) → MIN(cons(n, x))
MIN(cons(n, cons(m, x))) → IF_MIN(le(n, m), cons(n, cons(m, x)))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


IF_MIN(false, cons(n, cons(m, x))) → MIN(cons(m, x))
IF_MIN(true, cons(n, cons(m, x))) → MIN(cons(n, x))
MIN(cons(n, cons(m, x))) → IF_MIN(le(n, m), cons(n, cons(m, x)))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(cons(x1, x2)) = 2 + x_2   
POL(IF_MIN(x1, x2)) = (4)x_2   
POL(le(x1, x2)) = 0   
POL(MIN(x1)) = 3 + (4)x_1   
POL(true) = 0   
POL(false) = 0   
POL(s(x1)) = 3 + (2)x_1   
POL(0) = 0   
The value of delta used in the strict ordering is 3.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP

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

EQ(s(n), s(m)) → EQ(n, m)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


EQ(s(n), s(m)) → EQ(n, m)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(EQ(x1, x2)) = (3)x_2   
POL(s(x1)) = 4 + (2)x_1   
The value of delta used in the strict ordering is 12.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP

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

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP

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

REPLACE(n, m, cons(k, x)) → IF_REPLACE(eq(n, k), n, m, cons(k, x))
IF_REPLACE(false, n, m, cons(k, x)) → REPLACE(n, m, x)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


REPLACE(n, m, cons(k, x)) → IF_REPLACE(eq(n, k), n, m, cons(k, x))
The remaining pairs can at least be oriented weakly.

IF_REPLACE(false, n, m, cons(k, x)) → REPLACE(n, m, x)
Used ordering: Polynomial interpretation [25,35]:

POL(cons(x1, x2)) = (4)x_1 + (2)x_2   
POL(eq(x1, x2)) = 1 + (4)x_2   
POL(REPLACE(x1, x2, x3)) = 2 + (4)x_3   
POL(true) = 3   
POL(false) = 2   
POL(s(x1)) = 4 + x_1   
POL(IF_REPLACE(x1, x2, x3, x4)) = x_1 + (2)x_4   
POL(0) = 4   
The value of delta used in the strict ordering is 1.
The following usable rules [17] were oriented:

eq(0, 0) → true
eq(s(n), 0) → false
eq(0, s(m)) → false
eq(s(n), s(m)) → eq(n, m)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ DependencyGraphProof
          ↳ QDP

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

IF_REPLACE(false, n, m, cons(k, x)) → REPLACE(n, m, x)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP

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

IF(false, x, y, z) → SORTITER(replace(min(x), head(x), tail(x)), z)
SORTITER(x, y) → IF(empty(x), x, y, append(y, cons(min(x), nil)))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(x, nil)) → x
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
empty(nil) → true
empty(cons(n, x)) → false
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
sort(x) → sortIter(x, nil)
sortIter(x, y) → if(empty(x), x, y, append(y, cons(min(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → sortIter(replace(min(x), head(x), tail(x)), z)

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