R
↳Dependency Pair Analysis
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)
R
↳DPs
→DP Problem 1
↳Forward Instantiation Transformation
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Nar
→DP Problem 4
↳Nar
→DP Problem 5
↳Nar
EQ(s(X), s(Y)) -> EQ(X, Y)
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
one new Dependency Pair is created:
EQ(s(X), s(Y)) -> EQ(X, Y)
EQ(s(s(X'')), s(s(Y''))) -> EQ(s(X''), s(Y''))
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
EQ(s(s(X'')), s(s(Y''))) -> EQ(s(X''), s(Y''))
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
one new Dependency Pair is created:
EQ(s(s(X'')), s(s(Y''))) -> EQ(s(X''), s(Y''))
EQ(s(s(s(X''''))), s(s(s(Y'''')))) -> EQ(s(s(X'''')), s(s(Y'''')))
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
EQ(s(s(s(X''''))), s(s(s(Y'''')))) -> EQ(s(s(X'''')), s(s(Y'''')))
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
EQ(s(s(s(X''''))), s(s(s(Y'''')))) -> EQ(s(s(X'''')), s(s(Y'''')))
POL(EQ(x1, x2)) = 1 + x1 POL(s(x1)) = 1 + x1
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
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
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳Forward Instantiation Transformation
→DP Problem 3
↳Nar
→DP Problem 4
↳Nar
→DP Problem 5
↳Nar
LE(s(X), s(Y)) -> LE(X, Y)
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
one new Dependency Pair is created:
LE(s(X), s(Y)) -> LE(X, Y)
LE(s(s(X'')), s(s(Y''))) -> LE(s(X''), s(Y''))
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
LE(s(s(X'')), s(s(Y''))) -> LE(s(X''), s(Y''))
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
one new Dependency Pair is created:
LE(s(s(X'')), s(s(Y''))) -> LE(s(X''), s(Y''))
LE(s(s(s(X''''))), s(s(s(Y'''')))) -> LE(s(s(X'''')), s(s(Y'''')))
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
LE(s(s(s(X''''))), s(s(s(Y'''')))) -> LE(s(s(X'''')), s(s(Y'''')))
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
LE(s(s(s(X''''))), s(s(s(Y'''')))) -> LE(s(s(X'''')), s(s(Y'''')))
POL(LE(x1, x2)) = 1 + x1 POL(s(x1)) = 1 + x1
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
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
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Narrowing Transformation
→DP Problem 4
↳Nar
→DP Problem 5
↳Nar
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))
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
four new Dependency Pairs are created:
REPLACE(N, M, cons(K, L)) -> IFREPL(eq(N, K), N, M, cons(K, L))
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))
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
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)
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
four new Dependency Pairs are created:
REPLACE(s(X'), M, cons(s(Y'), L)) -> IFREPL(eq(X', Y'), s(X'), M, cons(s(Y'), L))
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))
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
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))
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
five new Dependency Pairs are created:
IFREPL(false, N, M, cons(K, L)) -> REPLACE(N, M, L)
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'')
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
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))
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
four new Dependency Pairs are created:
IFREPL(false, s(X'''), M'', cons(0, L'')) -> REPLACE(s(X'''), M'', L'')
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'''))
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
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'')
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
four new Dependency Pairs are created:
REPLACE(s(X'), M, cons(0, L)) -> IFREPL(false, 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(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''''')))
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
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'')
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
three new Dependency Pairs are created:
IFREPL(false, s(0), M'', cons(s(s(Y'''')), L'')) -> REPLACE(s(0), M'', 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(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''''''')))
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
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'''))
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
five new Dependency Pairs are created:
IFREPL(false, s(s(X'''')), M'', cons(s(0), L'')) -> REPLACE(s(s(X'''')), M'', 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(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''''''')))
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
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''''')))
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
five new Dependency Pairs are created:
IFREPL(false, s(s(X'''')), M'', cons(s(s(Y'''')), L'')) -> REPLACE(s(s(X'''')), M'', 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(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''''''')))
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
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''''''')))
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
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''''''')))
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
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
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''''')))
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
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
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'''))
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
REPLACE(s(X''), M', cons(0, cons(0, L'''''))) -> IFREPL(false, s(X''), M', cons(0, cons(0, L''''')))
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
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
IFREPL(false, s(X''''), M''', cons(0, cons(0, L'''))) -> REPLACE(s(X''''), M''', cons(0, L'''))
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
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
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))
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
one new Dependency Pair is created:
IFREPL(false, 0, M'', cons(s(Y'''), L'')) -> REPLACE(0, M'', L'')
IFREPL(false, 0, M''', cons(s(Y'''), cons(s(Y'''), L'''))) -> REPLACE(0, M''', cons(s(Y'''), L'''))
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
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))
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
one new Dependency Pair is created:
REPLACE(0, M, cons(s(Y'), L)) -> IFREPL(false, 0, M, cons(s(Y'), L))
REPLACE(0, M', cons(s(Y''), cons(s(Y''''''), L'''''))) -> IFREPL(false, 0, M', cons(s(Y''), cons(s(Y''''''), L''''')))
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
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'''))
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
REPLACE(0, M', cons(s(Y''), cons(s(Y''''''), L'''''))) -> IFREPL(false, 0, M', cons(s(Y''), cons(s(Y''''''), L''''')))
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
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
IFREPL(false, 0, M''', cons(s(Y'''), cons(s(Y'''), L'''))) -> REPLACE(0, M''', cons(s(Y'''), L'''))
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
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Nar
→DP Problem 4
↳Narrowing Transformation
→DP Problem 5
↳Nar
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)))
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
three new Dependency Pairs are created:
MIN(cons(N, cons(M, L))) -> IFMIN(le(N, M), cons(N, cons(M, L)))
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)))
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
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))
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
three new Dependency Pairs are created:
MIN(cons(s(X'), cons(s(Y'), L))) -> IFMIN(le(X', Y'), cons(s(X'), cons(s(Y'), L)))
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)))
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
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)))
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
three new Dependency Pairs are created:
IFMIN(true, cons(N, cons(M, L))) -> MIN(cons(N, L))
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''))
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
IFMIN(true, cons(0, cons(M', L''))) -> MIN(cons(0, L''))
MIN(cons(0, cons(M', L))) -> IFMIN(true, cons(0, cons(M', L)))
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
one new Dependency Pair is created:
IFMIN(true, cons(0, cons(M', L''))) -> MIN(cons(0, L''))
IFMIN(true, cons(0, cons(M', cons(M''', L''')))) -> MIN(cons(0, cons(M''', L''')))
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
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)))
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
one new Dependency Pair is created:
MIN(cons(0, cons(M', L))) -> IFMIN(true, cons(0, cons(M', L)))
MIN(cons(0, cons(M''', cons(M''''', L''''')))) -> IFMIN(true, cons(0, cons(M''', cons(M''''', L'''''))))
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
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''')))
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
MIN(cons(0, cons(M''', cons(M''''', L''''')))) -> IFMIN(true, cons(0, cons(M''', cons(M''''', L'''''))))
POL(0) = 0 POL(cons(x1, x2)) = 1 + x2 POL(IFMIN(x1, x2)) = x2 POL(MIN(x1)) = 1 + x1 POL(true) = 0
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
IFMIN(true, cons(0, cons(M', cons(M''', L''')))) -> MIN(cons(0, cons(M''', L''')))
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
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
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)))
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
three new Dependency Pairs are created:
IFMIN(false, cons(N, cons(M, L))) -> MIN(cons(M, L))
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''))
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
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)))
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
one new Dependency Pair is created:
IFMIN(true, cons(s(0), cons(s(Y''''), L''))) -> MIN(cons(s(0), L''))
IFMIN(true, cons(s(0), cons(s(Y''''), cons(s(Y''''), L''')))) -> MIN(cons(s(0), cons(s(Y''''), L''')))
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
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)))
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
IFMIN(true, cons(s(0), cons(s(Y''''), cons(s(Y''''), L''')))) -> MIN(cons(s(0), cons(s(Y''''), L''')))
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
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
MIN(cons(s(0), cons(s(Y''), L))) -> IFMIN(true, cons(s(0), cons(s(Y''), L)))
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
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
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''))
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
one new Dependency Pair is created:
IFMIN(true, cons(s(s(X'''')), cons(s(s(Y'''')), L''))) -> MIN(cons(s(s(X'''')), 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''')))
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
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''))
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
one new Dependency Pair is created:
IFMIN(false, cons(s(s(X'''')), cons(s(s(Y'''')), L''))) -> MIN(cons(s(s(Y'''')), L''))
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''')))
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
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''')))
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
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''')))
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
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
MIN(cons(s(s(X'')), cons(s(s(Y'')), L))) -> IFMIN(le(X'', Y''), cons(s(s(X'')), cons(s(s(Y'')), L)))
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
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Nar
→DP Problem 4
↳Nar
→DP Problem 5
↳Narrowing Transformation
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))
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
three new Dependency Pairs are created:
SELSORT(cons(N, L)) -> IFSELSORT(eq(N, min(cons(N, L))), cons(N, L))
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'')))
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
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))
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
one new Dependency Pair is created:
SELSORT(cons(0, nil)) -> IFSELSORT(eq(0, 0), cons(0, nil))
SELSORT(cons(0, nil)) -> IFSELSORT(true, cons(0, nil))
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
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'')))
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
one new Dependency Pair is created:
SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(s(N''), s(N'')), cons(s(N''), nil))
SELSORT(cons(s(N''), nil)) -> IFSELSORT(eq(N'', N''), cons(s(N''), nil))
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
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))
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
five new Dependency Pairs are created:
IFSELSORT(false, cons(N, L)) -> SELSORT(replace(min(cons(N, L)), N, L))
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'')))
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
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))
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
one new Dependency Pair is created:
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(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'')))
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
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))
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
one new Dependency Pair is created:
IFSELSORT(false, cons(s(N''), nil)) -> SELSORT(replace(s(N''), s(N''), nil))
IFSELSORT(false, cons(s(N''), nil)) -> SELSORT(nil)
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
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'')))
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
one new Dependency Pair is created:
IFSELSORT(false, cons(N'', cons(M', L''))) -> SELSORT(replace(ifmin(le(N'', M'), cons(N'', cons(M', L''))), 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'')))
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
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))
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
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'')))
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'')))
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
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'')))
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
three new Dependency Pairs are created:
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(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'')))
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
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'')))
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
one new Dependency Pair is created:
SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, ifmin(true, cons(0, cons(M'', L'')))), cons(0, cons(M'', L'')))
SELSORT(cons(0, cons(M'', L''))) -> IFSELSORT(eq(0, min(cons(0, L''))), cons(0, cons(M'', L'')))
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
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'')))
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
one new Dependency Pair is created:
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(0, L''))) -> IFSELSORT(eq(s(X'), min(cons(0, L''))), cons(s(X'), cons(0, L'')))
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
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'')))
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
five new Dependency Pairs are created:
IFSELSORT(true, cons(N, L)) -> SELSORT(L)
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''''))
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
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'')))
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
two new Dependency Pairs are created:
IFSELSORT(true, cons(s(X'''), cons(s(Y'''), L''''))) -> SELSORT(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''''')))
IFSELSORT(true, cons(s(X'''), cons(s(Y''''), cons(0, L''''')))) -> SELSORT(cons(s(Y''''), cons(0, L''''')))
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
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''''))
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
three new Dependency Pairs are created:
IFSELSORT(true, cons(0, cons(M'''', L''''))) -> SELSORT(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(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''''')))
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
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''''')))
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
one new Dependency Pair is created:
IFSELSORT(true, cons(s(X'''), cons(0, L''''))) -> SELSORT(cons(0, L''''))
IFSELSORT(true, cons(s(X'''), cons(0, cons(M'''', L''''')))) -> SELSORT(cons(0, cons(M'''', L''''')))
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
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''''')))
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
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''''')))
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'')))
IFSELSORT(true, cons(s(X'''), cons(s(Y''''), cons(s(Y''0), L''''')))) -> SELSORT(cons(s(Y''''), cons(s(Y''0), 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))
POL(false) = 0 POL(true) = 0 POL(replace(x1, x2, x3)) = x3 POL(eq(x1, x2)) = 0 POL(0) = 0 POL(SELSORT(x1)) = 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
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
↳Dependency Graph
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'')))
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