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
Overlay and local confluence Check



The TRS is overlay and locally confluent (all critical pairs are trivially joinable).Hence, we can switch to innermost.


   R
OC
       →TRS2
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
OC
       →TRS2
DPs
           →DP Problem 1
Non Termination


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


Strategy:

innermost




Found an infinite P-chain over R:
P =

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(x, ap(f, x)), ap(ap(cons, x), nil))

R =

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

s = AP(ap(ap(f, foldr), foldr), ap(ap(ap(foldr, ap(f, foldr)), ap(ap(cons, foldr), nil)), nil))
evaluates to t =AP(ap(ap(f, foldr), foldr), ap(ap(ap(foldr, ap(f, foldr)), ap(ap(cons, foldr), nil)), nil))

Thus, s starts an infinite chain.

Non-Termination of R could be shown.
Duration:
0:02 minutes