Term Rewriting System R:
[Y, X, N, M, L, K]
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)))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

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)

Furthermore, R contains five SCCs.


   R
DPs
       →DP Problem 1
Forward Instantiation Transformation
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:

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


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

EQ(s(X), s(Y)) -> EQ(X, Y)
one new Dependency Pair is created:

EQ(s(s(X'')), s(s(Y''))) -> EQ(s(X''), s(Y''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 6
Forward Instantiation Transformation
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:

EQ(s(s(X'')), s(s(Y''))) -> EQ(s(X''), s(Y''))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

EQ(s(s(X'')), s(s(Y''))) -> EQ(s(X''), s(Y''))
one new Dependency Pair is created:

EQ(s(s(s(X''''))), s(s(s(Y'''')))) -> EQ(s(s(X'''')), s(s(Y'''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 6
FwdInst
             ...
               →DP Problem 7
Polynomial Ordering
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:

EQ(s(s(s(X''''))), s(s(s(Y'''')))) -> EQ(s(s(X'''')), s(s(Y'''')))


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

EQ(s(s(s(X''''))), s(s(s(Y'''')))) -> EQ(s(s(X'''')), s(s(Y'''')))


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(EQ(x1, x2))=  1 + x1  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 6
FwdInst
             ...
               →DP Problem 8
Dependency Graph
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Forward Instantiation Transformation
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:

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


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

LE(s(X), s(Y)) -> LE(X, Y)
one new Dependency Pair is created:

LE(s(s(X'')), s(s(Y''))) -> LE(s(X''), s(Y''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 9
Forward Instantiation Transformation
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:

LE(s(s(X'')), s(s(Y''))) -> LE(s(X''), s(Y''))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

LE(s(s(X'')), s(s(Y''))) -> LE(s(X''), s(Y''))
one new Dependency Pair is created:

LE(s(s(s(X''''))), s(s(s(Y'''')))) -> LE(s(s(X'''')), s(s(Y'''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 9
FwdInst
             ...
               →DP Problem 10
Polynomial Ordering
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:

LE(s(s(s(X''''))), s(s(s(Y'''')))) -> LE(s(s(X'''')), s(s(Y'''')))


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

LE(s(s(s(X''''))), s(s(s(Y'''')))) -> LE(s(s(X'''')), s(s(Y'''')))


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(LE(x1, x2))=  1 + x1  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 9
FwdInst
             ...
               →DP Problem 11
Dependency Graph
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Narrowing Transformation
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

IFREPL(false, N, M, cons(K, L)) -> REPLACE(N, M, L)
REPLACE(N, M, cons(K, L)) -> IFREPL(eq(N, K), N, M, cons(K, L))


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


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

REPLACE(N, M, cons(K, L)) -> IFREPL(eq(N, K), N, M, cons(K, L))
four new Dependency Pairs are created:

REPLACE(0, M, cons(0, L)) -> IFREPL(true, 0, M, cons(0, L))
REPLACE(0, M, cons(s(Y'), L)) -> IFREPL(false, 0, M, cons(s(Y'), L))
REPLACE(s(X'), M, cons(0, L)) -> IFREPL(false, s(X'), M, cons(0, L))
REPLACE(s(X'), M, cons(s(Y'), L)) -> IFREPL(eq(X', Y'), s(X'), M, cons(s(Y'), L))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Narrowing Transformation
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

REPLACE(s(X'), M, cons(s(Y'), L)) -> IFREPL(eq(X', Y'), s(X'), M, cons(s(Y'), L))
REPLACE(s(X'), M, cons(0, L)) -> IFREPL(false, s(X'), M, cons(0, L))
REPLACE(0, M, cons(s(Y'), L)) -> IFREPL(false, 0, M, cons(s(Y'), L))
IFREPL(false, N, M, cons(K, L)) -> REPLACE(N, M, L)


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


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

REPLACE(s(X'), M, cons(s(Y'), L)) -> IFREPL(eq(X', Y'), s(X'), M, cons(s(Y'), L))
four new Dependency Pairs are created:

REPLACE(s(0), M, cons(s(0), L)) -> IFREPL(true, s(0), M, cons(s(0), L))
REPLACE(s(0), M, cons(s(s(Y'')), L)) -> IFREPL(false, s(0), M, cons(s(s(Y'')), L))
REPLACE(s(s(X'')), M, cons(s(0), L)) -> IFREPL(false, s(s(X'')), M, cons(s(0), L))
REPLACE(s(s(X'')), M, cons(s(s(Y'')), L)) -> IFREPL(eq(X'', Y''), s(s(X'')), M, cons(s(s(Y'')), L))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 13
Instantiation Transformation
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

REPLACE(s(s(X'')), M, cons(s(s(Y'')), L)) -> IFREPL(eq(X'', Y''), s(s(X'')), M, cons(s(s(Y'')), L))
REPLACE(s(s(X'')), M, cons(s(0), L)) -> IFREPL(false, s(s(X'')), M, cons(s(0), L))
REPLACE(s(0), M, cons(s(s(Y'')), L)) -> IFREPL(false, s(0), M, cons(s(s(Y'')), L))
REPLACE(0, M, cons(s(Y'), L)) -> IFREPL(false, 0, M, cons(s(Y'), L))
IFREPL(false, N, M, cons(K, L)) -> REPLACE(N, M, L)
REPLACE(s(X'), M, cons(0, L)) -> IFREPL(false, s(X'), M, cons(0, L))


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


Strategy:

innermost




On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFREPL(false, N, M, cons(K, L)) -> REPLACE(N, M, L)
five new Dependency Pairs are created:

IFREPL(false, 0, M'', cons(s(Y'''), L'')) -> REPLACE(0, M'', L'')
IFREPL(false, s(X'''), M'', cons(0, L'')) -> REPLACE(s(X'''), M'', L'')
IFREPL(false, s(0), M'', cons(s(s(Y'''')), L'')) -> REPLACE(s(0), M'', L'')
IFREPL(false, s(s(X'''')), M'', cons(s(0), L'')) -> REPLACE(s(s(X'''')), M'', L'')
IFREPL(false, s(s(X'''')), M'', cons(s(s(Y'''')), L'')) -> REPLACE(s(s(X'''')), M'', L'')

The transformation is resulting in two new DP problems:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 14
Forward Instantiation Transformation
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

IFREPL(false, s(s(X'''')), M'', cons(s(0), L'')) -> REPLACE(s(s(X'''')), M'', L'')
REPLACE(s(s(X'')), M, cons(s(0), L)) -> IFREPL(false, s(s(X'')), M, cons(s(0), L))
IFREPL(false, s(0), M'', cons(s(s(Y'''')), L'')) -> REPLACE(s(0), M'', L'')
REPLACE(s(0), M, cons(s(s(Y'')), L)) -> IFREPL(false, s(0), M, cons(s(s(Y'')), L))
IFREPL(false, s(X'''), M'', cons(0, L'')) -> REPLACE(s(X'''), M'', L'')
REPLACE(s(X'), M, cons(0, L)) -> IFREPL(false, s(X'), M, cons(0, L))
IFREPL(false, s(s(X'''')), M'', cons(s(s(Y'''')), L'')) -> REPLACE(s(s(X'''')), M'', L'')
REPLACE(s(s(X'')), M, cons(s(s(Y'')), L)) -> IFREPL(eq(X'', Y''), s(s(X'')), M, cons(s(s(Y'')), L))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFREPL(false, s(X'''), M'', cons(0, L'')) -> REPLACE(s(X'''), M'', L'')
four new Dependency Pairs are created:

IFREPL(false, s(X''''), M''', cons(0, cons(0, L'''))) -> REPLACE(s(X''''), M''', cons(0, L'''))
IFREPL(false, s(0), M''', cons(0, cons(s(s(Y'''')), L'''))) -> REPLACE(s(0), M''', cons(s(s(Y'''')), L'''))
IFREPL(false, s(s(X''''')), M''', cons(0, cons(s(0), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(0), L'''))
IFREPL(false, s(s(X''''')), M''', cons(0, cons(s(s(Y'''')), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(s(Y'''')), L'''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 16
Forward Instantiation Transformation
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

IFREPL(false, s(s(X'''')), M'', cons(s(s(Y'''')), L'')) -> REPLACE(s(s(X'''')), M'', L'')
REPLACE(s(s(X'')), M, cons(s(s(Y'')), L)) -> IFREPL(eq(X'', Y''), s(s(X'')), M, cons(s(s(Y'')), L))
IFREPL(false, s(s(X''''')), M''', cons(0, cons(s(s(Y'''')), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(s(Y'''')), L'''))
REPLACE(s(s(X'')), M, cons(s(0), L)) -> IFREPL(false, s(s(X'')), M, cons(s(0), L))
IFREPL(false, s(s(X''''')), M''', cons(0, cons(s(0), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(0), L'''))
IFREPL(false, s(0), M'', cons(s(s(Y'''')), L'')) -> REPLACE(s(0), M'', L'')
REPLACE(s(0), M, cons(s(s(Y'')), L)) -> IFREPL(false, s(0), M, cons(s(s(Y'')), L))
IFREPL(false, s(0), M''', cons(0, cons(s(s(Y'''')), L'''))) -> REPLACE(s(0), M''', cons(s(s(Y'''')), L'''))
IFREPL(false, s(X''''), M''', cons(0, cons(0, L'''))) -> REPLACE(s(X''''), M''', cons(0, L'''))
REPLACE(s(X'), M, cons(0, L)) -> IFREPL(false, s(X'), M, cons(0, L))
IFREPL(false, s(s(X'''')), M'', cons(s(0), L'')) -> REPLACE(s(s(X'''')), M'', L'')


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

REPLACE(s(X'), M, cons(0, L)) -> IFREPL(false, s(X'), M, cons(0, L))
four new Dependency Pairs are created:

REPLACE(s(X''), M', cons(0, cons(0, L'''''))) -> IFREPL(false, s(X''), M', cons(0, cons(0, L''''')))
REPLACE(s(0), M', cons(0, cons(s(s(Y'''''')), L'''''))) -> IFREPL(false, s(0), M', cons(0, cons(s(s(Y'''''')), L''''')))
REPLACE(s(s(X''''''')), M', cons(0, cons(s(0), L'''''))) -> IFREPL(false, s(s(X''''''')), M', cons(0, cons(s(0), L''''')))
REPLACE(s(s(X''''''')), M', cons(0, cons(s(s(Y'''''')), L'''''))) -> IFREPL(false, s(s(X''''''')), M', cons(0, cons(s(s(Y'''''')), L''''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 18
Forward Instantiation Transformation
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

IFREPL(false, s(s(X''''')), M''', cons(0, cons(s(s(Y'''')), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(s(Y'''')), L'''))
REPLACE(s(s(X''''''')), M', cons(0, cons(s(s(Y'''''')), L'''''))) -> IFREPL(false, s(s(X''''''')), M', cons(0, cons(s(s(Y'''''')), L''''')))
IFREPL(false, s(s(X''''')), M''', cons(0, cons(s(0), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(0), L'''))
REPLACE(s(s(X''''''')), M', cons(0, cons(s(0), L'''''))) -> IFREPL(false, s(s(X''''''')), M', cons(0, cons(s(0), L''''')))
IFREPL(false, s(0), M'', cons(s(s(Y'''')), L'')) -> REPLACE(s(0), M'', L'')
REPLACE(s(0), M, cons(s(s(Y'')), L)) -> IFREPL(false, s(0), M, cons(s(s(Y'')), L))
IFREPL(false, s(0), M''', cons(0, cons(s(s(Y'''')), L'''))) -> REPLACE(s(0), M''', cons(s(s(Y'''')), L'''))
REPLACE(s(0), M', cons(0, cons(s(s(Y'''''')), L'''''))) -> IFREPL(false, s(0), M', cons(0, cons(s(s(Y'''''')), L''''')))
IFREPL(false, s(X''''), M''', cons(0, cons(0, L'''))) -> REPLACE(s(X''''), M''', cons(0, L'''))
REPLACE(s(X''), M', cons(0, cons(0, L'''''))) -> IFREPL(false, s(X''), M', cons(0, cons(0, L''''')))
REPLACE(s(s(X'')), M, cons(s(s(Y'')), L)) -> IFREPL(eq(X'', Y''), s(s(X'')), M, cons(s(s(Y'')), L))
IFREPL(false, s(s(X'''')), M'', cons(s(0), L'')) -> REPLACE(s(s(X'''')), M'', L'')
REPLACE(s(s(X'')), M, cons(s(0), L)) -> IFREPL(false, s(s(X'')), M, cons(s(0), L))
IFREPL(false, s(s(X'''')), M'', cons(s(s(Y'''')), L'')) -> REPLACE(s(s(X'''')), M'', L'')


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFREPL(false, s(0), M'', cons(s(s(Y'''')), L'')) -> REPLACE(s(0), M'', L'')
three new Dependency Pairs are created:

IFREPL(false, s(0), M''', cons(s(s(Y'''')), cons(s(s(Y'''')), L'''))) -> REPLACE(s(0), M''', cons(s(s(Y'''')), L'''))
IFREPL(false, s(0), M'''', cons(s(s(Y'''')), cons(0, cons(0, L''''''')))) -> REPLACE(s(0), M'''', cons(0, cons(0, L''''''')))
IFREPL(false, s(0), M'''', cons(s(s(Y'''')), cons(0, cons(s(s(Y'''''''')), L''''''')))) -> REPLACE(s(0), M'''', cons(0, cons(s(s(Y'''''''')), L''''''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 20
Forward Instantiation Transformation
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

REPLACE(s(s(X''''''')), M', cons(0, cons(s(s(Y'''''')), L'''''))) -> IFREPL(false, s(s(X''''''')), M', cons(0, cons(s(s(Y'''''')), L''''')))
IFREPL(false, s(s(X''''')), M''', cons(0, cons(s(0), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(0), L'''))
REPLACE(s(s(X''''''')), M', cons(0, cons(s(0), L'''''))) -> IFREPL(false, s(s(X''''''')), M', cons(0, cons(s(0), L''''')))
IFREPL(false, s(0), M'''', cons(s(s(Y'''')), cons(0, cons(s(s(Y'''''''')), L''''''')))) -> REPLACE(s(0), M'''', cons(0, cons(s(s(Y'''''''')), L''''''')))
IFREPL(false, s(0), M'''', cons(s(s(Y'''')), cons(0, cons(0, L''''''')))) -> REPLACE(s(0), M'''', cons(0, cons(0, L''''''')))
IFREPL(false, s(0), M''', cons(s(s(Y'''')), cons(s(s(Y'''')), L'''))) -> REPLACE(s(0), M''', cons(s(s(Y'''')), L'''))
REPLACE(s(0), M, cons(s(s(Y'')), L)) -> IFREPL(false, s(0), M, cons(s(s(Y'')), L))
IFREPL(false, s(0), M''', cons(0, cons(s(s(Y'''')), L'''))) -> REPLACE(s(0), M''', cons(s(s(Y'''')), L'''))
REPLACE(s(0), M', cons(0, cons(s(s(Y'''''')), L'''''))) -> IFREPL(false, s(0), M', cons(0, cons(s(s(Y'''''')), L''''')))
IFREPL(false, s(X''''), M''', cons(0, cons(0, L'''))) -> REPLACE(s(X''''), M''', cons(0, L'''))
REPLACE(s(X''), M', cons(0, cons(0, L'''''))) -> IFREPL(false, s(X''), M', cons(0, cons(0, L''''')))
IFREPL(false, s(s(X'''')), M'', cons(s(0), L'')) -> REPLACE(s(s(X'''')), M'', L'')
REPLACE(s(s(X'')), M, cons(s(0), L)) -> IFREPL(false, s(s(X'')), M, cons(s(0), L))
IFREPL(false, s(s(X'''')), M'', cons(s(s(Y'''')), L'')) -> REPLACE(s(s(X'''')), M'', L'')
REPLACE(s(s(X'')), M, cons(s(s(Y'')), L)) -> IFREPL(eq(X'', Y''), s(s(X'')), M, cons(s(s(Y'')), L))
IFREPL(false, s(s(X''''')), M''', cons(0, cons(s(s(Y'''')), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(s(Y'''')), L'''))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFREPL(false, s(s(X'''')), M'', cons(s(0), L'')) -> REPLACE(s(s(X'''')), M'', L'')
five new Dependency Pairs are created:

IFREPL(false, s(s(X''''')), M''', cons(s(0), cons(s(0), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(0), L'''))
IFREPL(false, s(s(X''''')), M''', cons(s(0), cons(s(s(Y'''')), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(s(Y'''')), L'''))
IFREPL(false, s(s(X''''')), M'''', cons(s(0), cons(0, cons(0, L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(0, L''''''')))
IFREPL(false, s(s(X''''')), M'''', cons(s(0), cons(0, cons(s(0), L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(s(0), L''''''')))
IFREPL(false, s(s(X''''')), M'''', cons(s(0), cons(0, cons(s(s(Y'''''''')), L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(s(s(Y'''''''')), L''''''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 21
Forward Instantiation Transformation
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

IFREPL(false, s(s(X''''')), M'''', cons(s(0), cons(0, cons(s(s(Y'''''''')), L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(s(s(Y'''''''')), L''''''')))
IFREPL(false, s(s(X''''')), M'''', cons(s(0), cons(0, cons(s(0), L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(s(0), L''''''')))
IFREPL(false, s(s(X''''')), M''', cons(0, cons(s(0), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(0), L'''))
REPLACE(s(s(X''''''')), M', cons(0, cons(s(0), L'''''))) -> IFREPL(false, s(s(X''''''')), M', cons(0, cons(s(0), L''''')))
IFREPL(false, s(0), M'''', cons(s(s(Y'''')), cons(0, cons(s(s(Y'''''''')), L''''''')))) -> REPLACE(s(0), M'''', cons(0, cons(s(s(Y'''''''')), L''''''')))
IFREPL(false, s(0), M'''', cons(s(s(Y'''')), cons(0, cons(0, L''''''')))) -> REPLACE(s(0), M'''', cons(0, cons(0, L''''''')))
IFREPL(false, s(0), M''', cons(s(s(Y'''')), cons(s(s(Y'''')), L'''))) -> REPLACE(s(0), M''', cons(s(s(Y'''')), L'''))
REPLACE(s(0), M, cons(s(s(Y'')), L)) -> IFREPL(false, s(0), M, cons(s(s(Y'')), L))
IFREPL(false, s(0), M''', cons(0, cons(s(s(Y'''')), L'''))) -> REPLACE(s(0), M''', cons(s(s(Y'''')), L'''))
REPLACE(s(0), M', cons(0, cons(s(s(Y'''''')), L'''''))) -> IFREPL(false, s(0), M', cons(0, cons(s(s(Y'''''')), L''''')))
IFREPL(false, s(X''''), M''', cons(0, cons(0, L'''))) -> REPLACE(s(X''''), M''', cons(0, L'''))
REPLACE(s(X''), M', cons(0, cons(0, L'''''))) -> IFREPL(false, s(X''), M', cons(0, cons(0, L''''')))
IFREPL(false, s(s(X''''')), M'''', cons(s(0), cons(0, cons(0, L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(0, L''''''')))
IFREPL(false, s(s(X''''')), M''', cons(s(0), cons(s(s(Y'''')), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(s(Y'''')), L'''))
IFREPL(false, s(s(X''''')), M''', cons(s(0), cons(s(0), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(0), L'''))
REPLACE(s(s(X'')), M, cons(s(0), L)) -> IFREPL(false, s(s(X'')), M, cons(s(0), L))
IFREPL(false, s(s(X'''')), M'', cons(s(s(Y'''')), L'')) -> REPLACE(s(s(X'''')), M'', L'')
REPLACE(s(s(X'')), M, cons(s(s(Y'')), L)) -> IFREPL(eq(X'', Y''), s(s(X'')), M, cons(s(s(Y'')), L))
IFREPL(false, s(s(X''''')), M''', cons(0, cons(s(s(Y'''')), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(s(Y'''')), L'''))
REPLACE(s(s(X''''''')), M', cons(0, cons(s(s(Y'''''')), L'''''))) -> IFREPL(false, s(s(X''''''')), M', cons(0, cons(s(s(Y'''''')), L''''')))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFREPL(false, s(s(X'''')), M'', cons(s(s(Y'''')), L'')) -> REPLACE(s(s(X'''')), M'', L'')
five new Dependency Pairs are created:

IFREPL(false, s(s(X''''')), M''', cons(s(s(Y'''')), cons(s(0), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(0), L'''))
IFREPL(false, s(s(X''''')), M''', cons(s(s(Y'''')), cons(s(s(Y'''')), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(s(Y'''')), L'''))
IFREPL(false, s(s(X''''')), M'''', cons(s(s(Y'''')), cons(0, cons(0, L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(0, L''''''')))
IFREPL(false, s(s(X''''')), M'''', cons(s(s(Y'''')), cons(0, cons(s(0), L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(s(0), L''''''')))
IFREPL(false, s(s(X''''')), M'''', cons(s(s(Y'''')), cons(0, cons(s(s(Y'''''''')), L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(s(s(Y'''''''')), L''''''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 22
Polynomial Ordering
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

IFREPL(false, s(s(X''''')), M'''', cons(s(s(Y'''')), cons(0, cons(s(s(Y'''''''')), L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(s(s(Y'''''''')), L''''''')))
IFREPL(false, s(s(X''''')), M'''', cons(s(s(Y'''')), cons(0, cons(s(0), L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(s(0), L''''''')))
IFREPL(false, s(s(X''''')), M'''', cons(s(s(Y'''')), cons(0, cons(0, L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(0, L''''''')))
IFREPL(false, s(s(X''''')), M''', cons(s(s(Y'''')), cons(s(s(Y'''')), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(s(Y'''')), L'''))
IFREPL(false, s(s(X''''')), M'''', cons(s(0), cons(0, cons(s(0), L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(s(0), L''''''')))
IFREPL(false, s(s(X''''')), M''', cons(0, cons(s(0), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(0), L'''))
REPLACE(s(s(X''''''')), M', cons(0, cons(s(0), L'''''))) -> IFREPL(false, s(s(X''''''')), M', cons(0, cons(s(0), L''''')))
IFREPL(false, s(0), M'''', cons(s(s(Y'''')), cons(0, cons(s(s(Y'''''''')), L''''''')))) -> REPLACE(s(0), M'''', cons(0, cons(s(s(Y'''''''')), L''''''')))
IFREPL(false, s(0), M'''', cons(s(s(Y'''')), cons(0, cons(0, L''''''')))) -> REPLACE(s(0), M'''', cons(0, cons(0, L''''''')))
IFREPL(false, s(0), M''', cons(s(s(Y'''')), cons(s(s(Y'''')), L'''))) -> REPLACE(s(0), M''', cons(s(s(Y'''')), L'''))
REPLACE(s(0), M, cons(s(s(Y'')), L)) -> IFREPL(false, s(0), M, cons(s(s(Y'')), L))
IFREPL(false, s(0), M''', cons(0, cons(s(s(Y'''')), L'''))) -> REPLACE(s(0), M''', cons(s(s(Y'''')), L'''))
REPLACE(s(0), M', cons(0, cons(s(s(Y'''''')), L'''''))) -> IFREPL(false, s(0), M', cons(0, cons(s(s(Y'''''')), L''''')))
IFREPL(false, s(X''''), M''', cons(0, cons(0, L'''))) -> REPLACE(s(X''''), M''', cons(0, L'''))
REPLACE(s(X''), M', cons(0, cons(0, L'''''))) -> IFREPL(false, s(X''), M', cons(0, cons(0, L''''')))
IFREPL(false, s(s(X''''')), M'''', cons(s(0), cons(0, cons(0, L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(0, L''''''')))
IFREPL(false, s(s(X''''')), M''', cons(s(0), cons(s(s(Y'''')), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(s(Y'''')), L'''))
IFREPL(false, s(s(X''''')), M''', cons(s(0), cons(s(0), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(0), L'''))
REPLACE(s(s(X'')), M, cons(s(0), L)) -> IFREPL(false, s(s(X'')), M, cons(s(0), L))
IFREPL(false, s(s(X''''')), M''', cons(s(s(Y'''')), cons(s(0), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(0), L'''))
REPLACE(s(s(X'')), M, cons(s(s(Y'')), L)) -> IFREPL(eq(X'', Y''), s(s(X'')), M, cons(s(s(Y'')), L))
IFREPL(false, s(s(X''''')), M''', cons(0, cons(s(s(Y'''')), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(s(Y'''')), L'''))
REPLACE(s(s(X''''''')), M', cons(0, cons(s(s(Y'''''')), L'''''))) -> IFREPL(false, s(s(X''''''')), M', cons(0, cons(s(s(Y'''''')), L''''')))
IFREPL(false, s(s(X''''')), M'''', cons(s(0), cons(0, cons(s(s(Y'''''''')), L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(s(s(Y'''''''')), L''''''')))


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


Strategy:

innermost




The following dependency pairs can be strictly oriented:

IFREPL(false, s(s(X''''')), M'''', cons(s(s(Y'''')), cons(0, cons(s(s(Y'''''''')), L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(s(s(Y'''''''')), L''''''')))
IFREPL(false, s(s(X''''')), M'''', cons(s(s(Y'''')), cons(0, cons(s(0), L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(s(0), L''''''')))
IFREPL(false, s(s(X''''')), M'''', cons(s(s(Y'''')), cons(0, cons(0, L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(0, L''''''')))
IFREPL(false, s(s(X''''')), M''', cons(s(s(Y'''')), cons(s(s(Y'''')), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(s(Y'''')), L'''))
IFREPL(false, s(s(X''''')), M'''', cons(s(0), cons(0, cons(s(0), L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(s(0), L''''''')))
IFREPL(false, s(0), M'''', cons(s(s(Y'''')), cons(0, cons(s(s(Y'''''''')), L''''''')))) -> REPLACE(s(0), M'''', cons(0, cons(s(s(Y'''''''')), L''''''')))
IFREPL(false, s(0), M'''', cons(s(s(Y'''')), cons(0, cons(0, L''''''')))) -> REPLACE(s(0), M'''', cons(0, cons(0, L''''''')))
IFREPL(false, s(0), M''', cons(s(s(Y'''')), cons(s(s(Y'''')), L'''))) -> REPLACE(s(0), M''', cons(s(s(Y'''')), L'''))
IFREPL(false, s(s(X''''')), M'''', cons(s(0), cons(0, cons(0, L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(0, L''''''')))
IFREPL(false, s(s(X''''')), M''', cons(s(0), cons(s(s(Y'''')), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(s(Y'''')), L'''))
IFREPL(false, s(s(X''''')), M''', cons(s(0), cons(s(0), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(0), L'''))
IFREPL(false, s(s(X''''')), M''', cons(s(s(Y'''')), cons(s(0), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(0), L'''))
IFREPL(false, s(s(X''''')), M'''', cons(s(0), cons(0, cons(s(s(Y'''''''')), L''''''')))) -> REPLACE(s(s(X''''')), M'''', cons(0, cons(s(s(Y'''''''')), L''''''')))


Additionally, the following usable rules for innermost can be oriented:

eq(0, 0) -> true
eq(0, s(Y)) -> false
eq(s(X), 0) -> false
eq(s(X), s(Y)) -> eq(X, Y)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(REPLACE(x1, x2, x3))=  x3  
  POL(eq(x1, x2))=  0  
  POL(0)=  0  
  POL(false)=  0  
  POL(cons(x1, x2))=  x1 + x2  
  POL(true)=  0  
  POL(s(x1))=  1  
  POL(IFREPL(x1, x2, x3, x4))=  x4  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 24
Dependency Graph
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

IFREPL(false, s(s(X''''')), M''', cons(0, cons(s(0), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(0), L'''))
REPLACE(s(s(X''''''')), M', cons(0, cons(s(0), L'''''))) -> IFREPL(false, s(s(X''''''')), M', cons(0, cons(s(0), L''''')))
REPLACE(s(0), M, cons(s(s(Y'')), L)) -> IFREPL(false, s(0), M, cons(s(s(Y'')), L))
IFREPL(false, s(0), M''', cons(0, cons(s(s(Y'''')), L'''))) -> REPLACE(s(0), M''', cons(s(s(Y'''')), L'''))
REPLACE(s(0), M', cons(0, cons(s(s(Y'''''')), L'''''))) -> IFREPL(false, s(0), M', cons(0, cons(s(s(Y'''''')), L''''')))
IFREPL(false, s(X''''), M''', cons(0, cons(0, L'''))) -> REPLACE(s(X''''), M''', cons(0, L'''))
REPLACE(s(X''), M', cons(0, cons(0, L'''''))) -> IFREPL(false, s(X''), M', cons(0, cons(0, L''''')))
REPLACE(s(s(X'')), M, cons(s(0), L)) -> IFREPL(false, s(s(X'')), M, cons(s(0), L))
REPLACE(s(s(X'')), M, cons(s(s(Y'')), L)) -> IFREPL(eq(X'', Y''), s(s(X'')), M, cons(s(s(Y'')), L))
IFREPL(false, s(s(X''''')), M''', cons(0, cons(s(s(Y'''')), L'''))) -> REPLACE(s(s(X''''')), M''', cons(s(s(Y'''')), L'''))
REPLACE(s(s(X''''''')), M', cons(0, cons(s(s(Y'''''')), L'''''))) -> IFREPL(false, s(s(X''''''')), M', cons(0, cons(s(s(Y'''''')), L''''')))


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


Strategy:

innermost




Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 25
Polynomial Ordering
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

REPLACE(s(X''), M', cons(0, cons(0, L'''''))) -> IFREPL(false, s(X''), M', cons(0, cons(0, L''''')))
IFREPL(false, s(X''''), M''', cons(0, cons(0, L'''))) -> REPLACE(s(X''''), M''', cons(0, L'''))


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

REPLACE(s(X''), M', cons(0, cons(0, L'''''))) -> IFREPL(false, s(X''), M', cons(0, cons(0, L''''')))


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(REPLACE(x1, x2, x3))=  1 + x3  
  POL(0)=  0  
  POL(cons(x1, x2))=  1 + x2  
  POL(false)=  0  
  POL(s(x1))=  0  
  POL(IFREPL(x1, x2, x3, x4))=  x4  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 26
Dependency Graph
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:

IFREPL(false, s(X''''), M''', cons(0, cons(0, L'''))) -> REPLACE(s(X''''), M''', cons(0, L'''))


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 15
Forward Instantiation Transformation
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

IFREPL(false, 0, M'', cons(s(Y'''), L'')) -> REPLACE(0, M'', L'')
REPLACE(0, M, cons(s(Y'), L)) -> IFREPL(false, 0, M, cons(s(Y'), L))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFREPL(false, 0, M'', cons(s(Y'''), L'')) -> REPLACE(0, M'', L'')
one new Dependency Pair is created:

IFREPL(false, 0, M''', cons(s(Y'''), cons(s(Y'''), L'''))) -> REPLACE(0, M''', cons(s(Y'''), L'''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 17
Forward Instantiation Transformation
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

IFREPL(false, 0, M''', cons(s(Y'''), cons(s(Y'''), L'''))) -> REPLACE(0, M''', cons(s(Y'''), L'''))
REPLACE(0, M, cons(s(Y'), L)) -> IFREPL(false, 0, M, cons(s(Y'), L))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

REPLACE(0, M, cons(s(Y'), L)) -> IFREPL(false, 0, M, cons(s(Y'), L))
one new Dependency Pair is created:

REPLACE(0, M', cons(s(Y''), cons(s(Y''''''), L'''''))) -> IFREPL(false, 0, M', cons(s(Y''), cons(s(Y''''''), L''''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 19
Polynomial Ordering
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pairs:

REPLACE(0, M', cons(s(Y''), cons(s(Y''''''), L'''''))) -> IFREPL(false, 0, M', cons(s(Y''), cons(s(Y''''''), L''''')))
IFREPL(false, 0, M''', cons(s(Y'''), cons(s(Y'''), L'''))) -> REPLACE(0, M''', cons(s(Y'''), L'''))


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

REPLACE(0, M', cons(s(Y''), cons(s(Y''''''), L'''''))) -> IFREPL(false, 0, M', cons(s(Y''), cons(s(Y''''''), L''''')))


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(REPLACE(x1, x2, x3))=  1 + x3  
  POL(0)=  0  
  POL(cons(x1, x2))=  x1 + x2  
  POL(false)=  0  
  POL(s(x1))=  1  
  POL(IFREPL(x1, x2, x3, x4))=  x4  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 23
Dependency Graph
       →DP Problem 4
Nar
       →DP Problem 5
Nar


Dependency Pair:

IFREPL(false, 0, M''', cons(s(Y'''), cons(s(Y'''), L'''))) -> REPLACE(0, M''', cons(s(Y'''), L'''))


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Narrowing Transformation
       →DP Problem 5
Nar


Dependency Pairs:

IFMIN(false, cons(N, cons(M, L))) -> MIN(cons(M, L))
IFMIN(true, cons(N, cons(M, L))) -> MIN(cons(N, L))
MIN(cons(N, cons(M, L))) -> IFMIN(le(N, M), cons(N, cons(M, L)))


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


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MIN(cons(N, cons(M, L))) -> IFMIN(le(N, M), cons(N, cons(M, L)))
three new Dependency Pairs are created:

MIN(cons(0, cons(M', L))) -> IFMIN(true, cons(0, cons(M', L)))
MIN(cons(s(X'), cons(0, L))) -> IFMIN(false, cons(s(X'), cons(0, L)))
MIN(cons(s(X'), cons(s(Y'), L))) -> IFMIN(le(X', Y'), cons(s(X'), cons(s(Y'), L)))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 27
Narrowing Transformation
       →DP Problem 5
Nar


Dependency Pairs:

MIN(cons(s(X'), cons(s(Y'), L))) -> IFMIN(le(X', Y'), cons(s(X'), cons(s(Y'), L)))
MIN(cons(s(X'), cons(0, L))) -> IFMIN(false, cons(s(X'), cons(0, L)))
IFMIN(true, cons(N, cons(M, L))) -> MIN(cons(N, L))
MIN(cons(0, cons(M', L))) -> IFMIN(true, cons(0, cons(M', L)))
IFMIN(false, cons(N, cons(M, L))) -> MIN(cons(M, L))


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


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MIN(cons(s(X'), cons(s(Y'), L))) -> IFMIN(le(X', Y'), cons(s(X'), cons(s(Y'), L)))
three new Dependency Pairs are created:

MIN(cons(s(0), cons(s(Y''), L))) -> IFMIN(true, cons(s(0), cons(s(Y''), L)))
MIN(cons(s(s(X'')), cons(s(0), L))) -> IFMIN(false, cons(s(s(X'')), cons(s(0), L)))
MIN(cons(s(s(X'')), cons(s(s(Y'')), L))) -> IFMIN(le(X'', Y''), cons(s(s(X'')), cons(s(s(Y'')), L)))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 27
Nar
             ...
               →DP Problem 28
Instantiation Transformation
       →DP Problem 5
Nar


Dependency Pairs:

MIN(cons(s(s(X'')), cons(s(s(Y'')), L))) -> IFMIN(le(X'', Y''), cons(s(s(X'')), cons(s(s(Y'')), L)))
MIN(cons(s(s(X'')), cons(s(0), L))) -> IFMIN(false, cons(s(s(X'')), cons(s(0), L)))
MIN(cons(s(0), cons(s(Y''), L))) -> IFMIN(true, cons(s(0), cons(s(Y''), L)))
IFMIN(true, cons(N, cons(M, L))) -> MIN(cons(N, L))
MIN(cons(0, cons(M', L))) -> IFMIN(true, cons(0, cons(M', L)))
IFMIN(false, cons(N, cons(M, L))) -> MIN(cons(M, L))
MIN(cons(s(X'), cons(0, L))) -> IFMIN(false, cons(s(X'), cons(0, L)))


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


Strategy:

innermost




On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFMIN(true, cons(N, cons(M, L))) -> MIN(cons(N, L))
three new Dependency Pairs are created:

IFMIN(true, cons(0, cons(M', L''))) -> MIN(cons(0, L''))
IFMIN(true, cons(s(0), cons(s(Y''''), L''))) -> MIN(cons(s(0), L''))
IFMIN(true, cons(s(s(X'''')), cons(s(s(Y'''')), L''))) -> MIN(cons(s(s(X'''')), L''))

The transformation is resulting in two new DP problems:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 27
Nar
             ...
               →DP Problem 29
Forward Instantiation Transformation
       →DP Problem 5
Nar


Dependency Pairs:

IFMIN(true, cons(0, cons(M', L''))) -> MIN(cons(0, L''))
MIN(cons(0, cons(M', L))) -> IFMIN(true, cons(0, cons(M', L)))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFMIN(true, cons(0, cons(M', L''))) -> MIN(cons(0, L''))
one new Dependency Pair is created:

IFMIN(true, cons(0, cons(M', cons(M''', L''')))) -> MIN(cons(0, cons(M''', L''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 27
Nar
             ...
               →DP Problem 31
Forward Instantiation Transformation
       →DP Problem 5
Nar


Dependency Pairs:

IFMIN(true, cons(0, cons(M', cons(M''', L''')))) -> MIN(cons(0, cons(M''', L''')))
MIN(cons(0, cons(M', L))) -> IFMIN(true, cons(0, cons(M', L)))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

MIN(cons(0, cons(M', L))) -> IFMIN(true, cons(0, cons(M', L)))
one new Dependency Pair is created:

MIN(cons(0, cons(M''', cons(M''''', L''''')))) -> IFMIN(true, cons(0, cons(M''', cons(M''''', L'''''))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 27
Nar
             ...
               →DP Problem 34
Polynomial Ordering
       →DP Problem 5
Nar


Dependency Pairs:

MIN(cons(0, cons(M''', cons(M''''', L''''')))) -> IFMIN(true, cons(0, cons(M''', cons(M''''', L'''''))))
IFMIN(true, cons(0, cons(M', cons(M''', L''')))) -> MIN(cons(0, cons(M''', L''')))


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

MIN(cons(0, cons(M''', cons(M''''', L''''')))) -> IFMIN(true, cons(0, cons(M''', cons(M''''', L'''''))))


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(0)=  0  
  POL(cons(x1, x2))=  1 + x2  
  POL(IFMIN(x1, x2))=  x2  
  POL(MIN(x1))=  1 + x1  
  POL(true)=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 27
Nar
             ...
               →DP Problem 38
Dependency Graph
       →DP Problem 5
Nar


Dependency Pair:

IFMIN(true, cons(0, cons(M', cons(M''', L''')))) -> MIN(cons(0, cons(M''', L''')))


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 27
Nar
             ...
               →DP Problem 30
Instantiation Transformation
       →DP Problem 5
Nar


Dependency Pairs:

IFMIN(true, cons(s(s(X'''')), cons(s(s(Y'''')), L''))) -> MIN(cons(s(s(X'''')), L''))
MIN(cons(s(s(X'')), cons(s(0), L))) -> IFMIN(false, cons(s(s(X'')), cons(s(0), L)))
IFMIN(true, cons(s(0), cons(s(Y''''), L''))) -> MIN(cons(s(0), L''))
MIN(cons(s(0), cons(s(Y''), L))) -> IFMIN(true, cons(s(0), cons(s(Y''), L)))
MIN(cons(s(X'), cons(0, L))) -> IFMIN(false, cons(s(X'), cons(0, L)))
IFMIN(false, cons(N, cons(M, L))) -> MIN(cons(M, L))
MIN(cons(s(s(X'')), cons(s(s(Y'')), L))) -> IFMIN(le(X'', Y''), cons(s(s(X'')), cons(s(s(Y'')), L)))


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


Strategy:

innermost




On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFMIN(false, cons(N, cons(M, L))) -> MIN(cons(M, L))
three new Dependency Pairs are created:

IFMIN(false, cons(s(X'''), cons(0, L''))) -> MIN(cons(0, L''))
IFMIN(false, cons(s(s(X'''')), cons(s(0), L''))) -> MIN(cons(s(0), L''))
IFMIN(false, cons(s(s(X'''')), cons(s(s(Y'''')), L''))) -> MIN(cons(s(s(Y'''')), L''))

The transformation is resulting in two new DP problems:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 27
Nar
             ...
               →DP Problem 32
Forward Instantiation Transformation
       →DP Problem 5
Nar


Dependency Pairs:

IFMIN(true, cons(s(0), cons(s(Y''''), L''))) -> MIN(cons(s(0), L''))
MIN(cons(s(0), cons(s(Y''), L))) -> IFMIN(true, cons(s(0), cons(s(Y''), L)))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFMIN(true, cons(s(0), cons(s(Y''''), L''))) -> MIN(cons(s(0), L''))
one new Dependency Pair is created:

IFMIN(true, cons(s(0), cons(s(Y''''), cons(s(Y''''), L''')))) -> MIN(cons(s(0), cons(s(Y''''), L''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 27
Nar
             ...
               →DP Problem 35
Polynomial Ordering
       →DP Problem 5
Nar


Dependency Pairs:

IFMIN(true, cons(s(0), cons(s(Y''''), cons(s(Y''''), L''')))) -> MIN(cons(s(0), cons(s(Y''''), L''')))
MIN(cons(s(0), cons(s(Y''), L))) -> IFMIN(true, cons(s(0), cons(s(Y''), L)))


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

IFMIN(true, cons(s(0), cons(s(Y''''), cons(s(Y''''), L''')))) -> MIN(cons(s(0), cons(s(Y''''), L''')))


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(0)=  0  
  POL(IFMIN(x1, x2))=  x2  
  POL(cons(x1, x2))=  x1 + x2  
  POL(MIN(x1))=  x1  
  POL(true)=  0  
  POL(s(x1))=  1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 27
Nar
             ...
               →DP Problem 39
Dependency Graph
       →DP Problem 5
Nar


Dependency Pair:

MIN(cons(s(0), cons(s(Y''), L))) -> IFMIN(true, cons(s(0), cons(s(Y''), L)))


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 27
Nar
             ...
               →DP Problem 33
Forward Instantiation Transformation
       →DP Problem 5
Nar


Dependency Pairs:

IFMIN(false, cons(s(s(X'''')), cons(s(s(Y'''')), L''))) -> MIN(cons(s(s(Y'''')), L''))
MIN(cons(s(s(X'')), cons(s(s(Y'')), L))) -> IFMIN(le(X'', Y''), cons(s(s(X'')), cons(s(s(Y'')), L)))
IFMIN(true, cons(s(s(X'''')), cons(s(s(Y'''')), L''))) -> MIN(cons(s(s(X'''')), L''))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFMIN(true, cons(s(s(X'''')), cons(s(s(Y'''')), L''))) -> MIN(cons(s(s(X'''')), L''))
one new Dependency Pair is created:

IFMIN(true, cons(s(s(X''''')), cons(s(s(Y'''')), cons(s(s(Y'''')), L''')))) -> MIN(cons(s(s(X''''')), cons(s(s(Y'''')), L''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 27
Nar
             ...
               →DP Problem 36
Forward Instantiation Transformation
       →DP Problem 5
Nar


Dependency Pairs:

IFMIN(true, cons(s(s(X''''')), cons(s(s(Y'''')), cons(s(s(Y'''')), L''')))) -> MIN(cons(s(s(X''''')), cons(s(s(Y'''')), L''')))
MIN(cons(s(s(X'')), cons(s(s(Y'')), L))) -> IFMIN(le(X'', Y''), cons(s(s(X'')), cons(s(s(Y'')), L)))
IFMIN(false, cons(s(s(X'''')), cons(s(s(Y'''')), L''))) -> MIN(cons(s(s(Y'''')), L''))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFMIN(false, cons(s(s(X'''')), cons(s(s(Y'''')), L''))) -> MIN(cons(s(s(Y'''')), L''))
one new Dependency Pair is created:

IFMIN(false, cons(s(s(X'''')), cons(s(s(Y''''')), cons(s(s(Y'''0)), L''')))) -> MIN(cons(s(s(Y''''')), cons(s(s(Y'''0)), L''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 27
Nar
             ...
               →DP Problem 37
Polynomial Ordering
       →DP Problem 5
Nar


Dependency Pairs:

IFMIN(false, cons(s(s(X'''')), cons(s(s(Y''''')), cons(s(s(Y'''0)), L''')))) -> MIN(cons(s(s(Y''''')), cons(s(s(Y'''0)), L''')))
MIN(cons(s(s(X'')), cons(s(s(Y'')), L))) -> IFMIN(le(X'', Y''), cons(s(s(X'')), cons(s(s(Y'')), L)))
IFMIN(true, cons(s(s(X''''')), cons(s(s(Y'''')), cons(s(s(Y'''')), L''')))) -> MIN(cons(s(s(X''''')), cons(s(s(Y'''')), L''')))


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


Strategy:

innermost




The following dependency pairs can be strictly oriented:

IFMIN(false, cons(s(s(X'''')), cons(s(s(Y''''')), cons(s(s(Y'''0)), L''')))) -> MIN(cons(s(s(Y''''')), cons(s(s(Y'''0)), L''')))
IFMIN(true, cons(s(s(X''''')), cons(s(s(Y'''')), cons(s(s(Y'''')), L''')))) -> MIN(cons(s(s(X''''')), cons(s(s(Y'''')), L''')))


Additionally, the following usable rules for innermost can be oriented:

le(0, Y) -> true
le(s(X), 0) -> false
le(s(X), s(Y)) -> le(X, Y)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(0)=  0  
  POL(false)=  0  
  POL(IFMIN(x1, x2))=  x2  
  POL(cons(x1, x2))=  1 + x2  
  POL(MIN(x1))=  x1  
  POL(true)=  0  
  POL(s(x1))=  0  
  POL(le(x1, x2))=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
           →DP Problem 27
Nar
             ...
               →DP Problem 40
Dependency Graph
       →DP Problem 5
Nar


Dependency Pair:

MIN(cons(s(s(X'')), cons(s(s(Y'')), L))) -> IFMIN(le(X'', Y''), cons(s(s(X'')), cons(s(s(Y'')), L)))


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Narrowing Transformation


Dependency Pairs:

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


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


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

SELSORT(cons(N, L)) -> IFSELSORT(eq(N, min(cons(N, L))), cons(N, L))
three new Dependency Pairs are created:

SELSORT(cons(0, nil)) -> IFSELSORT(eq(0, 0), cons(0, nil))
SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(s(N''), s(N'')), cons(s(N''), nil))
SELSORT(cons(N'', cons(M', L''))) -> IFSELSORT(eq(N'', ifmin(le(N'', M'), cons(N'', cons(M', L'')))), cons(N'', cons(M', L'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rewriting Transformation


Dependency Pairs:

SELSORT(cons(N'', cons(M', L''))) -> IFSELSORT(eq(N'', ifmin(le(N'', M'), cons(N'', cons(M', L'')))), cons(N'', cons(M', L'')))
SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(s(N''), s(N'')), cons(s(N''), nil))
IFSELSORT(true, cons(N, L)) -> SELSORT(L)
SELSORT(cons(0, nil)) -> IFSELSORT(eq(0, 0), cons(0, nil))
IFSELSORT(false, cons(N, L)) -> SELSORT(replace(min(cons(N, L)), N, L))


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


Strategy:

innermost




On this DP problem, a Rewriting SCC transformation can be performed.
As a result of transforming the rule

SELSORT(cons(0, nil)) -> IFSELSORT(eq(0, 0), cons(0, nil))
one new Dependency Pair is created:

SELSORT(cons(0, nil)) -> IFSELSORT(true, cons(0, nil))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 42
Rewriting Transformation


Dependency Pairs:

SELSORT(cons(0, nil)) -> IFSELSORT(true, cons(0, nil))
IFSELSORT(false, cons(N, L)) -> SELSORT(replace(min(cons(N, L)), N, L))
SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(s(N''), s(N'')), cons(s(N''), nil))
IFSELSORT(true, cons(N, L)) -> SELSORT(L)
SELSORT(cons(N'', cons(M', L''))) -> IFSELSORT(eq(N'', ifmin(le(N'', M'), cons(N'', cons(M', L'')))), cons(N'', cons(M', L'')))


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


Strategy:

innermost




On this DP problem, a Rewriting SCC transformation can be performed.
As a result of transforming the rule

SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(s(N''), s(N'')), cons(s(N''), nil))
one new Dependency Pair is created:

SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(N'', N''), cons(s(N''), nil))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 43
Narrowing Transformation


Dependency Pairs:

SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(N'', N''), cons(s(N''), nil))
IFSELSORT(false, cons(N, L)) -> SELSORT(replace(min(cons(N, L)), N, L))
SELSORT(cons(N'', cons(M', L''))) -> IFSELSORT(eq(N'', ifmin(le(N'', M'), cons(N'', cons(M', L'')))), cons(N'', cons(M', L'')))
IFSELSORT(true, cons(N, L)) -> SELSORT(L)
SELSORT(cons(0, nil)) -> IFSELSORT(true, cons(0, nil))


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


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

IFSELSORT(false, cons(N, L)) -> SELSORT(replace(min(cons(N, L)), N, L))
five new Dependency Pairs are created:

IFSELSORT(false, cons(N'', nil)) -> SELSORT(nil)
IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(min(cons(N'', cons(K', L''))), K'), min(cons(N'', cons(K', L''))), N'', cons(K', L'')))
IFSELSORT(false, cons(0, nil)) -> SELSORT(replace(0, 0, nil))
IFSELSORT(false, cons(s(N''), nil)) -> SELSORT(replace(s(N''), s(N''), nil))
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(replace(ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 44
Rewriting Transformation


Dependency Pairs:

IFSELSORT(false, cons(s(N''), nil)) -> SELSORT(replace(s(N''), s(N''), nil))
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(replace(ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))
SELSORT(cons(0, nil)) -> IFSELSORT(true, cons(0, nil))
IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(min(cons(N'', cons(K', L''))), K'), min(cons(N'', cons(K', L''))), N'', cons(K', L'')))
SELSORT(cons(N'', cons(M', L''))) -> IFSELSORT(eq(N'', ifmin(le(N'', M'), cons(N'', cons(M', L'')))), cons(N'', cons(M', L'')))
IFSELSORT(true, cons(N, L)) -> SELSORT(L)
SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(N'', N''), cons(s(N''), nil))


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


Strategy:

innermost




On this DP problem, a Rewriting SCC transformation can be performed.
As a result of transforming the rule

IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(min(cons(N'', cons(K', L''))), K'), min(cons(N'', cons(K', L''))), N'', cons(K', L'')))
one new Dependency Pair is created:

IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), min(cons(N'', cons(K', L''))), N'', cons(K', L'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 45
Rewriting Transformation


Dependency Pairs:

IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), min(cons(N'', cons(K', L''))), N'', cons(K', L'')))
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(replace(ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))
SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(N'', N''), cons(s(N''), nil))
SELSORT(cons(0, nil)) -> IFSELSORT(true, cons(0, nil))
IFSELSORT(true, cons(N, L)) -> SELSORT(L)
SELSORT(cons(N'', cons(M', L''))) -> IFSELSORT(eq(N'', ifmin(le(N'', M'), cons(N'', cons(M', L'')))), cons(N'', cons(M', L'')))
IFSELSORT(false, cons(s(N''), nil)) -> SELSORT(replace(s(N''), s(N''), nil))


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


Strategy:

innermost




On this DP problem, a Rewriting SCC transformation can be performed.
As a result of transforming the rule

IFSELSORT(false, cons(s(N''), nil)) -> SELSORT(replace(s(N''), s(N''), nil))
one new Dependency Pair is created:

IFSELSORT(false, cons(s(N''), nil)) -> SELSORT(nil)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 46
Rewriting Transformation


Dependency Pairs:

IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(replace(ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))
SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(N'', N''), cons(s(N''), nil))
SELSORT(cons(0, nil)) -> IFSELSORT(true, cons(0, nil))
IFSELSORT(true, cons(N, L)) -> SELSORT(L)
SELSORT(cons(N'', cons(M', L''))) -> IFSELSORT(eq(N'', ifmin(le(N'', M'), cons(N'', cons(M', L'')))), cons(N'', cons(M', L'')))
IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), min(cons(N'', cons(K', L''))), N'', cons(K', L'')))


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


Strategy:

innermost




On this DP problem, a Rewriting SCC transformation can be performed.
As a result of transforming the rule

IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(replace(ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))
one new Dependency Pair is created:

IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', M'), cons(N'', cons(M', L''))), M'), ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 47
Rewriting Transformation


Dependency Pairs:

IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', M'), cons(N'', cons(M', L''))), M'), ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))
SELSORT(cons(0, nil)) -> IFSELSORT(true, cons(0, nil))
IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), min(cons(N'', cons(K', L''))), N'', cons(K', L'')))
SELSORT(cons(N'', cons(M', L''))) -> IFSELSORT(eq(N'', ifmin(le(N'', M'), cons(N'', cons(M', L'')))), cons(N'', cons(M', L'')))
IFSELSORT(true, cons(N, L)) -> SELSORT(L)
SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(N'', N''), cons(s(N''), nil))


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


Strategy:

innermost




On this DP problem, a Rewriting SCC transformation can be performed.
As a result of transforming the rule

IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), min(cons(N'', cons(K', L''))), N'', cons(K', L'')))
one new Dependency Pair is created:

IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), ifmin(le(N'', K'), cons(N'', cons(K', L''))), N'', cons(K', L'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 48
Narrowing Transformation


Dependency Pairs:

IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), ifmin(le(N'', K'), cons(N'', cons(K', L''))), N'', cons(K', L'')))
SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(N'', N''), cons(s(N''), nil))
SELSORT(cons(0, nil)) -> IFSELSORT(true, cons(0, nil))
IFSELSORT(true, cons(N, L)) -> SELSORT(L)
SELSORT(cons(N'', cons(M', L''))) -> IFSELSORT(eq(N'', ifmin(le(N'', M'), cons(N'', cons(M', L'')))), cons(N'', cons(M', L'')))
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', M'), cons(N'', cons(M', L''))), M'), ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))


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


Strategy:

innermost




On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

SELSORT(cons(N'', cons(M', L''))) -> IFSELSORT(eq(N'', ifmin(le(N'', M'), cons(N'', cons(M', L'')))), cons(N'', cons(M', L'')))
three new Dependency Pairs are created:

SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, ifmin(true, cons(0, cons(M'', L'')))), cons(0, cons(M'', L'')))
SELSORT(cons(s(X'), cons(0, L''))) -> IFSELSORT(eq(s(X'), ifmin(false, cons(s(X'), cons(0, L'')))), cons(s(X'), cons(0, L'')))
SELSORT(cons(s(X'), cons(s(Y'), L''))) -> IFSELSORT(eq(s(X'), ifmin(le(X', Y'), cons(s(X'), cons(s(Y'), L'')))), cons(s(X'), cons(s(Y'), L'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 49
Rewriting Transformation


Dependency Pairs:

SELSORT(cons(s(X'), cons(s(Y'), L''))) -> IFSELSORT(eq(s(X'), ifmin(le(X', Y'), cons(s(X'), cons(s(Y'), L'')))), cons(s(X'), cons(s(Y'), L'')))
SELSORT(cons(s(X'), cons(0, L''))) -> IFSELSORT(eq(s(X'), ifmin(false, cons(s(X'), cons(0, L'')))), cons(s(X'), cons(0, L'')))
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', M'), cons(N'', cons(M', L''))), M'), ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))
SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, ifmin(true, cons(0, cons(M'', L'')))), cons(0, cons(M'', L'')))
SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(N'', N''), cons(s(N''), nil))
IFSELSORT(true, cons(N, L)) -> SELSORT(L)
SELSORT(cons(0, nil)) -> IFSELSORT(true, cons(0, nil))
IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), ifmin(le(N'', K'), cons(N'', cons(K', L''))), N'', cons(K', L'')))


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


Strategy:

innermost




On this DP problem, a Rewriting SCC transformation can be performed.
As a result of transforming the rule

SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, ifmin(true, cons(0, cons(M'', L'')))), cons(0, cons(M'', L'')))
one new Dependency Pair is created:

SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, min(cons(0, L''))), cons(0, cons(M'', L'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 50
Rewriting Transformation


Dependency Pairs:

IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), ifmin(le(N'', K'), cons(N'', cons(K', L''))), N'', cons(K', L'')))
SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, min(cons(0, L''))), cons(0, cons(M'', L'')))
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', M'), cons(N'', cons(M', L''))), M'), ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))
SELSORT(cons(s(X'), cons(0, L''))) -> IFSELSORT(eq(s(X'), ifmin(false, cons(s(X'), cons(0, L'')))), cons(s(X'), cons(0, L'')))
SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(N'', N''), cons(s(N''), nil))
SELSORT(cons(0, nil)) -> IFSELSORT(true, cons(0, nil))
IFSELSORT(true, cons(N, L)) -> SELSORT(L)
SELSORT(cons(s(X'), cons(s(Y'), L''))) -> IFSELSORT(eq(s(X'), ifmin(le(X', Y'), cons(s(X'), cons(s(Y'), L'')))), cons(s(X'), cons(s(Y'), L'')))


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


Strategy:

innermost




On this DP problem, a Rewriting SCC transformation can be performed.
As a result of transforming the rule

SELSORT(cons(s(X'), cons(0, L''))) -> IFSELSORT(eq(s(X'), ifmin(false, cons(s(X'), cons(0, L'')))), cons(s(X'), cons(0, L'')))
one new Dependency Pair is created:

SELSORT(cons(s(X'), cons(0, L''))) -> IFSELSORT(eq(s(X'), min(cons(0, L''))), cons(s(X'), cons(0, L'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 51
Instantiation Transformation


Dependency Pairs:

SELSORT(cons(s(X'), cons(0, L''))) -> IFSELSORT(eq(s(X'), min(cons(0, L''))), cons(s(X'), cons(0, L'')))
SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, min(cons(0, L''))), cons(0, cons(M'', L'')))
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', M'), cons(N'', cons(M', L''))), M'), ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))
SELSORT(cons(s(X'), cons(s(Y'), L''))) -> IFSELSORT(eq(s(X'), ifmin(le(X', Y'), cons(s(X'), cons(s(Y'), L'')))), cons(s(X'), cons(s(Y'), L'')))
SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(N'', N''), cons(s(N''), nil))
IFSELSORT(true, cons(N, L)) -> SELSORT(L)
SELSORT(cons(0, nil)) -> IFSELSORT(true, cons(0, nil))
IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), ifmin(le(N'', K'), cons(N'', cons(K', L''))), N'', cons(K', L'')))


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


Strategy:

innermost




On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFSELSORT(true, cons(N, L)) -> SELSORT(L)
five new Dependency Pairs are created:

IFSELSORT(true, cons(0, nil)) -> SELSORT(nil)
IFSELSORT(true, cons(s(N''''), nil)) -> SELSORT(nil)
IFSELSORT(true, cons(s(X'''), cons(s(Y'''), L''''))) -> SELSORT(cons(s(Y'''), L''''))
IFSELSORT(true, cons(0, cons(M'''', L''''))) -> SELSORT(cons(M'''', L''''))
IFSELSORT(true, cons(s(X'''), cons(0, L''''))) -> SELSORT(cons(0, L''''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 52
Forward Instantiation Transformation


Dependency Pairs:

IFSELSORT(true, cons(s(X'''), cons(0, L''''))) -> SELSORT(cons(0, L''''))
IFSELSORT(true, cons(s(X'''), cons(s(Y'''), L''''))) -> SELSORT(cons(s(Y'''), L''''))
IFSELSORT(true, cons(0, cons(M'''', L''''))) -> SELSORT(cons(M'''', L''''))
SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, min(cons(0, L''))), cons(0, cons(M'', L'')))
IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), ifmin(le(N'', K'), cons(N'', cons(K', L''))), N'', cons(K', L'')))
SELSORT(cons(s(X'), cons(s(Y'), L''))) -> IFSELSORT(eq(s(X'), ifmin(le(X', Y'), cons(s(X'), cons(s(Y'), L'')))), cons(s(X'), cons(s(Y'), L'')))
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', M'), cons(N'', cons(M', L''))), M'), ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))
SELSORT(cons(s(X'), cons(0, L''))) -> IFSELSORT(eq(s(X'), min(cons(0, L''))), cons(s(X'), cons(0, L'')))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFSELSORT(true, cons(s(X'''), cons(s(Y'''), L''''))) -> SELSORT(cons(s(Y'''), L''''))
two new Dependency Pairs are created:

IFSELSORT(true, cons(s(X'''), cons(s(Y''''), cons(s(Y''0), L''''')))) -> SELSORT(cons(s(Y''''), cons(s(Y''0), L''''')))
IFSELSORT(true, cons(s(X'''), cons(s(Y''''), cons(0, L''''')))) -> SELSORT(cons(s(Y''''), cons(0, L''''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 53
Forward Instantiation Transformation


Dependency Pairs:

IFSELSORT(true, cons(0, cons(M'''', L''''))) -> SELSORT(cons(M'''', L''''))
IFSELSORT(true, cons(s(X'''), cons(s(Y''''), cons(0, L''''')))) -> SELSORT(cons(s(Y''''), cons(0, L''''')))
IFSELSORT(true, cons(s(X'''), cons(s(Y''''), cons(s(Y''0), L''''')))) -> SELSORT(cons(s(Y''''), cons(s(Y''0), L''''')))
SELSORT(cons(s(X'), cons(0, L''))) -> IFSELSORT(eq(s(X'), min(cons(0, L''))), cons(s(X'), cons(0, L'')))
IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), ifmin(le(N'', K'), cons(N'', cons(K', L''))), N'', cons(K', L'')))
SELSORT(cons(s(X'), cons(s(Y'), L''))) -> IFSELSORT(eq(s(X'), ifmin(le(X', Y'), cons(s(X'), cons(s(Y'), L'')))), cons(s(X'), cons(s(Y'), L'')))
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', M'), cons(N'', cons(M', L''))), M'), ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))
SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, min(cons(0, L''))), cons(0, cons(M'', L'')))
IFSELSORT(true, cons(s(X'''), cons(0, L''''))) -> SELSORT(cons(0, L''''))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFSELSORT(true, cons(0, cons(M'''', L''''))) -> SELSORT(cons(M'''', L''''))
three new Dependency Pairs are created:

IFSELSORT(true, cons(0, cons(s(X'''), cons(s(Y'''), L''''')))) -> SELSORT(cons(s(X'''), cons(s(Y'''), L''''')))
IFSELSORT(true, cons(0, cons(0, cons(M''''', L''''')))) -> SELSORT(cons(0, cons(M''''', L''''')))
IFSELSORT(true, cons(0, cons(s(X'''), cons(0, L''''')))) -> SELSORT(cons(s(X'''), cons(0, L''''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 54
Forward Instantiation Transformation


Dependency Pairs:

IFSELSORT(true, cons(s(X'''), cons(0, L''''))) -> SELSORT(cons(0, L''''))
IFSELSORT(true, cons(s(X'''), cons(s(Y''''), cons(s(Y''0), L''''')))) -> SELSORT(cons(s(Y''''), cons(s(Y''0), L''''')))
IFSELSORT(true, cons(0, cons(s(X'''), cons(0, L''''')))) -> SELSORT(cons(s(X'''), cons(0, L''''')))
IFSELSORT(true, cons(0, cons(0, cons(M''''', L''''')))) -> SELSORT(cons(0, cons(M''''', L''''')))
IFSELSORT(true, cons(0, cons(s(X'''), cons(s(Y'''), L''''')))) -> SELSORT(cons(s(X'''), cons(s(Y'''), L''''')))
SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, min(cons(0, L''))), cons(0, cons(M'', L'')))
IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), ifmin(le(N'', K'), cons(N'', cons(K', L''))), N'', cons(K', L'')))
SELSORT(cons(s(X'), cons(s(Y'), L''))) -> IFSELSORT(eq(s(X'), ifmin(le(X', Y'), cons(s(X'), cons(s(Y'), L'')))), cons(s(X'), cons(s(Y'), L'')))
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', M'), cons(N'', cons(M', L''))), M'), ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))
SELSORT(cons(s(X'), cons(0, L''))) -> IFSELSORT(eq(s(X'), min(cons(0, L''))), cons(s(X'), cons(0, L'')))
IFSELSORT(true, cons(s(X'''), cons(s(Y''''), cons(0, L''''')))) -> SELSORT(cons(s(Y''''), cons(0, L''''')))


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


Strategy:

innermost




On this DP problem, a Forward Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFSELSORT(true, cons(s(X'''), cons(0, L''''))) -> SELSORT(cons(0, L''''))
one new Dependency Pair is created:

IFSELSORT(true, cons(s(X'''), cons(0, cons(M'''', L''''')))) -> SELSORT(cons(0, cons(M'''', L''''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 55
Polynomial Ordering


Dependency Pairs:

IFSELSORT(true, cons(s(X'''), cons(s(Y''''), cons(0, L''''')))) -> SELSORT(cons(s(Y''''), cons(0, L''''')))
IFSELSORT(true, cons(0, cons(s(X'''), cons(0, L''''')))) -> SELSORT(cons(s(X'''), cons(0, L''''')))
IFSELSORT(true, cons(0, cons(0, cons(M''''', L''''')))) -> SELSORT(cons(0, cons(M''''', L''''')))
IFSELSORT(true, cons(0, cons(s(X'''), cons(s(Y'''), L''''')))) -> SELSORT(cons(s(X'''), cons(s(Y'''), L''''')))
IFSELSORT(true, cons(s(X'''), cons(0, cons(M'''', L''''')))) -> SELSORT(cons(0, cons(M'''', L''''')))
SELSORT(cons(s(X'), cons(0, L''))) -> IFSELSORT(eq(s(X'), min(cons(0, L''))), cons(s(X'), cons(0, L'')))
IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), ifmin(le(N'', K'), cons(N'', cons(K', L''))), N'', cons(K', L'')))
SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, min(cons(0, L''))), cons(0, cons(M'', L'')))
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', M'), cons(N'', cons(M', L''))), M'), ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))
SELSORT(cons(s(X'), cons(s(Y'), L''))) -> IFSELSORT(eq(s(X'), ifmin(le(X', Y'), cons(s(X'), cons(s(Y'), L'')))), cons(s(X'), cons(s(Y'), L'')))
IFSELSORT(true, cons(s(X'''), cons(s(Y''''), cons(s(Y''0), L''''')))) -> SELSORT(cons(s(Y''''), cons(s(Y''0), L''''')))


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


Strategy:

innermost




The following dependency pairs can be strictly oriented:

IFSELSORT(true, cons(s(X'''), cons(s(Y''''), cons(0, L''''')))) -> SELSORT(cons(s(Y''''), cons(0, L''''')))
IFSELSORT(true, cons(s(X'''), cons(0, cons(M'''', L''''')))) -> SELSORT(cons(0, cons(M'''', L''''')))
IFSELSORT(true, cons(s(X'''), cons(s(Y''''), cons(s(Y''0), L''''')))) -> SELSORT(cons(s(Y''''), cons(s(Y''0), L''''')))


Additionally, the following usable rules for innermost can be oriented:

eq(0, 0) -> true
eq(0, s(Y)) -> false
eq(s(X), 0) -> false
eq(s(X), s(Y)) -> eq(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))
ifrepl(true, N, M, cons(K, L)) -> cons(M, L)
ifrepl(false, N, M, cons(K, L)) -> cons(K, replace(N, M, L))
le(0, Y) -> true
le(s(X), 0) -> false
le(s(X), s(Y)) -> le(X, Y)
replace(N, M, nil) -> nil
replace(N, M, cons(K, L)) -> ifrepl(eq(N, K), N, M, cons(K, L))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(false)=  0  
  POL(true)=  0  
  POL(replace(x1, x2, x3))=  x2 + x3  
  POL(eq(x1, x2))=  0  
  POL(0)=  0  
  POL(SELSORT(x1))=  x1  
  POL(cons(x1, x2))=  x1 + x2  
  POL(IFSELSORT(x1, x2))=  x2  
  POL(min(x1))=  x1  
  POL(nil)=  0  
  POL(s(x1))=  1  
  POL(ifrepl(x1, x2, x3, x4))=  x3 + x4  
  POL(le(x1, x2))=  0  
  POL(ifmin(x1, x2))=  x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 56
Polynomial Ordering


Dependency Pairs:

IFSELSORT(true, cons(0, cons(s(X'''), cons(0, L''''')))) -> SELSORT(cons(s(X'''), cons(0, L''''')))
IFSELSORT(true, cons(0, cons(0, cons(M''''', L''''')))) -> SELSORT(cons(0, cons(M''''', L''''')))
IFSELSORT(true, cons(0, cons(s(X'''), cons(s(Y'''), L''''')))) -> SELSORT(cons(s(X'''), cons(s(Y'''), L''''')))
SELSORT(cons(s(X'), cons(0, L''))) -> IFSELSORT(eq(s(X'), min(cons(0, L''))), cons(s(X'), cons(0, L'')))
IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), ifmin(le(N'', K'), cons(N'', cons(K', L''))), N'', cons(K', L'')))
SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, min(cons(0, L''))), cons(0, cons(M'', L'')))
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', M'), cons(N'', cons(M', L''))), M'), ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))
SELSORT(cons(s(X'), cons(s(Y'), L''))) -> IFSELSORT(eq(s(X'), ifmin(le(X', Y'), cons(s(X'), cons(s(Y'), L'')))), cons(s(X'), cons(s(Y'), L'')))


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


Strategy:

innermost




The following dependency pairs can be strictly oriented:

IFSELSORT(true, cons(0, cons(s(X'''), cons(0, L''''')))) -> SELSORT(cons(s(X'''), cons(0, L''''')))
IFSELSORT(true, cons(0, cons(0, cons(M''''', L''''')))) -> SELSORT(cons(0, cons(M''''', L''''')))
IFSELSORT(true, cons(0, cons(s(X'''), cons(s(Y'''), L''''')))) -> SELSORT(cons(s(X'''), cons(s(Y'''), L''''')))


Additionally, the following usable rules for innermost can be oriented:

eq(0, 0) -> true
eq(0, s(Y)) -> false
eq(s(X), 0) -> false
eq(s(X), s(Y)) -> eq(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))
ifrepl(true, N, M, cons(K, L)) -> cons(M, L)
ifrepl(false, N, M, cons(K, L)) -> cons(K, replace(N, M, L))
le(0, Y) -> true
le(s(X), 0) -> false
le(s(X), s(Y)) -> le(X, Y)
replace(N, M, nil) -> nil
replace(N, M, cons(K, L)) -> ifrepl(eq(N, K), N, M, cons(K, L))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(false)=  0  
  POL(true)=  0  
  POL(replace(x1, x2, x3))=  x2 + x3  
  POL(eq(x1, x2))=  0  
  POL(0)=  1  
  POL(SELSORT(x1))=  x1  
  POL(cons(x1, x2))=  x1 + x2  
  POL(IFSELSORT(x1, x2))=  x2  
  POL(min(x1))=  x1  
  POL(nil)=  0  
  POL(s(x1))=  0  
  POL(ifrepl(x1, x2, x3, x4))=  x3 + x4  
  POL(le(x1, x2))=  0  
  POL(ifmin(x1, x2))=  x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 57
Polynomial Ordering


Dependency Pairs:

SELSORT(cons(s(X'), cons(0, L''))) -> IFSELSORT(eq(s(X'), min(cons(0, L''))), cons(s(X'), cons(0, L'')))
IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), ifmin(le(N'', K'), cons(N'', cons(K', L''))), N'', cons(K', L'')))
SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, min(cons(0, L''))), cons(0, cons(M'', L'')))
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', M'), cons(N'', cons(M', L''))), M'), ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))
SELSORT(cons(s(X'), cons(s(Y'), L''))) -> IFSELSORT(eq(s(X'), ifmin(le(X', Y'), cons(s(X'), cons(s(Y'), L'')))), cons(s(X'), cons(s(Y'), L'')))


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


Strategy:

innermost




The following dependency pairs can be strictly oriented:

SELSORT(cons(s(X'), cons(0, L''))) -> IFSELSORT(eq(s(X'), min(cons(0, L''))), cons(s(X'), cons(0, L'')))
SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, min(cons(0, L''))), cons(0, cons(M'', L'')))
SELSORT(cons(s(X'), cons(s(Y'), L''))) -> IFSELSORT(eq(s(X'), ifmin(le(X', Y'), cons(s(X'), cons(s(Y'), L'')))), cons(s(X'), cons(s(Y'), L'')))


Additionally, the following usable rules for innermost can be oriented:

eq(0, 0) -> true
eq(0, s(Y)) -> false
eq(s(X), 0) -> false
eq(s(X), s(Y)) -> eq(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))
ifrepl(true, N, M, cons(K, L)) -> cons(M, L)
ifrepl(false, N, M, cons(K, L)) -> cons(K, replace(N, M, L))
le(0, Y) -> true
le(s(X), 0) -> false
le(s(X), s(Y)) -> le(X, Y)
replace(N, M, nil) -> nil
replace(N, M, cons(K, L)) -> ifrepl(eq(N, K), N, M, cons(K, L))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(false)=  0  
  POL(true)=  0  
  POL(replace(x1, x2, x3))=  x3  
  POL(eq(x1, x2))=  0  
  POL(0)=  0  
  POL(SELSORT(x1))=  1 + x1  
  POL(cons(x1, x2))=  1 + x2  
  POL(IFSELSORT(x1, x2))=  x2  
  POL(min(x1))=  0  
  POL(nil)=  0  
  POL(s(x1))=  0  
  POL(ifrepl(x1, x2, x3, x4))=  x4  
  POL(le(x1, x2))=  0  
  POL(ifmin(x1, x2))=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Nar
       →DP Problem 4
Nar
       →DP Problem 5
Nar
           →DP Problem 41
Rw
             ...
               →DP Problem 58
Dependency Graph


Dependency Pairs:

IFSELSORT(false, cons(N'', cons(K', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', K'), cons(N'', cons(K', L''))), K'), ifmin(le(N'', K'), cons(N'', cons(K', L''))), N'', cons(K', L'')))
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(ifrepl(eq(ifmin(le(N'', M'), cons(N'', cons(M', L''))), M'), ifmin(le(N'', M'), cons(N'', cons(M', L''))), N'', cons(M', L'')))


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

Innermost Termination of R successfully shown.
Duration:
0:12 minutes