diff --git a/research/f9-tensor-fixed-space/PROOF.md b/research/f9-tensor-fixed-space/PROOF.md new file mode 100644 index 0000000000..dc574b03d1 --- /dev/null +++ b/research/f9-tensor-fixed-space/PROOF.md @@ -0,0 +1,204 @@ +# Exact tensor fixed spaces of the forward F9 transport + +This contribution was produced by Nick Petalas. Apache-2.0. + +Claim types: a scoped written proof, with one exact finite signed-cycle +certificate as its source-specific input. The proof covers every positive +integer tensor width over the complex numbers. It is not a complete +multiplication theorem or a physical supplier construction. + +## 1. Source and question + +Let V be the complex vector space on the 512 addresses x in F2^9. Use the +forward monomial T of unpaidmoon's [PR #7447](https://github.com/CrocSwap/integer-mult-bounds/pull/7447), +at head `a60ddc19848b945250a78a1e3daea94e3c96b2f5`: + +```text +T e_x = i^q(x) e_(Mx). +M rows = (1,2,4,8,398,85,270,16,58). +Q rows = (85,186,213,186,111,26,21,270,384). +alpha = (3,1,1,1,2,0,0,0,3). +q(x) = sum_i alpha_i x_i + 2 sum_(i=1, set `U=T^(tensor f)`. Since `T^10=I`, also `U^10=I`. +The operator + +```text +E_f = (I+U+...+U^9)/10 +``` + +is the projector onto `ker(U-I)`. Indeed, U fixes the image of E_f by +telescoping, and E_f acts as identity on every fixed vector. Therefore its +trace equals the dimension of that space. Trace is multiplicative on +tensor products, giving + +```text +dim ker(T^(tensor f)-I) = (1/10) sum_(j=0)^9 tr(T^j)^f. +``` + +An unsigned l-cycle contributes l to the trace of P^j exactly when l +divides j, and otherwise contributes zero. The cycle certificate gives + +```text +tr(T^j), j=0,...,9 = (512,16,32,16,32,256,32,16,32,16). +``` + +Substitution proves the exact formula + +```text +F_f = dim ker(T^(tensor f)-I) + = (512^f + 256^f + 4*32^f + 4*16^f)/10, +R_f = rank(T^(tensor f)-I) + = (9*512^f - 256^f - 4*32^f - 4*16^f)/10. +``` + +The expression is an integer because it is a projector rank. It also +follows from the integer cyclic convolution of the displayed tenth-root +multiplicities. At f=1 and f=2 the respective fixed dimensions are 96 and +33,280, and the respective correction ranks are 416 and 228,864. +Every subspace W on which U acts as identity lies in its kernel, and the +kernel itself attains the maximum F_f. Thus the subspace statement is sharp. + +The universal quantifier follows from this projector proof. The executable +checks the character formula against exact spectral convolution through +width 64. It separately constructs all 262,144 two-column addresses and +their signed orbits, obtaining 33,280 fixed vectors without using the +one-column histogram or the character formula to count those orbits. + +## 4. What the correction rank rules out + +Suppose a linear correction written as a sum of k maps of complex rank at +most b satisfies + +```text +U + A_1 + ... + A_k = I. +``` + +Rank subadditivity yields `k*b >= rank(I-U)=R_f`. For b>=1 this gives +`k>=ceil(R_f/b)`. With unrestricted rank-one linear maps the bound k=R_f +is attained by any rank decomposition of I-U. This last upper bound is +only an algebraic statement, not an allowed query or native construction. + +The rank is the matrix rank on a `512^f`-dimensional complex array. It is +not the number of native address axes, Fourier support rank, a recursive +child rank, a monomial-pass price, or the inherited H8 centre charge. In +particular, this proof does not convert R_f into a recursive invoice. +It excludes only proposals whose additive corrections have a stated bound +on this same complex matrix rank. The fraction R_f/512^f tends to 9/10; +tensoring this transport does not make it equal to identity on most of V. + +## 5. Executable evidence and limits + +The direct script authenticates its two retained inputs and emits a +generated receipt binding all nine package files by SHA256. It writes no +files. A separate sparse Gaussian elimination of the literal 512-column +matrix T-I over F257 has rank 416. The map `i -> 16 mod 257` preserves +the cycle rank formula: on an l-cycle the kernel exists exactly when the +product of edge phases is one, and reduction keeps the four roots of +unity distinct. This is exact corroboration, not a numerical rank estimate. + +A phase fault at address zero changes its eigenvalue to i. Both the cycle +certificate and trace test detect it, and no diagonal gauge to P exists. +The verifier also checks the distinction between basis-address and linear +fixed spaces, rejects an additive tensor-rank guess, and rejects four +out-of-domain reference widths. Runtime checks survive Python optimization. + +The predecessor's opcode -2 is a different unresolved operator; this package +does not identify it with T. No physical caller, dirty restoration program, +native implementation, precision/storage bound, supplier admission, new +kappa or selected-frontier update is claimed. No predecessor scientific +verifier, selected cold replay, Lean or Docker run is required or performed. +Independent human and formal proof-kernel review are unclaimed. + +## 6. Code constraints + +The script has no recursion, subprocess, network, write path or plugin +loading. Each function is below 60 physical lines. The largest explicit +domain has 262,144 addresses; an orbit takes at most ten steps there. +One-column orbit and elimination loops take at most 512 steps. The +spectral recurrence uses 64 steps and 100 products per step. Source files +are bounded to 128 KiB, coefficient rows to nine, and reference f to 64. + +Power of Ten rule 3 deviation: CPython requires managed allocation during +integer arithmetic and dictionary operations. The scope is this finite +offline verifier. Its largest visited table is a 262,144-byte bytearray; +Gaussian elimination has at most 512 pivots and 512 entries per pivot, +and reference integers have at most 577 bits. Fixed allocation is not +claimed. The declared input/domain bounds and warning-strict normal and +optimized replays constrain and exercise this deviation. A future API +with larger dimensions must replace these budgets. + +Warning-strict execution, source parsing and an AST function-size check +provide local diagnostics. No shared compiler or CI setting is changed. +Build the Lever led to retaining the complete signed-orbit and rank +verifier. Prove It Works led to literal two-column execution and a distinct +Gaussian elimination rather than relying only on the character formula. +Character averaging, cycle gauges, rank decompositions and rank +subadditivity are classical. No global literature-priority claim is made. diff --git a/research/f9-tensor-fixed-space/README.md b/research/f9-tensor-fixed-space/README.md new file mode 100644 index 0000000000..f90f82b535 --- /dev/null +++ b/research/f9-tensor-fixed-space/README.md @@ -0,0 +1,115 @@ +# Exact tensor fixed spaces of the forward F9 transport + +This contribution was produced by Nick Petalas. Apache-2.0. + +Claim types: scoped written proof and exact finite signed-cycle certificate. +For the forward full-frame F9 operator-2 monomial T published by unpaidmoon +in [PR #7447](https://github.com/CrocSwap/integer-mult-bounds/pull/7447), +the largest complex payload subspace fixed by its f-column tensor power +has exact dimension + +```text +F_f = (512^f + 256^f + 4*32^f + 4*16^f)/10, for every f>=1. +rank(T^(tensor f)-I) = 512^f-F_f. +``` + +At one column the fixed space has dimension 96 and the correction rank is +416. At two columns they are 33,280 and 228,864. The predecessor's 16 fixed +computational basis addresses do not exhaust its fixed complex payloads. +The new certificate finds 16, 8, 48 and 24 unsigned-gauge cycles of lengths +1, 2, 5 and 10. Their phase products are all one. Their orbit sums give an +explicit basis at one column, and character averaging proves the all-width +formula. See [PROOF.md](PROOF.md). + +If an additive linear repair uses k maps of complex matrix rank at most b, +it must satisfy `k*b >= 512^f-F_f`. This is sharp for unrestricted linear +rank decompositions. That matrix rank is not native axis rank, Fourier +support rank, a recursive child rank or an H8 centre price. No physical +tariff follows without a separate implementation contract. + +## Scope and evidence + +The monomial and its identification with the source's forward circuit are +cited premises. No predecessor scientific checker is imported or replayed. +Its exact two input files and unchanged credit are retained under `sources/`; +[SOURCE-PINS.json](SOURCE-PINS.json) records their head, origin paths, Git +blob IDs and SHA256 hashes. They are declared inputs in [VERIFY.json](VERIFY.json). +The generic [SOURCES.json](SOURCES.json) binds the task catalogue and selected +record as historical Git provenance; it does not pretend the pending PR is +already an ancestor of main. + +The direct verifier checks all 512 signed monomial edges, its complete cycle +partition and diagonal gauge, and all ten power traces. Exact spectral +convolution checks the formula through width 64. A separate literal +two-column pass covers all 262,144 addresses. Sparse Gaussian elimination +of T-I over F257 checks rank 416. Nine domain and semantic controls pass. +The generated stdout receipt hashes every package file; replay writes nothing. +The unbounded quantifier rests on the written projector argument. + +The `joint-query-controller` card is explicitly changed to this algebraic +target-debit question. The selected binding-only orientation passed at main +`e54523517d0f03e58352e647c403a5af3e525a57`, priority revision 8. Selected +conditional kappa .00363005817 remains unchanged. The +[advance claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19592103) +states the same forward-only scope. + +Live overlap covered open PR bodies, active Discussions and handoffs, +recent account PRs, local reservations, distinctive main README searches +and targeted merged-PR searches. The general closed-PR cache refresh timed +out; no complete historical-diff or unpublished-work search is claimed. + +## Reproduce + +From the repository root, with CPython 3.12 and its standard library: + +```sh +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/f9-tensor-fixed-space/verify.py +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -O -B research/f9-tensor-fixed-space/verify.py +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/f9-tensor-fixed-space +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/f9-tensor-fixed-space --check-source-history +``` + +Another CPython 3.12 executable may replace that local path. The direct +marker is `PASS_F9_TENSOR_FIXED_SPACE`. Both registered commands use warning +errors and retain every check under optimization. The direct verifier also +runs from a read-only Git-free export, without network or external libraries. + +## Limitations + +The result is over the complex numbers, for the one published forward +monomial. The actual backward-sign opcode -2 is a different binding. +No physical caller, restored dirty workspace, native implementation, +precision/storage invoice, supplier admission, new kappa or complete +multiplication theorem is established. All five selected framework +assumptions remain. Independent human and formal proof-kernel review are +unclaimed. No selected cold replay, predecessor scientific replay, Lean +or Docker run is included. Code bounds and the managed-allocation deviation +are recorded in the proof. + +## Open next questions + +1. Can a named legal caller exploit one of these payload spaces after + paying for its orbit-sum basis, return and restoration? Start with one + source-compatible space and price both boundary conversions. No native + tariff for the diagonal gauge is supplied. +2. What is the signed-cycle spectrum of the actual backward-sign opcode + -2 transport? First obtain its exact source-bound operator. The current + result does not identify that event with the forward monomial. + +## Credit and related work + +Credit unpaidmoon for #7447's monomial, circuit identification and +target-debit question, and #6929's earlier fixed-vector distinction. +Ali Romman's #5720/#5745 supply the F9 word and active-mode context, +retaining flyingviper's restoration work and the filtered-native packet of +Cao Yifan, Cinna Davis and Dugongue. Those results are cited, not audited. +Character averaging, diagonal cycle gauges and matrix rank inequalities +are classical. The new step is this transport's complete signed-cycle +certificate, exact all-width payload dimension and correction-rank formula. +No global literature-priority claim is made. + +Related open work: #7447 prices the forward monomial at one column; this +package adds its complex fixed-space spectrum and tensor correction rank. +#7301 concerns matrix elements of the canonical K_G operators on basis +addresses, whereas this result concerns the single forward full-frame T +on arbitrary complex subspaces. Neither supplies a physical caller here. diff --git a/research/f9-tensor-fixed-space/SOURCE-PINS.json b/research/f9-tensor-fixed-space/SOURCE-PINS.json new file mode 100644 index 0000000000..528cd4fefc --- /dev/null +++ b/research/f9-tensor-fixed-space/SOURCE-PINS.json @@ -0,0 +1,22 @@ +{ + "schema_version": 1, + "repository": "CrocSwap/integer-mult-bounds", + "source_pr": 7447, + "author": "unpaidmoon", + "head": "a60ddc19848b945250a78a1e3daea94e3c96b2f5", + "source_url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7447", + "files": [ + { + "path": "sources/pr7447-RESULT.json", + "origin_path": "research/f9-operator2-full-frame-invoice/RESULT.json", + "sha256": "fae36416c982c943ac12c9637d288ea85eae2bf78ce830d0a28fd0dfe386acb2", + "git_blob": "e0c0db7ca09e910f3bab34b0b6b13c96eb4b905a" + }, + { + "path": "sources/pr7447-PROOF.md", + "origin_path": "research/f9-operator2-full-frame-invoice/PROOF.md", + "sha256": "65f050716f3af7da72a45a0d584bce8602b322118c437a70c240bb39d064b841", + "git_blob": "168d8d93dbe63896b7abf1590a32d30d10242690" + } + ] +} diff --git a/research/f9-tensor-fixed-space/SOURCES.json b/research/f9-tensor-fixed-space/SOURCES.json new file mode 100644 index 0000000000..5335fa97d9 --- /dev/null +++ b/research/f9-tensor-fixed-space/SOURCES.json @@ -0,0 +1,18 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + } + ] +} diff --git a/research/f9-tensor-fixed-space/TASK.json b/research/f9-tensor-fixed-space/TASK.json new file mode 100644 index 0000000000..5b7a96245f --- /dev/null +++ b/research/f9-tensor-fixed-space/TASK.json @@ -0,0 +1,98 @@ +{ + "schema_version": 1, + "task_id": "joint-query-controller", + "priority_revision": 8, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "original_card": { + "id": "joint-query-controller", + "question": "Can a changed query demand or caller remove real work while satisfying native chronology and restoration?", + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md" + ], + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "acceptance_gate": "A source-bound arbitrary-input identity and legal producer/consumer boundary with the complete paid and productive target invoice, including restoration, ownership, native alignment and extra charges. Price under the actual current model; historical ceiling.py assumptions must be established before use. A favorable optimistic relaxation keeps a route open but is not a completed supplier. A scoped local result remains useful; expansion requires the family-level budget gate.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "first_experiment": "Choose an exact caller and a new demand/interface hypothesis. Read the scoped #5617/#5631/#5649/#5747 and #5720/#5745 objections before rebuilding an excluded schedule. Compare the complete matched source/consumer protocols including all retained helper outputs. For an active-mode injection, first check #5745: its canonical delivery claim repays the eight removed centre jobs. Audit that exact claim or change its channel/feedback hypothesis; do not repeat the same free-injection search. Stop if the full favorable budget fails or the required restored output is unobservable.", + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "overlap_terms": [ + "query demand", + "active mode", + "5720", + "5745", + "5747", + "caller" + ], + "existing_checks": [ + { + "scope": "PR #4166: author-checked installed producer/service/return/bridge connection; native-component comparison loses.", + "evidence": "research/qq16-caller-install/README.md", + "remaining": "Complete matched physical protocol bill, or changed source-compatible demand/circuit; no affordable supplier yet.", + "status": "author-checked", + "source_commit": "0b082d22a0e9a442d264ab0633e35ef26c790630", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "status": "reviewed", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + } + ] + }, + "scope_status": "changed", + "actual_scope": "Exact complex fixed-space dimensions and additive linear correction ranks for every positive tensor width of the forward F9 operator-2 monomial of PR7447.", + "scope_change_reason": "The card asks for a complete changed caller. This contribution instead resolves a source-specific algebraic target-debit question on arbitrary complex payload subspaces. It does not price a caller or audit the predecessor.", + "bottleneck_link": "Scoped side result for active-mode interfaces: a basis vector fixed by a transport does not determine the largest arbitrary payload space it preserves. The exact correction rank gives a test for explicitly low-matrix-rank additive repairs; it is not a native-axis or recursive tariff.", + "budget_minutes": 60, + "stop_rule": "Ship the first verified original fixed-space formula; do not extend to more operators or a physical construction.", + "outcome": "completed", + "evidence": "PROOF.md gives the all-width character argument; verify.py enumerates complete signed cycles, direct traces and all two-column addresses, performs a separate sparse modular elimination, and checks exact spectral convolution through width 64.", + "author": "Nick Petalas", + "ai_assistance": "Independent human and formal proof-kernel review are unclaimed.", + "open_questions": [ + { + "question": "Can a named legal caller exploit an explicit fixed payload subspace without repaying its preparation and restoration?", + "why_it_matters": "F_f is an algebraic capacity; a useful supplier needs a complete physical boundary.", + "first_step": "Choose one source-compatible payload space and price both entering and leaving its orbit-sum basis.", + "blocked_by": "No native tariff for the diagonal gauge or orbit-sum encoding is supplied." + }, + { + "question": "What is the signed-cycle spectrum of the actual backward-sign opcode -2 transport?", + "why_it_matters": "The forward monomial is not automatically the operator used by that source event.", + "first_step": "Obtain a source-bound definition of that operator, then construct its own signed-cycle certificate.", + "blocked_by": "The source sign-to-operator binding remains separate; no counterpart computation is included." + } + ], + "claim_type": "Scoped written proof and exact finite signed-cycle certificate", + "predecessor": { + "pr": 7447, + "author": "unpaidmoon", + "head": "a60ddc19848b945250a78a1e3daea94e3c96b2f5", + "premise": "Published forward monomial definition and circuit identification; the predecessor circuit is not replayed." + }, + "claim_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19592103" +} diff --git a/research/f9-tensor-fixed-space/VERIFY.json b/research/f9-tensor-fixed-space/VERIFY.json new file mode 100644 index 0000000000..ae120902bd --- /dev/null +++ b/research/f9-tensor-fixed-space/VERIFY.json @@ -0,0 +1,37 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/f9-tensor-fixed-space/sources/pr7447-PROOF.md", + "research/f9-tensor-fixed-space/sources/pr7447-RESULT.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Source hashes; complete signed-cycle and diagonal-gauge certificate; direct traces; exact tensor spectrum through width 64; all 262144 literal two-column addresses; separate modular correction rank; nine controls; generated receipt bound to all nine package files." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Source hashes; complete signed-cycle and diagonal-gauge certificate; direct traces; exact tensor spectrum through width 64; all 262144 literal two-column addresses; separate modular correction rank; nine controls; generated receipt bound to all nine package files." + } + ] +} diff --git a/research/f9-tensor-fixed-space/sources/pr7447-PROOF.md b/research/f9-tensor-fixed-space/sources/pr7447-PROOF.md new file mode 100644 index 0000000000..168d8d93db --- /dev/null +++ b/research/f9-tensor-fixed-space/sources/pr7447-PROOF.md @@ -0,0 +1,161 @@ +# Invoice for the forward full-frame transport of F9 operator 2 + +Prepared by unpaidmoon with substantial Cursor Grok assistance. Apache-2.0. + +## Contract + +Use the backward word `F9-SOURCE-DAG-ALL8-WORD.json.gz` inside the unchanged +packet `research/filtered-native-kappa004/inputs/original-packet.tar.gz`. +Its SHA256 is + +```text +934fea11e51f674ce2031b7d3127b994a921a9d83317b00359292752563a1775 +``` + +Operator 2 has column list + +```text +(1, 2, 4, 8, 128, 394, 165, 80, 78). +``` + +Its forward factor `K_G` is the permutation whose rows are + +```text +(65, 290, 324, 296, 128, 64, 384, 112, 32), +``` + +followed by the diagonal whose quadratic rows and linear signs are + +```text +(32, 336, 112, 336, 46, 501, 110, 288, 426), +(0, 0, 0, 0, 0, 1, 1, 0, 1). +``` + +Output bit `i` of a permutation is the parity of row `i` with the input. +These are the same `diagonal_data` rows the merged fixed-vector audit uses. + +The priced circuit is the circuit in that audit's checker: the width-9 +Fourier adjoint, then this forward `K_G`, then the Fourier. The checker calls +that circuit `F† K_G F`. Each Fourier factor is nine one-qubit `C` gates, +signs `+1` in qubit order `0..8`, and signs `-1` in reverse order for the +adjoint. Amplitudes are the exact states of +`research/active-mode-delivery-frontier/source/quadratic.py`, SHA256 + +```text +d406584aed1479b75c387bc964b9e797b2f4f75e5f8c6bbea00df07f7d590a91 +``` + +The domain is finite: all 512 computational basis states of width 9, and +both finite programs of this word. The checker evaluates every state and +every event. This is an exhaustive census of that domain. It is not a +statement about the other seven classes, an arbitrary invertible matrix, or +a different word. + +## The transport is one monomial + +For a state `x` in `F_2^9`, write `q(x)` for the `Z_4` value + +```text +q(x) = Σ_i α_i x_i + 2 Σ_i x_i popcount((Q_i >> (i+1)) & (x >> (i+1))) (mod 4). +``` + +Let `M` be the linear map with rows + +```text +(1, 2, 4, 8, 398, 85, 270, 16, 58), +``` + +and let `Q` and `α` be + +```text +(85, 186, 213, 186, 111, 26, 21, 270, 384), +(3, 1, 1, 1, 2, 0, 0, 0, 3). +``` + +The census finds, at every one of the 512 inputs, + +```text +T|x> = i^{q(x)} |Mx>, +``` + +with denominator 0. In particular `M0 = 0` and `q(0) = 0`, so +`<0|T|0> = 1`. That one entry is the fixed-vector fact already recorded for +this class. The invoice is the map `(M, q)`. + +The same 512 images are reproduced by the two-gate circuit that applies the +diagonal `(Q, α)` and then the permutation `M`. On every input that circuit +has peak support rank 0. So the compiled transport is one diagonal and one +permutation, and it never leaves the computational basis. + +The rows of `M` are the images of the nine basis vectors, rearranged as +matrix rows. The weight-2 polarization of `q` determines each upper entry of +`Q`, the diagonal bit of row `i` is `α_i mod 2`, and symmetry fills the +lower triangle. Any other bit in that symmetric representative changes `q` +on a weight-1 or weight-2 vector. The census then checks the resulting +formula on the remaining addresses. + +## Frame change + +The defining sandwich, on every one of the 512 basis inputs, records peak +support rank 9. Each Fourier factor alone has support rank 9 on `|0>`. +The output of `T` has support rank 0. The compiled diagonal-then-permutation +circuit has peak support rank 0 and the same 512 images. + +These are two different numbers. The intermediate peak is the support the +Fourier factors open inside this particular circuit. The compiled support +rank is the support of the operator after those factors cancel. Neither +number is `<0|T|0>`. + +## Restoration + +Let `S` be the same sandwich with `K_G` replaced by its gate adjoint. On all +512 basis states, `S` is the inverse of `T`: addresses run backwards and +phase exponents change sign. The signed order of `T` is 10, so `T^2` is not +the identity and a second copy of `T` does not restore the basis. `S` is +itself a pure monomial, because it agrees with the inverse table of `T`. + +## Target debit + +`M + I` has rank 5, so its kernel has dimension 4 and 16 vectors. Those 16 +vectors are exactly the addresses fixed by `M`, and `q` is 0 on each of +them. The identity operator agrees with `T` on those 16 addresses, including +0, and on no others. `T` moves the other 496 addresses. The phase histogram +on all 512 addresses is 144, 144, 112, 112 in exponents `0, 1, 2, 3`. + +The matrix element `+1` at `|0>` is the address-0 member of that 16-element +set. It does not determine `M`, `q`, or the 496 moved addresses. + +## One centre is a different unit + +The inherited active-mode contract prices one removed centre job as one +`H8`, a rank-8 canonical transport. The compiled support rank of `T` is 0, +so this transport is not that charge and it does not implement a rank-8 +frame delivery. + +Both programs of the pinned word were read in full. Each has 0 events of +opcode `center` and no climb of rank 8. The climb histogram in each program +is `2201, 412, 510, 127, 40` at ranks `1` through `5`. The canonical +`local_profile` stores those five counts and also eight units at rank 8. +The profile entry and the climb list are different records. This census does +not retariff the profile entry, delete a centre, or change the selected +exponent `363005817/100000000000`. + +Frame 1 is the unique frame of length 9. In each program the unique +width-9 warp of class 2 is opcode `-2` on `L250`, with both frames equal to +1. There is also one width-4 warp of class 2, opcode `+2`, from frame 292 to +frame 3941. The scalar replay tags an opcode sign and does not apply this +Clifford. The backward-sign sandwich, with the linear signs of `K_G` negated, +sends `|0>` to `|352>` with phase `i`. That is a different operator. This +invoice does not identify opcode `-2` with the forward circuit. + +## Controls + +Inserting a global factor `i` changes the phase of `|0>` from `+1` to `i`. +Deleting both Fourier factors changes the image of address 1. Operator 1's +forward sandwich sends `|0>` to address 48 with phase `-1`, the same image +the merged audit records for that class. The backward-sign sandwich of +operator 2 leaves `|0>`. The square of `T` is not the identity. + +No caller, compiler, precision tape, or outer admission is claimed. The five +framework assumptions stay in force. The selected conditional value stays +`363005817/100000000000`. diff --git a/research/f9-tensor-fixed-space/sources/pr7447-RESULT.json b/research/f9-tensor-fixed-space/sources/pr7447-RESULT.json new file mode 100644 index 0000000000..e0c0db7ca0 --- /dev/null +++ b/research/f9-tensor-fixed-space/sources/pr7447-RESULT.json @@ -0,0 +1,239 @@ +{ + "schema": "f9-operator2-full-frame-invoice/v1", + "evidence_class": "exhaustive finite census", + "word_member": "filtered_native_implementation/research/retained_state_next/F9-SOURCE-DAG-ALL8-WORD.json.gz", + "word_sha256": "934fea11e51f674ce2031b7d3127b994a921a9d83317b00359292752563a1775", + "operator": 2, + "circuit": "Fourier adjoint, then forward K_G, then Fourier", + "G_columns": [ + 1, + 2, + 4, + 8, + 128, + 394, + 165, + 80, + 78 + ], + "K_permutation_rows": [ + 65, + 290, + 324, + 296, + 128, + 64, + 384, + 112, + 32 + ], + "K_quadratic_rows": [ + 32, + 336, + 112, + 336, + 46, + 501, + 110, + 288, + 426 + ], + "K_linear_Z4": [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1 + ], + "monomial": { + "matrix_rows": [ + 1, + 2, + 4, + 8, + 398, + 85, + 270, + 16, + 58 + ], + "offset": 0, + "quadratic_rows": [ + 85, + 186, + 213, + 186, + 111, + 26, + 21, + 270, + 384 + ], + "linear_Z4": [ + 3, + 1, + 1, + 1, + 2, + 0, + 0, + 0, + 3 + ], + "global_phase": 0, + "action": "T|x> = i^{q(x)} |Mx>, with q the Z4 form of those rows" + }, + "frame_change": { + "compiled_support_rank": 0, + "sandwich_peak_support_on_every_basis_input": 9, + "each_fourier_factor_support_on_zero": 9 + }, + "restoration": { + "inverse": "the same sandwich with K_G replaced by its gate adjoint", + "signed_order": 10, + "involution": false + }, + "target_debit": { + "moved_addresses": 496, + "identity_agreements": 16, + "fixed_addresses": [ + 0, + 10, + 38, + 44, + 150, + 156, + 176, + 186, + 258, + 264, + 292, + 302, + 404, + 414, + 434, + 440 + ], + "defect_rank_of_M_plus_I": 5, + "phase_histogram": { + "0": 144, + "1": 144, + "2": 112, + "3": 112 + }, + "zero_matrix_element": [ + 1, + 0 + ] + }, + "centre_comparison": { + "inherited_unit": "one rank-8 centre, H8, from the active-mode delivery contract", + "compiled_support_rank": 0, + "pays_one_H8": false, + "program_center_opcodes": 0, + "program_rank8_climbs": 0, + "local_profile_rank8": 8 + }, + "word_occurrences": { + "backward": { + "events": 22585, + "climb_ranks": { + "1": 2201, + "2": 412, + "3": 510, + "4": 127, + "5": 40 + }, + "center_events": 0, + "class2_full_frame": [ + { + "index": 17355, + "opcode": -2, + "ref": [ + "L", + 250 + ], + "frames": [ + 1, + 1 + ], + "dims": [ + 9, + 9 + ] + } + ], + "class2_other": [ + { + "index": 14418, + "opcode": 2, + "ref": [ + "L", + 250 + ], + "frames": [ + 292, + 3941 + ], + "dims": [ + 4, + 4 + ] + } + ] + }, + "forward": { + "events": 25065, + "climb_ranks": { + "1": 2201, + "2": 412, + "3": 510, + "4": 127, + "5": 40 + }, + "center_events": 0, + "class2_full_frame": [ + { + "index": 16177, + "opcode": -2, + "ref": [ + "L", + 250 + ], + "frames": [ + 1, + 1 + ], + "dims": [ + 9, + 9 + ] + } + ], + "class2_other": [ + { + "index": 13572, + "opcode": 2, + "ref": [ + "L", + 250 + ], + "frames": [ + 292, + 3941 + ], + "dims": [ + 4, + 4 + ] + } + ] + } + }, + "selected_kappa": "363005817/100000000000", + "no_new_kappa": true +} diff --git a/research/f9-tensor-fixed-space/verify.py b/research/f9-tensor-fixed-space/verify.py new file mode 100644 index 0000000000..f45aa18882 --- /dev/null +++ b/research/f9-tensor-fixed-space/verify.py @@ -0,0 +1,240 @@ +#!/usr/bin/env python3 +"""Exact signed-orbit and tensor fixed-space certificate. Apache-2.0.""" + +import hashlib +import json +from pathlib import Path +import sys + + +ROOT = Path(__file__).resolve().parent +SIZE = 512 +EXPECTED_CYCLES = {(1, 0): 16, (2, 0): 8, (5, 0): 48, (10, 0): 24} +EXPECTED_TRACES = [512, 16, 32, 16, 32, 256, 32, 16, 32, 16] + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def checked_bytes(path, sha256, blob): + require(path.stat().st_size <= 131072, "source exceeds byte budget") + data = path.read_bytes() + require(hashlib.sha256(data).hexdigest() == sha256, "source SHA256") + header = b"blob " + str(len(data)).encode() + b"\0" + require(hashlib.sha1(header + data).hexdigest() == blob, "source Git blob") + return data + + +def load_monomial(): + pins = json.loads((ROOT / "SOURCE-PINS.json").read_text()) + require(pins["source_pr"] == 7447, "wrong predecessor") + require(pins["head"] == "a60ddc19848b945250a78a1e3daea94e3c96b2f5", "source head") + require(len(pins["files"]) == 2, "source inventory") + sources = {} + for row in pins["files"]: + require(row["path"] in ("sources/pr7447-RESULT.json", "sources/pr7447-PROOF.md"), + "unexpected source path") + sources[row["path"]] = checked_bytes(ROOT / row["path"], row["sha256"], row["git_blob"]) + data = json.loads(sources["sources/pr7447-RESULT.json"])["monomial"] + require(data["offset"] == data["global_phase"] == 0, "source affine convention") + rows, quadratic, linear = (data[k] for k in ("matrix_rows", "quadratic_rows", "linear_Z4")) + require(len(rows) == len(quadratic) == len(linear) == 9, "nine source coordinates") + require(all(type(x) is int and 0 <= x < SIZE for x in rows + quadratic), "binary rows") + require(all(type(x) is int and 0 <= x < 4 for x in linear), "Z4 coefficients") + destinations, phases = [], [] + for x in range(SIZE): + bits = [(x >> i) & 1 for i in range(9)] + destinations.append(sum(((row & x).bit_count() % 2) << i for i, row in enumerate(rows))) + value = sum(a * bit for a, bit in zip(linear, bits, strict=True)) + value += 2 * sum(bits[i] * bits[j] * ((quadratic[i] >> j) & 1) + for i in range(9) for j in range(i + 1, 9)) + phases.append(value % 4) + require(sorted(destinations) == list(range(SIZE)), "source is a permutation") + return destinations, phases + + +def signed_cycles(destinations, phases): + require(len(destinations) == len(phases) == SIZE, "table size") + seen = bytearray(SIZE) + cycles, histogram = [], {} + for start in range(SIZE): + if seen[start]: + continue + orbit, x, phase = [], start, 0 + for _ in range(SIZE): + if seen[x]: + break + seen[x] = 1 + orbit.append(x) + phase = (phase + phases[x]) % 4 + x = destinations[x] + require(x == start, "orbit must close at its start") + key = (len(orbit), phase) + histogram[key] = histogram.get(key, 0) + 1 + cycles.append((orbit, phase)) + require(sum(map(len, (orbit for orbit, _ in cycles))) == SIZE, "complete orbit partition") + return cycles, histogram + + +def check_gauge(cycles, destinations, phases): + gauge = [0] * SIZE + for orbit, total in cycles: + require(total == 0, "nontrivial cycle holonomy") + exponent = 0 + for x in orbit: + gauge[x] = exponent + exponent = (exponent + phases[x]) % 4 + for x in range(SIZE): + require((gauge[destinations[x]] - gauge[x]) % 4 == phases[x], "diagonal gauge equation") + return hashlib.sha256(bytes(gauge)).hexdigest() + + +def direct_traces(destinations, phases): + traces = [] + for power in range(10): + counts = [0, 0, 0, 0] + for start in range(SIZE): + x, exponent = start, 0 + for _ in range(power): + exponent = (exponent + phases[x]) % 4 + x = destinations[x] + if x == start: + counts[exponent] += 1 + require(counts[1] == counts[3], "trace must be real") + traces.append(counts[0] - counts[2]) + return traces + + +def fixed_dimension(width): + require(type(width) is int and 1 <= width <= 64, "reference width budget") + numerator = SIZE**width + 256**width + 4 * 32**width + 4 * 16**width + require(numerator % 10 == 0, "integer character average") + return numerator // 10 + + +def check_tensor_characters(cycles): + multiplicities = [0] * 10 + for orbit, total in cycles: + require(total == 0 and 10 % len(orbit) == 0, "tenth-root cycle spectrum") + for k in range(10): + if (k * len(orbit)) % 10 == 0: + multiplicities[k] += 1 + require(multiplicities == [96, 24, 72, 24, 72, 32, 72, 24, 72, 24], "one-column spectrum") + tensor = [1] + [0] * 9 + for width in range(1, 65): + tensor = [sum(tensor[j] * multiplicities[(k - j) % 10] for j in range(10)) + for k in range(10)] + require(sum(tensor) == SIZE**width, "complete tensor spectrum") + require(tensor[0] == fixed_dimension(width), "tensor character formula") + return multiplicities + + +def two_column_fixed_dimension(destinations, phases): + seen = bytearray(SIZE * SIZE) + fixed, orbit_count = 0, 0 + for start in range(SIZE * SIZE): + if seen[start]: + continue + x, exponent = start, 0 + for _ in range(10): + if seen[x]: + break + seen[x] = 1 + a, b = divmod(x, SIZE) + exponent = (exponent + phases[a] + phases[b]) % 4 + x = destinations[a] * SIZE + destinations[b] + require(x == start, "two-column orbit closure") + orbit_count += 1 + fixed += exponent == 0 + require(sum(seen) == SIZE * SIZE, "all literal two-column addresses") + require(fixed == fixed_dimension(2) == 33280, "literal two-column fixed space") + return orbit_count + + +def modular_correction_rank(destinations, phases): + # 16^2 = -1 mod 257. Signed-permutation cycle ranks are preserved here. + pivots = {} + for x in range(SIZE): + vector = {destinations[x]: pow(16, phases[x], 257)} + vector[x] = (vector.get(x, 0) - 1) % 257 + vector = {key: value for key, value in vector.items() if value} + for _ in range(SIZE): + if not vector: + break + row = min(vector) + if row not in pivots: + scale = pow(vector[row], -1, 257) + pivots[row] = {key: value * scale % 257 for key, value in vector.items()} + vector = {} + break + scale = vector[row] + for key, value in pivots[row].items(): + updated = (vector.get(key, 0) - scale * value) % 257 + if updated: + vector[key] = updated + else: + vector.pop(key, None) + require(not vector, "bounded Gaussian elimination exhausted") + require(len(pivots) == 416 == SIZE - fixed_dimension(1), "literal correction rank") + return len(pivots) + + +def check_controls(destinations, phases): + changed = phases.copy() + changed[0] = (changed[0] + 1) % 4 + cycles, histogram = signed_cycles(destinations, changed) + require(histogram != EXPECTED_CYCLES, "single fixed-address phase fault detected") + try: + traces = direct_traces(destinations, changed) + except ValueError: + pass + else: + require(traces != EXPECTED_TRACES, "trace phase fault detected") + try: + check_gauge(cycles, destinations, changed) + except ValueError: + pass + else: + raise ValueError("bad gauge accepted") + require(16 != fixed_dimension(1), "basis-address count is not fixed-space dimension") + require(2 * 416 != SIZE**2 - fixed_dimension(2), "tensor rank is not twice local rank") + for width in (0, -1, 65, True): + try: + fixed_dimension(width) + except ValueError: + continue + raise ValueError("width budget accepted") + return 9 + + +def main(): + require(len(sys.argv) == 1, "no command-line arguments supported") + destinations, phases = load_monomial() + cycles, histogram = signed_cycles(destinations, phases) + require(histogram == EXPECTED_CYCLES, "signed cycle certificate") + gauge_digest = check_gauge(cycles, destinations, phases) + require(direct_traces(destinations, phases) == EXPECTED_TRACES, "literal traces") + spectrum = check_tensor_characters(cycles) + orbits = two_column_fixed_dimension(destinations, phases) + rank = modular_correction_rank(destinations, phases) + controls = check_controls(destinations, phases) + names = ("README.md", "PROOF.md", "TASK.json", "SOURCES.json", "SOURCE-PINS.json", + "VERIFY.json", "verify.py", "sources/pr7447-PROOF.md", "sources/pr7447-RESULT.json") + hashes = {name: hashlib.sha256((ROOT / name).read_bytes()).hexdigest() for name in names} + result = { + "marker": "PASS_F9_TENSOR_FIXED_SPACE", "claim_type": "scoped proof and finite certificate", + "signed_cycles": [[length, phase, count] for (length, phase), count in sorted(histogram.items())], + "trace_powers_0_through_9": EXPECTED_TRACES, "tenth_root_multiplicities": spectrum, + "diagonal_gauge_sha256": gauge_digest, "one_column_correction_rank": rank, + "literal_two_column_addresses": SIZE**2, "literal_two_column_orbits": orbits, + "character_widths_checked": 64, "controls": controls, + "fixed_dimensions_1_through_8": [fixed_dimension(f) for f in range(1, 9)], + "package_sha256": hashes, + } + print(json.dumps(result, indent=2, sort_keys=True)) + + +if __name__ == "__main__": + main()