diff --git a/.github/workflows/p112-common-slice.yml b/.github/workflows/p112-common-slice.yml index 37f99ca573..48047f61c4 100644 --- a/.github/workflows/p112-common-slice.yml +++ b/.github/workflows/p112-common-slice.yml @@ -15,9 +15,9 @@ jobs: if: github.repository == 'CrocSwap/integer-mult-bounds' runs-on: ubuntu-24.04 timeout-minutes: 20 - env: - TMPDIR: ${{ runner.temp }}/p112-common-slice steps: + - name: Initialise P112 work directory + run: echo "TMPDIR=$RUNNER_TEMP/p112-common-slice" >> "$GITHUB_ENV" - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with: fetch-depth: 0 diff --git a/research/centre-causal-tangent/PROOF.md b/research/centre-causal-tangent/PROOF.md new file mode 100644 index 0000000000..80e4c0dc06 --- /dev/null +++ b/research/centre-causal-tangent/PROOF.md @@ -0,0 +1,135 @@ +# First-variation gate for parameterised centre sharing + +Clear1nsight, substantial OpenAI assistance. Apache-2.0. + +## Exact contract + +Retain the selected 144 local calls, complete scalar words, paired bridges, +all ordinary outputs and signed terminal exchanges. As in PR2622/2763, +project climbs, adapters, idle factors and address translations to identity. +Replace each of the 1,152 centre actions on its private scalar by multiplication +by z. Also test the version with z at forward calls and z^(-1) at backward +calls. The parameter varies near 1. A replacement must agree as a rational +function family, not just at z=1 or a root of unity. + +This changed scalar oracle contract is NOT the fixed native Fourier operator. +The theorem below cannot be used as a native recursive-call lower bound. + +## Time-expanded sheaf and derivative theorem + +A finite causal linear circuit has states x_t and constraints +x_(t+1)=M_t(z)x_t, input injection J and final projection P. It can include +fixed linear recoding, extra finite workspace, copies and singular clears. +Its boundary transfer is + + F(z)=P M_(s-1)(z) ... M_0(z) J. + +Assign state-space stalks to the chronological vertices and coordinate +compatibility restrictions to edges. Global sections are exactly legal linear +traces. Causality gives a unique trace for each input. This time-expanded +sheaf language describes compatibility, not a free implementation of elimination. + +The product rule at z=1 gives + + F'(1)=sum_t P M_(s-1)(1)...M_(t+1)(1) + M'_t(1) M_(t-1)(1)...M_0(1) J. + +If charged gates have derivative ranks r_t and every free operation is +independent of z, rank subadditivity gives + + rank F'(1) <= sum_t r_t. + +Each scalar-register multiplication by z or z^(-1) has derivative rank one. +Thus q such oracle calls imply rank F'(1)<=q. This holds for arbitrary fixed +linear causal recoding and finite workspace, including arbitrary dirty values +held fixed when varying payload inputs. Invertibility of every intermediate +operation is unnecessary. A parameter-independent coordinate change cannot +alter the required boundary derivative. A gate on d independent coordinates +may have derivative rank d and must not be counted as a single scalar query. +Nonlinear/adaptive branching and parameter-dependent free maps are not covered. + +## Application to the selected projected schedule + +At z=1, let C contain the actual chronological centre-input covectors and B +the final response columns to additive centre-output perturbations. C has +shape 1152-by-14336, and B has shape 14336-by-1152. The baseline complete +ordinary endpoint is identity. With Sigma diagonal, all +1 or signed by call +orientation, the product rule is equivalently + + F'(1)=B Sigma C. + +PR2622/2763 already establish full source-history rank, and PR2622 establishes +full final-error-response rank. Those are credited predecessor results. +The new verifier reconstructs both from the pinned selected archive without +importing predecessor executable code. Full modular ranks at two primes, +with opposite pivot conventions, certify their rational ranks as 1,152. +C is therefore surjective, B injective and Sigma invertible. Hence + + rank F'(1)=1152. + +Combining this with the derivative theorem proves that any replacement in +the declared parameterised linear oracle class needs at least 1,152 scalar +oracle gates. Halving to 576 is impossible in this class. This is a gate on +generic temporal sharing, NOT a complete supplier rejection or native tariff. + +The source-bound implementation independently derives all local endpoints, +chronological source rows, final response columns and the complete ordinary +baseline identity. A separately coded full dual-number interpreter over +Q[epsilon]/epsilon^2 checks both derivative sign conventions on dense signed +rational initial data. Each literal run retains 2,835,792 scalar instructions +and all 1,152 centre occurrences; every final ordinary field and private clear +must agree. This interpreter shares the input parser but calls none of the +primary local, bridge or endpoint routines. The dense checks support code +correctness; the rank/product-rule argument establishes the all-input result. + +## Fixed-operator escape and essential limitations + +The derivative concerns nearby parameters. A fixed native operator may obey +special algebraic identities that no generic z obeys. For example, n independent +coordinates transformed four times give F(z)=z^4 I_n and rank F'(1)=n. Under +the discrete condition z^4=1, the same fixed output is identity and uses zero +oracle calls. Consequently the generic lower bound cannot be transferred to +a finite-order native transform. The tests execute this counterexample. + +A claimed free operation z I_n is another counterexample to dropping a premise: +it supplies derivative rank n with no charged query. Fixed source/readout +changes, weaker required endpoints, nonlinear algorithms, different native +primitives and actual higher-dimensional oracle gates also require a new model. +The all-output condition matters, including helper restoration. The theorem +does not silently replace the native endpoint by a source-only observation. + +Eight generic test groups exercise product-rule ranks for noncommuting words, +a tight full-rank example, singular clears, coordinate changes, lost outputs, +fixed-operator and parameter-dependent-free-work counterexamples, and actual +missing/corrupt source loader rejection. Both normal and optimised modes are +registered. No independent human or formal proof-kernel acceptance is claimed. + +## Decision and next question + +NARROW to this exact generic scalar contract. A time-expanded sheaf alone +cannot remove work required by its boundary derivative. The useful constructive +escape is now explicit: bind one native fixed-operator identity that fails the +generic z model but preserves the complete required dirty-input endpoint. +Then charge source access, frames, chronological lifetimes, restoration, +precision, hosting and the complete recursive invoice. Those costs remain +unknown here, not zero. No paid profile, supplier or selected kappa changes. + +## Credit and overlap + +Sagar Thakrar/PR2199, after Adam Gall/PR1918, ywz65/PR2622 and the separate +bridge-source audit PR2763 supply the projected source/response lineage. +Tekalign/PR2814, after Arham Tahir/PR2799, already uses causal feedback and +operator derivatives for terminal-Y error kernels; this package instead bounds +the complete input/output derivative against fixed linear causal recoding. +PR3151 and PR3194 retain their distinct circle/history obstructions. +David Charbonneau/PR3147 supplies the research direction. Matarener/PR3656 and +Ross Richardson/PR3797 retain the block and independently established full-kernel +result; our PR3828 is not repeated. Retain Rohan Arun, Jeremy Kothe, Hao Yan, +Aaron Wang/navinor and all selected native/compiler source attribution. + +The sheaf viewpoint uses established local-to-global linear algebra, including +Hansen and Ghrist, Toward a spectral theory of cellular sheaves (2019), +DOI10.1007/s41468-019-00038-7. The product rule and rank inequality are elementary. +No priority claim for temporal sheaves or generic oracle lower bounds is made. +Separate implementations share the author and source. No agent-spawning tool +was available in this session, and no multi-agent execution is claimed. diff --git a/research/centre-causal-tangent/README.md b/research/centre-causal-tangent/README.md new file mode 100644 index 0000000000..33d114c07d --- /dev/null +++ b/research/centre-causal-tangent/README.md @@ -0,0 +1,107 @@ +# Causal centre sharing needs operator-specific structure + +User-assigned priority1 in the PR3147/3828 research stream. Clear1nsight with +substantial OpenAI assistance. Apache-2.0. A scoped scalar-oracle theorem, +not a native sharing construction or a new multiplication exponent. + +## Completed mathematical result + +Replace each centre operation in the complete selected scalar projection by +an unknown common multiplier z. The full boundary transfer F(z) has + + rank F'(1) = 1,152, + rank(F(-1)-F(1)) = 1,152. + +The first statement blocks generic linear half-sharing near z=1. The stronger +second statement only requires a replacement to work for BOTH scalar-oracle +choices +1 and -1. With oracle-independent free maps, any finite fixed causal +linear circuit requires at least1,152 rank-one oracle invocations. Arbitrary +fixed linear recoding, finite workspace and singular clears are permitted. +The result also covers z/z^(-1) according to forward/backward orientation. +A576-query uniform replacement is impossible in this exact class. + +Neither statement proves a recursive-call lower bound for a SINGLE KNOWN native +Fourier operator. Nonlinear/adaptive algorithms, oracle-dependent free maps, +different required outputs and larger-rank primitives are outside the model. +The fixed fourth-power example explicitly shows why a derivative bound cannot +be transferred to a fixed finite-order operator. The secant bound correctly +assigns that example zero two-point rank. + +PROOF.md gives the time-expanded sheaf and derivative argument. SECANT-PROOF.md +gives the stronger discrete theorem. Causality yields the exact formula + + F(z)-I = B (I-(z-1)K)^(-1) (z-1) C. + +The source matrix C is onto the1,152-site space, final-response B is injective, +and feedback K is strictly lower triangular in actual chronological order. +All source/rank facts retain PR2622/2763 credit; causal feedback retains PR2814 +credit. The new implication is the explicit uniform-oracle query bound with +its model-discrimination controls, not rediscovery of the earlier ranks. + +## Source-dependent evidence + +At head6bc9bdb8c5b669597b6808126c5ecff5ac07a9c9 the registered fork workflow passed +all original-source derivative and discrete checks normally and under-O: +https://github.com/Clear1nsight/integer-mult-bounds/actions/runs/39177162360 +The final publication adds frozen SECANT.json, five generic secant tests and +real Git-free/CLI controls. Its exact-head execution is recorded on the PR. + +The programme has144 calls,1,152 centre occurrences,144 paired bridges and +14,336 ordinary outputs. Both C/B ranks are certified at two primes. The +feedback matrix has66,146 nonzero coefficients. Each of two dense dual-number +runs and the separate literal-minus-one run executes all2,835,792 scalar +instructions. The minus-one replay matches all1,152 innovation cuts and all +14,336 output coordinates. Omitting feedback changes14,330 final outputs in +that fixture; inserting a causal cycle is rejected. + +The constant-frame scalar semantics are inherited. Climbs, adapters, idle and +address operations are explicitly projected to identity. Finite dense probes +support code correctness; the written rank/factorisation proofs establish the +all-input scalar conclusions under these hypotheses. + +## Reproduction + +```sh +python3.12 -I -B scripts/research_package.py --package research/centre-causal-tangent +``` + +The standard-library hook executes thirteen generic tests in both modes, both +source-dependent mathematical replays in both modes, then actual Git-free +replays and four command-line corruption controls. RESULT.json and SECANT.json +are strictly compared, without discovery --emit flags. Original sources stay +unchanged. The portable hook checks exported bytes and permission modes. + +Actual selected-archive execution was hosted on Ubuntu24.04.5/CPython3.12.15 +because local DNS was unavailable. Local CPython3.13.5 ran generic tests, not +the original archive. Separate full literal interpreters share the source +parser and assisted author, but not the primary local/bridge update routines. +No spawned agents, independent human or formal proof-kernel review is claimed. + +## Open next questions + +NARROW / COMPLETE for uniform scalar-oracle sharing. A productive native route +must identify a relation specific to the actual fixed operators, not assumed +valid for both scalar signs. Start with one candidate identity, name all +required source/dirty-return/output states and its legal frame interval, then +charge all acquisition, conversion, restoration, hosting and precision costs. +None is supplied here. This is an explicit remaining opportunity, not a claim +that a profitable native programme has been found or that all sharing is closed. + +## Coordination and predecessor credit + +Canonical base20ecf2891d80b5acf18d980b2164fb44ea7faa90, priority revision6, was +refreshed at entry, before packaging and before the discrete refinement. +AGENTS.md, autoresearch.md, CONTRIBUTING.md and the family gate were reread. +Targeted live overlap was checked; complete Discussion/diff coverage was +unavailable. The upstream claim returned403 and was not published. The fork +record is https://github.com/Clear1nsight/integer-mult-bounds/pull/3 . +No main branch, selected frontier, predecessor source or other PR was changed. + +Credit Sagar Thakrar/PR2199 after Adam Gall/PR1918; ywz65/PR2622 and PR2763's +bridge-source audit; Tekalign/PR2814 after Arham Tahir/PR2799; David Charbonneau/ +PR3147; and the selected Rohan Arun/Jeremy Kothe/Hao Yan/Aaron Wang/native/compiler +lineage. PR3151 and PR3194 retain distinct circle/history obstructions. Ross +Richardson's PR3797 independently establishes the prior fixed-block full-kernel +result and is credited alongside Matarener/PR3656; our PR3828 is not repeated. +Classical sheaf theory retains Hansen/Ghrist attribution in PROOF.md. No +literature-wide novelty or new native tariff is claimed. diff --git a/research/centre-causal-tangent/RESULT.json b/research/centre-causal-tangent/RESULT.json new file mode 100644 index 0000000000..8d8a789f52 --- /dev/null +++ b/research/centre-causal-tangent/RESULT.json @@ -0,0 +1 @@ +{"calls":144,"first_variation_rank":1152,"fixed_native_operator_bound_claimed":false,"half_share_576_rejected":true,"literal_dual_probes":[{"derivative_sha256":"4d48dde9bf90092035024c9f11e2458b342955745a7d503a85f35e1d4d88c0d7","nonzero_outputs":14316,"reciprocal":false,"scalar_operations":2835792},{"derivative_sha256":"933c5d14dec11ccaeb0fb3c63629b671974446800e12b562e4fc8dddc4d327ad","nonzero_outputs":14302,"reciprocal":true,"scalar_operations":2835792}],"live":14336,"rank_certificates":{"2147483647":{"response_rank":1152,"source_rank":1152},"2305843009213693951":{"response_rank":1152,"source_rank":1152}},"response_rows_sha256":"10681b41b6b1895a95f893dbf75e01ae164fe7bccb73a346e6c7db154c774e61","scalar_oracle_minimum":1152,"schedule_counts":{"bank_padding_cover_sweep":1,"bridge":144,"idle_cover_sweep":160,"local_cover_sweep":144,"terminal":16,"terminal_Y_translations":16,"translate_every_live_family":1},"schema_version":1,"sites":1152,"source_rows_sha256":"5c44d30669ff6d0abd456d15ae42f26aef21831490198ed7deb3a2dc3123ebca","status":"PASS_CENTRE_CAUSAL_TANGENT"} diff --git a/research/centre-causal-tangent/SECANT-PROOF.md b/research/centre-causal-tangent/SECANT-PROOF.md new file mode 100644 index 0000000000..70d26d5c56 --- /dev/null +++ b/research/centre-causal-tangent/SECANT-PROOF.md @@ -0,0 +1,79 @@ +# A discrete two-point strengthening + +Clear1nsight with substantial OpenAI assistance. Apache-2.0. + +The first-variation theorem requires correctness near z=1. The following +strengthening only requires the same fixed linear programme to work for two +scalar oracles, +1 and -1. It still does NOT prove a lower bound for one fixed +native Fourier operator whose coefficients and identities are known. + +## Causal feedback factorisation + +Use the exact source and final-response matrices C and B from PROOF.md. +Let K map additive centre-output errors at z=1 to later centre-input changes. +In chronological order K is strictly lower triangular, including changes +within a local call. Thus K is nilpotent. This is the same causal feedback +principle used in Tekalign/PR2814, applied here to the full input/output map. + +For centre multiplier z and delta=z-1, the vector e of innovations satisfies + + e = delta (C x + K e). + +Hence, with baseline endpoint F(1)=I, + + F(z)-I = B (I-delta K)^(-1) delta C. + +Since I-delta K is unitriangular, its determinant is one for every scalar delta. +For delta nonzero, its inverse times delta is invertible. B is injective and +C surjective on the1152-dimensional site space. Consequently + + rank(F(z)-I)=1152 for every z != 1. + +In particular rank(F(-1)-F(1))=1152. For the reciprocal forward/backward model, +z=-1 also assigns -1 to every centre, so the same two-point conclusion holds. +More generally the formula uses a diagonal Delta; invertibility requires its +entries nonzero. Only the common -2 case is claimed by the finite certificate. + +## Two-point query-rank theorem + +For two sequences of matrices M_t(-1), M_t(1), the telescoping product identity +expresses F(-1)-F(1) as the sum, over t, of + + P M_(s-1)(-1)...M_(t+1)(-1) + [M_t(-1)-M_t(1)] M_(t-1)(1)...M_0(1) J. + +Thus the rank difference is at most the sum of the gate-difference ranks. +Parameter-independent free maps contribute zero, and a single-register oracle +multiplication by z or its inverse contributes rank one. Any fixed causal linear +circuit correct for both oracle choices therefore needs at least1152 queries. +There is no continuity assumption. Both +1 and -1 satisfy z^4=1, so merely +restricting an otherwise unknown oracle to fourth roots of unity does not +permit generic half-sharing for this endpoint. + +This does not say a fixed known operator needs1152 recursive calls. Known +operator-dependent free maps, different required outputs, nonlinear algorithms, +larger-rank gates and costs outside this scalar query model remain separate. +The z^4 I example in PROOF.md has zero two-point difference and is correctly +NOT rejected by the secant bound, even though its derivative at1 is nonzero. + +## Bound finite checks + +secant.py reconstructs every local feedback row, composes them through the +actual owners and bridges, and verifies strict triangularity in the literal +centre order. It solves e=-2(Cx+Ke) on a dense signed rational fixture, and +compares all1152 innovations and all14336 final outputs against a separately +coded full scalar execution at z=-1. Every2,835,792 scalar instruction remains +present. The generic feedback/resolvent reconstruction and the literal point +interpreter do not share state-update routines. They share the pinned archive, +source parser and the credited mathematical semantics. + +A cycle mutation is rejected. Omitting K must change the actual selected output, +so the feedback control cannot pass by testing an already feed-forward zero K. +The full rank theorem follows from the written factorisation and certified +B/C ranks, not from the single dense fixture. No extra native/source/hosting +premise is discharged. No independent human or proof-kernel review is claimed. + +This is a refinement within the same conditional contract, not a selected +frontier change. Source inputs remain pinned at canonical20ecf289. The second +checkpoint found main unchanged; targeted centre/secant PR search found no +match, which is not exhaustive novelty evidence. diff --git a/research/centre-causal-tangent/SECANT.json b/research/centre-causal-tangent/SECANT.json new file mode 100644 index 0000000000..9a1d65e745 --- /dev/null +++ b/research/centre-causal-tangent/SECANT.json @@ -0,0 +1 @@ +{"changed_outputs":14336,"chronological_order_sha256":"9daeb95e433380bf25baf88b96eb2354af2d8175b998f19072a8f247f7836746","controls":["cyclic_feedback_rejected","missing_feedback_detected"],"feedback_nonzeros":66146,"feedback_sha256":"e27b07bc9ba8023c864535f6b753574dc3fe4b480b1496c5828923d175877ace","fixed_single_native_operator_lower_bound":false,"literal_scalar_operations":2835792,"minimum_uniform_sign_oracle_queries":1152,"minus_one_innovations_sha256":"fa3ab27c0d29b170de18d1698503fa656d5bf5df46f1c2c0927e2387a9616829","minus_one_output_sha256":"aada502e49ded43e41992e95a1a595bf9ad7e9304d20d4b8b791fbfaa9fcd237","omitted_feedback_differing_outputs":14330,"schema_version":1,"secant_rank":1152,"sites":1152,"status":"PASS_CENTRE_TWO_POINT_SECANT"} diff --git a/research/centre-causal-tangent/SOURCES.json b/research/centre-causal-tangent/SOURCES.json new file mode 100644 index 0000000000..8aaccef134 --- /dev/null +++ b/research/centre-causal-tangent/SOURCES.json @@ -0,0 +1 @@ +{"schema_version":1,"base_commit":"20ecf2891d80b5acf18d980b2164fb44ea7faa90","files":[{"path":"certificates/selected-result.json","usage":"provenance","git_blob":"b1fea0c94436b236cc2b7d41a7be032811b94c81","sha256":"bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"},{"path":"docs/research/agent-task-catalog.json","usage":"provenance","git_blob":"67f085acd86acd7d4e03922d9cf4b26bca66fed5","sha256":"47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0"},{"path":"research/community-frontier1094-audit/selected-replay.tar.gz","usage":"input","git_blob":"c24daf067f9c543421d89ca2eeaa4eb78a57fb6f","sha256":"f1da80610bf33c58527f18ad63b4350d0b864e1d4486141ee17ac9bed4d529d6"}]} diff --git a/research/centre-causal-tangent/TASK.json b/research/centre-causal-tangent/TASK.json new file mode 100644 index 0000000000..35b2822189 --- /dev/null +++ b/research/centre-causal-tangent/TASK.json @@ -0,0 +1 @@ +{"schema_version":1,"task_id":"centre-path-sharing","priority_revision":6,"base_commit":"20ecf2891d80b5acf18d980b2164fb44ea7faa90","original_card":{"id":"centre-path-sharing","question":"Can the 64-per-call centre path (eight rank-8 COPY/ERASE totals through the private temporary) be shared across calls or shrunk?","starting_points":["docs/research/research-family-status.md","research/complex-local-word-ceiling/README.md","research/split-centres-global/proofs/PR386-BIT-GEOMETRY.txt","certificates/selected-result.json"],"methods":["Derive a fully charged favorable relaxation for sharing one centre path across k calls, including restoration, hosting and precision.","Prove a lower bound on copied information per call for the selected decoder contract."],"acceptance_gate":"Show the changed centre charge and copy profile per call with every added restoration or hosting cost charged, and its ceiling via ceiling.ceiling(centre=...). A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.","first_step":{"command":["python3","-B","research/complex-local-word-ceiling/verify.py"],"expected":"PASS_COMPLEX_LOCAL_WORD_CEILING","inspect":"Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.","scope":"Positive control and planning budget only; this is not a new construction or full cold replay."},"first_experiment":"Write the per-call centre charge and copy children for sharing across k = 2 calls, charge the sharing overhead, and screen it; stop this route if even the ideal sharing gains under 10%. Ideal budgets: free 2.80x, shared by two 1.90x (levers.py).","bottleneck_link":"The centre path consumes 64 of about 99.6 unpaid coordinates per call, i.e. about 64% of the raw deficit.","allowed_variations":["One sharing pattern across a fixed number of calls.","One reduced copied-total contract for the existing decoder.","If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope."],"scope_change_triggers":["Removing copies without a replacement contract for the decoder's copied totals.","Continuing a partial cost improvement while leaving the same unpriced consumer, restoration or central-readout obligation unresolved; refresh the family expansion decision first. Local product-retiming evidence has a narrow scope and is not a ban on changed graphs or contracts."],"overlap_terms":["centre path","copied totals","private temporary","shared centre","batching"]},"scope_status":"changed","actual_scope":"Complete projected boundary derivative and discrete secant rank gates against uniform causal linear scalar-oracle sharing, with fixed-native-operator limitations.","scope_change_reason":"User assigned temporal sheaves. Combining credited source/response ranks with causal product differences closes a generic half-sharing contract; it does not imply a fixed native Fourier lower bound.","bottleneck_link":"Separates generic recoding, which cannot halve the oracle calls, from genuinely fixed-operator native opportunities.","budget_minutes":null,"stop_rule":"Conclude the scalar-oracle gate and source checks; no native implementation expansion without an operator-specific identity and favourable complete bill.","outcome":"completed","evidence":"Run39177162360 at head6bc9bdb8c5b669597b6808126c5ecff5ac07a9c9 passed normal and optimised derivative and secant replays. Both source and response ranks are1152; feedback has66146 coefficients; all1152 cuts and14336 minus-one outputs match a literal2835792-instruction replay. Missing feedback changes14330 outputs. This publication freezes both receipts and adds generic secant and Git-free/CLI checks; final evidence is recorded on the PR.","author":"Clear1nsight","ai_assistance":"Substantial OpenAI assistance, separate literal implementations; no spawned agents, independent human or formal-kernel review.","open_questions":[{"question":"Can a relation specific to the actual fixed native operators realise cheaper sharing?","why_it_matters":"A fixed known operator need not satisfy the uniform scalar-sign contract.","first_step":"Specify one native identity with all required dirty-input/output/frame/return conditions and complete costs before constructing a sharing circuit.","blocked_by":"No qualifying native identity, priced acquisition/restoration or full supplier invoice is supplied."}],"coordination":{"canonical_main":"20ecf2891d80b5acf18d980b2164fb44ea7faa90","priority_revision":6,"checkpoint":"Canonical API refreshed at entry, packaging and before discrete strengthening, unchanged; frozen inputs preserved.","overlap":"Relevant PR2622/2763/2814/3147/3754/3797/3828 inspected and targeted secant search found no match. Full Discussion/diff coverage unavailable; no novelty guarantee.","claim":"Upstream combined claim write rejected403, not published and no reservation.","fork_pr":"https://github.com/Clear1nsight/integer-mult-bounds/pull/3","preservation":"Only isolated package changes; no main, selected record or predecessor edits."},"family_gate":{"decision":"narrow","status":"uniform scalar-oracle result complete","proved":"Scoped derivative/secant query-rank theorem with source-derived ranks and causal coefficients.","unknown":"Fixed native sharing, physical access, frames, precision, dirty restoration, hosting and full recursive invoice."}} diff --git a/research/centre-causal-tangent/VERIFY.json b/research/centre-causal-tangent/VERIFY.json new file mode 100644 index 0000000000..533246ae97 --- /dev/null +++ b/research/centre-causal-tangent/VERIFY.json @@ -0,0 +1 @@ +{"schema_version":1,"status":"ready","python":"3.12","requirements":[],"inputs":["research/community-frontier1094-audit/selected-replay.tar.gz"],"commands":[{"argv":["{python}","-I","-B","{package}/test_tangent.py"],"timeout_seconds":30,"checks":"Eight generic derivative theorem/boundary controls."},{"argv":["{python}","-I","-B","{package}/test_secant.py"],"timeout_seconds":30,"checks":"Five exact two-point product, feedback and boundary controls, including28 noncommuting words."},{"argv":["{python}","-I","-O","-B","{package}/test_secant.py"],"timeout_seconds":30,"checks":"Five two-point controls under optimisation."},{"argv":["{python}","-I","-B","{package}/verify.py"],"timeout_seconds":180,"checks":"Source-dependent derivative certificate and complete dual replays matching the committed result."},{"argv":["{python}","-I","-O","-B","{package}/verify.py"],"timeout_seconds":180,"checks":"Optimised derivative replay matching the same committed result."},{"argv":["{python}","-I","-B","{package}/secant.py"],"timeout_seconds":120,"checks":"Exact causal feedback and all literal minus-one cuts/outputs matching the committed secant receipt."},{"argv":["{python}","-I","-O","-B","{package}/secant.py"],"timeout_seconds":120,"checks":"Optimised discrete source-dependent replay matching the same committed receipt."},{"argv":["{python}","-I","-B","{package}/publication.py"],"timeout_seconds":300,"checks":"Actual Git-free optimised derivative and secant replay, four real CLI rejections, unchanged exported bytes and modes."}]} diff --git a/research/centre-causal-tangent/publication.py b/research/centre-causal-tangent/publication.py new file mode 100644 index 0000000000..98e5fa52fc --- /dev/null +++ b/research/centre-causal-tangent/publication.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Actual Git-free derivative/secant replay and CLI corruption controls. + +Clear1nsight with substantial OpenAI assistance. Only isolated copies change. +This is portability and rejection evidence, not native supplier admission. +""" +from hashlib import sha256 +from pathlib import Path +import json +import os +import shutil +import stat +import subprocess +import sys +import tempfile + +HERE=Path(__file__).resolve().parent +ROOT=HERE.parents[1] +ARCHIVE='research/community-frontier1094-audit/selected-replay.tar.gz' + + +def need(ok,message): + if not ok: raise ValueError(message) + + +def inventory(root): + return {str(p.relative_to(root)):[sha256(p.read_bytes()).hexdigest(),stat.S_IMODE(p.stat().st_mode)] + for p in sorted(root.rglob('*')) if p.is_file()} + + +def execute(package,env,script,success,reason=None): + run=subprocess.run([sys.executable,'-I','-O','-B',str(package/script)],cwd=package.parents[1], + env=env,capture_output=True,text=True,timeout=150) + if success: + need(run.returncode==0,'portable replay failed: '+run.stderr[-2000:]) + prefix='RESULT_JSON=' if script=='verify.py' else 'SECANT_JSON=' + lines=[line[len(prefix):] for line in run.stdout.splitlines() if line.startswith(prefix)] + need(len(lines)==1,'one substantive portable receipt') + raw=json.dumps(json.loads(lines[0]),sort_keys=True,separators=(',',':')).encode() + return sha256(raw).hexdigest() + need(run.returncode!=0 and reason in run.stderr,'CLI mutation did not fail at the expected guard') + return None + + +def main(): + need((ROOT/ARCHIVE).is_file(),'original archive required') + with tempfile.TemporaryDirectory(prefix='causal-portable-') as tmp: + root=Path(tmp); package=root/'research'/HERE.name + shutil.copytree(HERE,package,ignore=shutil.ignore_patterns('__pycache__','*.pyc')) + source=root/ARCHIVE; source.parent.mkdir(parents=True,exist_ok=True); shutil.copy2(ROOT/ARCHIVE,source) + env=dict(os.environ,PATH='',PYTHONDONTWRITEBYTECODE='1') + need(not (root/'.git').exists() and shutil.which('git',path='') is None,'Git unavailable') + before=inventory(root) + hashes={script:execute(package,env,script,True) for script in ('verify.py','secant.py')} + need(before==inventory(root),'portable replay changed exported bytes or modes') + for filename,script,reason in (('RESULT.json','verify.py','typed result mismatch'), + ('SECANT.json','secant.py','typed secant receipt differs')): + path=package/filename; saved=path.read_bytes(); value=json.loads(saved) + need(value['schema_version']==1,'version-one scientific receipt') + value['schema_version']=True; path.write_text(json.dumps(value)) + try: execute(package,env,script,False,reason) + finally: path.write_bytes(saved) + held=source.with_name(source.name+'.held'); source.rename(held) + try: execute(package,env,'verify.py',False,'regular selected archive') + finally: held.rename(source) + with source.open('r+b') as stream: + first=stream.read(1); stream.seek(0); stream.write(bytes([first[0]^1])) + try: execute(package,env,'verify.py',False,'selected archive hash') + finally: shutil.copy2(ROOT/ARCHIVE,source) + need(before==inventory(root),'corruption controls failed to restore their private copies') + print('PASS_GIT_FREE_CAUSAL_PUBLICATION files='+str(len(before))+' cli_rejections=4 bytes_and_modes_unchanged=true') + print('PUBLICATION_RECEIPTS='+json.dumps(hashes,sort_keys=True)) + + +if __name__=='__main__': main() diff --git a/research/centre-causal-tangent/secant.py b/research/centre-causal-tangent/secant.py new file mode 100644 index 0000000000..c7163925a2 --- /dev/null +++ b/research/centre-causal-tangent/secant.py @@ -0,0 +1,155 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Exact two-point gate on scalar oracles +1 and -1, not one fixed native F. + +Clear1nsight, substantial OpenAI assistance. Causal feedback formula retains +Tekalign/PR2814 attribution. Main input/response ranks retain PR2622/2763 credit. +""" +from fractions import Fraction as Q +from hashlib import sha256 +from pathlib import Path +import argparse +import json +import types + +HERE=Path(__file__).resolve().parent +v=types.ModuleType('tangent_source'); v.__file__=str(HERE/'verify.py') +exec(compile((HERE/'verify.py').read_bytes(),v.__file__,'exec'),v.__dict__) + + +def local_feedback(program): + state={('L',i):{} for i in range(704)}; rows={}; order=[] + for e in program: + if e[0]=='scalar': + op=e[1]; kind,d=op[0],tuple(op[1]) + if kind=='clear': state[d]={} + elif kind=='copy': state[d]=dict(state[tuple(op[2])]) + elif kind=='scale': state[d]={k:x*Q(op[2],op[3]) for k,x in state[d].items()} + elif kind=='add': v.axpy(state[d],state[tuple(op[2])],Q(op[3],op[4])) + else: raise ValueError('unknown feedback scalar') + elif e[0]=='center': + k=e[1]; v.need(k not in rows,'unique feedback site') + rows[k]=dict(state['C',k]); order.append(k); v.axpy(state['C',k],{k:Q(1)}) + else: v.need(e[0] in v.LOCAL_SKIP,'feedback local event') + v.need(set(order)==set(range(8)),'feedback sites complete') + return rows,order + + +def feedback(data): + calls,_=v.bind(data) + local={o:v.local_model(data['program'][o]) for o in ('forward','backward')} + lf={o:local_feedback(data['program'][o]) for o in local} + state=[{} for _ in range(14336)]; K=[None]*1152; actual_order=[]; used=0 + for e in data['global']['execution_schedule']: + kind=e['kind'] + if kind=='local_cover_sweep': + c=calls[v.call_key(e)]; owners=[x[0] for x in c['owners']]; o=c['orientation'] + queries,_,impulses=local[o]; within,order=lf[o] + for k in order: + i=8*used+k; row={} + for r,q in queries[k].items(): v.axpy(row,state[owners[r]],q) + v.axpy(row,{8*used+j:q for j,q in within[k].items()}) + K[i]=row; actual_order.append(i) + for p in range(112): + d,s,q=(112+p,p,1) if o=='forward' else (p,112+p,-1) + v.axpy(state[owners[d]],state[owners[s]],Q(q)) + for r,row in enumerate(impulses): v.axpy(state[owners[r]],{8*used+k:q for k,q in row.items()}) + used+=1 + elif kind=='bridge': v.bridge((state,),e) + elif kind=='terminal': + for pair in range(4): + for p in range(112): + x=896*e['replica']+224*pair+p; y=x+112 + state[x],state[y]=state[y],{k:-q for k,q in state[x].items()} + else: v.need(kind in v.SKIP,'feedback global event') + triangular(K,actual_order) + return K,actual_order + + +def triangular(K,order): + v.need(sorted(order)==list(range(len(K))),'complete chronological permutation') + position={i:k for k,i in enumerate(order)} + v.need(all(row is not None and all(position[j]=0,'binary frame vector') + while value: + p=value.bit_length()-1 + if p not in basis: basis[p]=value; break + value ^= basis[p] + return len(basis) + + +def validate_family_rows(rows,m=73,unpaid=1): + need(type(unpaid) is int and unpaid>=0,'integer unpaid coordinate count') + for family,k,hosted,idle in rows: + need(all(type(x) is int and x>=0 for x in (family,k,hosted,idle)),'nonnegative family ledger') + need(8*k+hosted+idle+unpaid==m,'family coverage mismatch at '+str(family)) + + +def aggregate_mass(rows,centres): + return sum(8*k+h+i for f,k,h,i in rows)+centres + + +def run(data): + t,word,program=data['global'],data['word'],data['program'] + W,m,N=t['live'],t['m'],len(t['calls']) + need((W,m,N)==(14336,73,144),'selected dimensions') + need(len(t['local_providers'])==1,'one provider') + (pid,provider),=t['local_providers'].items() + v,R,widths=provider['v'],provider['R'],provider['widths'] + need(v==112 and len(widths)==R and 2*v+R==704,'selected provider arity') + frame_ranks=[binary_rank(f) for f in word['frames']] + increments=[frame_ranks[b]-frame_ranks[a] for a,b in zip(word['start'],word['final'])] + need(len(increments)==704 and increments[:224]==[8]*224,'data boundary increments') + need(increments[224:]==widths,'helper boundary widths') + local_profiles={} + centre_counts={} + for orientation in ('forward','backward'): + events=program[orientation] + prof=Counter(e[5] for e in events if e[0]=='climb' and e[5]>0) + centres=[e[4] for e in events if e[0]=='center'] + need(centres==[8]*8,'eight rank-eight centre occurrences') + need(sum(r*n for r,n in prof.items())==sum(increments),'ordinary climb mass equals endpoints') + prof.update(centres); local_profiles[orientation]=dict(sorted(prof.items())); centre_counts[orientation]=sum(centres) + need(local_profiles['forward']==local_profiles['backward'],'both local orientation invoices') + profile=local_profiles['forward']; local_mass=sum(r*n for r,n in profile.items()) + need(local_mass==5586,'selected local mass') + data_inc=Counter(); hosts=Counter(); call_slots=Counter(); call_counts=Counter() + for call in t['calls']: + need(call['provider_id']==pid,'provider dispatch') + need(call['local_program_sha256']==digest(program[call['orientation']]),'call/program binding') + owners=call['owners']; need(len(owners)==704 and len({o[0] for o in owners})==704,'owner injectivity') + call_counts[call['replica']]+=1 + for role,(family,route) in enumerate(owners): + need(0<=family0); mutant[at][3]-=1 + if label.startswith('moved'): mutant[(at+1)%W][3]+=1 + try: validate_family_rows(mutant,unpaid=unpaid) + except ValueError: controls.append(label) + else: raise ValueError('coverage mutant accepted') + return {'schema_version':1,'status':'PASS_SELECTED_FAMILY_COVERAGE_BOUNDARY','live':W,'calls':N,'m':m,'helper_roles':R, + 'data_step':8,'helper_width_mass':sum(widths),'local_profile':{str(k):v for k,v in profile.items()}, + 'local_mass':local_mass,'actual_paid_mass':total,'ordinary_paid_mass':total-centre_mass,'private_centre_mass':centre_mass, + 'actual_deficit':m*W-total,'idle_mass':sum(idle.values()),'idle_histogram':{str(k):v for k,v in sorted(idle_hist.items())}, + 'families_with_exactly_one_unpaid':W,'counterfactual_two_unpaid_failures':failed_two, + 'family_ledger_sha256':digest(rows),'residual_sha256':digest(residual),'grouping_controls':groups, + 'two_unpaid_target_mass':71*W+centre_mass,'extra_ordinary_mass_change_required':W, + 'two_unpaid_hypothetical_idle':hypothetical_idle,'pooled_partition':{'51':q,str(r):1}, + 'per_call_unpaid_two_idle':str(Fraction(hypothetical_idle,N)), + 'centre_free_vs_two_unpaid_mass_gap':W-centre_mass,'controls_rejected':controls, + 'changed_decoder_impossibility_claimed':False,'no_new_kappa':True} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__); parser.add_argument('--root',type=Path,default=ROOT) + parser.add_argument('--emit',action='store_true',help='Discovery output; skips committed receipt equality') + args=parser.parse_args() + result=run(load(args.root)); expected=HERE/'RESULT.json' + if not args.emit: + need(expected.is_file() and not expected.is_symlink(),'missing regular committed result') + need(canon(json.loads(expected.read_bytes()))==canon(result),'typed result mismatch') + print('RESULT_JSON='+canon(result).decode()); print(result['status']) + + +if __name__=='__main__': main()