diff --git a/research/homogeneous-chain-extraction/PROOF.md b/research/homogeneous-chain-extraction/PROOF.md new file mode 100644 index 0000000000..a8cd84a160 --- /dev/null +++ b/research/homogeneous-chain-extraction/PROOF.md @@ -0,0 +1,207 @@ +# Exact two-call capacity of homogeneous query chains + +This is a conditional operator theorem, not a physical supplier. The three-field +case is already in Cinna Davis's PR4698. The new result is the all-odd-length +construction, a new attaining even-length construction, explicit linear-size +boundaries, and a matching two-call bound +with arbitrary restored dirty workspace in the restricted ring below. + +## Model and statement + +Work over A = Z[q]/(q^4-1), with p=q^2, and let B=Z[p]/(p^2-1). +For the upper bound scalars may extend to any characteristic-zero field K, +and free boundaries may be arbitrary invertible matrices over K[p]/(p^2-1). +Thus the bound includes more scalar mixing than the construction needs. +It does **not** include arbitrary physical address maps, independently selected +column operations, or arbitrary Pauli operators beyond this global p. A physical +substitution must satisfy Q^T=Q and Q^4=I; transpose fixes the formal q. + +Let n=2m+1 >= 3, and let J be the n-by-n upper shift. The two paid +offers are U=I+qJ and its **actual** raw inverse transpose + + U^-T = (I+qJ^T)^-1 = sum_{d=0}^{n-1} (-q J^T)^d. + +There are invertible B-valued boundaries L,E,D,R with + + L U E D U^-T D R = diag(q I_(n-1), 1). + +They use 5m-2 scalar ADDs, m field swaps, and 3m signed-p field scales. +ADD coefficients are only ±1 or ±p. These counts include **all** boundaries; +there are no zero-only inputs. The last input is arbitrary and is restored. +An ADD with coefficient p is implemented by p-conjugating its source, adding, +and restoring the source, so no q query is implicit in a boundary. The counts +are field macros, not a physical tape/runtime invoice. + +In this model any two calls to U or its inverse/transpose/raw-dual orientations, +with arbitrary free boundaries and any number of restored dirty fields, can +produce at most n-1 independent q jobs. The number of such jobs must be even. +Consequently n-1 is optimal for every odd n. For even n we prove only the +upper bound n-2, attained by the separate even construction below. The exact +capacity for every n>=2 is therefore 2 floor((n-1)/2). + +## Odd-chain constructive factorization + +Index fields 0,...,2m. Define D=diag(1,p,1,p,...,1) and E=I-p(J^T)^2. +Both have explicitly invertible B-valued circuits. Conjugation gives + + D U^-T D = (I+q^-1 J^T)^-1. + +Since (I-a)(I+a)=I-a^2 for a=q^-1 J^T, multiplication by E gives + + E D U^-T D = I-q^-1 J^T. + +This removes every long-root term, including odd powers beyond the quadratic +term of the three-field predecessor; E itself has only p entries. Therefore + + U E D U^-T D = E_(2m,2m) + q T, T=J-pJ^T. + +The identity follows from JJ^T=diag(1,...,1,0). All operations are in A. + +Let u_(2k)=p^(m-k), u_(2k+1)=0. Then Tu=0 and u_(2m)=1. +Take R to have columns e_0,...,e_(2m-1),u. It adds +p^(m-k) times the arbitrary spectator to field 2k, for 0<=k=4, gamma=p^(m-1), and E=I-p(J^T)^2. This time no D +conjugation is needed: E U^-T=I-qJ^T. Define a weighted cyclic permutation M by + + (Mx)_i = p^i x_(i+1) for 0<=i=3. The construction holds at **every** positive width by substitution. +The ring lower bound applies to a faithful representation, and consequently +to any uniform family satisfying this restricted model at those larger widths. +It is not a lower bound for every isolated small width or for all physical +monomial/scalar circuits. For example at f=1, C=((1+i)/2)I+((1-i)/2)P +is itself a unit of the scalar/P ring, so no such two-call bound follows there. + +## Conditional complete ledger and a direct-synthesis stop + +Suppose two provider calls have a common commuting transverse rank-b Gaussian +on every chain field, using disjoint transverse axes, and the actual raw dual +admits its true Pauli normalization. Suppose each call has autonomous helper +target moment H_t and a **complete** paid moment P_t, with t=1-C. Then this +controller has moment surplus + + 2 H_t + r(2b+1)^t + (n-r)(2b)^t - 2 P_t, + r = 2 floor((n-1)/2). + +Every provider charge and both orientations must be present in P_t. For +E=P_1-H_1-nb, the rank surplus at C=0 is r-2E. +In particular a positive rank surplus requires E=1 and 0<=t<=1, +subadditivity yields (2b)^t<=2b^t and (2b+1)^t<=2b^t+1, so the complete +surplus is at most r-2(n-1), which is -(n-1) for odd n and -n for even n. +At b=0 and t>0 the same expression is exact. +Thus direct acquisition of each chain edge loses for every useful saving. +Already-paid native observations or a changed joint provider would be needed. +Their physical acquisition and restoration costs are **unknown** here. diff --git a/research/homogeneous-chain-extraction/README.md b/research/homogeneous-chain-extraction/README.md new file mode 100644 index 0000000000..e4fb8c1fca --- /dev/null +++ b/research/homogeneous-chain-extraction/README.md @@ -0,0 +1,100 @@ +# Exact two-call capacity of homogeneous query chains + +**Conditional operator theorem, author-checked; no new kappa or native supplier.** +For every n>=2, two calls to a homogeneous chain U_n=I+Q J_n and its actual raw +inverse transpose can deliver exactly + + r = 2 floor((n-1)/2) + +independent Q jobs while restoring the other arbitrary input fields. Every +boundary uses only scalar mixing and the global monomial P=Q^2. For odd +n=2m+1 the explicit circuit uses 5m-2 scalar ADDs, m swaps and 3m signed-P +scales. A different weighted cyclic middle boundary attains n-2 jobs for every +even n. Counts are field macros; physical movement and precision remain unpriced. + +| Chain fields | Q jobs from two calls | Restored spectators | Boundary ADDs | Swaps | Signed-P scales | +|---:|---:|---:|---:|---:|---:| +| 3 | 2 | 1 | 3 | 1 | 3 | +| 4 | 2 | 2 | 5 | 7 | 5 | +| 5 | 4 | 1 | 8 | 2 | 6 | +| 6 | 4 | 2 | 11 | 12 | 6 | +| 7 | 6 | 1 | 13 | 3 | 9 | + +This extends the three-field conditional identity in Cinna Davis's +[PR4698](https://github.com/CrocSwap/integer-mult-bounds/pull/4698), whose frozen +source/proof are pinned in [SOURCES.json](SOURCES.json). The proof also shows +that no two-call word in the scalar/global-P ring can produce more jobs, even +with arbitrary restored dirty workspace. It permits any inverse/transpose +orientation and arbitrary invertible boundaries over that ring. Broader physical +monomial/address operations and isolated small tensor widths are excluded from +the upper bound. The constructive identities hold at every positive width. + +[PROOF.md](PROOF.md) gives the all-length constructions, restricted optimality +proof, width qualification and complete conditional moment ledger. +[verify.py](verify.py) checks all independent inputs symbolically over +Z[q]/(q^4-1) for every length 2 through 32, every boundary count, both parity +circuits, thirteen semantic mutations, 256 finite dirty-workspace rank fixtures, +and the tensor-width qualification. These finite checks supplement the written +proof; they do not prove physical realizability or certify multiplication. + +## Budget and expansion decision + +With n transverse rank-b main fields per provider, autonomous helper moment H_t +and complete paid moment P_t, the two-call surplus is + + 2 H_t + r(2b+1)^t + (n-r)(2b)^t - 2 P_t. + +Writing E=P_1-H_1-nb, the C=0 rank surplus is r-2E. A new physical offer +needs E=1. Longer chains alone do not repair that bill. + +**Decision: retain the proved module; stop direct unary synthesis.** No native +expansion is warranted until a named changed provider has a complete favorable +budget. The retained-center source has heterogeneous charts and incoming helper +noise, as recorded in [Discussion4840](https://github.com/CrocSwap/integer-mult-bounds/discussions/4840). +No native homogeneous offer is obtained from its scalar Jordan chains. +Acquisition, actual chart maps, dirty restoration and independent helper targets +are unknown for the proposed longer chain. Physical movement/precision, +completion, compiler, BIT and outer recovery remain unrun and unpriced. + +## Reproduce + +From the repository root, using only the Python standard library: + +```sh +python3.12 -I -B research/homogeneous-chain-extraction/verify.py +python3.12 -I -O -B research/homogeneous-chain-extraction/verify.py +python3.12 -B scripts/research_package.py --package research/homogeneous-chain-extraction +``` + +[RESULT.json](RESULT.json) is deterministic and must match replay. No Lean, +Docker, all-history suite or selected-frontier replay is required for this +scoped theorem. The selected conditional kappa remains 0.00302015. See +[TASK.json](TASK.json) for the exact base, original assignment, overlap boundary, +claim, and explicit expansion gate. Upstream and frozen predecessors are unchanged. + +## Open next questions + +- Can an actual changed native provider supply even one five-field homogeneous + chain with excess E<2, arbitrary spectator/helper restoration and a positive + full moment? Begin with its literal source/target chart contract and complete + two-orientation invoice; stop on an unfavorable optimistic bill. No provider + meeting this allowance is identified here. +- Can a named additional free physical monomial/address operation exceed this + ring-restricted capacity? Begin with one actual source-compatible operation + and replay the full endpoint on all independent inputs. The broader physical + operation model is outside the optimality proof and still needs a full bill. + +## Credit and scope + +Cinna Davis / 1337isnot1337 supplies PR4694's coupled retained-center extension, +PR4698's helper normalization and conditional three-chain consumer, and the +PR4440/4470 controller lineage. Retain Cao Yifan / intqwq, zxv, Jacob Alan +Sussman, Ryanson Jonathan and all cited native/compiler/precision predecessors. +Their actual native construction is not replayed or modified here. The new +contribution is the all-length proof/circuits, restricted workspace bound, +and explicit acquisition allowance. Prepared for Cinna Davis with substantial +OpenAI Codex assistance. Apache-2.0. No independent human or proof-kernel +acceptance is claimed. diff --git a/research/homogeneous-chain-extraction/RESULT.json b/research/homogeneous-chain-extraction/RESULT.json new file mode 100644 index 0000000000..9a47089ca7 --- /dev/null +++ b/research/homogeneous-chain-extraction/RESULT.json @@ -0,0 +1,316 @@ +{ + "status": "PASS_HOMOGENEOUS_CHAIN_EXTRACTION", + "scope": "Conditional cyclic-ring identity and restricted two-call optimum; no new kappa", + "lengths": [ + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32 + ], + "independent_input_columns": 527, + "coefficient_slots": 45756, + "boundary_profiles": [ + { + "n": 2, + "Q_jobs": 0, + "calls": 2, + "scalar_ADDs": 0, + "swaps": 2, + "signed_P_scales": 0 + }, + { + "n": 3, + "Q_jobs": 2, + "calls": 2, + "scalar_ADDs": 3, + "swaps": 1, + "signed_P_scales": 3 + }, + { + "n": 4, + "Q_jobs": 2, + "calls": 2, + "scalar_ADDs": 5, + "swaps": 7, + "signed_P_scales": 5 + }, + { + "n": 5, + "Q_jobs": 4, + "calls": 2, + "scalar_ADDs": 8, + "swaps": 2, + "signed_P_scales": 6 + }, + { + "n": 6, + "Q_jobs": 4, + "calls": 2, + "scalar_ADDs": 11, + "swaps": 12, + "signed_P_scales": 6 + }, + { + "n": 7, + "Q_jobs": 6, + "calls": 2, + "scalar_ADDs": 13, + "swaps": 3, + "signed_P_scales": 9 + }, + { + "n": 8, + "Q_jobs": 6, + "calls": 2, + "scalar_ADDs": 17, + "swaps": 17, + "signed_P_scales": 11 + }, + { + "n": 9, + "Q_jobs": 8, + "calls": 2, + "scalar_ADDs": 18, + "swaps": 4, + "signed_P_scales": 12 + }, + { + "n": 10, + "Q_jobs": 8, + "calls": 2, + "scalar_ADDs": 23, + "swaps": 22, + "signed_P_scales": 12 + }, + { + "n": 11, + "Q_jobs": 10, + "calls": 2, + "scalar_ADDs": 23, + "swaps": 5, + "signed_P_scales": 15 + }, + { + "n": 12, + "Q_jobs": 10, + "calls": 2, + "scalar_ADDs": 29, + "swaps": 27, + "signed_P_scales": 17 + }, + { + "n": 13, + "Q_jobs": 12, + "calls": 2, + "scalar_ADDs": 28, + "swaps": 6, + "signed_P_scales": 18 + }, + { + "n": 14, + "Q_jobs": 12, + "calls": 2, + "scalar_ADDs": 35, + "swaps": 32, + "signed_P_scales": 18 + }, + { + "n": 15, + "Q_jobs": 14, + "calls": 2, + "scalar_ADDs": 33, + "swaps": 7, + "signed_P_scales": 21 + }, + { + "n": 16, + "Q_jobs": 14, + "calls": 2, + "scalar_ADDs": 41, + "swaps": 37, + "signed_P_scales": 23 + }, + { + "n": 17, + "Q_jobs": 16, + "calls": 2, + "scalar_ADDs": 38, + "swaps": 8, + "signed_P_scales": 24 + }, + { + "n": 18, + "Q_jobs": 16, + "calls": 2, + "scalar_ADDs": 47, + "swaps": 42, + "signed_P_scales": 24 + }, + { + "n": 19, + "Q_jobs": 18, + "calls": 2, + "scalar_ADDs": 43, + "swaps": 9, + "signed_P_scales": 27 + }, + { + "n": 20, + "Q_jobs": 18, + "calls": 2, + "scalar_ADDs": 53, + "swaps": 47, + "signed_P_scales": 29 + }, + { + "n": 21, + "Q_jobs": 20, + "calls": 2, + "scalar_ADDs": 48, + "swaps": 10, + "signed_P_scales": 30 + }, + { + "n": 22, + "Q_jobs": 20, + "calls": 2, + "scalar_ADDs": 59, + "swaps": 52, + "signed_P_scales": 30 + }, + { + "n": 23, + "Q_jobs": 22, + "calls": 2, + "scalar_ADDs": 53, + "swaps": 11, + "signed_P_scales": 33 + }, + { + "n": 24, + "Q_jobs": 22, + "calls": 2, + "scalar_ADDs": 65, + "swaps": 57, + "signed_P_scales": 35 + }, + { + "n": 25, + "Q_jobs": 24, + "calls": 2, + "scalar_ADDs": 58, + "swaps": 12, + "signed_P_scales": 36 + }, + { + "n": 26, + "Q_jobs": 24, + "calls": 2, + "scalar_ADDs": 71, + "swaps": 62, + "signed_P_scales": 36 + }, + { + "n": 27, + "Q_jobs": 26, + "calls": 2, + "scalar_ADDs": 63, + "swaps": 13, + "signed_P_scales": 39 + }, + { + "n": 28, + "Q_jobs": 26, + "calls": 2, + "scalar_ADDs": 77, + "swaps": 67, + "signed_P_scales": 41 + }, + { + "n": 29, + "Q_jobs": 28, + "calls": 2, + "scalar_ADDs": 68, + "swaps": 14, + "signed_P_scales": 42 + }, + { + "n": 30, + "Q_jobs": 28, + "calls": 2, + "scalar_ADDs": 83, + "swaps": 72, + "signed_P_scales": 42 + }, + { + "n": 31, + "Q_jobs": 30, + "calls": 2, + "scalar_ADDs": 73, + "swaps": 15, + "signed_P_scales": 45 + }, + { + "n": 32, + "Q_jobs": 30, + "calls": 2, + "scalar_ADDs": 89, + "swaps": 77, + "signed_P_scales": 47 + } + ], + "rejected_controller_mutations": [ + "missing spectator injection", + "missing long-root correction", + "wrong long-root sign", + "missing Pauli conjugations", + "missing spectator restoration", + "sign-only raw dual" + ], + "rejected_even_controller_mutations": [ + "missing spectator injection", + "missing long-root correction", + "wrong long-root sign", + "missing middle Pauli scales", + "missing spectator restoration", + "sign-only raw dual", + "wrong cyclic wrap weight" + ], + "dirty_workspace_rank_fixtures": 256, + "tensor_evaluation_ranks_f1_through_f4": [ + 2, + 3, + 4, + 4 + ], + "proof": "PROOF.md", + "native_embedding": "unknown", + "selected_kappa_changed": false +} diff --git a/research/homogeneous-chain-extraction/SOURCES.json b/research/homogeneous-chain-extraction/SOURCES.json new file mode 100644 index 0000000000..0ede177907 --- /dev/null +++ b/research/homogeneous-chain-extraction/SOURCES.json @@ -0,0 +1,30 @@ +{ + "schema_version": 1, + "base_commit": "20a1e31bc6009b9b3f4d084bbaadc6350e34fcba", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "c35482cd9035843b15a634cc8276a7e1e40e8395", + "sha256": "6fe0a099b89aa2aed796a13c3a21dafc63f3388ebf397464e44e0451893b9375" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "f126dd2e2dad2b669e75d1d0d0bd05c600725602", + "sha256": "f7a48bfa2659b88378282a8eee7d9fe52cdf505594124c4d1686b58510fffd72" + }, + { + "path": "research/center-helper-normal-form/CONSUMER.md", + "usage": "provenance", + "git_blob": "70ecd4bc23fb5bbeef7a542dfd1ec55db80d4645", + "sha256": "95b7291afcbb8df9bccaa9923bedd32c7331e243d64a69de5aa22998a5ce8401" + }, + { + "path": "research/center-helper-normal-form/consumer.py", + "usage": "provenance", + "git_blob": "7cf79600e5e46a3714e83fb04a694a1ddede065b", + "sha256": "56dc7d458410637dd675e7807ec272f8e55381b4bfa1313ef5bb552e7488adc4" + } + ] +} diff --git a/research/homogeneous-chain-extraction/TASK.json b/research/homogeneous-chain-extraction/TASK.json new file mode 100644 index 0000000000..aab630c889 --- /dev/null +++ b/research/homogeneous-chain-extraction/TASK.json @@ -0,0 +1,123 @@ +{ + "schema_version": 1, + "task_id": "joint-query-controller", + "priority_revision": 7, + "base_commit": "20a1e31bc6009b9b3f4d084bbaadc6350e34fcba", + "original_card": { + "id": "joint-query-controller", + "question": "Can the installed QQ16 caller win a complete matched protocol bill, or can a changed demand eliminate actual paid work?", + "starting_points": [ + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "research/qq16-caller-install/README.md" + ], + "methods": [ + "Derive the matched whole-caller physical bill for installed and baseline protocols.", + "Change the actual demanded observations and prove a cheaper legal producer/consumer contract." + ], + "acceptance_gate": "Name the changed premise of the fixed F0/B1 observation obstruction. Show exactly which query is recovered, legal native reads and restoration, and a full favorable budget including cover maps, helpers and endpoints. Local inverse identities alone do not close the global controller. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read #4166 COST.md and ADMISSION.json. An actual caller connection is now proposed. Its native-component profile loses; parent park/restore versus external-call costs remain unresolved. Retain the producer and recovery lineage rather than rebuild it.", + "scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately." + }, + "first_experiment": "At the actual installed cut, compare matched complete parent park/restore and external input/return protocols at the same bank/packet geometry, including every later root call and service cost. Alternatively pin both bridge observations and derive a genuinely smaller source-compatible demand. Stop if the complete necessary inequality fails or an essential cost is unknown; no larger decoder scan from a local tape-action saving.", + "bottleneck_link": "The native local words exist; retained query information and its physical access are the missing link to a composed recursive interface.", + "allowed_variations": [ + "One paid query, one changed first pair, or one precisely specified affine helper state.", + "A counterexample or lower bound for that exact proposed repair.", + "One unresolved obligation of a newer local decoder, with exact source heads and a distinct claim/domain." + ], + "scope_change_triggers": [ + "Retaining the fixed first pair and ordinary schedule while allowing only homogeneous selected-only control, already excluded by the witness.", + "Treating cover-map counts as zero-cost physical address operations.", + "Recreating the pending complete local decoder or early-record/output-bank coalescing already under investigation without a distinct audit or changed premise.", + "Treating a completed-output defect inequality as a producer-interior, dirty-range or physical-cost certificate.", + "Recreating completed-output recovery or caller wiring already supplied by #4166 without new independent coverage.", + "Dropping retained later root calls or claiming native-profile dominance from the isolated publication saving." + ], + "overlap_terms": [ + "QQ16", + "joint-query", + "changing-chart controller", + "selected observation", + "1969", + "2540", + "early record", + "output-bank retention", + "complete native decoder", + "2965", + "producer defect", + "dirty-helper range", + "F17 consumer", + "4166", + "qq16-caller-install" + ], + "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_status": "changed", + "actual_scope": "Exact two-call capacity 2 floor((n-1)/2) of homogeneous query chains, with attaining odd/even circuits, restored-workspace upper bound in the scalar/global-P ring, and a complete conditional acquisition allowance.", + "scope_change_reason": "Replace the installed QQ16 demand with the conditional PR4698 chain interface; extend its proved three-field module before any physical synthesis. Native heterogeneity and helper contamination remain explicit. A bounded four-field middle-boundary test produced a weighted cyclic construction, extended algebraically to all even lengths in the same module; this closes the initially open even attaining case.", + "bottleneck_link": "A cheap homogeneous offer could turn two paid calls into n-1 main queries, but direct unary acquisition loses. The exact E<(n-1)/2 allowance identifies the missing physical producer.", + "budget_minutes": 60, + "stop_rule": "Complete the all-length proof and bounded replay; stop direct unary synthesis. Do not begin native expansion without a named complete positive provider invoice.", + "outcome": "partial", + "evidence": "PROOF.md; deterministic RESULT.json with exact all-input lengths 2..32 and both parity circuits; registered verifier; no native provider or new kappa.", + "author": "Cinna Davis with substantial OpenAI Codex assistance", + "ai_assistance": "Substantial OpenAI Codex assistance for algebra, implementation, proof review and publication; no delegated agents or independent human review.", + "open_questions": [ + { + "question": "Can a changed physical five-field provider meet E<2 and the positive complete moment?", + "why_it_matters": "This is the acquisition allowance needed before four useful queries can yield a real gain.", + "first_step": "Name a source word and fully charge both orientations, charts, helper targets and restoration.", + "blocked_by": "No native homogeneous offer or affordable acquisition contract is known." + }, + { + "question": "Can additional free physical monomial/address maps exceed the scalar/global-P two-call capacity?", + "why_it_matters": "The exact optimality theorem only constrains the declared homogeneous ring and cannot decide a broader physical offer.", + "first_step": "Name one concrete extra free physical operation and its actual caller; check the full endpoint on independent inputs before any larger search.", + "blocked_by": "No source-compatible broader offer with a complete positive invoice is supplied here." + } + ], + "claim_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/4840#discussioncomment-19143781", + "declared_milestone": "Conditional local controller theorem; not a complete supplier or integrated kappa.", + "boundary_contract": { + "inputs": "n arbitrary independent fields, including arbitrary spectator; lower-bound model allows any restored dirty workspace", + "outputs": "n-1 Q jobs and unchanged spectator for odd n", + "free_operations": "Invertible scalar/global-P matrices only, P=Q^2", + "unknown": "Actual native producer, heterogeneous charts, helper autonomy/restoration, movement/precision, completion, compiler, BIT and outer funding" + }, + "overlap": { + "canonical_base": "20a1e31bc6009b9b3f4d084bbaadc6350e34fcba", + "priority_revision": 7, + "nearest_predecessors": [ + "PR4698 homogeneous three-field identity", + "Discussion4840 actual native heterogeneous/helper failure", + "PR4712/4839/4867/4888 native chart/terminal restrictions" + ], + "distinction": "All-odd abstract chain construction and restricted workspace optimality, not another actual native chart sweep. Live open PR/discussion and complete local-note overlap checked; no novelty guarantee.", + "coverage": { + "open_prs": 318, + "open_prs_fetched_at": "2026-10-23T10:33:22.914155+00:00", + "discussion_records": 4290, + "discussions_fetched_at": "2026-10-23T10:35:14.279098+00:00", + "complete_pagination": true, + "local_notes_complete_at_head": true, + "warning": "Title/body/local-note coverage is not exhaustive proof of novelty." + } + } +} diff --git a/research/homogeneous-chain-extraction/VERIFY.json b/research/homogeneous-chain-extraction/VERIFY.json new file mode 100644 index 0000000000..aabf2cc911 --- /dev/null +++ b/research/homogeneous-chain-extraction/VERIFY.json @@ -0,0 +1,18 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Exact cyclic-ring all-input identities for every n=2..32, both parity circuits and full boundary counts, thirteen active mutations, parity guards, 256 dirty-workspace rank fixtures and faithful tensor-width qualification. All-length statements proved in PROOF.md; no physical supplier or higher kappa." + } + ] +} diff --git a/research/homogeneous-chain-extraction/verify.py b/research/homogeneous-chain-extraction/verify.py new file mode 100644 index 0000000000..b0ab88118d --- /dev/null +++ b/research/homogeneous-chain-extraction/verify.py @@ -0,0 +1,303 @@ +"""Exact homogeneous-chain controller; Apache-2.0, OpenAI Codex assisted. + +Finite checks supplement PROOF.md. No native provider or kappa is certified. +""" + +import argparse +import json +from pathlib import Path + +ZERO = (0, 0, 0, 0) +ONE = (1, 0, 0, 0) +Q = (0, 1, 0, 0) +P = (0, 0, 1, 0) + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def add(a, b): + return tuple(x + y for x, y in zip(a, b)) + + +def mul(a, b): + out = [0] * 4 + for i, x in enumerate(a): + if x: + for j, y in enumerate(b): + if y: + out[(i + j) % 4] += x * y + return tuple(out) + + +def negative(a): + return tuple(-x for x in a) + + +def identity(n): + return [[ONE if i == j else ZERO for j in range(n)] for i in range(n)] + + +def row_add(matrix, target, source, coefficient): + matrix[target] = [add(x, mul(coefficient, y)) + for x, y in zip(matrix[target], matrix[source])] + + +def row_scale(matrix, target, coefficient): + matrix[target] = [mul(coefficient, x) for x in matrix[target]] + + +def boundaries(n): + """Chronological reversible operations, excluding the two paid oracles.""" + need(n >= 3 and n % 2 == 1, 'An odd chain length at least three is required') + m = (n - 1) // 2 + right = [('add', 2*k, n-1, P if (m-k) % 2 else ONE) for k in range(m)] + diagonal = [('scale', i, P) for i in range(1, n, 2)] + correction = [('add', i, i-2, negative(P)) for i in range(n-1, 1, -1)] + left = [('add', 2*k, 2*k-2, P) for k in range(1, m)] + left += [('add', 2*k+1, 2*k+3, P) for k in range(m-2, -1, -1)] + left += [('scale', 2*k+1, negative(P)) for k in range(m)] + left += [('add', n-1, n-3, P)] + left += [('swap', 2*k, 2*k+1) for k in range(m)] + return right, diagonal, correction, left + + +def operate(matrix, operations): + for operation in operations: + if operation[0] == 'add': + _, target, source, coefficient = operation + row_add(matrix, target, source, coefficient) + elif operation[0] == 'scale': + _, target, coefficient = operation + row_scale(matrix, target, coefficient) + elif operation[0] == 'swap': + _, a, b = operation + matrix[a], matrix[b] = matrix[b], matrix[a] + else: + raise ValueError('Unknown boundary operation') + + +def controller(n, mutation=None): + right, diagonal, correction, left = boundaries(n) + if mutation == 'missing spectator injection': + right = right[1:] + if mutation == 'missing long-root correction': + correction = [] + if mutation == 'wrong long-root sign': + correction = [('add', i, j, P) for _, i, j, _ in correction] + if mutation == 'missing Pauli conjugations': + diagonal = [] + if mutation == 'missing spectator restoration': + left = [op for op in left if not (op[0] == 'add' and op[1] == n-1)] + matrix = identity(n) + operate(matrix, right) + operate(matrix, diagonal) + if mutation == 'sign-only raw dual': + # Descending rows omit all required powers q^d for d>=2. + for i in range(n-1, 0, -1): + row_add(matrix, i, i-1, negative(Q)) + else: + # Ascending rows use updated predecessors: (I+q J^T)^-1. + for i in range(1, n): + row_add(matrix, i, i-1, negative(Q)) + operate(matrix, diagonal) + operate(matrix, correction) + # Ascending rows use original successors: I+q J. + for i in range(n-1): + row_add(matrix, i, i+1, Q) + operate(matrix, left) + return matrix + + +def target(n): + jobs = 2*((n-1)//2) + return [[(Q if i < jobs else ONE) if i == j else ZERO + for j in range(n)] for i in range(n)] + + +def even_boundaries(n): + """The cyclic middle boundary attains n-2 jobs for every even n.""" + need(n >= 2 and n % 2 == 0, 'An even chain length is required') + if n == 2: + return [], [], [('swap', 0, 1)], [('swap', 0, 1)] + m = n//2 + right = [('swap', i, i-1) for i in range(n-2, 0, -1)] + right += [('add', 2*k, 0, P if k % 2 else ONE) for k in range(1, m)] + right += [('add', 2*k+1, n-1, P if (m-1-k) % 2 else ONE) + for k in range(m-1)] + correction = [('add', i, i-2, negative(P)) for i in range(n-1, 1, -1)] + middle = [('swap', i, i+1) for i in range(n-1)] + middle += [('scale', i, P) for i in range(1, n-1, 2)] + if (m-1) % 2: + middle += [('scale', n-1, P)] + left = [('add', 2*k, 2*k-2, P) for k in range(1, m-1)] + left += [('add', 2*k+1, 2*k+3, P) for k in range(m-3, -1, -1)] + left += [('add', n-2, n-4, P)] + left += [('scale', i, negative(P) if i % 2 else P) for i in range(n-2)] + if (m-1) % 2: + left += [('scale', n-1, P)] + left += [('swap', 2*k, 2*k+1) for k in range(m)] + return right, correction, middle, left + + +def even_controller(n, mutation=None): + right, correction, middle, left = even_boundaries(n) + if mutation == 'missing spectator injection': + right = right[1:] + if mutation == 'missing long-root correction': + correction = [] + if mutation == 'wrong long-root sign': + correction = [('add', i, j, P) for _, i, j, _ in correction] + if mutation == 'missing middle Pauli scales': + middle = [op for op in middle if op[0] != 'scale'] + if mutation == 'wrong cyclic wrap weight': + middle += [('scale', n-1, P)] + if mutation == 'missing spectator restoration': + left = [op for op in left if not (op[0] == 'add' and op[1] == n-2)] + matrix = identity(n) + operate(matrix, right) + indices = range(n-1, 0, -1) if mutation == 'sign-only raw dual' else range(1, n) + for i in indices: + row_add(matrix, i, i-1, negative(Q)) + operate(matrix, correction) + operate(matrix, middle) + for i in range(n-1): + row_add(matrix, i, i+1, Q) + operate(matrix, left) + return matrix + + +def modular_rank(matrix, prime): + a = [[x % prime for x in row] for row in matrix] + rank = 0 + for column in range(len(a[0])): + pivot = next((i for i in range(rank, len(a)) if a[i][column]), None) + if pivot is None: + continue + a[rank], a[pivot] = a[pivot], a[rank] + inverse = pow(a[rank][column], -1, prime) + a[rank] = [x * inverse % prime for x in a[rank]] + for i in range(rank+1, len(a)): + coefficient = a[i][column] + a[i] = [(x-coefficient*y) % prime for x, y in zip(a[i], a[rank])] + rank += 1 + if rank == len(a): + break + return rank + + +def lower_bound_fixtures(): + """Finite corroboration with dirty roles; the general bound is proved.""" + prime = 65537 + count = 0 + for n in range(2, 10): + for scratch in range(4): + width = n + scratch + b = [[int(i == j) for j in range(width)] for i in range(width)] + # Elementary operations give invertible arbitrary-input mixing. + for k in range(3*width): + i, j = k % width, (k+1) % width + b[i] = [(x+(k+1)*y) % prime for x, y in zip(b[i], b[j])] + need(modular_rank(b, prime) == width, 'Invertible dirty mixing') + for transpose_first in (False, True): + for transpose_second in (False, True): + for sign in (-1, 1): + e = [row[:] for row in b] + for i in range(n-1): + r, a = (i+1, i) if transpose_first else (i, i+1) + for j in range(n-1): + c, d = (j, j+1) if transpose_second else (j+1, j) + e[r][c] = (e[r][c]+sign*b[a][d]) % prime + need(modular_rank(e, prime) >= width-(n-1), + 'Even-coefficient rank bound with dirty fields') + count += 1 + return count + + +def faithful_gaussian_check(): + # C has eigenvalues 1,i. Three columns contain all four cyclic roots. + prime, imaginary = 65537, 256 + need(imaginary**2 % prime == prime-1, 'Exact fourth root over F_65537') + ranks = [] + for columns in (1, 2, 3, 4): + eigenvalues = [pow(imaginary, k.bit_count(), prime) + for k in range(1 << columns)] + evaluation = [[pow(x, j, prime) for j in range(4)] for x in eigenvalues] + ranks.append(modular_rank(evaluation, prime)) + need(ranks == [2, 3, 4, 4], 'Width qualification for a faithful q-ring model') + return ranks + + +def check(): + lengths = list(range(2, 33)) + rows = [] + for n in lengths: + if n % 2: + actual = controller(n) + right, diagonal, correction, left = boundaries(n) + operations = right + diagonal + diagonal + correction + left + m = (n-1)//2 + expected = (5*m-2, m, 3*m) + else: + actual = even_controller(n) + right, correction, middle, left = even_boundaries(n) + operations = right + correction + middle + left + m = n//2 + expected = (3*n-7, 5*m-3, 3*m-3+2*((m-1) % 2)) if n >= 4 else (0, 2, 0) + need(actual == target(n), f'Exact all-column cyclic identity n={n}') + adds = sum(op[0] == 'add' for op in operations) + swaps = sum(op[0] == 'swap' for op in operations) + scales = sum(op[0] == 'scale' for op in operations) + need((adds, swaps, scales) == expected, 'Complete boundary inventory') + rows.append({'n': n, 'Q_jobs': 2*((n-1)//2), 'calls': 2, 'scalar_ADDs': adds, + 'swaps': swaps, 'signed_P_scales': scales}) + mutations = ['missing spectator injection', 'missing long-root correction', + 'wrong long-root sign', 'missing Pauli conjugations', + 'missing spectator restoration', 'sign-only raw dual'] + for mutation in mutations: + need(controller(5, mutation) != target(5), 'Rejected mutation: '+mutation) + even_mutations = [x.replace('missing Pauli conjugations', 'missing middle Pauli scales') + for x in mutations] + even_mutations += ['wrong cyclic wrap weight'] + for mutation in even_mutations: + need(even_controller(6, mutation) != target(6), 'Rejected even mutation: '+mutation) + try: + boundaries(4) + except ValueError: + pass + else: + raise ValueError('Even lengths must not enter the odd construction') + return { + 'status': 'PASS_HOMOGENEOUS_CHAIN_EXTRACTION', + 'scope': 'Conditional cyclic-ring identity and restricted two-call optimum; no new kappa', + 'lengths': lengths, + 'independent_input_columns': sum(lengths), + 'coefficient_slots': sum(4*n*n for n in lengths), + 'boundary_profiles': rows, + 'rejected_controller_mutations': mutations, + 'rejected_even_controller_mutations': even_mutations, + 'dirty_workspace_rank_fixtures': lower_bound_fixtures(), + 'tensor_evaluation_ranks_f1_through_f4': faithful_gaussian_check(), + 'proof': 'PROOF.md', + 'native_embedding': 'unknown', + 'selected_kappa_changed': False, + } + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--write', action='store_true') + args = parser.parse_args() + result = check() + path = Path(__file__).with_name('RESULT.json') + if args.write: + path.write_text(json.dumps(result, indent=2)+'\n', encoding='utf-8') + else: + need(json.loads(path.read_text(encoding='utf-8')) == result, 'Committed receipt matches replay') + print(result['status']) + + +if __name__ == '__main__': + main()