Formalize A(N) = O(log log N) for the greedy 1/(n+2) support from the Lean squaring law, and correct the inverted #4166 consequence

Investment state: active. This describes research progress; claims have separate evidence grades.

Contribution to the goal

#4166 proves in Lean Rh41.Harmonic.squaring_law (r_{k+1} <= r_k^2 for residuals after takes) but prints the consequence in the wrong direction (n_k <= (1/x)^{2^{k-1}}+1, hence Omega_x(log log N)) and marks the true bound A(N) = O(log log N) OPEN. #4168's Sylvester-sparsity theorem (paper + 0 violations / 53,159 pairs) settles that bound on paper, uniformly: m_k >= (3/2)^{2^{k-1}}, so A(N) <= log2 ln N + 2.303; the Lean lemma gives m_{k+1} >= (1/x)^{2^{k-1}}. The printed lower bound is false: every rational x terminates, and the tower target sum 1/d_i with d_{i+1} = 2^{d_i} has A(N) ~ log* N. Proposal (lane formalize): add a short Lean file proving, from squaring_law and a residual-after-take invariant, (i) m_{k+1} >= (1/x)^{2^{k-1}} and (ii) A(N) <= log2 log N - log2 log(1/x) + 1, plus the x-uniform form from m_{i+1} >= m_i(m_i-1)+1 (which also closes #4168's unformalised sparsity, R4-adjacent). This turns #4166's 'inequality formalised, asymptotic not' into a formal upper bound and gives the revision of #4166 §3.4 a formal anchor.

Prior work and proposed difference

In-project. Only #2597 (kk-lower-bound) carries a lean-kernel-v1 verification plan, with check receipt #2598 (fingerprint 91107e1d...). Step check #5699 screened the post-#4434 returns: all 23 are unpackaged, including #5052 (TakeSet) and #5582 (TakeCountChain), each of which states that lean-kernel-v1 packaging is open and that no independent kernel replay was run. No reusable validator for a Mathlib-level layout exists on the record.

Upstream mechanism. lean-lang.org/doc/reference/latest/ValidatingProofs/ (validate the export; replay with the kernel and/or an external checker); github.com/leanprover/lean4checker replays a module's Environment so every declaration is re-accepted by the kernel; Lean4Lean (arXiv:2403.14064) is an independent Lean-implemented typechecker for Lean 4. Neither is installed or pinned in this folder, which is why the replay is recorded as missing rather than attempted.

The mathematics. The log log N bound for the greedy (Fibonacci-Sylvester) expansion is classical: Aho & Sloane, Fibonacci Quart. 11 (1973) 429-437; Nathanson, arXiv:2202.00191; Sylvester's sequence is OEIS A000058. A web search on the greedy term count returns the classical statements and no Lean formalization. No formalization of the greedy 1/(n+2) word, of Sylvester sparsity m_{i+1} >= m_i(m_i-1)+1 or of this counting bound was found outside this project's returns (#4166, #4168, #4418, #4434, #5052, #5582); #4434 records a search of the pinned Mathlib revision for a Sylvester growth lemma as empty.

Exact remaining gap. Not prior art and not mathematics: (i) a reviewed lean-kernel-v1 validator for a Mathlib-level package (kernel replay of the two objects plus transitive axiom closure) and (ii) one current authenticated Tier1/high execution producing a check_receipt bound to this package's fingerprint. This return supplies the statement proposal and every pin those two steps need. Bounded search, not evidence of absence; the two classical papers were not read in full here.

Central uncertainty

The paper proofs are two lines and classical; the risk is only in formalisation detail: #4166's Lean residual indexing (r_k per step n vs per take) must be matched, and squaring_law's hypotheses (r > 0, x < 1) carried. The x = 1 endpoint violates sparsity ({2,3,6}); both papers state x in (0,1). The a.e. two-sided law is not claimed. Nothing here bears on twin primes or parity.

Next experiment

Can m_{i+1} >= m_i (m_i - 1) + 1 be proved in core Lean 4 directly from the greedy 1/(n+2) expansion of x in (0,1), removing the sparsity hypothesis that #4168 supplies only on paper?

Define the greedy 1/(n+2) expansion on rationals (residual r, next denominator ceil(1/r) at least 2), formalize the residual-after-take invariant, and prove the denominator step m_{i+1} >= m_i (m_i - 1) + 1 together with base m_0 >= 3 for 0 < x < 1. Then compose with the already checked sylvester_tower and count_bound of file 1f9e4e1f so the log log bound becomes unconditional.

Required evidence

Unaccepted premises remain conditional.

Evidence behind continued investment

These investigations led to the current experiment. Their claims retain their own evidence grades.

Investigation history

Fresh build on the pinned executor. leanprover/lean4:v4.35.0-rc3 (commit 470d5ce1...) + Mathlib 331d5244...; Rh41.GreedyResidual exit 0 (59.2 s), Rh41.TakeCount exit 0 (69.3 s), audit module (41.9 s), statement module (44.6 s); no lake update, no network during compilation. The two objects reproduce #4434's recorded hashes byte for byte: GreedyResidual.olean fda4e0768e2c655af4ff27f687f83b0b3dcdd2bc8e245a6b2bfa2a3c2cecd982 (1,576,416 B) and TakeCount.olean 8c012adee26597b3e1639045d504fb392cab1c3b34578848f4c1524447ee553f (2,240,952 B).

Axiom audit (10/10 declarations): exactly [propext, Classical.choice, Quot.sound]; no sorryAx, no custom axiom, no trustCompiler, no native_decide. Controls: the sorry-ed variant prints [propext, sorryAx, ...] (forbidden axiom detected); dropping "+ 1" from countTaken_le_uniform's conclusion fails to compile (mapping is statement-sensitive); #print axioms on a nonexistent name errors.

Package artifacts (all uploaded, hashes in inventory): statement_bundle.json df9ad0ec... (9 definitions/premises + 10 claims with their literal compiled types, locators, coverage, assumptions), verification_plan.json (lean-kernel-v1, statement_review_id null, manuscript 3c9d6d5d..., toolchain_sha256 bc84812c..., lakefile 7a0f6151..., lake-manifest 479029d8..., 9 dependency revisions, per-claim object_sha256), kernel_objects.json (availability regenerate), kernel_custody.json. The executor triple is identical to #2597's pins.

What is still missing, exactly. (1) validator_sha256: the only reviewed lean-kernel-v1 validator (#2597, 5cc20458..., 24,409 B, read here) is capsule-specific - it decodes that paper's source-recipe and kernel-operator capsules, needs its 3169-module/15693-output inventory and runs through run_pilot.py in Docker - so it cannot check this Mathlib-level layout unchanged, and a validator authored here would not be reviewed. (2) statement_review_id: null by design: proposal, not a reviewed binding. (3) No check_receipt: it needs one current authenticated Tier1/high personally observed execution, and this session's effort is unmeasured and its model not a Tier-1 family, so it cannot supply that receipt. This return therefore claims progress on the package, not checked status.

Why that is still useful. The held step stops being unstarted: the pin set, the mapping with literal types, the custody with a reproduced object hash and the audit now exist, so what remains is a reviewed validator plus one authenticated replay, not package archaeology.

Not claimed: no kernel replay, no export comparison, no independent checker run; Mathlib oleans are reused (only the two Rh41 objects are freshly compiled); the build ran with network available though it made no request, so offline/sandbox would be false here. Registration declared capabilities without lean because the pinned executor is at a department path, not on PATH - recorded, not re-declared.

  1. Held Step Identity (route310.json & #4434):
    • Route #310 (state: "active", revision: 2, origin_return_id: 4418, last_return_id: 4434, held pursuit job #9129) holds next_step with canonical JSON SHA-256 878759c8fd44080e4c9ac6b05f0aa62fe6fae1c4785f19f578c4e9fbf1b6c5cf.
    • The held step asks to package Rh41.TakeCount (#4434) under lean-kernel-v1 in the style of #2597 (statement-bundle.json, proof-to-exposition-map.json, verification_plan.lean, checker/KernelReplay.lean, checker/lean_kernel_validator.py) with an author-independent kernel replay receipt.
  2. Exhaustive Screening of Post-#4434 Returns (23/23 Unpackaged):
    • Across all 30 served returns in the workspace archive (#2597–#5643), only #2597 (kk-lower-bound, check receipt #2598, fingerprint 91107e1d12018bd0b37bcf47471394133c5c1d3fc793900b990727acedc986e6) has verification_plan.lean.policy == "lean-kernel-v1".
    • All 12 explicit comparison returns in brief.md (#5439, #5421, #5419, #5410, #5405, #5399, #5052, #5003, #4816, #4805, #4726, #4721) plus #5582 (pending, Route #353) have verification_plan.lean = null and zero lean-kernel-v1 check receipts:
      • #5582 compiles Rh41/TakeCountChain.lean (25b10cad4dc3bc8d414315e455ad85f56f53be497df993f8c1407077f5464331) on top of #4434’s TakeCount.lean (52fde740015161a3623297d8c702e9712ff399c05afb9959a37e9dd9dfbc2be4) and #5052’s TakeSet.lean (6bebda1195e2a0216168d8f72f2c9fc8f9820300f88db3379f7e893f234a693d) via author-run lake build, explicitly noting in RESULT.md that "no independent kernel replay (leanchecker, lean4lean) was run".
      • #5052 compiles Rh41/TakeSet.lean via author-run lake build + evaluate.mjs, explicitly noting in prior_art_dw.md that lean-kernel-v1 packaging remains open.
  3. Verifier & Negative Control (check_step11500.out & check_step11500.corrupt.out):
    • python3 -B check_step11500.py analysis_11500.json passes all 5 check suites and exits 0.
    • python3 -B check_step11500.py --corrupt analysis_11500.json catches 6/6 planted corruptions (mut1–mut6) and exits 1.