A one-command determinism receipt for a tested module: the sheaf
(connection) Laplacian. The output below was produced by an actual seeded run
(numpy default_rng(0) / default_rng(2)), is bit-for-bit identical across
repeated runs, and matches the invariants asserted in
tests/test_sheaf_laplacian.py (the general, non-orthogonal case).
- Python 3.10, 3.11, or 3.12 (not 3.13+; the
numpy<2.0/scipy<1.14pins required by geomstats have no wheels there -- see LIMITATIONS.md). - Pins used to produce the receipt below:
numpy 1.26.4,scipy 1.13.1,geomstats 2.8.0(resolved by the constraints inpyproject.toml).
git clone https://github.com/smaniches/GROUPOID.git
cd GROUPOID
pip install -e ".[dev]"pip install -e ".[dev]" # one-time, if not already installed
python scripts/reproduce_sheaf_laplacian.pygroupoid logs at DEBUG by default. To see only the receipt, set the log
level (the receipt itself prints on stdout regardless):
# Linux / macOS
LOGURU_LEVEL=WARNING python scripts/reproduce_sheaf_laplacian.py
# Windows PowerShell
$env:LOGURU_LEVEL="WARNING"; python scripts/reproduce_sheaf_laplacian.pyseed : 0
graph : nodes=['A', 'B', 'C', 'D'] edges=[('A', 'B'), ('A', 'C'), ('B', 'D'), ('C', 'D')]
stalk_dim : 3
L shape : (12, 12)
max|L - deltaT_delta| : 4.441e-16 (expect < 1e-12)
max|L - L^T| (symmetry) : 0.000e+00 (expect < 1e-12)
min eigenvalue (PSD) : 2.813e-02 (expect >= -1e-9)
||L @ consistent_section|| : 6.189e-16 (expect < 1e-9, in kernel)
||L @ constant_section|| : 3.368e+00 (expect > 1e-3, NOT in kernel)
dim ker(L) : 3 (expect == stalk_dim = 3)
RESULT: sheaf-Laplacian invariants hold (deltaT-delta, PSD, kernel).
The floating-point residuals (4.441e-16, 6.189e-16) are at machine epsilon
and may differ in the last digit on a different BLAS/CPU; the bracketed
tolerances (< 1e-12, < 1e-9, > 1e-3, == 3) are the contract and hold
across platforms. The integer dim ker(L) = 3 and min eigenvalue sign are
exact invariants, not approximations.
L == delta^T deltaagainst an independently constructed coboundarydelta(not reusing the builder's block formula).Lis symmetric and positive-semidefinite (min eigenvalue >= 0).- For orthogonal transport
R_uv = g_v g_u^{-1}, transport-consistent global sections lie inker(L), constant sections do not, anddim ker(L)equals the stalk dimension (no spurious kernel).
To run the full property-based test suite (Hypothesis, 500 examples per property) instead of this single receipt:
pytest tests/ -v