Commit 693d7d3
perf(hex-int-factor): complete decomposed Phase-4 evidence (#9864)
* perf(hex-int-factor): complete phase 4 benchmark surface
* perf(hex-int-factor): record phase 4 measurements
* perf(hex-int-factor): document phase 4 acceptance
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.
* docs(hex-int-factor): correct comparator contract
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.
* docs(hex-int-factor): set balanced policy budget
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.
* docs(hex-int-factor): make internal controls falsifiable
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.
* docs(hex-int-factor): compare complete rho pipeline
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.
* perf(hex-int-factor): measure complete route policy
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.
* bench(hex-int-factor): collect honest phase 4 evidence
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.
* bench(hex-int-factor): clear pinned spawn floor
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.
* bench(hex-int-factor): admit final square rung
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.
* bench(hex-int-factor): enforce evidence budgets
* fix(bench): accept matching hash status
* fix(bench): keep control audit untimed
* fix(bench): capture comparator version stream
* docs(hex-int-factor): record corrected phase 4 evidence
* bench(hex-int-factor): decompose phase 4 evidence
* bench(hex-int-factor): record decomposed native evidence
* bench(hex-int-factor): record kernel replay evidence
* bench(hex-int-factor): expose mode 3 profile runners
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.
* docs(hex-int-factor): report decomposed phase 4 evidence
* docs(hex-int-factor): record five clean profiles
* bench(hex-int-factor): address phase 4 review
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.
* docs(hex-int-factor): refresh phase 4 evidence
* docs(hex-int-factor): commit five profile summaries
* test(bench): exempt int-factor proof target from sweep
---------
Co-authored-by: Kim Morrison <kim@lean-fro.org>1 parent 2596c76 commit 693d7d3
32 files changed
Lines changed: 46591 additions & 136 deletions
File tree
- HexIntFactor
- SPEC
- bench
- HexBench
- HexIntFactor
- ProofProbe
- conformance/HexIntFactor
- reports
- bench-results
- scripts
- bench
- proof_only_runtime_exemptions
- profile
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
298 | 305 | | |
299 | 306 | | |
300 | 307 | | |
| |||
309 | 316 | | |
310 | 317 | | |
311 | 318 | | |
| 319 | + | |
| 320 | + | |
312 | 321 | | |
313 | 322 | | |
314 | 323 | | |
| |||
319 | 328 | | |
320 | 329 | | |
321 | 330 | | |
322 | | - | |
| 331 | + | |
| 332 | + | |
323 | 333 | | |
324 | 334 | | |
325 | 335 | | |
| |||
1220 | 1230 | | |
1221 | 1231 | | |
1222 | 1232 | | |
1223 | | - | |
1224 | | - | |
1225 | | - | |
1226 | | - | |
1227 | | - | |
1228 | | - | |
1229 | | - | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
1234 | 1245 | | |
1235 | 1246 | | |
1236 | | - | |
1237 | | - | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
1238 | 1253 | | |
1239 | 1254 | | |
1240 | 1255 | | |
1241 | 1256 | | |
1242 | 1257 | | |
1243 | 1258 | | |
1244 | | - | |
1245 | | - | |
1246 | | - | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
1247 | 1264 | | |
1248 | 1265 | | |
1249 | 1266 | | |
| |||
1255 | 1272 | | |
1256 | 1273 | | |
1257 | 1274 | | |
1258 | | - | |
| 1275 | + | |
1259 | 1276 | | |
1260 | 1277 | | |
1261 | 1278 | | |
| |||
1292 | 1309 | | |
1293 | 1310 | | |
1294 | 1311 | | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
1295 | 1319 | | |
1296 | 1320 | | |
1297 | 1321 | | |
| |||
1453 | 1477 | | |
1454 | 1478 | | |
1455 | 1479 | | |
1456 | | - | |
| 1480 | + | |
1457 | 1481 | | |
1458 | 1482 | | |
1459 | 1483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | | - | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
145 | 154 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
152 | 162 | | |
153 | | - | |
154 | | - | |
| 163 | + | |
155 | 164 | | |
156 | | - | |
| 165 | + | |
157 | 166 | | |
158 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
159 | 182 | | |
160 | 183 | | |
161 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
56 | 75 | | |
57 | 76 | | |
58 | 77 | | |
| |||
62 | 81 | | |
63 | 82 | | |
64 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
65 | 114 | | |
66 | 115 | | |
67 | 116 | | |
| |||
0 commit comments