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-sheaf-fibre/PROOF.md b/research/centre-sheaf-fibre/PROOF.md new file mode 100644 index 0000000000..f676ac48ed --- /dev/null +++ b/research/centre-sheaf-fibre/PROOF.md @@ -0,0 +1,193 @@ +# Exact full kernel on the 4,080-owner block + +Clear1nsight, with substantial OpenAI assistance. Apache-2.0. + +This is a scalar-information theorem for the inherited selected calls-0/4 +observation model. It is not a native programme, physical sharing construction, +recursive tariff, or multiplication theorem. The finite premises below were +reconstructed in fork-hosted CPython 3.12.15 runs at scientific head +`403ef45de40e41baaf8b1f4cfddaf3ba1d57af1c`. The original source archive and +predecessor implementations are unchanged. + +## 1. Fixed observation contract + +Let R be the selected 8-by-112 rational reader matrix and let rho_p be its +112 involutory owner routes. The complete routes act on 73 binary coordinates; +they preserve a 17-coordinate active space and fix 56 spectators. Computation +on the active block is therefore faithful, not a projection that identifies +otherwise different routes. + +Set a=0, b=6, c=85 and + + H = . + +Arrays x(g,p) are arbitrary rational scalars on H times the 112 ports, and +are extended by zero to all other owners. The two observations are + + Sx(g) = sum_p R_p x(g,p), + 4Tx(z) = sum_p R_p x(z rho_p,p). + +Here R_p is a column. Every touched output owner z is retained, including +owners outside H. Dropping those output equations changes the problem. +The inherited source slice and common-frame/constant-payload interpretation +remain assumptions of its physical application. No statement about arbitrary +704-field native states or the complete chronological word follows. + +The separately reconstructed finite premises are + +* |H|=4,080 and rank_Q(R)=8. +* R_a-R_b-R_c=0, and these three columns have rank two. +* The right cosets H rho_p partition the ports into the single class + {0,6,85} and 109 singleton classes. Every singleton column is nonzero. +* The undirected compatibility graph on H, with right multiplications by + rho_a rho_b and rho_a rho_c, is connected. It has 8,160 edges and a + certified 4,079-edge spanning tree. + +The primary certificate checks all 112^2 ordered coset comparisons, using +binary column matrices and rational ranks. The second implementation uses +its own archive parser, forward coefficient propagation, binary row matrices, +left-generated group closure, and nonzero minors modulo 101. Integrality of R +is checked before the modular rank test. A nonzero minor modulo 101 proves +the corresponding rational lower rank; the displayed exact relation gives +the matching upper rank for the triple. + +## 2. Coset elimination theorem + +For involutions, H rho_p=H rho_q exactly when rho_p rho_q belongs to H. +The coordinates contributing to an output z belong to a single such class. +For a class C, an output equation has the form + + R_C (x(z rho_p,p))_{p in C} = 0. + +If R_C has independent columns, all its incoming coordinates vanish. Every +source coordinate x(g,p) appears at the output z=g rho_p, so this eliminates +that entire port class, not just one output sample. + +For the selected H, 109 singleton classes consequently eliminate +109*4,080=444,720 variables. The only possible nonzero coordinates are those +on ports a,b,c. The source equations then force, uniquely at each g, + + (x(g,a),x(g,b),x(g,c)) = alpha(g) (1,-1,-1). + +At z=g rho_a, the remaining output equation is + + R_a alpha(g) + - R_b alpha(g rho_a rho_b) + - R_c alpha(g rho_a rho_c) = 0. + +Independence of R_b and R_c forces all three amplitudes to agree. Connectivity +makes alpha constant on H. Conversely, any constant amplitude satisfies every +source and output equation. Thus, with v equal to (1,-1,-1) on these three +ports at every owner of H and zero elsewhere, + + ker(S) intersect ker(T) = Q v. + +This establishes the FULL 112-port kernel. The predecessor's existence of v +and its single-triple census alone did not establish this equality. Merely +checking which individual routes lie in is insufficient; +the outgoing right-coset comparisons are the essential additional test. + +## 3. Cellular sheaf interpretation + +Take the bipartite graph of source owners and touched output owners, with a +port edge from g to g rho_p. Give source vertices stalk ker(R), an output +vertex in class C stalk ker(R_C), and every edge stalk Q. Restriction maps +are the corresponding coordinate maps. A global section is exactly a choice +of all x(g,p) satisfying both observation equations. + +The independent output stalks are zero. Eliminating their incident coordinates +reduces every remaining source and output stalk to the same one-dimensional +triple relation. Dividing each nonzero restriction by its relation coefficient +makes edge compatibility ordinary equality. The reduced graph is connected, +so its global sections form one copy of Q. + +Equivalently, eliminating output amplitudes leaves the constant sheaf on the +4,080-vertex compatibility graph. Its zeroth cohomology has dimension one. +This is a local-to-global calculation, not a claim that scalar consistency +certifies chronological access, native phases, or a physical implementation. +No assertion about higher cohomology of the unreduced sheaf is needed. + +## 4. Sharp information dimension and proper subblocks + +There are 112*4,080=456,960 scalar variables. S has rank 8*4,080=32,640, hence +its kernel has dimension 424,320. The theorem gives + + rank(T restricted to ker(S)) = 424,319, + rank(stack(S,T)) = 456,959. + +Suppose extra LINEAR observations L allow recovery of all T from (S,L), even +by an otherwise arbitrary nonlinear decoder. Equal (S,L) observations must +give equal T, so ker(S) intersect ker(L) is contained in ker(T). Rank-nullity +on ker(S) therefore requires at least 424,319 additional scalar observations. +A linear quotient of ker(S) by Qv attains that count abstractly. This existence +statement supplies neither an efficient decoder nor a recursive cost. + +For every proper subset B of H, extend a supported common-kernel vector by +zero to H. It must equal t v. Since v is nonzero at every owner of H and B +omits at least one owner, t=0. Therefore all proper subblocks have zero common +kernel and require 104|B| additional linear observations under the same +whole-output contract. The result also holds on left translates of H. +It does not decide equally sized arbitrary owner sets, unions of several +cosets, other triples' subgroups, or the global support minimum. + +## 5. Primitive integer fibres and their limitation + +R is integral. Stack S and 4T into an integer matrix A. Since v has a coordinate +one, every integer vector in its rational kernel is an integer multiple of v. +Thus ker_Z(A)=Zv. Every nonempty nonnegative integer fibre is precisely + + {n0+t v : t is an integer and lower <= t <= upper}, + lower = max_{v_i=1}(-n0_i), + upper = min_{v_i=-1}(n0_i). + +All zero coordinates of v remain fixed. Unit moves by v and -v connect this +interval, so {v} is a Markov basis, with both move directions permitted. +For the polynomial-to-Laurent-monomial map specified by A, the toric ideal +is principal, generated by z^(v+) - z^(v-). Indeed, every integer kernel +relation is t v, and a difference of positive integer powers factors by that +binomial. This is classical rank-one lattice-ideal reasoning. + +The primitive move has 4,080 positive and 8,160 negative unit entries, hence +support 12,240 and sum(v)=-4,080. Adding a fixed total-count row therefore +kills the kernel over Q and Z. More generally, an extra linear resource row +w retains it exactly when w*v=0. This explicitly prevents interpreting an +information-preserving coefficient move as a free legal scheduling move. +No operation-count, ownership, or conservation constraint is silently dropped. +These fibre moves preserve both observations at each move. A physical programme +may temporarily leave the fibre and later restore its outputs; such programmes +are not excluded by this integer statement. + +## 6. Decision, evidence, and credit + +The known witness spans all invisible directions on this fixed block. Its +abstract information saving is exactly one out of 424,320 coordinates, not +an unexplored large family of savings. No recursive child is shown removable. +The decision is NARROW and COMPLETE for this information question. A larger +construction requires a named changed block or consumer, actual returned-state +contract, and a favourable fully charged cost screen before expansion. + +The source-dependent primary and independent implementations passed normally +and under -O on GitHub's fork-hosted Ubuntu 24.04.5 / CPython 3.12.15 runner. +The source archive, both relevant member hashes, query ordering, H=R/4, +faithful active restriction, coset partition, and graph premises were checked. +The independent direct residual calculation checks all 4,080 touched outputs +of v and detects exactly three failures when one owner is removed. Eight +small-group tests cover full matrices, all six nonempty proper subblocks, +512 binary coefficient assignments, signs, routes, and the total-count row. +These are separate same-author implementations, not independent human review. +The committed receipt hook additionally compares typed results and rejects +receipt/JSON mutations. Its final publication replay is recorded on the PR. + +Credit Matarener/#3656 for the subgroup and witness; David Charbonneau/#3147 +for the investigation; Ross Richardson/#3071 for the model and extractor; +Sagar Thakrar/#3291 and Sudarsh Chaturvedi/#3168 for the corrected graph/census +lineage; ywz65 and Aaron Wang/navinor for the observation/centre lineage; and +all original selected-source notices. The earlier circle-elision proposals +are not reopened; #3151 and #3194 retain their distinct obstruction credit. + +The mathematical formulation uses established theory from Jakob Hansen and +Robert Ghrist, Toward a spectral theory of cellular sheaves, Journal of Applied +and Computational Topology 3 (2019), 315-358, DOI 10.1007/s41468-019-00038-7; +and Persi Diaconis and Bernd Sturmfels, Algebraic algorithms for sampling from +conditional distributions, Annals of Statistics 26(1) (1998), 363-397, +DOI 10.1214/aos/1030563990. No literature-wide novelty is claimed. diff --git a/research/centre-sheaf-fibre/README.md b/research/centre-sheaf-fibre/README.md new file mode 100644 index 0000000000..2c8168eee3 --- /dev/null +++ b/research/centre-sheaf-fibre/README.md @@ -0,0 +1,109 @@ +# Full centre kernel through sheaves and integer fibres + +A source-bound contribution to the #3147 investigation, answering the fixed +4,080-owner full-kernel question in Matarener's #3656. Clear1nsight, with +substantial OpenAI assistance. Apache-2.0. + +## Result + +For the exact subgroup H generated by the even route products on ports +(0,6,85), the common kernel of the old and routed later observations on ALL +112 ports is exactly one-dimensional. Its sole primitive integer generator +is the already known (1,-1,-1) triple repeated at every owner. What is new is +the full-kernel classification, the sharp information count for this block +and all its proper subblocks, and the primitive integer-fibre description. + +The local-to-global reduction replaces a 456,960-variable kernel problem with +109 independent outgoing port classes and one connected 4,080-vertex constant +sheaf. It certifies 424,319 additional linear observations as necessary and +sufficient ABSTRACTLY, given the old observations. Every proper subblock of H +still requires 104 observations per owner. Arbitrary equally sized owner sets +are outside this theorem. + +The integer fibre is a one-parameter interval connected by one primitive move. +That move touches 12,240 coefficients and changes their sum by -4,080. An +additional fixed-count constraint destroys it. Thus algebraic statistics does +not turn this information identity into a free physical schedule. + +See PROOF.md for the full hypotheses and argument, and RESULT.json for the +exact certificate. No scalar information count is called a recursive tariff. + +## Evidence and reproduction + +The unmodified mathematical kernels at head +403ef45de40e41baaf8b1f4cfddaf3ba1d57af1c passed the actual registered workflow on +Ubuntu 24.04.5 / CPython 3.12.15, including normal and optimised source-dependent +primary and independent replays, all eight generic tests, and unchanged input +checks. The run is +https://github.com/Clear1nsight/integer-mult-bounds/actions/runs/39165978787 . +The scientific head and its synthetic PR-merge checkout are distinguished in +the run logs. Later publication checks are recorded on the fork PR. + +The primary reuses the pinned PR3071 reverse-covector source extractor and +uses rational elimination and binary column products. The second imports no +primary or predecessor executable, parses the archive itself, propagates +coefficients forward, uses binary row products and modular minors, and directly +checks all routed witness residuals. Both reconstruct identical geometry with +SHA256 79515573d8231a59ece664a2ec421983989c9925e1ccab1ca4c71c7cfa3ea2be. + +From a repository checkout with the two pinned inputs present, run + +```sh +python3.12 -I -B scripts/research_package.py --package research/centre-sheaf-fibre +``` + +The registered hook runs the eight small-group tests normally and under -O, +then two fresh-source implementations and committed typed-receipt checks in +both modes. It uses only the standard library. Direct source-dependent replay +is also available through `receipt_check.py`. The explicit `--controls-only` +option tests JSON/receipt fixtures and does NOT claim source verification. + +The direct primary and independent `--geometry` paths accept an explicitly +labelled derived export; they do not pretend to re-extract the archive. The +registered committed-receipt hook requires both actual archive paths instead. + +## Scope and stopping decision + +This is an exact rational scalar theorem under the inherited selected calls-0/4 +observation contract, not a native payload or full chronological programme. +Physical frames, acquisition, dirty-state restoration, precision, ownership, +hosting, and the complete supplier invoice remain unproved here. No paid child +is deleted and the selected frontier is unchanged. No human or formal proof +kernel has independently accepted this theorem. The two implementations share +the same archived mathematical source and author. + +Decision NARROW / COMPLETE. The full kernel on this H is settled, so another +search for more directions inside the same block is not justified. Any new +physical investigation needs a changed contract and a complete cost gate. + +## Open next questions + +1. Can a union of distinct H cosets introduce additional dependent outgoing + classes and a materially larger kernel? First prove a changed coset + incidence and compute its compatibility rank. Do not infer it from this + one-block result, or count a scalar coordinate as a saved child. +2. Does a named downstream consumer permit a weaker observation than the + whole later-query field? State every required output, allowed source read, + and restoration condition before constructing a quotient. +3. Can a useful integer move preserve the actual resource rows of such a + caller? First specify those rows and test w*v=0. The fixed-count row fails + for the present move, so no scheduling claim is made. + +## Provenance, overlap, and publication status + +Canonical scientific base 20ecf2891d80b5acf18d980b2164fb44ea7faa90, priority +revision 6. Both live input pins are ancestral. Frozen sources are untouched. +Relevant current PRs were read and targeted searches performed; complete +Discussion and arbitrary-diff coverage is not established. Upstream claim and +PR writes were rejected by the connected integration with HTTP 403. The public +fork contribution is https://github.com/Clear1nsight/integer-mult-bounds/pull/1 . +It is not an upstream submission. Neither upstream nor fork main was changed. + +Matarener/#3656 retains subgroup/witness credit; dcharb78/#3147 retains the +research question; Ross Richardson/#3071 retains the observation model and +extractor; Sagar Thakrar/#3291 and Sudarsh Chaturvedi/#3168 retain their corrected +graph/census work. Credit ywz65, Aaron Wang/navinor, and the retained selected +native, geometry, and compiler lineage. #3151/#3194's circle obstructions are +not repeated as new. Hansen/Ghrist and Diaconis/Sturmfels retain classical +sheaf and Markov-basis credit. Full references and qualifications are in +PROOF.md. No separate agent, human, or formal-kernel review is claimed. diff --git a/research/centre-sheaf-fibre/RESULT.json b/research/centre-sheaf-fibre/RESULT.json new file mode 100644 index 0000000000..b7a0c92d96 --- /dev/null +++ b/research/centre-sheaf-fibre/RESULT.json @@ -0,0 +1,41 @@ +{ + "active_dimension": 17, + "additional_linear_observations_required": 424319, + "class_size_histogram": { + "1": 109, + "3": 1 + }, + "compatibility_edges": 8160, + "compatibility_vertices": 4080, + "constant_count_constraint_kills_kernel": true, + "deficient_coset_classes": [ + { + "ports": [ + 0, + 6, + 85 + ], + "rank": 2 + } + ], + "full_joint_kernel_dimension": 1, + "full_variables": 456960, + "geometry_sha256": "79515573d8231a59ece664a2ec421983989c9925e1ccab1ca4c71c7cfa3ea2be", + "independent_dropped_owner_nonzero_outputs": 3, + "independent_nonzero_later_residuals": 0, + "independent_old_rank_mod101": 8, + "old_kernel_dimension": 424320, + "old_rank": 32640, + "owners": 4080, + "ports": 112, + "primitive_move_negative_entries": 8160, + "primitive_move_positive_entries": 4080, + "primitive_move_support": 12240, + "right_coset_class_count": 110, + "right_coset_classes_sha256": "af7b54230d4fd047858c9c6879fdf0d39249d725a61823a84fff8d6a73e982d3", + "schema_version": 1, + "spanning_tree_edges": 4079, + "spanning_tree_sha256": "0e821c4c81b3ae01dcee422e4c70e1ece3dbae908ae7ee9b8f77f82ef643e400", + "status": "PASS_CENTRE_SHEAF_COMMITTED_RECEIPT", + "subgroup_sha256": "edded9e0dcd065d7dfb9a5ece868f1777f9030ae14e3ea0adea060bccba90cc0" +} diff --git a/research/centre-sheaf-fibre/SOURCES.json b/research/centre-sheaf-fibre/SOURCES.json new file mode 100644 index 0000000000..46fa01a11f --- /dev/null +++ b/research/centre-sheaf-fibre/SOURCES.json @@ -0,0 +1,10 @@ +{ + "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/centre-block-repair-information/independent.py", "usage": "input", "git_blob": "d2db50ec7a595b1a1a87b7843fd5ca043c43fd25", "sha256": "b298ff3902c14db11e4ed057259785efc185e8ae3bb39c0d1c432e2340ceb4ea"}, + {"path": "research/community-frontier1094-audit/selected-replay.tar.gz", "usage": "input", "git_blob": "c24daf067f9c543421d89ca2eeaa4eb78a57fb6f", "sha256": "f1da80610bf33c58527f18ad63b4350d0b864e1d4486141ee17ac9bed4d529d6"} + ] +} diff --git a/research/centre-sheaf-fibre/TASK.json b/research/centre-sheaf-fibre/TASK.json new file mode 100644 index 0000000000..442f3620d8 --- /dev/null +++ b/research/centre-sheaf-fibre/TASK.json @@ -0,0 +1,36 @@ +{ + "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": "User-assigned sheaf and integer-fibre continuation of PR3147, proving the full 112-port common kernel on PR3656's fixed 4080-owner subgroup, its proper-subblock observation dimension, and primitive integer fibres.", + "scope_change_reason": "PR3151 and PR3194 already constrain simple circle elision. PR3656 supplies the explicit subgroup and one witness but leaves the full kernel open. Coset elimination and sheaf compatibility close that different information obligation.", + "bottleneck_link": "The full block has exactly one invisible direction, not hidden additional sharing capacity. The theorem prevents counting a coefficient-fibre identity as a free physical or recursive operation.", + "budget_minutes": null, + "stop_rule": "Complete the fixed-block kernel theorem and source certificates. Do not expand into new blocks or physical construction without a changed contract and favourable fully charged cost gate.", + "outcome": "completed", + "evidence": "At scientific head 403ef45de40e41baaf8b1f4cfddaf3ba1d57af1c, fork workflow39165978787 completed both archive-dependent implementations normally and under -O, eight generic tests, and unchanged-input checks on Ubuntu24.04.5/CPython3.12.15. It certified110 coset classes (109 singletons and one rank-two triple), graph rank4079, full common kernel dimension1, and424319 additional observations. Publication adds RESULT.json and fresh typed receipt comparison; final exact-head replay is recorded on the PR.", + "author": "Clear1nsight", + "ai_assistance": "Substantial OpenAI assistance in proof, both implementations, tests and writing. Separate code paths share the author and archived source; no separate agent, independent human, or formal-kernel acceptance claimed.", + "open_questions": [ + {"question": "Can a union of distinct H cosets give a materially larger kernel?", "why_it_matters": "The same single block has no further directions; an enlarged incidence is a genuinely changed premise.", "first_step": "Specify the union, partition its outgoing classes, and compute all compatibility ranks before any physical search.", "blocked_by": "A new incidence theorem and a favourable complete cost gate are absent."}, + {"question": "Does an actual consumer permit a weaker observation than the whole later-query field?", "why_it_matters": "This changes the information contract behind the sharp lower count.", "first_step": "Name all required outputs, source reads, and dirty-state restoration conditions.", "blocked_by": "No qualifying physical caller is supplied."}, + {"question": "Can a useful primitive move preserve the actual resource rows of a changed caller?", "why_it_matters": "The present move changes total count by -4080, so fibre connectivity is not a scheduling certificate.", "first_step": "Specify the resource rows w and test w*v=0 before constructing transitions.", "blocked_by": "No operation-count, ownership, or chronological resource model is supplied."} + ], + "coordination": {"assigned_pr": 3147, "specific_predecessor_pr": 3656, "specific_predecessor_head": "69e745992b966c647e10696b980cb4c96d7ebeed", "canonical_main": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", "fork_pr": "https://github.com/Clear1nsight/integer-mult-bounds/pull/1", "overlap": "Relevant live PRs and targeted sheaf/centre/kernel/4080 searches were read. Not a complete Discussion or arbitrary-diff census. The submission checkpoint's4080-title search found only PR3656.", "upstream_write_status": "Claim comment and upstream PR creation rejected by integration with HTTP403; not published upstream.", "environment": "Local container DNS unavailable, so the binary archive was not replayed locally. Actual archive-dependent verification ran in fork-hosted registered CI. Local receipt controls used CPython3.13.5."}, + "family_gate": {"decision": "narrow", "status": "fixed-block result completed; no further reservation", "reason": "Exactly one information coordinate out of424320 is eliminated abstractly. No recursive child deletion, physical caller, favourable supplier bill, or frontier change is established."} +} diff --git a/research/centre-sheaf-fibre/VERIFY.json b/research/centre-sheaf-fibre/VERIFY.json new file mode 100644 index 0000000000..8ab634f66c --- /dev/null +++ b/research/centre-sheaf-fibre/VERIFY.json @@ -0,0 +1,54 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/centre-block-repair-information/independent.py", + "research/community-frontier1094-audit/selected-replay.tar.gz" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/test_sheaf.py" + ], + "timeout_seconds": 60, + "checks": "Eight generic full-matrix, proper-subblock and integer-fibre controls; not native semantics." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "-O", + "{package}/test_sheaf.py" + ], + "timeout_seconds": 60, + "checks": "Eight generic full-matrix, proper-subblock and integer-fibre controls; not native semantics." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/receipt_check.py" + ], + "timeout_seconds": 300, + "checks": "Both independently parsed source certificates, typed committed-result equality and eight JSON/receipt rejection controls." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "-O", + "{package}/receipt_check.py" + ], + "timeout_seconds": 300, + "checks": "Both independently parsed source certificates, typed committed-result equality and eight JSON/receipt rejection controls." + } + ] +} diff --git a/research/centre-sheaf-fibre/independent.py b/research/centre-sheaf-fibre/independent.py new file mode 100644 index 0000000000..c085d6de5f --- /dev/null +++ b/research/centre-sheaf-fibre/independent.py @@ -0,0 +1,248 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Separate row-matrix and modular-minor audit, with no primary code imports. + +Clear1nsight, substantial OpenAI assistance. A separately coded check in this +same session, not an independent human review or a native execution proof. +""" +from __future__ import annotations + +import argparse +from collections import Counter, deque +from fractions import Fraction +from hashlib import sha256 +import gzip +import json +from pathlib import Path +import tarfile + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +ARCHIVE = 'research/community-frontier1094-audit/selected-replay.tar.gz' +ARCHIVE_SHA = 'f1da80610bf33c58527f18ad63b4350d0b864e1d4486141ee17ac9bed4d529d6' +MEMBERS = { + 'candidate/strict/global/base/providers/gauge44/CANONICAL-WORD.json.gz': + '16bc0ebb04b4be6c0ade74badc6a0c0cdba4215eda86e4ff9f13abf8ecebd219', + 'candidate/strict/global/base/work/complex-nine-native/DATA-PHASES.json': + 'c5916ff312678f12aba403847643fbbc29f643acec60bdf836fa56cd3e8251fa', +} + + +def need(ok, reason): + if not ok: + raise ValueError(reason) + + +def digest(value): + return sha256(json.dumps(value, sort_keys=True, separators=(',', ':')).encode()).hexdigest() + + +def sparse_add(destination, source, multiplier): + for key, value in source.items(): + destination[key] = destination.get(key, Fraction(0)) + multiplier*value + if destination[key] == 0: + del destination[key] + + +def push_source_rows(word, backwards=False): + events = word['precondition'] + word['compensation'] + word['A'] + extent = 1+max(max(e[1:3]) if e[0] == 'add' else e[1] for e in events + word['cut']) + state = [{i: Fraction(1)} if i < 112 else {} for i in range(extent)] + if backwards: + for i in range(112): + state[112+i] = {i: Fraction(1)} + for event in events: + if event[0] == 'scale': + target = event[1] + value = Fraction(event[2], event[3]) + need(value != 0, 'invertible scale') + multiplier = 1/value if backwards else value + state[target] = {i: x*multiplier for i,x in state[target].items()} + else: + need(event[0] == 'add', 'canonical elementary event') + target, source = event[1:3] + value = Fraction(event[3], event[4]) + if backwards: + target, source, value = source, target, -value + need(target != source, 'distinct elementary roles') + sparse_add(state[target], state[source], value) + if not backwards: + return [[state[c].get(i, Fraction(0)) for i in range(112)] for c in word['centers']] + rows = [] + for centre in word['centers']: + out = {} + for event in word['cut']: + need(event[0] == 'add', 'canonical cut') + if event[2] == centre: + sparse_add(out, state[event[1]], Fraction(event[3], event[4])) + rows.append([out.get(i, Fraction(0)) for i in range(112)]) + return rows + + +def transpose(rows): + n = len(rows) + return tuple(sum(((rows[i] >> j)&1) << i for i in range(n)) for j in range(n)) + + +def multiply(a,b): + """Binary row-matrix product, using parity dot products.""" + columns = transpose(b) + return tuple(sum(((row & col).bit_count()&1) << j for j,col in enumerate(columns)) for row in a) + + +def own_extract(root): + path = root / ARCHIVE + need(path.is_file() and not path.is_symlink(), 'archive regular file') + need(sha256(path.read_bytes()).hexdigest() == ARCHIVE_SHA, 'archive SHA256') + data = [] + with tarfile.open(path) as archive: + for name,expected in MEMBERS.items(): + matches = [item for item in archive.getmembers() if item.name == name] + need(len(matches) == 1 and matches[0].isfile(), 'unique regular member') + raw = archive.extractfile(matches[0]).read() + need(sha256(raw).hexdigest() == expected, 'member SHA256') + data.append(json.loads(gzip.decompress(raw) if name.endswith('.gz') else raw)) + word,phases = data + rows = push_source_rows(word) + later = push_source_rows(word, True) + need(later == [[x/4 for x in row] for row in rows], 'independent later query') + need(phases['m'] == 73 and len(phases['recipes']) == 112, 'source dimensions') + routes = [] + for index,record in enumerate(phases['recipes']): + q = record['q'] + axes = record['idle_children'][0]['orthogonal_axes'][:8] + need(q == word['ports'][index], 'source port ordering') + basis = [q] + axes + need(len(basis) == 9 and all(0 < v < 512 for v in basis), 'chart dimensions') + need(all(((a&b).bit_count()&1) == int(i==j) + for i,a in enumerate(basis) for j,b in enumerate(basis)), 'orthonormal chart') + upper = tuple((q if (q>>i)&1 else 0) | + sum(((axis>>i)&1) << (9+j) for j,axis in enumerate(axes)) for i in range(9)) + route = upper+tuple(axes) + identity = tuple(1< None: + if not condition: + raise ValueError(message) + + +def canonical(value: object) -> bytes: + return json.dumps(value, sort_keys=True, separators=(",", ":")).encode() + + +def digest(value: object) -> str: + return sha256(canonical(value)).hexdigest() + + +def apply(columns: tuple[int, ...], vector: int) -> int: + out = 0 + while vector: + low = vector & -vector + out ^= columns[low.bit_length() - 1] + vector ^= low + return out + + +def compose(left: tuple[int, ...], right: tuple[int, ...]) -> tuple[int, ...]: + """The product left*right, represented by columns over F2.""" + return tuple(apply(left, column) for column in right) + + +def closure(generators: list[tuple[int, ...]], cap: int = 10000) -> list[tuple[int, ...]]: + need(bool(generators), "nonempty generating set") + identity = tuple(1 << i for i in range(len(generators[0]))) + found = {identity} + queue = deque([identity]) + while queue: + element = queue.popleft() + for generator in generators: + other = compose(element, generator) + if other not in found: + need(len(found) < cap, "group closure exceeds declared cap") + found.add(other) + queue.append(other) + return sorted(found) + + +def rref(matrix: list[list[Q]]) -> tuple[list[list[Q]], list[int]]: + if not matrix: + return [], [] + width = len(matrix[0]) + need(all(len(row) == width for row in matrix), "rectangular matrix") + work = [[Q(x) for x in row] for row in matrix] + pivots: list[int] = [] + for column in range(width): + pivot = next((i for i in range(len(pivots), len(work)) if work[i][column]), None) + if pivot is None: + continue + at = len(pivots) + work[at], work[pivot] = work[pivot], work[at] + divisor = work[at][column] + work[at] = [x / divisor for x in work[at]] + for i in range(len(work)): + if i != at and work[i][column]: + scalar = work[i][column] + work[i] = [x - scalar * y for x, y in zip(work[i], work[at])] + pivots.append(column) + if len(pivots) == len(work): + break + return work, pivots + + +def rank(matrix: list[list[Q]]) -> int: + return len(rref(matrix)[1]) + + +def coset_classes(routes: list[tuple[int, ...]], subgroup: set[tuple[int, ...]]) -> list[list[int]]: + """Partition involutory ports by H*rho_p = H*rho_q. + + This is equivalent to rho_p*rho_q in H. Test every pair, including both + directions and diagonal, rather than treating a union-find guess as proof. + """ + width = len(routes[0]) + identity = tuple(1 << i for i in range(width)) + need(all(compose(route, route) == identity for route in routes), "routes must be involutions") + classes: list[list[int]] = [] + assignment = [] + for p, route in enumerate(routes): + found = next((j for j, block in enumerate(classes) + if compose(route, routes[block[0]]) in subgroup), None) + if found is None: + found = len(classes) + classes.append([]) + classes[found].append(p) + assignment.append(found) + for p in range(len(routes)): + for q in range(len(routes)): + need((compose(routes[p], routes[q]) in subgroup) == (assignment[p] == assignment[q]), + "right-coset equivalence failed") + return classes + + +def analyse(rows: list[list[Q]], routes: list[tuple[int, ...]], triple=(0, 6, 85), cap=10000) -> dict: + """Compute a finite certificate; fails unless full kernel reduces to triple. + + The proof in PROOF.md, not floating-point rank or toy sampling, lifts these + exact premises to the full routed kernel over Q and its integer fibre. + """ + ports = len(routes) + need(len(rows) == 8 and all(len(row) == ports for row in rows), "eight query rows") + need(len(set(routes)) == ports, "distinct routes") + need(rank(rows) == 8, "full old-query rank") + a, b, c = triple + need(len(set(triple)) == 3 and all(0 <= p < ports for p in triple), "triple range") + need(all(row[a] - row[b] - row[c] == 0 for row in rows), "triple relation is (1,-1,-1)") + need(rank([[row[p] for p in triple] for row in rows]) == 2, "triple rank two") + generators = [compose(routes[a], routes[b]), compose(routes[a], routes[c])] + elements = closure(generators, cap) + subgroup = set(elements) + classes = coset_classes(routes, subgroup) + table = [] + for block in classes: + matrix = [[row[p] for p in block] for row in rows] + table.append({"ports": block, "rank": rank(matrix)}) + deficient = [entry for entry in table if entry["rank"] != len(entry["ports"])] + need(deficient == [{"ports": sorted(triple), "rank": 2}], + "full-block reduction has additional dependent coset classes: " + str(deficient)) + # Build an undirected compatibility graph independently of group closure. + # Edges say alpha(h)=alpha(h*rho_a*rho_b/c). Keep both directions, with + # separate endpoint and spanning-tree checks. + index = {g: i for i, g in enumerate(elements)} + adjacency = [set() for _ in elements] + for i, element in enumerate(elements): + for generator in generators: + j = index[compose(element, generator)] + adjacency[i].add(j) + adjacency[j].add(i) + start = index[tuple(1 << i for i in range(len(routes[0])))] + parent = {start: None} + queue = deque([start]) + tree = [] + while queue: + i = queue.popleft() + for j in sorted(adjacency[i]): + if j not in parent: + parent[j] = i + tree.append([i, j]) + queue.append(j) + need(len(parent) == len(elements) and len(tree) + 1 == len(elements), "compatibility graph connected") + variables = ports * len(elements) + old_rank = 8 * len(elements) + ambient_old_kernel = variables - old_rank + return { + "schema_version": 1, + "status": "PASS_CENTRE_SHEAF_FIBRE", + "ports": ports, + "active_dimension": len(routes[0]), + "owners": len(elements), + "right_coset_classes": table, + "class_size_histogram": {str(k): v for k, v in sorted(Counter(map(len, classes)).items())}, + "deficient_coset_classes": deficient, + "compatibility_vertices": len(elements), + "compatibility_edges": sum(map(len, adjacency)) // 2, + "spanning_tree_edges": len(tree), + "spanning_tree_sha256": digest(tree), + "subgroup_sha256": digest(elements), + "geometry_sha256": digest({"rows": [[str(x) for x in row] for row in rows], "routes": routes}), + "full_variables": variables, + "old_rank": old_rank, + "old_kernel_dimension": ambient_old_kernel, + "full_joint_kernel_dimension": 1, + "additional_linear_observations_required": ambient_old_kernel - 1, + "primitive_move_positive_entries": len(elements), + "primitive_move_negative_entries": 2 * len(elements), + "primitive_move_support": 3 * len(elements), + "constant_count_constraint_kills_kernel": True, + "scope": "Fixed H block and all declared ports, exact scalar observations only; no native tariff or physical caller.", + } diff --git a/research/centre-sheaf-fibre/test_sheaf.py b/research/centre-sheaf-fibre/test_sheaf.py new file mode 100644 index 0000000000..ea1f40f77d --- /dev/null +++ b/research/centre-sheaf-fibre/test_sheaf.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Small complete matrix/fibre oracles, not a substitute for real-source replay.""" +from fractions import Fraction as Q +from itertools import product +from pathlib import Path +import types +import unittest + +HERE = Path(__file__).resolve().parent +engine = types.ModuleType("tested_sheaf") +engine.__file__ = str(HERE / "sheaf.py") +exec(compile((HERE / "sheaf.py").read_bytes(), engine.__file__, "exec"), engine.__dict__) +ROUTES = [(2, 1), (1, 3), (3, 2)] +ROWS = [[1, 1, 0], [1, 0, 1]] + + +def full_operator(rows, routes, owners, omit_outputs=()): + """Independent direct assembly: send each (owner,port) to its actual output. + + The later equation is multiplied by four, harmless over Q/Z for kernels. + """ + width = len(owners) * len(routes) + old = [[0] * width for _ in range(len(owners) * len(rows))] + outputs = sorted({engine.compose(owner, route) for owner in owners for route in routes}) + outputs = [x for x in outputs if x not in omit_outputs] + positions = {owner: i for i, owner in enumerate(outputs)} + later = [[0] * width for _ in range(len(outputs) * len(rows))] + for i, owner in enumerate(owners): + for p, route in enumerate(routes): + col = i * len(routes) + p + target = engine.compose(owner, route) + for k, row in enumerate(rows): + old[i * len(rows) + k][col] = row[p] + if target in positions: + later[positions[target] * len(rows) + k][col] = row[p] + return old + later + + +def matvec(matrix, vector): + return tuple(sum(a * b for a, b in zip(row, vector)) for row in matrix) + + +class Tests(unittest.TestCase): + def setUp(self): + self.owners = engine.closure([engine.compose(ROUTES[0], ROUTES[1]), engine.compose(ROUTES[0], ROUTES[2])]) + self.matrix = full_operator(ROWS, ROUTES, self.owners) + self.move = (1, -1, -1) * len(self.owners) + + def test_noncommuting_routes(self): + self.assertEqual(len(self.owners), 3) + self.assertNotEqual(engine.compose(ROUTES[0], ROUTES[1]), engine.compose(ROUTES[1], ROUTES[0])) + self.assertEqual(engine.coset_classes(ROUTES, set(self.owners)), [[0, 1, 2]]) + + def test_complete_operator_kernel(self): + self.assertEqual(engine.rank(self.matrix), 8) + self.assertEqual(matvec(self.matrix, self.move), (0,) * len(self.matrix)) + echelon, pivots = engine.rref(self.matrix) + self.assertEqual(len(pivots), 8) + self.assertEqual(len(self.move) - len(pivots), 1) + + def test_every_proper_owner_subset(self): + for bits in product((0, 1), repeat=3): + subset = [g for b, g in zip(bits, self.owners) if b] + if subset and len(subset) < 3: + self.assertEqual(engine.rank(full_operator(ROWS, ROUTES, subset)), 3 * len(subset)) + + def test_exact_nonnegative_fibres(self): + fibres = {} + for point in product((0, 1), repeat=9): + fibres.setdefault(matvec(self.matrix, point), []).append(point) + multiple = 0 + for points in fibres.values(): + if len(points) > 1: + multiple += 1 + first = points[0] + for point in points: + t = point[0] - first[0] + self.assertEqual(tuple(a + t * v for a, v in zip(first, self.move)), point) + self.assertGreater(multiple, 0) + + def test_count_constraint(self): + self.assertEqual(sum(self.move), -3) + self.assertEqual(engine.rank(self.matrix + [[1] * 9]), 9) + + def test_wrong_sign_breaks_witness(self): + wrong = (1, 1, -1) * 3 + self.assertNotEqual(matvec(self.matrix, wrong), (0,) * len(self.matrix)) + + def test_omitting_later_constraints_is_unsafe(self): + old_only = self.matrix[:6] + self.assertEqual(engine.rank(old_only), 6) + self.assertLess(engine.rank(old_only), engine.rank(self.matrix)) + + def test_wrong_port_permutation(self): + changed = list(ROUTES) + changed[0], changed[1] = changed[1], changed[0] + matrix = full_operator(ROWS, changed, self.owners) + # Source equality alone cannot detect a route change on a constant + # global mode. An impulse response does detect it. + impulse = (1, 0, 0, 0, 0, 0, 0, 0, 0) + self.assertNotEqual(matvec(matrix, impulse), matvec(self.matrix, impulse)) + + +if __name__ == "__main__": + unittest.main() diff --git a/research/centre-sheaf-fibre/verify.py b/research/centre-sheaf-fibre/verify.py new file mode 100644 index 0000000000..cb9f931c68 --- /dev/null +++ b/research/centre-sheaf-fibre/verify.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Source-bound sheaf reduction, deliberately separate from supplier admission.""" +from __future__ import annotations +import argparse +from fractions import Fraction as Q +from hashlib import sha256 +import json +from pathlib import Path +import sys +import types + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +PINS = { + "research/centre-block-repair-information/independent.py": + "b298ff3902c14db11e4ed057259785efc185e8ae3bb39c0d1c432e2340ceb4ea", + "research/community-frontier1094-audit/selected-replay.tar.gz": + "f1da80610bf33c58527f18ad63b4350d0b864e1d4486141ee17ac9bed4d529d6", +} + + +def local_module(name: str, filename: str): + # Execute the named source bytes directly, ignoring pre-existing bytecode. + module = types.ModuleType(name) + module.__file__ = str(HERE / filename) + exec(compile((HERE / filename).read_bytes(), module.__file__, "exec"), module.__dict__) + return module + + +def geometry(root: Path = ROOT): + for name, expected in PINS.items(): + path = root / name + if not path.is_file() or path.is_symlink(): + raise ValueError("missing regular source: " + name) + if sha256(path.read_bytes()).hexdigest() != expected: + raise ValueError("source SHA256 mismatch: " + name) + name = "research/centre-block-repair-information/independent.py" + module = types.ModuleType("credited_pr3071_source_extractor") + module.__file__ = str(root / name) + exec(compile((root / name).read_bytes(), module.__file__, "exec"), module.__dict__) + word, phases = module.sources() + rows, later = module.query_rows(word) + if later != [[x / 4 for x in row] for row in rows]: + raise ValueError("source contract H=R/4 fails") + routes, products, _ = module.route_certificates(word, phases) + if len(products) != 112 * 111: + raise ValueError("source route uniqueness") + for route in routes: + if len(route) != 73 or any(route[k] != 1 << k for k in range(17, 73)): + raise ValueError("spectator identity") + if any(x >> 17 for x in route[:17]): + raise ValueError("active subspace invariant") + return rows, [tuple(route[:17]) for route in routes] + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--emit-geometry", action="store_true", help="Print authenticated derived geometry for offline verification") + parser.add_argument("--geometry", type=Path, help="Use an explicitly labelled derived geometry export rather than re-read the source archive") + parser.add_argument("--root", type=Path, default=ROOT) + args = parser.parse_args() + engine = local_module("centre_sheaf_engine", "sheaf.py") + if args.geometry: + raw = json.loads(args.geometry.read_text()) + rows = [[Q(x) for x in row] for row in raw["rows"]] + routes = [tuple(row) for row in raw["routes"]] + source_mode = "derived geometry only; archive extraction not rerun" + else: + rows, routes = geometry(args.root) + source_mode = "authenticated archive and credited PR3071 extractor" + if args.emit_geometry: + print("GEOMETRY_JSON=" + json.dumps({"rows": [[str(x) for x in row] for row in rows], "routes": routes}, separators=(",", ":"))) + # Print finite diagnostic before the stronger assertion, so a failed model + # reduction remains a reproducible result rather than a silent truncation. + a, b, c = 0, 6, 85 + group = engine.closure([engine.compose(routes[a], routes[b]), engine.compose(routes[a], routes[c])]) + blocks = engine.coset_classes(routes, set(group)) + diagnostic = [{"ports": block, "rank": engine.rank([[row[p] for p in block] for row in rows])} for block in blocks] + print("COSET_DIAGNOSTIC=" + json.dumps(diagnostic, separators=(",", ":"))) + result = engine.analyse(rows, routes) + engine.need(result["owners"] == 4080, "pinned subgroup order differs from 4080") + result["source_mode"] = source_mode + print("RESULT_JSON=" + json.dumps(result, sort_keys=True, separators=(",", ":"))) + print("PASS_CENTRE_SHEAF_FIBRE owners=4080 all_ports=112 kernel=1 integer_generator_owners=4080 no_new_kappa") + + +if __name__ == "__main__": + try: + main() + except (ValueError, KeyError, OSError, TypeError) as error: + print("FAIL_CENTRE_SHEAF_FIBRE " + str(error), file=sys.stderr) + raise SystemExit(1) from error