For finite lists, Cartesian lifting of a binary operation to lists preserves associativity. Both associations enumerate triples in the same order: the entry from xs changes slowest, then the entry from ys, then the entry from zs changes fastest. The results are respectively
and
Associativity makes corresponding entries equal; their order and multiplicity already agree. Empty lists make both sides empty. Therefore
Commutativity of the element binary operation does not remove the ordering of a list comprehension. For ordinary addition, take xs = [1,2] and ys = [10,20]. Then
The middle entries occur in opposite orders. Hence
Idempotence concerns applying an operation to the same whole value. It says more than saying that the equal-entry pairs are unchanged. Choose the idempotent binary operation min. Then
More generally, a finite list of length paired with itself produces entries, so length alone contradicts idempotence when . Therefore

Articles by others on the same topic (0)

There are currently no matching articles.