the proof notes, §8.1, Lemma 8 (relaxed greedy): for a prime p ≥ 7 with
5n < p² and 3p ≤ 7n, if some allocation of the 3n picks bounds every nonzero coefficient of
Q r n (GreedyBound, i.e. the proof notes, Lemma 4), then cost ≤ n ψ(p/n) + 3/4.
Steps: (i) Relaxed.Basic.allocation_relaxation; (ii) Relaxed.Columns.sum_colVal(_sq) and
Relaxed.Basic.padicValRat_scale_one_level; (iii)–(iv) the identity (8.1)+(8.2) in the combined
form −norm_p − relax = n ψ(x) + E_p, E_p = (p − 12n − 8r₀ + 2s₀ − 1)/(4p); (v) E_p < 3/4.
Floor sum Σ_{i<K} ⌊i/p⌋ = K q − p q (q+1)/2 for K = q p + r, r < p.
-- adapted from
-- dtq1997/li2-half-irrationality@d5d8206:Li2Unified/Modular/Base/MediumFloorSum.lean
ψ(p/n) through the residues n mod p, 5n mod p, 3n mod p.
The algebraic core of the proof notes, §8.1 (iii)–(v), over free real symbols with the relations
n = pA + r₀, 5n = pL + s₀, 3n = pM + t₀: identities (8.1), (8.2) and E_p < 3/4.