Finite specifications for the native distinct-position frontend #
The mathematical sets are the existing ThreeSum.splitA, ThreeSum.splitB,
ThreeSum.twiceSet and ThreeSum.zeroSet. Native keys remain in unsigned encoding order.
The specifications here describe compact subsequences of the radix key/count arrays.
Main definitions #
label: compute the shifted label from a canonical signed key.twice: the canonical key of twice the represented integer.select: compact selections from full key/count pairs.
Main results #
label_encode: native label arithmetic agrees with the existing mathematical label.twice_encode: doubling has the required positive sign.
Shift a sign-and-magnitude key into the nonnegative label interval.
Instances For
The canonical key for twice the integer represented by a canonical key.
Instances For
Key transformation after selection; only the repeated-nonzero mode doubles values.
Instances For
The transient unsigned double is corrected by its low sign bit.
Label arithmetic and the transient double stay within a common explicit bound.
The unsigned transformation is injective, even before restricting to canonical keys.
Every output value transformation preserves injectivity.
The supplied radix contracts identify every run with its exact input multiplicity.
A compact native selection represents precisely its finite filtered image.
Original input values are precisely the image of its positions.
Zero has exactly one canonical key.
Exact bridge from the repeated-nonzero native scan to the existing twiceSet.
The original-set scan preserves every distinct input value.
The zero scan uses the full original multiplicity and threshold three.
The A scan represents the exact existing bit split.
Both B scans represent the exact existing two-bit split, including β=β'.