Term Rewriting System R:
[x, y, n, m]
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)
quicksort(nil) -> nil

Termination of R to be shown.

`   R`
`     ↳Dependency Pair Analysis`

R contains the following Dependency Pairs:

MINUS(s(x), s(y)) -> MINUS(x, y)
QUOT(s(x), s(y)) -> QUOT(minus(x, y), s(y))
QUOT(s(x), s(y)) -> MINUS(x, y)
LE(s(x), s(y)) -> LE(x, y)
APP(add(n, x), y) -> APP(x, y)
LOW(n, add(m, x)) -> LE(m, n)
IFLOW(true, n, add(m, x)) -> LOW(n, x)
IFLOW(false, n, add(m, x)) -> LOW(n, x)
HIGH(n, add(m, x)) -> LE(m, n)
IFHIGH(true, n, add(m, x)) -> HIGH(n, x)
IFHIGH(false, n, add(m, x)) -> HIGH(n, x)

Furthermore, R contains seven 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`
`       →DP Problem 7`
`         ↳AFS`

Dependency Pair:

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

Rules:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)
quicksort(nil) -> nil

The following dependency pair can be strictly oriented:

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

There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
MINUS(x1, x2) -> MINUS(x1, x2)
s(x1) -> s(x1)

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`           →DP Problem 8`
`             ↳Dependency Graph`
`       →DP Problem 2`
`         ↳AFS`
`       →DP Problem 3`
`         ↳AFS`
`       →DP Problem 4`
`         ↳AFS`
`       →DP Problem 5`
`         ↳AFS`
`       →DP Problem 6`
`         ↳AFS`
`       →DP Problem 7`
`         ↳AFS`

Dependency Pair:

Rules:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)
quicksort(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`
`       →DP Problem 7`
`         ↳AFS`

Dependency Pair:

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

Rules:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)
quicksort(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: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

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 9`
`             ↳Dependency Graph`
`       →DP Problem 3`
`         ↳AFS`
`       →DP Problem 4`
`         ↳AFS`
`       →DP Problem 5`
`         ↳AFS`
`       →DP Problem 6`
`         ↳AFS`
`       →DP Problem 7`
`         ↳AFS`

Dependency Pair:

Rules:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)
quicksort(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`
`       →DP Problem 7`
`         ↳AFS`

Dependency Pair:

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

Rules:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)
quicksort(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: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

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 10`
`             ↳Dependency Graph`
`       →DP Problem 4`
`         ↳AFS`
`       →DP Problem 5`
`         ↳AFS`
`       →DP Problem 6`
`         ↳AFS`
`       →DP Problem 7`
`         ↳AFS`

Dependency Pair:

Rules:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)
quicksort(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`
`       →DP Problem 7`
`         ↳AFS`

Dependency Pair:

QUOT(s(x), s(y)) -> QUOT(minus(x, y), s(y))

Rules:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)
quicksort(nil) -> nil

The following dependency pair can be strictly oriented:

QUOT(s(x), s(y)) -> QUOT(minus(x, y), s(y))

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

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)

Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
QUOT(x1, x2) -> QUOT(x1, x2)
s(x1) -> s(x1)
minus(x1, x2) -> x1

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳AFS`
`       →DP Problem 3`
`         ↳AFS`
`       →DP Problem 4`
`         ↳AFS`
`           →DP Problem 11`
`             ↳Dependency Graph`
`       →DP Problem 5`
`         ↳AFS`
`       →DP Problem 6`
`         ↳AFS`
`       →DP Problem 7`
`         ↳AFS`

Dependency Pair:

Rules:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)
quicksort(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`
`       →DP Problem 7`
`         ↳AFS`

Dependency Pairs:

IFLOW(false, n, add(m, x)) -> LOW(n, x)
IFLOW(true, n, add(m, x)) -> LOW(n, x)

Rules:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)
quicksort(nil) -> nil

The following dependency pairs can be strictly oriented:

IFLOW(false, n, add(m, x)) -> LOW(n, x)
IFLOW(true, n, add(m, x)) -> LOW(n, x)

There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
{IFLOW, LOW}

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

Dependency Pair:

Rules:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)
quicksort(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`
`       →DP Problem 7`
`         ↳AFS`

Dependency Pairs:

IFHIGH(false, n, add(m, x)) -> HIGH(n, x)
IFHIGH(true, n, add(m, x)) -> HIGH(n, x)

Rules:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)
quicksort(nil) -> nil

The following dependency pairs can be strictly oriented:

IFHIGH(false, n, add(m, x)) -> HIGH(n, x)
IFHIGH(true, n, add(m, x)) -> HIGH(n, x)

There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

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

Dependency Pair:

Rules:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)
quicksort(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`
`         ↳AFS`
`       →DP Problem 7`
`         ↳Argument Filtering and Ordering`

Dependency Pairs:

Rules:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)
quicksort(nil) -> nil

The following dependency pairs can be strictly oriented:

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

ifhigh(true, n, add(m, x)) -> high(n, x)
high(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
low(n, nil) -> nil

Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
QUICKSORT(x1) -> QUICKSORT(x1)
high(x1, x2) -> x2
low(x1, x2) -> x2
ifhigh(x1, x2, x3) -> x3
iflow(x1, x2, x3) -> 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 7`
`         ↳AFS`
`           →DP Problem 14`
`             ↳Dependency Graph`

Dependency Pair:

Rules:

minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(minus(x, y), s(y)))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
app(nil, y) -> y
low(n, nil) -> nil
iflow(false, n, add(m, x)) -> low(n, x)
high(n, nil) -> nil
ifhigh(true, n, add(m, x)) -> high(n, x)