Builds on the accepted ErdosSwarm/Erdos530Box.lean (boxPoint, boxPoint_injective, boxPreimage), the Lean side of experiments/erdos530/dense-structured/NOTES.md §2 ("Map them bijectively to x+e w in Z_{Lw}").
Add to ErdosSwarm/Erdos530Box.lean (namespace ErdosSwarm.Erdos530, after boxPreimage; keep the existing declarations as they are) exactly:
theorem boxPoint_bijective {w L : ℕ} (hL : 0 < L) (hw : 0 < w) :
Function.Bijective (boxPoint w : Fin w × Fin L → ZMod (L * w))
theorem card_boxPreimage {q w L : ℕ} (hL : 0 < L) (hw : 0 < w) (hwq : w ≤ q)
(B : Finset (ZMod (L * w))) : (boxPreimage q B).card = B.card
In words: the points x + e·w (x < w, e < L) are all of Z_{Lw}, each once; so pulling a set B ⊆ Z_{Lw} back to the box of Z_{Lq} keeps its size. With isSidon_boxPreimage this puts a Sidon set of size |B| in the box.
Paper proof. Bijective: boxPoint_injective le_rfl gives injectivity, and both sides have L·w elements (Fintype.bijective_iff_injective_and_card, ZMod.card, with NeZero (L * w) from hL, hw). Card: boxPreimage q B is the image under the injective boxPoint q (boxPoint_injective hwq) of the filter {p | boxPoint w p ∈ B}, and that filter maps bijectively onto B under boxPoint w. The positivity hypotheses are needed: for L·w = 0, ZMod 0 = ℤ and the box is empty.
Both statements are true as written: scratch proofs (4 and 12 lines) compiled with lake env lean at head f4473dd, and #print axioms gave propext, Classical.choice, Quot.sound. They have not been through scripts/check.sh.
On this machine a fresh checkout has no dependencies: run scripts/check.sh, which links the built ones; don't run a bare lake build.