Correctness of sorted predecessor routing #
The local routing scan is useful only after proving that its intended source really is the destination's immediate predecessor. This module isolates that order-theoretic argument. A strictly covered pair of unique keys must occupy adjacent positions in an increasing finite sequence; applying that fact to the verified Batcher output makes the guarded predecessor copy exact.
Transporting unique records through a sorting permutation #
Routing-namespace compatibility alias for the generic finite-sequence uniqueness predicate.
Equations
- Algebraic.MassProduction.Routing.UniqueIndexWhere sequence predicate = Algebraic.MassProduction.Sorting.Semantics.UniqueIndexWhere sequence predicate
Instances For
Routing-namespace compatibility alias for generic matching positions.
Equations
- Algebraic.MassProduction.Routing.matchingIndices sequence predicate = Algebraic.MassProduction.Sorting.Semantics.matchingIndices sequence predicate
Instances For
Routing-namespace compatibility alias for generic predicate reflection.
Equations
- Algebraic.MassProduction.Routing.predicateBit predicate value = Algebraic.MassProduction.Sorting.Semantics.predicateBit predicate value
Instances For
Routing-namespace compatibility theorem for unique matching positions.
Routing-namespace compatibility theorem for predicate counting.
Routing-namespace compatibility theorem for transporting a unique match through a finite-sequence permutation.
Routing-namespace compatibility theorem for transporting a unique record predicate through packed sorting.
Routing-namespace compatibility theorem for the generic sequence result.
In an increasing finite sequence, two uniquely occurring keys related by
CovBy occupy adjacent indices.
There is no lexicographic Boolean key strictly between a fixed key tagged as a source and the same key tagged as a destination.
The key used by a scatter/gather matching pass: physical key bits followed by the source/destination tag.
Equations
Instances For
The prefix consumed by the sorter is exactly the routing key with its tag appended in the final key position.
Equality of the sorter's combined key is exactly equality of the physical key and tag fields.
Standalone-record predicate used to identify one source or destination record before and after complete-record sorting.
Equations
- Algebraic.MassProduction.Routing.recordHasKeyTag key tag record = (Algebraic.MassProduction.Routing.packedRecordKey record = key ∧ Algebraic.MassProduction.Routing.packedRecordTag record = tag)
Instances For
Same routing keys tagged false and true form a covering pair in the
sorter's lexicographic key order.
A sorted array places a uniquely occurring covered source key immediately before its uniquely occurring destination key.
Once the source/destination keys are known to be adjacent, the explicit guarded scan copies the complete payload of the intended source record.
Sorting by (key, tag) and scanning predecessors routes a unique source
payload to the unique same-key destination. The source tag is false and the
destination tag is true, matching the order used by the manuscript.
End-to-end correctness of the explicit sort-and-match circuit under the unique source/destination record invariant.
Turn the router's position-level theorem into a packing-friendly API. If the unsorted input contains exactly one source and one destination with a given key, the explicit sort-and-copy circuit has a destination carrying the original source payload.