Term Rewriting System R:
[x, y, n, m]
eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

EQ(s(x), s(y)) -> EQ(x, y)
LE(s(x), s(y)) -> LE(x, y)
APP(add(n, x), y) -> APP(x, y)
MIN(add(n, add(m, x))) -> IFMIN(le(n, m), add(n, add(m, x)))
MIN(add(n, add(m, x))) -> LE(n, m)
IFMIN(true, add(n, add(m, x))) -> MIN(add(n, x))
IFMIN(false, add(n, add(m, x))) -> MIN(add(m, x))
RM(n, add(m, x)) -> IFRM(eq(n, m), n, add(m, x))
RM(n, add(m, x)) -> EQ(n, m)
IFRM(true, n, add(m, x)) -> RM(n, x)
IFRM(false, n, add(m, x)) -> RM(n, x)
MINSORT(add(n, x), y) -> IFMINSORT(eq(n, min(add(n, x))), add(n, x), y)
MINSORT(add(n, x), y) -> EQ(n, min(add(n, x)))
MINSORT(add(n, x), y) -> MIN(add(n, x))
IFMINSORT(true, add(n, x), y) -> MINSORT(app(rm(n, x), y), nil)
IFMINSORT(true, add(n, x), y) -> APP(rm(n, x), y)
IFMINSORT(true, add(n, x), y) -> RM(n, x)
IFMINSORT(false, add(n, x), y) -> MINSORT(x, add(n, y))

Furthermore, R contains six SCCs.


   R
DPs
       →DP Problem 1
Polynomial Ordering
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Nar


Dependency Pair:

EQ(s(x), s(y)) -> EQ(x, y)


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





The following dependency pair can be strictly oriented:

EQ(s(x), s(y)) -> EQ(x, y)


There are no usable rules w.r.t. to the implicit AFS that need to be oriented.

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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 7
Dependency Graph
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Nar


Dependency Pair:


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polynomial Ordering
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Nar


Dependency Pair:

LE(s(x), s(y)) -> LE(x, y)


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





The following dependency pair can be strictly oriented:

LE(s(x), s(y)) -> LE(x, y)


There are no usable rules w.r.t. to the implicit AFS that need to be oriented.

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

resulting in one new DP problem.



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


Dependency Pair:


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polynomial Ordering
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Nar


Dependency Pair:

APP(add(n, x), y) -> APP(x, y)


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





The following dependency pair can be strictly oriented:

APP(add(n, x), y) -> APP(x, y)


There are no usable rules w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(APP(x1, x2))=  x1  
  POL(add(x1, x2))=  1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
           →DP Problem 9
Dependency Graph
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Nar


Dependency Pair:


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polynomial Ordering
       →DP Problem 5
Polo
       →DP Problem 6
Nar


Dependency Pairs:

IFRM(false, n, add(m, x)) -> RM(n, x)
IFRM(true, n, add(m, x)) -> RM(n, x)
RM(n, add(m, x)) -> IFRM(eq(n, m), n, add(m, x))


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





The following dependency pairs can be strictly oriented:

IFRM(false, n, add(m, x)) -> RM(n, x)
IFRM(true, n, add(m, x)) -> RM(n, x)


There are no usable rules w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(IF_RM(x1, x2, x3))=  x3  
  POL(eq(x1, x2))=  0  
  POL(0)=  0  
  POL(false)=  0  
  POL(true)=  0  
  POL(s(x1))=  0  
  POL(RM(x1, x2))=  x2  
  POL(add(x1, x2))=  1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
           →DP Problem 10
Dependency Graph
       →DP Problem 5
Polo
       →DP Problem 6
Nar


Dependency Pair:

RM(n, add(m, x)) -> IFRM(eq(n, m), n, add(m, x))


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polynomial Ordering
       →DP Problem 6
Nar


Dependency Pairs:

IFMIN(false, add(n, add(m, x))) -> MIN(add(m, x))
IFMIN(true, add(n, add(m, x))) -> MIN(add(n, x))
MIN(add(n, add(m, x))) -> IFMIN(le(n, m), add(n, add(m, x)))


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





The following dependency pairs can be strictly oriented:

IFMIN(false, add(n, add(m, x))) -> MIN(add(m, x))
IFMIN(true, add(n, add(m, x))) -> MIN(add(n, x))


There are no usable rules w.r.t. to the implicit AFS that need to be oriented.

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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
           →DP Problem 11
Dependency Graph
       →DP Problem 6
Nar


Dependency Pair:

MIN(add(n, add(m, x))) -> IFMIN(le(n, m), add(n, add(m, x)))


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Narrowing Transformation


Dependency Pairs:

IFMINSORT(false, add(n, x), y) -> MINSORT(x, add(n, y))
IFMINSORT(true, add(n, x), y) -> MINSORT(app(rm(n, x), y), nil)
MINSORT(add(n, x), y) -> IFMINSORT(eq(n, min(add(n, x))), add(n, x), y)


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





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

IFMINSORT(true, add(n, x), y) -> MINSORT(app(rm(n, x), y), nil)
two new Dependency Pairs are created:

IFMINSORT(true, add(n'', nil), y) -> MINSORT(app(nil, y), nil)
IFMINSORT(true, add(n'', add(m', x'')), y) -> MINSORT(app(ifrm(eq(n'', m'), n'', add(m', x'')), y), nil)

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFMINSORT(true, add(n'', add(m', x'')), y) -> MINSORT(app(ifrm(eq(n'', m'), n'', add(m', x'')), y), nil)
IFMINSORT(true, add(n'', nil), y) -> MINSORT(app(nil, y), nil)
MINSORT(add(n, x), y) -> IFMINSORT(eq(n, min(add(n, x))), add(n, x), y)
IFMINSORT(false, add(n, x), y) -> MINSORT(x, add(n, y))


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





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

IFMINSORT(true, add(n'', nil), y) -> MINSORT(app(nil, y), nil)
one new Dependency Pair is created:

IFMINSORT(true, add(n'', nil), y'') -> MINSORT(y'', nil)

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFMINSORT(true, add(n'', nil), y'') -> MINSORT(y'', nil)
IFMINSORT(false, add(n, x), y) -> MINSORT(x, add(n, y))
MINSORT(add(n, x), y) -> IFMINSORT(eq(n, min(add(n, x))), add(n, x), y)
IFMINSORT(true, add(n'', add(m', x'')), y) -> MINSORT(app(ifrm(eq(n'', m'), n'', add(m', x'')), y), nil)


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





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

MINSORT(add(n, x), y) -> IFMINSORT(eq(n, min(add(n, x))), add(n, x), y)
two new Dependency Pairs are created:

MINSORT(add(n'', x''), add(n''', y'')) -> IFMINSORT(eq(n'', min(add(n'', x''))), add(n'', x''), add(n''', y''))
MINSORT(add(n', x'), nil) -> IFMINSORT(eq(n', min(add(n', x'))), add(n', x'), nil)

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFMINSORT(true, add(n'', add(m', x'')), y) -> MINSORT(app(ifrm(eq(n'', m'), n'', add(m', x'')), y), nil)
MINSORT(add(n'', x''), add(n''', y'')) -> IFMINSORT(eq(n'', min(add(n'', x''))), add(n'', x''), add(n''', y''))
IFMINSORT(false, add(n, x), y) -> MINSORT(x, add(n, y))
MINSORT(add(n', x'), nil) -> IFMINSORT(eq(n', min(add(n', x'))), add(n', x'), nil)
IFMINSORT(true, add(n'', nil), y'') -> MINSORT(y'', nil)


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





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

IFMINSORT(false, add(n, x), y) -> MINSORT(x, add(n, y))
two new Dependency Pairs are created:

IFMINSORT(false, add(n', x'), add(n'''''', y'''')) -> MINSORT(x', add(n', add(n'''''', y'''')))
IFMINSORT(false, add(n', x'), nil) -> MINSORT(x', add(n', nil))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFMINSORT(false, add(n', x'), add(n'''''', y'''')) -> MINSORT(x', add(n', add(n'''''', y'''')))
MINSORT(add(n'', x''), add(n''', y'')) -> IFMINSORT(eq(n'', min(add(n'', x''))), add(n'', x''), add(n''', y''))
IFMINSORT(false, add(n', x'), nil) -> MINSORT(x', add(n', nil))
IFMINSORT(true, add(n'', nil), y'') -> MINSORT(y'', nil)
MINSORT(add(n', x'), nil) -> IFMINSORT(eq(n', min(add(n', x'))), add(n', x'), nil)
IFMINSORT(true, add(n'', add(m', x'')), y) -> MINSORT(app(ifrm(eq(n'', m'), n'', add(m', x'')), y), nil)


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





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

IFMINSORT(true, add(n'', add(m', x'')), y) -> MINSORT(app(ifrm(eq(n'', m'), n'', add(m', x'')), y), nil)
two new Dependency Pairs are created:

IFMINSORT(true, add(n''', add(m'', x'''')), add(n'''''', y'''')) -> MINSORT(app(ifrm(eq(n''', m''), n''', add(m'', x'''')), add(n'''''', y'''')), nil)
IFMINSORT(true, add(n'''', add(m'', x'''')), nil) -> MINSORT(app(ifrm(eq(n'''', m''), n'''', add(m'', x'''')), nil), nil)

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFMINSORT(true, add(n''', add(m'', x'''')), add(n'''''', y'''')) -> MINSORT(app(ifrm(eq(n''', m''), n''', add(m'', x'''')), add(n'''''', y'''')), nil)
IFMINSORT(true, add(n'''', add(m'', x'''')), nil) -> MINSORT(app(ifrm(eq(n'''', m''), n'''', add(m'', x'''')), nil), nil)
IFMINSORT(false, add(n', x'), nil) -> MINSORT(x', add(n', nil))
MINSORT(add(n', x'), nil) -> IFMINSORT(eq(n', min(add(n', x'))), add(n', x'), nil)
IFMINSORT(true, add(n'', nil), y'') -> MINSORT(y'', nil)
MINSORT(add(n'', x''), add(n''', y'')) -> IFMINSORT(eq(n'', min(add(n'', x''))), add(n'', x''), add(n''', y''))
IFMINSORT(false, add(n', x'), add(n'''''', y'''')) -> MINSORT(x', add(n', add(n'''''', y'''')))


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





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

MINSORT(add(n'', x''), add(n''', y'')) -> IFMINSORT(eq(n'', min(add(n'', x''))), add(n'', x''), add(n''', y''))
two new Dependency Pairs are created:

MINSORT(add(n'''', x''''), add(n''''', add(n'''''''', y''''''))) -> IFMINSORT(eq(n'''', min(add(n'''', x''''))), add(n'''', x''''), add(n''''', add(n'''''''', y'''''')))
MINSORT(add(n'''', x''''), add(n''''', nil)) -> IFMINSORT(eq(n'''', min(add(n'''', x''''))), add(n'''', x''''), add(n''''', nil))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

IFMINSORT(true, add(n'''', add(m'', x'''')), nil) -> MINSORT(app(ifrm(eq(n'''', m''), n'''', add(m'', x'''')), nil), nil)
MINSORT(add(n'''', x''''), add(n''''', add(n'''''''', y''''''))) -> IFMINSORT(eq(n'''', min(add(n'''', x''''))), add(n'''', x''''), add(n''''', add(n'''''''', y'''''')))
IFMINSORT(false, add(n', x'), add(n'''''', y'''')) -> MINSORT(x', add(n', add(n'''''', y'''')))
MINSORT(add(n'''', x''''), add(n''''', nil)) -> IFMINSORT(eq(n'''', min(add(n'''', x''''))), add(n'''', x''''), add(n''''', nil))
IFMINSORT(false, add(n', x'), nil) -> MINSORT(x', add(n', nil))
IFMINSORT(true, add(n'', nil), y'') -> MINSORT(y'', nil)
MINSORT(add(n', x'), nil) -> IFMINSORT(eq(n', min(add(n', x'))), add(n', x'), nil)
IFMINSORT(true, add(n''', add(m'', x'''')), add(n'''''', y'''')) -> MINSORT(app(ifrm(eq(n''', m''), n''', add(m'', x'''')), add(n'''''', y'''')), nil)


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





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

IFMINSORT(false, add(n', x'), add(n'''''', y'''')) -> MINSORT(x', add(n', add(n'''''', y'''')))
two new Dependency Pairs are created:

IFMINSORT(false, add(n'', x'''), add(n'''''''', add(n'''''''''', y''''''''))) -> MINSORT(x''', add(n'', add(n'''''''', add(n'''''''''', y''''''''))))
IFMINSORT(false, add(n'', x'''), add(n'''''''', nil)) -> MINSORT(x''', add(n'', add(n'''''''', nil)))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 18
Polynomial Ordering


Dependency Pairs:

IFMINSORT(false, add(n'', x'''), add(n'''''''', add(n'''''''''', y''''''''))) -> MINSORT(x''', add(n'', add(n'''''''', add(n'''''''''', y''''''''))))
MINSORT(add(n'''', x''''), add(n''''', add(n'''''''', y''''''))) -> IFMINSORT(eq(n'''', min(add(n'''', x''''))), add(n'''', x''''), add(n''''', add(n'''''''', y'''''')))
IFMINSORT(false, add(n'', x'''), add(n'''''''', nil)) -> MINSORT(x''', add(n'', add(n'''''''', nil)))
IFMINSORT(true, add(n''', add(m'', x'''')), add(n'''''', y'''')) -> MINSORT(app(ifrm(eq(n''', m''), n''', add(m'', x'''')), add(n'''''', y'''')), nil)
MINSORT(add(n'''', x''''), add(n''''', nil)) -> IFMINSORT(eq(n'''', min(add(n'''', x''''))), add(n'''', x''''), add(n''''', nil))
IFMINSORT(false, add(n', x'), nil) -> MINSORT(x', add(n', nil))
IFMINSORT(true, add(n'', nil), y'') -> MINSORT(y'', nil)
MINSORT(add(n', x'), nil) -> IFMINSORT(eq(n', min(add(n', x'))), add(n', x'), nil)
IFMINSORT(true, add(n'''', add(m'', x'''')), nil) -> MINSORT(app(ifrm(eq(n'''', m''), n'''', add(m'', x'''')), nil), nil)


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





The following dependency pairs can be strictly oriented:

IFMINSORT(true, add(n''', add(m'', x'''')), add(n'''''', y'''')) -> MINSORT(app(ifrm(eq(n''', m''), n''', add(m'', x'''')), add(n'''''', y'''')), nil)
IFMINSORT(true, add(n'', nil), y'') -> MINSORT(y'', nil)
IFMINSORT(true, add(n'''', add(m'', x'''')), nil) -> MINSORT(app(ifrm(eq(n'''', m''), n'''', add(m'', x'''')), nil), nil)


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(false)=  0  
  POL(if_rm(x1, x2, x3))=  x3  
  POL(true)=  0  
  POL(rm(x1, x2))=  x2  
  POL(MINSORT(x1, x2))=  x1 + x2  
  POL(if_min(x1, x2))=  0  
  POL(add(x1, x2))=  1 + x2  
  POL(IF_MINSORT(x1, x2, x3))=  x2 + x3  
  POL(eq(x1, x2))=  0  
  POL(0)=  0  
  POL(min(x1))=  0  
  POL(nil)=  0  
  POL(s(x1))=  0  
  POL(le(x1, x2))=  0  
  POL(app(x1, x2))=  x1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 19
Dependency Graph


Dependency Pairs:

IFMINSORT(false, add(n'', x'''), add(n'''''''', add(n'''''''''', y''''''''))) -> MINSORT(x''', add(n'', add(n'''''''', add(n'''''''''', y''''''''))))
MINSORT(add(n'''', x''''), add(n''''', add(n'''''''', y''''''))) -> IFMINSORT(eq(n'''', min(add(n'''', x''''))), add(n'''', x''''), add(n''''', add(n'''''''', y'''''')))
IFMINSORT(false, add(n'', x'''), add(n'''''''', nil)) -> MINSORT(x''', add(n'', add(n'''''''', nil)))
MINSORT(add(n'''', x''''), add(n''''', nil)) -> IFMINSORT(eq(n'''', min(add(n'''', x''''))), add(n'''', x''''), add(n''''', nil))
IFMINSORT(false, add(n', x'), nil) -> MINSORT(x', add(n', nil))
MINSORT(add(n', x'), nil) -> IFMINSORT(eq(n', min(add(n', x'))), add(n', x'), nil)


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





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


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 20
Polynomial Ordering


Dependency Pairs:

MINSORT(add(n'''', x''''), add(n''''', add(n'''''''', y''''''))) -> IFMINSORT(eq(n'''', min(add(n'''', x''''))), add(n'''', x''''), add(n''''', add(n'''''''', y'''''')))
IFMINSORT(false, add(n'', x'''), add(n'''''''', add(n'''''''''', y''''''''))) -> MINSORT(x''', add(n'', add(n'''''''', add(n'''''''''', y''''''''))))


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





The following dependency pair can be strictly oriented:

IFMINSORT(false, add(n'', x'''), add(n'''''''', add(n'''''''''', y''''''''))) -> MINSORT(x''', add(n'', add(n'''''''', add(n'''''''''', y''''''''))))


There are no usable rules w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(IF_MINSORT(x1, x2, x3))=  x2  
  POL(eq(x1, x2))=  0  
  POL(0)=  0  
  POL(false)=  0  
  POL(true)=  0  
  POL(min(x1))=  0  
  POL(nil)=  0  
  POL(s(x1))=  0  
  POL(MINSORT(x1, x2))=  x1  
  POL(le(x1, x2))=  0  
  POL(if_min(x1, x2))=  0  
  POL(add(x1, x2))=  1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Nar
           →DP Problem 12
Nar
             ...
               →DP Problem 21
Dependency Graph


Dependency Pair:

MINSORT(add(n'''', x''''), add(n''''', add(n'''''''', y''''''))) -> IFMINSORT(eq(n'''', min(add(n'''', x''''))), add(n'''', x''''), add(n''''', add(n'''''''', y'''''')))


Rules:


eq(0, 0) -> true
eq(0, s(x)) -> 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)
app(nil, y) -> y
app(add(n, x), y) -> add(n, app(x, y))
min(add(n, nil)) -> n
min(add(n, add(m, x))) -> ifmin(le(n, m), add(n, add(m, x)))
ifmin(true, add(n, add(m, x))) -> min(add(n, x))
ifmin(false, add(n, add(m, x))) -> min(add(m, x))
rm(n, nil) -> nil
rm(n, add(m, x)) -> ifrm(eq(n, m), n, add(m, x))
ifrm(true, n, add(m, x)) -> rm(n, x)
ifrm(false, n, add(m, x)) -> add(m, rm(n, x))
minsort(nil, nil) -> nil
minsort(add(n, x), y) -> ifminsort(eq(n, min(add(n, x))), add(n, x), y)
ifminsort(true, add(n, x), y) -> add(n, minsort(app(rm(n, x), y), nil))
ifminsort(false, add(n, x), y) -> minsort(x, add(n, y))





Using the Dependency Graph resulted in no new DP problems.

Termination of R successfully shown.
Duration:
0:01 minutes