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
Argument Filtering and Ordering
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Remaining


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 AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
EQ(x1, x2) -> EQ(x1, x2)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 7
Dependency Graph
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Remaining


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
AFS
       →DP Problem 2
Argument Filtering and Ordering
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Remaining


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 AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
LE(x1, x2) -> LE(x1, x2)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
           →DP Problem 8
Dependency Graph
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Remaining


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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Argument Filtering and Ordering
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Remaining


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 AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
APP(x1, x2) -> APP(x1, x2)
add(x1, x2) -> add(x1, x2)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
           →DP Problem 9
Dependency Graph
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Remaining


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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
Argument Filtering and Ordering
       →DP Problem 5
AFS
       →DP Problem 6
Remaining


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 AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
IFRM(x1, x2, x3) -> x3
add(x1, x2) -> add(x1, x2)
RM(x1, x2) -> x2


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
           →DP Problem 10
Dependency Graph
       →DP Problem 5
AFS
       →DP Problem 6
Remaining


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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
Argument Filtering and Ordering
       →DP Problem 6
Remaining


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 AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
MIN(x1) -> x1
add(x1, x2) -> add(x1, x2)
IFMIN(x1, x2) -> x2


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
           →DP Problem 11
Dependency Graph
       →DP Problem 6
Remaining


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
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
       →DP Problem 5
AFS
       →DP Problem 6
Remaining Obligation(s)




The following remains to be proven:
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))




Termination of R could not be shown.
Duration:
0:00 minutes