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
rm(n, nil) -> nil
ifrm(true, n, add(m, x)) -> rm(n, x)
minsort(nil, nil) -> nil

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

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`
`         ↳AFS`

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
rm(n, nil) -> nil
ifrm(true, n, add(m, x)) -> rm(n, x)
minsort(nil, nil) -> nil

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: Polynomial ordering with Polynomial interpretation:
 POL(EQ(x1, x2)) =  x1 + x2 POL(s(x1)) =  1 + x1

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`
`         ↳AFS`

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
rm(n, nil) -> nil
ifrm(true, n, add(m, x)) -> rm(n, x)
minsort(nil, nil) -> nil

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`
`         ↳AFS`

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
rm(n, nil) -> nil
ifrm(true, n, add(m, x)) -> rm(n, x)
minsort(nil, nil) -> nil

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: Polynomial ordering with Polynomial interpretation:
 POL(LE(x1, x2)) =  x1 + x2 POL(s(x1)) =  1 + x1

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`
`         ↳AFS`

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
rm(n, nil) -> nil
ifrm(true, n, add(m, x)) -> rm(n, x)
minsort(nil, nil) -> nil

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`
`         ↳AFS`

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
rm(n, nil) -> nil
ifrm(true, n, add(m, x)) -> rm(n, x)
minsort(nil, nil) -> nil

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: Polynomial ordering with Polynomial interpretation:
 POL(APP(x1, x2)) =  x1 + x2 POL(add(x1, x2)) =  1 + x1 + x2

resulting in one new DP problem.
Used Argument Filtering System:
APP(x1, x2) -> APP(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`
`         ↳AFS`

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
rm(n, nil) -> nil
ifrm(true, n, add(m, x)) -> rm(n, x)
minsort(nil, nil) -> nil

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`
`         ↳AFS`

Dependency Pairs:

IFRM(false, n, add(m, x)) -> RM(n, x)
IFRM(true, n, add(m, x)) -> RM(n, 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
rm(n, nil) -> nil
ifrm(true, n, add(m, x)) -> rm(n, x)
minsort(nil, nil) -> nil

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)

The following usable rules w.r.t. to the AFS can be oriented:

eq(0, 0) -> true
eq(0, s(x)) -> false
eq(s(x), 0) -> false
eq(s(x), s(y)) -> eq(x, y)

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

resulting in one new DP problem.
Used Argument Filtering System:
IFRM(x1, x2, x3) -> IFRM(x1, x2, x3)
RM(x1, x2) -> RM(x1, x2)
eq(x1, x2) -> eq

`   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`
`         ↳AFS`

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
rm(n, nil) -> nil
ifrm(true, n, add(m, x)) -> rm(n, x)
minsort(nil, nil) -> nil

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`
`         ↳AFS`

Dependency Pairs:

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
rm(n, nil) -> nil
ifrm(true, n, add(m, x)) -> rm(n, x)
minsort(nil, nil) -> nil

The following dependency pair can be strictly oriented:

The following usable rules w.r.t. to the AFS can be oriented:

le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)

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

resulting in one new DP problem.
Used Argument Filtering System:
MIN(x1) -> MIN(x1)
IFMIN(x1, x2) -> IFMIN(x1, x2)
le(x1, x2) -> le

`   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`
`         ↳AFS`

Dependency Pairs:

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
rm(n, nil) -> nil
ifrm(true, n, add(m, x)) -> rm(n, x)
minsort(nil, nil) -> nil

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`
`         ↳Argument Filtering and Ordering`

Dependency Pairs:

IFMINSORT(true, add(n, x), y) -> MINSORT(app(rm(n, 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
rm(n, nil) -> nil
ifrm(true, n, add(m, x)) -> rm(n, x)
minsort(nil, nil) -> nil

The following dependency pair can be strictly oriented:

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

The following usable rules w.r.t. to the AFS can be oriented:

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

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

resulting in one new DP problem.
Used Argument Filtering System:
MINSORT(x1, x2) -> MINSORT(x1, x2)
IFMINSORT(x1, x2, x3) -> IFMINSORT(x1, x2, x3)
eq(x1, x2) -> eq
app(x1, x2) -> app(x1, x2)
rm(x1, x2) -> rm(x1, x2)
ifrm(x1, x2, x3) -> ifrm(x1, x2, x3)

`   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`
`         ↳AFS`
`           →DP Problem 12`
`             ↳Argument Filtering and Ordering`

Dependency Pairs:

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
rm(n, nil) -> nil
ifrm(true, n, add(m, x)) -> rm(n, x)
minsort(nil, nil) -> nil

The following dependency pair can be strictly oriented:

There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(add(x1, x2)) =  1 + x1 + x2

resulting in one new DP problem.
Used Argument Filtering System:
MINSORT(x1, x2) -> x1
IFMINSORT(x1, x2, x3) -> 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 6`
`         ↳AFS`
`           →DP Problem 12`
`             ↳AFS`
`             ...`
`               →DP Problem 13`
`                 ↳Dependency Graph`

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
rm(n, nil) -> nil
ifrm(true, n, add(m, x)) -> rm(n, x)
minsort(nil, nil) -> nil