Finite block-end decoding #
The rich RPF leaf records a finite (weakly ordered) list of block endpoints. This file supplies the one semantic operation the interpolation layer needs: for every surviving unit step, choose the first endpoint strictly to its right. Repeated endpoints are intentional -- they represent zero-length blocks -- and are skipped by the selector.
The small FiniteBlockEnds interface keeps list bookkeeping out of the
closed-face soundness proof. The lowerer/checker bridge proves its three
displayed facts from a concrete RPF block list.
A finite, weakly ordered endpoint list ending at L.
cover is deliberately bounded by ends.length: although endAt has the
convenient default L out of bounds, no phantom block may be selected.
The nonempty, weakly ordered list of block endpoints ending at
L, covering every unit step belowL.
Instances For
A nonempty weakly ordered list whose final endpoint is L automatically
covers every unit step below L: the final block is always a possible owner.
This is the form produced directly by the W1 checks of a rich row leaf.
Equations
- MarkedGraphs.Certificate.FiniteBlockEnds.ofOrderedLast ends hNonempty hLast hOrdered = { ends := ends, nonempty := hNonempty, last := hLast, ordered := hOrdered, cover := ⋯ }
Instances For
The endpoint at a block index, defaulting to the total length.
Instances For
The first (finite) block ending strictly after k; its arbitrary value
outside [0,L) is never used by the interpolation interface.
Instances For
Every actual listed endpoint lies at or before the total path length.
If the endpoint of block s is strictly beyond the tail, every endpoint
at the tail occurs strictly before s. This remains valid when earlier
blocks have length zero and hence have repeated endpoints.
Dually, if the endpoint of block s is strictly before the head, every
endpoint at the total length occurs strictly after s. Repeated endpoints
at the head are therefore an allowed suffix, never an interior run.
Once the endpoint of a block lies at or before a surviving step, the first-endpoint selector must have moved strictly past that block. This is the basic boundary fact used to turn a selector change into a run of coincident finite endpoints.
Conversely, every block strictly before the selected one has already
ended. Together with lt_blockAt_of_endAt_le, this characterizes the
selector by the endpoint inequalities, including repeated (zero-length)
endpoints.
When the selector changes between adjacent surviving steps, every listed endpoint from the old selected block through the block immediately before the new selection is exactly their common boundary. This is the finite ``collapsed run'' decoded by W4.
The first-endpoint selector is monotone along a slot. Thus two adjacent surviving steps either belong to the same canonical interpolator or form the forward collapsed-boundary situation handled by W4.
Any nonempty block interval has a unique owner: the first endpoint to its
right is exactly that block. This is the PiecewiseData.ownsInterval law.
The nonempty block intervals partition the surviving unit steps. This is stated for integer-valued functions because it is used to concatenate the canonical interpolation slopes.
Concatenating the canonical interpolation on the selected blocks realizes the sum of the rises of exactly the nonempty blocks. Repeated endpoints represent zero-length blocks and therefore contribute zero independently of their (irrelevant) stored rise.
W2 makes the rise of an empty block zero. Under exactly that condition, the nonempty-block sum used by canonical interpolation is the full declared rise sum.
The canonical selected slopes realize every declared rise once W2 has discharged the zero-length blocks.
Decode one finite endpoint list per slot into the selector portion of a
PiecewiseData. Endpoint rises and the endpoint balance are supplied by the
rich leaf separately.
Equations
- One or more equations did not get rendered due to their size.