perf(hex-int-factor): complete decomposed Phase-4 evidence - #9864
Merged
Conversation
added 3 commits
August 31, 2026 05:00
Cost-model derivation: balanced rho uses the O(n^(1/4)) expected iteration bound; fixed-bound word routes are constant and direct-Nat p-1/ECM use a quadratic operand-cost bound. Replay, entry products, square divisors, and totient use quadratic widening-product bounds; order and primitive-root search use linear candidate bounds. Power forms use the conservative 2^n input-value bound, cyclotomic recursion is quadratic, and sigma exponentiation uses n log n.
Owner
Author
|
Closing without merge after premise validation. The clean measurements contradict the pre-registered comparator expectation, the GMP-ECM curve is overhead-ineligible on five of six rungs, and the required kernel replay family is absent. Full evidence and corrected-scope requirements are recorded on #9634. |
added 17 commits
August 31, 2026 22:26
PARI factor does not expose a mode restricted to Hex's trial-division-plus-rho portfolio, so an external ratio cannot diagnose dispatch or rho by itself. Require same-input internal controls for those claims and keep PARI/GMP-ECM as explicitly portfolio-mismatched informational comparisons.
Use the existing Phase-4 one-second soft ceiling at the 80-bit top rung as the independent absolute criterion for deciding whether the current balanced route requires SQUFOF work.
The table control has an explicit 1.25 ratio, while the balanced control uses the dispatcher's exact rho allocation, rejects failures, normalizes outputs, and has an explicit factor-of-two ratio. The comparator contract now reports every GMP-ECM rung with eligibility labels, scopes each endpoint, and leaves SQUFOF to a genuine within-Lean prototype comparison.
# Conflicts: # HexIntFactor/SPEC/hex-int-factor.md # libraries.yml
Replace the mismatched complete-factorization/direct-split ratio with a preregistered comparison between default and rho-only route policies through the same completion and certificate path. Keep direct rho as the independent 2^(bits/4) scaling and profiling target.
Thread a private split policy through the production search so the diagnostic rho-only arm retains the exact public preprocessing, random-state progression, recursive certificate construction, and checked-factorization acceptance while disabling only smooth fallback after rho exhaustion. Use canonical full-factorization encodings for the seven balanced fixed pairs and retain raw rho solely as a 2^(bits/4) scaling target. Preregister per-target fixed ceilings and expected hashes, prevent fixed-term lifting, cover the full default-fuel schedule, and add the 1-through-10 kernel replay ladder ending at a 61-bit Pocklington certificate. The replay n^2 model follows one bounded guarded multiplication per exponent step on a widening accumulator. The square-divisor n^2 model follows sequential multiplication of n fixed-exponent entries into a linearly widening accumulator; its constant 8192-run loop clears the subprocess floor without changing the model. Sigma entry and totient ladders likewise sum linearly widening fixed-entry products, while sigma exponent uses the n log n surrogate for its growing exact quotient. Raw balanced rho uses the expected 2^(bits/4) cycle cost for factors of half the input width, and order uses one modular multiplication per scanned exponent. Run table trial division before perfect-power root search and classify fully table-factored powers by the gcd of their multiplicities, removing redundant root searches from the dominant small-dispatch batch without changing its route classification.
Add per-rung closed-term-safe ECM anchors with literal expected hashes and absolute ceilings. Replace the obsolete collector registrations with the complete normal/forced policy pairs and validate every harness verdict, expected hash, internal ratio, control audit, and default-fuel result before writing an artifact. Use the same 256-input GMP-ECM subprocess shape for the factor-of-15 protocol control and every shared rung. Pass sigma 7, B1 1000, and B2 1 explicitly, so stage 2 is disabled by B2 < B1. Preserve no-factor outcomes as results rather than misreporting them as protocol failures, and mark ratio eligibility solely from the preregistered overhead-fraction rule.
Double the constant square-divisor hot loop so its upper three rungs clear the unchanged ten-times subprocess floor even when pinned spawn overhead approaches 200 ms. This does not change the n^2 model, schedule, tolerance, or fixtures. Surface captured benchmark stdout and stderr when the collector rejects a child run.
Raise only the per-call safety cap from 60 to 120 seconds so the already-declared 1024-entry hot-loop rung completes under single-CPU affinity. Keep the n^2 model, 0.20 tolerance, schedule, subprocess filter, and fixtures unchanged.
Owner
Author
|
Closing after fresh Opus review and CI established the revised comparator premise is still unsound; concrete evidence is recorded on #9634. No merge performed. |
added 4 commits
September 1, 2026 05:54
Cost-model derivation: runSmooth performs n copies of one fixed 80-bit unbalanced rho split, so its repetition parameter is linear. runPower performs n copies of one fixed exponent-80 power factorization, so its repetition parameter is also linear. These registrations are attribution-only and do not model operand-size scaling.
added 4 commits
September 1, 2026 06:21
# Conflicts: # HexIntFactorMathlib/SPEC/hex-int-factor-mathlib.md # libraries.yml
Cost-model derivation: the attribution runner repeats one fixed 80-bit ECM stage-1 call, so its declared work is linear in the repetition count.
Owner
Author
|
Fresh Claude Opus second-opinion disposition: Addressed:
Verified but not adopted:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #9634.
This implements the issue's rewritten, preregistered Phase-4 contract:
factor?, raw rho splitting, and post-split completion as three distinct surfaces, explicitly identifying the 32-bit public rung as table-complete and the 40--80-bit rungs as rho-driven;-sigma 0:7,B1=1000, stage 2 disabled, with one fixed 256-input protocol;verifytiming-free;checkFactorizationreplays for k=1..10, ending with a 61-bit factor, including both null controls and all raw paired samples;HexIntFactorcomplete through Phase 4 and declares its proof-probe tree.Key evidence:
consistent_with_declared_complexityFresh independent Claude Opus review completed while CI was running. Substantive findings were addressed: route and RNG-trajectory descriptions, null/raw replay reporting, actual ECM attribution, private-symbol categorization, committed profile summaries, Phase-4 metadata, residual-exponent semantics, power-margin disclosure, and the Concerns narrative. Two suggestions were rejected with concrete verification: GMP-ECM verbose output confirms the original command already selected
sigma=0:7(the collector now states it explicitly), and the exact issue contract requires the combined comparator namePARI factor and GMP-ECMplus the preregistered <=50% overhead eligibility calculation.Local verification:
lake build(10,500 jobs)lake build HexIntFactor HexIntFactor.Conformance hexintfactor_bench.lake/build/bin/hexintfactor_bench verify(40/40).lake/build/bin/hexintfactor_bench control-audit.lake/build/bin/hexintfactor_bench default-fuel(49/49)python3 scripts/check_phase4.py