What is proven, what is not. Lifetime, exhaustion, and the boundary of the check
What the proof establishes, and where it stops.
Answers. What the proof establishes, and where it stops.
1. Four properties
Four statements define what the verification has to establish for ByteStore:
- Spatial property. The offset is checked against the length of the live buffer.
- Temporal property. Missing or retired IDs are rejected.
- State preservation. A refused operation leaves the full state unchanged.
- Precise success effect. A successful write changes exactly one byte.
Only ByteStore is covered, and only in its specified form.
2. Layers of evidence
- Judging the claim uses model theorems from Post 02, simulation across the refinement from Post 03, translation checks from Post 04, and tests and sanitizers.
- The judgement also audits assumptions. The audit reads the
Print Assumptionsoutput, confirms there is noAdmitted, and restates the claim boundary. - Keep three claims separate: model proof, C++ conformance tests, and source refinement. Sections 3 and 4 cover model proof.
3. Overflow, in three steps
- Write path. Post 02’s code and spec compare offset and size directly, with no arithmetic on offsets. The formal write spec requires a representable offset. The library contract requires a representable buffer length. Under those stated assumptions, the checked refinement in Post 04 covers the write.
- Allocation counter. Post 02’s spec constrains allocation to fail closed before increment or wrap. The counter is checked against the limit before it increments. Post 03’s model proves exhaustion.
- Boundary. The C++ allocation path sits outside the write refinement. The counter guarantee rests on the spec constraint and the model. The checked C++ refinement covers the write path only.
On the paths these steps cover, overflow does not occur.
4. Lifetime and exhaustion
One write decides the spatial property. Compare the offset with the length of the live buffer. No single operation decides the temporal property. Whether an identity is still valid depends on the whole history of allocations and releases behind it.
Two results close the temporal half at the model level, for the implementation-shaped model of Post 03:
- Lifetime. Once an identity is released, it stays invalid under any later sequence of model operations. Reads through it return nothing. Writes through it are rejected. A second release is rejected. Each rejected operation leaves the state unchanged.
- Exhaustion. Once allocation reaches the identity limit, no later operation restores it. Releasing a buffer frees the buffer. It does not recycle the identity.
Both results are Rocq theorems, and their Print Assumptions reports are closed under the global context. The allocate and release paths of the C++ code sit outside the checked refinement of Post 04. The temporal half is proven for the model and stated for the code. The code itself sits outside the check.
Sources: SPEC.md.