Period formulas for one-dimensional cut-and-project gap sequences, with explicit rational-slope formulas and the complementary irrational aperiodicity statement formalized in Lean 4.
For coprime
After projecting orthogonally onto
With
counting projected points with multiplicity gives
while discarding multiplicities gives
In every case
For positive irrational slope and window parameter
LaTeX/rational_cut_and_project_gap_periods.tex— main paper (statements, proofs, related-literature discussion, and Lean correspondence in Table 1).
The three-gap (Steinhaus) theorem — that the gaps of
The mathematical core is formalized in
Lean/CutAndProject/CutAndProject/ across two files, totaling
~3,760 lines with no sorry, admit, or axiom:
-
Basic.lean(~2,862 lines) — both period theorems for the rational case (multiset and set conventions). -
Irrational.lean(~896 lines) — Proposition 1 of the paper: for positive irrational slope and window parameter$\omega > 0$ , the projected gap sequence has no finite period.
The headline theorems for the rational, geometric enumeration are:
main_theorem_geometric_concrete— multiset period.set_main_theorem_geometric_concrete— set period.
Both thread the geometric residue map
The proof has two layers.
Layer 1: The strip geometry and projection are reduced to a
discrete enumeration of
Layer 2: Starting from the residue model, Lean
proves coprimality, residue distribution (uniform and non-uniform),
the cyclic-interval structure, the trivial stabilizer lemma, generic
minimality, the degenerate case, and the case dispatch — for both the
multiset and set conventions. The geometric multiplier is threaded
through via the GeometricProjection typeclass; the concrete instance
GeometricProjectionConcrete discharges its four axioms. The
set-valued enumeration mirrors the multiset construction with
multiplicities flattened to
The rational period formula is classical; the contribution here is the machine-checked formalization. The number-theoretic core (no cut-and-project semantics) largely overlaps with existing Mathlib:
- Per-class residue count.
count_hits D r0 N x(Basic.lean, sectionResidueDistribution) counts how many ofNconsecutive integers fall in residue classxmodD. This is exactlyNat.Ico_filter_modEq_card, and its closed value⌊N/D⌋ + [v % D < N % D]isNat.count_modEq_card, both inMathlib/Data/Int/CardIntervalMod.lean. The supporting lemmascount_hits_D/_lt_D/_mul_D/_eqreprove this per-class count, and the⌊N/D⌋/⌈N/D⌉two-valuedness is alsoSet.equitableOn_iff_exists_eq_eq_add_one. - Aggregate distribution over
ZMod D.residue_distributionpackages the aggregate counts (exactlyN % Dheavy classes,D − N % Dlight;uniform_residue_distributionis theD ∣ Ncase), andresidue_distribution_unitadds invariance under multiplication by a unit of(ZMod D)ˣ. The abstractn % k/k − n % ksplit is mirrored byIsEquipartition.card_large_parts_eq_mod/card_small_parts_eq_mod; the specialization to residue classes overZMod D(with the unit-invariance) does not appear to be packaged as a single named result, but it is a short corollary of the above rather than new mathematics. - Cyclic-interval stabilizer (
Basic.lean, sectionMinimality):cyclic_interval_stabilizer_trivial— a proper nonempty cyclic interval of residues modDhas trivial translation stabilizer. This one looks more genuinely absent from Mathlib, though niche.
In short: the per-class counting is already in Mathlib (CardIntervalMod); what
is specific here is the aggregate/unit-invariant packaging over ZMod D, kept
local. Exact status to be confirmed on the Lean Zulip.
- Lean:
leanprover/lean4:v4.29.1(pinned inLean/CutAndProject/lean-toolchain). - Mathlib:
v4.29.1, exact commit5e932f97dd25535344f80f9dd8da3aab83df0fe6(pinned inLean/CutAndProject/lake-manifest.json).
Install elan (this picks up
the pinned toolchain automatically), then:
cd Lean/CutAndProject
lake exe cache get # download Mathlib build cache (recommended)
lake build
Two C codebases compute period lengths over large parameter sweeps, used to verify the theorems empirically.
src/c/multiset/— multiset period.src/c/set/— set period.
Each subdirectory has its own constants.h (runtime configuration:
memory limits, Makefile with targets make all / make perf / make debug /
make clean.
Note:
MAX_PERIOD_ARRAY_SIZEcontrols a single allocation of 8-byte entries; the defaults are$10^7$ ($\approx 80$ MB) insrc/c/multiset/and$4 \times 10^9$ ($\approx 32$ GB) insrc/c/set/. Adjust before building.
verify_paper.py— checks both period theorems and all corollaries against the six-column CSVs intests/. Pure stdlib, no dependencies. Targets:make run/make clean.recompute_broken_set_periods.py— utility that recomputesperiod_setfor any CSV row whose value is a negative sentinel (i.e. an aborted C-side run). Computes the set period from the residue model independently of the theorem; requiresnumpy.generate_set_test_file.py— generates an independent set/multiset CSV (tests/set_theorem_balanced_test.csv) from Python implementations of both period algorithms.
The author used ChatGPT, Gemini, and Claude as AI assistants during
mathematical exploration, drafting, proof construction, and the
creation of the Lean formalization, all under the author's direction.
The author has independently verified the mathematical content and
accepts full responsibility for the results and any errors. The
correctness of the Lean formalization rests not on this provenance but
on the Lean 4 kernel: anyone can rebuild it and inspect the axiom list
(no sorry, admit, or axiom).
MIT — see LICENSE. © 2026 Dirk Kunert.