theorem
Hex.GraphIso.Nauty.Sparse.Sort.Blocks.step
{a base : Array Nat}
{left right count done : Nat}
(h : Blocks a base left right done)
(hleft : left + count ≤ right)
(hright : right + count ≤ base.size)
(hd : done < count)
:
Blocks (a.swapIfInBounds (left + done) (right + done)) base left right (done + 1)
theorem
Hex.GraphIso.Nauty.Sparse.Sort.Cuts.left_block
{x y out : Array Nat}
{lo hi v a b d : Nat}
(h : Cuts x y lo hi v a b b d)
(hs : Blocks out x lo (b - min (a - lo) (b - a)) (min (a - lo) (b - a)))
:
After moving the equal keys from the left end, the left recursive fragment precedes that pivot block. The right half is unchanged.
The final partition has strictly smaller keys, equal pivot keys, and strictly larger keys in three consecutive intervals.