(0) Obligation:

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(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
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))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

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

EQ(s(n), s(m)) → EQ(n, m)
LE(s(n), s(m)) → LE(n, m)
MIN(cons(n, cons(m, x))) → IF_MIN(le(n, m), cons(n, cons(m, x)))
MIN(cons(n, cons(m, x))) → LE(n, m)
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, cons(k, x)) → IF_REPLACE(eq(n, k), n, m, cons(k, x))
REPLACE(n, m, cons(k, x)) → EQ(n, k)
IF_REPLACE(false, n, m, cons(k, x)) → REPLACE(n, m, x)
SORT(cons(n, x)) → MIN(cons(n, x))
SORT(cons(n, x)) → SORT(replace(min(cons(n, x)), n, x))
SORT(cons(n, x)) → REPLACE(min(cons(n, x)), n, 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(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
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))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

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

(3) DependencyGraphProof (EQUIVALENT transformation)

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

(4) Complex Obligation (AND)

(5) Obligation:

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(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
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))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

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

(6) QDPSizeChangeProof (EQUIVALENT transformation)

We used the following order and afs together with the size-change analysis [AAECC05] to show that there are no infinite chains for this DP problem.

Order:Homeomorphic Embedding Order

AFS:
s(x1)  =  s(x1)

From the DPs we obtained the following set of size-change graphs:

  • LE(s(n), s(m)) → LE(n, m) (allowed arguments on rhs = {1, 2})
    The graph contains the following edges 1 > 1, 2 > 2

We oriented the following set of usable rules [AAECC05,FROCOS05]. none

(7) TRUE

(8) Obligation:

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

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))

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(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
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))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

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

(9) QDPSizeChangeProof (EQUIVALENT transformation)

We used the following order and afs together with the size-change analysis [AAECC05] to show that there are no infinite chains for this DP problem.

Order:Homeomorphic Embedding Order

AFS:
true  =  true
false  =  false
cons(x1, x2)  =  cons(x2)

From the DPs we obtained the following set of size-change graphs:

  • MIN(cons(n, cons(m, x))) → IF_MIN(le(n, m), cons(n, cons(m, x))) (allowed arguments on rhs = {2})
    The graph contains the following edges 1 >= 2

  • IF_MIN(true, cons(n, cons(m, x))) → MIN(cons(n, x)) (allowed arguments on rhs = {1})
    The graph contains the following edges 2 > 1

  • IF_MIN(false, cons(n, cons(m, x))) → MIN(cons(m, x)) (allowed arguments on rhs = {1})
    The graph contains the following edges 2 > 1

We oriented the following set of usable rules [AAECC05,FROCOS05]. none

(10) TRUE

(11) Obligation:

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(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
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))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

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

(12) QDPSizeChangeProof (EQUIVALENT transformation)

We used the following order and afs together with the size-change analysis [AAECC05] to show that there are no infinite chains for this DP problem.

Order:Homeomorphic Embedding Order

AFS:
s(x1)  =  s(x1)

From the DPs we obtained the following set of size-change graphs:

  • EQ(s(n), s(m)) → EQ(n, m) (allowed arguments on rhs = {1, 2})
    The graph contains the following edges 1 > 1, 2 > 2

We oriented the following set of usable rules [AAECC05,FROCOS05]. none

(13) TRUE

(14) Obligation:

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(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
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))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

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

(15) QDPSizeChangeProof (EQUIVALENT transformation)

We used the following order and afs together with the size-change analysis [AAECC05] to show that there are no infinite chains for this DP problem.

Order:Homeomorphic Embedding Order

AFS:
false  =  false
cons(x1, x2)  =  cons(x2)

From the DPs we obtained the following set of size-change graphs:

  • IF_REPLACE(false, n, m, cons(k, x)) → REPLACE(n, m, x) (allowed arguments on rhs = {1, 2, 3})
    The graph contains the following edges 2 >= 1, 3 >= 2, 4 > 3

  • REPLACE(n, m, cons(k, x)) → IF_REPLACE(eq(n, k), n, m, cons(k, x)) (allowed arguments on rhs = {2, 3, 4})
    The graph contains the following edges 1 >= 2, 2 >= 3, 3 >= 4

We oriented the following set of usable rules [AAECC05,FROCOS05]. none

(16) TRUE

(17) Obligation:

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

SORT(cons(n, x)) → SORT(replace(min(cons(n, x)), n, 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(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
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))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

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

(18) QDPSizeChangeProof (EQUIVALENT transformation)

We used the following order and afs together with the size-change analysis [AAECC05] to show that there are no infinite chains for this DP problem.

Order:Combined order from the following AFS and order.
replace(x1, x2, x3)  =  x3
nil  =  nil
cons(x1, x2)  =  cons(x2)
if_replace(x1, x2, x3, x4)  =  x4
eq(x1, x2)  =  eq(x1)
min(x1)  =  min
if_min(x1, x2)  =  if_min
le(x1, x2)  =  le(x1)
s(x1)  =  s
true  =  true
false  =  false
0  =  0

Recursive path order with status [RPO].
Quasi-Precedence:

cons1 > ifmin
cons1 > le1
cons1 > [s, false] > eq1
min > ifmin

Status:
nil: multiset
cons1: [1]
eq1: multiset
min: []
ifmin: multiset
le1: [1]
s: multiset
true: multiset
false: multiset
0: multiset

AFS:
replace(x1, x2, x3)  =  x3
nil  =  nil
cons(x1, x2)  =  cons(x2)
if_replace(x1, x2, x3, x4)  =  x4
eq(x1, x2)  =  eq(x1)
min(x1)  =  min
if_min(x1, x2)  =  if_min
le(x1, x2)  =  le(x1)
s(x1)  =  s
true  =  true
false  =  false
0  =  0

From the DPs we obtained the following set of size-change graphs:

  • SORT(cons(n, x)) → SORT(replace(min(cons(n, x)), n, x)) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 > 1

We oriented the following set of usable rules [AAECC05,FROCOS05].


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))

(19) TRUE