Again use structural induction on the finite list. At [], both the right fold and the left fold return the seed . If they agree on zs, then
The third line uses part (a); the fourth uses equation (2). Thus the left-right fold equivalence is
This is a statement about values on finite, total inputs. It does not assert equal evaluation costs or equal behaviour on infinite lists.

Articles by others on the same topic (0)

There are currently no matching articles.