EGRS75 two-prime — digit toolkit for the single μ-move (2026-06-12).
NEW file. Local, self-contained digit arithmetic consumed by
EgrsMuFinish_20260612.lean. Deliberately does NOT import EgrsFinish_core
(so that file can later import the μ-closure without a cycle); the two tiny
overlaps (mem_badIndexSet_iff-style bridge) are re-proved here.
CONTENTS (all KERNEL-CLEAN, no sorry):
• div_mul_pow_mono — truncation at a lower scale keeps a larger value.
• add_carry_decomp — n+U = R + q^i·(H+1) under a single carry.
• add_div_pow_eq — (n+U)/q^i = n/q^i + 1 (single carry).
• add_digit_i — digit i becomes b_i + 1 (when b_i < q-1).
• add_high_frozen — digits above i are frozen (when b_i < q-1).
• add_low_digit — digits below i of n+U are the digits of R.
• badAt_of_mem / topBad_lt_of_good_from — top-bad bound from a goodness ray.
• staircase — THE KEY: a number < ((q^i)-1)/2 - 1 (i.e. 2R+3 ≤ q^i)
has, below i, a strictly-good digit k with all
digits in (k,i) exactly B = (q-1)/2. This is the
EGRS75 p.85 case-(c) "staircase" fact, and it is what
makes the clearing index DROP after every ADD move.
Formalizes part of the KNOWN theorem EGRS75 (1975); three primes is Erdős #376 (OPEN) — not attempted. Recon: ~/Knowledge/Construct/recon/erdos_376.md.
Truncation monotonicity #
Single-carry ADD arithmetic #
Top-bad bound from a goodness ray #
Membership in badIndexSet is exactly BadAt (local copy; the original
lives in EgrsFinish_core, which this file must not import).
THE STAIRCASE (EGRS75 p.85, case (c)) #
A tail R with 2R + 3 ≤ q^i (strictly below the all-B value (q^i−1)/2)
has a strictly-good digit k < i such that every digit in (k, i) is exactly
B. Consequence: after the tight-window ADD, the new clearing index drops
strictly below the old one — the μ-measure first coordinate falls.