Holonomy-Bounded
A production-quality Rust implementation of the Bounded Drift Theorem for Eisenstein lattice snap operations.
Theorem
For a closed cycle of n Eisenstein snap operations, each with error
bounded by ε, the total holonomy (drift) satisfies:
holonomy ≤ n · ε
This bound is tight for worst-case adversarial errors (tightness ~ 1.0
for small n), but for random errors the typical drift scales as
O(√n · ε).
Eisenstein Lattice
The Eisenstein lattice ℤ[ω] consists of points a + bω where
ω = e^(2πi/3) = (-1 + i√3)/2. The lattice has 6-fold rotational symmetry
and forms a regular hexagonal tiling of the complex plane.
The Voronoi cell of each lattice point is a regular hexagon with:
- Inradius: 0.5 (distance from center to edge midpoint)
- Circumradius:
1/√3 ≈ 0.57735(distance from center to vertex)
Usage
use BoundedDrift;
// Create a float-64 bounded drift tracker with epsilon=0.5
let mut bd = new;
// Walk a closed hexagon (6 steps that sum to zero on the lattice)
let cycle = ;
for &idx in &cycle
// After a closed cycle, holonomy is bounded by n*epsilon = 6*0.5 = 3.0
let holonomy = bd.holonomy;
assert!;