diff --git a/research/p104-span-bitset/BENCHMARK.json b/research/p104-span-bitset/BENCHMARK.json new file mode 100644 index 0000000000..9effa81615 --- /dev/null +++ b/research/p104-span-bitset/BENCHMARK.json @@ -0,0 +1,119 @@ +{ + "complete": { + "completed_commands": 10, + "errors": 0, + "median_seconds": { + "bitset": 13.66525241592899, + "scalar": 14.982166209025308 + }, + "range_seconds": { + "bitset": [ + 13.1230415829923, + 14.27175220916979 + ], + "scalar": [ + 14.12012662482448, + 16.949109292123467 + ] + }, + "reduction": 0.08789875741086128, + "seconds": { + "bitset": [ + 14.27175220916979, + 13.563843125011772, + 14.195595792029053, + 13.66525241592899, + 13.1230415829923 + ], + "scalar": [ + 14.982166209025308, + 16.07360037509352, + 16.949109292123467, + 14.541455458151177, + 14.12012662482448 + ] + }, + "transcript_sha256": [ + "0a65172e526d75a026bb8232eb90f9b44190cbc843c2149f6920fc2f13a43782", + "0a65172e526d75a026bb8232eb90f9b44190cbc843c2149f6920fc2f13a43782", + "0a65172e526d75a026bb8232eb90f9b44190cbc843c2149f6920fc2f13a43782", + "0a65172e526d75a026bb8232eb90f9b44190cbc843c2149f6920fc2f13a43782", + "0a65172e526d75a026bb8232eb90f9b44190cbc843c2149f6920fc2f13a43782", + "0a65172e526d75a026bb8232eb90f9b44190cbc843c2149f6920fc2f13a43782", + "0a65172e526d75a026bb8232eb90f9b44190cbc843c2149f6920fc2f13a43782", + "0a65172e526d75a026bb8232eb90f9b44190cbc843c2149f6920fc2f13a43782", + "0a65172e526d75a026bb8232eb90f9b44190cbc843c2149f6920fc2f13a43782", + "0a65172e526d75a026bb8232eb90f9b44190cbc843c2149f6920fc2f13a43782" + ] + }, + "implementation_sha256": { + "benchmark.py": "f3a8f6e6ef9b9de9a675001c89cab7a03882c513571b56f633d22c320f1f0d84", + "incidence.py": "0599f6e7089188325a96a0ac1e0370fdd6140179b09a9bed460e47313b153f4d", + "replay.py": "049cee0cfd3a7d09ca5f6a13d1d9ec796f463ab07e3580a20d3f47ad06921aee", + "verify.py": "814774f1dd60a138f9b21891a1ce9115271aa47682a178a47310fcdd9f7e23aa" + }, + "load_average_after": [ + 5.599609375, + 4.28857421875, + 3.248046875 + ], + "load_average_before": [ + 3.95166015625, + 3.69189453125, + 2.8828125 + ], + "logical_cpus": 18, + "method": "five alternating fresh-process pairs per complete command; all work timed", + "numpy": "2.5.4", + "platform": "macOS-27.0.1-arm64-arm-64bit", + "python": "3.12.15 (main, Oct 14 2026, 00:55:37) [Clang 23.1.3 ]", + "schema_version": 1, + "source_manifest_sha256": "b6c2761575d51090e9095837a9b53cac704972bb1265ff178c95344701e262f0", + "span": { + "completed_commands": 10, + "errors": 0, + "median_seconds": { + "bitset": 0.8545080840121955, + "scalar": 2.596336791990325 + }, + "range_seconds": { + "bitset": [ + 0.8319042918737978, + 0.8727450419683009 + ], + "scalar": [ + 2.4367482499219477, + 2.9179103339556605 + ] + }, + "reduction": 0.6708793379008666, + "seconds": { + "bitset": [ + 0.8434213330037892, + 0.861412291880697, + 0.8319042918737978, + 0.8727450419683009, + 0.8545080840121955 + ], + "scalar": [ + 2.4666792501229793, + 2.4367482499219477, + 2.596336791990325, + 2.9179103339556605, + 2.6245213749352843 + ] + }, + "transcript_sha256": [ + "32919ac4d4a527e2fa3aadf8b9bdd27d994289adbe2d96d3c32405defadb91c0", + "32919ac4d4a527e2fa3aadf8b9bdd27d994289adbe2d96d3c32405defadb91c0", + "32919ac4d4a527e2fa3aadf8b9bdd27d994289adbe2d96d3c32405defadb91c0", + "32919ac4d4a527e2fa3aadf8b9bdd27d994289adbe2d96d3c32405defadb91c0", + "32919ac4d4a527e2fa3aadf8b9bdd27d994289adbe2d96d3c32405defadb91c0", + "32919ac4d4a527e2fa3aadf8b9bdd27d994289adbe2d96d3c32405defadb91c0", + "32919ac4d4a527e2fa3aadf8b9bdd27d994289adbe2d96d3c32405defadb91c0", + "32919ac4d4a527e2fa3aadf8b9bdd27d994289adbe2d96d3c32405defadb91c0", + "32919ac4d4a527e2fa3aadf8b9bdd27d994289adbe2d96d3c32405defadb91c0", + "32919ac4d4a527e2fa3aadf8b9bdd27d994289adbe2d96d3c32405defadb91c0" + ] + } +} diff --git a/research/p104-span-bitset/PROOF.md b/research/p104-span-bitset/PROOF.md new file mode 100644 index 0000000000..c2737782e6 --- /dev/null +++ b/research/p104-span-bitset/PROOF.md @@ -0,0 +1,94 @@ +# Equivalence of the incidence substitution + +This scoped implementation argument is produced by Nick Petalas. The P104 +facts, root model, original assertions and bounded verification domain are +Matarener's PR6188. This argument concerns the new implementation, not an +independent proof of those mathematical facts. + +Let the ordered port labels be P=(p_0,...,p_(n-1)). For each nonzero binary +section label z, define an integer + + Z_z = sum_i 2^i [popcount(p_i & z) is even]. + +The summands have distinct bit positions. Consequently bit i of Z_z is one +if and only if the old ldot(p_i,z) equals zero. The old single-section count +is therefore popcount(Z_z), and its two-section count is +popcount(Z_z & Z_y). Integer AND has no cross-coordinate carries. Python's +unbounded nonnegative integers compute these identities exactly. + +The implementation constructs Z_z for every z=1,...,511 and retains the +original maximum over all z and every zb for a in scalar for b in bitset). Enumerate every +five-element subset of the ten measurements as a possible scalar allocation. +For each allocation recompute U, and count abs(2U-25) at least as large as the +observed value. The complete domain has binomial(10,5)=252 allocations. The +span command has U=25 with two tail allocations; the complete verifier has +U=23 with eight. All five paired differences in each scope are positive. +These exact calculations describe the supplied small sample. Independence +from host load or a speed guarantee on another host is not proved. Registered +conformance validates the main timing record; the descriptive calculation is +separately recorded for inspection and is not a new runtime benchmark. diff --git a/research/p104-span-bitset/README.md b/research/p104-span-bitset/README.md new file mode 100644 index 0000000000..88f27d1ab2 --- /dev/null +++ b/research/p104-span-bitset/README.md @@ -0,0 +1,117 @@ +# Bitset incidence shortens the complete P104 B-form replay + +The complete P104 span-fact command has a 67.09% lower local median wall time, +from 2.596 to 0.855 seconds. The scalar range is 2.437..2.918 seconds and the +bitset range is 0.832..0.873 seconds. Five alternating fresh-process pairs +produce identical normalized standard output and zero errors. + +The enclosing bounded B-form verifier has an observed 8.79% lower median, +14.982 to 13.665 seconds. Its whole-caller wall-time comparison is inconclusive +because the ranges overlap and host variation exceeds the median difference. +All ten complete caller outputs still agree, with zero errors. +[BENCHMARK.json](BENCHMARK.json) contains every sample, environment details, +transcript hashes and implementation/input bindings. + +Claim type: measured complete-span verifier improvement with a scoped implementation-equivalence +proof and exact finite conformance. No new mathematical bound or kappa is claimed. +This contribution is produced by Nick Petalas. + +The profile locates the span command's dominant cost in repeated scalar label +parities. Integer incidence masks reuse those parities while retaining every +one of the 130,305 section pairs. The enclosing command retains the original +S1/S2' checks, biclique replay, singular-rank self-test, authenticated census logs, +result comparison, Lean-source scan and controls. The saved timing ranges are +14.120..16.949 seconds for the scalar caller and +13.123..14.272 seconds for the bitset caller. +All five paired complete-verifier samples favor the bitset implementation. +The complete ranges overlap; the exact descriptive rank-sum tail is 8/252 +(two-sided p=0.031746). [STATISTICS.json](STATISTICS.json) binds that calculation +to the generated timing record. The whole-caller timing remains +inconclusive. The clear span-command improvement has no portable speed guarantee. The standalone span median equals 17.3% of the complete scalar median. The +end-to-end result is consistent with its available headroom. The remaining +singular-rank stage limits the gain. The machine had other work running; +alternating order and the recorded load averages make that limitation explicit. + +[PROOF.md](PROOF.md) explains the incidence identity, the exact source adapter, +assertion preservation, resource bounds and deviations. Only the S0 count +computation changes. A raw prefix preserves an inherited literal docstring +escape while permitting warning-strict compilation. The original files remain +unchanged. All 105 live inputs are pinned. A stable checkout is required while +a command authenticates and reads its source files. + +## Reproduce + +From the repository root, with CPython 3.12 and numpy 2.5.4: + +```sh +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -B research/p104-span-bitset/verify.py +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -O -B research/p104-span-bitset/verify.py +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/p104-span-bitset +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/p104-span-bitset --check-source-history --check-modes +``` + +Another CPython 3.12 path may replace the local path. The direct marker is +`PASS_P104_SPAN_BITSET`. Both registered commands are bounded by 180 seconds. +To execute only the faster complete consumer: + +```sh +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B research/p104-span-bitset/replay.py --scope complete --engine bitset +``` + +To repeat the five alternating timing pairs for each command: + +```sh +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B research/p104-span-bitset/benchmark.py +``` + +The benchmark prints a generated JSON record; save new output outside the +checkout. It does not overwrite the published record. The conformance checker +validates that record's hashes, raw-sample medians/ranges, error counts and +transcripts. Its three record-corruption controls reject changed input bindings, +medians and transcript hashes. + +## Evidence and limits + +The literal scalar oracle checks 281 fixtures and 136,569 section pairs, +including every actual P104 section pair. Thirteen domain, section, +source-corruption and normalization controls plus three record controls remain +active under optimization. Complete scalar/bitset output comparisons execute +both the span command and its enclosing bounded verifier. Child commands run +without optimization, so the predecessor assertions remain enabled. + +The performance percentage is a single-host measurement on CPython 3.12.15, +macOS arm64 with 18 logical CPUs and numpy 2.5.4. CI checks conformance and +record integrity; it does not certify this host's percentage. The predecessor +manifest pins a different numpy release. Both measured engines here use 2.5.4; +no cross-version speed comparison is made. + +The enclosing bounded verifier authenticates recorded census logs. It does +not recompute the full historical census or build Lean. This package preserves +that coverage and does not claim independent acceptance of the predecessor +mathematics. Full census, Lean, selected-supplier cold replay, native/caller +admission and the complete multiplication theorem remain unrun. Independent +human and formal proof-kernel review are unclaimed. The selected frontier is +unchanged. Hosted CI is pending at publication. + +## Related open work + +- PR6218 supplies hand/Lean root and span facts and a different B-form reduction. This package accelerates the retained PR6188 bounded command; it does not re-check or replace PR6218's proof or compatible-plane work. +- PR6198 proves E8 span inputs over odd-characteristic fields. Its span predicates and theorem are distinct; no common numerical result is compared. +- PR6217 and PR6219 study P104 wire routing and disjoint A2 packing. They share the root geometry but do not implement this span-count substitution or measure this replay. + +## Open next questions + +Can the same incidence representation help another explicit finite-fact +consumer? First profile a different complete command and specify its full +output and checks. No other consumer is measured or adapted here. Further +optimization of the other B-form replay stages is left unclaimed. + +## Credit + +Matarener retains PR6188's mathematical facts, root model, finite domains, +original verifier, recorded evidence and attribution. DreamingOfClouds retains +the underlying nine-term decoder/geometry code and its credited predecessor +lineage. The incidence implementation, source adapter, implementation-equivalence +argument and measurements are produced by Nick Petalas. Bitset intersection +and population count are standard methods; no literature-priority claim is made. +Apache-2.0. Frozen evidence and predecessor credit lines are unchanged. diff --git a/research/p104-span-bitset/SOURCES.json b/research/p104-span-bitset/SOURCES.json new file mode 100644 index 0000000000..f7d9b1a852 --- /dev/null +++ b/research/p104-span-bitset/SOURCES.json @@ -0,0 +1,648 @@ +{ + "schema_version": 1, + "base_commit": "a5bff3bf133e482541c09eba4e773884bdb2b1b7", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "d59b5035e7b4cbaa9d688a1d32dd0d6eb79c466a", + "sha256": "9b8d0eea95b3bf0dfcb7938a732a6439b87a2685dec2a5ab9e525b3b34debbfa" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + }, + { + "path": "research/nine-term-outside-colspace/checks/aut104.py", + "usage": "input", + "git_blob": "0475340524fc6637348f86291e8ee3607ab8852b", + "sha256": "61666a90226f93cd86c558834317bb1d29c2bd39483ec8332d38c3fb6204fc34" + }, + { + "path": "research/nine-term-outside-colspace/checks/aut104.py-E", + "usage": "input", + "git_blob": "a399c7d079d92426b6446dac344275d23c1e11a2", + "sha256": "fec7ec05ad170152cc72350d6ebb3a4550c53b20796104e77e9a5b9491b3d524" + }, + { + "path": "research/nine-term-outside-colspace/checks/cert2.py", + "usage": "input", + "git_blob": "1b5f40670031afa5d2bc4d3175f313df6accbeb1", + "sha256": "3a63e37e44858da37541de7b3e627f85aa1dbc966e376fdce116268fcc2b2c54" + }, + { + "path": "research/nine-term-outside-colspace/checks/cert2.py-E", + "usage": "input", + "git_blob": "47db4ccfc154e22fdcb4a401124cff3f1e1e177c", + "sha256": "a8ac8eccd3ffd5360bbc47890149fadb3b42cf764930dcaf253f45c1627d4010" + }, + { + "path": "research/nine-term-outside-colspace/checks/cliques.py", + "usage": "input", + "git_blob": "c1b7138b2a5ca451822dccb61528bc400c93c817", + "sha256": "6e6e211514939c7f0ebb55f3b21f64c00fa2ad603a7bca2193f7bca8bfea471d" + }, + { + "path": "research/nine-term-outside-colspace/checks/cliques.py-E", + "usage": "input", + "git_blob": "c1b7138b2a5ca451822dccb61528bc400c93c817", + "sha256": "6e6e211514939c7f0ebb55f3b21f64c00fa2ad603a7bca2193f7bca8bfea471d" + }, + { + "path": "research/nine-term-outside-colspace/checks/cmp_logs.py", + "usage": "input", + "git_blob": "564c80b54971baf12f7859c0d0b8b9322ef28880", + "sha256": "181934378e083b5aa3bc232267a375261956f9e7fac9f3005345d6bf5b74f90b" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt.py", + "usage": "input", + "git_blob": "16967c58b6116baa40dc43b6ca45cce0ce18b199", + "sha256": "0c0af3076114d16ca61f0fd364a5ddd8ec0773c324c6a734164d5c8cca5f3c75" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt.py-E", + "usage": "input", + "git_blob": "4340468ed69a127980799e77f8be08e4592aae05", + "sha256": "8960b849e90e1f42bddc4f96bd15581c7d298f586991324ea2bf193851e5cda4" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt10.py", + "usage": "input", + "git_blob": "2285fb8e4f2d957dcc0f2045fb94a68e53c9b579", + "sha256": "33e99c3abd418ab613961d2239478fc68b888e0dd5bd481cb9bb8fb93c9b4dad" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt10.py-E", + "usage": "input", + "git_blob": "2285fb8e4f2d957dcc0f2045fb94a68e53c9b579", + "sha256": "33e99c3abd418ab613961d2239478fc68b888e0dd5bd481cb9bb8fb93c9b4dad" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt104b.py", + "usage": "input", + "git_blob": "53cb77767451459ad97f0dffaef7f1515535b937", + "sha256": "847a8c381387b727347e55a67c8ae6eec4affca32013ca7887b4a2f33d7b3584" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt104b.py-E", + "usage": "input", + "git_blob": "8c23cde22632003f144ad6ace35ce000eb5c63da", + "sha256": "8585bea6d3545d82933d2bf2944006b0036ab2ecea5458e88e8742a51964f86e" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt4.py", + "usage": "input", + "git_blob": "d3660f2bcd96123be4c9689b5d89b655a83d4105", + "sha256": "fef8d072160c3e5998245d9dd74353c4b6d8f3d9280a644d0e5f6fb9db72c5ac" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt4.py-E", + "usage": "input", + "git_blob": "d3660f2bcd96123be4c9689b5d89b655a83d4105", + "sha256": "fef8d072160c3e5998245d9dd74353c4b6d8f3d9280a644d0e5f6fb9db72c5ac" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt6.py", + "usage": "input", + "git_blob": "435d53570b82279428c314d03d6a2e39189e1648", + "sha256": "a9d16cd7c6bbfab14b4e76a22fe69c6334f0ef02f5b9f58297b5f5432ba2abfd" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt6.py-E", + "usage": "input", + "git_blob": "435d53570b82279428c314d03d6a2e39189e1648", + "sha256": "a9d16cd7c6bbfab14b4e76a22fe69c6334f0ef02f5b9f58297b5f5432ba2abfd" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt7.py", + "usage": "input", + "git_blob": "c4b7f7657635824cb2638f8a4ccf28c40cac34a7", + "sha256": "0ab060477e61579e2a1beace8e3186ad418f2e51940879f9c40797d6866f50b3" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt7.py-E", + "usage": "input", + "git_blob": "c4b7f7657635824cb2638f8a4ccf28c40cac34a7", + "sha256": "0ab060477e61579e2a1beace8e3186ad418f2e51940879f9c40797d6866f50b3" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt8.py", + "usage": "input", + "git_blob": "af87cd6790d1888b8a62ce2a88682db64aef2b30", + "sha256": "baa0682010925437f743e59946353fe427f498813195ca27ef75fd8101356c0f" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt8.py-E", + "usage": "input", + "git_blob": "af87cd6790d1888b8a62ce2a88682db64aef2b30", + "sha256": "baa0682010925437f743e59946353fe427f498813195ca27ef75fd8101356c0f" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt9.py", + "usage": "input", + "git_blob": "917e17701b3a20df79da3495710cb36a2df7ee40", + "sha256": "7be37a49592a62913477e2c44aa4f01319c314bd891a11fb4745be8d4117a1bd" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt9.py-E", + "usage": "input", + "git_blob": "917e17701b3a20df79da3495710cb36a2df7ee40", + "sha256": "7be37a49592a62913477e2c44aa4f01319c314bd891a11fb4745be8d4117a1bd" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt9b.py", + "usage": "input", + "git_blob": "3df1681f01d4806d2d21ae20e8782214d4a11ad8", + "sha256": "32dd86b6895e68fe733e03b62937e5cdb2f63f5149b3a779ddc1002dda8dd3bd" + }, + { + "path": "research/nine-term-outside-colspace/checks/cnt9b.py-E", + "usage": "input", + "git_blob": "3df1681f01d4806d2d21ae20e8782214d4a11ad8", + "sha256": "32dd86b6895e68fe733e03b62937e5cdb2f63f5149b3a779ddc1002dda8dd3bd" + }, + { + "path": "research/nine-term-outside-colspace/checks/common2.py", + "usage": "input", + "git_blob": "b0c90e73456c4164beff54799572cf452fd50e48", + "sha256": "031c35a05f18b936a2ae38eafbcac5aa5afc247ae4cacc59179ebe1d53d3c2ba" + }, + { + "path": "research/nine-term-outside-colspace/checks/common2.py-E", + "usage": "input", + "git_blob": "b0c90e73456c4164beff54799572cf452fd50e48", + "sha256": "031c35a05f18b936a2ae38eafbcac5aa5afc247ae4cacc59179ebe1d53d3c2ba" + }, + { + "path": "research/nine-term-outside-colspace/checks/ctl8.py", + "usage": "input", + "git_blob": "64ac7c055c6eb2798ff6bb351c33a56025217161", + "sha256": "c76f7b16acf6968d0a50bab8615b8b5c3b46a7f16e10bf20cad560abc9643c3c" + }, + { + "path": "research/nine-term-outside-colspace/checks/ctl8.py-E", + "usage": "input", + "git_blob": "64ac7c055c6eb2798ff6bb351c33a56025217161", + "sha256": "c76f7b16acf6968d0a50bab8615b8b5c3b46a7f16e10bf20cad560abc9643c3c" + }, + { + "path": "research/nine-term-outside-colspace/checks/ctlb.py", + "usage": "input", + "git_blob": "fbf6f7e6f855b38c685b4b87b95eacba134796ac", + "sha256": "1310ebc59073eea2ca3c3c3291940c1fed9a03472ad48e29c028d38d7e6ee3e2" + }, + { + "path": "research/nine-term-outside-colspace/checks/ctlb.py-E", + "usage": "input", + "git_blob": "11b401e87afda96a6a06ea1d0064ac0b9c00b6f8", + "sha256": "f47eafa5ede2291c074716c67876857b0795d895683795bcc1872c86299051d4" + }, + { + "path": "research/nine-term-outside-colspace/checks/frames.py", + "usage": "input", + "git_blob": "9c6da9e261ada4a2f273775a3bdd56ef0997f8a5", + "sha256": "e2819749b30aa5073560c1f4b46cca13b06ec36feb1d0d7379a29fd9947076c8" + }, + { + "path": "research/nine-term-outside-colspace/checks/frames.py-E", + "usage": "input", + "git_blob": "9c6da9e261ada4a2f273775a3bdd56ef0997f8a5", + "sha256": "e2819749b30aa5073560c1f4b46cca13b06ec36feb1d0d7379a29fd9947076c8" + }, + { + "path": "research/nine-term-outside-colspace/checks/frames_data.py", + "usage": "input", + "git_blob": "1a311809741449372854c8d026422cdf126ab16f", + "sha256": "d4027cd040c3715337c82835132f0dcefdd0ae04ccfdd87d713e89cc710ec406" + }, + { + "path": "research/nine-term-outside-colspace/checks/inputs_check.py", + "usage": "input", + "git_blob": "b8142a4c2a1ad595aeba13ee4285ee2aff80b09e", + "sha256": "9d9516c356fab49a8d1e11a196df0f913213e8a71abbe37de170b3392331f5f2" + }, + { + "path": "research/nine-term-outside-colspace/checks/lib.py", + "usage": "input", + "git_blob": "d27a4f21c51f8f299267c679ae1b6ec6a6fa2077", + "sha256": "a1b1520f1eef030933260974a44bafc1315cca78ec0a3d0793cd9e1d6c049ca4" + }, + { + "path": "research/nine-term-outside-colspace/checks/lib.py-E", + "usage": "input", + "git_blob": "d27a4f21c51f8f299267c679ae1b6ec6a6fa2077", + "sha256": "a1b1520f1eef030933260974a44bafc1315cca78ec0a3d0793cd9e1d6c049ca4" + }, + { + "path": "research/nine-term-outside-colspace/checks/lib2.py", + "usage": "input", + "git_blob": "98c12b102998c96d8aa0aa8f0709b19eae3e5a11", + "sha256": "1808dc520887f7827c23976eddaf9fc01bb01a8ddd454a5015d0831f8491c34b" + }, + { + "path": "research/nine-term-outside-colspace/checks/lib2.py-E", + "usage": "input", + "git_blob": "98c12b102998c96d8aa0aa8f0709b19eae3e5a11", + "sha256": "1808dc520887f7827c23976eddaf9fc01bb01a8ddd454a5015d0831f8491c34b" + }, + { + "path": "research/nine-term-outside-colspace/checks/log_counts.py", + "usage": "input", + "git_blob": "5730d18d34d90ba602781888c56695bdd55c812c", + "sha256": "c7d3e3e8997e20480a9be8e0e68a8441e0cbdfac23b9303bf75cf7aafdac0d67" + }, + { + "path": "research/nine-term-outside-colspace/checks/m9lib.py", + "usage": "input", + "git_blob": "51d3ea2a00798dccf3162b80d1e5b33f72c60188", + "sha256": "52a241733306e72d43e9e680bede59f82be31f301e08d8b29e2e05601e12fe3f" + }, + { + "path": "research/nine-term-outside-colspace/checks/m9lib.py-E", + "usage": "input", + "git_blob": "51d3ea2a00798dccf3162b80d1e5b33f72c60188", + "sha256": "52a241733306e72d43e9e680bede59f82be31f301e08d8b29e2e05601e12fe3f" + }, + { + "path": "research/nine-term-outside-colspace/checks/manifest_check.py", + "usage": "input", + "git_blob": "0c3998171384917a3b687f6ac9823b2a617ad059", + "sha256": "012739ff3dc3421c187ca089b361c0b1d49f808908a5a7efdb0603c20f08ca71" + }, + { + "path": "research/nine-term-outside-colspace/checks/mk_cnt_pkl.py", + "usage": "input", + "git_blob": "d77cd11ea54825a308ae000c001671020815bb13", + "sha256": "54dadb75bb6d928e79bc3df3643be2ab5ae23149bb762e37d8389b4bef2d2bb3" + }, + { + "path": "research/nine-term-outside-colspace/checks/orbits.py", + "usage": "input", + "git_blob": "69a2e5105ae3275104622916695e9c23dd69fa18", + "sha256": "847d2d4bc3fe46e6319abf81f08b0ebde30f67336c8906690122cd17c19336ae" + }, + { + "path": "research/nine-term-outside-colspace/checks/orbits.py-E", + "usage": "input", + "git_blob": "23464fb5ae9e2d2372fd05013f33e058d5e4e45e", + "sha256": "d522f0e21bbab90ccbf59ff8e9ac574df1345ca2b9d1e943bf5201be3c053006" + }, + { + "path": "research/nine-term-outside-colspace/checks/paircensus.py", + "usage": "input", + "git_blob": "0c82eaa101fc865425ed078a11640de45ae8dfd9", + "sha256": "d931a7f96d9104983549d21cc7f588069d08d26abb49feaffe260b0086458c39" + }, + { + "path": "research/nine-term-outside-colspace/checks/paircensus.py-E", + "usage": "input", + "git_blob": "5b68be54095a631d1141f226eae35f4fb0ce940f", + "sha256": "ee81688ce8f60bc9ba9c95afe2d51f51ff8a81767d695c6000f088f67f1b3f49" + }, + { + "path": "research/nine-term-outside-colspace/checks/pairs_fast.py", + "usage": "input", + "git_blob": "26d5ad8b43738115b6ae2c34c6ff495038080916", + "sha256": "9fb39ce1c91b3c0b1eb7dd0f4ea9853136461c7d3c55b5988854b6c6ea4724e9" + }, + { + "path": "research/nine-term-outside-colspace/checks/rank_formula_check.py", + "usage": "input", + "git_blob": "1f49bea80bca9212f6d3dcfde9ab3ec8b2953fc9", + "sha256": "dc11eccd7955878f66a53bfb1c00d3124c2faecc5919287e540fabf3978cfecf" + }, + { + "path": "research/nine-term-outside-colspace/checks/setup9.py", + "usage": "input", + "git_blob": "db0ac3e67a0b5b767830edb4eeaebf6a64f79bc1", + "sha256": "46e2ae37b4de98840a39e5484f33402d853d4a0b0b02b7329a7a4e3d733ff6c6" + }, + { + "path": "research/nine-term-outside-colspace/checks/setup9.py-E", + "usage": "input", + "git_blob": "b1a4cff4d607d996aea8c2a552c31954f3f337bb", + "sha256": "d51e3be305e08692577ce9e8ca82f36954a8d8ddf37e0770d23cf1cc419fdd91" + }, + { + "path": "research/p104-bform-nine-term-floor/PROOF.md", + "usage": "input", + "git_blob": "985fba136012393e2451358534a28ace388383c3", + "sha256": "f907e949607b5bcc6240581dbf7e3407b798d46804232e2c6c3df83c071e4745" + }, + { + "path": "research/p104-bform-nine-term-floor/README.md", + "usage": "input", + "git_blob": "80e0303617dd8e3d1ac0dd96611bdf6d1301ffe3", + "sha256": "c1bc4f65935e475b37ff292afb823fa1be81bf62143291cf35aa0a08f5addeff" + }, + { + "path": "research/p104-bform-nine-term-floor/RESULT.json", + "usage": "input", + "git_blob": "59ce8e34b919a9907220751918ab6a7130373627", + "sha256": "60663dae035f9f18206a96a1136d265cd90cc9d386415ca3c60e8d64f2f8c2b7" + }, + { + "path": "research/p104-bform-nine-term-floor/SOURCES.json", + "usage": "input", + "git_blob": "c7663119e95059967178146fa9b047fb6653d4d3", + "sha256": "48cd7e39d759f2b053617296f18bec8fb975d7b9af606a41c248c11c1f905780" + }, + { + "path": "research/p104-bform-nine-term-floor/TASK.json", + "usage": "input", + "git_blob": "1b1b5fb59e20ee7d8c4d19ca22ac88762c163d3d", + "sha256": "c2c3dc302788d4a086e9c8e540af2d841f19c475c66296dda3f391859e3983c6" + }, + { + "path": "research/p104-bform-nine-term-floor/VERIFY.json", + "usage": "input", + "git_blob": "c50f38097db8a2cd69796c09d1c6d86ffb05ac9c", + "sha256": "2e294c88342a2b8706b2486e27284a1e0b5a6b1abc2c0dc6489f5075ce48bae0" + }, + { + "path": "research/p104-bform-nine-term-floor/checks/bicliques.py", + "usage": "input", + "git_blob": "3cde2e2edbc4e0ffc6867ed1771b0c85d761a20b", + "sha256": "88b7108d141f77314eb7e23baa37dc9e412ac17707df31df83207ea1dd88e80e" + }, + { + "path": "research/p104-bform-nine-term-floor/checks/cnt104z.py", + "usage": "input", + "git_blob": "7b7dc1e5b5b1b09bbdf774cf397ffc322cf412b9", + "sha256": "4889f4f4a44c06d9b13da07e50ba18fb0b4d01d8dd8d3510b263b7bde773a4b2" + }, + { + "path": "research/p104-bform-nine-term-floor/checks/cnt9c.py", + "usage": "input", + "git_blob": "4b3e6b9e1bf37faf402ad2323d19ac59c2b96ca5", + "sha256": "af210ebcaddbb818e989d9085591806a51f7f927672e4b69b190c9404397b34c" + }, + { + "path": "research/p104-bform-nine-term-floor/checks/cnt9z.py", + "usage": "input", + "git_blob": "b2e778b7fdd450c3b21f1bbfc65c42412ea298d6", + "sha256": "93b6930f3ab02acae154981cc769cc100ca6cc90ab78226b87c6ad2684309f58" + }, + { + "path": "research/p104-bform-nine-term-floor/checks/lbz.py", + "usage": "input", + "git_blob": "ba698add987237335e11f799455e2524922dca1f", + "sha256": "496b2e6812a8b51719d71943d65d63753c026c3c9d35a9e20d76e4f4d281aa8b" + }, + { + "path": "research/p104-bform-nine-term-floor/checks/m9lib_surv.py", + "usage": "input", + "git_blob": "4ed3831d73ced64fde0fc3839329cb7cf730c844", + "sha256": "eb766a26d7c5e73ee3c735689720e9657626099a829806ac078563d098da2e8a" + }, + { + "path": "research/p104-bform-nine-term-floor/checks/spanlemma.py", + "usage": "input", + "git_blob": "f8baf58f33d974492b764772ed3ac553a40f63dc", + "sha256": "74191527081156e27cdd42ac6aa1e0c2300a0e2bf1f026cf4d6ae832f56a7527" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/aut104.txt", + "usage": "input", + "git_blob": "cc3e4b617a03a4c8ab0ec614d26db4c021471015", + "sha256": "45755bdc4997e118ba077abad0a45d1de3f3841a9787289008225f8ba6647d9a" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/cliques.txt", + "usage": "input", + "git_blob": "ca7e84b6cb38705f545c96188b7547ab4ca9018d", + "sha256": "68edeafface8260f1757de568478b42bd348cf8e9e87786d497d029f6a845aa9" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/cnt9b.txt", + "usage": "input", + "git_blob": "18cd05f35b186965cfbac13c2e2c4f0d984d6fa9", + "sha256": "1c3d7231b1df72a65c37ccd583fb123e837395de6c446f5b71ea4ce4e6ab6946" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/cnt9c_V0.txt", + "usage": "input", + "git_blob": "d1f61c0e454d50f17f042bbb8e7f109cf37d5f7e", + "sha256": "69ca86822888c4e89c45384f812d07580f7032b38205b2e5dbf24003afdd3bb9" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/cnt9c_V1.txt", + "usage": "input", + "git_blob": "b6af818357586666592642ce75de66772cfce78d", + "sha256": "5d565ba99eeb67a3b56bc6a3f13452d7571aeb0a737a89254faec33bb6d2e2c4" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/cnt9c_V2.txt", + "usage": "input", + "git_blob": "af7403035169f252dd6020abd6f40219a33052a8", + "sha256": "b565277983cf1d8959095d2189a793742dbbebfdcdadece3f5cf728042dda693" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/cnt9c_V3.txt", + "usage": "input", + "git_blob": "5f2ef8496e72d36bde1e8e9847a3ed8f896162cd", + "sha256": "4f697d31daa75f2530ca37fb7131a0343a15c67c02996688708f1ec9154d447c" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/mkcnt.txt", + "usage": "input", + "git_blob": "bd639c929acebd28648991e35a406e8f32d7efa2", + "sha256": "308007139f3da50af6415372f248903082ff9861a2576f00d3e5fdc5947a45e2" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/p104-bform-census.log.gz", + "usage": "input", + "git_blob": "1716f7151f5d43c4fe3251938e85fc7b4ef3853a", + "sha256": "1a33a5343df49b9c42dba36685ff94626535b8337b9b0164b9a7c77623d9c2f3" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/pairs.txt", + "usage": "input", + "git_blob": "313552a6f38f0496a8260c9478e40b5f917796ed", + "sha256": "ed48ffa9ae0cd9c2c0e2bd4c9a63dd31ea9a8dcd8625b5c635b90bc63617dd45" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/floor-v2/bicliques.txt", + "usage": "input", + "git_blob": "c84a8ddfbcb40f3d745f26d4e24dc97a4063e672", + "sha256": "5f2a7d1eeb869d0a30fcc1f05a1a0046203a57f290960439fb490c32496b59f3" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/floor-v2/spanlemma.txt", + "usage": "input", + "git_blob": "5f8b5cce99751db4c22209635e00e7ebd139e716", + "sha256": "140338311ce96e2429e03afcdb038cccd7cc138e011cc915b71cbf2aeff5bb9b" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/pkg-verify-v1/stdout.txt", + "usage": "input", + "git_blob": "a4f73254793a1c85d5e4975ffc4cc43868b8da92", + "sha256": "2d2dce14b0d5d736bdd00dc21e70a8dbc3398694bfb4ce3e46d023cd84a206b8" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/aut104.txt", + "usage": "input", + "git_blob": "cc3e4b617a03a4c8ab0ec614d26db4c021471015", + "sha256": "45755bdc4997e118ba077abad0a45d1de3f3841a9787289008225f8ba6647d9a" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/cliques.txt", + "usage": "input", + "git_blob": "ca7e84b6cb38705f545c96188b7547ab4ca9018d", + "sha256": "68edeafface8260f1757de568478b42bd348cf8e9e87786d497d029f6a845aa9" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/cnt104z.log.gz", + "usage": "input", + "git_blob": "10ec60e73ae4ab0bd56faa7362055f397e72d047", + "sha256": "c98d9c50b049625153039d6c1149e6a71ebd353841d25c55a79def2bfb7118b2" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/cnt9z_V3.txt", + "usage": "input", + "git_blob": "2ca9818ec5ccf9fd875799916c9b8cc445b9d019", + "sha256": "f5c7662ee0543a1dfc8956f6b1fbfec6c5dc91a4a464138375de2b69399073e9" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/lbz_selftest.txt", + "usage": "input", + "git_blob": "aa453e7735f0decb7888e3ca019385d651889a81", + "sha256": "22aae6c1a7e877b9548817140f2d1d38ff72839e39c61ff546328e79dd86f4fb" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/mkcnt.txt", + "usage": "input", + "git_blob": "bd639c929acebd28648991e35a406e8f32d7efa2", + "sha256": "308007139f3da50af6415372f248903082ff9861a2576f00d3e5fdc5947a45e2" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/p104-bform-singular.log.gz", + "usage": "input", + "git_blob": "1f4d9d2eda15423334889d9231279c49a10f8975", + "sha256": "76530a1327ecadd482fcb858ded2904fd9926e9895a2017163ea0d6696286d5a" + }, + { + "path": "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/pairs.txt", + "usage": "input", + "git_blob": "a747e5b4120cca5904db7ff59b075d0c53ad0bbd", + "sha256": "ae01cdaff9853338689404371f734be73b62c0226123e42c6f42f6118626d4f4" + }, + { + "path": "research/p104-bform-nine-term-floor/kaggle/census_driver.py", + "usage": "input", + "git_blob": "e67256bd914308484e3ed5a959d09231231da0a0", + "sha256": "c7fded8bcbf254767cde59eb7fe4cc0f76b3e116a2925b4e2ef406955ca95ecf" + }, + { + "path": "research/p104-bform-nine-term-floor/kaggle/floor_driver.py", + "usage": "input", + "git_blob": "099841a2831d9be91b4184a20e92e123c50fea1f", + "sha256": "3edd1347da77271e86a1b842cf1b5198179869856a2308e12b7fb0683bab922d" + }, + { + "path": "research/p104-bform-nine-term-floor/kaggle/singular_driver.py", + "usage": "input", + "git_blob": "ab58ade703c54bfb27fe8a588586a8537e054785", + "sha256": "c8ba8ca2b1b3a624deb460f6d90bdbd9474820e34c0942cdab8ec4c3f37a2391" + }, + { + "path": "research/p104-bform-nine-term-floor/lean/.gitignore", + "usage": "input", + "git_blob": "01f8cdb637da2370fa79960e25efa59dd8cffd6d", + "sha256": "fde850d24186b6e99c8c0debd641fb3ab85198b109eb66f71a1fea02bd6ea1b3" + }, + { + "path": "research/p104-bform-nine-term-floor/lean/BForm.lean", + "usage": "input", + "git_blob": "0c16ec89ebe2c4ee51c3cf3b829b22e319c91ce4", + "sha256": "9798b7c24756da48b578173c27bf649fcbddd42c7bcde2a5b02c961a223c3a40" + }, + { + "path": "research/p104-bform-nine-term-floor/lean/BForm/CaseI.lean", + "usage": "input", + "git_blob": "fd783ea53f8dc21504e8d283af33b87e12f35a8b", + "sha256": "7f0f5d44c3bd8e6a212ce9a4ec7bb56779e3fa7167d8e89fbcc30a3a755eeb0f" + }, + { + "path": "research/p104-bform-nine-term-floor/lean/BForm/CaseII.lean", + "usage": "input", + "git_blob": "c0ab6fdce48a86894e9b2ffc2109a9ea99bd2351", + "sha256": "cf6cd862cfeab7b2e1e8d1139b292b0d1c82a59003fa8f8a7454fec3e8950b52" + }, + { + "path": "research/p104-bform-nine-term-floor/lean/BForm/Cost.lean", + "usage": "input", + "git_blob": "7d1493f1982bec8d52a7d0c743e4e2e44a2b60bd", + "sha256": "2d3ef68bcb9afa57f0ee9006b9a55ee77c5b0a2e5ce0740f57548cc0baa70392" + }, + { + "path": "research/p104-bform-nine-term-floor/lean/BForm/MJ.lean", + "usage": "input", + "git_blob": "eb26dc887cdb46ff432c94afb3a7551f1395d3fd", + "sha256": "2969b1e09b75fbaa5051a9f13691f943e3f70bdaf9c3f40d46c56ea5cd068a8b" + }, + { + "path": "research/p104-bform-nine-term-floor/lean/BForm/Main.lean", + "usage": "input", + "git_blob": "f2183d552943ea8d37d6fded065e9dfed42d769a", + "sha256": "39354beb981dabbcfb0c1343717ae7b342608c3afd49102257e9a4cd245a5bb1" + }, + { + "path": "research/p104-bform-nine-term-floor/lean/BForm/NormalForm.lean", + "usage": "input", + "git_blob": "f38c07943441821aae2b97acc5147b9d99d499e7", + "sha256": "15e3e2883d1bbc7adcf7d819065cfbefd7fac31f766ecccbff25bced1bf54d8a" + }, + { + "path": "research/p104-bform-nine-term-floor/lean/BForm/Rank.lean", + "usage": "input", + "git_blob": "394327be79fc7e42eaaaa89dabf67502ed6771e8", + "sha256": "70834ae95ffac20a7f27c9f23283149644f494f02453c230b9b5c4007de862f5" + }, + { + "path": "research/p104-bform-nine-term-floor/lean/BForm/YZero.lean", + "usage": "input", + "git_blob": "e10e014c0bdc31ff6696c7efe4adefec3e765051", + "sha256": "0b50f609ee47246c6b2fd31cee13cca4926bccdaf6b9c855326eb7ba70562271" + }, + { + "path": "research/p104-bform-nine-term-floor/lean/README.md", + "usage": "input", + "git_blob": "25bd1174f5c7e6b4178804d6e65300c2c490e861", + "sha256": "becd641928c5ec0c109cab7cd166d947b163265ee66e241a2921c9ef7822a06c" + }, + { + "path": "research/p104-bform-nine-term-floor/lean/lake-manifest.json", + "usage": "input", + "git_blob": "88757f6cc35a0f9efbb0ce4fea32889c1769111b", + "sha256": "50d678e012a348b15335b9f437c411f5b202292f93bdf30116614b5e1623ec18" + }, + { + "path": "research/p104-bform-nine-term-floor/lean/lakefile.toml", + "usage": "input", + "git_blob": "f1f5ff3d7709e210b50401fa223586d3e27d9848", + "sha256": "a1fdc8020d18b7d996bc3dde0d63c904543572cacbdb58d967e76a8aee16aaaa" + }, + { + "path": "research/p104-bform-nine-term-floor/lean/lean-toolchain", + "usage": "input", + "git_blob": "fd85b262bf1c734663aa8292b0101f672168788f", + "sha256": "62c2d9c0fc1ec4c67e151c11eff41ca004ef38e179cf9476c230406e6defedef" + }, + { + "path": "research/p104-bform-nine-term-floor/verify.py", + "usage": "input", + "git_blob": "d1424793f70cfbbfe3d7a0b649e73c721fd8200e", + "sha256": "5fd80e38b9c166cd43ebfb0b535d101a7df75e70baf1c46a9513cab651dd77ee" + }, + { + "path": "research/nine-term-outside-colspace/data/p104_frames.json", + "usage": "input", + "git_blob": "2312a2144ccd801c653013a71b54728ebf0fa6fb", + "sha256": "471c3c68b1ca65e38e05125e3a329dde0cf01a44f5af86fd84eec75e534421f1" + } + ] +} diff --git a/research/p104-span-bitset/STATISTICS.json b/research/p104-span-bitset/STATISTICS.json new file mode 100644 index 0000000000..6d8cc8ebea --- /dev/null +++ b/research/p104-span-bitset/STATISTICS.json @@ -0,0 +1,32 @@ +{ + "benchmark_sha256": "6793c74d03209ecf3a23ec1982586539d5111830fa90122bfceeefaab15d65d0", + "method": "Exact two-sided rank-sum permutation tail over all 252 allocations of ten measured values to two groups of five. Descriptive small-sample check, not a portable performance guarantee.", + "span": { + "U_scalar_above_bitset": 25, + "tail_allocations": 2, + "total_allocations": 252, + "two_sided_p": 0.007936507936507936, + "paired_scalar_minus_bitset_seconds": [ + 1.62325791711919, + 1.5753359580412507, + 1.764432500116527, + 2.0451652919873595, + 1.7700132909230888 + ], + "all_five_pairs_favor_bitset": true + }, + "complete": { + "U_scalar_above_bitset": 23, + "tail_allocations": 8, + "total_allocations": 252, + "two_sided_p": 0.031746031746031744, + "paired_scalar_minus_bitset_seconds": [ + 0.7104139998555183, + 2.5097572500817478, + 2.7535135000944138, + 0.8762030422221869, + 0.9970850418321788 + ], + "all_five_pairs_favor_bitset": true + } +} diff --git a/research/p104-span-bitset/TASK.json b/research/p104-span-bitset/TASK.json new file mode 100644 index 0000000000..fdfbc484fd --- /dev/null +++ b/research/p104-span-bitset/TASK.json @@ -0,0 +1,62 @@ +{ + "schema_version": 1, + "task_id": "replay-runtime", + "priority_revision": 8, + "base_commit": "a5bff3bf133e482541c09eba4e773884bdb2b1b7", + "original_card": { + "id": "replay-runtime", + "question": "Can one measured replay bottleneck be sped up without dropping coverage?", + "starting_points": [ + "scripts/run_isolated_tests.py", + "scripts/verify_replay_coverage.py", + "certificates/selected-result.json" + ], + "methods": [ + "Profile one isolated replay and optimize the measured bottleneck.", + "Design source-bound reuse with explicit dependency invalidation and negative controls." + ], + "acceptance_gate": "Report before/after wall time on the same fixture, retained checks and invalidation behavior.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Resolve the current selected review, separate complex/ordinary BIT/admitted BIT/outer budgets, and compare the card against live handoffs before starting. Historical ceilings require exact source/model equivalence.", + "scope": "Source-binding orientation only; not a scientific replay or all-size proof. Materialize selected inputs if this checkout is sparse." + }, + "first_experiment": "Measure one unchanged fixture, preserve check coverage, and test one optimization with invalidation controls.", + "bottleneck_link": "Faster trustworthy replays increase review throughput and let mechanism candidates be checked sooner.", + "allowed_variations": [ + "Profile one stage or design one source-bound cache boundary." + ], + "scope_change_triggers": [ + "Skipping coverage or comparing different fixtures to claim speedup." + ], + "overlap_terms": [ + "replay runtime", + "cache invalidation", + "isolated tests" + ] + }, + "scope_status": "refined", + "actual_scope": "Replace repeated scalar label parity counts by exact incidence bitsets in the complete P104 span-fact command; measure its complete enclosing bounded verifier with all inherited checks retained.", + "scope_change_reason": "The replay-runtime card permits one profiled stage; this package optimizes the complete retained PR6188 span-fact command and measures its enclosing bounded verifier.", + "bottleneck_link": "The profiled S0 loop dominates the span-fact command. Retaining its complete caller makes the measured gain relevant to the bounded B-form replay.", + "budget_minutes": 60, + "stop_rule": "Ship the first verified complete-command improvement; stop after the incidence substitution. Do not optimize the other replay stages.", + "outcome": "completed", + "evidence": "PROOF.md, verify.py and the generated BENCHMARK.json record the scoped equivalence, complete output comparisons and timings.", + "author": "Nick Petalas", + "ai_assistance": "Independent human and formal proof-kernel review are unclaimed.", + "open_questions": [ + { + "question": "Can the same source-bound incidence representation help another explicit finite-fact consumer?", + "why_it_matters": "Further gains require a measured consumer; this package changes only the S0 stage.", + "first_step": "Profile a different complete command and specify its full retained output and checks before implementing reuse.", + "blocked_by": "No other consumer is measured or adapted here." + } + ], + "claim_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19279602" +} diff --git a/research/p104-span-bitset/VERIFY.json b/research/p104-span-bitset/VERIFY.json new file mode 100644 index 0000000000..6279c86594 --- /dev/null +++ b/research/p104-span-bitset/VERIFY.json @@ -0,0 +1,140 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [ + "numpy==2.5.4" + ], + "inputs": [ + "research/nine-term-outside-colspace/checks/aut104.py", + "research/nine-term-outside-colspace/checks/aut104.py-E", + "research/nine-term-outside-colspace/checks/cert2.py", + "research/nine-term-outside-colspace/checks/cert2.py-E", + "research/nine-term-outside-colspace/checks/cliques.py", + "research/nine-term-outside-colspace/checks/cliques.py-E", + "research/nine-term-outside-colspace/checks/cmp_logs.py", + "research/nine-term-outside-colspace/checks/cnt.py", + "research/nine-term-outside-colspace/checks/cnt.py-E", + "research/nine-term-outside-colspace/checks/cnt10.py", + "research/nine-term-outside-colspace/checks/cnt10.py-E", + "research/nine-term-outside-colspace/checks/cnt104b.py", + "research/nine-term-outside-colspace/checks/cnt104b.py-E", + "research/nine-term-outside-colspace/checks/cnt4.py", + "research/nine-term-outside-colspace/checks/cnt4.py-E", + "research/nine-term-outside-colspace/checks/cnt6.py", + "research/nine-term-outside-colspace/checks/cnt6.py-E", + "research/nine-term-outside-colspace/checks/cnt7.py", + "research/nine-term-outside-colspace/checks/cnt7.py-E", + "research/nine-term-outside-colspace/checks/cnt8.py", + "research/nine-term-outside-colspace/checks/cnt8.py-E", + "research/nine-term-outside-colspace/checks/cnt9.py", + "research/nine-term-outside-colspace/checks/cnt9.py-E", + "research/nine-term-outside-colspace/checks/cnt9b.py", + "research/nine-term-outside-colspace/checks/cnt9b.py-E", + "research/nine-term-outside-colspace/checks/common2.py", + "research/nine-term-outside-colspace/checks/common2.py-E", + "research/nine-term-outside-colspace/checks/ctl8.py", + "research/nine-term-outside-colspace/checks/ctl8.py-E", + "research/nine-term-outside-colspace/checks/ctlb.py", + "research/nine-term-outside-colspace/checks/ctlb.py-E", + "research/nine-term-outside-colspace/checks/frames.py", + "research/nine-term-outside-colspace/checks/frames.py-E", + "research/nine-term-outside-colspace/checks/frames_data.py", + "research/nine-term-outside-colspace/checks/inputs_check.py", + "research/nine-term-outside-colspace/checks/lib.py", + "research/nine-term-outside-colspace/checks/lib.py-E", + "research/nine-term-outside-colspace/checks/lib2.py", + "research/nine-term-outside-colspace/checks/lib2.py-E", + "research/nine-term-outside-colspace/checks/log_counts.py", + "research/nine-term-outside-colspace/checks/m9lib.py", + "research/nine-term-outside-colspace/checks/m9lib.py-E", + "research/nine-term-outside-colspace/checks/manifest_check.py", + "research/nine-term-outside-colspace/checks/mk_cnt_pkl.py", + "research/nine-term-outside-colspace/checks/orbits.py", + "research/nine-term-outside-colspace/checks/orbits.py-E", + "research/nine-term-outside-colspace/checks/paircensus.py", + "research/nine-term-outside-colspace/checks/paircensus.py-E", + "research/nine-term-outside-colspace/checks/pairs_fast.py", + "research/nine-term-outside-colspace/checks/rank_formula_check.py", + "research/nine-term-outside-colspace/checks/setup9.py", + "research/nine-term-outside-colspace/checks/setup9.py-E", + "research/p104-bform-nine-term-floor/PROOF.md", + "research/p104-bform-nine-term-floor/README.md", + "research/p104-bform-nine-term-floor/RESULT.json", + "research/p104-bform-nine-term-floor/SOURCES.json", + "research/p104-bform-nine-term-floor/TASK.json", + "research/p104-bform-nine-term-floor/VERIFY.json", + "research/p104-bform-nine-term-floor/checks/bicliques.py", + "research/p104-bform-nine-term-floor/checks/cnt104z.py", + "research/p104-bform-nine-term-floor/checks/cnt9c.py", + "research/p104-bform-nine-term-floor/checks/cnt9z.py", + "research/p104-bform-nine-term-floor/checks/lbz.py", + "research/p104-bform-nine-term-floor/checks/m9lib_surv.py", + "research/p104-bform-nine-term-floor/checks/spanlemma.py", + "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/aut104.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/cliques.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/cnt9b.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/cnt9c_V0.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/cnt9c_V1.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/cnt9c_V2.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/cnt9c_V3.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/mkcnt.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/p104-bform-census.log.gz", + "research/p104-bform-nine-term-floor/evidence/kaggle/census-v1/pairs.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/floor-v2/bicliques.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/floor-v2/spanlemma.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/pkg-verify-v1/stdout.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/aut104.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/cliques.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/cnt104z.log.gz", + "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/cnt9z_V3.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/lbz_selftest.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/mkcnt.txt", + "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/p104-bform-singular.log.gz", + "research/p104-bform-nine-term-floor/evidence/kaggle/singular-v1/pairs.txt", + "research/p104-bform-nine-term-floor/kaggle/census_driver.py", + "research/p104-bform-nine-term-floor/kaggle/floor_driver.py", + "research/p104-bform-nine-term-floor/kaggle/singular_driver.py", + "research/p104-bform-nine-term-floor/lean/.gitignore", + "research/p104-bform-nine-term-floor/lean/BForm.lean", + "research/p104-bform-nine-term-floor/lean/BForm/CaseI.lean", + "research/p104-bform-nine-term-floor/lean/BForm/CaseII.lean", + "research/p104-bform-nine-term-floor/lean/BForm/Cost.lean", + "research/p104-bform-nine-term-floor/lean/BForm/MJ.lean", + "research/p104-bform-nine-term-floor/lean/BForm/Main.lean", + "research/p104-bform-nine-term-floor/lean/BForm/NormalForm.lean", + "research/p104-bform-nine-term-floor/lean/BForm/Rank.lean", + "research/p104-bform-nine-term-floor/lean/BForm/YZero.lean", + "research/p104-bform-nine-term-floor/lean/README.md", + "research/p104-bform-nine-term-floor/lean/lake-manifest.json", + "research/p104-bform-nine-term-floor/lean/lakefile.toml", + "research/p104-bform-nine-term-floor/lean/lean-toolchain", + "research/p104-bform-nine-term-floor/verify.py", + "research/nine-term-outside-colspace/data/p104_frames.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 180, + "checks": "Complete scalar/bitset span and enclosing bounded-verifier output equality; literal sections and every actual label pair; invalid inputs and source/section/normalization controls." + }, + { + "argv": [ + "{python}", + "-W", + "error", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 180, + "checks": "Repeat conformance with optimized parent, retaining normal child execution so every predecessor assertion remains active." + } + ] +} diff --git a/research/p104-span-bitset/benchmark.py b/research/p104-span-bitset/benchmark.py new file mode 100644 index 0000000000..05a5dd7eb5 --- /dev/null +++ b/research/p104-span-bitset/benchmark.py @@ -0,0 +1,53 @@ +"""Five alternating complete-command pairs; produced by Nick Petalas, Apache-2.0.""" +import hashlib +import json +import os +import platform +import statistics +import sys + +from incidence import require +from replay import PACKAGE, authenticate +from verify import captured + + +def measure(scope): + samples = {"scalar": [], "bitset": []} + expected = None + transcript_hashes = [] + for pair in range(5): + order = ("scalar", "bitset") if pair % 2 == 0 else ("bitset", "scalar") + for engine in order: + elapsed, output = captured(scope, engine) + if expected is None: + expected = output + require(output == expected, "complete benchmark output mismatch") + samples[engine].append(elapsed) + transcript_hashes.append(hashlib.sha256(output.encode()).hexdigest()) + medians = {key: statistics.median(values) for key, values in samples.items()} + return {"seconds": samples, "median_seconds": medians, + "range_seconds": {key: [min(values), max(values)] for key, values in samples.items()}, + "reduction": 1 - medians["bitset"] / medians["scalar"], + "completed_commands": len(transcript_hashes), "errors": 0, + "transcript_sha256": transcript_hashes} + + +def main(): + require(len(sys.argv) == 1, "benchmark writes JSON to stdout") + authenticate() + record = {"schema_version": 1, "python": sys.version, + "platform": platform.platform(), "numpy": __import__("numpy").__version__, + "logical_cpus": os.cpu_count(), "load_average_before": os.getloadavg(), + "method": "five alternating fresh-process pairs per complete command; all work timed"} + for scope in ("span", "complete"): + record[scope] = measure(scope) + record["load_average_after"] = os.getloadavg() + record["implementation_sha256"] = { + path.name: hashlib.sha256(path.read_bytes()).hexdigest() + for path in sorted(PACKAGE.glob("*.py"))} + record["source_manifest_sha256"] = hashlib.sha256((PACKAGE / "SOURCES.json").read_bytes()).hexdigest() + print(json.dumps(record, indent=2, sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/research/p104-span-bitset/incidence.py b/research/p104-span-bitset/incidence.py new file mode 100644 index 0000000000..f04bfee1b6 --- /dev/null +++ b/research/p104-span-bitset/incidence.py @@ -0,0 +1,27 @@ +"""Exact binary incidence sections; Apache-2.0, produced by Nick Petalas.""" + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def zero_masks(ports, width): + """Bit i is set precisely when port i pairs evenly with the section.""" + require(type(width) is int and 2 <= width <= 9, "width must be 2..9") + require(type(ports) is tuple and len(ports) <= 1 << width, "bounded port tuple") + require(all(type(q) is int and 0 <= q < 1 << width for q in ports), + "port labels must fit the declared width") + require(len(set(ports)) == len(ports), "distinct port labels") + return tuple(sum(1 << i for i, q in enumerate(ports) + if (q & z).bit_count() % 2 == 0) + for z in range(1, 1 << width)) + + +def capacities(ports, width): + """Retain every unordered pair of distinct nonzero section labels.""" + masks = zero_masks(ports, width) + one = max(mask.bit_count() for mask in masks) + two = max((first & second).bit_count() + for i, first in enumerate(masks) for second in masks[i + 1:]) + return {width - 2: two, width - 1: one} diff --git a/research/p104-span-bitset/replay.py b/research/p104-span-bitset/replay.py new file mode 100644 index 0000000000..43f814b197 --- /dev/null +++ b/research/p104-span-bitset/replay.py @@ -0,0 +1,90 @@ +"""Source-bound scalar/bitset replay adapter; Apache-2.0. + +Produced by Nick Petalas. Matarener retains the original replay and facts. +""" +import argparse +import hashlib +import json +import sys +from pathlib import Path + +from incidence import capacities, require + +PACKAGE = Path(__file__).resolve().parent +ROOT = PACKAGE.parent.parent +PREDECESSOR = ROOT / "research/p104-bform-nine-term-floor" + + +def checked_bytes(path, expected): + require(path.is_file() and not path.is_symlink(), "regular source input") + require(path.stat().st_size <= 16 * 1024 * 1024, "bounded source input") + data = path.read_bytes() + require(hashlib.sha256(data).hexdigest() == expected, "source hash mismatch") + return data + + +def authenticate(): + manifest = PACKAGE / "SOURCES.json" + require(manifest.stat().st_size <= 1024 * 1024, "bounded source manifest") + rows = json.loads(manifest.read_text())["files"] + require(len(rows) <= 256, "bounded source inventory") + for row in rows: + if row["usage"] == "input": + relative = Path(row["path"]) + require(not relative.is_absolute() and ".." not in relative.parts, + "relative source path") + checked_bytes(ROOT / relative, row["sha256"]) + + +def span_source(engine): + path = PREDECESSOR / "checks/spanlemma.py" + source = path.read_text() + # The original unrecognised \H escape is literal in its docstring. + # Raw spelling preserves that value while permitting warning-strict compile. + require(source.startswith('"""Finite facts'), "exact predecessor docstring") + source = "r" + source + if engine == "bitset": + start = source.index("# S0\n") + end = source.index("# S1 normals\n") + old = source[start:end] + definitions = old[len("# S0\n"):old.index("f = {}\n")] + tail = old[old.index("log('S0 label caps"):] + source = (source[:start] + definitions + "f = capacities(tuple(P), 9)\n" + tail + + source[end:]) + return path, source + + +def complete_source(engine): + path = PREDECESSOR / "verify.py" + source = path.read_text() + old = "o = run(PKG / 'checks' / 'spanlemma.py')" + require(source.count(old) == 1, "unique complete-consumer substitution") + if engine == "bitset": + new = (f"o = run(Path({str(PACKAGE / 'replay.py')!r}), " + "'--scope', 'span', '--engine', 'bitset')") + source = source.replace(old, new) + return path, source + + +def replay(scope, engine): + require(scope in ("span", "complete"), "known replay scope") + require(engine in ("scalar", "bitset"), "known replay engine") + require(not sys.flags.optimize, "retain every predecessor assertion") + authenticate() + path, source = span_source(engine) if scope == "span" else complete_source(engine) + namespace = {"__file__": str(path), "__name__": "__main__", + "capacities": capacities} + sys.argv = [str(path)] + exec(compile(source, str(path), "exec"), namespace) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--scope", choices=("span", "complete"), required=True) + parser.add_argument("--engine", choices=("scalar", "bitset"), required=True) + args = parser.parse_args() + replay(args.scope, args.engine) + + +if __name__ == "__main__": + main() diff --git a/research/p104-span-bitset/verify.py b/research/p104-span-bitset/verify.py new file mode 100644 index 0000000000..9909011805 --- /dev/null +++ b/research/p104-span-bitset/verify.py @@ -0,0 +1,179 @@ +"""Conformance for the bitset substitution; produced by Nick Petalas, Apache-2.0.""" +import ast +import hashlib +import json +import os +import re +import statistics +import subprocess +import sys +import tempfile +import time +from pathlib import Path + +from incidence import capacities, require, zero_masks +from replay import PACKAGE, PREDECESSOR, ROOT, authenticate, checked_bytes + + +def normalized(output): + return re.sub(r"(?m)^\[\s*\d+\.\d+s\] ", "", output) + + +def captured(scope, engine): + with tempfile.TemporaryDirectory(prefix="span-bytecode-") as temporary: + env = dict(os.environ, PYTHONPYCACHEPREFIX=temporary, + PYTHONDONTWRITEBYTECODE="1", PYTHONHASHSEED="0") + env.pop("PYTHONOPTIMIZE", None) + env.pop("FULL", None) + argv = [sys.executable, "-B", str(PACKAGE / "replay.py"), + "--scope", scope, "--engine", engine] + start = time.perf_counter() + result = subprocess.run(argv, cwd=ROOT, env=env, capture_output=True, + text=True, timeout=180, check=False) + elapsed = time.perf_counter() - start + require(result.returncode == 0, f"{scope}/{engine} failed: {result.stderr[-2000:]}") + require(len(result.stdout) <= 1024 * 1024, "bounded replay output") + marker = "PASS_P104_BFORM_NINE_TERM_FLOOR" if scope == "complete" else "PASS\nDONE" + output = normalized(result.stdout) + require(marker in output, "completed scientific command") + return elapsed, output + + +def literal_section(ports, z, width): + bits = [] + for q in ports: + parity = sum(((q >> bit) & 1) * ((z >> bit) & 1) + for bit in range(width)) % 2 + bits.append(parity == 0) + return tuple(bits) + + +def check_case(ports, width, sections=zero_masks): + masks = sections(ports, width) + require(len(masks) == (1 << width) - 1, "all nonzero sections retained") + literal = tuple(literal_section(ports, z, width) for z in range(1, 1 << width)) + for mask, expected in zip(masks, literal): + require(tuple(bool(mask >> i & 1) for i in range(len(ports))) == expected, + "literal section equality") + best = 0 + pairs = 0 + for i, first in enumerate(literal): + for j in range(i + 1, len(literal)): + scalar = sum(a and b for a, b in zip(first, literal[j])) + require((masks[i] & masks[j]).bit_count() == scalar, "pair incidence equality") + best = max(best, scalar) + pairs += 1 + actual = capacities(ports, width) + require(actual == {width - 2: best, width - 1: max(map(sum, literal))}, + "complete capacity equality") + return pairs + + +def finite_cases(): + cases = pairs = 0 + for width in (2, 3): + for subset in range(1 << (1 << width)): + ports = tuple(q for q in range(1 << width) if subset >> q & 1) + pairs += check_case(ports, width) + cases += 1 + for subset in (0, 1, 65535, 21845, 43690, 32769, 3855, 61680): + ports = tuple(q for q in range(16) if subset >> q & 1) + pairs += check_case(ports, 4) + cases += 1 + source = (PREDECESSOR / "checks/spanlemma.py").read_text() + assignments = (node for node in ast.parse("r" + source).body if isinstance(node, ast.Assign)) + ports = next(ast.literal_eval(node.value) for node in assignments + if any(isinstance(t, ast.Name) and t.id == "P" for t in node.targets)) + pairs += check_case(tuple(ports), 9) + return {"fixtures": cases + 1, "section_pairs": pairs, "actual_port_count": len(ports)} + + +def rejected(call, message): + try: + call() + except ValueError: + return + raise ValueError(message) + + +def controls(): + for ports, width in (((0,), 1), ((0,), 10), ((0,), True), ((0, 0), 2), + ((-1,), 2), ((4,), 2), ([0], 2), ((0.0,), 2)): + rejected(lambda: zero_masks(ports, width), "invalid input accepted") + rejected(lambda: check_case((0, 1, 2, 3), 2, + lambda p, w: (0, 0, 0)), "zero section mutation") + rejected(lambda: check_case((0, 1, 2, 3), 2, + lambda p, w: zero_masks(p, w)[:-1]), "missing section mutation") + with tempfile.TemporaryDirectory(prefix="span-source-control-") as directory: + original = (PREDECESSOR / "checks/spanlemma.py").read_bytes() + path = Path(directory) / "changed.py" + path.write_bytes(original + b"\n# changed\n") + rejected(lambda: checked_bytes(path, hashlib.sha256(original).hexdigest()), + "changed actual source accepted") + require(normalized("[ 2.4s] count 36\n") == "count 36\n", "timestamp normalization") + require(normalized("[ 2.4s] count 36\n") != normalized("[ 1.0s] count 35\n"), + "scientific value remains visible") + return 13 + + +def check_record(record, transcripts, source_hashes): + require(record["implementation_sha256"] == source_hashes, "benchmark implementation binding") + digest = hashlib.sha256((PACKAGE / "SOURCES.json").read_bytes()).hexdigest() + require(record["source_manifest_sha256"] == digest, "benchmark input binding") + for scope in ("span", "complete"): + result = record[scope] + require(result["completed_commands"] == 10 and result["errors"] == 0, + "complete error-free timing domain") + require(result["transcript_sha256"] == [transcripts[scope]] * 10, + "benchmark transcript binding") + for engine in ("scalar", "bitset"): + values = result["seconds"][engine] + require(len(values) == 5 and all(type(x) is float and 0 < x < 180 for x in values), + "five bounded timing samples") + require(statistics.median(values) == result["median_seconds"][engine], + "generated timing median") + require([min(values), max(values)] == result["range_seconds"][engine], + "generated timing range") + expected = 1 - result["median_seconds"]["bitset"] / result["median_seconds"]["scalar"] + require(result["reduction"] == expected and expected > 0, "generated improvement") + + +def record_controls(record, transcripts, source_hashes): + for kind in ("source", "median", "transcript"): + changed = json.loads(json.dumps(record)) + if kind == "source": + changed["source_manifest_sha256"] = "0" * 64 + elif kind == "median": + changed["complete"]["median_seconds"]["bitset"] += 1 + else: + changed["complete"]["transcript_sha256"][0] = "0" * 64 + rejected(lambda: check_record(changed, transcripts, source_hashes), + "changed benchmark record accepted") + + +def main(): + require(len(sys.argv) == 1, "verifier takes no arguments") + authenticate() + finite = finite_cases() + finite["controls"] = controls() + transcripts = {} + for scope in ("span", "complete"): + _, scalar = captured(scope, "scalar") + _, bitset = captured(scope, "bitset") + require(scalar == bitset, "complete normalized output equality") + transcripts[scope] = hashlib.sha256(scalar.encode()).hexdigest() + source_hashes = {path.name: hashlib.sha256(path.read_bytes()).hexdigest() + for path in sorted(PACKAGE.glob("*.py"))} + path = PACKAGE / "BENCHMARK.json" + require(path.stat().st_size <= 65536, "bounded generated timing record") + record = json.loads(path.read_text()) + check_record(record, transcripts, source_hashes) + record_controls(record, transcripts, source_hashes) + finite["controls"] += 3 + print(json.dumps({"finite": finite, "transcripts": transcripts, + "implementation_sha256": source_hashes}, sort_keys=True)) + print("PASS_P104_SPAN_BITSET") + + +if __name__ == "__main__": + main()