(0) Obligation:

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

eq(0, 0) → true
eq(0, s(Y)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
min(cons(0, nil)) → 0
min(cons(s(N), nil)) → s(N)
min(cons(N, cons(M, L))) → ifmin(le(N, M), cons(N, cons(M, L)))
ifmin(true, cons(N, cons(M, L))) → min(cons(N, L))
ifmin(false, cons(N, cons(M, L))) → min(cons(M, L))
replace(N, M, nil) → nil
replace(N, M, cons(K, L)) → ifrepl(eq(N, K), N, M, cons(K, L))
ifrepl(true, N, M, cons(K, L)) → cons(M, L)
ifrepl(false, N, M, cons(K, L)) → cons(K, replace(N, M, L))
selsort(nil) → nil
selsort(cons(N, L)) → ifselsort(eq(N, min(cons(N, L))), cons(N, L))
ifselsort(true, cons(N, L)) → cons(N, selsort(L))
ifselsort(false, cons(N, L)) → cons(min(cons(N, L)), selsort(replace(min(cons(N, L)), N, L)))

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(X), s(Y)) → EQ(X, Y)
LE(s(X), s(Y)) → LE(X, Y)
MIN(cons(N, cons(M, L))) → IFMIN(le(N, M), cons(N, cons(M, L)))
MIN(cons(N, cons(M, L))) → LE(N, M)
IFMIN(true, cons(N, cons(M, L))) → MIN(cons(N, L))
IFMIN(false, cons(N, cons(M, L))) → MIN(cons(M, L))
REPLACE(N, M, cons(K, L)) → IFREPL(eq(N, K), N, M, cons(K, L))
REPLACE(N, M, cons(K, L)) → EQ(N, K)
IFREPL(false, N, M, cons(K, L)) → REPLACE(N, M, L)
SELSORT(cons(N, L)) → IFSELSORT(eq(N, min(cons(N, L))), cons(N, L))
SELSORT(cons(N, L)) → EQ(N, min(cons(N, L)))
SELSORT(cons(N, L)) → MIN(cons(N, L))
IFSELSORT(true, cons(N, L)) → SELSORT(L)
IFSELSORT(false, cons(N, L)) → MIN(cons(N, L))
IFSELSORT(false, cons(N, L)) → SELSORT(replace(min(cons(N, L)), N, L))
IFSELSORT(false, cons(N, L)) → REPLACE(min(cons(N, L)), N, L)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(Y)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
min(cons(0, nil)) → 0
min(cons(s(N), nil)) → s(N)
min(cons(N, cons(M, L))) → ifmin(le(N, M), cons(N, cons(M, L)))
ifmin(true, cons(N, cons(M, L))) → min(cons(N, L))
ifmin(false, cons(N, cons(M, L))) → min(cons(M, L))
replace(N, M, nil) → nil
replace(N, M, cons(K, L)) → ifrepl(eq(N, K), N, M, cons(K, L))
ifrepl(true, N, M, cons(K, L)) → cons(M, L)
ifrepl(false, N, M, cons(K, L)) → cons(K, replace(N, M, L))
selsort(nil) → nil
selsort(cons(N, L)) → ifselsort(eq(N, min(cons(N, L))), cons(N, L))
ifselsort(true, cons(N, L)) → cons(N, selsort(L))
ifselsort(false, cons(N, L)) → cons(min(cons(N, L)), selsort(replace(min(cons(N, L)), N, L)))

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 6 less nodes.

(4) Complex Obligation (AND)

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

eq(0, 0) → true
eq(0, s(Y)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
min(cons(0, nil)) → 0
min(cons(s(N), nil)) → s(N)
min(cons(N, cons(M, L))) → ifmin(le(N, M), cons(N, cons(M, L)))
ifmin(true, cons(N, cons(M, L))) → min(cons(N, L))
ifmin(false, cons(N, cons(M, L))) → min(cons(M, L))
replace(N, M, nil) → nil
replace(N, M, cons(K, L)) → ifrepl(eq(N, K), N, M, cons(K, L))
ifrepl(true, N, M, cons(K, L)) → cons(M, L)
ifrepl(false, N, M, cons(K, L)) → cons(K, replace(N, M, L))
selsort(nil) → nil
selsort(cons(N, L)) → ifselsort(eq(N, min(cons(N, L))), cons(N, L))
ifselsort(true, cons(N, L)) → cons(N, selsort(L))
ifselsort(false, cons(N, L)) → cons(min(cons(N, L)), selsort(replace(min(cons(N, L)), N, L)))

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(X), s(Y)) → LE(X, Y) (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, L))) → IFMIN(le(N, M), cons(N, cons(M, L)))
IFMIN(true, cons(N, cons(M, L))) → MIN(cons(N, L))
IFMIN(false, cons(N, cons(M, L))) → MIN(cons(M, L))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(Y)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
min(cons(0, nil)) → 0
min(cons(s(N), nil)) → s(N)
min(cons(N, cons(M, L))) → ifmin(le(N, M), cons(N, cons(M, L)))
ifmin(true, cons(N, cons(M, L))) → min(cons(N, L))
ifmin(false, cons(N, cons(M, L))) → min(cons(M, L))
replace(N, M, nil) → nil
replace(N, M, cons(K, L)) → ifrepl(eq(N, K), N, M, cons(K, L))
ifrepl(true, N, M, cons(K, L)) → cons(M, L)
ifrepl(false, N, M, cons(K, L)) → cons(K, replace(N, M, L))
selsort(nil) → nil
selsort(cons(N, L)) → ifselsort(eq(N, min(cons(N, L))), cons(N, L))
ifselsort(true, cons(N, L)) → cons(N, selsort(L))
ifselsort(false, cons(N, L)) → cons(min(cons(N, L)), selsort(replace(min(cons(N, L)), N, L)))

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, L))) → IFMIN(le(N, M), cons(N, cons(M, L))) (allowed arguments on rhs = {2})
    The graph contains the following edges 1 >= 2

  • IFMIN(true, cons(N, cons(M, L))) → MIN(cons(N, L)) (allowed arguments on rhs = {1})
    The graph contains the following edges 2 > 1

  • IFMIN(false, cons(N, cons(M, L))) → MIN(cons(M, L)) (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(X), s(Y)) → EQ(X, Y)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(Y)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
min(cons(0, nil)) → 0
min(cons(s(N), nil)) → s(N)
min(cons(N, cons(M, L))) → ifmin(le(N, M), cons(N, cons(M, L)))
ifmin(true, cons(N, cons(M, L))) → min(cons(N, L))
ifmin(false, cons(N, cons(M, L))) → min(cons(M, L))
replace(N, M, nil) → nil
replace(N, M, cons(K, L)) → ifrepl(eq(N, K), N, M, cons(K, L))
ifrepl(true, N, M, cons(K, L)) → cons(M, L)
ifrepl(false, N, M, cons(K, L)) → cons(K, replace(N, M, L))
selsort(nil) → nil
selsort(cons(N, L)) → ifselsort(eq(N, min(cons(N, L))), cons(N, L))
ifselsort(true, cons(N, L)) → cons(N, selsort(L))
ifselsort(false, cons(N, L)) → cons(min(cons(N, L)), selsort(replace(min(cons(N, L)), N, L)))

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(X), s(Y)) → EQ(X, Y) (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, L)) → IFREPL(eq(N, K), N, M, cons(K, L))
IFREPL(false, N, M, cons(K, L)) → REPLACE(N, M, L)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(Y)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
min(cons(0, nil)) → 0
min(cons(s(N), nil)) → s(N)
min(cons(N, cons(M, L))) → ifmin(le(N, M), cons(N, cons(M, L)))
ifmin(true, cons(N, cons(M, L))) → min(cons(N, L))
ifmin(false, cons(N, cons(M, L))) → min(cons(M, L))
replace(N, M, nil) → nil
replace(N, M, cons(K, L)) → ifrepl(eq(N, K), N, M, cons(K, L))
ifrepl(true, N, M, cons(K, L)) → cons(M, L)
ifrepl(false, N, M, cons(K, L)) → cons(K, replace(N, M, L))
selsort(nil) → nil
selsort(cons(N, L)) → ifselsort(eq(N, min(cons(N, L))), cons(N, L))
ifselsort(true, cons(N, L)) → cons(N, selsort(L))
ifselsort(false, cons(N, L)) → cons(min(cons(N, L)), selsort(replace(min(cons(N, L)), N, L)))

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:

  • IFREPL(false, N, M, cons(K, L)) → REPLACE(N, M, L) (allowed arguments on rhs = {1, 2, 3})
    The graph contains the following edges 2 >= 1, 3 >= 2, 4 > 3

  • REPLACE(N, M, cons(K, L)) → IFREPL(eq(N, K), N, M, cons(K, L)) (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:

IFSELSORT(true, cons(N, L)) → SELSORT(L)
SELSORT(cons(N, L)) → IFSELSORT(eq(N, min(cons(N, L))), cons(N, L))
IFSELSORT(false, cons(N, L)) → SELSORT(replace(min(cons(N, L)), N, L))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(Y)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
min(cons(0, nil)) → 0
min(cons(s(N), nil)) → s(N)
min(cons(N, cons(M, L))) → ifmin(le(N, M), cons(N, cons(M, L)))
ifmin(true, cons(N, cons(M, L))) → min(cons(N, L))
ifmin(false, cons(N, cons(M, L))) → min(cons(M, L))
replace(N, M, nil) → nil
replace(N, M, cons(K, L)) → ifrepl(eq(N, K), N, M, cons(K, L))
ifrepl(true, N, M, cons(K, L)) → cons(M, L)
ifrepl(false, N, M, cons(K, L)) → cons(K, replace(N, M, L))
selsort(nil) → nil
selsort(cons(N, L)) → ifselsort(eq(N, min(cons(N, L))), cons(N, L))
ifselsort(true, cons(N, L)) → cons(N, selsort(L))
ifselsort(false, cons(N, L)) → cons(min(cons(N, L)), selsort(replace(min(cons(N, L)), N, L)))

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)
ifrepl(x1, x2, x3, x4)  =  x4
eq(x1, x2)  =  eq(x2)
min(x1)  =  min
ifmin(x1, x2)  =  ifmin(x1, x2)
le(x1, x2)  =  le(x1, x2)
s(x1)  =  s
true  =  true
false  =  false
0  =  0

Homeomorphic Embedding Order

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

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

  • SELSORT(cons(N, L)) → IFSELSORT(eq(N, min(cons(N, L))), cons(N, L)) (allowed arguments on rhs = {2})
    The graph contains the following edges 1 >= 2

  • IFSELSORT(true, cons(N, L)) → SELSORT(L) (allowed arguments on rhs = {1})
    The graph contains the following edges 2 > 1

  • IFSELSORT(false, cons(N, L)) → SELSORT(replace(min(cons(N, L)), N, L)) (allowed arguments on rhs = {1})
    The graph contains the following edges 2 > 1

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


replace(N, M, nil) → nil
replace(N, M, cons(K, L)) → ifrepl(eq(N, K), N, M, cons(K, L))
ifrepl(true, N, M, cons(K, L)) → cons(M, L)
ifrepl(false, N, M, cons(K, L)) → cons(K, replace(N, M, L))

(19) TRUE