theorem

Theorem 11.2

Opaque-atom staging

Theorem 11.2 (Opaque-atom staging). Let a strict purely functional sequence operation, parameterized by a base element type AA, use finite constructor tests and a worst-case bounded number of car\mathsf{car}, cons\mathsf{cons}, and cdr\mathsf{cdr} operations. It may inspect the representation’s own pairs, buffers, and recursive child structures, but it may not inspect, compare, hash, traverse, or identity-test values of the base type AA. With new elements replaced by symbolic atoms, its branch and fresh structural allocation graph are determined by old structure alone. The graph is finite, acyclic, and uniformly bounded.

A symbolic element may denote a designated fresh payload record, and a fresh owner may store a fixed tuple of resulting roots. Adding those payload and owner slots to the structural skeleton forms one bounded simultaneous batch. Substitution is sound even when a payload field points back to the owner and creates a cycle.