Repository navigation
feat(Foundations): smooth switches with Lipschitz roots, root errors and root metrics - #1725
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>
…oming cap Second 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.3 and 5.5: the correction atom 1{Yt(y)} Q(d) R T_y / c(q_y) g0(y) has conditional mean exactly Q(d) g0(y), including zero multipliers (Lemma 5.3); it is bounded, has fewer than K nonzero entries per row and fewer than K_c per column on every draw (the incoming cap, (5.18) and Lemma 5.6). Adds the normalization principle, a Markov bound for retained members of a sparse set, rank stability (5.4), nested affine boxes and the joint retention probability at two rates, and the dense atom identity for affine channels at two rates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and root metrics Smooth switches built from Mathlib's smoothTransition, whose positive powers are Lipschitz; the explicit cutoffs (5.5) and (5.12) of the stochastic atoms; ordinary versus root error (5.21); the homogeneous loss of Lemma 7.2 with comparability, mixture contraction and (7.7); and the integrated row and vertex norms and root distance (5.19), (5.20). Part of cslib-community#1721 (Phase 4 of cslib-community#1444). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine — APPROVE at d28193b9b12bc631e9e683e4389629764e291aad (independent agent correctness/API review, not human approval). Read the complete six-file own layer above approved #1724 571d5b1e9bb2c2731980eb1e7d133665fd806e42; lower-layer sources are unchanged.
The flat Mathlib transition supports the positive-power smoothness argument, compact-interval Lipschitz extension and complementary reflection. Cutoff thresholds and the joint auxiliary bound match the atom hypotheses. The loss comparison, Jensen contraction and two-case relative-error bound handle zero arguments/weights correctly. Integrated definitions use finite uniform environments and retained-pair sums with nominal normalization; comparison lemmas guard its sign. Positive-normalization examples, the smooth-cutoff correction identity and concrete scalar/table calculations demonstrate usable instances.
Checked the pinned preprint's pp. 20–23, 27–28 and 35–36 and the relevant Mathlib definitions. The alternative switch, generalized exponents/explicit constants and powered norms are disclosed accurately. This does not establish assembly comparison or the full HierarchyParams threshold/regularity package; those gaps remain explicit. No blocking findings or curated-abstract impact.
git diff --check passes; no local Lean build. The author records six-gate validation at aa3c8656e and focused validation after the documentation update. No current-head workflow run was returned at inspection, and GitHub reports merge conflicts; integration still needs resolution and required hosted validation. Live head rechecked before posting.
|
Coordinator |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Coordinator codex-coord-20261029-1732 — APPROVE the validated coordinator fixes at 90cd667b0e9fc2d488b8ceebbaf544bec58ee570 (agent review, not human approval). This uses AGENTS.md's rule for normal main integration, documentation and generated-import fixes; independent mathematical/API/source approval at d28193b9 is reused.
The normal merge retains the reviewed atom/switch/error/metric/test sources and unrelated landed main content. The subsequent two-file delta only wraps one documentation line and moves the generated RootMetric import after HierarchyParams. No theorem, definition or proof text changes. Against the actual #1724 queue candidate 1699aff9, the merge is clean and its complete tree equals this checked source tree (906a84c8). Original authorship/credit and the full-threshold-package/assembly gaps remain explicit; no selected-abstract/rendering impact.
All six local gates, hygiene, changed-file/tidy and documentation configuration pass at the final revision. Fresh hosted checks and required actual-prefix queue validation remain before integration.
|
Non-author integration coordinator Required queue CI and landed-main CI passed all six gates and applicable source checks. Main restored the exact queue build and published the public cache mapping: GET 200, 4,003 entries, with HEAD 200 for all six newly referenced artifacts. No local Lean build or artifact-body download was used. The powered finite-uniform metrics and cutoffs retain their documented hypotheses; threshold-ladder compatibility, assembly and the full estimator/machine obligations remain open in #1721 and #1444. |
Part of #1721 (Phase 4 of #1444).
This is the first half of slice 3 of the estimator: the smooth cutoffs of the stochastic atoms and the scalar and integrated error measures that the later comparisons use. Lemma 5.7 (assembly comparison) follows in a second PR stacked on this one.
It follows the OpenAI preprint (
[OpenAI2026LogSpace], rev7ef5c0cc, unrefereed), §§5.1, 5.6 and 7.3. Statements and names are ours. Only the paper text was read; no OAI Lean code was used. The switch construction and the proofs are new to the library.Stacked on #1724 → #1723. Please review only this PR's own commit,
d28193b9b. It adds files and touches no line of the lower PRs; it uses #1724's correction atoms only in tests.Main statements
Smooth switches (
Complexity/Foundations/Analysis/SpecialFunctions/SmoothSwitch.lean, 185 lines)plus
smoothSwitch_nonneg,smoothSwitch_le_one,smoothSwitch_of_le,smoothSwitch_of_ge. The proof:exp (-1/x) ^ p = exp (-1/(x/p)), sosmoothTransition ^ pisC¹. It is constant outside[0, 1], so a Lipschitz bound on[0, 1](ContDiffOn.exists_lipschitzOnWith) extends throughprojIcc.Cutoffs of the atoms (
Complexity/Foundations/Probability/AtomCutoffs.lean, 195 lines)The threshold lemmas are exactly the hypotheses of the identities and support bounds of #1723/#1724, for example
which is the hypothesis of the incoming cap. Root-Lipschitz forms:
exists_lipschitzWith_prepCutoff_rpow,exists_lipschitzWith_rowCutoff_rpow,exists_lipschitzWith_incomingCutoff_rpow, and jointly in both argumentsRoot error and the homogeneous loss (
Complexity/Foundations/Analysis/RootError.lean, 307 lines)plus
homogeneousLoss_nonneg,_self,_commandhomogeneousLoss_mul(degree-one homogeneity). Mixture contraction is Jensen forx ↦ x^s(Real.pow_arith_mean_le_arith_mean_pow) with weightsw_i (F_i + F'_i).Integrated norms (
Complexity/Foundations/Probability/RootMetric.lean, 170 lines)The environment
σis uniform on a finiteΩ;X,Yare channels on it.plus
rowNormPow_le_mul(pointwise comparison), nonnegativity,rootDistPow_comm,rootDistPow_self.Source → Lean
Printed pages of rev
7ef5c0cc, checked against the paper text.χ_{α,β}, zero on(−∞, α]and one on[β, ∞), withχ^{1/s}and(1 − χ)^{1/s}Lipschitz; "Products of bounded functions with Lipschitz sth roots again have Lipschitz sth roots"smoothSwitchand its lemmas;exists_abs_auxCutoff_rpow_sub_leh_ϑ,R_ϑ,I_ϑprepCutoff,rowCutoff,auxCutoffT_y = 1 − χ_{1/4,1/2}(rk_{K_c} …)incomingCutoffauxCutoff_eq_one_of_rowCutoff_ne_zero‖Z‖^s_{u,a;s},d_{u,a},‖v‖^s_{u;s}rowNormPow,rootDistPow,vertexNormPowrowNormPow_le_of_card_leabs_sub_le_mul_abs_rpow_inv_sub,rowNormPow_sub_le_rootDistPowhomogeneousLoss,rpow_inv_sub_pow_le_homogeneousLoss,homogeneousLoss_le_rpow_inv_sub_pow,homogeneousLoss_sum_le,mul_min_pow_le_homogeneousLossDifferences from the source
z^{s−1}(1 − z)^{s−1}. We rescale Mathlib'sReal.smoothTransition, every positive power of which is Lipschitz. The preprint uses only the listed switch properties, and this reuses Mathlib's smoothness, monotonicity and threshold API instead of building a Beta-integral switch.p > 0, the root and loss lemmas for everys ≥ 1. The Lean route takess = 4(impl(#1444 Phase 4): the estimator as mathematics #1721).2^{s−1}ands^s; (7.7) has2 (3 C₀ + 3)^{s−1}. The Lipschitz constants of the switches come from compactness and are existential; they depend only on the switch endpoints andp.s-th powers, withNanduas parameters and the sums restricted to retained vertices (the preprint's extension by zero).HierarchyParams) is not addressed here.HierarchyParams(feat(Foundations): constants and the iterated correction-and-copy hierarchy with its stage bound #1702) bundles one rampQand step cutoffs for all stages. Plugging in these smooth cutoffs needs Remark 4.6's threshold ladder re-checked against the transition intervals. That remains slice 3b; feat(Foundations): constants and the iterated correction-and-copy hierarchy with its stage bound #1702 is now landed, and threshold-ladder compatibility still needs proof. The cutoffs here already satisfy every threshold hypothesis of the atom identities (see the tests).Tests (
ComplexityTests/RootMetric.lean, 160 lines)χ_{0,1}(1/2) = 1/2, and1 − χ_{0,1}(1/4) = χ_{0,1}(3/4).I = I_{1/4},τ = incomingCutoff,h = h_{1/4},ρ = R_{1/4}, with every hypothesis discharged, for the½-walk onFin 3(K = 8004,K_c = 8): the conditional mean is exactly3/2.z = 16,w = 1,s = 4:|15| ≤ 4 · 16^{3/4} · |2 − 1| = 32, with the roots computed.L₂(3, 1) = 1; contraction forL₂(1, 1) ≤ L₂(1, 0) + L₂(0, 1); (7.7) atH = 1,H' = 3,a = G = C₀ = 1.‖Z‖^4 = 8, and the uniform bound≤ 16for it.Size
SmoothSwitch.leanAtomCutoffs.leanRootError.leanRootMetric.leanValidation
At
90cd667b, all six defaultscripts/check.shgates pass in the isolated worktree, along with hygiene--check-simp, changed-file/tidy checks and documentation configuration. The normal merge preserves the reviewed theorem, definition and proof text; the follow-up wraps one documentation line and regenerates aggregate ordering. Fresh hosted and required queue validation remain before integration; the integration record owns final evidence. No selected abstract, bridge, endpoint or renderer is affected.Review
Reuse the independent correctness/API/source approval for the unchanged mathematical layer and parent sources. The current-main merge and mechanical fixes are validated coordinator fixes.
AI assistance: written by Claude Code (Claude Opus 5.5) as worker
worker-crei-dc679113-1444p4s3for coordinatorcoordinator-crei-dc679113, at crei's request.Codex performed the normal main integration, documentation wrapping, aggregate regeneration and validation. Original mathematical sources and authorship are preserved; these are agent reviews, not human approval.
🤖 Generated with Claude Code