Term Rewriting System R:
[x, g, h, xs]
ap(ap(f, x), x) -> ap(ap(x, ap(f, x)), ap(ap(cons, x), nil))
ap(ap(ap(foldr, g), h), nil) -> h
ap(ap(ap(foldr, g), h), ap(ap(cons, x), xs)) -> ap(ap(g, x), ap(ap(ap(foldr, g), h), xs))

Termination of R to be shown.

`   R`
`     ↳Dependency Pair Analysis`

R contains the following Dependency Pairs:

AP(ap(f, x), x) -> AP(ap(x, ap(f, x)), ap(ap(cons, x), nil))
AP(ap(f, x), x) -> AP(x, ap(f, x))
AP(ap(f, x), x) -> AP(ap(cons, x), nil)
AP(ap(f, x), x) -> AP(cons, x)
AP(ap(ap(foldr, g), h), ap(ap(cons, x), xs)) -> AP(ap(g, x), ap(ap(ap(foldr, g), h), xs))
AP(ap(ap(foldr, g), h), ap(ap(cons, x), xs)) -> AP(g, x)
AP(ap(ap(foldr, g), h), ap(ap(cons, x), xs)) -> AP(ap(ap(foldr, g), h), xs)

Furthermore, R contains one SCC.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Narrowing Transformation`

Dependency Pairs:

AP(ap(ap(foldr, g), h), ap(ap(cons, x), xs)) -> AP(ap(ap(foldr, g), h), xs)
AP(ap(ap(foldr, g), h), ap(ap(cons, x), xs)) -> AP(g, x)
AP(ap(ap(foldr, g), h), ap(ap(cons, x), xs)) -> AP(ap(g, x), ap(ap(ap(foldr, g), h), xs))
AP(ap(f, x), x) -> AP(ap(cons, x), nil)
AP(ap(f, x), x) -> AP(x, ap(f, x))
AP(ap(f, x), x) -> AP(ap(x, ap(f, x)), ap(ap(cons, x), nil))

Rules:

ap(ap(f, x), x) -> ap(ap(x, ap(f, x)), ap(ap(cons, x), nil))
ap(ap(ap(foldr, g), h), nil) -> h
ap(ap(ap(foldr, g), h), ap(ap(cons, x), xs)) -> ap(ap(g, x), ap(ap(ap(foldr, g), h), xs))

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

AP(ap(f, x), x) -> AP(ap(cons, x), nil)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Remaining Obligation(s)`

The following remains to be proven:
Dependency Pairs:

AP(ap(ap(foldr, g), h), ap(ap(cons, x), xs)) -> AP(g, x)
AP(ap(ap(foldr, g), h), ap(ap(cons, x), xs)) -> AP(ap(g, x), ap(ap(ap(foldr, g), h), xs))
AP(ap(f, x), x) -> AP(x, ap(f, x))
AP(ap(f, x), x) -> AP(ap(x, ap(f, x)), ap(ap(cons, x), nil))
AP(ap(ap(foldr, g), h), ap(ap(cons, x), xs)) -> AP(ap(ap(foldr, g), h), xs)

Rules:

ap(ap(f, x), x) -> ap(ap(x, ap(f, x)), ap(ap(cons, x), nil))
ap(ap(ap(foldr, g), h), nil) -> h
ap(ap(ap(foldr, g), h), ap(ap(cons, x), xs)) -> ap(ap(g, x), ap(ap(ap(foldr, g), h), xs))

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