CLRS Section 20.1 - van Emde Boas universe decomposition
This section isolates the arithmetic used by van Emde Boas trees: split a key
into a high cluster index and a low position, then reconstruct the original key.
The first-pass model uses an explicit cluster side length m.
Main results:
Theorem VEB.index_high_low: reconstructing from high and
low returns the original key.
Theorems VEB.high_index and VEB.low_index: a bounded low
component can be recovered after recombining a cluster index and offset.
Theorem VEB.index_lt: bounded cluster and offset components recombine
to a key inside the square universe.
Theorem VEB.high_lt: if a key is below m * m, its high part is
below m.
Theorem VEB.low_lt: for positive m, the low part is below
m.
namespaceCLRSnamespaceChapter20namespaceVEB
High cluster index for side length m.
defhigh(mx:Nat):Nat:=x/m
Low offset inside a cluster for side length m.
deflow(mx:Nat):Nat:=x%m
Recombine a high cluster and low offset for side length m.
defindex(mhilo:Nat):Nat:=m*hi+lo
Splitting a key into high/low parts and recombining returns the key.