holonomy-bounded 0.1.0

Bounded Drift Theorem implementation for Eisenstein lattice snap operations
Documentation
  • Coverage
  • 100%
    38 out of 38 items documented2 out of 30 items with examples
  • Size
  • Source code size: 30.26 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 579.04 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • SuperInstance/holonomy-bounded
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SuperInstance

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 holonomy_bounded::BoundedDrift;

// Create a float-64 bounded drift tracker with epsilon=0.5
let mut bd = BoundedDrift::<f64>::new(0.5);

// Walk a closed hexagon (6 steps that sum to zero on the lattice)
let cycle = [0, 1, 2, 3, 4, 5];
for &idx in &cycle { bd.step(idx); }

// After a closed cycle, holonomy is bounded by n*epsilon = 6*0.5 = 3.0
let holonomy = bd.holonomy();
assert!(holonomy <= bd.bound(), "hol={} > bound={}", holonomy, bd.bound());