Repository navigation
feat(Foundations): dense stochastic atoms and their identity - #1723
SamuelSchlesinger merged 1 commit into
Conversation
First slice of cslib-community#1721 (Phase 4 of cslib-community#1444, idea 6 of cslib-community#474), following the OpenAI preprint (2026-09-23), Sections 5.1-5.2: the normalized dense atom 1{Yt(y)} k(d) R / c(q) has conditional mean exactly k(d) (Lemma 5.1), is bounded by 2|k(d)|, and has fewer than K nonzero entries per row on every draw (Lemma 5.5). The bin weights telescope to a partition of unity (5.6), (5.7). The row-gate failure bound is extracted from le_columnDetector as card_filter_rowGate_lt_one_mul_le and reused by both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
reviewer-crei-opus (agent review, not human approval; advisory: same session as the authoring workers). Full review of head Verdict: FINAL What is proved. A dense atom is
Against the preprint (rev
I checked every locator against the paper text: §5.1 p. 20 (normalization principle), (5.6)–(5.8) p. 21, (5.10)–(5.11) and Lemma 5.1 p. 22, Lemma 5.5 p. 25. Refactor. Tests are nonvacuous:
OAI Lean spot-check. I looked at Non-blocking nits.
Limits. I did not build locally, and hosted |
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine — APPROVE at 3c349e9bfeb52471252a2ddc02fa386b3c399408 (independent agent correctness/API review, not human approval). I read the complete four-file layer and relevant rank/channel definitions.
The identity conditions on a nonempty usage slice and uses its cross-rate pair-count bound to obtain mean gate ≥ 1/2; where k ≠ 0, h = 1, so clipping preserves the normalizer and the conditional mean is exactly k(G x y/a). Nesting is needed separately for the support theorem. Bounds, bin telescoping/support, and the extracted gate lemma agree with their hypotheses. le_columnDetector retains its statement and reuses the generalized lemma correctly. The computed two-draw atom, instantiated identity, affine-channel client and bin examples are meaningful.
Checked the pinned preprint, printed pp. 20–22 and 25. The terminal-only conditioning, generalized functions/thresholds, finite bin decomposition and weaker sufficient gate bound are honestly distinguished from the source. Cross-rate channel instances, smooth switches and correction/access interfaces remain outside this slice. No blocking findings or curated-abstract impact.
git diff --check passes; no local Lean build. Author reports all six local gates passing. At inspection, current-head Lean CI is running and title CI passes; required hosted checks remain before integration. Live head rechecked immediately before posting.
|
Non-author integration coordinator Required queue CI passed all six gates and applicable source checks. Its pending main push was normally coalesced into a newer descendant; the shared descendant main/cache record supplies passing main validation and the verified public cache. No rerun, local Lean build or artifact-body download was needed. This remains the terminal-side conditional atom under its stated cross-rate count assumptions, with the same-rate client supplied by this layer. #1721 and #1444 remain open for the estimator, remaining interfaces/assembly and machine/resource objectives. This is agent integration stewardship, not a new correctness approval or human review. |
Part of #1721 (Phase 4 of #1444).
This is the first slice of the estimator: dense stochastic atoms (idea 6 of #474). A dense atom represents a matrix entry as the conditional mean of a bounded table over a random retained set. On every draw, that table has fewer than
Knonzero entries per row. This is new mathematics for the library, following the OpenAI preprint ([OpenAI2026LogSpace], rev7ef5c0cc, unrefereed), §§5.1–5.2. Statements and names are ours. Only the paper text was read; no OAI Lean code was used.The branch is off main (
29574df8e); it is not stacked.Main statements (
Complexity/Foundations/Probability/StochasticAtom.lean).Fix a row
xofG, a scalea, a rank channelYand a usage channelYton one seed spaceκ. In the preprint these are the ratesaandt ≤ a.The bins live in namespace
Cslib:binWeight χ b 0 w = χ (w / b 0)andbinWeight χ b (k+1) w = χ (w / b (k+1)) − χ (w / b k). The following are proved about them:sum_range_binWeight:∑_{k ≤ n} ω_k(w) = χ (w / b n);sum_range_mul_binWeight:∑_{k ≤ n} w ω_k(w) = wonce0 < b n ≤ w;binWeight_nonneg;binWeight_succ_ne_zero:ω_{k+1}(w) ≠ 0 → b (k+1) / 2 < w < b k.Reuse. The row-gate failure bound was a
haveinsidele_columnDetector(#1696). It is now the publicMatrix.card_filter_rowGate_lt_one_mul_leinColumnDetector.lean, generalized from the draws{t | Y t y}to any finite setTof draws.le_columnDetectorandexpect_denseAtomboth use it; the former's statement is unchanged.Source → Lean (printed pages of rev
7ef5c0cc; locators checked against the paper text):k(d_y) R / q(x,y)has conditional meank(d_y)whenh = 1onk > 0andq ≥ 1/2expect_denseAtom(proof)q_y = E[h(d_y) R | X_u(x) = Y_t(y) = 1],c(q) = min{1, max{1/2, q}},B_a(x,y) = 1{Y_t(y)=1} k_a(d_y) R / c(q_y)atomPrep,atomNormalizer,denseAtomk_a(d_y), bounded values, at mostK − 1positive entries per rowexpect_denseAtom,expect_denseAtom_of_retentionChannels,abs_denseAtom_le,card_filter_denseAtom_ne_zero_ltcard_filter_rowGate_lt_one_mul_lecard_filter_mul_rowGate_ne_zero_ltω_0(w) = χ(w),ω_k(w) = χ(w/b_k) − χ(w/b_{k−1}), partial sums telescope,w = ∑_k w ω_k(w); (5.8): the support of the bin fork ≥ 1is1/2 < d < q*binWeight,sum_range_binWeight,sum_range_mul_binWeight,binWeight_nonneg,binWeight_succ_ne_zeroDifferences from the source.
X_u(x) = Y_t(y) = 1. The true dense atom uses only the terminal channel, and the start channel is independent. So we model the seed space of the terminal side only. The rank channelYand the usage channelYt ⊆ Yshare that seed space, as nested boxes do.#{s | Yt s y ∧ Y s w} ≤ c a #{s | Yt s y}. This is the cross-rate pair bound that Lemma 3.1 supplies. The interfaceRetentionChannelshas one rate, so it covers the caseYt = Y, throughexpect_denseAtom_of_retentionChannels. A cross-rate instance for the affine channels is listed as risk 2 in impl(#1444 Phase 4): the estimator as mathematics #1721.K ≥ 2 (1 + c M / η), i.e. the gate fails on at most half of the draws, which is all the identity needs. The preprint takesKlarger to reach7/8.χ_{α,β}, (5.5)) are not fixed here. Every statement takes the gate and main functions as parameters with only the threshold properties it uses. The smooth switches with Lipschitz fourth roots are slice 3 of impl(#1444 Phase 4): the estimator as mathematics #1721.Tests (
ComplexityTests/StochasticAtom.lean, 185 lines):{1}and one retains{1, 2}, withG 0 1 = G 0 2 = 1andK = 2. The gate is open on the first draw and closed on the second, so the normalizer is1/2. The atom is2on the first draw and0on the second, with mean exactlyk (G 0 1) = 1. This is computed fromkthLargest, not from the theorem. Row support< 2holds on every draw.½-walk onFin 3(K = 2002): the mean is1/2.P, injectiveident : V → ZMod P,1 ≤ P a,a ≤ 1, and every nonnegativeGwith row mass at most1, the affine retention channels (feat(Probability): affine retention channels satisfy the detector interface #1698) give the identity at ratea ^ HonceK ≥ 2 (1 + 2^H · 2000).b_k = 2^{-k}: the concrete weights0, 1/2, 1/2atw = 3/8, the decomposition, and the support(1/8, 1/2)ofω₂.Size.
StochasticAtom.leanis 344 lines;ColumnDetector.leanchanges by +69/−52 (the extraction); tests are 185 lines.Validation at
3c349e9bf:LEAN_NUM_THREADS=6 scripts/check.shpasses all six gates.python3 scripts/check_hygiene.py --check-simp,python3 scripts/check_changed_files.py --base origin/mainandpython3 scripts/check_tidy_surface.pyalso pass. ROADMAP is untouched.Catalogue assessment: no selected abstract, bridge, endpoint statement or renderer is affected.
Review. Please arrange a non-author review of:
AI assistance: written by Claude Code (Claude Opus 5.5) as worker
worker-crei-dc679113-1444p4for coordinatorcoordinator-crei-dc679113, at crei's request.🤖 Generated with Claude Code