APL's Boolean Scans Hide Symmetries That Cut Implementation Work

Symmetries in Boolean Scan

APL has ten boolean primitives, each needing a fast scan implementation. The author shows that three scan composition rules—pre-processing, post-processing with an inverse, and both—relate these primitives through negation. A truth-table analysis reveals that and, less-than, and not-equal cover all cases, so fast implementations of just these three can derive the rest, reducing labor and code size.

We can see that the set ∧, <, ≠ covers all columns at least once, therefore if we provide fast implementations of each of these, we can derive decent implementations of the others by just applying these symmetries.

More from this day

2026-10-16