Linked lists as mathematical source values #
The default list representation observes an optional typed node reference at the actual heap. Nil has no node; a cons node stores one head and the actual shared tail. Distinct roots and heap layouts may represent the same list, so this relation is deliberately not a pure encoding or an equivalence of types.
The operation rules reuse the existing heap operations and contents proofs.
They do not introduce a second list implementation or an executable decoder.
Representation.bufferList remains an explicit mathematical view of contiguous
storage, separate from this linked representation.
Ordinary lists represented by real immutable nodes with shared tails.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Every nonempty represented list has an existing root. This does not claim that every existing object identifier denotes a correctly typed list.
Actual uncons follows ordinary list cases and returns the identical shared tail, not a copied suffix or a mathematical value substituted for a runtime read.
Preserving existing immutable nodes preserves every represented list, including shared tails, even when mutable buffers change.
Prefix reclamation keeps a represented list when its root survives and the actual node links point backwards. The whole tail chain is retained.