Binary Name Dictionary Construction
Abstract
Occurrence-driven construction writes the rightmost-deduplicated dictionary.
Theorem 1.1 (Actual lookup, insertion and a quadratic charged clock).
Proof. Machine-checked in Lean as D5/S0/Computability/BinaryNameDeduplication.dictionary_build_run (✓ std3). ∎
Source. Repository-derived.
Commentary.
For every list of binary names, the eleven-stack machine scans its serialized occurrences in reverse order. It extracts each whole name with real pops and invokes the included finite dictionary-lookup program. The resulting membership flag selects an actual discard or insertion branch.
Every unseen name is written to the head of the dictionary in escaped reversed spelling; the dimension stack receives one true symbol. The final dictionary equals the pinned rightmost-occurrence deduplication of the original list. All comparison backups, candidates, history, index and occurrence stacks are empty at return. The arbitrary caller frame and dimension suffix are preserved.
The clock is at most twenty times (serialized occurrence length plus one) squared. It charges extraction, comparison, operand and dictionary restoration, index draining and insertion. This routine does not yet parse arbitrary conventional clause words or relabel their literals.
References
- Truth anchor:
D5/S0/Computability/BinaryNameDeduplication.dictionary_build_run - Dependency: D5/S0/Computability/BinaryNameDictionary