Term Rewriting System R:
[k, l, x, y]
app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, nil)

Termination of R to be shown.

`   R`
`     ↳Dependency Pair Analysis`

R contains the following Dependency Pairs:

APP(cons(x, l), k) -> APP(l, k)
SUM(cons(x, cons(y, l))) -> SUM(cons(plus(x, y), l))
SUM(cons(x, cons(y, l))) -> PLUS(x, y)
SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(x, cons(y, k)))))
SUM(app(l, cons(x, cons(y, k)))) -> APP(l, sum(cons(x, cons(y, k))))
SUM(app(l, cons(x, cons(y, k)))) -> SUM(cons(x, cons(y, k)))
SUM(plus(cons(0, x), cons(y, l))) -> PRED(sum(cons(s(x), cons(y, l))))
SUM(plus(cons(0, x), cons(y, l))) -> SUM(cons(s(x), cons(y, l)))
PLUS(s(x), y) -> PLUS(x, y)

Furthermore, R contains four SCCs.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Argument Filtering and Ordering`
`       →DP Problem 2`
`         ↳AFS`
`       →DP Problem 3`
`         ↳AFS`
`       →DP Problem 4`
`         ↳Nar`

Dependency Pair:

APP(cons(x, l), k) -> APP(l, k)

Rules:

app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, nil)

The following dependency pair can be strictly oriented:

APP(cons(x, l), k) -> APP(l, k)

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)
cons(x1, x2) -> cons(x1, x2)

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`           →DP Problem 5`
`             ↳Dependency Graph`
`       →DP Problem 2`
`         ↳AFS`
`       →DP Problem 3`
`         ↳AFS`
`       →DP Problem 4`
`         ↳Nar`

Dependency Pair:

Rules:

app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, 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`
`         ↳Nar`

Dependency Pair:

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

Rules:

app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, nil)

The following dependency pair can be strictly oriented:

PLUS(s(x), y) -> PLUS(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:
PLUS(x1, x2) -> PLUS(x1, x2)
s(x1) -> s(x1)

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳AFS`
`           →DP Problem 6`
`             ↳Dependency Graph`
`       →DP Problem 3`
`         ↳AFS`
`       →DP Problem 4`
`         ↳Nar`

Dependency Pair:

Rules:

app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, 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`
`         ↳Nar`

Dependency Pair:

SUM(cons(x, cons(y, l))) -> SUM(cons(plus(x, y), l))

Rules:

app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, nil)

The following dependency pair can be strictly oriented:

SUM(cons(x, cons(y, l))) -> SUM(cons(plus(x, y), l))

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

plus(0, y) -> y
plus(s(x), y) -> s(plus(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:
SUM(x1) -> SUM(x1)
cons(x1, x2) -> cons(x1, x2)
plus(x1, x2) -> x2
s(x1) -> x1

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳AFS`
`       →DP Problem 3`
`         ↳AFS`
`           →DP Problem 7`
`             ↳Dependency Graph`
`       →DP Problem 4`
`         ↳Nar`

Dependency Pair:

Rules:

app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, 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`
`         ↳Narrowing Transformation`

Dependency Pair:

SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(x, cons(y, k)))))

Rules:

app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, nil)

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

SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(x, cons(y, k)))))
three new Dependency Pairs are created:

SUM(app(nil, cons(x', cons(y', k'')))) -> SUM(sum(cons(x', cons(y', k''))))
SUM(app(cons(x'', l''), cons(x0, cons(y', k'')))) -> SUM(cons(x'', app(l'', sum(cons(x0, cons(y', k''))))))
SUM(app(l, cons(x'', cons(y'', k')))) -> SUM(app(l, sum(cons(plus(x'', y''), k'))))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳AFS`
`       →DP Problem 3`
`         ↳AFS`
`       →DP Problem 4`
`         ↳Nar`
`           →DP Problem 8`
`             ↳Argument Filtering and Ordering`

Dependency Pairs:

SUM(app(l, cons(x'', cons(y'', k')))) -> SUM(app(l, sum(cons(plus(x'', y''), k'))))
SUM(app(nil, cons(x', cons(y', k'')))) -> SUM(sum(cons(x', cons(y', k''))))

Rules:

app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, nil)

The following dependency pair can be strictly oriented:

SUM(app(nil, cons(x', cons(y', k'')))) -> SUM(sum(cons(x', cons(y', k''))))

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

sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
pred(cons(s(x), nil)) -> cons(x, nil)

Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
plus > pred

resulting in one new DP problem.
Used Argument Filtering System:
SUM(x1) -> SUM(x1)
app(x1, x2) -> app(x1, x2)
cons(x1, x2) -> x2
sum(x1) -> x1
plus(x1, x2) -> plus(x1, x2)
pred(x1) -> pred(x1)

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳AFS`
`       →DP Problem 3`
`         ↳AFS`
`       →DP Problem 4`
`         ↳Nar`
`           →DP Problem 8`
`             ↳AFS`
`             ...`
`               →DP Problem 9`
`                 ↳Argument Filtering and Ordering`

Dependency Pair:

SUM(app(l, cons(x'', cons(y'', k')))) -> SUM(app(l, sum(cons(plus(x'', y''), k'))))

Rules:

app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, nil)

The following dependency pair can be strictly oriented:

SUM(app(l, cons(x'', cons(y'', k')))) -> SUM(app(l, sum(cons(plus(x'', y''), k'))))

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

sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
pred(cons(s(x), nil)) -> cons(x, nil)

Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
app > cons
plus > pred
plus > cons

resulting in one new DP problem.
Used Argument Filtering System:
SUM(x1) -> SUM(x1)
app(x1, x2) -> app(x1, x2)
cons(x1, x2) -> cons(x2)
sum(x1) -> x1
plus(x1, x2) -> plus(x1, x2)
pred(x1) -> pred(x1)

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳AFS`
`       →DP Problem 3`
`         ↳AFS`
`       →DP Problem 4`
`         ↳Nar`
`           →DP Problem 8`
`             ↳AFS`
`             ...`
`               →DP Problem 10`
`                 ↳Dependency Graph`

Dependency Pair:

Rules:

app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, nil)

Using the Dependency Graph resulted in no new DP problems.

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