diff --git a/research/h6-dyadic-source-repair/ADAPTATIONS.json b/research/h6-dyadic-source-repair/ADAPTATIONS.json new file mode 100644 index 0000000000..3d0c92e1fe --- /dev/null +++ b/research/h6-dyadic-source-repair/ADAPTATIONS.json @@ -0,0 +1,22 @@ +{ + "geometry_extraction": [ + "need", + "canonical_roots" + ], + "geometry_source_sha256": "544d6b7d4ea92134b1016ce359f01b7a33ebb2ba0d986bf5b9accc47a3ec600c", + "independent_changes": "Every mathematical function AST is unchanged. main reads fresh --producer data, declared live source files and own derive.py bytes, then writes external --out.", + "independent_source_sha256": "ef6e5c09b991b8a7ecd3d74162d6aec74ccdfdaaab2ddf8ccb64552bbb010c0a", + "main_changes": "Explicit external --out, portable source path and direct source compilation. No imported global mixed-word/controller code.", + "producer_source_sha256": "4dba64d1556dc24008e29880873b34886d1e15e5cd16a5fd24d85f3ccd35c81c", + "proof_changes": "Portable source/replay explanation and editorial spacing; final scope retained.", + "proof_source_sha256": "64602ba1f73846e0be5f5a71a75dd477a39fd2215cd2034e8118f98f0871ab99", + "spectral_certificate_change": "Only raw source bytes access: git show PIN:path becomes declared REPO/path read. Source hashes and original Git history are authenticated separately.", + "unchanged_functions": [ + "modular_rank", + "mul", + "evaluate", + "valuation", + "physical_row_certificate", + "completion" + ] +} diff --git a/research/h6-dyadic-source-repair/ARTIFACTS.json b/research/h6-dyadic-source-repair/ARTIFACTS.json new file mode 100644 index 0000000000..d4e412be79 --- /dev/null +++ b/research/h6-dyadic-source-repair/ARTIFACTS.json @@ -0,0 +1,14 @@ +{ + "files": { + "ADAPTATIONS.json": "a0db59006946f9485788b8168d21a0737cb067792233b78ad66b7b9cf0b3e1de", + "PROOF.md": "c58fe24fcbe26a577cea4e418f62041c5ad0e3cf1e8d7e85b4654674963eff5c", + "README.md": "a9b97857189465b716a7c6e46a0d3a2f266ce8f85edc70a7996fc965a791eb62", + "SOURCES.json": "f393c50633e7a20293f933dd6db643fdeb9d8c77841899c7dacd6f84e511f1c8", + "TASK.json": "3669d0049333899678027f86e939516bc93fea065592f93146402e21f292caa9", + "VERIFY.json": "60f2990115812684ffd6133a251801a72e607426ff54207e005bdc18fd9f722c", + "derive.py": "773494a5c61bdfca2555fd660d052cd41f65e1ba829791e66c8da12e56beb43c", + "geometry.py": "03dddc4f08f5cf4e741167172059aba20829d8228038d5ddd6ac26e8a189f595", + "independent.py": "534b5a0a14b9027ab52a5548de3d09387f0924c5db30fc4c53292a5a5350f0d1", + "verify.py": "5d53efa0bcff65cf394f9f9c20f98c100d3f1ebb10f0ca44a361be5301adee56" + } +} diff --git a/research/h6-dyadic-source-repair/PROOF.md b/research/h6-dyadic-source-repair/PROOF.md new file mode 100644 index 0000000000..c0afff4303 --- /dev/null +++ b/research/h6-dyadic-source-repair/PROOF.md @@ -0,0 +1,275 @@ +# H6 dyadic Smith factors and exactly 560 physical row repairs + +**Source-bound algebraic theorem; no new kappa or paid source-coding circuit.** +Let R=Z[1/2]. For the actual 30960-port H6 matrix +`K_ts=(t_ts^3-4*t_ts)/48`, let C=I-K. Its localized Smith factors are + +``` +1 repeated 30400 times, +11 repeated 336 times, +209=11*19 repeated 208 times, +4807=11*19*23 repeated 16 times. +``` + +Consequently C is not a dyadic unimodular coding map. A dyadic matrix repair +needs rank at least 560. Exactly 560 literal physical rows can be replaced to +make C unimodular: an explicit 560-row set and finite small modular minors +certify existence. This is an algebraic row-completion theorem, without the +replacement coefficients, native frame transports or a paid ADD realization. +An arbitrary-input dirty-helper-restored implementation of `(x,h)->(Cx,h)` +by dyadic unimodular operations remains impossible over R. A stable unit completion with 560 auxiliary +directions exists algebraically, but necessarily changes their outputs and +allows helper dirt into the coded output. + +## 1. Pinned premises and verification boundary + +Scientific pin: `20ecf2891d80b5acf18d980b2164fb44ea7faa90`. Original Git blobs and SHA256s are recorded in `SOURCES.json`. The portable +replay reads these declared live inputs directly; committed-byte/source-history +and Git-free export gates bind the original source bytes: + +- `research/niemeier-lattices/workbench/helper-routes/compensation_rank.py`: + written degree≤6 spherical-moment decomposition and exact H6 spectrum. +- `research/h6-independent-audit/spectral/README.md` and `results.json`: + canonical 120x240 restriction, sector dimensions, exact moment proof and + full feature-rank justification. +- `research/h6-independent-audit/spectral/audit.py`: defines the radial basis + `R=[x*single,x*rootroot]`, with source identity `num@R=48*R@M` and + `M=[[9,-240],[-18,-195]]`. This identifies which coefficient multiplies the + root-product rows. Its representative probes supplement the written moment + proof; they do not independently prove every sector action. +- `research/niemeier-lattices/code/e8_cubed.py`: actual canonical root order + and product row IDs. +- `research/h6-compensation-network/k_encoder/README.md`: dyadic factor/word + contract and its independent 816-centre inventory. + +These source audits are inherited, not freshly rerun here. The theorem uses +their exact all-parameter moment/sector proof, rather than promoting the +representative operator probes into a full matrix identity. Fresh checks are +the polynomial reductions, determinant/Smith arithmetic, explicit physical +row set, small modular minors and unit-completion blocks. + +The actual Gram values are integers in[-4,4]. Direct reduction of +`(t^3-4t)/48` for every integer in that interval is dyadic, so K and C have +entries in R. K is symmetric. The pinned complete spectrum gives + +``` +char_K(z)=z^30144*(z-39)^224*(z-45)^560 + *(z^2+186z-6075)^16. +``` + +Symmetry gives real orthogonal diagonalizability. Therefore the monic +polynomial + +``` +K*(K-39I)*(K-45I)*(K^2+186K-6075I)=0 +``` + +is an exact matrix identity. Its coefficients and all entries lie in R, so +both this identity and the characteristic polynomial reduce modulo every +odd prime. A rational spectrum without this diagonalizability argument +would not alone justify the annihilator. + +## 2. Determinant and all localized Smith factors + +The nontrivial C eigenvalues are -38 (224 times), -44 (560 times), and the +two shifted radial eigenvalues, whose product is +`1+186-6075=-5888=-2^8*23`, for each of 16 radial pairs. All other C eigenvalues +are 1. The 224+560+16 negative factors give a positive sign. Thus + +``` +det(C)=2^1472*11^560*19^224*23^16. +``` + +R has units ±2^k. This determinant is not a unit. In particular finite +dyadic elementary ADDs, whose determinants are 1, cannot implement C on the +same physical coordinates. Allowing unit signs or unit dyadic scalings would +still not remove the odd-prime obstruction. + +Modulo 11, the characteristic multiplicity of eigenvalue 1 of K is 560; +modulo 19 it is 224; modulo 23 it is 16. In each case 1 is a **simple root of +the reduced annihilator**, checked by its nonzero derivative. Hence every +Jordan block of K at eigenvalue 1 has size 1, regardless of other roots or +Jordan blocks. Therefore + +``` +nullity(C mod 11)=560, +nullity(C mod 19)=224, +nullity(C mod 23)=16. +``` + +For a matrix over the PID R, nullity modulo p counts the Smith factors +divisible by p, while v_p(det C) counts their positive valuations. Here these +counts agree. Every nonunit elementary divisor consequently has exponent 1; +there is no higher 11-,19- or 23-power hidden in a Smith factor. No other odd +prime divides the determinant. Combining the primary factors in divisibility +order yields precisely the four displayed classes. + +If C+B is unimodular and rank_Q(B)≤r, then rank(B mod 11)≤r, since all +(r+1)-minors vanish already over R. Full rank modulo 11 requires r≥560. +Changing r literal rows is a rank≤r perturbation, giving the same lower +bound for literal physical row replacement. Smith form attains rank 560 +abstractly, but that observation alone does not identify 560 physical rows. +The following certificate supplies those rows. + +## 3. A literal 560-row completion certificate + +Number the canonical E8 roots a_0,...,a_119 in the sorted doubled-coordinate +order of the pinned source. The root-product physical row IDs are + +``` +2160+240*i+2*j+sign, +port=(a_i,(-1)^sign*a_j), sign=0,1. +``` + +The first 2160 rows are the two pure norm-four blocks. Define a set S of 280 +ordered canonical root-pairs: all 120 diagonal pairs(i,i), plus both +orientations of the 80 explicit undirected pairs stored as EDGES in the +checker. S is invariant under swapping coordinates. Let J consist of both +signed b rows for each pair in S. The result stores all 560 literal row IDs. + +We show that restriction to J is injective on ker(C mod p) for every +nonunit prime p. For the three relevant primes it is enough to exhibit +independent restricted kernel functions of the exact nullities from section 2. + +### Prime 11: the 560 mixed functions + +Take the 35 traceless quadratic polynomials + +``` +q_ij(b)=b_i*b_j (i-b the first sector is even and the second is odd. The invertible +two-by-two signed-pair Hadamard transform separates them because 2 is a unit +modulo 11. Their evaluation on J therefore has rank 560. These functions span +the entire kernel, so restriction to J is injective. + +### Prime 19: the 224 pure harmonic cubics + +For each degree-three monomial, use its integer harmonic projection in eight +coordinates. The checker evaluates + +``` +10*x_i^3-3*|x|^2*x_i, +10*x_i^2*x_j-|x|^2*x_j (i!=j), +10*x_i*x_j*x_k (i,j,k distinct). +``` + +These are harmonic because the cubic Laplacian trace is removed with +n+2=10. Their restriction to all 120 canonical roots has exact rank 112 +modulo 19, freshly checked. On the full H6 shell the moment proof gives +Kf=39f, hence these functions are in ker(C mod 19). Each block contributes 112. + +S contains every diagonal(a,a). The two signed b rows for each such pair +have values `(H(a),H(a))` and `(H(a),-H(a))` on the two block sectors. +Again the signed-pair transform separates them. Thus restriction on just +these 240 of the 560 selected rows already has rank 224. It spans the full +kernel, proving injectivity on J. + +### Prime 23: the 16 radial kernel functions + +In the pinned radial basis `[x*single,x*rootroot]`, K acts through +`M=[[9,-240],[-18,-195]]`. Modulo 23, `(1,10)^T` is a 1-eigenvector. Its +root-product coefficient is 10, which is nonzero modulo 23. For each of eight +coordinates in either block this gives a kernel function whose root-product +restriction is 10*a_i or 10*b_i. The integer root coordinate matrix has rank 8 +modulo 23. The same 240 diagonal signed rows separate the two blocks, giving +rank 16. This spans the full radical C kernel modulo 23 and proves injectivity. + +### Primitive rows and row replacement + +Let I be the 30400-row complement of J. If the C rows indexed by I were +dependent modulo p, extend the dependency coefficients by zero on J. That +would give a nonzero left-kernel vector vanishing on J. C is symmetric, so +this is a kernel vector, contradicting injective restriction. Thus the +untouched 30400 rows are independent modulo 11,19 and 23. For every other odd +prime C is invertible, so any subset of its rows is independent. + +Over the PID R, a full-row-rank matrix generates a primitive submodule iff +its rows stay independent modulo every nonunit prime: a nonunit Smith +factor would cause a rank drop at one of its prime divisors. Consequently +the row module generated by C_I is primitive. The quotient of R^30960 by +this module is free of rank 560. Extend these 30400 existing rows to an R-basis +and insert the 560 complementary basis rows at J. The resulting matrix A is +unimodular and differs from C only on J. This proves **exactly 560 literal +physical row replacements suffice algebraically**, matching the lower bound. + +If determinant 1 is required, rescale one replaced row by the inverse of +det(A), a dyadic unit. This preserves the untouched rows. Neither the +complementary coefficients nor a finite physical elementary-ADD word is +produced here. The theorem is an existence certificate, not a zero-cost +source-interface substitution or an attained native tariff. + +## 4. Stable unit completion and arbitrary helper dirt + +An invertible(N+r)x(N+r) dyadic matrix whose upper-left block is C requires +r≥560: modulo 11 its first N rows can gain at most r ranks from the new +columns. Smith form attains r=560. Each nonunit Smith coordinate d has the +unit block + +``` +[[d,1],[-1,0]], (x,h)->(d*x+h,-x). +``` + +The four exact ADDs `x+=h; h-=x; x+=h; x-=d*h` implement it. The checker +checks the two arbitrary input columns and determinant 1 for d=11,209,4807. +Their total local component-Horner bill is 13008, before basis changes and +all frame, copy, storage and cleanup costs. This scalar count is not a +native rank tariff. Smith basis transforms are not free. A dyadic unit on +one auxiliary output can normalize the global completion determinant if +needed; no paid implementation of that normalization or the bases is given. + +The helper output changes to -x and the coded output contains the entering +helper dirt h. Within the dyadic unimodular class, a simultaneous exact endpoint `(x,h)->(Cx,h)` would have block +determinant det(C), which is a nonunit. Thus adding restored arbitrary dirty +helpers cannot by itself legalize C as a standalone unimodular coding map. +A viable new global controller must explicitly carry, cancel or repair the +560 auxiliary/residue directions, bind their source access and native frame +visits, and pay their allocation, cleanup and precision. None is supplied by +the Smith theorem or the physical-row existence certificate. + +## 5. The required consumer is a new complement producer + +The current native clean H6 response is Kx, whose scalar row rank is 816. +The matrix analyzed here is **C=I-K**, the compensation operator. It is not +the current clean response. Coding K itself into a full-rank unimodular +response would require at least 30960-816=30144 row repairs, already by +rational rank. Invertible source/output gauges do not change that rank +deficiency. Consequently the 560-row result cannot be applied to the native +K response by relabeling it as a C producer. + +The proposed consumer would have to be a new cheap clean **complement** +word returning Cx, with explicit coded source/output frame representatives, +ordinary dirt and residue endpoint contract. All coefficients and row IDs +in this theorem use the existing canonical H6 ports; no new such gauges or +producer are emitted. The existing fullC compensation word using hundreds +of millions of edge helpers does produce C algebraically, but retaining +that cost does not deliver a useful coded interface. Even the identity term +of I-K is not a free direct source-to-target delivery under the existing +flags. Producing the complement cheaply is therefore a separate constructive +obligation, followed by the 560-direction repair/extension, restoration and +global-controller invoice. There is no claimed 560-repair supplier here. + +## Verification boundary + +The registered portable replay checks the small modular certificates and +explicit unit blocks under isolated optimized Python 3.12. It authenticates +the inherited exact spectral and sector sources, but does not rerun their +full original audit or construct the dense matrix. The separate checker +rederives all 240 harmonic, 560 mixed and 32 radial polynomial actions from +the stated degree-six shell moments; the inherited full spectrum premise +remains explicit. It uses all 816 coefficient positions per cubic identity. +The all-prime and primitive-completion implications are the written proof above. +The producer executes two matrix mutations and two arithmetic counterchecks; +the independent checker executes three matrix/eigenvector mutations. +Actual replacement coefficients, Smith bases and a paid physical circuit are +not supplied. Source credit and licensing remain in README.md and SOURCES.json. +This is not a formal-kernel or complete multiplication theorem. diff --git a/research/h6-dyadic-source-repair/README.md b/research/h6-dyadic-source-repair/README.md new file mode 100644 index 0000000000..f086ace242 --- /dev/null +++ b/research/h6-dyadic-source-repair/README.md @@ -0,0 +1,68 @@ +# Sharp dyadic repair of the H6 source map + +For the inherited 30,960-port H6 kernel, let `C=I-K`. Over `Z[1/2]`, its +localized Smith factors are + +``` +1^30400, 11^336, 209^208, 4807^16. +``` + +Its determinant is `2^1472 * 11^560 * 19^224 * 23^16`, a dyadic nonunit. +Any dyadic repair making C unimodular has rank at least **560**. A finite +certificate identifies **560 actual physical rows** whose replacement is +sufficient algebraically, matching that lower bound. The untouched 30,400 +rows form a primitive submodule; the proof gives existence of completing +rows, not their coefficients or a paid circuit. + +A stable invertible extension with C as its upper-left block likewise needs +exactly 560 auxiliary directions algebraically. Its elementary Smith blocks +send `(x,h)` to `(d*x+h,-x)`: helper dirt enters the output and helpers change. +They do not provide a restored-helper source interface. An exact standalone +endpoint `(x,h)->(Cx,h)` remains impossible for a dyadic unimodular map. + +This is a source-bound algebraic theorem and small exact certificate. C is the mathematical complement I-K, not the current native K response. +No native complement producer or legal source/output gauge is supplied. The +complete spectrum and sector identities are inherited from the pinned +spectral/moment proof. Neither the dense 30,960-square matrix nor its Smith +reduction is freshly computed. Native source flags, basis costs, dirt +compensation/restoration, banks/copies, precision/tape, controller and joint +outer transfer remain unresolved. **No new kappa or physical supplier is +claimed.** + +[PROOF.md](PROOF.md) states the source premises, determinant and localization +argument, complete physical row certificate and stable-extension boundary. +`derive.py` and the separate `independent.py` replay the small arithmetic; +`SOURCES.json` pins the original Git objects and every live input. The primary +geometry stays live rather than being copied into a provenance archive. + +Reproduce with Python 3.12 and no third-party dependencies: + +```sh +python3.12 -I -O -B -Werror scripts/research_package.py --package research/h6-dyadic-source-repair +python3.12 -I -O -B -Werror research/h6-dyadic-source-repair/verify.py --out /tmp/fresh-smith-result +``` + +The registered replay authenticates inputs before and after, uses isolated +optimized child interpreters and writes only fresh external temporary output. +The local coefficient count for the three types of Smith blocks excludes all +basis/frame/owner costs and is not a native rank tariff. + +## Open next questions + +- Can the named 560-row completion be synthesized at actual source frames? + First construct explicit dyadic completion coefficients and a paid word. + Primitive completion does not price basis changes or legal access. +- Can a stable completion meet a useful dirty-helper caller contract? First + specify and price its dirt compensation and restoration. The unit blocks + alone leave these obligations open. + +Credit Dominik Scholz's PR606 E8 geometry/factorization, DreamingOfClouds' +H6/Walsh proposal, and PR1830's spectral/compensation/encoder audit with its +retained predecessor lineage. The spectral theorem is reused explicitly; +this contribution derives its dyadic Smith consequences and supplies the +actual row-support certificate. No priority is claimed for Smith theory, +primitive module completion or generic rank perturbation bounds. + +Ross Richardson, with substantial OpenAI Codex assistance in derivation, +separate audit and packaging. Separate AI implementations are not human +review or formal-kernel verification. Apache-2.0. diff --git a/research/h6-dyadic-source-repair/SOURCES.json b/research/h6-dyadic-source-repair/SOURCES.json new file mode 100644 index 0000000000..e528f1db63 --- /dev/null +++ b/research/h6-dyadic-source-repair/SOURCES.json @@ -0,0 +1,54 @@ +{ + "base_commit": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "files": [ + { + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "path": "certificates/selected-result.json", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "usage": "provenance" + }, + { + "git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5", + "path": "docs/research/agent-task-catalog.json", + "sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0", + "usage": "provenance" + }, + { + "git_blob": "9b5bd0a67e327350016a622276306c094218dd0b", + "path": "research/h6-compensation-network/k_encoder/README.md", + "sha256": "949732ca1bc56b738bf26dcbf517a5d2e24ed9813bede0a0e30e620c9317bdce", + "usage": "input" + }, + { + "git_blob": "e7b1d7354b26c3c5d09c71a141c41414d0ec5545", + "path": "research/h6-independent-audit/spectral/README.md", + "sha256": "6f789925b5d3d86b51aa0e23ef8012e10ab54da51d89c767d5330ffb09707135", + "usage": "input" + }, + { + "git_blob": "5f47dc2686e8b7f37751cb1a6b33318018138698", + "path": "research/h6-independent-audit/spectral/results.json", + "sha256": "13c6a1ca01ed10f1d3b927385b9f82fffe16de8f9fe04ac3e1f41484cc7cd59e", + "usage": "input" + }, + { + "git_blob": "d4444d142fb370498bcd9a0abec45e2f5ea0b0c5", + "path": "research/niemeier-lattices/code/e8_cubed.py", + "sha256": "ce24f397053c0ef5b26881bb7ccfab53fb0a3d762f2de04086fed8f7b41e8234", + "usage": "input" + }, + { + "git_blob": "b10e428cfa669fac24f8ead05dab8398d77850af", + "path": "research/niemeier-lattices/workbench/helper-routes/compensation_rank.py", + "sha256": "37b67640dc8b972450d3e6c3fc123974dcd7bfc84c944d8300e6f9cca09b01b6", + "usage": "input" + }, + { + "git_blob": "4e2588c22148c3c3addd213b7b14ef22a0d23888", + "path": "research/h6-independent-audit/spectral/audit.py", + "sha256": "9eb9346d57454085e1c3d49541a3e46d179147b836d99508090e82f5afb1231b", + "usage": "input" + } + ], + "schema_version": 1 +} diff --git a/research/h6-dyadic-source-repair/TASK.json b/research/h6-dyadic-source-repair/TASK.json new file mode 100644 index 0000000000..05cc7baccb --- /dev/null +++ b/research/h6-dyadic-source-repair/TASK.json @@ -0,0 +1,71 @@ +{ + "actual_scope": "Exact localized Smith factors of the inherited H6 C=I-K and sharp algebraic replacement of560 named physical rows overZ[1/2], with stable auxiliary dimension floor.", + "ai_assistance": "Substantial OpenAI Codex assistance in derivation, separate review and packaging; no human or formal-kernel verification.", + "author": "Ross Richardson, with substantial OpenAI Codex assistance", + "base_commit": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "bottleneck_link": "Rational invertibility of C does not imply a dyadic reversible source circuit. The560-row primitive-completion certificate separates a minimal algebraic repair from its unpriced realization.", + "budget_minutes": 240, + "evidence": "PROOF.md, explicit row certificate and registered independent exact checks.", + "open_questions": [ + { + "blocked_by": "No coefficients or paid physical synthesis supplied.", + "first_step": "Construct explicit dyadic completion coefficients and a native source-preserving word including every ADD and frame transition.", + "question": "Can the named560-row algebraic completion be synthesized at the actual source frames with a useful complete cost?", + "why_it_matters": "Primitive row completion does not price basis changes or legal source access." + }, + { + "blocked_by": "No restored-helper interface, physical owners or precision/outer admission.", + "first_step": "Specify and price compensation/restoration under a concrete caller contract.", + "question": "Can stable completion meet the required dirty-helper output contract?", + "why_it_matters": "The unit blocks mix helper dirt into the output and do not restore helpers." + } + ], + "original_card": { + "acceptance_gate": "An explicit replacement identity, verified on a small complete instance with dirty inputs, priced with ceiling.ceiling(unpaid=...). 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.", + "allowed_variations": [ + "One template change or one endpoint-contract change.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "bottleneck_link": "The deficit is one coordinate per family minus the centre charge; doubling unpaid coordinates per family scales it directly.", + "first_experiment": "Explain where the single unpaid coordinate per family comes from in the hosted template; propose one change and price it. Ideal budget: two unpaid coordinates per family is 3.77x (levers.py).", + "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." + }, + "id": "coverage-law-change", + "methods": [ + "State a replacement for the coverage identity (mass = 72W + 64N) and the contract change that realizes it, with its implementation cost.", + "Find an obstruction: show which data-endpoint obligation forces exactly one unpaid coordinate in the current template." + ], + "overlap_terms": [ + "coverage identity", + "unpaid coordinate", + "deficit law", + "W - 64N" + ], + "question": "Can a template or call contract leave two or more unpaid coordinates per live family?", + "scope_change_triggers": [ + "Counting a coordinate as unpaid while leaving it unadvanced in the data endpoint.", + "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." + ], + "starting_points": [ + "docs/research/research-family-status.md", + "research/complex-local-word-ceiling/README.md", + "research/idle-axis-hosting/PROOF.md", + "certificates/selected-result.json" + ] + }, + "outcome": "partial", + "priority_revision": 6, + "schema_version": 1, + "scope_change_reason": "A scoped algebraic prerequisite for source coding, not a new coverage law. It identifies the minimum nonunit obstruction and an actual physical row support; all paid circuit and global obligations remain open.", + "scope_status": "changed", + "stop_rule": "Stop after one source-bound algebraic theorem and independent finite certificate. No native realization or kappa claim without complete bases, source flags, restoration, precision and ownership.", + "task_id": "coverage-law-change" +} diff --git a/research/h6-dyadic-source-repair/VALIDATION.json b/research/h6-dyadic-source-repair/VALIDATION.json new file mode 100644 index 0000000000..7f1a2a0b80 --- /dev/null +++ b/research/h6-dyadic-source-repair/VALIDATION.json @@ -0,0 +1,51 @@ +{ + "committed_export": "pending", + "cost_scope": "Algebraic completion of C=I-K only; not the native K response, completion coefficients or a paid physical/restored source circuit.", + "hosted_ci": "pending", + "independent_actions": { + "harmonic": 240, + "mixed": 560, + "radial": 32 + }, + "independent_controls": [ + "duplicate selected mixed row", + "unprojected cubics", + "wrong radial eigenvector" + ], + "inherited": "Full characteristic spectrum and degree-six shell moment theorem remain explicit source premises.", + "localized_smith": [ + [ + 1, + 30400 + ], + [ + 11, + 336 + ], + [ + 209, + 208 + ], + [ + 4807, + 16 + ] + ], + "no_new_kappa": true, + "physical_rows": 560, + "producer_arithmetic_controls": [ + "omit the23-primary radial Smith factors", + "swap the11 and19 nullity assignments" + ], + "producer_matrix_controls": [ + "duplicate one actual mixed evaluation row", + "use unprojected cubics in place of harmonic cubics" + ], + "python": "3.12.12 (main, Oct 9 2025, 11:07:00) [Clang 17.0.0 (clang-1700.6.3.2)]", + "registered_log_sha256": "73741b46bce4a09c1d49322a7a343f2417d554de6f345b055a90e7f967588423", + "seconds": 1.1610562909991131, + "stable_auxiliary_dimension": 560, + "stage": "precommit portable replay", + "status": "PASS_H6_DYADIC_SMITH_PHYSICAL_ROW_EXISTENCE", + "utc": "2026-10-18T13:09:55.477141+00:00" +} diff --git a/research/h6-dyadic-source-repair/VERIFY.json b/research/h6-dyadic-source-repair/VERIFY.json new file mode 100644 index 0000000000..5edc6b0ee0 --- /dev/null +++ b/research/h6-dyadic-source-repair/VERIFY.json @@ -0,0 +1,28 @@ +{ + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "-Werror", + "{package}/verify.py" + ], + "checks": "Exact localized Smith arithmetic, named560-row primitive-completion certificate, separate240harmonic/560mixed/32radial polynomial identities, small modular minors, actual unit blocks and named defect controls; inherited full spectrum explicitly retained.", + "timeout_seconds": 120 + } + ], + "inputs": [ + "research/h6-compensation-network/k_encoder/README.md", + "research/h6-independent-audit/spectral/README.md", + "research/h6-independent-audit/spectral/results.json", + "research/niemeier-lattices/code/e8_cubed.py", + "research/niemeier-lattices/workbench/helper-routes/compensation_rank.py", + "research/h6-independent-audit/spectral/audit.py" + ], + "python": "3.12", + "requirements": [], + "schema_version": 1, + "status": "ready" +} diff --git a/research/h6-dyadic-source-repair/derive.py b/research/h6-dyadic-source-repair/derive.py new file mode 100644 index 0000000000..13d8d5dd0b --- /dev/null +++ b/research/h6-dyadic-source-repair/derive.py @@ -0,0 +1,214 @@ +#!/usr/bin/env python3 +"""Dyadic Smith obstruction and explicit560-row repair existence certificate. + +Source-bound to the exact H6 spectrum/moment proof, not a dense Smith +computation or a physical coding circuit. No arbitrary rational inverse. +""" +import argparse +import types +from collections import Counter +from fractions import Fraction as F +from itertools import combinations, combinations_with_replacement +from pathlib import Path +import hashlib +import json + +HERE=Path(__file__).resolve().parent +m=types.ModuleType('smith_geometry') +exec(compile((HERE/'geometry.py').read_bytes(),str(HERE/'geometry.py'),'exec'),m.__dict__) +need=m.need +REPO=HERE.parents[1] +PIN='20ecf2891d80b5acf18d980b2164fb44ea7faa90' +EDGES=[(76,115),(57,101),(3,12),(39,42),(72,114),(37,86),(0,32),(68,104), + (50,75),(30,37),(82,104),(27,57),(17,101),(17,100),(5,54),(34,37), + (7,86),(33,112),(17,103),(11,19),(39,96),(76,117),(9,100),(104,116), + (64,92),(41,52),(22,105),(4,106),(4,108),(19,72),(52,62),(84,99), + (60,85),(12,103),(21,38),(110,113),(36,64),(16,74),(50,79),(6,28), + (12,39),(35,82),(90,103),(62,80),(56,93),(49,55),(12,91),(66,69), + (38,85),(55,118),(24,100),(16,21),(54,86),(34,52),(21,24),(6,93), + (68,90),(4,77),(11,66),(67,87),(16,96),(43,90),(64,69),(73,113), + (19,83),(50,113),(70,108),(95,101),(61,63),(77,115),(93,102),(51,75), + (85,111),(66,67),(16,105),(103,119),(7,36),(112,117),(0,107),(64,70)] + + +def modular_rank(rows,prime): + rows=[[x%prime for x in row] for row in rows] + width=len(rows[0]);rank=0;det=1;columns=[] + for col in range(width): + pivot=next((i for i in range(rank,len(rows)) if rows[i][col]),None) + if pivot is None:continue + if pivot!=rank:rows[rank],rows[pivot]=rows[pivot],rows[rank];det=-det + v=rows[rank][col];det=det*v%prime + inverse=pow(v,-1,prime);rows[rank]=[x*inverse%prime for x in rows[rank]] + reference=rows[rank] + for i in range(rank+1,len(rows)): + v=rows[i][col] + if v:rows[i][col:]=[(x-v*y)%prime for x,y in zip(rows[i][col:],reference[col:])] + columns.append(col);rank+=1 + if rank==len(rows):break + return rank,det%prime if rank==width==len(rows) else None,columns + + +def mul(a,b): + out=[0]*(len(a)+len(b)-1) + for i,x in enumerate(a): + for j,y in enumerate(b):out[i+j]+=x*y + return out + + +def evaluate(poly,x): + out=0 + for a in reversed(poly):out=out*x+a + return out + + +def valuation(n,p): + count=0 + while n%p==0:count+=1;n//=p + return count + + +def spectral_certificate(): + sources={} + for path in ('research/h6-independent-audit/spectral/results.json', + 'research/h6-independent-audit/spectral/README.md', + 'research/h6-independent-audit/spectral/audit.py', + 'research/niemeier-lattices/workbench/helper-routes/compensation_rank.py', + 'research/niemeier-lattices/code/e8_cubed.py', + 'research/h6-compensation-network/k_encoder/README.md'): + raw=(REPO/path).read_bytes() + sources[path]=hashlib.sha256(raw).hexdigest() + if path.endswith('results.json'):result=json.loads(raw) + need(result['kernel_rank']==816 and result['compensation_rank_over_real_numbers']==30960, + 'pinned exact full H6 spectrum') + spectrum=result['kernel_spectrum'] + need([x['multiplicity'] for x in spectrum if 'multiplicity' in x]==[224,560,30144], + 'pinned harmonic/mixed/null multiplicities') + need(any(x.get('multiplicity_each')==16 for x in spectrum),'pinned radial multiplicities') + factors=[([0,1],30144),([-39,1],224),([-45,1],560),([-6075,186,1],16)] + annihilator=[1] + for poly,multiplicity in factors:annihilator=mul(annihilator,poly) + derivative=[i*x for i,x in enumerate(annihilator)][1:] + nullities={} + for prime,wanted in ((11,560),(19,224),(23,16)): + need(evaluate(annihilator,1)%prime==0 + and evaluate(derivative,1)%prime!=0,'eigenvalue1 simple in reduced annihilator') + multiplicity=sum(n for poly,n in factors if evaluate(poly,1)%prime==0) + need(multiplicity==wanted,'reduced characteristic multiplicity') + nullities[prime]=wanted + need(1+186-6075==-5888 and 5888==2**8*23,'radial determinant factor') + need((224+560+16)%2==0,'positive determinant sign') + need(all((F(t**3-4*t,48).denominator & (F(t**3-4*t,48).denominator-1))==0 + for t in range(-4,5)),'every attainable integer Gram coefficient is dyadic') + determinant={2:224+2*560+8*16,11:560,19:224,23:16} + need(determinant[2]==1472,'dyadic determinant valuation') + need(all(determinant[p]==nullities[p] for p in nullities), + 'all nonunit elementary divisors have exponent1') + smith=[(1,30400),(11,336),(209,208),(4807,16)] + need(sum(n for d,n in smith)==30960,'all Smith factors covered') + need(all(sum(n*valuation(d,p) for d,n in smith)==nullities[p] for p in nullities), + 'localized Smith prime valuations') + missing_radial=[(1,30400),(11,336),(209,224)] + need(sum(n*valuation(d,23) for d,n in missing_radial)!=nullities[23], + 'omitted radial torsion corruption rejected') + need(224!=nullities[11] and 560!=nullities[19], + 'swapped odd-prime nullity corruption rejected') + return sources,annihilator,determinant,nullities,smith + + +def physical_row_certificate(): + roots=m.canonical_roots() + need(len(EDGES)==len(set(EDGES))==80,'explicit80 physical pair edges') + S=[(i,i) for i in range(120)]+[pair for i,j in EDGES for pair in ((i,j),(j,i))] + need(len(S)==len(set(S))==280 and set(S)=={(j,i) for i,j in S}, + 'symmetric280-pair row set containing all diagonals') + quadratics=[[a[i]*a[j] for i,j in combinations(range(8),2)] + +[a[i]*a[i]-a[7]*a[7] for i in range(7)] for a in roots] + mixed=[[x*y for x in roots[i] for y in quadratics[j]] for i,j in S] + rank,det,pivots=modular_rank(mixed,11) + need(rank==280 and det,'explicit280 mixed feature minor modulo11') + # Symmetry of S gives the swapped35x8 mixed feature minor. Both b signs + # form a560x560 block, separated by the invertible Hadamard pair matrix. + harmonic=[] + monomials=list(combinations_with_replacement(range(8),3)) + for a in roots: + norm=sum(x*x for x in a);row=[] + for triple in monomials: + counts=Counter(triple) + value=10*a[triple[0]]*a[triple[1]]*a[triple[2]] + if len(counts)==1:value-=3*norm*a[triple[0]] + elif len(counts)==2: + single=next(i for i,n in counts.items() if n==1) + value-=norm*a[single] + row.append(value) + harmonic.append(row) + hrank,_,hpivots=modular_rank(harmonic,19) + need(hrank==112,'integer harmonic root restrictions rank112 mod19') + lrank,_,lpivots=modular_rank(roots,23) + need(lrank==8,'integer radial root restrictions rank8 mod23') + M=[[9,-240],[-18,-195]] + radial=[1,10] + need(all((sum(M[i][j]*radial[j] for j in range(2))-radial[i])%23==0 + for i in range(2)),'radial1-eigenvector modulo23, nonzero root coefficient10') + rows=sorted(2160+240*i+2*j+sign for i,j in S for sign in (0,1)) + need(len(rows)==len(set(rows))==560,'literal physical row support560') + # Strong negative controls on the actual small arithmetic certificates. + duplicate=list(mixed);duplicate[-1]=duplicate[0] + need(modular_rank(duplicate,11)[0]<280,'duplicate physical mixed row rejected') + raw=[[a[i]*a[j]*a[k] for i,j,k in monomials] for a in roots] + need(modular_rank(raw,19)[0]==120,'unprojected cubics differ from harmonic112') + return {'root_pairs':S,'physical_rows':rows,'mixed_mod11_rank':rank,'mixed_mod11_det':det, + 'harmonic_mod19_rank':hrank,'harmonic_pivot_columns':hpivots, + 'radial_mod23_rank':lrank,'radial_pivot_columns':lpivots, + 'radial_source_action':M,'radial_mod23_eigenvector':radial, + 'kernel_restriction_ranks':{11:560,19:224,23:16}, + 'consequence':'The untouched30400 physical rows of C are independent modulo every odd prime, hence generate a primitive free row submodule over Z[1/2]. They admit an algebraic unimodular completion by replacing only these560 rows. Completion coefficients and a native physical ADD realization are not supplied.'} + + +def completion(): + blocks=[] + for value,count in ((11,336),(209,208),(4807,16)): + rows=[[1,0],[0,1]] + for dst,src,q in ((0,1,1),(1,0,-1),(0,1,1),(0,1,-value)): + rows[dst]=[x+q*y for x,y in zip(rows[dst],rows[src])] + need(rows==[[value,1],[-1,0]] and rows[0][0]*rows[1][1]-rows[0][1]*rows[1][0]==1, + 'explicit four-ADD unit completion block') + primitive=12+3+value.bit_length()-1+value.bit_count() + blocks.append({'d':value,'count':count,'matrix':rows,'component_primitives':primitive}) + return blocks + + +def main(): + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument("--out",type=Path,required=True) + args=parser.parse_args() + sources,annihilator,determinant,nullities,smith=spectral_certificate() + physical=physical_row_certificate() + blocks=completion() + out={'status':'PASS_H6_DYADIC_SMITH_AND_SHARP560_PHYSICAL_ROW_REPAIR_EXISTENCE_NO_NEW_KAPPA', + 'source_pin':PIN,'source_sha256':sources,'ring':'Z[1/2]','N':30960, + 'K_annihilator_low_coefficients':annihilator, + 'annihilator_proof':'K is a rational symmetric matrix. The pinned exact moment/sector proof gives its complete real spectrum; orthogonal diagonalization therefore implies the displayed monic rational annihilator identity. Its entries are dyadic on every attainable Gram value, so polynomial identities and characteristic factors reduce modulo odd primes.', + 'sector_source_boundary':'The complete sector polynomial actions are inherited from the written spherical-moment proof, not inferred from representative probes. Pinned spectral/audit.py defines radial basis R=[x*single,x*rootroot] and checks num@R=48R@M, fixing the rootproduct coefficient10 of eigenvector(1,10) modulo23. The pinned source audits are not freshly replayed here.', + 'C_determinant_prime_valuations':determinant,'C_mod_prime_nullities':nullities, + 'localized_Smith_factors':[{'factor':d,'count':n} for d,n in smith], + 'minimal_rank_repair':560,'minimal_physical_rows_replaced_algebraically':560, + 'minimal_stable_auxiliary_directions':560,'physical_row_certificate':physical, + 'unit_extension_Smith_blocks':blocks, + 'Smith_block_component_primitives_before_basis_cost':sum(z['count']*z['component_primitives'] for z in blocks), + 'dirty_contract':'The unit block sends(x,h) to(d*x+h,-x). Helper output is changed and top output contains arbitrary helper dirt. Restored-helper exact(x,h)->(C*x,h) has determinant detC and is impossible as a dyadic unimodular map. No clean/cancelled endpoint interface follows from stable completion.', + 'elementary_ADD_caveat':'ADD-only networks have determinant1, a stronger condition than being a dyadic unit. The algebraic row completion can be normalized to determinant1 by rescaling one replaced row by a dyadic unit. Stable completion can normalize one auxiliary output similarly. This is an algebraic existence statement, not a paid implementation of the Smith bases or physical transports.', + 'negative_controls':['duplicate one actual mixed evaluation row','use unprojected cubics in place of harmonic cubics'], + 'arithmetic_counterchecks':['omit the23-primary radial Smith factors','swap the11 and19 nullity assignments'], + 'proposed_consumer_boundary':{'current_native_clean_response':'K*x, rank816, in the existing canonical H6 source/output frame conventions', + 'minimum_row_repair_if_coding_K_itself':30960-816, + 'C_is':'The full-rank compensation operator I-K, not the current native clean response.', + 'missing_consumer':'A new cheap producer of the complement response C*x with specified source/output gauges and residue lifecycle. The existing fullC edge-helper word is far too costly and does not discharge this gate.', + 'gauges':'All row IDs and coefficients use the pinned canonical physical ports. No new coded source/output frame representative or physical gauge realization is supplied. Invertible pre/post gauges preserve the rank deficiency of K.'}, + 'scope':'Source-bound exact Smith/localization theorem and literal560-row algebraic completion certificate for C=I-K, which is not the current native K response. The full30960 matrix is not constructed or Smith-reduced. Polynomial sector proofs are inherited; small modular feature minors and explicit unit blocks are freshly checked. Native complement producer, source/output gauges, basis-change work, input/auxiliary dirt compensation, restoration, physical banks/copies, phase/precision/tape, controller and outer multiplier are unresolved. No new kappa.'} + args.out.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n') + print(out['status']+' nullities=560/224/16 physical_rows=560 auxiliary_floor=560') + print('mixed minor det mod11',physical['mixed_mod11_det'],'Smith-block primitives',out['Smith_block_component_primitives_before_basis_cost']) + + +if __name__=='__main__':main() diff --git a/research/h6-dyadic-source-repair/geometry.py b/research/h6-dyadic-source-repair/geometry.py new file mode 100644 index 0000000000..3f0f5d3b3b --- /dev/null +++ b/research/h6-dyadic-source-repair/geometry.py @@ -0,0 +1,13 @@ +"""Exact extracted E8 root enumeration; Apache-2.0; substantial Codex assistance.""" +from itertools import combinations, product + +def need(ok, label): + if not ok: raise ValueError(label) + +def canonical_roots(): + roots = [] + for i,j in combinations(range(8),2): + for x,y in product((-2,2),repeat=2): + a = [0]*8; a[i],a[j] = x,y; roots.append(tuple(a)) + roots.extend(a for a in product((-1,1),repeat=8) if sum(a) % 4 == 0) + return sorted({a if next(x for x in a if x) > 0 else tuple(-x for x in a) for a in roots}) diff --git a/research/h6-dyadic-source-repair/independent.py b/research/h6-dyadic-source-repair/independent.py new file mode 100644 index 0000000000..0fc48692cc --- /dev/null +++ b/research/h6-dyadic-source-repair/independent.py @@ -0,0 +1,241 @@ +#!/usr/bin/env python3 +"""Independent H6 localized Smith and literal-row-completion review. + +No producer import. All harmonic/mixed/radial polynomial actions are +rederived from degree<=6 shell moments; small feature minors use the +producer's explicit row set as certificate data only. +Substantial OpenAI Codex assistance. No physical compiler or kappa claim. +""" +import argparse +from collections import Counter +from fractions import Fraction as F +from functools import lru_cache +from hashlib import sha256 +from itertools import combinations, combinations_with_replacement, product +import json +from math import factorial, prod +from pathlib import Path + +HERE=Path(__file__).resolve().parent +BASE=HERE +REPO=HERE.parents[1] +PIN='20ecf2891d80b5acf18d980b2164fb44ea7faa90' + + +def need(ok,message): + if not ok: raise ValueError(message) + + +def signed_shells(): + roots=[] + for i,j in combinations(range(8),2): + for a,b in product((-2,2),repeat=2): + x=[0]*8;x[i]=a;x[j]=b;roots.append(tuple(x)) + roots += [x for x in product((-1,1),repeat=8) if sum(x)%4==0] + fourth=[] + for i in range(8): + for a in (-4,4): + x=[0]*8;x[i]=a;fourth.append(tuple(x)) + for inds in combinations(range(8),4): + for signs in product((-2,2),repeat=4): + x=[0]*8 + for i,a in zip(inds,signs): x[i]=a + fourth.append(tuple(x)) + for i in range(8): + for signs in product((-1,1),repeat=8): + x=list(signs);x[i]*=3 + if sum(x)%4==0: fourth.append(tuple(x)) + need(len(roots)==len(set(roots))==240,'full root shell') + need(len(fourth)==len(set(fourth))==2160,'full norm-four shell') + need(all(sum(a*a for a in x)==8 for x in roots),'doubled root norms') + need(all(sum(a*a for a in x)==16 for x in fourth),'doubled norm-four norms') + return sorted(roots),sorted(fourth) + + +@lru_cache(None) +def spherical(indices,fourth=False): + counts=Counter(indices) + if any(n%2 for n in counts.values()): return 0 + degree=len(indices);radius2=16 if fourth else 8;number=2160 if fourth else 240 + wick=prod(prod(range(1,n,2)) for n in counts.values()) + out=F(number*radius2**(degree//2)*wick, + prod(8+2*j for j in range(degree//2))) + need(out.denominator==1,'integer shell moment') + return out.numerator + + +@lru_cache(None) +def h6_moment(indices): + # All products in this audit have even total degree<=6. Their canonical + # shell sum is half the full simultaneous-antipodal sum. + a=tuple(i for i in indices if i<8) + b=tuple(i-8 for i in indices if i>=8) + n=spherical(a)*spherical(b) + if not b: n+=spherical(a,True) + if not a: n+=spherical(b,True) + need(n%2==0,'canonical half-shell moment integrality') + return n//2 + + +TRIPLES=list(combinations_with_replacement(range(16),3)) +MULTI={t:6//prod(factorial(n) for n in Counter(t).values()) for t in TRIPLES} + + +def add(poly,monomial,coefficient): + t=tuple(sorted(monomial));poly[t]=poly.get(t,0)+coefficient + if not poly[t]: del poly[t] + + +def action(poly): + # 3072*K(p,z)=(p.z)^3-64*(p.z), in doubled coordinates. + cubic={t:MULTI[t]*sum(c*h6_moment(tuple(sorted(t+s))) + for s,c in poly.items()) for t in TRIPLES} + linear={i:-64*sum(c*h6_moment(tuple(sorted((i,)+s))) + for s,c in poly.items()) for i in range(16)} + return {t:c for t,c in cubic.items() if c},{i:c for i,c in linear.items() if c} + + +def harmonic_polynomial(t,offset): + p={};add(p,tuple(i+offset for i in t),10) + counts=Counter(t) + if len(counts)==1: trace=t[0];scale=3 + elif len(counts)==2: trace=next(i for i,n in counts.items() if n==1);scale=1 + else: return p + for j in range(8): add(p,(j+offset,j+offset,trace+offset),-scale) + return p + + +def check_actions(): + harmonic=[];mixed=[] + for offset in (0,8): + for t in combinations_with_replacement(range(8),3): + p=harmonic_polynomial(t,offset);a,b=action(p) + need(not b and a=={t:3072*39*c for t,c in p.items()}, + 'all harmonic polynomial coefficient actions') + harmonic.append(p) + for i in range(8): + for j,k in combinations(range(8),2): + mixed.append({tuple(sorted((i+offset,j+8-offset,k+8-offset))):1}) + for j in range(7): + p={};add(p,(i+offset,j+8-offset,j+8-offset),1) + add(p,(i+offset,15-offset,15-offset),-1);mixed.append(p) + for p in mixed: + a,b=action(p) + need(not b and a=={t:3072*45*c for t,c in p.items()}, + 'all mixed polynomial coefficient actions') + M=((9,-240),(-18,-195)) + for offset in (0,8): + for i in range(8): + # Both columns are twice the same-scale indicator basis8R: + # 2F1=x_i*(r_x^2-r_y^2),2F2=2*x_i*r_y^2 on norm16. + fs=[{},{}] + for j in range(8): + add(fs[0],(i+offset,j+offset,j+offset),1) + add(fs[0],(i+offset,j+8-offset,j+8-offset),-1) + add(fs[1],(i+offset,j+8-offset,j+8-offset),2) + for col,p in enumerate(fs): + a,b=action(p);hom={t:16*c for t,c in a.items()} + for j,c in b.items(): + for k in range(16): add(hom,(j,k,k),c) + expected={} + for row,f in enumerate(fs): + for t,c in f.items(): add(expected,t,16*3072*M[row][col]*c) + need(hom==expected,'all radial actions on actual norm16 shell') + return harmonic,mixed,M + + +def rank_and_det(matrix,p): + a=[[x%p for x in row] for row in matrix] + rows=len(a);cols=len(a[0]);r=0;det=1 + for j in range(cols): + q=next((i for i in range(r,rows) if a[i][j]),None) + if q is None: continue + if q!=r: a[r],a[q]=a[q],a[r];det=-det + v=a[r][j];det=det*v%p;iv=pow(v,-1,p) + a[r]=[(x*iv)%p for x in a[r]] + for i in range(r+1,rows): + v=a[i][j] + if v: a[i]=[(x-v*y)%p for x,y in zip(a[i],a[r])] + r+=1 + if r==rows: break + return r,det%p if r==rows==cols else None + + +def value(poly,x): + return sum(c*prod(x[i] for i in t) for t,c in poly.items()) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--producer',type=Path,required=True);parser.add_argument('--out',type=Path,required=True) + args=parser.parse_args();roots,fourth=signed_shells() + checks=0 + for shell,isfourth in ((roots,False),(fourth,True)): + for powers in ((2,),(4,),(2,2),(6,),(4,2),(2,2,2)): + inds=tuple(i for i,p in enumerate(powers) for _ in range(p)) + need(sum(prod(x[i] for i in inds) for x in shell)==spherical(inds,isfourth), + 'independent full-shell moment representatives') + checks+=1 + harmonic,mixed,M=check_actions() + canonical=[x for x in roots if next(t for t in x if t)>0] + claimed=json.loads(args.producer.read_bytes()) + cert=claimed['physical_row_certificate'];pairs=[tuple(x) for x in cert['root_pairs']] + need(len(pairs)==len(set(pairs))==280 and set(pairs)=={(b,a) for a,b in pairs}, + 'same literal symmetric280 root pairs') + need(all((i,i) in pairs for i in range(120)),'all physical diagonal pairs included') + Q=lambda x:[x[i]*x[j] for i,j in combinations(range(8),2)]+[x[i]**2-x[7]**2 for i in range(7)] + z=[[a*b for a in canonical[i] for b in Q(canonical[j])] for i,j in pairs] + mr,md=rank_and_det(z,11);need(mr==280 and md==6,'independent mixed mod11 minor') + h=[[value(p,x+(0,)*8) for p in harmonic[:120]] for x in canonical] + hr,_=rank_and_det(h,19);need(hr==112,'independent harmonic mod19 rank') + lr,_=rank_and_det(canonical,23);need(lr==8,'independent linear mod23 rank') + need([sum(M[i][j]*(1,10)[j] for j in range(2))%23 for i in range(2)]==[1,10], + 'radial eigenvector orientation') + physical=sorted(2160+240*i+2*j+s for i,j in pairs for s in (0,1)) + need(physical==cert['physical_rows'] and len(set(physical))==560,'all560 literal row IDs') + # The exact characteristic/annihilator identities are inherited from the + # byte-pinned source; new sector identities above do not use projectors. + factors=((0,30144),(39,224),(45,560)) + radical=lambda x:x*x+186*x-6075 + nullities={11:560,19:224,23:16} + derivative_at_one=(1-39)*(1-45)*radical(1)+(1)*(1-45)*radical(1)+(1)*(1-39)*radical(1)+(1)*(1-39)*(1-45)*188 + for p,n in nullities.items(): + need(derivative_at_one%p!=0,'simple eigenvalue1 in reduced annihilator') + algebraic=sum(m for l,m in factors if (1-l)%p==0)+(16 if radical(1)%p==0 else 0) + need(algebraic==n,'reduced characteristic multiplicity') + smith=((1,30400),(11,336),(209,208),(4807,16)) + need(sum(n for d,n in smith)==30960,'Smith dimension') + for p,n in nullities.items(): need(sum(k for d,k in smith if d%p==0)==n,'all elementary valuations1') + need(224+2*560+8*16==1472 and -radical(1)==2**8*23,'exact determinant valuations') + control=z[:];control[-1]=control[0] + need(rank_and_det(control,11)[0]<280,'duplicate selected mixed row control') + raw=[[prod(x[i] for i in t) for t in combinations_with_replacement(range(8),3)] for x in canonical] + need(rank_and_det(raw,19)[0]==120,'unprojected cubics control') + need([sum(M[i][j]*(1,9)[j] for j in range(2))%23 for i in range(2)]!=[1,9], + 'wrong radial eigenvector control') + sources={} + for path in ('research/h6-independent-audit/spectral/results.json', + 'research/h6-independent-audit/spectral/README.md', + 'research/niemeier-lattices/code/e8_cubed.py'): + data=(REPO/path).read_bytes() + sources[path]=sha256(data).hexdigest() + receipt={'status':'PASS_INDEPENDENT_H6_SMITH_AND560_ROW_PRIMITIVITY_NO_COMPILER', + 'source_pin':PIN,'source_sha256':sources, + 'producer_source_sha256':sha256((HERE/'derive.py').read_bytes()).hexdigest(), + 'certificate_data_sha256':sha256(args.producer.read_bytes()).hexdigest(), + 'full_shell_moment_representatives':checks,'all_harmonic_polynomial_actions':240, + 'all_mixed_polynomial_actions':560,'all_radial_polynomial_actions':32, + 'coefficient_rows_per_cubic_identity':816,'moment_identity_ring':'Z[1/30], safe at11/19/23', + 'mixed_mod11_rank_and_det':[mr,md],'harmonic_mod19_rank':hr,'radial_mod23_rank':lr, + 'physical_rows':physical,'localized_smith':smith,'prime_nullities':nullities, + 'negative_controls':['duplicate selected mixed row','unprojected cubics','wrong radial eigenvector'], + 'limits':['complete characteristic polynomial inherited from pinned exact spectrum/moment proof', + 'all-coordinate sector eigenidentities independently rederived, not rational projector reduction', + 'literal560 rows give abstract dyadic unimodular completion; no completion coefficients or paid circuit', + 'stable560 auxiliary completion changes helper outputs and permits helper dirt in data', + 'restored-helper exact(Cx,h) map impossible over dyadic unimodular model', + 'no physical transport, rounding precision, owner/controller or kappa admission']} + args.out.write_text(json.dumps(receipt,sort_keys=True,indent=2)+'\n') + print(receipt['status']) + + +if __name__=='__main__': main() diff --git a/research/h6-dyadic-source-repair/verify.py b/research/h6-dyadic-source-repair/verify.py new file mode 100644 index 0000000000..92af2bd207 --- /dev/null +++ b/research/h6-dyadic-source-repair/verify.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +"""Read-only exact replay; Apache-2.0, substantial OpenAI Codex assistance.""" +import argparse +import hashlib +import json +from pathlib import Path +import subprocess +import sys +import tempfile +import time + +HERE = Path(__file__).resolve().parent +REPO = HERE.parents[1] + +def need(ok, message): + if not ok: + raise ValueError(message) + +def sha(path): + return hashlib.sha256(path.read_bytes()).hexdigest() + +def authenticate(): + files = json.loads((HERE/'ARTIFACTS.json').read_bytes())['files'] + for name, digest in files.items(): + path = HERE/name + need(not path.is_symlink() and sha(path) == digest, 'package changed: '+name) + for row in json.loads((HERE/'SOURCES.json').read_bytes())['files']: + if row['usage'] == 'input': + path = REPO/row['path'] + need(not path.is_symlink() and sha(path) == row['sha256'], 'source changed: '+row['path']) + return files + +def replay(out): + before = authenticate() + need(not out.exists() and not out.resolve().is_relative_to(HERE), 'fresh external output required') + out.mkdir(parents=True) + start = time.monotonic() + with tempfile.TemporaryDirectory(prefix='smith-python-') as cache: + commands = [('derive', ['--out', str(out/'DERIVED.json')]), + ('independent', ['--producer', str(out/'DERIVED.json'), '--out', str(out/'INDEPENDENT.json')])] + for name, extra in commands: + command = [sys.executable,'-I','-O','-B','-Werror','-X','pycache_prefix='+cache+'/'+name,str(HERE/(name+'.py'))]+extra + run = subprocess.run(command,cwd=REPO,text=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT,timeout=55) + (out/(name+'.log')).write_text(run.stdout) + need(run.returncode == 0, name+' failed:\n'+run.stdout[-8000:]) + a = json.loads((out/'DERIVED.json').read_bytes()) + b = json.loads((out/'INDEPENDENT.json').read_bytes()) + need(a['localized_Smith_factors'] == [{'factor':1,'count':30400},{'factor':11,'count':336},{'factor':209,'count':208},{'factor':4807,'count':16}], 'complete Smith factors') + need(b['localized_smith'] == [[1,30400],[11,336],[209,208],[4807,16]], 'independent Smith factors') + need(a['physical_row_certificate']['physical_rows'] == b['physical_rows'] and len(set(b['physical_rows'])) == 560, 'literal physical rows') + need((b['all_harmonic_polynomial_actions'],b['all_mixed_polynomial_actions'],b['all_radial_polynomial_actions']) == (240,560,32), 'all polynomial action coverage') + need(len(a['negative_controls']) == 2 and len(b['negative_controls']) == 3 and len(a['arithmetic_counterchecks']) == 2, 'matrix and arithmetic controls') + need(before == authenticate(), 'inputs changed during replay') + result = {'status':'PASS_H6_DYADIC_SMITH_PHYSICAL_ROW_EXISTENCE','no_new_kappa':True, + 'localized_smith':b['localized_smith'],'physical_rows':560,'stable_auxiliary_dimension':560, + 'independent_actions':{'harmonic':240,'mixed':560,'radial':32}, + 'producer_matrix_controls':a['negative_controls'],'independent_controls':b['negative_controls'], + 'producer_arithmetic_controls':a['arithmetic_counterchecks'], + 'seconds':time.monotonic()-start,'python':sys.version, + 'cost_scope':'Algebraic completion of C=I-K only; not the native K response, completion coefficients or a paid physical/restored source circuit.', + 'inherited':'Full characteristic spectrum and degree-six shell moment theorem remain explicit source premises.'} + (out/'RESULT.json').write_text(json.dumps(result,sort_keys=True,indent=2)+'\n') + print(json.dumps(result,sort_keys=True)) + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--out',type=Path) + args = parser.parse_args() + need(sys.version_info[:2] == (3,12), 'Python3.12 required') + if args.out: + replay(args.out.resolve()) + else: + with tempfile.TemporaryDirectory(prefix='smith-replay-') as work: + replay(Path(work)/'result') + +if __name__ == '__main__': + main()