let R be the TRS under consideration

ap(ap(ap(foldr,_1),_2),ap(ap(cons,_3),_4)) -> ap(ap(_1,_3),ap(ap(ap(foldr,_1),_2),_4)) is in elim_R(R)
let r0 be the right-hand side of this rule
p0 = 1 is a position in r0
we have r0|p0 = ap(ap(ap(foldr,_1),_2),_4)
ap(ap(ap(foldr,_5),_6),nil) -> _6 is in R
let l'0 be the left-hand side of this rule
theta0 = {_1/_5, _2/_6, _4/nil} is a mgu of r0|p0 and l'0

==> ap(ap(ap(foldr,_1),_2),ap(ap(cons,_3),nil)) -> ap(ap(_1,_3),_2) is in EU_R^1
let r1 be the right-hand side of this rule
p1 = 0 is a position in r1
we have r1|p1 = ap(_1,_3)
ap(ap(f,_4),_4) -> ap(ap(_4,ap(f,_4)),ap(ap(cons,_4),nil)) is in R
let l'1 be the left-hand side of this rule
theta1 = {_1/ap(f,_4), _3/_4} is a mgu of r1|p1 and l'1

==> ap(ap(ap(foldr,ap(f,_1)),_2),ap(ap(cons,_1),nil)) -> ap(ap(ap(_1,ap(f,_1)),ap(ap(cons,_1),nil)),_2) is in EU_R^2
let l be the left-hand side and r be the right-hand side of this rule
let p = epsilon
let theta = {_1/foldr, _2/ap(ap(cons,foldr),nil)}
let theta' = {}
we have r|p = ap(ap(ap(_1,ap(f,_1)),ap(ap(cons,_1),nil)),_2) and
theta'(theta(l)) = theta(r|p)
so, theta(l) = ap(ap(ap(foldr,ap(f,foldr)),ap(ap(cons,foldr),nil)),ap(ap(cons,foldr),nil)) is non-terminating w.r.t. R

Termination disproved by the forward process
proof stopped at iteration i=2, depth k=4
6 rule(s) generated