diff --git a/research/p112-inherited-bounds-audit/CHECKS.json b/research/p112-inherited-bounds-audit/CHECKS.json new file mode 100644 index 0000000000..0525b90107 --- /dev/null +++ b/research/p112-inherited-bounds-audit/CHECKS.json @@ -0,0 +1,64 @@ +{ + "schema": "p112-inherited-bounds-checks/v1", + "environment": { + "python": "3.12.3", + "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", + "dependencies": "standard library only" + }, + "base": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "priority_revision": 6, + "evidence_status": "Fresh computational audit relative to predecessor implementations and written proof; no independent human or proof-kernel acceptance.", + "new_registered_replay": "PASS primary and controls under -I -O -Werror -B, including final coordinate reconstruction and signed-simple-root membership gates.", + "new_domains": { + "global_five_spaces": 3309747, + "global_six_spaces": 788035, + "A2_planes": 1120, + "large_A2_fibers": 3360, + "inside_rank5_tests": 8961120, + "inside_rank6_tests": 426720, + "signed_reflection_images": 1920, + "polarization_pairs": 65536 + }, + "controls": { + "complete_small_space_oracle": 464, + "binary_basis_oracle_cases": 6780, + "nondegenerate_negative_Gauss_counterexamples": 4, + "characteristic_zero_boundary_controls": 2, + "semantic_rejections": 4, + "actual_optimized_rejecting_CLI_runs": 3 + }, + "predecessor_registered_replays": { + "PR3269 e8-quadratic-support-capacity": "PASS primary, separate model, seven behavioral groups", + "PR3280 e8-a2-joint-incidence20": "PASS primary, crosscheck, source7/hypothesis6 controls", + "PR3288 e8-a2-analytic-rank6": "PASS primary, separate hyperplane/witness reconstruction, inventory5/source3/hypothesis7 controls" + }, + "predecessor_public_bytes": "37 Git blobs at exact public heads match canonical main; PREDECESSORS.json lists every path. Ledger status remains partially reviewed.", + "written_audit": { + "signed_analytic_proofs": "No objection found; positive saturated Gauss sign retained, arbitrary outside-span support cases covered.", + "chamber": "Elementary finite-group maximization proof from finite signed-root closure and positive simple-coordinate signs; no external Weyl-chamber theorem left as a black box for these exact implications.", + "scalar_extension": "Rational rank/kernel proof for arbitrary characteristic-zero K; no embedding in R or C.", + "coefficient_fibers": "Rational determinant test binds arbitrary K coefficient columns to one rational projective fiber when singleton sites exist." + }, + "development_fix": "An initial replay rejected receipt serialization because numeric histogram keys sorted differently after JSON stringification. Keys are now strings at construction; histogram values and proof bounds were unchanged. The complete final replay and controls pass.", + "entry_overlap": { + "at": "2026-10-19T06:08:36Z", + "open_PR_bodies": 650, + "complete_PR_pagination": true, + "local_records": 2490, + "Discussions": "Partial latest rendered C5 and handoff context; all-board helper refresh unavailable without gh." + }, + "unrun_obligations": [ + "Independent human or formal-kernel acceptance", + "All other caller/reduction premises and full C5", + "Selected cold replay, native/physical/restoration/consumer/supplier/all-size admission, Lean and Docker" + ], + "lint": "No Ruff pass claimed; local Ruff previously crashed before diagnostics. Syntax, JSON, whitespace and bounded registered checks are used.", + "final_checkpoint": { + "canonical_main": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "priority_revision": 6, + "at": "2026-10-19T06:26:22Z", + "open_PR_bodies": 653, + "complete_PR_pagination": true, + "browser": "Latest loaded C5 and handoff text checked; no overlapping active audit seen. Discussion coverage remains partial." + } +} diff --git a/research/p112-inherited-bounds-audit/PREDECESSORS.json b/research/p112-inherited-bounds-audit/PREDECESSORS.json new file mode 100644 index 0000000000..c2f087dad9 --- /dev/null +++ b/research/p112-inherited-bounds-audit/PREDECESSORS.json @@ -0,0 +1,173 @@ +{ + "schema": "p112-inherited-audit-predecessors/v1", + "canonical_main": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "status": "Exact public-head file blobs all match canonical main; archival ledger status remains partially reviewed.", + "predecessors": [ + { + "pr": 3269, + "head": "ebe02d33157dc6c6d3b35df204e4a39242b7429e", + "files": [ + { + "path": "research/e8-quadratic-support-capacity/CHECKS.json", + "git_blob": "6491305f0f73e2c9dd927015fe896ccdbc2e3984" + }, + { + "path": "research/e8-quadratic-support-capacity/ENGINEERING.md", + "git_blob": "ac9ca4ecab5072161ed2cf9f7dd803a3db4c18fb" + }, + { + "path": "research/e8-quadratic-support-capacity/PROOF.md", + "git_blob": "4da8e98edcfbbb9d5cd17b7ee921aa323d2fc724" + }, + { + "path": "research/e8-quadratic-support-capacity/README.md", + "git_blob": "9256b87d2b6e25afb311d04434b64da0145885e9" + }, + { + "path": "research/e8-quadratic-support-capacity/RESULT.json", + "git_blob": "c500166c56c36b42efe7fe592b8119fa04e83cda" + }, + { + "path": "research/e8-quadratic-support-capacity/REVIEW.json", + "git_blob": "29f2daed60757ea53c258b18f4e2915fd3758721" + }, + { + "path": "research/e8-quadratic-support-capacity/SOURCES.json", + "git_blob": "2a6571da234ed6a28d20709030502d4101ab17c4" + }, + { + "path": "research/e8-quadratic-support-capacity/TASK.json", + "git_blob": "8be4968fa9080a0136af70bf4818b8f665e63514" + }, + { + "path": "research/e8-quadratic-support-capacity/VERIFY.json", + "git_blob": "b8648f50f8466bad34f57901b58636164aef7c86" + }, + { + "path": "research/e8-quadratic-support-capacity/independent.py", + "git_blob": "e9a448cd172491eb6dbfe597260126546b0cb7c2" + }, + { + "path": "research/e8-quadratic-support-capacity/test_verify.py", + "git_blob": "46e6096ed33281e3ae0066afb427fa97fd537697" + }, + { + "path": "research/e8-quadratic-support-capacity/verify.py", + "git_blob": "703cfa2a5125c311300cb4a22304b24abd38ae7c" + } + ] + }, + { + "pr": 3280, + "head": "c55a161982f0a94950a8f2653fe00fd387d2a0d5", + "files": [ + { + "path": "research/e8-a2-joint-incidence20/CHECKS.json", + "git_blob": "f96f2d7588f268a5dd478d9e7040eb58b1bf2ac5" + }, + { + "path": "research/e8-a2-joint-incidence20/ENGINEERING.md", + "git_blob": "c42b10e40dae21f582cb5ca00bc17397c3b57fc7" + }, + { + "path": "research/e8-a2-joint-incidence20/PREDECESSORS.json", + "git_blob": "4060ab1ae6c80e994186b8c03287e34f09d667a9" + }, + { + "path": "research/e8-a2-joint-incidence20/PROOF.md", + "git_blob": "8c7d950e81b1797d1b6d6ef16a027be7fe7cb7ac" + }, + { + "path": "research/e8-a2-joint-incidence20/README.md", + "git_blob": "4d872acb5884cb5a47b7ab11089005c956a5a342" + }, + { + "path": "research/e8-a2-joint-incidence20/RESULT.json", + "git_blob": "681e710151765c4cf2a55cac41e8379f45ad2fc9" + }, + { + "path": "research/e8-a2-joint-incidence20/REVIEW.json", + "git_blob": "386c215c230bb48ee08473f33f88157353a4d7f6" + }, + { + "path": "research/e8-a2-joint-incidence20/SOURCES.json", + "git_blob": "ae564a10d52e473bc2fa4d42ee938ec0deefa15e" + }, + { + "path": "research/e8-a2-joint-incidence20/TASK.json", + "git_blob": "e61a11eb873f06e9b305d03e6386e9e8026507eb" + }, + { + "path": "research/e8-a2-joint-incidence20/VERIFY.json", + "git_blob": "054373a8e12000c9ea3ddff0659495764a5dbc64" + }, + { + "path": "research/e8-a2-joint-incidence20/crosscheck.py", + "git_blob": "b6e8e3092b3612d698c76ed93172b1e62ddeee32" + }, + { + "path": "research/e8-a2-joint-incidence20/test_controls.py", + "git_blob": "e67eae64e24f78a8492c3790f6fda6026828a8ee" + }, + { + "path": "research/e8-a2-joint-incidence20/verify.py", + "git_blob": "03c95dd39ffa272a866da7a367e2989ce5221069" + } + ] + }, + { + "pr": 3288, + "head": "c375ed42aabf1b8cdcaae0cc565540d0eda9fa0e", + "files": [ + { + "path": "research/e8-a2-analytic-rank6/PROOF.md", + "git_blob": "8a7cc2e989101322f289bb98102ff40097841779" + }, + { + "path": "research/e8-a2-analytic-rank6/README.md", + "git_blob": "21532744de39e97b4a0021a71067e8ec2c57a652" + }, + { + "path": "research/e8-a2-analytic-rank6/RESULT.json", + "git_blob": "e63d4b6048d9997d3c9b506947f8907b6e318ddf" + }, + { + "path": "research/e8-a2-analytic-rank6/REVIEW.json", + "git_blob": "eacdf2d0f45512ef4d33caec6bdd1947a11c916e" + }, + { + "path": "research/e8-a2-analytic-rank6/SOURCES.json", + "git_blob": "d2deae116cbfbc91bb15670567938ad90712c25b" + }, + { + "path": "research/e8-a2-analytic-rank6/TASK.json", + "git_blob": "a8b52fcb6f68805ef577f45ffb1aa07aa09f66dd" + }, + { + "path": "research/e8-a2-analytic-rank6/VERIFY.json", + "git_blob": "a7eabd8fd6ecf66598567c33003366818bddaa7d" + }, + { + "path": "research/e8-a2-analytic-rank6/independent.py", + "git_blob": "f916d6289fdc900ea1f61af0cc5cdb2519e17dec" + }, + { + "path": "research/e8-a2-analytic-rank6/test_verify.py", + "git_blob": "8bf0ab97efbe0ebe53ef5759b19211e6ce53043d" + }, + { + "path": "research/e8-a2-analytic-rank6/vendor/pr3262-PROOF.md", + "git_blob": "315adf2b2a6f0fbadb588f781f45f97cc48f556e" + }, + { + "path": "research/e8-a2-analytic-rank6/vendor/pr3280-PROOF.md", + "git_blob": "8c7d950e81b1797d1b6d6ef16a027be7fe7cb7ac" + }, + { + "path": "research/e8-a2-analytic-rank6/verify.py", + "git_blob": "9191267dfd6579acaece92ef31a6d10dc7060915" + } + ] + } + ] +} diff --git a/research/p112-inherited-bounds-audit/PROOF.md b/research/p112-inherited-bounds-audit/PROOF.md new file mode 100644 index 0000000000..86d2fce57d --- /dev/null +++ b/research/p112-inherited-bounds-audit/PROOF.md @@ -0,0 +1,292 @@ +# Audit of inherited support, incidence and field arguments + +## Scope and findings + +On the exact declared E8/P112 root labels, this audit confirms global support +capacities12/20 and A2 joint incidence20/32, hence also the inherited22/32. +The stronger rank-five20 is Nick Petalas's existing PR3280 theorem, not a new +bound. His PR3269 and PR3288 supply the existing analytic global and rank-six +proofs. No mathematical objection was found in those arguments. + +The new finite implementation imports no predecessor executable. It gives a +complete alternative check of the global and incidence upper bounds. The +written chamber argument below derives precisely the needed geometric statement +from finite reflection closure and positivity, without leaving the standard +Weyl-chamber theorem as an unproved external premise. The scalar-extension step +uses rational matrix rank; it makes no assumption that K embeds in R or C. + +This is a written proof and independent computational audit of predecessor +packages, not independent human or proof-kernel acceptance. It establishes no +full C5, global decoder floor, physical supplier, new kappa or selected result. + +## 1. Exact model and complete subspace domains + +Let R contain the120 doubled E8 root-line representatives of norm8, oriented +by their first nonzero coordinate. The live P112 rows are parsed directly from +the canonical original caller table. Adding the eight omitted frame lines +`2e_0 +/-2e_1, ..., 2e_6 +/-2e_7` produces exactly the full elementary E8 root +patterns:56 two-coordinate lines and64 all-odd lines with even minus parity. + +The simple roots alpha_i form an invertible rational basis. Their literal +definition is compared with the pinned predecessor source by AST literal +parsing; that source is never executed. Dense exact elimination supplies every +root's integral coordinates c_i. The labels are + + ell(r) = (1, c mod2) in F2^9, + +with the fixed coordinate in bit0. All112 original caller labels agree in +order. Thus this audit uses the actual support-rank convention. It also checks +the live evaluation Gram matrix112 I_8. + +For n-dimensional binary space, a d-space is the kernel of a unique +(n-d)-dimensional annihilator. In the reversed-column reduced-echelon convention, +each annihilator row has highest pivot p, other pivot columns zero, arbitrary +nonpivot columns below p, and zero columns above p. Choosing its pivot set and +all those free bits enumerates every annihilator exactly once. Rank-nullity +then gives every d-space exactly once. This is a mathematical coverage argument; +an expected cardinality alone would not prove uniqueness or completeness. + +The checker counts all3,309,747 five-spaces and788,035 six-spaces of F2^9. +Their full-root trace maxima are12 and20. Their P112 trace maxima are also12 +and20, with literal spanning witnesses retained in RESULT.json. Any smaller +support span extends to a checked space, so these are bounds for binary ranks +at most5/6, not only equality-rank spaces or full binary closures. The receipt +records complete trace-size histograms. A separate small-domain control compares +the enumerator against every generating subset through binary dimension5. + +These direct counts independently discharge the exact global capacities used +by the inherited caller. They do not assume the analytic character-sum proof. + +## 2. Audit the signed analytic support argument + +The quadratic form on eight-bit residues is + + q(x) = sum_i x_i + sum_(i0, + +contradiction. Thus u is in the closed chamber defined by all eight nonnegative +simple-root pairings. This argument proves the needed chamber property; it +does not infer it merely from a reflection-closure PASS marker. + +Every root has all its checked simple coordinates nonnegative or all +nonpositive. For a positive root beta=sum c_i alpha_i, its pairing with u is +a sum of nonnegative terms. It vanishes exactly when c_i=0 at each index +where u dot alpha_i>0. The perpendicular roots are therefore precisely the +roots supported on the vanishing simple-coordinate indices. Those simple +roots themselves belong to the face and form its basis. This proves the +needed parabolic-face assertion directly, without an unproved classification +or Weyl-chamber theorem. + +The finite face inventory gives at most20 root lines at rank<=5, at most36 +at rank<=6, and seven-node counts42,28,22,14,16,23,37,63. The63-line face +has a root normal. The only six-node faces with at least28 lines have30 or36; +their normal planes contain respectively two orthogonal root lines or an A2 +root pair. These exact normals and all face cases are checked in RESULT.json. +Their two-root Gram determinants are64 and48, so they are independent over +every characteristic-zero field. + +The chamber move is used only for full-root cardinalities and normal-space +types. It need not preserve the omitted frame or the live binary supports. +Actual P112 union bounds are obtained separately by enumerating every relevant +root plane against the literal live set; no frame-preserving Weyl action is +silently assumed. + +## 5. Root-spanned subspaces and rational scalar extension + +First let Z be a rational subspace spanned by some roots, of rank d<8. +Choose a generic nonzero real vector v in Z-perp. Each root outside Z gives +a proper hyperplane in Z-perp, so finitely many such hyperplanes can be +avoided. The full roots perpendicular to v are exactly R intersect Z and +span Z. Apply Section4: after one element of G, their span is exactly the +simple-root span of the corresponding face. Its rank is d, not an unspecified +larger rank. This justifies using the rank-d face capacities for an arbitrary +root-spanned rational Z; no assumption that Z was initially a parabolic span +has been made. + +Now let K be any characteristic-zero field. The embedding Q into K preserves +the rank of every rational matrix: a nonzero rational minor remains nonzero, +and all larger minors remain zero. Its rational nullspace extends to its full +K-nullspace by Gaussian elimination. Consequently, for directions h_1,...,h_s +independent over K, the rational span Z of all roots perpendicular to them +has rank at most8-s. + +In particular, a nonzero word c_h with support below70 on P112 has at least43 +live zero roots. Rank<=6 of Z would allow at most36 full root lines, impossible. +Thus rank Z=7. Among the seven-node faces only the63-line face reaches43, +so Z-perp is a rational root-normal line. Its extension contains h. The full +root alphabet is invariant under G, so the conclusion transports back. +Direct exact evaluation gives112 root normals of live support53 and eight +of support56. Hence the minimum code distance is53. The Gram112 I_8 proves +evaluation injectivity over K. + +Similarly, two independent codewords with union at most84 have at least28 +common live zero roots. Their Z has rank<=6; rank<=5 would permit only20 +root lines. Thus rank Z=6, and Section4 identifies its rational normal plane +as D6 or E6. Its two-dimensional scalar extension is exactly the span of +the two given K-directions. Replacing them by a rational basis preserves the +actual live union: a root annihilates the entire plane over K exactly when it +annihilates that rational basis. No real/imaginary split or embedding of K +is used. The fresh actual-plane census gives E6 live unions78 or80 and the +D6 union histogram82:448,84:2688,85:448,86:168,88:28. + +These are the precise completeness and field-transfer implications needed in +PR3931 and PR3295. The procedure does not assert a new uniform normal-plane +bound under unrelated support/cut hypotheses. + +## 6. Coefficient columns really give a single projective fiber + +Use a rational basis a,b of a normalized code plane, and express its two +codewords as a fixed2-by-n matrix A applied to the actual pieces. At a live +union site where only piece i is nonzero, the rational evaluation pair +(r dot a,r dot b) is that scalar value times column i of A. A zero column +cannot have such a singleton in the union. A nonzero column with any singleton +therefore has a rational projective slope. All its singleton sites have that +same slope: proportionality of two rational pairs over K is equivalent to +vanishing of their rational2-by-2 determinant, hence to proportionality over Q. + +The preceding all-fiber incidence bound consequently applies to arbitrary +K-valued coefficients. Extra piece support outside the evaluation union and +cancellations contribute to M, while J remains a subset of that one fiber. +They do not evade the upper bound on M+J. Thus the inherited A2 incidence +use in the six-piece proof is sound over all characteristic-zero fields. + +In particular its conservative allowance16+3*22+2*32=146 is below the required +2*78=156. The existing stronger20 would give140, but no change to that frozen +proof or receipt is needed. This audit supplies the specifically requested +inherited bounds and field implications; it does not automatically certify +every other caller reduction or the complete C5 conjecture. + +Characteristic zero is essential to these particular arguments. The controls +exhibit the nonzero direction e0+e1 whose evaluations vanish modulo2 on all +live roots while they are nonzero over Q. They also exhibit the three proper +hyperplanes covering F2^2, whereas a rational point avoids their rational +counterparts. These controls expose failed extensions of the hypotheses; +they are not substitutes for the rational-rank proof above. + +## Evidence boundary and credit + +All new counts, witnesses and normal types are freshly reconstructed from the +original table and fixed simple-root definition. The original PR3269, PR3280 +and PR3288 registered packages were separately replayed and passed. Their37 +public file Git blobs match canonical main at the pinned exact heads. A merged +archive's ledger status remains partially reviewed; this audit does not change +maintainer review status or the selected frontier. + +Credit Nick Petalas/PR3269/3280/3288/3262 and their cited predecessors, David +Arias's quadratic-model work, DreamingOfClouds/PR3154, joaqcoo and the retained +E8/P112 lineage. The signed bounds and equality tables are their prior results. +The finite-group maximization is a standard elementary chamber proof written +out here for the assigned exact model; it is not claimed as a new general +theorem. New audit code/prose is by Chris R / Clear1nsight with substantial +OpenAI Codex assistance, Apache-2.0. Full C5, other caller reductions, +physical/native/consumer/restoration/supplier/all-size admission, selected cold +replay, Lean, Docker and independent human/kernel acceptance remain outside scope. diff --git a/research/p112-inherited-bounds-audit/README.md b/research/p112-inherited-bounds-audit/README.md new file mode 100644 index 0000000000..e4d1d8de0b --- /dev/null +++ b/research/p112-inherited-bounds-audit/README.md @@ -0,0 +1,87 @@ +# Audit of inherited P112 support, A2 and field arguments + +The fresh finite checks confirm the exact declared model's global support +capacities **12/20** and A2 joint incidence **20/32**, hence the inherited +**22/32** used by PR3295. The stronger20 already belongs to Nick Petalas's +PR3280. No mathematical objection was found in the existing signed analytic +proofs. The new implementation imports no predecessor executable. + +[PROOF.md](PROOF.md) also gives an elementary finite-group chamber proof and +rational scalar-extension argument. It derives the specific root-normal and +D6/E6 completeness statements needed by PR3931/3295 from checked finite facts, +without leaving the standard Weyl-chamber theorem as an external black box. +This is written mathematics plus executable finite evidence, not independent +human or proof-kernel acceptance. + +## What is freshly checked + +- All3,309,747 five-spaces and788,035 six-spaces of F2^9, complete full/live + trace histograms and actual P11212/20 witnesses. +- All1,120 A2 planes and3,360 distinct27-root fibers. Each fiber's positive + nondegenerate affine-six quadratic binding is reconstructed from the original + caller table and exact rational simple-root coordinates. +- All2,667 five-spaces and127 six-spaces inside EVERY fiber seven-span: + **8,961,120** and **426,720** checks. Inside root capacities10/16 and joint + maxima20/32 agree with the analytic proofs. The outside-span bound30 at + rank6 follows by a stated dimension argument, not an assumed contained span. +- All1,920 signed-root simple-reflection images; the exact chamber functional; + every relevant parabolic face and its rational root normals; root support + sizes53/56; actual A2 and D6 plane-union histograms. + +The source programs of PR3269, PR3280 and PR3288 separately pass their complete +registered replays here. All37 public-head file Git blobs match canonical main; +PREDECESSORS.json records the exact heads and paths. Their prior results and +credit remain intact. These source archives are recorded as partially reviewed; +this audit does not change the maintainer's ledger status. + +## Reproduce + +Python3.12, standard library only: + +```sh +python3.12 -I -Werror -B scripts/research_package.py --package research/p112-inherited-bounds-audit +``` + +The two direct commands in VERIFY.json also work from a committed export. +The verifier is read-only. Controls create owned private copies and include a +complete primal-versus-dual small-space oracle, exact binary-span controls, +four nondegenerate minus-Gauss counterexamples, characteristic-two loss, +finite-field hyperplane-cover failure, four semantic rejections and three +actual optimized rejecting CLI runs. CHECKS.json records the measured replay +and publication limits. SOURCES.json pins all live data, definitions and audited +proof bytes; no foreign pending Git object is needed during replay. + +## What the field proof establishes + +A finite group is generated by the eight reflections because it acts faithfully +on240 signed roots. Maximizing a checked linear functional moves each real +normal into the closed chamber. Checked simple-coordinate signs identify its +zero roots with a face. Rational matrix rank and kernel extension then transfer +that precise statement to any characteristic-zero K, without an embedding of K +into R or C. A fixed coefficient column's nonempty singleton class has a rational +projective slope, so the all-fiber incidence bound applies to arbitrary K-valued +pieces, including overlaps and cancellations. + +These statements discharge the specifically audited global/A2/chamber/field +premises on this exact model. They do not audit all other reductions or prove +full C5, a global decoder floor, native/physical/restoration/consumer/supplier +admission, a multiplication theorem or a new kappa. No selected record changes. + +## Open next questions + +Independent human or formal-kernel review can target the finite-group maximum, +root-spanned-subspace rank argument, rational kernel extension and enumerator +coverage proof. A useful first step is to challenge each lemma in PROOF.md and +its explicit characteristic-zero/sign hypotheses. No formalization is claimed. + +Before further normal-plane computation, identify a different actual C5 caller +with its literal quotient, coefficient support, common set and required code +dimension. The previously reconciled named69-row conditional inventory supplies +no new gap here. No further construction or census is reserved. + +Credit Nick Petalas/PR3269/3280/3288/3262/3295 and their retained source chain, +David Arias's quadratic model, DreamingOfClouds/PR3154, joaqcoo and the E8/P112 +lineage. The finite-group chamber argument is standard elementary mathematics, +spelled out for this exact model, not a newly claimed general theorem. Fresh +audit by Chris R / Clear1nsight with substantial OpenAI Codex assistance; +Apache-2.0. Source and frozen predecessor bytes are unchanged. diff --git a/research/p112-inherited-bounds-audit/RESULT.json b/research/p112-inherited-bounds-audit/RESULT.json new file mode 100644 index 0000000000..53813aeb5d --- /dev/null +++ b/research/p112-inherited-bounds-audit/RESULT.json @@ -0,0 +1,334 @@ +{ + "schema": "p112-inherited-bounds-audit/v1", + "global": { + "5": { + "spaces": 3309747, + "full_maximum": 12, + "live_maximum": 12, + "full_histogram": { + "0": 99450, + "4": 321300, + "6": 913920, + "8": 1319625, + "10": 548352, + "12": 107100 + }, + "live_histogram": { + "0": 99593, + "2": 6720, + "3": 71680, + "4": 300076, + "5": 258048, + "6": 729344, + "7": 442368, + "8": 826770, + "9": 200704, + "10": 287168, + "11": 43008, + "12": 44268 + }, + "live_witness": [ + 71, + 199, + 455, + 135, + 391, + 263, + 87, + 215, + 471, + 151, + 407, + 279 + ] + }, + "6": { + "spaces": 788035, + "full_maximum": 20, + "live_maximum": 20, + "full_histogram": { + "0": 10795, + "8": 11475, + "12": 257040, + "16": 423045, + "20": 85680 + }, + "live_histogram": { + "0": 10796, + "4": 56, + "6": 896, + "7": 4096, + "8": 8148, + "10": 56448, + "11": 86016, + "12": 124040, + "14": 131712, + "15": 143360, + "16": 141491, + "18": 33152, + "19": 28672, + "20": 19152 + }, + "live_witness": [ + 39, + 103, + 231, + 487, + 71, + 199, + 455, + 135, + 391, + 263, + 87, + 215, + 471, + 151, + 407, + 279, + 183, + 439, + 311, + 375 + ] + } + }, + "a2": { + "fibers": 3360, + "rank5_space_tests": 8961120, + "rank6_space_tests": 426720, + "rank5_inside_root_maximum": 10, + "rank6_inside_root_maximum": 16, + "joint_rank5_bound": 20, + "joint_rank6_bound": 32, + "outside_rank6_bound": 30, + "per_fiber_digest": "acbe747612e6a832818074158edff681445806e6643092a31086e0b533881d4f", + "rank5_joint_histogram": { + "0,0": 211680, + "4,3": 151200, + "4,4": 907200, + "6,5": 725760, + "6,6": 2661120, + "8,7": 907200, + "8,8": 2268000, + "10,9": 403200, + "10,10": 725760 + }, + "rank6_joint_histogram": { + "0,0": 3360, + "12,11": 90720, + "12,12": 120960, + "16,15": 120960, + "16,16": 90720 + }, + "live_witnesses": { + "5": { + "labels": [ + 421, + 269, + 293, + 397, + 65, + 193, + 143, + 39, + 363, + 323 + ], + "fiber_labels": [ + 165, + 421, + 269, + 293, + 397, + 141, + 65, + 193, + 449, + 361, + 97, + 225, + 481, + 329, + 45, + 271, + 399, + 143, + 39, + 363, + 323, + 331, + 355, + 47, + 135, + 391, + 263 + ] + }, + "6": { + "labels": [ + 421, + 269, + 293, + 397, + 65, + 193, + 97, + 225, + 143, + 39, + 363, + 323, + 331, + 355, + 47, + 135 + ], + "fiber_labels": [ + 165, + 421, + 269, + 293, + 397, + 141, + 65, + 193, + 449, + 361, + 97, + 225, + 481, + 329, + 45, + 271, + 399, + 143, + 39, + 363, + 323, + 331, + 355, + 47, + 135, + 391, + 263 + ] + } + } + }, + "A2_live_union_histogram": { + "78": 896, + "80": 224 + }, + "D6_live_union_histogram": { + "82": 448, + "84": 2688, + "85": 448, + "86": 168, + "88": 28 + }, + "root_normal_live_support_histogram": { + "53": 112, + "56": 8 + }, + "chamber": { + "signed_root_reflection_tests": 1920, + "rho": [ + "0", + "1/2", + "1", + "3/2", + "2", + "5/2", + "3", + "23/2" + ], + "rank5_face_maximum": 20, + "rank6_face_maximum": 36, + "seven_node_counts": [ + 42, + 28, + 22, + 14, + 16, + 23, + 37, + 63 + ], + "six_node_types": [ + { + "face": 63, + "root_lines": 36, + "normal_roots": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 2, + -2, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 2 + ] + ] + }, + { + "face": 126, + "root_lines": 30, + "normal_roots": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 2, + -2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 2 + ] + ] + } + ], + "E7_normal": [ + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 2 + ] + }, + "scope": "Exact declared model and written scalar-extension proof; no full C5 or supplier." +} diff --git a/research/p112-inherited-bounds-audit/SOURCES.json b/research/p112-inherited-bounds-audit/SOURCES.json new file mode 100644 index 0000000000..d402c6bfe6 --- /dev/null +++ b/research/p112-inherited-bounds-audit/SOURCES.json @@ -0,0 +1,54 @@ +{ + "schema_version": 1, + "base_commit": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5", + "sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0" + }, + { + "path": "research/e8-a2-analytic-rank6/PROOF.md", + "usage": "input", + "git_blob": "8a7cc2e989101322f289bb98102ff40097841779", + "sha256": "4347eeee7c0986ffa1ae51d02ae67b4ed4554fc389a89c4423aff994a753546a" + }, + { + "path": "research/e8-a2-joint-incidence20/PROOF.md", + "usage": "input", + "git_blob": "8c7d950e81b1797d1b6d6ef16a027be7fe7cb7ac", + "sha256": "c994ec3b6833f05f460880503a7c314ef331d5714711303a4e0cf459ea7c251b" + }, + { + "path": "research/e8-quadratic-support-capacity/PROOF.md", + "usage": "input", + "git_blob": "4da8e98edcfbbb9d5cd17b7ee921aa323d2fc724", + "sha256": "0a68df931e4da65a9568a5ad3731c2a6c6f6b6fca57839d7d4c12a6fba0b333e" + }, + { + "path": "research/one-sided-six-multisets/data/data.txt", + "usage": "input", + "git_blob": "dc591a4e0252bac096e6c63c51058f6caee66bfe", + "sha256": "ac4a48851b922f2a433684b60c74768ae3bb4fc5e8990ffe63e3942bb3c2ea34" + }, + { + "path": "research/p112-root-simplex-exclusion/geometry.py", + "usage": "input", + "git_blob": "222ea556faf2b275f73815c4e7d0d5f1e3294f2f", + "sha256": "b8ac379e41f5ad83bdb6c7f7c55129fc3d9c07801ea61591478f25d72ff0b021" + }, + { + "path": "research/p112-six-piece-concentration/PROOF.md", + "usage": "input", + "git_blob": "0728c80d3140b9e0a7d62ffc540d0313ef578eea", + "sha256": "41bbe6ec7dca13b734579883911bcfc9d3e9fca90b8b6cf2a3448a10786eede3" + } + ] +} diff --git a/research/p112-inherited-bounds-audit/TASK.json b/research/p112-inherited-bounds-audit/TASK.json new file mode 100644 index 0000000000..61e0aa9b45 --- /dev/null +++ b/research/p112-inherited-bounds-audit/TASK.json @@ -0,0 +1,84 @@ +{ + "schema_version": 1, + "task_id": "complex-rank-shape-decoder", + "priority_revision": 6, + "base_commit": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "original_card": { + "id": "complex-rank-shape-decoder", + "question": "Can a decoder deliver the local paid mass in fewer, larger-rank children (block frame climbs instead of rank-1 to rank-3 steps)?", + "starting_points": [ + "docs/research/research-family-status.md", + "research/complex-local-word-ceiling/README.md", + "research/complex-decoder-field-extension-seed44/README.md", + "research/complex-frame-pair-decoders/README.md", + "research/selected-k8-unrestricted-ends/README.md", + "research/eisenstein-reduction-copy-floor/README.md" + ], + "methods": [ + "Find one exact small decoding identity whose frame path climbs in blocks, and price its complete per-call profile.", + "Bound the best effective child rank achievable for one fixed support alphabet, including copies, frames and restoration." + ], + "acceptance_gate": "A per-call local profile, with all copied information, frames and restoration counted, whose ceiling exceeds the selected word's by at least 5%; masked or overcomplete supports must change an assumption of the eight-term all-pairs bound. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "first_step": { + "command": [ + "python3", + "-B", + "research/complex-local-word-ceiling/verify.py" + ], + "expected": "PASS_COMPLEX_LOCAL_WORD_CEILING", + "inspect": "Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.", + "scope": "Positive control and planning budget only; this is not a new construction or full cold replay." + }, + "first_experiment": "Before any synthesis, write the candidate per-call local profile (and centre charge / unpaid coordinates if changed) and screen it with ceiling.ceiling(); reject it if even the ideal ceiling does not beat the selected word's by your stated margin. Ideal budget: rank-16 delivery is 2.31x (levers.py).", + "bottleneck_link": "Rank-1 children are about half of recursive cost; the selected word's effective child rank is about 3.9. Larger-rank delivery lowers recursive cost per unit of paid mass.", + "allowed_variations": [ + "One masked, overcomplete or block decoder family with exact labels and supports.", + "A scoped lower bound on effective rank for one alphabet.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "scope_change_triggers": [ + "Repacking idle remainders of an unchanged word (covered by the packing ceiling).", + "Repeating the eight-term all-pairs search inside its proved scope.", + "Only changing helper terminal subspaces and monotone frames within the fixed scalar word, entrances and cleanup contract already covered by #1995/#2013.", + "Searching below C=40 in the #2017 Eisenstein binary scalar-rectangle or fixed-support block-linear additive pairing model; specify a changed premise instead. This bound does not cover every complex decoder.", + "Continuing a partial cost improvement while leaving the same unpriced consumer, restoration or central-readout obligation unresolved; refresh the family expansion decision first. Local product-retiming evidence has a narrow scope and is not a ban on changed graphs or contracts." + ], + "overlap_terms": [ + "rank shape", + "block climb", + "masked decoder", + "overcomplete", + "effective rank" + ] + }, + "scope_status": "changed", + "actual_scope": "User-directed independent audit of inherited global support12/20, A2 joint22/32 (including existing stronger20), and the exact finite-model chamber/scalar-extension implication.", + "scope_change_reason": "Direct follow-up to PR3931/3295. Audit existing proofs and close their inherited dependency boundary with a separate complete finite check and elementary finite-group chamber proof; no duplicate threshold or caller search.", + "bottleneck_link": "Resolves precise inherited mathematical obligations in the prior C5 caller audit; no supplier construction or kappa improvement.", + "budget_minutes": 60, + "stop_rule": "One60-minute session, final quarter for verification/publication. Stop after exact global and all-fiber finite checks, written field argument, meaningful controls, source/export verification and handoff; no further census expansion.", + "outcome": "completed", + "evidence": "PROOF.md; RESULT.json; model.py; verify.py; test_controls.py; CHECKS.json", + "author": "Chris R / Clear1nsight", + "ai_assistance": "Substantial OpenAI Codex assistance. Fresh implementation imports no predecessor executable. Same user/assistant author as PR3931, independently implemented relative to Nick Petalas predecessor packages; no independent human or formal-kernel acceptance.", + "open_questions": [ + { + "question": "Does independent human or proof-kernel review confirm the finite-group chamber proof, rational rank transfer and complete domain enumerators?", + "why_it_matters": "Executable counts and a written proof remain distinct from formal-kernel acceptance.", + "first_step": "Inspect PROOF.md Lemmas1-7, challenge reduced-echelon coverage, the finite-group maximization argument and extension from rational kernels to arbitrary characteristic-zero fields.", + "blocked_by": "No independent human or kernel review is claimed." + }, + { + "question": "Which actual C5 caller outside the already reconciled named69-row inventory needs further geometry?", + "why_it_matters": "These inherited-bound audits do not prove full C5 or justify an unbound normal-plane search.", + "first_step": "Bind its literal quotient, coefficient support, common cut and required code dimension before proposing a larger theorem.", + "blocked_by": "No additional uncovered caller or full-C5 admission is established here." + } + ], + "predecessor_heads": { + "3269": "ebe02d33157dc6c6d3b35df204e4a39242b7429e", + "3280": "c55a161982f0a94950a8f2653fe00fd387d2a0d5", + "3288": "c375ed42aabf1b8cdcaae0cc565540d0eda9fa0e", + "3295": "4cff8128f0f9ea1e61515b95ddbb884366e9362c" + } +} diff --git a/research/p112-inherited-bounds-audit/VERIFY.json b/research/p112-inherited-bounds-audit/VERIFY.json new file mode 100644 index 0000000000..4a133c284e --- /dev/null +++ b/research/p112-inherited-bounds-audit/VERIFY.json @@ -0,0 +1,40 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/e8-a2-analytic-rank6/PROOF.md", + "research/e8-a2-joint-incidence20/PROOF.md", + "research/e8-quadratic-support-capacity/PROOF.md", + "research/one-sided-six-multisets/data/data.txt", + "research/p112-root-simplex-exclusion/geometry.py", + "research/p112-six-piece-concentration/PROOF.md" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-O", + "-Werror", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 180, + "checks": "Fresh original-table model, all4097782 global5/6spaces, all3360A2fibers with8961120 rank5 and426720 rank6 contained-space checks, quadratic signs,1920signed-reflection images, parabolic counts and exact actual normal-plane unions. No predecessor executable imported." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-Werror", + "-B", + "{package}/test_controls.py" + ], + "timeout_seconds": 180, + "checks": "Complete primal-versus-dual subspace oracle through dimension5; actual minus-Gauss counterexamples; characteristic-two and finite-field union controls; wrong labels/reflection closure/quadratic binding/duplicate JSON rejection; three actual optimized CLI corruptions on private copies." + } + ] +} diff --git a/research/p112-inherited-bounds-audit/model.py b/research/p112-inherited-bounds-audit/model.py new file mode 100644 index 0000000000..3770bfcc1d --- /dev/null +++ b/research/p112-inherited-bounds-audit/model.py @@ -0,0 +1,158 @@ +"""Fresh table-based finite model. No predecessor executable is imported. + +Chris R / Clear1nsight with substantial OpenAI Codex assistance. Apache-2.0. +Definitions retain Nick Petalas, David Arias and the E8/P112 lineage. +""" + +import ast +from fractions import Fraction +from itertools import combinations, product + +SIMPLE = ((1, -1, -1, -1, -1, -1, -1, 1), (2, 2, 0, 0, 0, 0, 0, 0), + (-2, 2, 0, 0, 0, 0, 0, 0), (0, -2, 2, 0, 0, 0, 0, 0), + (0, 0, -2, 2, 0, 0, 0, 0), (0, 0, 0, -2, 2, 0, 0, 0), + (0, 0, 0, 0, -2, 2, 0, 0), (0, 0, 0, 0, 0, -2, 2, 0)) + + +def require(ok, message): + if not ok: + raise ValueError(message) + + +def dot(a, b): + return sum(x * y for x, y in zip(a, b, strict=True)) + + +def canonical(row): + return row if next(x for x in row if x) > 0 else tuple(-x for x in row) + + +def basis(values, width=9): + rows = [0] * width + for value in values: + for j in range(width - 1, -1, -1): + if value >> j & 1: + if rows[j]: + value ^= rows[j] + else: + rows[j] = value + break + return [row for row in rows if row] + + +def span(rows): + values = [0] + for row in rows: + values += [x ^ row for x in values] + return values + + +def solve(matrix, columns): + """Exact dense simultaneous solve, independent of triangular source formulas.""" + n = len(matrix) + a = [[Fraction(x) for x in row] + [Fraction(c[i]) for c in columns] + for i, row in enumerate(matrix)] + for j in range(n): + p = next(i for i in range(j, n) if a[i][j]) + a[j], a[p] = a[p], a[j] + scale = a[j][j] + a[j] = [x / scale for x in a[j]] + for i in range(n): + if i != j: + scale = a[i][j] + a[i] = [x - scale * y for x, y in zip(a[i], a[j], strict=True)] + return [tuple(row[j] for row in a) for j in range(n, len(a[0]))] + + +def reconstruct(table, geometry): + assignments = ast.parse(geometry).body + literal = next(ast.literal_eval(n.value) for n in assignments + if isinstance(n, ast.Assign) + and any(isinstance(t, ast.Name) and t.id == 'SIMPLE' for t in n.targets)) + require(literal == SIMPLE, 'simple-system definition binding') + lines = table.decode().splitlines() + live = [tuple(map(int, line.split())) for line in lines[2:114]] + original_labels = list(map(int, lines[0].split())) + frame = [tuple(2 * (i == a) + s * 2 * (i == a + 1) for i in range(8)) + for a in (0, 2, 4, 6) for s in (-1, 1)] + roots = sorted(live + frame) + shell = {tuple(2 * (k == i) + s * (k == j) for k in range(8)) + for i, j in combinations(range(8), 2) for s in (-2, 2)} + shell.update((1, *t) for t in product((-1, 1), repeat=7) if sum(t) % 4 == 3) + require(roots == sorted(shell) and len(roots) == 120, 'full E8 root patterns') + coordinates = solve(list(zip(*SIMPLE, strict=True)), roots) + require(all(x.denominator == 1 for c in coordinates for x in c), 'integral coordinates') + coordinates = [tuple(map(int, c)) for c in coordinates] + require(all(tuple(sum(c[i] * SIMPLE[i][j] for i in range(8)) for j in range(8)) == r + for r, c in zip(roots, coordinates, strict=True)), 'exact coordinate equations') + require(all(min(c) >= 0 or max(c) <= 0 for c in coordinates), 'simple-coordinate signs') + labels = [1 + sum((x % 2) << (i + 1) for i, x in enumerate(c)) for c in coordinates] + require(len(set(labels)) == 120 and all(x & 1 for x in labels), 'full affine labels') + require([x for r, x in zip(roots, labels) if r not in frame] == original_labels, + 'original caller label convention') + live_mask = sum(1 << i for i, r in enumerate(roots) if r in live) + require(live_mask.bit_count() == 112 and live == sorted(live), 'literal P112 frame') + require(all(sum(r[i] * r[j] for r in live) == 112 * (i == j) + for i in range(8) for j in range(8)), 'evaluation Gram') + return roots, labels, coordinates, live_mask + + +def annihilators(n, dimension): + """Unique reduced row-echelon annihilators, highest pivot convention.""" + for pivots in combinations(range(n), n - dimension): + choices = [] + for pivot in pivots: + free = [j for j in range(pivot) if j not in pivots] + choices.append([(1 << pivot) | sum(((c >> k) & 1) << j + for k, j in enumerate(free)) for c in range(1 << len(free))]) + yield from product(*choices) + + +def kernels(labels, ambient): + locations = {x: i for i, x in enumerate(span(ambient))} + inside = [(i, locations[x]) for i, x in enumerate(labels) if x in locations] + return [sum(1 << i for i, x in inside if (h & x).bit_count() % 2 == 0) + for h in range(1 << len(ambient))] + + +def masks(ker, rows): + for annihilator in rows: + mask = ker[0] + for h in annihilator: + mask &= ker[h] + yield mask + + +def projective_fibers(roots, a, b): + from math import gcd + fibers = {} + for i, r in enumerate(roots): + x, y = dot(a, r), dot(b, r) + if x or y: + divisor = gcd(x, y) + key = canonical((x // divisor, y // divisor)) + fibers[key] = fibers.get(key, 0) | (1 << i) + return fibers + + +def all_a2(roots): + lookup = {r: i for i, r in enumerate(roots)} + planes = set() + for i, j in combinations(range(120), 2): + pairing = dot(roots[i], roots[j]) + if abs(pairing) != 4: + continue + third = canonical(tuple(x - (1 if pairing > 0 else -1) * y + for x, y in zip(roots[i], roots[j], strict=True))) + require(third in lookup, 'A2 third root') + planes.add(tuple(sorted((i, j, lookup[third])))) + require(len(planes) == 1120, 'complete A2 plane inventory') + fibers = set() + for plane in sorted(planes): + a, b = (roots[i] for i in plane[:2]) + classes = projective_fibers(roots, a, b) + require(sorted(m.bit_count() for m in classes.values()) == [1, 1, 1, 27, 27, 27], + 'all nonzero A2 projective classes') + fibers.update(m for m in classes.values() if m.bit_count() == 27) + require(len(fibers) == 3360, 'distinct large A2 fibers') + return sorted(planes), sorted(fibers) diff --git a/research/p112-inherited-bounds-audit/test_controls.py b/research/p112-inherited-bounds-audit/test_controls.py new file mode 100644 index 0000000000..5f1022f6e0 --- /dev/null +++ b/research/p112-inherited-bounds-audit/test_controls.py @@ -0,0 +1,132 @@ +#!/usr/bin/env python3 +"""Coverage, hypothesis and actual CLI controls on private copies. Apache-2.0.""" + +from itertools import combinations +import json +from pathlib import Path +import subprocess +import sys +import tempfile + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import verify as v # noqa: E402 + +m = v.m + + +def rejects(function): + try: + function() + except (ValueError, KeyError): + return + raise ValueError('losing control accepted') + + +def small_spaces(): + checked = 0 + for n in range(1, 6): + labels = list(range(1 << n)) + ker = m.kernels(labels, [1 << j for j in range(n)]) + for d in range(n + 1): + observed = list(m.masks(ker, m.annihilators(n, d))) + # Exhaust all generating subsets; no echelon or annihilator oracle. + expected = {sum(1 << x for x in m.span(rows)) + for rows in combinations(range(1, 1 << n), d) + if len(set(m.span(rows))) == 1 << d} + m.require(len(observed) == len(set(observed)) and set(observed) == expected, + 'small complete primal-versus-dual space domain') + checked += len(observed) + return checked + + +def signed_hypotheses(): + def q8(x): + return (sum((x >> j & 1) * (x >> (j + 1) & 1) for j in (0, 2, 4, 6)) + + (x >> 6 & 1) + (x >> 7 & 1)) % 2 + def q6(x): + return (sum((x >> j & 1) * (x >> (j + 1) & 1) for j in (0, 2, 4)) + + (x >> 4 & 1) + (x >> 5 & 1)) % 2 + for q, n in [(q8, 8), (q6, 6)]: + gram = [sum((q((1 << i) ^ (1 << j)) ^ q(1 << i) ^ q(1 << j)) << j + for j in range(n)) for i in range(n)] + m.require(len(m.basis(gram, n)) == n, 'counterexample polar nondegeneracy') + m.require(sum(1 - 2*q8(x) for x in range(256)) == -16, 'minus-eight Gauss sign') + m.require(sum(q8(128 ^ x) for x in m.span([1, 4, 16, 64])) == 16, + 'rank-five minus-sign counterexample') + m.require(sum(q8(128 ^ x) for x in m.span([1, 2, 4, 16, 64])) == 24, + 'rank-six minus-sign counterexample') + m.require(sum(1 - 2*q6(x) for x in range(64)) == -8, 'minus-six Gauss sign') + m.require(sum(q6(x) for x in m.span([1, 4, 16, 32])) == 12, + 'fiber affine-four minus-sign counterexample') + m.require(sum(q6(x) for x in m.span([2, 4, 8, 16, 32])) == 20, + 'fiber affine-five minus-sign counterexample') + + +def field_hypotheses(roots, live): + # The nonzero direction e0+e1 evaluates to zero over F2 on every root. + h = (1, 1, 0, 0, 0, 0, 0, 0) + values = [m.dot(r, h) for i, r in enumerate(roots) if live >> i & 1] + m.require(any(values) and all(x % 2 == 0 for x in values), 'characteristic-two loss') + f2 = [(a, b) for a in range(2) for b in range(2)] + m.require(all(any((a*x+b*y) % 2 == 0 for a, b in [(1, 0), (0, 1), (1, 1)]) + for x, y in f2), 'finite-field hyperplane union covers') + m.require(not any(a*1+b*2 == 0 for a, b in [(1, 0), (0, 1), (1, 1)]), + 'rational point avoids same three hyperplanes') + + +def cli_controls(payloads): + with tempfile.TemporaryDirectory(prefix='inherited-bounds-controls-') as tmp: + root = Path(tmp) + package = root / 'research/p112-inherited-bounds-audit' + package.mkdir(parents=True) + for name in ['verify.py', 'model.py', 'SOURCES.json', 'RESULT.json']: + (package / name).write_bytes((HERE / name).read_bytes()) + for name, raw in payloads.items(): + target = root / name + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(raw) + bad_receipt = json.loads((package / 'RESULT.json').read_bytes()) + bad_receipt['a2']['joint_rank6_bound'] = True + faults = [(root / v.TABLE, b'fault'), (package / 'SOURCES.json', b'{}'), + (package / 'RESULT.json', json.dumps(bad_receipt).encode())] + for path, mutant in faults: + original = path.read_bytes() + path.write_bytes(mutant) + run = subprocess.run([sys.executable, '-I', '-O', '-Werror', '-B', + str(package / 'verify.py')], capture_output=True, text=True, + timeout=180) + path.write_bytes(original) + m.require(run.returncode != 0 and 'ValueError' in run.stderr, + 'actual optimized CLI accepted a fault') + + +def main(): + payloads = v.authenticate() + roots, labels, coords, live = m.reconstruct(payloads[v.TABLE], payloads[v.GEOMETRY]) + count = small_spaces() + basis_cases = 0 + for n, size in [(4, 4), (5, 3)]: + for rows in combinations(range(1 << n), size): + generated = set(m.span(rows)) + reduced = m.basis(rows, n) + m.require(generated == set(m.span(reduced)) and len(generated) == 1 << len(reduced), + 'binary basis versus complete generating sums') + basis_cases += 1 + signed_hypotheses() + field_hypotheses(roots, live) + changed = payloads[v.TABLE].decode().splitlines() + first = changed[0].split() + first[0], first[1] = first[1], first[0] + changed[0] = ' '.join(first) + rejects(lambda: m.reconstruct('\n'.join(changed).encode(), payloads[v.GEOMETRY])) + rejects(lambda: v.chamber(roots[:-1], coords[:-1])) + rejects(lambda: v.load('{"bound":20,"bound":32}')) + rejects(lambda: v.quadratic_model([x ^ 2 for x in labels])) + cli_controls(payloads) + print(f'PASS_INHERITED_AUDIT_CONTROLS small_spaces={count} basis_cases={basis_cases} negative_Gauss=4 ' + 'characteristic_zero_boundaries=2 semantic_rejections=4 optimized_CLI_rejections=3') + + +if __name__ == '__main__': + main() diff --git a/research/p112-inherited-bounds-audit/verify.py b/research/p112-inherited-bounds-audit/verify.py new file mode 100644 index 0000000000..ef84a5d9fb --- /dev/null +++ b/research/p112-inherited-bounds-audit/verify.py @@ -0,0 +1,221 @@ +#!/usr/bin/env python3 +"""Independent finite audit of inherited support, incidence and chamber facts. + +Chris R / Clear1nsight, substantial OpenAI Codex assistance. Apache-2.0. +No predecessor executable is imported; theorem credit stays with its authors. +""" + +from collections import Counter +import hashlib +from itertools import combinations +import json +from pathlib import Path +import sys + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +sys.path.insert(0, str(HERE)) +import model as m # noqa: E402 + +MANIFEST_SHA = '70ad6c294240e166689287973ce5e0c8cf8c2d3936e7aab17e62175fafb937ee' +TABLE = 'research/one-sided-six-multisets/data/data.txt' +GEOMETRY = 'research/p112-root-simplex-exclusion/geometry.py' + + +def unique(pairs): + m.require(len(pairs) == len({key for key, _ in pairs}), 'duplicate JSON key') + return dict(pairs) + + +def load(raw): + return json.loads(raw, object_pairs_hook=unique) + + +def authenticate(root=ROOT, package=HERE): + raw = (package / 'SOURCES.json').read_bytes() + m.require(hashlib.sha256(raw).hexdigest() == MANIFEST_SHA, 'source manifest identity') + payloads = {} + for row in load(raw)['files']: + if row['usage'] != 'input': + continue + path = root / row['path'] + m.require(path.resolve().is_relative_to(root.resolve()), 'input escaped root') + m.require(not any(p.is_symlink() for p in [path, *path.parents]), 'input symlink') + raw = path.read_bytes() + m.require(len(raw) <= 2_000_000, 'source size bound') + m.require(hashlib.sha256(raw).hexdigest() == row['sha256'], 'source SHA256') + blob = b'blob ' + str(len(raw)).encode() + b'\0' + raw + m.require(hashlib.sha1(blob).hexdigest() == row['git_blob'], 'source Git blob') + payloads[row['path']] = raw + return payloads + + +def digest(value): + return hashlib.sha256(json.dumps(value, sort_keys=True, separators=(',', ':')).encode()).hexdigest() + + +def global_census(labels, live_mask): + ker = m.kernels(labels, [1 << j for j in range(9)]) + result = {} + for d, expected, cap in [(5, 3_309_747, 12), (6, 788_035, 20)]: + hist, live_hist = Counter(), Counter() + witness = None + for mask in m.masks(ker, m.annihilators(9, d)): + size, live = mask.bit_count(), (mask & live_mask).bit_count() + hist[size] += 1 + live_hist[live] += 1 + if live == cap and witness is None: + witness = [x for i, x in enumerate(labels) if mask & live_mask & (1 << i)] + m.require(sum(hist.values()) == expected and max(hist) == max(live_hist) == cap, + 'complete global capacity census') + m.require(witness is not None and len(m.basis(witness)) == d, 'sharp live support') + result[str(d)] = {'spaces': expected, 'full_maximum': cap, 'live_maximum': cap, + 'full_histogram': {str(k): n for k, n in sorted(hist.items())}, + 'live_histogram': {str(k): n for k, n in sorted(live_hist.items())}, + 'live_witness': witness} + return result + + +def quadratic_model(labels): + gram = [[m.dot(a, b) // 4 for b in m.SIMPLE] for a in m.SIMPLE] + q = [((x.bit_count() + sum(gram[i][j] * (x >> i & 1) * (x >> j & 1) + for i, j in combinations(range(8), 2))) % 2) for x in range(256)] + polar = [[q[x ^ y] ^ q[x] ^ q[y] for y in range(256)] for x in range(256)] + rows = [sum(polar[1 << i][1 << j] << j for j in range(8)) for i in range(8)] + m.require(len(m.basis(rows, 8)) == 8, 'nondegenerate ambient polar form') + m.require({x >> 1 for x in labels} == {x for x in range(256) if q[x]}, 'quadratic root model') + m.require(sum(1 - 2 * x for x in q) == 16, 'positive ambient Gauss sign') + for x in range(256): + for y in range(256): + m.require(polar[x][y] == sum(gram[i][j] * (x >> i & 1) * (y >> j & 1) + for i in range(8) for j in range(8)) % 2, + 'quadratic polarization') + return q, polar + + +def fiber_binding(labels, fiber, q, polar): + selected = [x for i, x in enumerate(labels) if fiber >> i & 1] + base = m.basis(selected) + m.require(len(base) == 7, 'A2 fiber span dimension') + affine = [x >> 1 for x in m.span(base) if x & 1] + m.require(len(affine) == 64, 'fiber affine six-space') + directions = m.basis([x ^ affine[0] for x in affine], 8) + rows = [sum(polar[x][y] << j for j, y in enumerate(directions)) for x in directions] + m.require(len(m.basis(rows, 6)) == 6 and sum(1 - 2 * q[x] for x in affine) == 8, + 'positive nondegenerate fiber quadratic restriction') + ker = m.kernels(labels, base) + m.require(ker[0].bit_count() == 28 and (ker[0] & ~fiber).bit_count() == 1, + 'fiber closure and unique extra root') + return ker + + +def fiber_census(labels, fibers, live_mask, q, polar): + rows5, rows6 = list(m.annihilators(7, 5)), list(m.annihilators(7, 6)) + m.require(len(rows5) == 2667 and len(rows6) == 127, 'fiber-space domains') + expected6 = {(0, 0): 1, (12, 11): 27, (12, 12): 36, (16, 15): 36, (16, 16): 27} + records, total5, total6, witnesses = [], Counter(), Counter(), {} + for fiber in fibers: + ker = fiber_binding(labels, fiber, q, polar) + hist5, hist6 = Counter(), Counter() + for d, rows, hist, cap in [(5, rows5, hist5, 20), (6, rows6, hist6, 32)]: + for mask in m.masks(ker, rows): + a, b = mask.bit_count(), (mask & fiber).bit_count() + hist[a, b] += 1 + if a + b == cap and mask & ~live_mask == 0 and str(d) not in witnesses: + witnesses[str(d)] = {'labels': [x for i, x in enumerate(labels) if mask >> i & 1], + 'fiber_labels': [x for i, x in enumerate(labels) if fiber >> i & 1]} + m.require(max(a for a, _ in hist) == (10 if d == 5 else 16), 'inside root capacity') + m.require(max(a + b for a, b in hist) == cap, 'inside joint incidence') + m.require(dict(hist6) == expected6, 'every fiber hyperplane/equality table') + total5.update(hist5) + total6.update(hist6) + records.append([str(fiber), sorted((a, b, n) for (a, b), n in hist5.items()), + sorted((a, b, n) for (a, b), n in hist6.items())]) + m.require(set(witnesses) == {'5', '6'}, 'both sharp joint bounds attained on live roots') + for d, witness in witnesses.items(): + m.require(len(m.basis(witness['labels'])) == int(d), 'joint witness binary rank') + return {'fibers': len(fibers), 'rank5_space_tests': sum(total5.values()), + 'rank6_space_tests': sum(total6.values()), 'rank5_inside_root_maximum': 10, + 'rank6_inside_root_maximum': 16, 'joint_rank5_bound': 20, 'joint_rank6_bound': 32, + 'outside_rank6_bound': 30, 'per_fiber_digest': digest(records), + 'rank5_joint_histogram': {f'{a},{b}': n for (a, b), n in sorted(total5.items())}, + 'rank6_joint_histogram': {f'{a},{b}': n for (a, b), n in sorted(total6.items())}, + 'live_witnesses': witnesses} + + +def chamber(roots, coordinates): + signed = set(roots) | {tuple(-x for x in r) for r in roots} + m.require(all(alpha in signed for alpha in m.SIMPLE), 'simple roots belong to full root set') + for alpha in m.SIMPLE: + m.require(m.dot(alpha, alpha) == 8, 'simple-root norm') + for root in signed: + p = m.dot(alpha, root) + m.require(p % 4 == 0, 'reflection integrality') + m.require(tuple(x - p // 4 * y for x, y in zip(root, alpha)) in signed, + 'signed root reflection closure') + rho = m.solve(m.SIMPLE, [[1] * 8])[0] + m.require(all(m.dot(rho, a) == 1 for a in m.SIMPLE), 'strict chamber functional') + faces = [[r for r, c in zip(roots, coordinates) if all(c[j] == 0 for j in range(8) + if not mask >> j & 1)] for mask in range(256)] + m.require(max(len(faces[x]) for x in range(256) if x.bit_count() <= 5) == 20, + 'rank-at-most-five face cap') + m.require(max(len(faces[x]) for x in range(256) if x.bit_count() <= 6) == 36, + 'rank-at-most-six face cap') + seven = [len(faces[255 ^ (1 << j)]) for j in range(8)] + m.require(seven == [42, 28, 22, 14, 16, 23, 37, 63], 'all seven-node faces') + types = [] + for mask in range(256): + if mask.bit_count() != 6 or len(faces[mask]) < 28: + continue + normal = [r for r in roots if all(m.dot(r, z) == 0 for z in faces[mask])] + kind = (len(faces[mask]), len(normal), abs(m.dot(normal[0], normal[1]))) + m.require(kind in [(30, 2, 0), (36, 3, 4)], 'normal-plane finite types') + types.append({'face': mask, 'root_lines': kind[0], 'normal_roots': normal}) + m.require(len(types) == 2, 'complete qualifying six-node faces') + normal = [r for r in roots if all(m.dot(r, z) == 0 for z in faces[127])] + m.require(len(normal) == 1, 'E7 root normal') + return {'signed_root_reflection_tests': 1920, 'rho': [str(x) for x in rho], + 'rank5_face_maximum': 20, 'rank6_face_maximum': 36, + 'seven_node_counts': seven, 'six_node_types': types, 'E7_normal': normal[0]} + + +def compute(payloads): + roots, labels, coords, live = m.reconstruct(payloads[TABLE], payloads[GEOMETRY]) + global_result = global_census(labels, live) + q, polar = quadratic_model(labels) + planes, fibers = m.all_a2(roots) + off = [sum(1 << i for i, r in enumerate(roots) if live >> i & 1 and m.dot(h, r)) + for h in roots] + distances = Counter(x.bit_count() for x in off) + m.require(dict(distances) == {53: 112, 56: 8}, 'root-normal live support sizes') + a2_unions, d6_unions = Counter(), Counter() + for plane in planes: + a, b = plane[:2] + a2_unions[(off[a] | off[b]).bit_count()] += 1 + m.require(dict(a2_unions) == {78: 896, 80: 224}, 'actual A2 union lower bound') + for a, b in combinations(range(120), 2): + if m.dot(roots[a], roots[b]) == 0: + d6_unions[(off[a] | off[b]).bit_count()] += 1 + m.require(dict(d6_unions) == {82: 448, 84: 2688, 85: 448, 86: 168, 88: 28}, + 'actual orthogonal normal-plane union inventory') + return {'schema': 'p112-inherited-bounds-audit/v1', 'global': global_result, + 'a2': fiber_census(labels, fibers, live, q, polar), + 'A2_live_union_histogram': {str(k): n for k, n in sorted(a2_unions.items())}, + 'D6_live_union_histogram': {str(k): n for k, n in sorted(d6_unions.items())}, + 'root_normal_live_support_histogram': {str(k): n for k, n in sorted(distances.items())}, + 'chamber': chamber(roots, coords), + 'scope': 'Exact declared model and written scalar-extension proof; no full C5 or supplier.'} + + +def main(): + m.require(not sys.argv[1:], 'no arguments accepted') + observed = compute(authenticate()) + expected = load((HERE / 'RESULT.json').read_bytes()) + m.require(json.dumps(observed, sort_keys=True) == json.dumps(expected, sort_keys=True), + 'audit result receipt mismatch') + print('PASS_INHERITED_BOUNDS_AUDIT global4097782 fibers3360 inside5=8961120 ' + 'inside6=426720 signed_reflections1920 bounds12/20/20/32') + + +if __name__ == '__main__': + main()