Alphabet

app:[list × list] ⟶ list
nil:list
cons:[nat × list] ⟶ list
foldl:[list → nat → list × list × list] ⟶ list
reverse:[list] ⟶ list
reverse1:[list] ⟶ list
iconsc:list → nat → list

Variables

x:nat
y:nat
F:list → nat → list
xs:list
ys:list

Rules

app(nil, xs)xs
app(cons(x, xs), ys)cons(x, app(xs, ys))
foldl(F, xs, nil)xs
foldl(F, xs, cons(y, ys))foldl(F, F · xs · y, ys)
iconscλxs:list.λx:nat.cons(x, xs)
reverse(xs)foldl(iconsc, nil, xs)
reverse1(xs)foldllx:list.λx:nat.app(cons(x, nil), lx), nil, xs)