Packing canonical blocks into combined switching advice #
This module turns the ordered raw blocks extracted from a canonical DNF trace
into the finite CombinedAdvice type used by the sharp counting argument. It
proves exact correspondence with the elementary replay transcript, including
synthesized block boundaries, and obtains a replay-and-clear left inverse for
every bounded canonical path.
Convert one ordered raw block into indexed counted advice.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Restore an elementary query symbol from its relative position and bit.
Equations
- query.toQueryAdvice closesBlock = { position := query.1, closesBlock := closesBlock, difference := query.2 }
Instances For
Add the boundary convention expected by the elementary replay decoder to one raw block.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A singleton raw block receives precisely the requested boundary bit.
Expanding a counted block constructed from raw data recovers the exact elementary query list, including the chosen final boundary marker.
Re-expanding a raw block recovers its positions and differences; the chosen closing bit is deliberately forgotten.
A raw mismatch becomes exactly the nonzero-difference condition required by a continuing counted block.
Sequential elementary advice represented by a list of relative blocks. Every nonfinal block receives a closing marker; the final block does not.
Equations
- One or more equations did not get rendered due to their size.
- Algebraic.AC0.Switching.relativeBlocksToQueryList [] = []
- Algebraic.AC0.Switching.relativeBlocksToQueryList [block] = Algebraic.AC0.Switching.relativeBlockToQueryList block false
Instances For
Counted combined advice together with its exact elementary replay list.
- advice : CombinedAdvice width (List.map List.length blocks).sum
Counted advice occupying the sum of the raw block lengths.
- toQueryList : CombinedAdvice.toQueryList (List.map List.length blocks).sum self.advice = relativeBlocksToQueryList blocks
Re-expansion produces exactly the boundary-annotated raw blocks.
Instances For
Recursively package structurally valid raw blocks, retaining the exact replay-list equation as part of the construction.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Package a structurally valid list of raw blocks as counted combined advice.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Packaging raw blocks preserves their exact sequential replay advice.
A canonical raw-block sequence is empty exactly when its elementary advice transcript is empty.
Rebuilding elementary advice from canonical raw blocks gives the original transcript with its operationally irrelevant final closing marker cleared.
The same exact reconstruction while traversing one source term.
Counted combined advice extracted from a bounded canonical trace.
Equations
- trace.combinedAdvice bounded = ⋯ ▸ Algebraic.AC0.Switching.CombinedAdvice.ofRelativeBlocks trace.combinedBlocks ⋯ ⋯ ⋯ ⋯
Instances For
Listing a trace's counted combined advice recovers its elementary advice with only the final, operationally irrelevant closing marker cleared.
Reindex counted trace advice by an externally prescribed path length.
Equations
- trace.combinedAdviceOfLength bounded lengthEq = lengthEq ▸ trace.combinedAdvice bounded
Instances For
Reindexing does not change the combined replay list.
Combined advice replays exactly the original canonical path coordinates.
The combined replay-and-clear decoder is a left inverse of every valid canonical path encoding.