Stable binary radix sorting: mathematical specification #
The order is the unsigned order on encoded words. In particular this does not claim that sign-and-magnitude integer encodings are ordered as integers. The construction and proofs here are original; the executable native program is supplied separately.
Main definitions #
digit: one binary digit, represented as zero or one.select: the stable subsequence with a specified digit.partition: zeros followed by ones, preserving the order within each part.passes: least-significant-digit radix passes.
Main results #
partition_perm: a pass preserves the multiset.passes_correct: sufficiently many passes give a sorted permutation.
Binary digit b of unsigned word v.
Instances For
Every binary digit is below two.