diff --git a/research/p104-cut-stability/ASSEMBLED-REVIEW.md b/research/p104-cut-stability/ASSEMBLED-REVIEW.md new file mode 100644 index 0000000000..c39fe3d12b --- /dev/null +++ b/research/p104-cut-stability/ASSEMBLED-REVIEW.md @@ -0,0 +1,56 @@ +# Final assembled mathematical claims review + +Reviewed read-only at +`/tmp/imb-p104-cut-stability-20261025/research/p104-cut-stability`: +root PROOF.md, FIBER-REVIEW.md, README.md, whole-caller/PROOF.md and README.md, +the whole-caller census implementation, the independent peer's declared +coverage, and the retained V16 application method sections used for the fresh +ordinary majorants. This is AI-assisted mathematical/claims review, not an +independent human or formal-kernel acceptance. No full historical replay, +source-history preflight, hosted CI or final canonical wrapper is certified +by this note. + +**PASS within the explicitly stated finite-template and inherited-interface +scope. No mathematical blocker found.** + +The assembled documents distinguish exhaustive scalar cut maxima, conservative +all-interval envelopes, native chart premises, completed-service error ABI, +literal butterfly precision witnesses and recursive runtime. COPY is an actual +ADD implementation into exact owned zero and carries arbitrary injected owned +residuals. Its exact trajectory/tariff claim does not use assignment derivatives. + +The earlier independent selected-row, COPY, range and fiber reviews remain +valid. Prefix/suffix and whole-intermediate range bounds do not confuse final +suffix control with interval control. The finite integer part and +35 local +accumulator guard have distinct roles. The refined Hilbert corollary uses a +maximum over individual fields, with one explicit active-fiber coordinate +conversion; it drops neither the active dimension nor a joint-l2 copy factor. +External spectator records are fixed. Native factor/butterfly-pair cuts are +separated from scalar accumulators and unexamined recursive interiors. + +The whole-caller scalar, query, IDLE and normalization arithmetic is consistent +with the retained controller and prior cheap independent count check. The +coarse norm exponent 5844 and denominator constant 972 yield signed numerator +bound `b+d0+6818+2590f` with conservative slack. The total 13062 raw positions +is a constructive allocation, not an observed peak, and recursive/movement +scratch is explicitly additional. Reused query owned positions are cleared +between uses. Productive helpers remain independent across LOCAL occurrences. + +The ordinary R/G majorants are asserted within the explicitly retained finite +physical recipe class. They are not presented as constant arbitrary-f tape +instruction counts; the `(f+1)^3` expansion and selected execution/movement +contracts are explicit. Fixed carrier N is separated from fresh outer domain +thresholds. No efficiency ratio is supplied by these large constants. + +The package does not claim a new κ, unconditional theorem, scientific adoption, +selected-frontier promotion, full uniform recursive compiler, native internal +precision implementation, literal tape microprogram or materialized rounded +multiplier. These scope limits match the actual evidence provided here. + +Minor documentation issue observed: whole-caller/PROOF.md names the retained +review as HILBERT-FIBER-REVIEW.md, whose actual path is +`whole-caller/inputs/HILBERT-FIBER-REVIEW.md`; an explicit relative link avoids +confusion. Root README's VALIDATION.md target was pending at review time. +Neither is a mathematical blocker; validation must reflect actual executions. + +Prepared for thu-nmrc with OpenAI Codex assistance, Apache-2.0. diff --git a/research/p104-cut-stability/FIBER-REVIEW.md b/research/p104-cut-stability/FIBER-REVIEW.md new file mode 100644 index 0000000000..cf7dfe0ac8 --- /dev/null +++ b/research/p104-cut-stability/FIBER-REVIEW.md @@ -0,0 +1,64 @@ +# Bounded proof review: active-fiber Hilbert sharpening + +This reviews the proposed corollary only. The active-fiber unitary method is +credited to Ross Richardson / Adam Gall and the retained +`research/p104-retimed-internal-grid` lineage. It is not a new method or a +proof of the five framework premises. The new binding concerns the actual +735-input complete P104 word, COPY residuals, all intervals and whole caller. + +Fix a spectator address and let each active fiber have complex dimension +`D=2^(d f)`. For the state use **maximum individual-field Hilbert norm**, +`H(z)=max_r ||z_r||_2`. Do not use joint l2 over all fields. For coordinate +norm `C(z)=max_{r,a} max(|Re z_r(a)|,|Im z_r(a)|)`, + +`H(z) <= sqrt(2D) C(z)`, and `C(z) <= H(z)`. + +If a complete interval has maximum-individual-field Hilbert norm at most L, +its coordinate norm is therefore at most `L sqrt(2D)`. This uses only one +fiber conversion, on the input. There is no factor from the number of +fields, helpers, or spectator addresses. An integer power-of-two upper bound +is `L 2^ceil((d f+1)/2)`. + +For a local scalar/gauge interval, each field block has the form +`A_rs Psi_out,r Psi_in,s^-1`. The normalized native C factors and their +canonical P/D/X/phase factors are unitary. At an interior native cut the +current Psi is a partial native recipe times the previous canonical frame, +also unitary. Thus the block has Hilbert norm `|A_rs|`; the maximum absolute +scalar row sum bounds H on the whole interval. The previously proved +LambdaP / LambdaS / Gamma estimates consequently acquire no native N-power +in H. For local component estimates apply one conversion with d=9. + +For the whole caller, a complete or partial local module costs at most +Gamma=2^296 in H. An ADD costs at most 2 in H, even for different field +gauges. All native factors, routes, signs and whole IDLEs are isometries. +An owned copied-query schema costs at most 4 from its COPY-ADD and target +ADD, including arbitrary injected owned residual; its Q_f and partial +native factors are isometries. INIT/CLEAR are contractions on owned state. +The owned query stream must be cleared between ports, retaining the +declared block/ownership separation. No joint-l2 copy-isometry is asserted. + +The checked counts therefore give the whole-caller interval H bound +`2^(486+2*15) Gamma^18 = 2^5844`. Every truncated module has the same upper +bound as its full module, and all such majorants are at least one, so their +full product bounds intervals beginning or ending inside modules. The +explicit 265-axis chart/route support gives, conditionally on that declared +support, the coordinate interval corollary + +`2^(5844 + ceil((265 f+1)/2))`. + +Axes outside those 265 f coordinates must truly be fixed spectators; no +claim that arbitrary additional active axes are free is made. Different +modules may use different active subspaces inside the same 265-axis fiber. +The argument does not require a common smaller fiber across modules. + +The unitary cut statement applies after a complete C factor or complete +butterfly pair. Updating only some disjoint pairs is also a direct-sum +unitary. An accumulator halfway through computing a real output component +is not itself one of these field cuts and retains its separate fixed local +arithmetic guard. The earlier coarse component bounds remain valid. + +Conclusion: the proposed sharpening is mathematically sound at the declared +field/native-C-factor cuts, with the stated inherited native and ownership +contracts. It does not establish recursive internal precision or runtime, +uniform physical stock/tape bounds, scientific acceptance or a new κ. +Prepared for thu-nmrc with OpenAI Codex assistance, Apache-2.0. diff --git a/research/p104-cut-stability/PROOF.md b/research/p104-cut-stability/PROOF.md new file mode 100644 index 0000000000..a003667716 --- /dev/null +++ b/research/p104-cut-stability/PROOF.md @@ -0,0 +1,220 @@ +# All-cut coordinate stability for the actual P104 word + +This is a source-specific finite-template lemma for the original conditional +kappa candidate in PR5551. It supplies explicit error and range constants. It +does not prove a recursive child implementation, a Turing-tape implementation, +the complete multiplication theorem, scientific admission or a new kappa. +The five selected framework premises remain. + +## 1. Exact program and the chosen owned COPY implementation + +The source is PR5551 head `1123635a6f63f23638df9459c994160e5e649d30`. +Its immutable WORD container SHA256 is +`48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446`. +There are 735 arbitrary public fields, eight owned positions with local peak +occupancy one, and 25,310 events. All 735 independent inputs are retained. + +For numerical implementation, realize each of the eight COPY operations as +`owned += source` after its declared INIT. The actual coefficient is one and +the two fields have the same chart. The exact source trace proves the owned +destination is zero, so this gives the same exact value and every public and +owned endpoint. Source ADD and COPY have the same scalar tariff at this +coefficient. All MOVE requests, charts, scalar coefficients and ordering remain; +no recursive child, field or ordinary scalar charge is added. + +`RESIDUAL-WORD.json.gz` makes this implementation concrete: exactly the eight +COPY opcodes become ADD. The frozen source is unchanged. This choice matters +under perturbation: an arbitrary residual in the owned destination before COPY +is carried by ADD. It must not be silently replaced by zero in a derivative +calculation. For example, a residual before source event 13491 in owned field +735 reaches public output 112 with coefficient one. Assignment-COPY would +erase that response. The checker preserves all eight such nonzero responses. +INIT and CLEAR erase only owned fields under the retained ownership premise. + +## 2. Two exhaustive exact scalar matrices + +At each of 25,311 semantic cuts, let A be the logical input-to-state matrix on +the 735 public inputs. The forward interpreter uses exact sparse integer +vectors with a shared dyadic denominator. Every row-l1 norm is maintained. +It proves + +``` +max_cut ||A||_infinity = 131072 = 2^17. +``` + +Equality occurs after 24,096 events in role 93, whose row is exactly +`-65536*x86 -65536*x93`. All 743 final rows are checked, including owned zeros. + +At a cut, let R map arbitrary residuals in all current 743 positions to final +public outputs. Reverse ADD updates a source response column by the exact +coefficient times the destination response column; SCALE multiplies its +column; owned resets drop their column. COPY uses the chosen ADD derivative, +retaining its owned response. Exact changes in absolute coefficients maintain +all 735 output row-l1 sums. The result is + +``` +max_cut ||R||_infinity = 135415/4. +``` + +The equality row is output 205 after 24,297 events, with 111 nonzero terms +retained in RESULT. Maximum exact entry denominator exponents over all cuts +are four forward and seventeen backward. Both whole endpoint matrices are +checked independently in the two directions. + +The separately written peer uses ordinary Fraction arithmetic and no parent +imports. It exhausts all cuts again and obtains the same maxima, complete +maximizer rows, denominator witnesses and endpoints. These are author-side +independent implementations, not human or formal-kernel acceptance. + +## 3. All intervals, including intervals ending before the final output + +Final-output suffix bounds alone do not control perturbed intermediate ranges. +Use a separate all-interval majorant. Start e_r=0 in every position. At every +scalar step update + +``` +ADD/COPY d += q*s: e_d = max(e_d, e_s + ceil(log2(abs(q)))) + 1; +SCALE r *= q: e_r = max(0, e_r + ceil(log2(abs(q)))); +INIT/CLEAR r: e_r = 0. +``` + +MOVE is logical identity. All actual coefficients are nonzero dyadic numbers. +For each row and every possible earlier starting cut, its interval row-l1 +norm is bounded by 2^e_r. Indeed an ADD row norm is at most the previous +destination norm plus |q| times the source norm. The new identity interval +has norm one; this explains the zero floor for SCALE and owned resets. +Triangle inequality bounds all earlier starts simultaneously. Induction +therefore proves the invariant without enumerating quadratically many intervals. + +The maximum computed exponent is 296, so every scalar interval is bounded by +Gamma=2^296. This is an upper bound, not an exact interval maximum. The analogous +denominator recurrence is max(d_d,d_s+den(q)) for ADD, d_r+den(q) for SCALE, +and zero for owned resets. It gives the valid uniform denominator exponent 54. +The independent appendix checks this recurrence and an exhaustive small fixture. + +## 4. Canonical chart factors and arbitrary spectator records + +Use component sup norm: the maximum of |Re z| and |Im z| over every coordinate +and every field. The retained canonical frame code is a monomial conjugate of +dim(F) normalized C gates. A C gate has coefficients (1+i)/2 and (1-i)/2; +its induced real-component row norm is at most two, as is its inverse. +P, quadratic D, X and scalar phases are exact permutations/sign rotations and +have norm one. For positive integer f, put N=2^f. Thus + +``` +||Phi_F||_infinity, ||Phi_F^-1||_infinity <= N^dim(F). +``` + +Each gate is applied factorwise to f complete columns; exterior real scalar +coefficients are applied once. No scalar sum is tensor-powered. Identity on any +number of complete spectators does not change this induced norm. + +At semantic cuts, the physical matrix is diagonal(Phi_current) times the +logical scalar matrix times diagonal(Phi_initial^-1). The largest initial +chart has dimension five; all current/final charts have dimension at most nine. +The exact prefix bound is therefore 2^17*N^14 and the final-output suffix +bound is (135415/4)*N^18. Every physical semantic interval is bounded by +Gamma*N^18, with denominator exponent at most 54+18f. + +A lowered native MOVE is monomial / rank-r Gaussian / monomial, r<=9. Its +normalized C factorization can be used for norm analysis, regardless of whether +the implementation uses a recursively supplied complete Gaussian job. +The actual old/new dimensions give prefix exponent at most twenty and suffix +exponent at most twenty-seven at native-factor interior cuts. For an arbitrary +interval with two such interior endpoints a safe bound is Gamma*N^36 and +denominator exponent 54+36f. An interval wholly inside one MOVE satisfies the +smaller direct bound N^9. These statements concern the declared native factors; +they do not bound unexamined internal bodies of a recursive child. + +There is also a sharper bound using the retained active-fiber method. In the +maximum of the individual fields' Hilbert norms, unitary chart changes and +complete partial native factors are isometries. The exact scalar row-l1 bounds +therefore apply directly, without powers of N: the prefix and final suffix +constants are 2^17 and 135415/4, and every interval is bounded by 2^296. +These are not joint-state Hilbert norms over all fields. + +For coordinate errors, fix an external spectator address. A local active fiber +has 2^(9f) complex coordinates. A component bound delta gives its field Hilbert +norm at most sqrt(2*2^(9f))*delta; an output component is at most that output +field's Hilbert norm. Thus a single conversion factor +`A9(f)=2^ceil((9f+1)/2)` bounds the local physical prefix/suffix/interval norms +by `2^17*A9(f)`, `(135415/4)*A9(f)` and `2^296*A9(f)`, respectively. This is +valid at complete C-factor/butterfly-pair cuts, including disjoint pairs partly +processed, which still form a unitary direct sum. A scalar scratch accumulator +is handled by its separate local guard, not described as a unitary field. +No factor for the number of fields or external spectator records is dropped. + +The general unitary/fiber argument is credited to the retained Ross Richardson +and Adam Gall lineage, also used in `p104-retimed-internal-grid` and +`p104-retimed-error-recovery` for the older 358-input partial word. The new +binding here is the complete 735-input word, actual residual-preserving COPY, +exhaustive cut constants, all-interval range and full caller application. + +## 5. Error layers and finite fixed integer ranges + +There are two distinct applications; their costs must not be interchanged. + +At completed-service interfaces, assume the retained Gaussian service returns +a complete field with component error at most delta. Ordinary dyadic scalar +linear forms are evaluated in a wider exact integer accumulator and rounded +once. Errors are injected after semantic instructions/complete Gaussian +returns, including an optional simultaneous input and output rounding layer. +The conservative layer count is K=25312. Actual native monomial adapters are +isometries. By linearity, even adversarial correlated errors obey + +``` +final component error <= K*(135415/4)*N^18*delta. +``` + +Since ceil(log2(K*135415/4))=30, delta=2^-p and +`p >= requested_output_bits + 18f + 32` suffice with slack. This specifies the +required child-return error ABI; it does not prove how that child implements it. + +Alternatively, a literal flat C-butterfly realization has at most +`K(f)=21688+5894f` rounded layers, including input/output. For this mathematical +realization the bound is K(f)*(135415/4)*N^27*delta. Its direct-butterfly runtime +is NOT charged by, or substituted for, the recursively priced child invoice. + +Both applications have a finite intermediate range, not just a final-error +bound. If input component magnitude is at most 2^b, p fraction bits are used, +and k=ceil(log2 K), every rounded native-factor state has magnitude at most + +``` +2^(b+17+20f) + 2^(k+296+36f-p). +``` + +Thus `I=2+max(0,b+17+20f,k+296+36f-p)` magnitude bits, plus a sign bit, suffice. +At service-only cuts replace 20/36 by 14/18. This uses the all-interval bound +for accumulated perturbations, rather than using a final suffix as a bound on +an intermediate state. An alternative is p>=k+296+36f+2, which makes that +noise term at most 1/4. + +With the sharper active-fiber bound, put a=ceil((9f+1)/2). One may instead use +`p >= requested_output_bits+30+a+2` at completed services and +`I=2+max(0,b+17+a,ceil(log2 K)+296+a-p)` magnitude bits plus a sign. Literal +butterfly layers use their stated K(f). The earlier chart-product estimates +remain valid conservative alternatives; no runtime saving is inferred from +these smaller sufficient precision constants. + +The largest scalar magnitude is 65537/2 and the largest dyadic denominator is +2^16. A fixed additional 35-bit exact-accumulator allowance covers numerator +multiplication, denominator alignment and addition before the one rounding. +It is a local arithmetic allowance beyond the stored-state range above; it is +not itself a global overflow proof. All widths and layer counts are fixed +functions of b,p,f, independent of data and spectator volume. + +## 6. Scope of the application + +This proves a concrete finite local source/error interface and explicit +coordinate range. It does not derive the recursively compiled all-size word, +price literal butterflies as recursive services, create a tape lowerer, or +prove analytic recovery. A complete caller application must additionally bind +all helper/main whole-job adapters, query scratch, routes, idles, boundaries, +parent parking, simultaneous stocks and the existing recursive error theorem. +Large constants are absorbed only by fresh outer input thresholds; they are +not silently absorbed into the efficiency gap at a fixed carrier N. + +Credit Ali Romman, Gareth Davidson, David Arias, Cinna Davis, Cao Yifan, zxv, +Jacob Alan Sussman and the full geometry/native/compiler/precision lineage +retained in PR5551. New work prepared for thu-nmrc with substantial OpenAI Codex +assistance, including independent subagents. Apache-2.0. diff --git a/research/p104-cut-stability/README.md b/research/p104-cut-stability/README.md new file mode 100644 index 0000000000..5a3e7e3816 --- /dev/null +++ b/research/p104-cut-stability/README.md @@ -0,0 +1,83 @@ +# P104 cut stability and a concrete residual-preserving COPY + +For the complete PR5551 word, two independent exhaustive interpreters certify +**prefix amplification 131072** and **final-suffix amplification 135415/4** over +all 25,311 cuts. A separately checked recurrence bounds every intermediate +scalar interval by **2^296**, with dyadic denominator exponent at most 54. +All 735 arbitrary public inputs, 743 state positions and eight owned lifetimes +are retained. No new kappa is claimed. + +The implementation realizes all eight COPY operations as ADD into their +initialized owned zero. This preserves the exact trajectory, every MOVE request, +paid/helper histogram and scalar tariff (217428). It also preserves arbitrary +injected owned residuals. The source's first such residual reaches public output +112 with coefficient one; treating COPY as an assignment would erase it. +`RESIDUAL-WORD.json.gz` records the literal eight-opcode implementation, while +the published input remains frozen. + +[PROOF.md](PROOF.md) gives the cut matrices, all-interval induction, finite +integer/fractional formats and coordinate error interface. The retained +unitary active-fiber method yields the local conversion +`2^ceil((9f+1)/2)` with no external spectator-count factor. The new contribution +is its current complete-word binding and residual-aware source application; +the general method is credited to Ross Richardson / Adam Gall and the earlier +P104 precision/recovery contributors. + +The [whole-caller application](whole-caller/PROOF.md) retains all 32 main banks, +9486 independent helpers and a constructive 248-position owned reservation. +Its interval bound is **2^5844** in maximum-individual-field Hilbert norm and +**2^(5844+ceil((265f+1)/2))** in coordinate norm, after exactly one conversion +on the 265f active coordinates. It includes a fresh ordinary/normalization +ledger and fixed finite range/storage constants. The coarse chart-product +bound and denominator ledger are retained as crosschecks. + +This is evidence toward scientific review of PR5551's existing conditional +kappa 0.00304153. The five selected native/ownership/compiler/precision-tape/ +analytic premises remain. Recursive child internals, a fixed-tape microprogram, +the enormous uniform word and a rounded multiplier are not materialized. +Literal C-butterfly precision witnesses are not priced as recursive services. +Scientific adoption and selected-frontier promotion remain maintainer decisions. + +## Reproduce + +Python 3.12 and its standard library; mathematical replay needs no Git/network: + +```sh +python3 -I -B research/p104-cut-stability/verify.py +python3 -I -O -B research/p104-cut-stability/verify.py +python3 -B scripts/research_package.py --package research/p104-cut-stability +python3 -B scripts/check_research_commit.py --package research/p104-cut-stability --check-source-history +``` + +The first two commands authenticate retained bytes, run the dyadic and separate +Fraction all-cut censuses, reproduce maximum-row/COPY controls, check the +independent interval fixture, replay the retained source's typed interpreter +on both literal words, and join the whole-caller census to this exact source. +They write nothing. The last two additionally require repository provenance. +Expected marker: `PASS_P104_CUT_STABILITY_AND_CALLER_BOUNDS`. + +The Fraction [peer](peer/README.md), [witness/proof review](proof-peer/REVIEW.md), +[range appendix](range-peer/PROOF.md) and [fiber review](FIBER-REVIEW.md) retain +their original narrower claims and input snapshots. The aggregate wrapper +binds every consumed numerical field to the current source. These are separate +author-side algorithms and reviews, not human or formal-kernel acceptance. +Executed validation and cold replay scope are in [VALIDATION.md](VALIDATION.md). + +## Open next questions + +Can independent source-bound scientific review accept this finite error/range +application together with the original PR5551 complete conditional price? +The concrete first step is the ADD-COPY residual interface, complete cut peers, +active-fiber conversion and actual ordinary/reservation ledger. Applying the +retained recursive child and tape contracts remains distinct from proving them. +This package stops before a new source-family search or frontier promotion. + +## Credit + +Retain Ali Romman, Gareth Davidson, David Arias, Cinna Davis, Cao Yifan, zxv, +Jacob Alan Sussman and the full PR5551 native/geometry/compiler/precision +lineage. The earlier cut-error and active-fiber/grid methods retain Adam Gall, +Ross Richardson, Arham Tahir, Nick Petalas and ywz65 attribution. Their old +358-input/5268-event partial-word constants are not transferred to this word. +Prepared for thu-nmrc with substantial OpenAI Codex assistance, including +independent subagents. New work Apache-2.0; source notices remain unchanged. diff --git a/research/p104-cut-stability/RESIDUAL-SOURCE-REPLAY.json b/research/p104-cut-stability/RESIDUAL-SOURCE-REPLAY.json new file mode 100644 index 0000000000..b85ce258a0 --- /dev/null +++ b/research/p104-cut-stability/RESIDUAL-SOURCE-REPLAY.json @@ -0,0 +1,24 @@ +{ + "endpoint_coefficients": 552049, + "helpers": { + "4": 51, + "5": 36, + "7": 24, + "8": 122, + "9": 294 + }, + "owned_lifetimes": 8, + "paid": { + "1": 2430, + "2": 554, + "3": 390, + "4": 111, + "5": 108, + "6": 17, + "7": 13, + "9": 1 + }, + "peak_owned_fields": 1, + "public_inputs": 735, + "real_scalar_allowance": 217428 +} diff --git a/research/p104-cut-stability/RESIDUAL-WORD.json.gz b/research/p104-cut-stability/RESIDUAL-WORD.json.gz new file mode 100644 index 0000000000..ff97feda44 Binary files /dev/null and b/research/p104-cut-stability/RESIDUAL-WORD.json.gz differ diff --git a/research/p104-cut-stability/RESULT.json b/research/p104-cut-stability/RESULT.json new file mode 100644 index 0000000000..4ebe918a65 --- /dev/null +++ b/research/p104-cut-stability/RESULT.json @@ -0,0 +1,285 @@ +{ + "COPY_implementation": "ADD into an exactly initialized owned zero; injected residual is retained", + "active_fiber_corollary": { + "Hilbert_all_interval_power": 296, + "Hilbert_final_suffix_bound": "135415/4", + "Hilbert_prefix_bound": "131072", + "external_spectator_factor": 1, + "local_active_axes": 9, + "local_coordinate_conversion_power": "ceil((9*f+1)/2)", + "method_credit": "Retained Ross Richardson / Adam Gall unitary active-fiber argument; new source-specific complete-word binding.", + "norm": "Maximum of individual field Hilbert norms, then one real-component active-fiber conversion" + }, + "all_interval_majorant": { + "meaning": "Upper bound for every scalar interval, not an exact maximum; each row recurrence restarts at identity at every cut.", + "native_factor_interior_N_exponent": 36, + "power_witness": [ + 24859, + 146, + 296 + ], + "scalar_amplification_power_of_two": 296, + "scalar_denominator_exponent_upper": 54, + "semantic_chart_N_exponent": 18 + }, + "cuts": 25311, + "error_interfaces": { + "completed_service_layers_including_input_output": 25312, + "completed_service_suffix_guard_bits": 30, + "literal_butterfly_layers_base_including_input_output": 21688, + "literal_butterfly_layers_slope_in_f": 5894, + "literal_butterfly_runtime_in_recursive_invoice": false + }, + "geometry": { + "current_max_chart_dimension": 9, + "endpoint_prefix_N_exponent": 14, + "endpoint_suffix_N_exponent": 18, + "input_max_chart_dimension": 5, + "native_recipe_prefix_N_exponent": 20, + "native_recipe_suffix_N_exponent": 27, + "output_max_chart_dimension": 9 + }, + "op_counts": { + "ADD": 20947, + "CLEAR": 8, + "COPY": 8, + "INIT": 8, + "MOVE": 3624, + "SCALE": 715 + }, + "owned_residual_controls": [ + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13491, + "output": 112, + "owned": 735, + "residual_response": "1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13502, + "output": 112, + "owned": 736, + "residual_response": "1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13513, + "output": 112, + "owned": 737, + "residual_response": "-1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13522, + "output": 113, + "owned": 738, + "residual_response": "1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13538, + "output": 113, + "owned": 739, + "residual_response": "-1/2" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13553, + "output": 112, + "owned": 740, + "residual_response": "1/2" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13568, + "output": 112, + "owned": 741, + "residual_response": "1/2" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13583, + "output": 112, + "owned": 742, + "residual_response": "-1/2" + } + ], + "prefix_denominator_witness": [ + 21436, + 431, + 4 + ], + "prefix_max_entry_denominator_exponent": 4, + "prefix_max_row_l1": "131072", + "prefix_max_witness": { + "cut": 24096, + "l1": "131072", + "role": 93, + "row": { + "86": "-65536", + "93": "-65536" + } + }, + "public_inputs": 735, + "residual_word": { + "COPY_to_ADD_sites": [ + 13491, + 13502, + 13513, + 13522, + 13538, + 13553, + 13568, + 13583 + ], + "canonical_sha256": "ceb5c44ff31d29800ae0591f721ffc885ba4b64e5f6f485abea35f54d3eeb744", + "new_Gaussian_calls": 0, + "ordinary_scalar_tariff_change": 0, + "reason": "Source ADD and COPY have the same literal coefficient tariff; all eight coefficients are one." + }, + "scalar_guard": { + "accumulator_magnitude_factor_upper": 65536, + "extra_accumulator_bits_upper": 35, + "max_abs_coefficient": "65537/2", + "max_denominator_exponent": 16 + }, + "scope": "Exact all-cut scalar matrices and elementary diagram norm bounds for this finite word. No uniform recursive-child internal implementation, full 265-axis caller precision/tape closure, new kappa, scientific admission or selected promotion is claimed.", + "source_head": "1123635a6f63f23638df9459c994160e5e649d30", + "state_roles": 743, + "status": "PASS_EXACT_P104_ALL_CUT_SCALAR_STABILITY", + "suffix_denominator_witness": [ + 24214, + 93, + 17 + ], + "suffix_max_entry_denominator_exponent": 17, + "suffix_max_row_l1": "135415/4", + "suffix_max_witness": { + "cut": 24297, + "l1": "135415/4", + "output": 205, + "row": { + "1": "-1/2", + "10": "-1/2", + "103": "1/2", + "104": "-1/2", + "105": "-1/2", + "106": "-1/2", + "11": "-1/2", + "16": "-1/2", + "17": "1/2", + "18": "1/2", + "19": "1/2", + "205": "1", + "226": "1/2", + "227": "-1/2", + "229": "1/2", + "230": "1/2", + "233": "-1/2", + "234": "-1/2", + "238": "1/2", + "239": "-1/2", + "240": "1/2", + "241": "-1/2", + "242": "1/2", + "243": "1/2", + "25": "1/2", + "253": "-1/2", + "255": "-1/2", + "256": "1/2", + "261": "1/2", + "267": "-1/2", + "27": "1/2", + "270": "1/2", + "271": "-1", + "276": "-1/2", + "28": "1/2", + "283": "1/2", + "286": "-1/2", + "288": "-1/2", + "29": "1/2", + "296": "1/2", + "299": "1/2", + "30": "1/2", + "31": "-1/2", + "319": "-1", + "347": "1", + "35": "-1/2", + "351": "-1", + "36": "1/2", + "363": "1", + "368": "1/2", + "37": "1/2", + "379": "1/2", + "383": "-1/2", + "388": "1/2", + "395": "1/2", + "398": "1/2", + "399": "-1", + "401": "-1/2", + "405": "-1/2", + "406": "-1/2", + "410": "1/2", + "411": "-1/2", + "413": "-1/2", + "414": "-1/2", + "419": "-1/2", + "422": "-1/2", + "426": "1/2", + "427": "-1", + "431": "-1/2", + "433": "1/2", + "434": "-1/2", + "435": "1/2", + "437": "1/2", + "441": "1/2", + "445": "1/2", + "446": "1/2", + "447": "-1/2", + "45": "1/2", + "46": "1/2", + "47": "1/2", + "51": "-1/2", + "52": "-1/2", + "53": "-1/2", + "54": "-1/2", + "55": "-1/2", + "56": "-1/2", + "57": "-1/2", + "58": "1/2", + "59": "1/2", + "6": "1/2", + "60": "1/2", + "67": "1/2", + "68": "1/2", + "69": "1/2", + "70": "1/2", + "71": "1/2", + "72": "1/2", + "78": "-1/2", + "8": "1/2", + "80": "1/2", + "85": "-1/2", + "86": "1/4", + "87": "1/2", + "9": "-1/2", + "92": "-1/2", + "93": "-33795", + "94": "-1/2", + "95": "1/2", + "96": "1/2", + "97": "1/2", + "98": "1/2" + } + }, + "word_sha256": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446" +} diff --git a/research/p104-cut-stability/RUNTIME-PINS.json b/research/p104-cut-stability/RUNTIME-PINS.json new file mode 100644 index 0000000000..f0a689e400 --- /dev/null +++ b/research/p104-cut-stability/RUNTIME-PINS.json @@ -0,0 +1,41 @@ +{ + "RESIDUAL-SOURCE-REPLAY.json": "08c7f37adc98c1b073f773eb22cfd3664d14112093636b9255e374833d3bc7a6", + "RESIDUAL-WORD.json.gz": "de4ac8e256722eac96b764e50b24f1246176f76d2cdcdb9ba06e12f0e3aa6054", + "RESULT.json": "6c1af2f92330a205b5b47a7e9b89fbc613e5a62d009885ade460b7184c731e09", + "SOURCES.json": "aed8235b1770f289d6ec8fd70ea9f64d9d5c59691e8aba0e6fa0885efad58d00", + "TASK.json": "3a5ce44a44ecb406b8f79087ad92d38b1811da8de7126417dc9fa250bb97c3ba", + "VERIFY.json": "8cc70aa7a46f8b1b3c961d73e1892802e65e48765b765ee40751f37984380cb3", + "check.py": "c1cdfe4fbacae20c8a591f6ec49cd6c2aa7a89217656d9aa11614282814f99a3", + "inputs/WORD.json.gz": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446", + "inputs/native_verify.py": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38", + "inputs/source_local.py": "878734dfd64c4b9d362d0ae476cc5c2a19fe93e48b7378763b23f3e0dd0a5a71", + "peer/ENVIRONMENT.json": "50379846d64078fa5fc8694c55be0afcd0d117cab7ca68ab8f2697f49ab83b3a", + "peer/FILES.sha256": "4ddbef65410049bfc1137b1b9cb1870edde113ebbfdbfe9f95f492b154285d20", + "peer/RESULT.json": "1208d41d2089375ea0999b3bbed3b58a83b9e77d92f136d81d0eff8bf4a1af5c", + "peer/SOURCES.json": "5a4943552e9017e71914a35a30f6c03cf1fdcd49ce7eac0f903ee7b2781daa84", + "peer/inputs/CLAIM.json": "828f6bfa47f01bc0debddb6f76e1d75df5ae30324c10f2890f16d443b47ccaa4", + "peer/inputs/WORD.json.gz": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446", + "proof-peer/AUTHOR-RESULT.json": "828f6bfa47f01bc0debddb6f76e1d75df5ae30324c10f2890f16d443b47ccaa4", + "proof-peer/FILES.sha256": "689f2e5a2f7359ea96317c7cd36cbd62c0f2b5b4d1094ca8e90da7d420258d61", + "proof-peer/OPTIMIZED.json": "878e87a229a544f1f4a46f2852d28bf07082e48f22977f549624b0037857c027", + "proof-peer/RESULT.json": "878e87a229a544f1f4a46f2852d28bf07082e48f22977f549624b0037857c027", + "proof-peer/WORD.json.gz": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446", + "proof-peer/review.py": "9d8dc78862f706e4a3a0e4629f8eed206618611a5a6a9f58f3469b60a3152664", + "range-peer/FILES.sha256": "838af11d887e628888da19e42493ede5e644d0d3436421fb6fb9affb333fd7f6", + "range-peer/OPTIMIZED.json": "171acd315908f27ea837d8553df5bd43929127d4f2b8cfbd385fc4b43997bec4", + "range-peer/RESULT.json": "171acd315908f27ea837d8553df5bd43929127d4f2b8cfbd385fc4b43997bec4", + "range-peer/WORD.json.gz": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446", + "range-peer/range.py": "d108365489d96ce25a6f17d9fecacfb6adc8283ddcd5821d2793c946987534ef", + "whole-caller/CHECKS.json": "d411229d8205adceabc1e0f2ebb41c1738ca074c86c562741d29fe7fa5a346ec", + "whole-caller/FILES.sha256": "dcde32907f9da99aa7652f1e9a98134ff71f4d9d9ca42f2db8f327502a5da84e", + "whole-caller/RESULT.json": "5145337b016180f376ca625cefcd6845373ee1cb02f33cf181027292e0ec54cd", + "whole-caller/SOURCES.json": "c079827b29073bc9e303e616ad5c2023b8dbd2fda95a1ed8dcafedd265e9bada", + "whole-caller/check.py": "8e62ca95e8cf49765a7c77bf7354278df38bd18c3354244b7b476840013a8715", + "whole-caller/inputs/CUT-STABILITY-RESULT.json": "7b1cf55ecd8d8aac08c24916fd477acf155a6f63fce1680f505266e8686f33f5", + "whole-caller/inputs/PR5551-RESULT.json": "36a5680f43c7da67e570b6c919de2934c6a5ce46db002993ff162aa36972d0ba", + "whole-caller/inputs/WORD.json.gz": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446", + "whole-caller/inputs/caller.py": "300d40043953e4f6aecfde8f2d1004b8ad6dc5a79ec3c7666c9908c2466c91c8", + "whole-caller/inputs/controller.json": "a84f6bbd547379597464e56c420cc665f96bc43a9a1351eed4b7cd0fce3cc4b9", + "whole-caller/inputs/local.py": "878734dfd64c4b9d362d0ae476cc5c2a19fe93e48b7378763b23f3e0dd0a5a71", + "whole-caller/inputs/physical.json": "b257eb40480269328821e334de3fef6c64a652ff4f0628411a98be398d4cfea0" +} diff --git a/research/p104-cut-stability/SOURCES.json b/research/p104-cut-stability/SOURCES.json new file mode 100644 index 0000000000..181ee30118 --- /dev/null +++ b/research/p104-cut-stability/SOURCES.json @@ -0,0 +1,77 @@ +{ + "base_commit": "13be6ac685845c1ff671f5d26e7166165abd998e", + "copied_sources": [ + { + "copy_path": "research/p104-cut-stability/inputs/source_local.py", + "sha256": "878734dfd64c4b9d362d0ae476cc5c2a19fe93e48b7378763b23f3e0dd0a5a71", + "source_path": "research/p104-productive-controller/local.py" + }, + { + "copy_path": "research/p104-cut-stability/inputs/native_verify.py", + "sha256": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38", + "source_path": "research/p104-native-channel/vendor/native_verify.py" + }, + { + "copy_path": "research/p104-cut-stability/inputs/PRIOR-GRID-README.md", + "sha256": "8ed5890fa0cb995ad90c0b2f8306735ef43c53a00681cc42797bb3a6d4b8a72b", + "source_path": "research/p104-retimed-internal-grid/README.md" + }, + { + "copy_path": "research/p104-cut-stability/inputs/PRIOR-ERROR-README.md", + "sha256": "9d828eeb5e7e5aa57d9f2b00bf68801ec17066bf52d0f3c7e32da8015f49dffd", + "source_path": "research/p104-retimed-error-recovery/README.md" + }, + { + "copy_path": "research/p104-cut-stability/inputs/WORD.json.gz", + "sha256": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446", + "source_path": "research/p104-joint-contact/WORD.json.gz" + } + ], + "files": [ + { + "git_blob": "fc3d4ba105e1f097d0d7d051a308281e86ab1446", + "path": "certificates/selected-result.json", + "sha256": "66974efdced4083c00025f97d95d83909a226cdf801edb9301c195c6641f6903", + "usage": "provenance" + }, + { + "git_blob": "f126dd2e2dad2b669e75d1d0d0bd05c600725602", + "path": "docs/research/agent-task-catalog.json", + "sha256": "f7a48bfa2659b88378282a8eee7d9fe52cdf505594124c4d1686b58510fffd72", + "usage": "provenance" + }, + { + "git_blob": "dbb3d56a4f5b733bb0c32a91249d1f6a7e1ab5d2", + "path": "research/p104-productive-controller/local.py", + "sha256": "878734dfd64c4b9d362d0ae476cc5c2a19fe93e48b7378763b23f3e0dd0a5a71", + "usage": "provenance" + }, + { + "git_blob": "2c209dfa9cfade3bc20ac5fc9d876b433a147f8c", + "path": "research/p104-native-channel/vendor/native_verify.py", + "sha256": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38", + "usage": "provenance" + }, + { + "git_blob": "5324d11bb78606cc1d278554db53462f9faa6373", + "path": "research/p104-retimed-internal-grid/README.md", + "sha256": "8ed5890fa0cb995ad90c0b2f8306735ef43c53a00681cc42797bb3a6d4b8a72b", + "usage": "provenance" + }, + { + "git_blob": "ddc3f9b0c6b12638067bc7dd12c2bf6ba578cf08", + "path": "research/p104-retimed-error-recovery/README.md", + "sha256": "9d828eeb5e7e5aa57d9f2b00bf68801ec17066bf52d0f3c7e32da8015f49dffd", + "usage": "provenance" + }, + { + "git_blob": "c04a815c2662bcd0c48ce9c3067a0fe4a041573a", + "path": "research/p104-joint-contact/WORD.json.gz", + "sha256": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446", + "usage": "provenance" + } + ], + "schema_version": 1, + "scientific_source_head": "1123635a6f63f23638df9459c994160e5e649d30", + "scope": "Provenance uses canonical main. All mathematical runtime inputs are retained copies; no live Git/network/source package is needed." +} diff --git a/research/p104-cut-stability/TASK.json b/research/p104-cut-stability/TASK.json new file mode 100644 index 0000000000..34270a2a6e --- /dev/null +++ b/research/p104-cut-stability/TASK.json @@ -0,0 +1,74 @@ +{ + "schema_version": 1, + "task_id": "uniform-transfer-audit", + "priority_revision": 7, + "base_commit": "13be6ac685845c1ff671f5d26e7166165abd998e", + "original_card": { + "id": "uniform-transfer-audit", + "question": "Does one quantified step of the proposed #4100 all-size construction hold at its actual caller?", + "starting_points": [ + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "research/unconditional-batched-crt/README.md" + ], + "methods": [ + "Prove one missing implication with explicit quantified hypotheses.", + "Find an exact counterexample at the claimed interface boundary." + ], + "acceptance_gate": "Identify the proposition and what would change downstream; do not equate a finite replay with a universal proof.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read PROOF.md and AUDIT.md in #4100. Select one distinct obligation: CRT total repair, native/free-algebra lifting, precision/conditioning, or complete fixed-tape cost. This is an author-submitted proof, not an accepted unconditional theorem.", + "scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately." + }, + "first_experiment": "Check live handoffs; name one proposition, its caller, quantified domain and dependency closure. Independently prove the implication or exhibit a precise gap/counterexample. Prioritize CRT.md total repair or COMPLEX.md free-algebra lift only if unclaimed. Stop at the chosen obligation; do not substitute finite samples or root arithmetic for an all-size proof, or launch the complete package by default.", + "bottleneck_link": "Finite supplier improvements are useful only under the retained transfer obligations.", + "allowed_variations": [ + "One CRT repair, native lift, precision/conditioning or tape-cost proposition, with its exact caller." + ], + "scope_change_triggers": [ + "Replacing a quantified obligation with another finite smoke test.", + "Treating archive intake, an author PASS receipt or a finite composed fixture as discharge of the universal hypotheses." + ], + "overlap_terms": [ + "uniform transfer", + "all-size", + "precision", + "4100", + "unconditional-batched-crt" + ], + "existing_checks": [ + { + "scope": "PR #4100: proposed unconditional construction and finite checks, without independent acceptance.", + "evidence": "research/unconditional-batched-crt/README.md", + "remaining": "Independent proof audit of one caller-bound all-size implication; all other premises remain explicit.", + "status": "author-checked", + "source_commit": "337d04939571a637aeab54a0f58f54fde811663a", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "refined", + "actual_scope": "Bind every exact scalar cut and arbitrary residual interval of the complete P104 word to explicit coordinate range/error constants, with a concrete ADD implementation of owned COPY and a source-specific 265-axis whole-caller majorant.", + "scope_change_reason": "The donor goal requires scientific adoption of the original PR5551 frontier candidate. The selected PR5413 review requires a written source-specific precision/storage application; this contribution supplies concrete local error/range and whole-caller interface evidence while leaving the existing recursive/backend/tape/analytic premises explicit.", + "bottleneck_link": "Exact owned-residual propagation, interval range, all productive/helper inputs and fresh whole-caller ordinary costs are needed before the original kappa candidate can be scientifically admitted. No new kappa is inferred from precision constants.", + "budget_minutes": null, + "stop_rule": "Stop after the current exact-word and caller error/range application is reproducible and independently checked; do not expand another word/geometry family or claim recursive backend or scientific acceptance.", + "outcome": "partial", + "evidence": "Two independent complete all-cut interpreters agree on all25311cuts, both exact maximizers and endpoints; independent witness/range/proof checks and a fresh whole-caller census agree. Registered and cold replay evidence is recorded separately in VALIDATION.md.", + "author": "thu-nmrc, with substantial OpenAI Codex assistance", + "ai_assistance": "Substantial OpenAI Codex assistance, including independent subagents. These are author-side mathematical and code checks, not independent human or formal-kernel acceptance.", + "open_questions": [ + { + "question": "Can source-bound scientific review accept this precision/range specialization together with PR5551 original kappa and its complete caller?", + "why_it_matters": "Archive merging and CI do not admit the original supplier or promote a selected frontier.", + "first_step": "Review the concrete ADD-COPY residual ABI, all-cut Fraction peer, active-fiber proof, whole-caller reservation and fresh ordinary recipe ledger against the selected generic source class.", + "blocked_by": "The existing native/ownership/compiler/precision-tape/analytic premises remain; this package does not implement recursive child internals or a Turing-tape multiplier." + } + ] +} diff --git a/research/p104-cut-stability/VALIDATION.md b/research/p104-cut-stability/VALIDATION.md new file mode 100644 index 0000000000..b6a3c0907d --- /dev/null +++ b/research/p104-cut-stability/VALIDATION.md @@ -0,0 +1,83 @@ +# Executed validation and limits + +Author-side validation on 2026-10-25 used CPython 3.12.13 on macOS arm64, +with only the standard library. These checks establish the finite receipts +and the written lemmas' source bindings. They are not independent human, +proof-kernel or maintainer scientific acceptance. + +## Direct replay + +The package's aggregate `verify.py` ran with `-I -B` and `-I -O -B`. +Both exited zero, in 4.872 and 4.940 wall seconds respectively. Their complete +stdout bytes agree, SHA256 +`ec00d9735cfcf820a03b9e96b716b29898d8da5dafd529ae707f38f9b901f436`. +The marker is `PASS_P104_CUT_STABILITY_AND_CALLER_BOUNDS`. + +Each run authenticates 39 retained runtime files before importing the +mathematical engines. It rejects a newline-corrupted actual word and actual +source interpreter in memory. It then independently recomputes the dyadic +and Fraction all-cut matrices, named maximum-row and eight residual controls, +the all-interval recurrence and exhaustive small interval fixture, both +literal words through the retained typed source interpreter, and the complete +caller census/majorant. The joins compare consumed fields to current receipts; +frozen predecessor/peer snapshots are retained unchanged. + +Both literal words have identical exact endpoints, helper and paid histograms, +735 arbitrary public inputs, eight owned lifetimes, and scalar allowance +217428. Exactly eight COPY records are implemented as ADD. Their arbitrary +owned residuals are deliberately retained. No extra Gaussian call or scalar +tariff is introduced. + +## Repository and transport checks + +The official metadata/source-pin command passed: + +```sh +python3.12 -B scripts/research_package.py --package research/p104-cut-stability --check-only +``` + +The official registered replay also passed both manifest commands, ending in +`PASS_REGISTERED_RESEARCH_PACKAGE research/p104-cut-stability outcome=partial`. +The committed-byte/source-history preflight passed for scientific commit +`1ce6038f8d3c669f686c8f73ac537b214dd6b94f`: all 55 package files matched +their Git blobs and the declared canonical source base was an ancestor. +The official export/check pair passed for exactly those 55 files. + +That export was relocated into a directory with no `.git`, an empty PATH, +file modes 0444 and directory modes 0555. Fresh `-I -B` and `-I -O -B` +runs both exited zero in 4.943 and 4.960 wall seconds. Their stdout matched +the direct runs byte for byte, and the complete inventory and file hashes +were unchanged afterward. The raw tar SHA256 was +`43a9a2da3208eeb14e6401675249132b392542e08e6209d6a3205e97229be04d`. +The direct, registered, initial committed-byte and cold receipts are retained +in `validation/`. Subsequent changes only add these validation/review records +and update this prose; mathematical code, inputs and receipts are unchanged. +The final publication receives its own committed-byte and export preflight. + +## Proof and implementation scope + +The finite all-cut maxima are exact. The all-interval exponent 296 and the +whole-caller exponent 5844 are upper bounds, not asserted maxima. The +265f-dimensional active-fiber conversion is applied once and retains every +active coordinate. Its review credits the existing Ross Richardson / Adam +Gall method. No spectator-count or raw-field factor is silently discarded. + +The whole-caller census is a separate inexpensive source-list replay. It +does not rerun the predecessor native phase or all-column route certificates. +The root does freshly replay the original and ADD-COPY scalar words. +Complete native C-factor interfaces are distinguished from internal scalar +accumulators, literal butterfly implementations and recursive child internals. +Fresh ordinary recipe coefficients and a constructive raw reservation are +not a materialized fixed-tape program or its selected-bit movement tariff. + +The five native/ownership/compiler/precision-tape/analytic premises remain. +There is no new kappa, selected promotion, rounded multiplier or scientific +adoption claim. PR5551 was merged through archival intake; its scientific +admission remains a separate question. + +An additional independent author-side proof review of the assembled root and +whole-caller proof found no scoped mathematical blocker. The sealed +whole-caller proof's bare `HILBERT-FIBER-REVIEW.md` reference resolves to +`whole-caller/inputs/HILBERT-FIBER-REVIEW.md`; the sealed capsule bytes are +retained rather than silently editing that historical reference. +The complete assembled review is retained in `ASSEMBLED-REVIEW.md`. diff --git a/research/p104-cut-stability/VERIFY.json b/research/p104-cut-stability/VERIFY.json new file mode 100644 index 0000000000..f85fe35a38 --- /dev/null +++ b/research/p104-cut-stability/VERIFY.json @@ -0,0 +1,28 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Authenticate retained bytes; reconstruct the literal eight ADD-COPY sites; exhaust every exact source cut with independent dyadic and Fraction interpreters; check all arbitrary public endpoints, suffix residuals, witnesses, interval/range controls, whole-caller inventory and current-source joins. Written norm/fiber proof and native/backend hypotheses remain scoped; no new kappa or scientific admission is claimed." + }, + { + "argv": [ + "{python}", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Authenticate retained bytes; reconstruct the literal eight ADD-COPY sites; exhaust every exact source cut with independent dyadic and Fraction interpreters; check all arbitrary public endpoints, suffix residuals, witnesses, interval/range controls, whole-caller inventory and current-source joins. Written norm/fiber proof and native/backend hypotheses remain scoped; no new kappa or scientific admission is claimed." + } + ] +} diff --git a/research/p104-cut-stability/check.py b/research/p104-cut-stability/check.py new file mode 100644 index 0000000000..0c2b55f73d --- /dev/null +++ b/research/p104-cut-stability/check.py @@ -0,0 +1,270 @@ +"""Exact scalar cut norms for the actual P104 contact word. + +No author constructor, scalar interpreter or pricing engine is imported. +COPY is explicitly implemented as ADD into the freshly initialized owned row. +This agrees on the exact trace and carries arbitrary injected owned residuals. +Prepared for thu-nmrc with substantial OpenAI Codex assistance. Apache-2.0. +""" +import argparse +from collections import Counter +from fractions import Fraction as Q +import gzip +import hashlib +import json +from pathlib import Path + +HERE=Path(__file__).resolve().parent +WORD_SHA='48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446' + +def need(ok,why): + if not ok: + raise ValueError(why) + +def normal(v,e): + if not v: + return {},0 + combo=0 + for n in v.values(): + combo |= abs(n) + shift=min(e,(combo&-combo).bit_length()-1) + return ({i:n>>shift for i,n in v.items()},e-shift) if shift else (v,e) + +def plus(a,b,c): + av,ae=a;bv,be=b + k=c.denominator.bit_length()-1 + need(c.denominator==1<0,'Positive logarithm argument') + b=q.numerator.bit_length()-q.denominator.bit_length() + if b>=0: + return b if q.numerator<=q.denominator*(1<=public and r not in own,'Owned INIT only') + own.add(r);rows[r]=({},0);frames[r]=e[2] + interval_levels[r]=0;interval_den[r]=0 + elif op=='CLEAR': + need(r in own and frames[r]==e[2],'Owned CLEAR only') + own.remove(r);rows[r]=({},0);frames[r]=None + interval_levels[r]=0;interval_den[r]=0 + else: + c=Q(e[-2]);maxcoef=max(maxcoef,abs(c));maxden=max(maxden,c.denominator.bit_length()-1) + need(frames[r]==e[-1],'Scalar destination chart') + if op=='SCALE': + rows[r]=scaled(rows[r],c) + interval_levels[r]=max(0,interval_levels[r]+ceil_log2(abs(c))) + interval_den[r]+=c.denominator.bit_length()-1 + else: + need(op in ('ADD','COPY'),'Known opcode') + s=e[2];need(s!=r and frames[s]==e[-1],'Common scalar chart') + if op=='COPY': + need(r in own and not rows[r][0],'COPY has exact owned zero') + copy_sites.append(t) + rows[r]=plus(rows[r],rows[s],c) + interval_levels[r]=max(interval_levels[r],interval_levels[s]+ceil_log2(abs(c)))+1 + interval_den[r]=max(interval_den[r],interval_den[s]+c.denominator.bit_length()-1) + if interval_levels[r]>interval_power: + interval_power=interval_levels[r] + interval_witness=[t+1,r,interval_power] + interval_den_power=max(interval_den_power,interval_den[r]) + magnitude=norm(rows[r]) + if magnitude>maxp: + maxp=magnitude + wp={'cut':t+1,'role':r,'l1':magnitude,'row':values(rows[r])} + if rows[r][1]>ep: + ep=rows[r][1];ep_witness=[t+1,r,ep] + need(not own and frames[:public]==w['final'],'All declared exits') + live=set(w['live']) + for r,a in enumerate(rows): + expected={r:Q(1)} if r=0,'Nonnegative exact row sum') + if row_sums[out]>maxs: + maxs=row_sums[out] + witness={i:Q(v[out],1<es: + es=ne;es_witness=[cut,r,ne] + for t in range(len(p)-1,-1,-1): + e=p[t];op,r=e[:2] + if op=='MOVE': + continue + if op in ('INIT','CLEAR'): + change(r,({},0),t) + elif op=='SCALE': + change(r,scaled(columns[r],Q(e[-2])),t) + else: + c=Q(e[-2]);s=e[2] + if op=='COPY': + need(columns[r][0],'Injected owned COPY residual reaches a public output') + out=min(columns[r][0]);coefficient=Q(columns[r][0][out],1<= 0, `u <= 2^(-b-13)` gives +`E < B*2^-b`. This is not an addresswise maximum norm. + +Approximate private cancellation need not produce a literal zero. Under the +grid and completed-error premises below, nearest-grid recovery makes all eight +private fields exactly zero before erasure. Their smaller cut-specific constants +give a tighter recovery threshold than using the global maximum there. + +This is an author-checked local precision/cleanup lemma. It supplies neither a +rounded recursive child nor a priced recovery implementation. The existing +[fixed-profile consumer-budget obstruction](../p104-consumer-budget-audit/README.md) +still applies. No supplier, new kappa or selected-frontier change is claimed. + +## Exact object and evidence + +Base: main `4b82082f901945f8d0314f143576c7ad31e021fc`, priority 5. +PR2725 is pinned at `71d24b655c2fdddc063b9aaf285e8425ce197499`. +Its unchanged word has 5,268 events, 358 arbitrary public inputs, 3,104 ADDs, +1,940 transports, 208 exact signs and eight private lifetimes. Every private +field has zero ideal logical row before erasure. Only two of 104 data rows have +the inherited identity correction; this is not a complete identity supplier. + +| Exact quantity | Coefficient | First attaining cut / role | +|---|---:|---| +| Initial-input amplification P | 127/2 | 3433 / X12 | +| Independent unit defects A | 4769/4 | 5069 / X7 | +| Feedback weights K | 6047/4 | 5069 / X7 | +| Ideal-operand weights J | 5534 | 5116 / X54 | +| Native-only unit defects N | 843/2 | 5069 / X7 | + +Cut t means the boundary after the first t literal events. Signs, allocation +and erasure are exact; ADD and transport output errors give 5,044 defect sites. +The private pre-erasure cuts are 1937, 1950, 1961, 1974, 1987, 2000, 2011 and +2026. Their maxima are `J_C=317/2`, `K_C=22`; each cut is in [RESULT.json](RESULT.json). + +Signed sparse forward propagation and reverse covector substitution agree on +every final input/error coefficient, attaining row and private cut. A separate +chronological reverse pass reconstructs the operand weights and all five scores +at **each of the 5,252 non-lifetime event cuts**. Complete score streams have +the same SHA256. Initial states cover cut 0; inserting zero or deleting a row +cannot create a maximum. Unchanged rows retain preceding scores. + +Literal collinear executions attain all five independent-input/defect bounds. +These fixtures do not claim to attain the state-relative feedback bound. Each +private cut has a nonzero-residual fixture that recovers within the strict +radius. Another fixture confirms exported private errors survive erasure. + +## Completed-operation contract and proof + +In the predecessor's actual unitary logical charts, ideal transports are +identities and ADDs are literal rational row operations. Transforming a physical +defect into its instantaneous logical chart preserves its Hilbert norm. Signs +act exactly by -1. Private allocation inserts zero; erasure deletes only its +own row. Native correctness/unitarity, including phases, remains inherited; +this package does not regenerate native recipes. + +Assume a completed transport's output defect is at most `u*||input||`, and +`dst += c*src` has defect at most `u*(||dst||+abs(c)*||src||)`, using actual +preinstruction operands. **All internal child and wrapper errors must fit +this allowance.** Inputs start without error; public helpers may be arbitrary. +Signs and known-zero allocation remain exact. + +Let p_r be the L1 norm of an ideal input-coefficient row before an instruction. +At site j define weights a_j,w_j by + +| Operation | Ideal operand weight a_j | Feedback weight w_j | +|---|---|---| +| Transport of r | p_r | 1 | +| ADD dst += c*src | p_dst + abs(c)*p_src | 1+abs(c) | + +Let C[t,r,j] be the signed response of defect j at cut t in register r, +including subsequent resets. The certificate computes + +``` +J = max_(t,r) sum_j abs(C[t,r,j])*a_j = 5534, +K = max_(t,r) sum_j abs(C[t,r,j])*w_j = 6047/4. +``` + +The actual defect is at most `u*(B*a_j+w_j*E)`, hence +`E <= u*(B*J+K*E)`. Rearranging proves the bound. Correlated, adversarial and +state-dependent defects are permitted. Signs remain until the last triangle +inequality. `J+K=28183/4 < 2^13` proves the uniform 13-bit implication. +Since `J>2^12`, 12 bits fail this sufficient formula; this is **not a numerical +precision lower bound**. + +## Conditional exact recovery + +Let lambda >= 1 and f,h >= 0 be integers. Assume initial physical real and +imaginary components lie in `2^-f Z`, with `B <= 2^h`. Retain PR2813's +[tensor-grid premise](../p104-retimed-internal-grid/README.md): ideal physical +outputs lie on the grid of spacing delta=`2^-F`, where + +``` +F = f + ceil(9*lambda/2) + 2 >= 7. +``` + +Before each private erase, round every physical component to the nearest +multiple of delta, then erase the recovered zero. Ideal private vectors are +zero; Hilbert error strictly below delta/2 bounds every real/imaginary component +and guarantees unique zero recovery. Approximate states need not already lie +on that grid. At the private cuts, + +``` +E_C <= u*(B*J_C + K_C*E) + <= u*B*(317/2 + 22*u*5534/(1-u*6047/4)). +``` + +**Private-only recovery:** `u <= 2^(-F-h-9)` suffices. It is at most `2^-16`. +The parenthesized coefficient increases with u on this interval; at `2^-16` +it is `82156733/512194 < 256`. Thus `E_C < delta/2`. Recovering a private zero +just before deleting it changes no retained row. Earlier exported errors stay +in the model, so the proof applies successively to all eight erasures. + +**All-public-output recovery:** `u <= 2^(-F-h-14)` suffices for exact final grid +recovery and private recovery. Set `b=F+h+1` in the 13-bit implication: +`E < B*2^-b <= delta/2`, then apply the inherited ideal output lattice. + +Strictness matters: half a grid step is ambiguous; just outside it, another +grid point can be nearer. Controls cover both failures, negative values and +several spacings. The recovery rule is a mathematical interface. Its scanning, +rounding, representation, storage and movement costs remain unpriced. The +conditional tensor implication is a written proof, not executed all-size +code or a formal-kernel certificate. + +## Reproduce + +Python 3.12 and standard library; direct replay needs neither Git nor network: + +```sh +python3.12 -I -B research/p104-retimed-error-recovery/verify.py +python3.12 -I -B research/p104-retimed-error-recovery/check_all_cuts.py +python3.12 -I -B research/p104-retimed-error-recovery/test_verify.py +python3.12 scripts/research_package.py --package research/p104-retimed-error-recovery +``` + +Default replay writes nothing. `verify.py --write-result NEW_PATH` creates an +exclusive new receipt. Input SHA256 and Git blob pins are checked before WORD +parsing. No predecessor code is imported. The complete ideal endpoint map and +rank/event census match the pinned predecessor receipt. Source, receipt, +cleanup, chart, coefficient and recovery-radius mutants reject. A relocated +optimized replay tests input closure and unchanged file bytes. +[VALIDATION.md](VALIDATION.md) records actual runs and limitations. + +## Credit and scope delta + +Vasek / flyingviper supplies PR2725's word; Nick Petalas / PR2813 its internal +grid binding. Adam Gall / PR2096 supplies the Hilbert-defect method; ywz65's +[operand-weighted feedback](../p104-operand-weighted-feedback/README.md) and +[different private-macro dual](../p104-dual-precision/README.md) supply the +credited feedback framework. Their numerical constants are not transferred. +Retain commdata2338 / PR2662, ywz65 / PR2586, Ross Richardson's sharp-grid +finding, Rohan Arun / PR1972, Chafik Boukhalfa / PR1991, Adam Gall / PR1940, +Josie Elliston / PR1071, Ali Romman and the inherited E8/Clifford/compiler lineage. +Frozen predecessors are unchanged. Exact pins are in [SOURCES.json](SOURCES.json). + +The delta is this changed word's signed error response and the completed-defect +to exact-private-zero implication. It does not replace the internal-grid +certificate, implement an approximate child or correct the other 102 rows. +The drawn physical correction/cost card changed to this precision side result; +[TASK.json](TASK.json) explains the scope and stopped expansion decision. +Prepared for Arham Tahir with substantial OpenAI Codex assistance in research, +proof, code and checks. Separate algorithms were checked by the same assistant; +no independent human review is claimed. New material is Apache-2.0. + +## Open next questions + +1. Bind an actual rounded rank-1 through rank-8 child, including wrappers and + cancellation inputs, to an explicit u in the completed-output contract. + A per-component or absolute allowance alone does not establish the relative + Hilbert premise. This implementation is required to apply the lemma. +2. Give one physical state/precision and recovery-scan invoice for a viable + owner window. Representation and movement remain unknown, and the present + fixed-profile consumer screen fails. Precision constants alone do not + justify expanding that family. diff --git a/research/p104-cut-stability/inputs/PRIOR-GRID-README.md b/research/p104-cut-stability/inputs/PRIOR-GRID-README.md new file mode 100644 index 0000000000..5324d11bb7 --- /dev/null +++ b/research/p104-cut-stability/inputs/PRIOR-GRID-README.md @@ -0,0 +1,207 @@ +# Exact internal precision for the ADD-retimed P104 dual + +The sharp uniform guard `ceil(9*lambda/2)+2` also applies to Vasek / flyingviper's +[PR2725](https://github.com/CrocSwap/integer-mult-bounds/pull/2725), exact head +`71d24b655c2fdddc063b9aaf285e8425ce197499`. Seven extra fractional bits suffice +and are necessary at one 512-coordinate layer. This includes native internal +butterflies, scalar multiplication temporaries and all eight private erasures. +Initial public physical real and imaginary components may be arbitrary multiples +of `2^-f`. + +This is a **changed-source applicability result**. Ross Richardson's +[sharp Clifford-grid finding](https://github.com/CrocSwap/integer-mult-bounds/discussions/2750#discussioncomment-18959185) +already supplies the denominator argument for the unchanged PR2586 word. +PR2772's sufficient-grid package also binds that earlier word. Neither binding +alone certifies PR2725, whose README explicitly leaves precision transfer open. +Here the literal retimed word, its new recipes, every scalar product and the +sharp witness are rebound. No new Clifford denominator lemma is claimed. + +Native operator correctness and the tensor-lift convention remain inherited. +This is not a paid recursive implementation, physical hosting result, complete +supplier or new kappa. The selected frontier is unchanged. + +## Exact source boundary + +| Input | Exact source | Use | +|---|---|---| +| Retimed word and two new recipes | PR2725 `71d24b655c2fdddc063b9aaf285e8425ce197499` | Actual chronological object | +| 128 fused recipes | commdata2338 / PR2662 `b67542b2896c21106f3945673bbf5b6e131408cc` | Surviving endpoint fusions | +| Original 1,245 recipes | PR2772 `69ba5a423246a1c9281bdd5c1f51240b454f2aa6`, retaining ywz65 / PR2586 | Unchanged native ancestry | +| Sharp-grid argument | Ross Richardson's linked finding | Credited proof method, not predecessor execution | + +[SOURCES.json](SOURCES.json) binds exact copied bytes, Git blobs, paths and +heads. Original notices and source READMEs are retained in `inputs/`. +`kernel.py` adapts PR2772's Gaussian kernels and canonical-chart formulas; +that source is retained byte-for-byte as `inputs/PR2772-arithmetic.py` for +attribution, not execution. Only the dense scalar oracle is a separately +implemented checker. No predecessor executable is imported. The direct replay +needs no Git or network. + +The recipe pool has 1,337 distinct frame-pair keys. The checker binds all +1,940 occurrences, including both new rank-seven/eight edges, and validates +all 1,917 distinct wrapper permutations and quadratic phase descriptions. +The complete paid profile and rank mass 3,542 are unchanged from PR2725. +This is structural and occurrence coverage, not a new cold proof that every +retained native operator equals its stated chart transport. + +## Proof and applicability checks + +### Clifford denominator bound, retained method + +Let a dyadic Gaussian Clifford act on `n` binary coordinates. A computational +basis column is a stabilizer state. Project its stabilizer's Pauli labels onto +the X translations, obtaining a binary subgroup of dimension `h`. The diagonal +Pauli constraints restrict support to one affine coset of that subgroup. +Translation constraints make its `2^h` nonzero amplitudes have equal magnitude. +Unitarity makes that magnitude `2^(-h/2)`. + +Write a nonzero amplitude in reduced dyadic form `(a+ib)/2^d`, with at least +one of `a,b` odd. Its norm gives `a^2+b^2 = 2^(2d-h)`. If exactly one is odd, +the exponent is zero. If both are odd, their squares sum to two modulo four, +so the exponent is one. Thus `d=ceil(h/2)<=ceil(n/2)`. + +Every retained chart, chart inverse, native C gate and Gaussian-unit affine +quadratic monomial is a dyadic Gaussian Clifford. Products and tensor lifts +remain in that class. The validated wrapper schema admits no higher-degree +phase term. Correct association of a recipe with its chart transport remains +an inherited native-correctness premise. + +### The actual retimed chronology + +For register `r`, let `a[r,s]` be its logical scalar coefficient on public input +`s`, `Delta_W` its current chart and `Delta_Vs` input `s`'s initial chart. Its +physical value is + +``` +sum_s a[r,s] * Delta_W * Delta_Vs^-1 * x[s]. +``` + +The independent sparse rational replay checks every common ADD frame and +nested transport. Every stored coefficient is in `(1/4)Z`. Crucially, every +pre-add coefficient product `c*a[source,s]` is also in `(1/4)Z`, before any +cancellation with the target. There are 30,007 such nonzero products and +101,334 stored-row term visits. The largest logical row or product L1 norm +is `127/2`. A separate dense integer interpreter reproduces all products, +eight zero erasures and the complete credited endpoint hash without importing +the rational interpreter or physical kernel. + +During a native prefix, replace `Delta_W` by that prefix composed with the +entrance chart. Relative to each public input's initial inverse chart, the +result is still a dyadic Gaussian Clifford on `n=9*lambda` coordinates. +The denominator bound and the quarter-grid scalar coefficients therefore +put every component on the grid + +``` +2^(-f-ceil(9*lambda/2)-2) Z. +``` + +A partially written C stage stores rows from either the preceding or completed +stage, with the same bound. Four-term integer numerators need no division +until the pair is complete. Every halving and scalar division is exact on +this grid. Scalar products use the separately checked pre-add coefficients. +Induction then preserves all logical rows and exact private zeros. The +all-depth statement is this written argument, not extrapolation from fixtures. + +### Sharpness at the changed source cut + +Set `Y2=2^-f delta_0` and every other public input to zero. In the retimed +word, zero-based event **2040** transports D18 to the full frame. Its Y2 +coefficient is `-1/4`, and Y2's initial chart is empty. The first physical +component at tensor depth `lambda` is + +``` +-2^-f * (1/4) * ((1-i)/32)^lambda. +``` + +It needs exactly `ceil(9*lambda/2)+2` extra fractional bits. At one layer it +is `2^-f*(-1+i)/128`. The actual seven-bit execution reaches integer pair +`(-1,1)` in units of `2^(-f-7)`; six-bit execution rejects an inexact halving. +This is an atomic-boundary witness, independent of the order of commuting +internal tensor factors. It does not exclude per-field grids, rescaling, +changed words or approximate endpoint contracts. + +### Magnitude and scratch + +If each initial real/imaginary component has absolute value less than `H`, +unitarity bounds each relative Clifford row's L1 norm by `2^(9*lambda/2)`. +The checked scalar norm gives component magnitude less than + +``` +H * 2^(ceil((9*lambda+1)/2)+6). +``` + +This covers stored fields, native prefixes and scalar products. Four-term +butterfly scratch needs at most two further magnitude bits. These are finite +format bounds, not physical bit-operation or storage-cost admission. + +## Reproduce + +Standard-library Python 3.12 or later, from the repository root: + +```sh +python3.12 -I -O -B research/p104-retimed-internal-grid/verify.py +python3.12 -I -O -B research/p104-retimed-internal-grid/independent.py +python3.12 -B -m unittest discover -s research/p104-retimed-internal-grid -p 'test_*.py' +python3.12 scripts/research_package.py --package research/p104-retimed-internal-grid +``` + +Expected main marker is `PASS_P104_RETIMED_INTERNAL_GRID`. The main replay +executes the complete 5,268-event word twice, with exact divisions inside every +C butterfly. Y2-delta and all-public dense complex fixtures each match all +183,296 endpoint complex coordinates against a separate canonical-chart +calculation and erase all eight private fields. It also checks the phase +column of both new edges. This is not all-column native recertification. + +Seven semantic faults reject: stale retimed ADD chart, an eighth-grid scalar +product hidden by a coarser final sum, nonbijective wrapper, wrong native rank, +wrong global phase, missing private update and six-bit execution. Tests exercise +literal C/inverse values, the independent integer oracle, Git-free read-only +optimized replay, source corruption, typed receipt corruption and overwrite +refusal. `--out NEW.json` writes exclusively; normal verification writes nothing. + +## Limits and expansion decision + +This closes one precision-transfer implication for the exact PR2725 word. +It does not compose PR2712 with PR2725 or extend a certificate merely because +profiles match. Native/chart correctness and tensor lifting are inherited; +physical fixtures cover one layer. No native compiler regeneration, selected +cold replay, hosted CI or formal-kernel/human review is claimed. + +The conditional consumer-budget objections in +[PR2744](https://github.com/CrocSwap/integer-mult-bounds/pull/2744) and +[PR2741](https://github.com/CrocSwap/integer-mult-bounds/pull/2741) are not removed +by this exact-format result. No owner search or further construction expansion +is proposed. Recursive representation, scalar/address and movement costs, +actual owner windows, idle/residual children, other correction rows and supplier +admission remain unresolved. + +The replay has no recursion or subprocess trees. Managed-runtime allocation is +a deliberate deviation from fixed post-initialization storage. Hash-bound +inputs limit the work to 358 public rows, 5,268 events, 1,375 recipe records, +9-coordinate frames, 512-entry vectors and 64 witness depths. At most two +compiled recipe pools coexist during controls, each with at most 1,917 +512-entry wrapper plans. Python object overhead is not a physical-memory +certificate. The test runner caps child commands at 120 seconds; registered +commands have explicit limits. Runtime guards remain enabled with `-O`. + +## Open next questions + +Can a complete consumer outside the credited conditional budget obstructions +use an admitted recursive representation at these exact entrances and exits? +The first useful step is one actual child invocation with an explicit grid, +scratch, restoration and bit-operation/access/movement bill. Generic residue +cardinalities cannot be added across correlated child inputs. The missing +consumer and recursive implementation contract block supplier admission; +smaller fixed-grid guards alone do not justify another construction round. + +## Credit + +Vasek / flyingviper supplies PR2725 and its explicit precision-transfer caveat. +commdata2338 supplies PR2662's endpoint fusion. ywz65 supplies PR2586 and PR2497; +PR2551 distinguishes the physical boundary. Ross Richardson supplies the sharp +Clifford-grid method and public finding. Nick Petalas supplies PR2772/2754 and +complementary-frame work; Arham Tahir supplies PR2674/2665. The retained lineage +also credits Alejandro Zarzuelo Urdiales, Hiroki Kumazaki, Philippe Van Velzen, +Chafik Boukhalfa, Rohan Arun, Adam Gall, Josie Elliston, Ali Romman, icekylinx and +the upstream geometry/compiler/interpreter contributors. Original notices and +detailed source credit remain unchanged. New material is Apache-2.0. diff --git a/research/p104-cut-stability/inputs/WORD.json.gz b/research/p104-cut-stability/inputs/WORD.json.gz new file mode 100644 index 0000000000..c04a815c26 Binary files /dev/null and b/research/p104-cut-stability/inputs/WORD.json.gz differ diff --git a/research/p104-cut-stability/inputs/native_verify.py b/research/p104-cut-stability/inputs/native_verify.py new file mode 100644 index 0000000000..2c209dfa9c --- /dev/null +++ b/research/p104-cut-stability/inputs/native_verify.py @@ -0,0 +1,277 @@ +"""Check native operators with exact Gaussian dyadic arithmetic. + +The interpreter is adapted from the independent campaign native review. +It does not import the source-code producer or the Clifford compiler. +Research used OpenAI Codex under the user's direction. +""" + +from functools import lru_cache + + +def require(condition, label): + if not condition: + raise ValueError(label) + + +def parity(value): + return value.bit_count() % 2 + + +def mul(matrix, vector): + return sum(parity(row & vector) << i for i, row in enumerate(matrix)) + + +def transpose(matrix): + return tuple(sum(((row >> j) & 1) << i for i, row in enumerate(matrix)) for j in range(len(matrix))) + + +def inverse(matrix): + n = len(matrix) + rows = [row | (1 << (n+i)) for i, row in enumerate(matrix)] + for j in range(n): + pivot = next((i for i in range(j, n) if rows[i] >> j & 1), None) + require(pivot is not None, 'singular binary chart') + rows[j], rows[pivot] = rows[pivot], rows[j] + for i in range(n): + if i != j and rows[i] >> j & 1: + rows[i] ^= rows[j] + require([row & ((1 << n)-1) for row in rows] == [1 << i for i in range(n)], 'binary inverse') + return tuple(row >> n for row in rows) + + +def extend(vectors, n): + columns, pivots = [], {} + for value in tuple(vectors) + tuple(1 << i for i in range(n)): + reduced = value + while reduced: + j = reduced.bit_length()-1 + if j not in pivots: + pivots[j] = reduced + columns.append(value) + break + reduced ^= pivots[j] + require(len(columns) == n, 'frame basis extension') + return tuple(columns) + + +def adjoint(circuit): + out = [] + for gate in reversed(circuit): + if gate[0] == 'P': + out.append(('P', inverse(gate[1]))) + elif gate[0] == 'D': + out.append(('D', gate[1], tuple(-a % 4 for a in gate[2]))) + elif gate[0] == 'C': + out.append(('C', gate[1], -gate[2])) + elif gate[0] == 'phase': + out.append(('phase', -gate[1] % 4)) + else: + require(gate[0] == 'X', 'adjoint gate type') + out.append(gate) + return tuple(out) + + +def fourier(rank): + return tuple(('C', 1 << i, 1) for i in range(rank)) + + +def frame(vectors, n): + rank = len(vectors) + if rank == 0: + return () + if rank == n: + return fourier(n) + matrix = transpose(extend(vectors, n)) + columns = transpose(inverse(matrix)) + quadratic = tuple((1 << i) ^ sum(parity(a & b) << j for j, b in enumerate(columns)) for i, a in enumerate(columns)) + diagonal = tuple((row >> i) & 1 for i, row in enumerate(quadratic)) + chart = (('P', matrix), ('D', quadratic, diagonal)) + return adjoint(chart) + fourier(rank) + chart + + +def monomial(record): + matrix = tuple(record['matrix_rows']) + quadratic = tuple(record['quadratic_rows']) + linear = tuple(record['linear_Z4']) + require(transpose(quadratic) == quadratic, 'quadratic symmetry') + require(len(matrix) == len(quadratic) == len(linear) == 9, 'monomial dimension') + require(all(a % 2 == (quadratic[i] >> i) & 1 for i, a in enumerate(linear)), 'diagonal parity') + inverse(matrix) + return (('D', quadratic, linear), ('P', matrix), ('X', record['offset']), ('phase', record['phase'])) + + +def recipe(record): + rank = record['rank'] + require(isinstance(rank, int) and 0 <= rank <= 9, 'child rank') + if rank == 0: + require(record['right'] is None, 'rank zero right factor') + return monomial(record['left']) + return monomial(record['right']) + fourier(rank) + monomial(record['left']) + + +def tableau(circuit, n=9): + rows = [(1 << i, 0, 0) for i in range(n)] + [(0, 1 << i, 0) for i in range(n)] + for gate in circuit: + tag = gate[0] + out = [] + inverse_transpose = transpose(inverse(gate[1])) if tag == 'P' else None + for x, z, phase in rows: + if tag == 'P': + x, z = mul(gate[1], x), mul(inverse_transpose, z) + elif tag == 'X': + phase += 2 * parity(z & gate[1]) + elif tag == 'C': + if parity(z & gate[1]): + x ^= gate[1] + phase += 3 * gate[2] + elif tag == 'D': + quadratic, linear = gate[1:] + phase += sum(linear[i] for i in range(n) if x >> i & 1) + phase += 2 * sum(parity((quadratic[i] >> (i+1)) & (x >> (i+1))) for i in range(n) if x >> i & 1) + z ^= mul(quadratic, x) + else: + require(tag == 'phase', 'tableau gate type') + out.append((x, z, phase % 4)) + rows = out + return tuple(rows) + + +@lru_cache(maxsize=512) +def action(gate): + if gate[0] == 'P': + return tuple(mul(gate[1], x) for x in range(512)) + require(gate[0] == 'D', 'state action type') + quadratic, linear = gate[1:] + return tuple((sum(linear[i] for i in range(9) if x >> i & 1) + + 2 * sum(parity((quadratic[i] >> (i+1)) & (x >> (i+1))) for i in range(9) if x >> i & 1)) % 4 for x in range(512)) + + +def rotate(pair, power): + a, b = pair + return ((a, b), (-b, a), (-a, -b), (b, -a))[power % 4] + + +def state(circuit, basis=0): + value, denominator = {basis: (1, 0)}, 0 + for gate in circuit: + tag = gate[0] + result = {} + if tag == "C": + direction, sign = gate[1:] + for address, (a, b) in value.items(): + for target, pair in ((address, (a - sign*b, b + sign*a)), + (address ^ direction, (a + sign*b, b - sign*a))): + old = result.get(target, (0, 0)) + result[target] = (old[0] + pair[0], old[1] + pair[1]) + denominator += 1 + else: + for address, pair in value.items(): + if tag == "P": + target = mul(gate[1], address) + elif tag == "X": + target = address ^ gate[1] + else: + target = address + if tag == "D": + pair = rotate(pair, action(gate)[address]) + else: + require(tag == "phase", "Unknown Gaussian state gate") + pair = rotate(pair, gate[1]) + require(target not in result, "A monomial address map is not injective") + result[target] = pair + value = {address: pair for address, pair in result.items() if pair != (0, 0)} + while denominator and all((a | b) % 2 == 0 for a, b in value.values()): + denominator -= 1 + value = {address: (a//2, b//2) for address, (a, b) in value.items()} + return value, denominator + + +def equal(actual, expected, label): + require(tableau(actual) == tableau(expected), label + ": signed Pauli action") + require(state(actual) == state(expected), label + ": exact global phase") + + +def verify(data, certificate): + word = data["word"] + original, clean = data["programs"], data["clean_programs"] + source_recipes = data["recipes"] + residuals = data["residuals"]["recipes"] + native_tags = {"climb", "adapter", "residual_adapter"} + for orientation in ("forward", "backward"): + native = [event for event in clean[orientation] if event[0] in native_tags] + require(native == [event for event in original[orientation] if event[0] in native_tags], + "A retained native event changed") + require(len(native) == 5056, "The retained native event count changed") + frames = [frame(tuple(vectors), 9) for vectors in word["frames"]] + used = {(event[3], event[4]) for program in clean.values() + for event in program if event[0] == "climb"} + children = {(record["old"], record["new"]): record for record in source_recipes["children"]} + require(len(children) == len(source_recipes["children"]) and used <= set(children), + "The retained child recipe coverage is incomplete") + for old, new in sorted(used): + record = children[old, new] + require(record["rank"] == len(word["frames"][new]) - len(word["frames"][old]), + "A retained child has the wrong rank") + equal(recipe(record), adjoint(frames[old]) + frames[new], "Retained child") + endpoints = {(record["role"], record["port"]): record + for record in source_recipes["endpoint_adapters"]} + require(len(endpoints) == len(source_recipes["endpoint_adapters"]) + and set(endpoints) == {(role, p) for role in ("source", "target") for p in range(112)}, + "The endpoint adapter coverage is incomplete") + for (role, port), record in endpoints.items(): + direction = word["ports"][port] + conventional = (("C", direction, 1),) if role == "source" else ( + ("C", direction, -1),) + fourier(9) + index = word["start"][port] if role == "source" else word["final"][112 + port] + require(record["frame"] == index and record["rank"] == 0, "An endpoint frame changed") + equal(recipe(record), adjoint(conventional) + frames[index], "Endpoint adapter") + used_residuals = set() + for program in clean.values(): + for event in program: + if event[0] != "residual_adapter": + continue + _, position, register, entry, *tail = event + terminal = tail[0] if tail else 1 + key = str(entry) if terminal == 1 else str(entry) + ":" + str(terminal) + require(key in residuals and position in ("pre", "post"), "A residual binding changed") + require(entry == word["start"][register] and terminal == word["final"][register], + "A residual endpoint changed") + used_residuals.add(key) + for key in sorted(used_residuals): + record = residuals[key] + equal(recipe(record), adjoint(frames[record["frame"]]) + frames[record.get("terminal", 1)], + "Residual adapter") + records = certificate["input_recipes"] + ports = certificate["compensation_ports"] + require([record["port"] for record in records] == ports and len(records) == 8, + "The eight input recipes changed") + columns = 0 + for item in records: + port, label = item["port"], item["label"] + require(label == word["ports"][port] and item["canonical_start_frame_id"] == word["start"][port], + "An input recipe has the wrong supplier label") + record = item["recipe"] + require(record["rank"] == 1, "An input copy has the wrong child rank") + for side in ("left", "right"): + factor = record[side] + require(factor["quadratic_rows"] == [0] * 9 and factor["linear_Z4"] == [0] * 9 + and factor["offset"] == factor["phase"] == 0, + "An input factor is not an address permutation") + actual, expected = recipe(record), (("C", label, 1),) + equal(actual, expected, "Positive inherited input line") + for basis in range(512): + require(state(actual, basis) == state(expected, basis), "A complete input Gaussian column differs") + columns += 1 + negative = monomial(record["right"]) + (("C", 1, -1),) + monomial(record["left"]) + require(tableau(negative) != tableau(expected) or state(negative) != state(expected), + "An inverse input child was not detected") + phased = actual + (("phase", 1),) + require(tableau(phased) == tableau(actual) and state(phased) != state(expected), + "An input phase-only error was not detected") + return {"status": "PASS_EXACT_INPUT_NATIVE_FRAMES", "retained_native_events_per_orientation": 5056, + "retained_child_recipes": len(used), "endpoint_adapter_recipes": len(endpoints), + "residual_adapter_recipes": len(used_residuals), "new_input_recipes": len(records), + "new_exact_gaussian_columns": columns, "inverse_input_child_controls": len(records), + "phase_only_controls": len(records), "address_permutation_factors": 2 * len(records), + "method": "Independent signed Pauli and exact Gaussian interpretation; no compiler import", + "scope": "Positive inherited input frames before every retained adapter. No recursive hosting claim."} diff --git a/research/p104-cut-stability/inputs/source_local.py b/research/p104-cut-stability/inputs/source_local.py new file mode 100644 index 0000000000..dbb3d56a4f --- /dev/null +++ b/research/p104-cut-stability/inputs/source_local.py @@ -0,0 +1,264 @@ +"""Replay the credited P104 word and its complete native interfaces. + +David Arias supplied the coalesced word. Cinna Davis supplied private reuse. +Gareth Davidson supplied their composition. Ali Romman prepared this caller +with substantial OpenAI Codex assistance. Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as Q +from functools import lru_cache +from hashlib import sha256 +from pathlib import Path +import gzip +import importlib.util +import json +import sys +import tarfile +import tempfile + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +PREFIX = 'research/p104-coalesced-private-reuse/' +GEOMETRY = ('research/complex-block-rank-optimum/inputs/selected.json.gz', + 'research/frame-sa504/inputs/hamming/PROTOTYPE.json', + 'research/p104-native-channel/inputs/P104-FIXTURE.json') + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +def read(path): + raw = path.read_bytes() + return json.loads(gzip.decompress(raw) if path.suffix == '.gz' else raw) + + +def load(path, name): + spec = importlib.util.spec_from_file_location(name, path) + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + + +def add(dst, src, q): + for k, v in tuple(src.items()): + value = dst.get(k, 0) + q*v + if value: + dst[k] = value + else: + dst.pop(k, None) + + +def span(basis): + out = {0} + for v in basis: + need(type(v) is int and 0 < v < 512 and v not in out, 'Independent binary basis') + out |= {x ^ v for x in tuple(out)} + return frozenset(out) + + +def construct(): + """Rebuild the published source without its obsolete owner-price engine.""" + manifest = read(ROOT / (PREFIX+'SOURCES.json')) + archive, = manifest['archives'] + raw = (ROOT / (PREFIX+'predecessor2152.tar.gz')).read_bytes() + need(sha256(raw).hexdigest() == archive['sha256'], 'Exact predecessor archive') + pins = {x['path']: x for x in archive['members']} + with tempfile.TemporaryDirectory(prefix='p104-source-') as tmp: + root = Path(tmp) + with tarfile.open(ROOT / (PREFIX+'predecessor2152.tar.gz')) as data: + members = data.getmembers() + need(len(members) == len(pins) == 11 and {m.name for m in members} == set(pins), 'Archive inventory') + for m in members: + need(m.isfile() and not Path(m.name).is_absolute() and '..' not in Path(m.name).parts, 'Archive file') + raw = data.extractfile(m).read() + need(sha256(raw).hexdigest() == pins[m.name]['sha256'], 'Archive member pin') + path = root/m.name + path.parent.mkdir(parents=True, exist_ok=True) + path.write_bytes(raw) + for path in GEOMETRY: + target = root/path + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes((ROOT/path).read_bytes()) + C = load(root/'research/p104-interleaved-search/coalesced.py', 'productive_p104_coalesced') + A = load(ROOT/(PREFIX+'compose.py'), 'productive_p104_composition') + built = A.construct(C, C.construct()) + need(built['report'] == read(ROOT/(PREFIX+'RESULT.json'))['composition'], 'Published complete source report') + frames, numbers = [], {} + def frame(basis): + key = tuple(basis) + if key not in numbers: + numbers[key] = len(frames) + frames.append(list(key)) + return numbers[key] + initial = [frame(C.F.basis(x)) for x in built['initial']] + final = [frame(C.F.basis(x)) for x in built['final']] + live = [r for r in range(112) if len(built['initial'][r]) == 2] + edges = built['transport_edges'] + program = [] + for e in built['scalar_operations']: + op = e['kind'] + if op == 'transport': + edge = edges[e['occurrence']] + program.append(['MOVE', edge['register'], frame(edge['source_frame']), frame(edge['target_frame']), edge['private']]) + elif op in ('private_init', 'private_discard'): + program.append(['INIT' if op == 'private_init' else 'CLEAR', e['register'], frame(e['frame'])]) + else: + program.append([{'add':'ADD', 'scale':'SCALE', 'private_copy':'COPY'}[op], *e['registers'], e['coefficient'], frame(e['frame'])]) + return {'schema':'p104-productive-source/1', 'public':735, 'live':live, 'ports':built['ports'], + 'frames':frames, 'initial':initial, 'final':final, 'program':program} + + +def replay(w): + need(len(w['program']) < 26000, 'Fixed operation bound') + frames = [span(x) for x in w['frames']] + rows = [{r:Q(1)} for r in range(743)] + current = list(w['initial']) + [None]*8 + paid, scalar, live_owned, peak = Counter(), 0, set(), 0 + for e in w['program']: + op, r = e[:2] + need(0 <= r < 743, 'Role index') + if op == 'MOVE': + _, r, a, b, private = e + need(current[r] == a and (r in live_owned) == private, 'Transport source and ownership') + need(frames[b] < frames[a] if private else frames[a] < frames[b], 'Nested chronological transport') + paid[abs(len(w['frames'][b])-len(w['frames'][a]))] += 1 + current[r] = b + elif op == 'INIT': + need(r >= 735 and r not in live_owned, 'Owned initialization') + live_owned.add(r) + peak = max(peak, len(live_owned)) + rows[r] = {} + current[r] = e[2] + scalar += 2 + elif op == 'CLEAR': + need(r in live_owned and current[r] == e[2], 'Owned erasure at declared frame') + rows[r] = {} + current[r] = None + live_owned.remove(r) + scalar += 2 + else: + q, f = Q(e[-2]), e[-1] + need(q and current[r] == f, 'Scalar destination and coefficient') + n, d = abs(q.numerator), q.denominator + need(d & (d-1) == 0, 'Dyadic scalar coefficient') + need(abs(q)+1 < 2**16, 'Fixed scalar growth bound') + if op == 'SCALE': + need(n & (n-1) == 0, 'Dyadic unit SCALE') + rows[r] = {k:q*x for k,x in rows[r].items()} + scalar += 2*(abs(n.bit_length()-d.bit_length()) + int(q < 0)) + else: + s = e[2] + need(s != r and 0 <= s < 743 and current[s] == f, 'Common scalar chart') + if op == 'COPY': + need(r in live_owned and not rows[r], 'COPY into cleared owned field') + rows[r] = {k:q*x for k,x in rows[s].items()} + else: + need(op == 'ADD', 'Scalar opcode') + add(rows[r], rows[s], q) + scalar += 2*(3+n.bit_length()-1+n.bit_count()+d.bit_length()-1) + need(not live_owned and peak == 1 and current[:735] == w['final'], 'All public and owned exits') + live = set(w['live']) + for r,row in enumerate(rows): + expected = {r:Q(1)} if r < 735 else {} + if r-112 in live: + expected[r-112] = Q(1) + need(row == expected, 'All 743 public and owned rows') + main = live | {r+112 for r in live} + helpers = Counter(len(w['frames'][w['final'][r]])-len(w['frames'][w['initial'][r]]) for r in range(735) if r not in main) + need(len(live) == len(w['ports']) == 104 and len(main) == 208 and min(helpers) > 0, 'Independent productive inputs') + return {'paid':dict(paid), 'helpers':dict(helpers), 'public_inputs':735, 'owned_lifetimes':8, + 'peak_owned_fields':peak, 'real_scalar_allowance':scalar, 'endpoint_coefficients':743*743} + + +def reverse_columns(w): + """Check the transpose with dense dyadic rows and the reverse chronology.""" + n = 743 + rows = [[int(i == j) for j in range(n)] for i in range(n)] + exponents = [0]*n + for e in reversed(w['program']): + op,r = e[:2] + if op == 'MOVE': + continue + if op in ('INIT','CLEAR'): + rows[r] = [0]*n + exponents[r] = 0 + continue + q = Q(e[-2]) + qe = q.denominator.bit_length()-1 + if op == 'SCALE': + rows[r] = [q.numerator*x for x in rows[r]] + exponents[r] += qe + else: + s = e[2] + level = max(exponents[s], exponents[r]+qe) + a, b = 1 << (level-exponents[s]), q.numerator << (level-exponents[r]-qe) + rows[s] = [a*x+b*y for x,y in zip(rows[s],rows[r])] + exponents[s] = level + if op == 'COPY': + rows[r] = [0]*n + exponents[r] = 0 + r = s + while exponents[r] and not any(x & 1 for x in rows[r]): + rows[r] = [x//2 for x in rows[r]] + exponents[r] -= 1 + for r,row in enumerate(rows): + expected = [0]*n + if r < 735: + expected[r] = 1 << exponents[r] + if r in w['live']: + expected[r+112] = 1 << exponents[r] + need(row == expected, 'Independent dense transpose columns') + return {'columns':n, 'coefficients':n*n, 'arithmetic':'Dense integer rows with binary denominators; reverse chronology'} + + +def native(w): + C = load(ROOT/'research/p104-native-channel/vendor/clifford_exact.py', 'p104_productive_clifford') + V = load(ROOT/'research/p104-native-channel/vendor/native_verify.py', 'p104_productive_gaussian') + @lru_cache(None) + def chart(i): + return C.canonical_frame(9, tuple(w['frames'][i])) + recipes = {} + def check(a,b): + if (a,b) not in recipes: + recipe,_ = C.lower_child(chart(a).adjoint().then(chart(b))) + expected = V.adjoint(V.frame(w['frames'][a],9)) + V.frame(w['frames'][b],9) + V.equal(V.recipe(recipe),expected,'Native chart change and exact global phase') + need(recipe['rank'] == abs(len(w['frames'][a])-len(w['frames'][b])), 'Native boundary rank') + recipes[a,b] = recipe + return recipes[a,b] + for e in w['program']: + if e[0] == 'MOVE': + check(e[2],e[3]) + main = set(w['live']) | {r+112 for r in w['live']} + helper_profile = Counter() + for r in range(735): + if r not in main: + helper_profile[check(w['initial'][r],w['final'][r])['rank']] += 1 + adapters = [] + for r,q in zip(w['live'],w['ports']): + need(w['frames'][w['initial'][r]] == [q], 'Literal central port') + need(span(w['frames'][w['final'][r+112]]) == frozenset(x for x in range(512) if not (x&q).bit_count()%2), 'Literal output hyperplane') + tests = [ + (C.cgate(9,q,1).adjoint().then(chart(w['initial'][r])), V.adjoint((('C',q,1),))+V.frame(w['frames'][w['initial'][r]],9)), + (chart(w['final'][r+112]).adjoint().then(C.cgate(9,q,-1).then(C.fourier(9))), V.adjoint(V.frame(w['frames'][w['final'][r+112]],9))+(('C',q,-1),)+V.fourier(9))] + for actual,expected in tests: + recipe,_ = C.lower_child(actual) + need(recipe['rank'] == 0, 'Free intrinsic main adapter') + V.equal(V.recipe(recipe),expected,'Main endpoint phase') + adapters.append(recipe) + bad = json.loads(json.dumps(next(iter(recipes.values())))) + bad['left']['phase'] = (bad['left']['phase']+1)%4 + a,b = next(iter(recipes)) + try: + V.equal(V.recipe(bad),V.adjoint(V.frame(w['frames'][a],9))+V.frame(w['frames'][b],9),'Wrong phase control') + except ValueError: + pass + else: + raise ValueError('Wrong native phase accepted') + payload = [[a,b,recipes[a,b]] for a,b in sorted(recipes)] + adapters + return {'distinct_maps':len(recipes),'main_adapters':len(adapters),'helper_normalizers':2*sum(helper_profile.values()), + 'helpers':dict(helper_profile),'recipe_payload_sha256':sha256(json.dumps(payload,sort_keys=True,separators=(',',':')).encode()).hexdigest(), + 'wrong_phase_rejected':True, 'proof':'Every signed Pauli image and exact global phase; frame induction at every positive tensor width'} diff --git a/research/p104-cut-stability/peer/ENVIRONMENT.json b/research/p104-cut-stability/peer/ENVIRONMENT.json new file mode 100644 index 0000000000..9d2ad4cccf --- /dev/null +++ b/research/p104-cut-stability/peer/ENVIRONMENT.json @@ -0,0 +1,4 @@ +{ + "author_cpu_seconds": 2.3646179999999997, + "cpu_cap_seconds": 60 +} diff --git a/research/p104-cut-stability/peer/FILES.sha256 b/research/p104-cut-stability/peer/FILES.sha256 new file mode 100644 index 0000000000..e7e94c7fa0 --- /dev/null +++ b/research/p104-cut-stability/peer/FILES.sha256 @@ -0,0 +1,7 @@ +50379846d64078fa5fc8694c55be0afcd0d117cab7ca68ab8f2697f49ab83b3a ENVIRONMENT.json +fe3edcd3e15c930df9a927756fd362de56e387de3a3e401e7f923764ba0bfc91 README.md +1208d41d2089375ea0999b3bbed3b58a83b9e77d92f136d81d0eff8bf4a1af5c RESULT.json +5a4943552e9017e71914a35a30f6c03cf1fdcd49ce7eac0f903ee7b2781daa84 SOURCES.json +828f6bfa47f01bc0debddb6f76e1d75df5ae30324c10f2890f16d443b47ccaa4 inputs/CLAIM.json +48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446 inputs/WORD.json.gz +cadb269303bb74b32b6260d913b1c0e7b52dedd6f78ad821078025e50a7b2a1a verify.py diff --git a/research/p104-cut-stability/peer/README.md b/research/p104-cut-stability/peer/README.md new file mode 100644 index 0000000000..9a0506423a --- /dev/null +++ b/research/p104-cut-stability/peer/README.md @@ -0,0 +1,29 @@ +# Independent all-cut logical scalar norm audit + +The exact finite-word claim passes an independent implementation using Python Fraction arithmetic. The checker does not import or copy the parent's dyadic arithmetic, interpreter, norm helpers, compiler, or pricing engine. It reads the published word and compares its independently generated mathematical witnesses with the retained claim. This is a separate AI worker in the same research team, not independent human review. + +| Quantity | Independently verified maximum | Maximizing cut | +|---|---:|---:| +| Prefix logical matrix infinity norm | 131072 | 24096 | +| Suffix logical matrix infinity norm | 135415/4 | 24297 | +| Prefix entry dyadic denominator exponent | 4 | 21436 | +| Suffix entry dyadic denominator exponent | 17 | 24214 | + +Cut k means the state after the first k of the 25,310 events, with cut zero the entry. Both directions cover all 25,311 cuts. The prefix maximizer is role 93 with row {86: -65536, 93: -65536}. The suffix maximizer is public output 205 with 111 nonzero current-role coefficients; its complete exact row is in RESULT.json. The maximum-value witnesses, denominator maxima, and their witnesses agree exactly with the retained claim. + +The forward calculation stores Fraction sparse rows over all 735 arbitrary public originals; the original eight owned roles start at exact zero and are initialized and cleared according to the word. MOVE is identity in the word's logical coordinate representation. A scalar event changes one row, so inspecting that row and retaining the previous maximum covers every current row at every cut. The checker verifies all 743 final rows, including the eight cleared owned roles. + +The reverse calculation stores Fraction sparse columns of the response to all 743 possible current-role perturbations, measured in the 735 public endpoints. It maintains each endpoint's absolute row sum exactly when a column changes. Therefore the reported suffix quantity is a matrix infinity norm, not a maximum column norm. All 743 entry columns are checked against the complete prescribed endpoint map. + +COPY is implemented as ADD into a newly initialized owned zero on the ideal trace. Its derivative retains an arbitrary perturbation already in the target. Reverse COPY therefore adds the target response into the source response without resetting the target column. RESULT.json retains the entire nonzero public response of every one of the eight owned residual controls, with supports 55, 55, 54, 54, 57, 57, 57, and 57. Replacing COPY with assignment would suppress those target-residual columns and would describe a different error interface. INIT and CLEAR reset owned roles only. + +The direct run completed in 2.364618 CPU seconds under an explicit 60 CPU second cap. If that cap is reached, the checker raises an incomplete-audit error instead of writing a partial success. Normal and optimized runs passed and compare against the frozen mathematical receipt: + +```sh +python3.12 verify.py +python3.12 -O verify.py +``` + +Runtime is closed within this folder and uses only the Python standard library. It performs no network or Git access and imports no parent implementation. `--write` explicitly authors receipts; neither verification command writes them. ENVIRONMENT.json contains development timing only and is excluded from mathematical comparisons. FILES.sha256 fixes the complete payload inventory. + +The result specializes logical scalar stability to this finite published word. It does not verify the separate chart-diagram norm proof, internal recursive-child implementation, fixed-point rounding allocation, movement or tape bounds, complete caller precision admission, or any new kappa. It does not establish scientific adoption or selected promotion. diff --git a/research/p104-cut-stability/peer/RESULT.json b/research/p104-cut-stability/peer/RESULT.json new file mode 100644 index 0000000000..900ad0b6e5 --- /dev/null +++ b/research/p104-cut-stability/peer/RESULT.json @@ -0,0 +1,657 @@ +{ + "COPY_residual_controls": [ + { + "entire_public_response": { + "112": "1", + "113": "1", + "114": "1", + "116": "1", + "117": "1", + "118": "1", + "119": "-1", + "120": "1", + "121": "-1", + "122": "-1", + "123": "-1", + "137": "1", + "138": "1", + "139": "1", + "140": "1", + "141": "1", + "142": "1", + "169": "-1", + "170": "1", + "171": "1", + "172": "1", + "174": "-1", + "175": "-1", + "176": "1", + "177": "1", + "178": "1", + "179": "1", + "180": "1", + "181": "1", + "182": "1", + "183": "1", + "184": "1", + "185": "1", + "186": "1", + "187": "1", + "191": "-1", + "192": "1", + "193": "-1", + "194": "1", + "195": "1", + "196": "1", + "198": "1", + "199": "1", + "200": "1", + "201": "1", + "202": "1", + "203": "1", + "204": "-1", + "206": "-1", + "207": "1", + "208": "1", + "209": "1", + "704": "1/2", + "705": "1/2", + "706": "1/2" + }, + "event": 13491, + "owned": 735 + }, + { + "entire_public_response": { + "112": "1", + "113": "1", + "118": "1", + "119": "-1", + "124": "1", + "125": "1", + "127": "1", + "128": "1", + "129": "-1", + "130": "-1", + "131": "-1", + "139": "-1", + "140": "-1", + "141": "-1", + "142": "-1", + "143": "1", + "150": "-1", + "152": "-1", + "153": "1", + "154": "1", + "155": "1", + "156": "1", + "163": "1", + "164": "1", + "165": "1", + "166": "1", + "167": "1", + "168": "1", + "169": "1", + "170": "-1", + "171": "-1", + "172": "-1", + "185": "1", + "186": "1", + "187": "1", + "189": "-1", + "190": "1", + "193": "-1", + "194": "1", + "195": "1", + "196": "1", + "198": "-1", + "199": "-1", + "204": "1", + "211": "1", + "212": "1", + "213": "1", + "214": "1", + "215": "-1", + "216": "1", + "217": "1", + "218": "1", + "707": "1/2", + "708": "1/2", + "733": "1/2" + }, + "event": 13502, + "owned": 736 + }, + { + "entire_public_response": { + "112": "-1", + "116": "-1", + "117": "-1", + "119": "-1", + "120": "1", + "125": "-1", + "127": "-1", + "128": "1", + "134": "1", + "135": "1", + "136": "1", + "138": "1", + "139": "1", + "144": "-1", + "145": "-1", + "147": "1", + "153": "1", + "154": "1", + "155": "1", + "156": "1", + "157": "1", + "160": "-1", + "161": "-1", + "162": "-1", + "163": "-1", + "164": "-1", + "165": "-1", + "169": "1", + "176": "1", + "177": "1", + "178": "1", + "179": "-1", + "180": "-1", + "181": "-1", + "190": "-1", + "192": "-1", + "193": "1", + "197": "-1", + "199": "-1", + "200": "-1", + "204": "-1", + "207": "1", + "208": "1", + "209": "1", + "210": "-1", + "211": "-1", + "216": "1", + "217": "1", + "218": "1", + "219": "1", + "220": "1", + "221": "1", + "709": "-1/2", + "732": "-1/2" + }, + "event": 13513, + "owned": 737 + }, + { + "entire_public_response": { + "113": "1", + "118": "-1", + "120": "-1", + "122": "1", + "123": "1", + "124": "-1", + "127": "-1", + "129": "-1", + "132": "-1", + "136": "1", + "138": "1", + "140": "1", + "143": "1", + "144": "1", + "147": "1", + "148": "-1", + "149": "-1", + "150": "1", + "153": "-1", + "154": "-1", + "157": "-1", + "158": "-1", + "159": "-1", + "160": "-1", + "164": "1", + "165": "1", + "168": "1", + "170": "-1", + "174": "-1", + "175": "-1", + "178": "1", + "179": "-1", + "182": "-1", + "183": "-1", + "187": "1", + "189": "1", + "192": "-1", + "194": "-1", + "197": "1", + "198": "1", + "200": "1", + "202": "1", + "203": "1", + "207": "-1", + "210": "-1", + "212": "-1", + "215": "-1", + "217": "1", + "218": "1", + "219": "-1", + "222": "-1", + "223": "-1", + "710": "-1/2", + "734": "-1/2" + }, + "event": 13522, + "owned": 738 + }, + { + "entire_public_response": { + "113": "-1/2", + "118": "1/2", + "120": "1/2", + "121": "-1/2", + "122": "-1/2", + "123": "-1/2", + "128": "-1/2", + "129": "1/2", + "130": "1/2", + "131": "1/2", + "137": "1/2", + "139": "1/2", + "140": "1/2", + "141": "1/2", + "142": "1/2", + "143": "-1/2", + "147": "-1/2", + "148": "1/2", + "149": "1/2", + "157": "1/2", + "158": "1/2", + "159": "1/2", + "163": "-1/2", + "164": "-1/2", + "165": "-1/2", + "166": "-1/2", + "167": "-1/2", + "168": "-1/2", + "169": "-1/2", + "170": "1/2", + "171": "1/2", + "172": "1/2", + "179": "1/2", + "180": "1/2", + "181": "1/2", + "182": "1/2", + "183": "1/2", + "184": "1/2", + "190": "-1/2", + "192": "1/2", + "197": "-1/2", + "199": "1/2", + "204": "-1/2", + "206": "-1/2", + "207": "1/2", + "208": "1/2", + "209": "1/2", + "210": "1/2", + "215": "1/2", + "216": "-1/2", + "217": "-1/2", + "218": "-1/2", + "712": "1/4", + "713": "1/4", + "714": "1/4", + "715": "1/4", + "716": "1/4" + }, + "event": 13538, + "owned": 739 + }, + { + "entire_public_response": { + "112": "1/2", + "113": "1/2", + "114": "1/2", + "118": "1/2", + "119": "-1/2", + "120": "1/2", + "124": "1/2", + "128": "1/2", + "134": "1/2", + "135": "1/2", + "136": "1/2", + "137": "1/2", + "138": "1/2", + "139": "1/2", + "143": "1/2", + "147": "1/2", + "153": "1/2", + "154": "1/2", + "155": "1/2", + "156": "1/2", + "157": "1/2", + "166": "1/2", + "167": "1/2", + "168": "1/2", + "169": "1/2", + "176": "1/2", + "177": "1/2", + "178": "1/2", + "182": "1/2", + "183": "1/2", + "184": "1/2", + "185": "1/2", + "186": "1/2", + "187": "1/2", + "194": "1/2", + "195": "1/2", + "196": "1/2", + "201": "1/2", + "202": "1/2", + "203": "1/2", + "207": "1/2", + "208": "1/2", + "209": "1/2", + "212": "1/2", + "213": "1/2", + "214": "1/2", + "216": "1/2", + "217": "1/2", + "218": "1/2", + "219": "1/2", + "220": "1/2", + "221": "1/2", + "717": "1/4", + "718": "1/4", + "719": "1/4", + "720": "1/4", + "721": "1/4" + }, + "event": 13553, + "owned": 740 + }, + { + "entire_public_response": { + "112": "1/2", + "113": "1/2", + "114": "1/2", + "116": "1/2", + "117": "1/2", + "121": "-1/2", + "125": "1/2", + "129": "-1/2", + "134": "-1/2", + "135": "-1/2", + "140": "1/2", + "144": "1/2", + "150": "1/2", + "153": "-1/2", + "154": "-1/2", + "156": "-1/2", + "157": "-1/2", + "158": "-1/2", + "159": "-1/2", + "161": "1/2", + "162": "1/2", + "164": "1/2", + "165": "1/2", + "168": "1/2", + "169": "-1/2", + "171": "1/2", + "172": "1/2", + "174": "-1/2", + "175": "-1/2", + "178": "1/2", + "180": "1/2", + "181": "1/2", + "184": "1/2", + "187": "1/2", + "190": "1/2", + "191": "-1/2", + "192": "1/2", + "193": "-1/2", + "195": "1/2", + "196": "1/2", + "197": "1/2", + "198": "1/2", + "199": "1/2", + "200": "1/2", + "202": "1/2", + "203": "1/2", + "207": "-1/2", + "212": "-1/2", + "216": "-1/2", + "219": "-1/2", + "222": "-1/2", + "223": "-1/2", + "722": "1/4", + "723": "1/4", + "724": "1/4", + "725": "1/4", + "726": "1/4" + }, + "event": 13568, + "owned": 741 + }, + { + "entire_public_response": { + "112": "-1/2", + "116": "-1/2", + "118": "-1/2", + "122": "1/2", + "124": "-1/2", + "125": "-1/2", + "127": "-1/2", + "130": "1/2", + "132": "-1/2", + "134": "1/2", + "136": "1/2", + "138": "1/2", + "139": "1/2", + "140": "1/2", + "142": "1/2", + "145": "-1/2", + "147": "1/2", + "149": "-1/2", + "150": "1/2", + "152": "1/2", + "154": "-1/2", + "158": "-1/2", + "160": "-1/2", + "162": "-1/2", + "163": "-1/2", + "165": "-1/2", + "167": "-1/2", + "171": "1/2", + "174": "-1/2", + "176": "1/2", + "178": "1/2", + "179": "-1/2", + "181": "-1/2", + "183": "-1/2", + "186": "-1/2", + "189": "1/2", + "190": "-1/2", + "192": "-1/2", + "193": "1/2", + "194": "-1/2", + "196": "-1/2", + "198": "1/2", + "202": "1/2", + "204": "-1/2", + "208": "1/2", + "210": "-1/2", + "211": "-1/2", + "212": "-1/2", + "214": "-1/2", + "217": "1/2", + "220": "1/2", + "222": "-1/2", + "727": "-1/4", + "728": "-1/4", + "729": "-1/4", + "730": "-1/4", + "731": "-1/4" + }, + "event": 13583, + "owned": 742 + } + ], + "COPY_semantics": "ADD into freshly initialized exact zero; residual target column retained", + "backward_endpoint_columns_checked": 743, + "compared_parent_claim_sha256": "828f6bfa47f01bc0debddb6f76e1d75df5ae30324c10f2890f16d443b47ccaa4", + "cuts_checked_in_each_direction": 25311, + "forward_endpoint_rows_checked": 743, + "op_counts": { + "ADD": 20947, + "CLEAR": 8, + "COPY": 8, + "INIT": 8, + "MOVE": 3624, + "SCALE": 715 + }, + "prefix_denominator_witness": [ + 21436, + 431, + 4 + ], + "prefix_max_entry_denominator_exponent": 4, + "prefix_max_row_l1": "131072", + "prefix_max_witness": { + "cut": 24096, + "l1": "131072", + "role": 93, + "row": { + "86": "-65536", + "93": "-65536" + } + }, + "public_arbitrary_inputs": 735, + "scope": "Exact logical scalar all-cut infinity norms and denominator exponents only. No chart-diagram norm proof, child precision, tape admission, complete caller closure, new kappa or human review is established.", + "state_roles": 743, + "status": "PASS_INDEPENDENT_FRACTION_ALL_CUT_NORMS", + "suffix_denominator_witness": [ + 24214, + 93, + 17 + ], + "suffix_max_entry_denominator_exponent": 17, + "suffix_max_row_l1": "135415/4", + "suffix_max_witness": { + "cut": 24297, + "l1": "135415/4", + "output": 205, + "row": { + "1": "-1/2", + "10": "-1/2", + "103": "1/2", + "104": "-1/2", + "105": "-1/2", + "106": "-1/2", + "11": "-1/2", + "16": "-1/2", + "17": "1/2", + "18": "1/2", + "19": "1/2", + "205": "1", + "226": "1/2", + "227": "-1/2", + "229": "1/2", + "230": "1/2", + "233": "-1/2", + "234": "-1/2", + "238": "1/2", + "239": "-1/2", + "240": "1/2", + "241": "-1/2", + "242": "1/2", + "243": "1/2", + "25": "1/2", + "253": "-1/2", + "255": "-1/2", + "256": "1/2", + "261": "1/2", + "267": "-1/2", + "27": "1/2", + "270": "1/2", + "271": "-1", + "276": "-1/2", + "28": "1/2", + "283": "1/2", + "286": "-1/2", + "288": "-1/2", + "29": "1/2", + "296": "1/2", + "299": "1/2", + "30": "1/2", + "31": "-1/2", + "319": "-1", + "347": "1", + "35": "-1/2", + "351": "-1", + "36": "1/2", + "363": "1", + "368": "1/2", + "37": "1/2", + "379": "1/2", + "383": "-1/2", + "388": "1/2", + "395": "1/2", + "398": "1/2", + "399": "-1", + "401": "-1/2", + "405": "-1/2", + "406": "-1/2", + "410": "1/2", + "411": "-1/2", + "413": "-1/2", + "414": "-1/2", + "419": "-1/2", + "422": "-1/2", + "426": "1/2", + "427": "-1", + "431": "-1/2", + "433": "1/2", + "434": "-1/2", + "435": "1/2", + "437": "1/2", + "441": "1/2", + "445": "1/2", + "446": "1/2", + "447": "-1/2", + "45": "1/2", + "46": "1/2", + "47": "1/2", + "51": "-1/2", + "52": "-1/2", + "53": "-1/2", + "54": "-1/2", + "55": "-1/2", + "56": "-1/2", + "57": "-1/2", + "58": "1/2", + "59": "1/2", + "6": "1/2", + "60": "1/2", + "67": "1/2", + "68": "1/2", + "69": "1/2", + "70": "1/2", + "71": "1/2", + "72": "1/2", + "78": "-1/2", + "8": "1/2", + "80": "1/2", + "85": "-1/2", + "86": "1/4", + "87": "1/2", + "9": "-1/2", + "92": "-1/2", + "93": "-33795", + "94": "-1/2", + "95": "1/2", + "96": "1/2", + "97": "1/2", + "98": "1/2" + } + }, + "word_sha256": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446" +} diff --git a/research/p104-cut-stability/peer/SOURCES.json b/research/p104-cut-stability/peer/SOURCES.json new file mode 100644 index 0000000000..fd5beee70f --- /dev/null +++ b/research/p104-cut-stability/peer/SOURCES.json @@ -0,0 +1,22 @@ +{ + "schema": "independent-fraction-cut-stability-sources-v1", + "published_source": { + "head": "1123635a6f63f23638df9459c994160e5e649d30", + "word": "inputs/WORD.json.gz", + "sha256": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446", + "origin": "PR5551 p104-joint-contact published WORD.json.gz, retained verbatim by the parent audit" + }, + "compared_claim": { + "path": "inputs/CLAIM.json", + "sha256": "828f6bfa47f01bc0debddb6f76e1d75df5ae30324c10f2890f16d443b47ccaa4", + "origin": "p104-cut-stability-20261025-root RESULT.json", + "usage": "After both exact all-cut calculations, compare maxima, full witnesses and denominator claims; no arithmetic/interpreter implementation is imported" + }, + "independent_implementation": { + "author": "joint_native_review AI worker", + "arithmetic": "Standard-library Fraction sparse rows forward and endpoint-response columns backward", + "parent_implementation": "Viewed for claim/interface review but not imported, copied, or used as an execution oracle", + "human_independent_review": false, + "publication": false + } +} diff --git a/research/p104-cut-stability/peer/inputs/CLAIM.json b/research/p104-cut-stability/peer/inputs/CLAIM.json new file mode 100644 index 0000000000..d61d1b6867 --- /dev/null +++ b/research/p104-cut-stability/peer/inputs/CLAIM.json @@ -0,0 +1,247 @@ +{ + "COPY_implementation": "ADD into an exactly initialized owned zero; injected residual is retained", + "cuts": 25311, + "error_interfaces": { + "completed_service_layers_including_input_output": 25312, + "completed_service_suffix_guard_bits": 30, + "literal_butterfly_layers_base_including_input_output": 21688, + "literal_butterfly_layers_slope_in_f": 5894, + "literal_butterfly_runtime_in_recursive_invoice": false + }, + "geometry": { + "current_max_chart_dimension": 9, + "endpoint_prefix_N_exponent": 14, + "endpoint_suffix_N_exponent": 18, + "input_max_chart_dimension": 5, + "native_recipe_prefix_N_exponent": 20, + "native_recipe_suffix_N_exponent": 27, + "output_max_chart_dimension": 9 + }, + "op_counts": { + "ADD": 20947, + "CLEAR": 8, + "COPY": 8, + "INIT": 8, + "MOVE": 3624, + "SCALE": 715 + }, + "owned_residual_controls": [ + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13491, + "output": 112, + "owned": 735, + "residual_response": "1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13502, + "output": 112, + "owned": 736, + "residual_response": "1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13513, + "output": 112, + "owned": 737, + "residual_response": "-1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13522, + "output": 113, + "owned": 738, + "residual_response": "1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13538, + "output": 113, + "owned": 739, + "residual_response": "-1/2" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13553, + "output": 112, + "owned": 740, + "residual_response": "1/2" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13568, + "output": 112, + "owned": 741, + "residual_response": "1/2" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13583, + "output": 112, + "owned": 742, + "residual_response": "-1/2" + } + ], + "prefix_denominator_witness": [ + 21436, + 431, + 4 + ], + "prefix_max_entry_denominator_exponent": 4, + "prefix_max_row_l1": "131072", + "prefix_max_witness": { + "cut": 24096, + "l1": "131072", + "role": 93, + "row": { + "86": "-65536", + "93": "-65536" + } + }, + "public_inputs": 735, + "scalar_guard": { + "accumulator_magnitude_factor_upper": 65536, + "extra_accumulator_bits_upper": 35, + "max_abs_coefficient": "65537/2", + "max_denominator_exponent": 16 + }, + "scope": "Exact all-cut scalar matrices and elementary diagram norm bounds for this finite word. No uniform recursive-child internal implementation, full 265-axis caller precision/tape closure, new kappa, scientific admission or selected promotion is claimed.", + "source_head": "1123635a6f63f23638df9459c994160e5e649d30", + "state_roles": 743, + "status": "PASS_EXACT_P104_ALL_CUT_SCALAR_STABILITY", + "suffix_denominator_witness": [ + 24214, + 93, + 17 + ], + "suffix_max_entry_denominator_exponent": 17, + "suffix_max_row_l1": "135415/4", + "suffix_max_witness": { + "cut": 24297, + "l1": "135415/4", + "output": 205, + "row": { + "1": "-1/2", + "10": "-1/2", + "103": "1/2", + "104": "-1/2", + "105": "-1/2", + "106": "-1/2", + "11": "-1/2", + "16": "-1/2", + "17": "1/2", + "18": "1/2", + "19": "1/2", + "205": "1", + "226": "1/2", + "227": "-1/2", + "229": "1/2", + "230": "1/2", + "233": "-1/2", + "234": "-1/2", + "238": "1/2", + "239": "-1/2", + "240": "1/2", + "241": "-1/2", + "242": "1/2", + "243": "1/2", + "25": "1/2", + "253": "-1/2", + "255": "-1/2", + "256": "1/2", + "261": "1/2", + "267": "-1/2", + "27": "1/2", + "270": "1/2", + "271": "-1", + "276": "-1/2", + "28": "1/2", + "283": "1/2", + "286": "-1/2", + "288": "-1/2", + "29": "1/2", + "296": "1/2", + "299": "1/2", + "30": "1/2", + "31": "-1/2", + "319": "-1", + "347": "1", + "35": "-1/2", + "351": "-1", + "36": "1/2", + "363": "1", + "368": "1/2", + "37": "1/2", + "379": "1/2", + "383": "-1/2", + "388": "1/2", + "395": "1/2", + "398": "1/2", + "399": "-1", + "401": "-1/2", + "405": "-1/2", + "406": "-1/2", + "410": "1/2", + "411": "-1/2", + "413": "-1/2", + "414": "-1/2", + "419": "-1/2", + "422": "-1/2", + "426": "1/2", + "427": "-1", + "431": "-1/2", + "433": "1/2", + "434": "-1/2", + "435": "1/2", + "437": "1/2", + "441": "1/2", + "445": "1/2", + "446": "1/2", + "447": "-1/2", + "45": "1/2", + "46": "1/2", + "47": "1/2", + "51": "-1/2", + "52": "-1/2", + "53": "-1/2", + "54": "-1/2", + "55": "-1/2", + "56": "-1/2", + "57": "-1/2", + "58": "1/2", + "59": "1/2", + "6": "1/2", + "60": "1/2", + "67": "1/2", + "68": "1/2", + "69": "1/2", + "70": "1/2", + "71": "1/2", + "72": "1/2", + "78": "-1/2", + "8": "1/2", + "80": "1/2", + "85": "-1/2", + "86": "1/4", + "87": "1/2", + "9": "-1/2", + "92": "-1/2", + "93": "-33795", + "94": "-1/2", + "95": "1/2", + "96": "1/2", + "97": "1/2", + "98": "1/2" + } + }, + "word_sha256": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446" +} diff --git a/research/p104-cut-stability/peer/inputs/WORD.json.gz b/research/p104-cut-stability/peer/inputs/WORD.json.gz new file mode 100644 index 0000000000..c04a815c26 Binary files /dev/null and b/research/p104-cut-stability/peer/inputs/WORD.json.gz differ diff --git a/research/p104-cut-stability/peer/verify.py b/research/p104-cut-stability/peer/verify.py new file mode 100644 index 0000000000..c87651b4ab --- /dev/null +++ b/research/p104-cut-stability/peer/verify.py @@ -0,0 +1,221 @@ +"""Independent Fraction row/column audit of the published finite scalar word. + +No parent checker, dyadic arithmetic implementation, compiler or norm helper is +imported. COPY is the literal ADD chosen for the error interface. +""" +import argparse +from collections import Counter +from fractions import Fraction +import gzip +from hashlib import sha256 +import json +from pathlib import Path +import time + +HERE = Path(__file__).resolve().parent +WORD_SHA = '48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446' +CPU_LIMIT = 60 + +def require(test, message): + if not test: + raise AssertionError(message) + +def serial(row): + return {str(k): str(v) for k, v in sorted(row.items())} + +def add_scaled(destination, source, coefficient): + answer = destination.copy() + for key, value in source.items(): + result = answer.get(key, Fraction(0)) + coefficient * value + if result: + answer[key] = result + elif key in answer: + del answer[key] + return answer + +def denominator_exponent(row): + exponents = [] + for value in row.values(): + d = value.denominator + require(d > 0 and d & (d - 1) == 0, 'Dyadic literal arithmetic') + exponents.append(d.bit_length() - 1) + return max(exponents, default=0) + +def calculate(): + start = time.process_time() + def deadline(): + require(time.process_time() - start < CPU_LIMIT, 'Incomplete: 60 CPU second cap') + + raw = (HERE / 'inputs/WORD.json.gz').read_bytes() + require(sha256(raw).hexdigest() == WORD_SHA, 'Exact published word pin') + word = json.loads(gzip.decompress(raw)) + events = word['program'] + require(word['public'] == 735 and len(events) == 25310, 'Fixed finite input ABI') + public, roles = 735, 743 + coefficients = {k: Fraction(event[-2]) for k, event in enumerate(events) + if event[0] in ('ADD', 'COPY', 'SCALE')} + one = Fraction(1) + + # P_t is represented by its rows over all arbitrary public originals. + state = [{i: one} for i in range(public)] + [{} for _ in range(8)] + chart = list(word['initial']) + [None] * 8 + owned = set() + max_prefix = one + prefix_witness = {'cut': 0, 'role': 0, 'l1': '1', 'row': {'0': '1'}} + prefix_den = 0 + prefix_den_witness = None + counts = Counter() + copies = [] + for index, event in enumerate(events): + if index % 64 == 0: + deadline() + opcode, target = event[:2] + counts[opcode] += 1 + changed = True + if opcode == 'MOVE': + require(chart[target] == event[2], 'MOVE entry chart') + chart[target] = event[3] + changed = False + elif opcode == 'INIT': + require(target >= public and target not in owned, 'Owned initialization') + owned.add(target) + state[target] = {} + chart[target] = event[2] + elif opcode == 'CLEAR': + require(target in owned and chart[target] == event[2], 'Owned clear') + owned.remove(target) + state[target] = {} + chart[target] = None + elif opcode == 'SCALE': + require(chart[target] == event[-1], 'SCALE chart') + state[target] = {i: coefficients[index] * v for i, v in state[target].items() + if coefficients[index] * v} + else: + require(opcode in ('ADD', 'COPY'), 'Known scalar opcode') + source = event[2] + require(source != target and chart[source] == chart[target] == event[-1], + 'Actual common scalar chart') + if opcode == 'COPY': + require(target in owned and not state[target], 'COPY exact zero on ideal trace') + copies.append((index, target)) + state[target] = add_scaled(state[target], state[source], coefficients[index]) + if changed: + row = state[target] + row_norm = sum((abs(value) for value in row.values()), Fraction(0)) + if row_norm > max_prefix: + max_prefix = row_norm + prefix_witness = {'cut': index + 1, 'role': target, + 'l1': str(row_norm), 'row': serial(row)} + exp = denominator_exponent(row) + if exp > prefix_den: + prefix_den, prefix_den_witness = exp, [index + 1, target, exp] + live = set(word['live']) + require(not owned and chart[:public] == word['final'], 'Complete owned lifecycle and exits') + for i, row in enumerate(state): + expected = {i: one} if i < public else {} + if i - 112 in live: + expected[i - 112] = one + require(row == expected, 'All 743 forward endpoint rows: ' + str(i)) + + # S_t is represented by columns over public endpoints. The l-infinity + # matrix norm is the maximum absolute ROW sum; maintain those sums while + # a single column changes. The final owned outputs are discarded/reset. + response = [{i: one} for i in range(public)] + [{} for _ in range(8)] + absolute_sums = [one for _ in range(public)] + max_suffix = one + suffix_witness = {'cut': len(events), 'output': 0, 'l1': '1', 'row': {'0': '1'}} + suffix_den = 0 + suffix_den_witness = None + copy_residuals = [] + + def replace_column(which, new, cut): + nonlocal max_suffix, suffix_witness, suffix_den, suffix_den_witness + old = response[which] + response[which] = new + for output in old.keys() | new.keys(): + absolute_sums[output] += abs(new.get(output, Fraction(0))) - abs(old.get(output, Fraction(0))) + if absolute_sums[output] > max_suffix: + max_suffix = absolute_sums[output] + row = {j: col[output] for j, col in enumerate(response) if output in col} + require(sum(map(abs, row.values())) == max_suffix, 'Suffix row-sum invariant') + suffix_witness = {'cut': cut, 'output': output, + 'l1': str(max_suffix), 'row': serial(row)} + exp = denominator_exponent(new) + if exp > suffix_den: + suffix_den, suffix_den_witness = exp, [cut, which, exp] + + for index in range(len(events) - 1, -1, -1): + if index % 64 == 0: + deadline() + event = events[index] + opcode, target = event[:2] + if opcode == 'MOVE': + continue + if opcode in ('INIT', 'CLEAR'): + replace_column(target, {}, index) + elif opcode == 'SCALE': + replace_column(target, {i: coefficients[index] * v for i, v in response[target].items() + if coefficients[index] * v}, index) + else: + source = event[2] + if opcode == 'COPY': + # COPY is ADD, so an injected error already in target survives. + require(response[target], 'Nonzero actual owned COPY residual') + copy_residuals.append({'event': index, 'owned': target, + 'entire_public_response': serial(response[target])}) + replace_column(source, add_scaled(response[source], response[target], coefficients[index]), index) + # Deliberately do not zero the target column as assignment would. + for i, column in enumerate(response): + expected = {i: one} if i < public else {} + if i in live: + expected[i + 112] = one + require(column == expected, 'All 743 backward endpoint columns: ' + str(i)) + require(len(copies) == len(copy_residuals) == 8, 'Eight literal ADD-COPY sites') + deadline() + + claim_raw = (HERE / 'inputs/CLAIM.json').read_bytes() + claim = json.loads(claim_raw) + checked = { + 'prefix_max_row_l1': str(max_prefix), + 'prefix_max_witness': prefix_witness, + 'prefix_max_entry_denominator_exponent': prefix_den, + 'prefix_denominator_witness': prefix_den_witness, + 'suffix_max_row_l1': str(max_suffix), + 'suffix_max_witness': suffix_witness, + 'suffix_max_entry_denominator_exponent': suffix_den, + 'suffix_denominator_witness': suffix_den_witness, + } + for key, actual in checked.items(): + require(actual == claim[key], 'Independent agreement with parent claim: ' + key) + return { + 'status': 'PASS_INDEPENDENT_FRACTION_ALL_CUT_NORMS', + 'word_sha256': WORD_SHA, + 'compared_parent_claim_sha256': sha256(claim_raw).hexdigest(), + 'cuts_checked_in_each_direction': len(events) + 1, + 'public_arbitrary_inputs': public, + 'state_roles': roles, + 'op_counts': dict(sorted(counts.items())), + 'forward_endpoint_rows_checked': len(state), + 'backward_endpoint_columns_checked': len(response), + 'COPY_semantics': 'ADD into freshly initialized exact zero; residual target column retained', + 'COPY_residual_controls': list(reversed(copy_residuals)), + **checked, + 'scope': 'Exact logical scalar all-cut infinity norms and denominator exponents only. No chart-diagram norm proof, child precision, tape admission, complete caller closure, new kappa or human review is established.', + }, time.process_time() - start + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--write', action='store_true') + args = parser.parse_args() + result, cpu = calculate() + path = HERE / 'RESULT.json' + if args.write: + path.write_text(json.dumps(result, sort_keys=True, indent=2) + '\n') + (HERE / 'ENVIRONMENT.json').write_text(json.dumps({'author_cpu_seconds': cpu, 'cpu_cap_seconds': CPU_LIMIT}, sort_keys=True, indent=2) + '\n') + else: + require(json.loads(path.read_bytes()) == result, 'Frozen independent receipt') + print(json.dumps({k: result[k] for k in ('status', 'cuts_checked_in_each_direction', 'prefix_max_row_l1', 'suffix_max_row_l1', 'prefix_max_entry_denominator_exponent', 'suffix_max_entry_denominator_exponent')}, sort_keys=True)) + print(json.dumps({'cpu_seconds': round(cpu, 6)}, sort_keys=True)) + +if __name__ == '__main__': + main() diff --git a/research/p104-cut-stability/proof-peer/AUTHOR-RESULT.json b/research/p104-cut-stability/proof-peer/AUTHOR-RESULT.json new file mode 100644 index 0000000000..d61d1b6867 --- /dev/null +++ b/research/p104-cut-stability/proof-peer/AUTHOR-RESULT.json @@ -0,0 +1,247 @@ +{ + "COPY_implementation": "ADD into an exactly initialized owned zero; injected residual is retained", + "cuts": 25311, + "error_interfaces": { + "completed_service_layers_including_input_output": 25312, + "completed_service_suffix_guard_bits": 30, + "literal_butterfly_layers_base_including_input_output": 21688, + "literal_butterfly_layers_slope_in_f": 5894, + "literal_butterfly_runtime_in_recursive_invoice": false + }, + "geometry": { + "current_max_chart_dimension": 9, + "endpoint_prefix_N_exponent": 14, + "endpoint_suffix_N_exponent": 18, + "input_max_chart_dimension": 5, + "native_recipe_prefix_N_exponent": 20, + "native_recipe_suffix_N_exponent": 27, + "output_max_chart_dimension": 9 + }, + "op_counts": { + "ADD": 20947, + "CLEAR": 8, + "COPY": 8, + "INIT": 8, + "MOVE": 3624, + "SCALE": 715 + }, + "owned_residual_controls": [ + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13491, + "output": 112, + "owned": 735, + "residual_response": "1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13502, + "output": 112, + "owned": 736, + "residual_response": "1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13513, + "output": 112, + "owned": 737, + "residual_response": "-1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13522, + "output": 113, + "owned": 738, + "residual_response": "1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13538, + "output": 113, + "owned": 739, + "residual_response": "-1/2" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13553, + "output": 112, + "owned": 740, + "residual_response": "1/2" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13568, + "output": 112, + "owned": 741, + "residual_response": "1/2" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13583, + "output": 112, + "owned": 742, + "residual_response": "-1/2" + } + ], + "prefix_denominator_witness": [ + 21436, + 431, + 4 + ], + "prefix_max_entry_denominator_exponent": 4, + "prefix_max_row_l1": "131072", + "prefix_max_witness": { + "cut": 24096, + "l1": "131072", + "role": 93, + "row": { + "86": "-65536", + "93": "-65536" + } + }, + "public_inputs": 735, + "scalar_guard": { + "accumulator_magnitude_factor_upper": 65536, + "extra_accumulator_bits_upper": 35, + "max_abs_coefficient": "65537/2", + "max_denominator_exponent": 16 + }, + "scope": "Exact all-cut scalar matrices and elementary diagram norm bounds for this finite word. No uniform recursive-child internal implementation, full 265-axis caller precision/tape closure, new kappa, scientific admission or selected promotion is claimed.", + "source_head": "1123635a6f63f23638df9459c994160e5e649d30", + "state_roles": 743, + "status": "PASS_EXACT_P104_ALL_CUT_SCALAR_STABILITY", + "suffix_denominator_witness": [ + 24214, + 93, + 17 + ], + "suffix_max_entry_denominator_exponent": 17, + "suffix_max_row_l1": "135415/4", + "suffix_max_witness": { + "cut": 24297, + "l1": "135415/4", + "output": 205, + "row": { + "1": "-1/2", + "10": "-1/2", + "103": "1/2", + "104": "-1/2", + "105": "-1/2", + "106": "-1/2", + "11": "-1/2", + "16": "-1/2", + "17": "1/2", + "18": "1/2", + "19": "1/2", + "205": "1", + "226": "1/2", + "227": "-1/2", + "229": "1/2", + "230": "1/2", + "233": "-1/2", + "234": "-1/2", + "238": "1/2", + "239": "-1/2", + "240": "1/2", + "241": "-1/2", + "242": "1/2", + "243": "1/2", + "25": "1/2", + "253": "-1/2", + "255": "-1/2", + "256": "1/2", + "261": "1/2", + "267": "-1/2", + "27": "1/2", + "270": "1/2", + "271": "-1", + "276": "-1/2", + "28": "1/2", + "283": "1/2", + "286": "-1/2", + "288": "-1/2", + "29": "1/2", + "296": "1/2", + "299": "1/2", + "30": "1/2", + "31": "-1/2", + "319": "-1", + "347": "1", + "35": "-1/2", + "351": "-1", + "36": "1/2", + "363": "1", + "368": "1/2", + "37": "1/2", + "379": "1/2", + "383": "-1/2", + "388": "1/2", + "395": "1/2", + "398": "1/2", + "399": "-1", + "401": "-1/2", + "405": "-1/2", + "406": "-1/2", + "410": "1/2", + "411": "-1/2", + "413": "-1/2", + "414": "-1/2", + "419": "-1/2", + "422": "-1/2", + "426": "1/2", + "427": "-1", + "431": "-1/2", + "433": "1/2", + "434": "-1/2", + "435": "1/2", + "437": "1/2", + "441": "1/2", + "445": "1/2", + "446": "1/2", + "447": "-1/2", + "45": "1/2", + "46": "1/2", + "47": "1/2", + "51": "-1/2", + "52": "-1/2", + "53": "-1/2", + "54": "-1/2", + "55": "-1/2", + "56": "-1/2", + "57": "-1/2", + "58": "1/2", + "59": "1/2", + "6": "1/2", + "60": "1/2", + "67": "1/2", + "68": "1/2", + "69": "1/2", + "70": "1/2", + "71": "1/2", + "72": "1/2", + "78": "-1/2", + "8": "1/2", + "80": "1/2", + "85": "-1/2", + "86": "1/4", + "87": "1/2", + "9": "-1/2", + "92": "-1/2", + "93": "-33795", + "94": "-1/2", + "95": "1/2", + "96": "1/2", + "97": "1/2", + "98": "1/2" + } + }, + "word_sha256": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446" +} diff --git a/research/p104-cut-stability/proof-peer/FILES.sha256 b/research/p104-cut-stability/proof-peer/FILES.sha256 new file mode 100644 index 0000000000..b750509912 --- /dev/null +++ b/research/p104-cut-stability/proof-peer/FILES.sha256 @@ -0,0 +1,6 @@ +828f6bfa47f01bc0debddb6f76e1d75df5ae30324c10f2890f16d443b47ccaa4 AUTHOR-RESULT.json +878e87a229a544f1f4a46f2852d28bf07082e48f22977f549624b0037857c027 OPTIMIZED.json +878e87a229a544f1f4a46f2852d28bf07082e48f22977f549624b0037857c027 RESULT.json +8bb721075e0a744b43bdc08af579dc1dbe24e542dd9dbcb9748f1b06ba82c582 REVIEW.md +48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446 WORD.json.gz +9d8dc78862f706e4a3a0e4629f8eed206618611a5a6a9f58f3469b60a3152664 review.py diff --git a/research/p104-cut-stability/proof-peer/OPTIMIZED.json b/research/p104-cut-stability/proof-peer/OPTIMIZED.json new file mode 100644 index 0000000000..1a4055791d --- /dev/null +++ b/research/p104-cut-stability/proof-peer/OPTIMIZED.json @@ -0,0 +1,213 @@ +{ + "COPY_residual_controls": [ + { + "event": 13491, + "output": 112, + "owned": 735, + "response": "1" + }, + { + "event": 13502, + "output": 112, + "owned": 736, + "response": "1" + }, + { + "event": 13513, + "output": 112, + "owned": 737, + "response": "-1" + }, + { + "event": 13522, + "output": 113, + "owned": 738, + "response": "1" + }, + { + "event": 13538, + "output": 113, + "owned": 739, + "response": "-1/2" + }, + { + "event": 13553, + "output": 112, + "owned": 740, + "response": "1/2" + }, + { + "event": 13568, + "output": 112, + "owned": 741, + "response": "1/2" + }, + { + "event": 13583, + "output": 112, + "owned": 742, + "response": "-1/2" + } + ], + "author_result_sha256": "828f6bfa47f01bc0debddb6f76e1d75df5ae30324c10f2890f16d443b47ccaa4", + "completed_service_K": 25312, + "completed_service_guard_bits": 30, + "geometry": { + "endpoint_prefix_exponent": 14, + "endpoint_suffix_exponent": 18, + "native_interior_prefix_exponent": 20, + "native_interior_suffix_exponent": 27, + "prefix_extremal_move": { + "event": 13494, + "new_dimension": 1, + "old_dimension": 8, + "rank": 7, + "role": 735 + }, + "suffix_extremal_move": { + "event": 25309, + "new_dimension": 9, + "old_dimension": 0, + "rank": 9, + "role": 711 + } + }, + "limits": [ + "Only named maximum-row witnesses independently reproduced; exhaustive maximality relies on reviewed author scanner recurrence", + "Native chart correctness remains a source-bound premise", + "Completed-service bound assumes output-error ABI for each recursive Gaussian service", + "Literal butterfly precision witness has no recursive-invoice runtime claim", + "No full uniform compiler, physical stock/tape proof, new kappa, formal-kernel/human scientific acceptance" + ], + "literal_K_expression": "21688 + 5894 f", + "prefix_witness": { + "cut": 24096, + "l1": "131072", + "role": 93, + "row": { + "86": "-65536", + "93": "-65536" + } + }, + "status": "PASS_INDEPENDENT_SELECTED_ROW_AND_COPY_WITNESSES", + "suffix_witness": { + "cut": 24297, + "l1": "135415/4", + "output": 205, + "row": { + "1": "-1/2", + "10": "-1/2", + "103": "1/2", + "104": "-1/2", + "105": "-1/2", + "106": "-1/2", + "11": "-1/2", + "16": "-1/2", + "17": "1/2", + "18": "1/2", + "19": "1/2", + "205": "1", + "226": "1/2", + "227": "-1/2", + "229": "1/2", + "230": "1/2", + "233": "-1/2", + "234": "-1/2", + "238": "1/2", + "239": "-1/2", + "240": "1/2", + "241": "-1/2", + "242": "1/2", + "243": "1/2", + "25": "1/2", + "253": "-1/2", + "255": "-1/2", + "256": "1/2", + "261": "1/2", + "267": "-1/2", + "27": "1/2", + "270": "1/2", + "271": "-1", + "276": "-1/2", + "28": "1/2", + "283": "1/2", + "286": "-1/2", + "288": "-1/2", + "29": "1/2", + "296": "1/2", + "299": "1/2", + "30": "1/2", + "31": "-1/2", + "319": "-1", + "347": "1", + "35": "-1/2", + "351": "-1", + "36": "1/2", + "363": "1", + "368": "1/2", + "37": "1/2", + "379": "1/2", + "383": "-1/2", + "388": "1/2", + "395": "1/2", + "398": "1/2", + "399": "-1", + "401": "-1/2", + "405": "-1/2", + "406": "-1/2", + "410": "1/2", + "411": "-1/2", + "413": "-1/2", + "414": "-1/2", + "419": "-1/2", + "422": "-1/2", + "426": "1/2", + "427": "-1", + "431": "-1/2", + "433": "1/2", + "434": "-1/2", + "435": "1/2", + "437": "1/2", + "441": "1/2", + "445": "1/2", + "446": "1/2", + "447": "-1/2", + "45": "1/2", + "46": "1/2", + "47": "1/2", + "51": "-1/2", + "52": "-1/2", + "53": "-1/2", + "54": "-1/2", + "55": "-1/2", + "56": "-1/2", + "57": "-1/2", + "58": "1/2", + "59": "1/2", + "6": "1/2", + "60": "1/2", + "67": "1/2", + "68": "1/2", + "69": "1/2", + "70": "1/2", + "71": "1/2", + "72": "1/2", + "78": "-1/2", + "8": "1/2", + "80": "1/2", + "85": "-1/2", + "86": "1/4", + "87": "1/2", + "9": "-1/2", + "92": "-1/2", + "93": "-33795", + "94": "-1/2", + "95": "1/2", + "96": "1/2", + "97": "1/2", + "98": "1/2" + }, + "terms": 111 + }, + "word_sha256": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446" +} diff --git a/research/p104-cut-stability/proof-peer/RESULT.json b/research/p104-cut-stability/proof-peer/RESULT.json new file mode 100644 index 0000000000..1a4055791d --- /dev/null +++ b/research/p104-cut-stability/proof-peer/RESULT.json @@ -0,0 +1,213 @@ +{ + "COPY_residual_controls": [ + { + "event": 13491, + "output": 112, + "owned": 735, + "response": "1" + }, + { + "event": 13502, + "output": 112, + "owned": 736, + "response": "1" + }, + { + "event": 13513, + "output": 112, + "owned": 737, + "response": "-1" + }, + { + "event": 13522, + "output": 113, + "owned": 738, + "response": "1" + }, + { + "event": 13538, + "output": 113, + "owned": 739, + "response": "-1/2" + }, + { + "event": 13553, + "output": 112, + "owned": 740, + "response": "1/2" + }, + { + "event": 13568, + "output": 112, + "owned": 741, + "response": "1/2" + }, + { + "event": 13583, + "output": 112, + "owned": 742, + "response": "-1/2" + } + ], + "author_result_sha256": "828f6bfa47f01bc0debddb6f76e1d75df5ae30324c10f2890f16d443b47ccaa4", + "completed_service_K": 25312, + "completed_service_guard_bits": 30, + "geometry": { + "endpoint_prefix_exponent": 14, + "endpoint_suffix_exponent": 18, + "native_interior_prefix_exponent": 20, + "native_interior_suffix_exponent": 27, + "prefix_extremal_move": { + "event": 13494, + "new_dimension": 1, + "old_dimension": 8, + "rank": 7, + "role": 735 + }, + "suffix_extremal_move": { + "event": 25309, + "new_dimension": 9, + "old_dimension": 0, + "rank": 9, + "role": 711 + } + }, + "limits": [ + "Only named maximum-row witnesses independently reproduced; exhaustive maximality relies on reviewed author scanner recurrence", + "Native chart correctness remains a source-bound premise", + "Completed-service bound assumes output-error ABI for each recursive Gaussian service", + "Literal butterfly precision witness has no recursive-invoice runtime claim", + "No full uniform compiler, physical stock/tape proof, new kappa, formal-kernel/human scientific acceptance" + ], + "literal_K_expression": "21688 + 5894 f", + "prefix_witness": { + "cut": 24096, + "l1": "131072", + "role": 93, + "row": { + "86": "-65536", + "93": "-65536" + } + }, + "status": "PASS_INDEPENDENT_SELECTED_ROW_AND_COPY_WITNESSES", + "suffix_witness": { + "cut": 24297, + "l1": "135415/4", + "output": 205, + "row": { + "1": "-1/2", + "10": "-1/2", + "103": "1/2", + "104": "-1/2", + "105": "-1/2", + "106": "-1/2", + "11": "-1/2", + "16": "-1/2", + "17": "1/2", + "18": "1/2", + "19": "1/2", + "205": "1", + "226": "1/2", + "227": "-1/2", + "229": "1/2", + "230": "1/2", + "233": "-1/2", + "234": "-1/2", + "238": "1/2", + "239": "-1/2", + "240": "1/2", + "241": "-1/2", + "242": "1/2", + "243": "1/2", + "25": "1/2", + "253": "-1/2", + "255": "-1/2", + "256": "1/2", + "261": "1/2", + "267": "-1/2", + "27": "1/2", + "270": "1/2", + "271": "-1", + "276": "-1/2", + "28": "1/2", + "283": "1/2", + "286": "-1/2", + "288": "-1/2", + "29": "1/2", + "296": "1/2", + "299": "1/2", + "30": "1/2", + "31": "-1/2", + "319": "-1", + "347": "1", + "35": "-1/2", + "351": "-1", + "36": "1/2", + "363": "1", + "368": "1/2", + "37": "1/2", + "379": "1/2", + "383": "-1/2", + "388": "1/2", + "395": "1/2", + "398": "1/2", + "399": "-1", + "401": "-1/2", + "405": "-1/2", + "406": "-1/2", + "410": "1/2", + "411": "-1/2", + "413": "-1/2", + "414": "-1/2", + "419": "-1/2", + "422": "-1/2", + "426": "1/2", + "427": "-1", + "431": "-1/2", + "433": "1/2", + "434": "-1/2", + "435": "1/2", + "437": "1/2", + "441": "1/2", + "445": "1/2", + "446": "1/2", + "447": "-1/2", + "45": "1/2", + "46": "1/2", + "47": "1/2", + "51": "-1/2", + "52": "-1/2", + "53": "-1/2", + "54": "-1/2", + "55": "-1/2", + "56": "-1/2", + "57": "-1/2", + "58": "1/2", + "59": "1/2", + "6": "1/2", + "60": "1/2", + "67": "1/2", + "68": "1/2", + "69": "1/2", + "70": "1/2", + "71": "1/2", + "72": "1/2", + "78": "-1/2", + "8": "1/2", + "80": "1/2", + "85": "-1/2", + "86": "1/4", + "87": "1/2", + "9": "-1/2", + "92": "-1/2", + "93": "-33795", + "94": "-1/2", + "95": "1/2", + "96": "1/2", + "97": "1/2", + "98": "1/2" + }, + "terms": 111 + }, + "word_sha256": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446" +} diff --git a/research/p104-cut-stability/proof-peer/REVIEW.md b/research/p104-cut-stability/proof-peer/REVIEW.md new file mode 100644 index 0000000000..15a6f2f59b --- /dev/null +++ b/research/p104-cut-stability/proof-peer/REVIEW.md @@ -0,0 +1,92 @@ +# Independent selected-row and proof review + +The code `review.py` imports no author scanner, arithmetic representation, +constructor, prior verifier or pricing engine. It authenticates the exact +published WORD, then propagates only the named rows backwards using ordinary +`fractions.Fraction`. It does not repeat the full all-cut census. + +Normal and optimized Python 3.12 runs agree byte for byte and reproduce: + +- Prefix cut 24096, role 93: `{86:-65536,93:-65536}`, l1 = 131072. +- Suffix cut 24297, public output 205: every one of the submitted 111 terms, + l1 = 135415/4. +- All eight nonzero injected-owned COPY responses. In particular the error + in owned role 735 immediately before COPY event 13491 reaches public output + 112 with coefficient 1. Assignment-COPY would discard that error. +- Endpoint norm exponents 14/18; actual native-interior prefix/suffix exponents + 20/27. Extremal native cuts are independently recorded in RESULT.json. +- Service K = 25312 with `ceil(log2(K LambdaS)) = 30`, and literal butterfly + K(f) = 21688 + 5894 f. +- Maximum absolute scalar coefficient 65537/2 and dyadic denominator 65536. + +## Review of exhaustive scanner logic + +I read the full author `check.py`. The implementation represents dyadic rows +as one integer numerator dictionary and a shared power-of-two denominator. +The OR of absolute numerators computes the common trailing-zero factor; +the exact dyadic rescaling and cancellation arithmetic are correct. No +floating values occur in the scientific scan. + +In the forward scan exactly one logical row changes at a scalar/ownership +event. Comparing that row with the prior maximum covers every cut. MOVE is +logical identity with a changed physical chart. The reverse scan stores +columns of the public-output response matrix. Pulling an ADD d += c s changes +only source column s by c times destination column d. Updating the exact +row sums over the union of changed column supports therefore maintains the +actual matrix infinity norm. INIT/CLEAR zero only their owned columns. +COPY retains its owned column, consistently with its declared actual ADD +implementation. Endpoint checks independently agree in the two directions. + +This is algorithm/proof review plus independent named witnesses. Exhaustive +maximality of the constants relies on the author's all-cut run and this +reviewed recurrence; it was not independently recensused here. + +## Spectator-independent coordinate bound + +Use the maximum absolute real/imaginary component over roles and addresses. +Each normalized C gate has induced norm at most 2 in this norm. Native +P/D/X/phase monomials are coordinate permutations and factors ±1/±i, with +norm 1. The exact canonical frame and its inverse have norm <=N^dim(F), +N=2^f. Tensoring is realized by f per-column copies of the literal gates; +no Euclidean-to-coordinate dimension factor or spectator-volume factor is +introduced. + +At completed cuts `G = Phi_current A Phi_initial^-1`, so the actual entrance +maximum 5 and current maximum 9 give `||G|| <= LambdaP N^14`. The suffix +factorization gives `||S|| <= LambdaS N^18`. A native recipe has one rank-r +Gaussian factor with monomial ends. Applying the actual per-MOVE dimensions +to its partial prefixes/suffixes gives the recorded N^20/N^27 bounds. These +are conservative coordinate bounds; they do not assert attained growth. + +For completed services, suppose each returned scalar/native job has absolute +coordinate error <=delta, including exact dyadic arithmetic followed by a +single rounding. Then total final public error is at most +`25312 LambdaS N^18 delta`. With a literal butterfly implementation the bound +is `(21688+5894 f) LambdaS N^27 delta`. Input/output rounding are charged as +two additional layers. The completed-service bound assumes the retained +recursive-child output-error ABI. The explicit butterflies give a different +precision witness whose runtime is not charged by the recursive invoice. + +COPY is the chosen implementation `owned += source` immediately after exact +INIT-zero. It agrees with the original clean trace, while arbitrary injected +owned residuals remain in the perturbed computation. Erasure is confined to +owned storage. Replacing this derivative by assignment would be invalid. + +The +35-bit arithmetic allowance is a conservative local guard for exact +dyadic products, denominator alignment and an ADD before final rounding. +**It is not by itself a global integer-range/overflow proof.** LambdaP bounds +exact prefixes, while LambdaS bounds final public error; neither alone bounds +all perturbed intermediate states. A fixed-width implementation additionally +needs an all-interval growth bound, or explicitly wider/unbounded integer +parts. A crude finite product of scalar `(1+|c|)` factors can provide such a +separate bound, but that was not computed in this independent report. + +Under these stated interfaces the flat norm/error implication is sound. It +does not close native recursive internal precision, the full 265-axis caller, +the uniform compiler, global physical stock/tape bounds, the five framework +premises or scientific adoption. This is independent AI-assisted review, +not independent human or proof-kernel acceptance. + +Prepared for thu-nmrc with OpenAI Codex assistance. Apache-2.0. Cinna Davis, +Ali Romman, Cao Yifan, zxv, native/compiler contributors and retained P104 +source authors keep all upstream construction and native-chart credit. diff --git a/research/p104-cut-stability/proof-peer/WORD.json.gz b/research/p104-cut-stability/proof-peer/WORD.json.gz new file mode 100644 index 0000000000..c04a815c26 Binary files /dev/null and b/research/p104-cut-stability/proof-peer/WORD.json.gz differ diff --git a/research/p104-cut-stability/proof-peer/review.py b/research/p104-cut-stability/proof-peer/review.py new file mode 100644 index 0000000000..3e14d90d35 --- /dev/null +++ b/research/p104-cut-stability/proof-peer/review.py @@ -0,0 +1,86 @@ +"""Independent selected-row precision checks; no author code imports. + +This verifies named witnesses and reviews the scanner's matrix recurrence, +not an independent exhaustive all-cut maximum census. Apache-2.0. +Prepared for thu-nmrc with OpenAI Codex assistance. +""" +from fractions import Fraction as F +from pathlib import Path +from hashlib import sha256 +import gzip,json +HERE=Path(__file__).resolve().parent +SHA='48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446' +def need(ok,label): + if not ok:raise ValueError(label) +def add(v,k,q): + z=v.get(k,F(0))+q + if z:v[k]=z + else:v.pop(k,None) +def pull(row,event): + op,r=event[:2] + if op=='MOVE':return + if op in ('INIT','CLEAR'): + row.pop(r,None) + elif op=='SCALE': + if r in row: + row[r]*=F(event[2]) + if not row[r]:row.pop(r) + else: + need(op in ('ADD','COPY'),'Known source opcode') + if r in row:add(row,event[2],row[r]*F(event[3])) +def pull_to(program,output,start,stop): + row={output:F(1)} + for e in reversed(program[stop:start]):pull(row,e) + return row +def encoded(row):return {str(k):str(v) for k,v in sorted(row.items())} +def run(): + raw=(HERE/'WORD.json.gz').read_bytes();need(sha256(raw).hexdigest()==SHA,'Published WORD hash') + w=json.loads(gzip.decompress(raw));p=w['program'];public=w['public'];n=public+8 + a=json.loads((HERE/'AUTHOR-RESULT.json').read_bytes()) + need(len(p)==25310 and n==743 and public==735,'Actual dimensions') + pw=a['prefix_max_witness'];sw=a['suffix_max_witness'] + forward_row=pull_to(p,pw['role'],pw['cut'],0) + # Exact initial owned zeros are part of this forward-prefix boundary. + forward_row={k:v for k,v in forward_row.items() if kpp:pp=x;wp={'event':t,'role':role,'old_dimension':dims[old],'new_dimension':dims[new],'rank':r} + if y>ss:ss=y;ws={'event':t,'role':role,'old_dimension':dims[old],'new_dimension':dims[new],'rank':r} + need((imax,fmax,max(dims),pp,ss)==(5,9,9,20,27),'Actual native-prefix and suffix bounds') + need(rank_sum==5894 and len(p)-3624+2==21688,'Literal rounded-layer count') + service=len(p)+2;v=service*F(135415,4);guard=0 + while 2**guard=k+E+36f+2` merely makes +the accumulated intermediate perturbation at most 1/4. + +For a completed-service-only model, exact prefixes use N^14 and every +service interval uses Gamma N^18. The corresponding stored integer bound is + +`I_service = 2 + max(0, b+17+14f, k+E+18f-p)`. + +That service model assumes the retained completed-native output-error ABI; +it does not prove native recursive internal arithmetic. + +The actual scalar coefficients have dyadic denominator at most 2^16 and +numerator magnitude at most 65537. A further fixed +35 accumulator bits +beyond the stored word conservatively cover exact numerator multiplication, +denominator alignment and addition before one final rounding. These local +accumulators are also finite; no unbounded-integer storage is assumed. + +The literal layer count is `K(f)=21688+5894f`, while the completed service +count is 25312 including input/output layers. Expanding native transforms +into those literal butterflies is a precision witness; its runtime is not +the recursive invoice. Physical word allocation, record movement, uniform +recursive implementations and the five framework premises remain separate. + +Prepared for thu-nmrc with OpenAI Codex assistance. Apache-2.0. The original +P104/Cinna Davis/Ali Romman/Cao Yifan/zxv/native/compiler lineage is retained; +the exact source word is not changed. diff --git a/research/p104-cut-stability/range-peer/RESULT.json b/research/p104-cut-stability/range-peer/RESULT.json new file mode 100644 index 0000000000..7008deeb06 --- /dev/null +++ b/research/p104-cut-stability/range-peer/RESULT.json @@ -0,0 +1,24 @@ +{ + "E": 296, + "Gamma": "2^296", + "additional_exact_scalar_accumulator_guard_bits": 35, + "fixed_integer_magnitude_bits_literal": "2 + max(0, b + 17 + 20 f, ceil_log2(K) + E + 36 f - p)", + "fixed_integer_magnitude_bits_service": "2 + max(0, b + 17 + 14 f, ceil_log2(K) + E + 18 f - p)", + "limits": "Conservative dyadic upper envelope, not an exact all-interval maximum; finite flat-template range bound only; service output-error ABI and native chart assumptions retained; no recursive runtime, stock/tape, or scientific-adoption claim", + "maximizer_of_computed_envelope": { + "cut": 24859, + "exponent": 296, + "role": 146 + }, + "physical_interval_bounds": { + "completed_semantic_cuts": "Gamma N^18", + "native_layer_cuts": "Gamma N^36" + }, + "small_control": { + "dyadic_bound_exponent": 5, + "events": 7, + "exact_maximum": "9/2" + }, + "status": "PASS_INDEPENDENT_ALL_INTERVAL_RANGE_ENVELOPE", + "word_sha256": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446" +} diff --git a/research/p104-cut-stability/range-peer/WORD.json.gz b/research/p104-cut-stability/range-peer/WORD.json.gz new file mode 100644 index 0000000000..c04a815c26 Binary files /dev/null and b/research/p104-cut-stability/range-peer/WORD.json.gz differ diff --git a/research/p104-cut-stability/range-peer/range.py b/research/p104-cut-stability/range-peer/range.py new file mode 100644 index 0000000000..0235c92e13 --- /dev/null +++ b/research/p104-cut-stability/range-peer/range.py @@ -0,0 +1,68 @@ +"""Independent all-interval dyadic exponent upper bound for the fixed WORD. + +No author code imports. This is a flat-template range lemma, not a recursive +backend or physical stock proof. Apache-2.0; prepared with OpenAI assistance. +""" +from pathlib import Path +from fractions import Fraction as F +from hashlib import sha256 +import gzip,json +HERE=Path(__file__).resolve().parent +SHA='48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446' +def need(ok,why): + if not ok:raise ValueError(why) +def ceiling_log2(q): + q=F(q);need(q>0,'Positive logarithm argument') + h=q.numerator.bit_length()-q.denominator.bit_length() + bound=F(2**h) if h>=0 else F(1,2**(-h)) + return h if q<=bound else h+1 +def envelope(program,roles): + e=[0]*roles;largest=0;witness={'cut':0,'role':0,'exponent':0} + for i,event in enumerate(program): + op,r=event[:2] + if op in ('INIT','CLEAR'):e[r]=0 + elif op=='SCALE': + q=abs(F(event[2]));e[r]=max(0,e[r]+ceiling_log2(q)) if q else 0 + elif op in ('ADD','COPY'): + q=abs(F(event[3])) + if q:e[r]=max(e[r],e[event[2]]+ceiling_log2(q))+1 + else:need(op=='MOVE','Known actual opcode') + if e[r]>largest: + largest=e[r];witness={'cut':i+1,'role':r,'exponent':largest} + return largest,witness +def exact_multiply(a,b): + n=len(a) + return [[sum((a[i][k]*b[k][j] for k in range(n)),F(0)) for j in range(n)] for i in range(n)] +def small_all_intervals(): + # This fixture contains contractions, expansion, zero reset and ADD-COPY. + p=[['ADD',0,1,'-3/2',0],['SCALE',1,'1/8',0],['INIT',2,0], + ['COPY',2,0,'1',0],['ADD',1,2,'7/4',0],['CLEAR',2,0],['SCALE',0,'0',0]] + emax,_=envelope(p,3);identity=[[F(i==j) for j in range(3)] for i in range(3)] + operators=[] + for x in p: + a=[row[:] for row in identity];op,r=x[:2] + if op in ('INIT','CLEAR'):a[r]=[F(0)]*3 + elif op=='SCALE':a[r]=[F(x[2])*z for z in a[r]] + else:a[r][x[2]]+=F(x[3]) + operators.append(a) + maximum=F(1) + for start in range(len(p)+1): + a=[row[:] for row in identity] + for m in operators[start:]: + a=exact_multiply(m,a) + maximum=max(maximum,max(sum(map(abs,row)) for row in a)) + need(maximum<=2**emax,'Exhaustive small all-interval control') + need(ceiling_log2(F(1,65536))==-16 and ceiling_log2(F(65537,2))==16,'Exact logarithm controls') + return {'events':len(p),'exact_maximum':str(maximum),'dyadic_bound_exponent':emax} +def run(): + raw=(HERE/'WORD.json.gz').read_bytes();need(sha256(raw).hexdigest()==SHA,'Exact actual WORD') + w=json.loads(gzip.decompress(raw));e,where=envelope(w['program'],743) + return {'status':'PASS_INDEPENDENT_ALL_INTERVAL_RANGE_ENVELOPE','word_sha256':SHA, + 'E':e,'Gamma':'2^'+str(e),'maximizer_of_computed_envelope':where, + 'small_control':small_all_intervals(), + 'physical_interval_bounds':{'completed_semantic_cuts':'Gamma N^18','native_layer_cuts':'Gamma N^36'}, + 'fixed_integer_magnitude_bits_literal':'2 + max(0, b + 17 + 20 f, ceil_log2(K) + E + 36 f - p)', + 'fixed_integer_magnitude_bits_service':'2 + max(0, b + 17 + 14 f, ceil_log2(K) + E + 18 f - p)', + 'additional_exact_scalar_accumulator_guard_bits':35, + 'limits':'Conservative dyadic upper envelope, not an exact all-interval maximum; finite flat-template range bound only; service output-error ABI and native chart assumptions retained; no recursive runtime, stock/tape, or scientific-adoption claim'} +if __name__=='__main__':print(json.dumps(run(),indent=2,sort_keys=True)) diff --git a/research/p104-cut-stability/validation/COLD.json b/research/p104-cut-stability/validation/COLD.json new file mode 100644 index 0000000000..f5922ad9ba --- /dev/null +++ b/research/p104-cut-stability/validation/COLD.json @@ -0,0 +1,25 @@ +{ + "commit": "1ce6038f8d3c669f686c8f73ac537b214dd6b94f", + "tar_sha256": "43a9a2da3208eeb14e6401675249132b392542e08e6209d6a3205e97229be04d", + "files_with_receipt": 56, + "package_files": 55, + "readonly_modes": "files 0444, dirs 0555", + "PATH": "", + "git_present": false, + "identical_stdout": true, + "unchanged_inventory_and_bytes": true, + "runs": [ + { + "label": "cold-normal", + "exit": 0, + "wall_seconds": 4.943, + "stdout_sha256": "ec00d9735cfcf820a03b9e96b716b29898d8da5dafd529ae707f38f9b901f436" + }, + { + "label": "cold-optimized", + "exit": 0, + "wall_seconds": 4.96, + "stdout_sha256": "ec00d9735cfcf820a03b9e96b716b29898d8da5dafd529ae707f38f9b901f436" + } + ] +} diff --git a/research/p104-cut-stability/validation/COMMITTED-INITIAL.log b/research/p104-cut-stability/validation/COMMITTED-INITIAL.log new file mode 100644 index 0000000000..825fb8344d --- /dev/null +++ b/research/p104-cut-stability/validation/COMMITTED-INITIAL.log @@ -0,0 +1 @@ +PASS_RESEARCH_COMMIT_BYTES {"commit": "1ce6038f8d3c669f686c8f73ac537b214dd6b94f", "files": 55, "package": "research/p104-cut-stability", "source_history_commits": ["13be6ac685845c1ff671f5d26e7166165abd998e"]} diff --git a/research/p104-cut-stability/validation/DIRECT.json b/research/p104-cut-stability/validation/DIRECT.json new file mode 100644 index 0000000000..e8b7a1b803 --- /dev/null +++ b/research/p104-cut-stability/validation/DIRECT.json @@ -0,0 +1,31 @@ +{ + "python": "3.12.13 (main, Mar 25 2026, 03:16:06) [Clang 22.1.1 ]", + "runs": [ + { + "label": "normal", + "argv": [ + "/Users/gsdata/.local/share/uv/python/cpython-3.12-macos-aarch64-none/bin/python3.12", + "-I", + "-B", + "/tmp/imb-p104-cut-stability-20261025/research/p104-cut-stability/verify.py" + ], + "exit": 0, + "wall_seconds": 4.872, + "stdout_sha256": "ec00d9735cfcf820a03b9e96b716b29898d8da5dafd529ae707f38f9b901f436" + }, + { + "label": "optimized", + "argv": [ + "/Users/gsdata/.local/share/uv/python/cpython-3.12-macos-aarch64-none/bin/python3.12", + "-I", + "-O", + "-B", + "/tmp/imb-p104-cut-stability-20261025/research/p104-cut-stability/verify.py" + ], + "exit": 0, + "wall_seconds": 4.94, + "stdout_sha256": "ec00d9735cfcf820a03b9e96b716b29898d8da5dafd529ae707f38f9b901f436" + } + ], + "identical_stdout": true +} diff --git a/research/p104-cut-stability/validation/REGISTERED.log b/research/p104-cut-stability/validation/REGISTERED.log new file mode 100644 index 0000000000..587b597e55 --- /dev/null +++ b/research/p104-cut-stability/validation/REGISTERED.log @@ -0,0 +1,5 @@ +CHECK Authenticate retained bytes; reconstruct the literal eight ADD-COPY sites; exhaust every exact source cut with independent dyadic and Fraction interpreters; check all arbitrary public endpoints, suffix residuals, witnesses, interval/range controls, whole-caller inventory and current-source joins. Written norm/fiber proof and native/backend hypotheses remain scoped; no new kappa or scientific admission is claimed. +{"all_interval_scalar_bound": "2^296", "complete_caller_coordinate_bound": "2^(5844+ceil((265*f+1)/2))", "cuts_checked_in_each_direction": 25311, "new_Gaussian_calls": 0, "new_kappa": false, "prefix_max_row_l1": "131072", "scalar_tariff_change": 0, "scientific_adoption": false, "scope": "Finite exact-word/caller error and range specialization; native/recursive implementation, tape, compiler and analytic framework premises remain.", "selected_promotion": false, "status": "PASS_P104_CUT_STABILITY_AND_CALLER_BOUNDS", "suffix_max_row_l1": "135415/4"} +CHECK Authenticate retained bytes; reconstruct the literal eight ADD-COPY sites; exhaust every exact source cut with independent dyadic and Fraction interpreters; check all arbitrary public endpoints, suffix residuals, witnesses, interval/range controls, whole-caller inventory and current-source joins. Written norm/fiber proof and native/backend hypotheses remain scoped; no new kappa or scientific admission is claimed. +{"all_interval_scalar_bound": "2^296", "complete_caller_coordinate_bound": "2^(5844+ceil((265*f+1)/2))", "cuts_checked_in_each_direction": 25311, "new_Gaussian_calls": 0, "new_kappa": false, "prefix_max_row_l1": "131072", "scalar_tariff_change": 0, "scientific_adoption": false, "scope": "Finite exact-word/caller error and range specialization; native/recursive implementation, tape, compiler and analytic framework premises remain.", "selected_promotion": false, "status": "PASS_P104_CUT_STABILITY_AND_CALLER_BOUNDS", "suffix_max_row_l1": "135415/4"} +PASS_REGISTERED_RESEARCH_PACKAGE research/p104-cut-stability outcome=partial diff --git a/research/p104-cut-stability/verify.py b/research/p104-cut-stability/verify.py new file mode 100644 index 0000000000..185eb8a29f --- /dev/null +++ b/research/p104-cut-stability/verify.py @@ -0,0 +1,97 @@ +"""Source-bound join of independent all-cut and whole-caller error evidence. + +Prepared for thu-nmrc with substantial OpenAI Codex assistance. Apache-2.0. +No independent human/proof-kernel or complete multiplier claim is made. +""" +import gzip +from hashlib import sha256 +import importlib.util +import json +from pathlib import Path +import sys + +HERE=Path(__file__).resolve().parent + +def need(ok,why): + if not ok: + raise ValueError(why) + +def canonical(value): + return json.loads(json.dumps(value,sort_keys=True)) + +def authenticate(raw,expected): + need(sha256(raw).hexdigest()==expected,'Authentication before mathematical imports') + +def load(name,path): + spec=importlib.util.spec_from_file_location(name,path) + module=importlib.util.module_from_spec(spec) + sys.modules[name]=module + spec.loader.exec_module(module) + return module + +def run(): + pins=json.loads((HERE/'RUNTIME-PINS.json').read_text()) + for name,expected in pins.items(): + path=HERE/name + need(path.is_file() and not path.is_symlink(),'Regular retained input '+name) + authenticate(path.read_bytes(),expected) + for name in ['inputs/WORD.json.gz','inputs/source_local.py']: + try: + authenticate((HERE/name).read_bytes()+b'\n',pins[name]) + except ValueError: + pass + else: + raise ValueError('Actual source corruption was accepted: '+name) + + core=load('p104_cut_author',HERE/'check.py') + fresh=core.calculate() + need(fresh==json.loads((HERE/'RESULT.json').read_text()),'Current all-cut receipt') + peer=load('p104_cut_fraction_peer',HERE/'peer/verify.py') + independent,_cpu=peer.calculate() + need(canonical(independent)==json.loads((HERE/'peer/RESULT.json').read_text()),'Independent all-cut receipt') + for key in ['prefix_max_row_l1','prefix_max_witness','prefix_max_entry_denominator_exponent', + 'prefix_denominator_witness','suffix_max_row_l1','suffix_max_witness', + 'suffix_max_entry_denominator_exponent','suffix_denominator_witness']: + need(independent[key]==fresh[key],'Current/independent all-cut binding '+key) + need(independent['word_sha256']==fresh['word_sha256'],'Exact common source word') + + reviewer=load('p104_cut_witness_peer',HERE/'proof-peer/review.py') + reviewed=reviewer.run() + need(canonical(reviewed)==json.loads((HERE/'proof-peer/RESULT.json').read_text()),'Independent selected-row and residual controls') + need(reviewed['prefix_witness']['row']==fresh['prefix_max_witness']['row'] and + reviewed['suffix_witness']['row']==fresh['suffix_max_witness']['row'],'Current maximum-row witnesses') + interval=load('p104_cut_interval_peer',HERE/'range-peer/range.py').run() + need(canonical(interval)==json.loads((HERE/'range-peer/RESULT.json').read_text()),'Independent range recurrence and exhaustive small control') + need(interval['E']==fresh['all_interval_majorant']['scalar_amplification_power_of_two'],'Current all-interval exponent') + + source=load('p104_cut_retained_source',HERE/'inputs/source_local.py') + original=json.loads(gzip.decompress((HERE/'inputs/WORD.json.gz').read_bytes())) + residual=json.loads(gzip.decompress((HERE/'RESIDUAL-WORD.json.gz').read_bytes())) + before,after=canonical(source.replay(original)),canonical(source.replay(residual)) + need(before==after==json.loads((HERE/'RESIDUAL-SOURCE-REPLAY.json').read_text()), + 'Fresh retained typed replay: ADD-COPY has the same endpoint, paid/helper invoice and scalar tariff') + + whole=load('p104_cut_whole_application',HERE/'whole-caller/check.py') + application=whole.derive() + need(canonical(application)==json.loads((HERE/'whole-caller/RESULT.json').read_text()),'Fresh complete caller census and majorants') + lc=application['local'] + need(lc['all_interval_scalar_power']==fresh['all_interval_majorant']['scalar_amplification_power_of_two'] and + lc['all_interval_denominator_exponent']==fresh['all_interval_majorant']['scalar_denominator_exponent_upper'], + 'Complete caller consumes this exact interval bound') + need(canonical(lc['paid_profile'])==after['paid'] and canonical(lc['helper_targets'])==after['helpers'], + 'Complete caller preserves every paid and productive local target') + need(application['input_sha256']['WORD.json.gz']==fresh['word_sha256'], + 'Complete caller and current exact word agree') + return {'status':'PASS_P104_CUT_STABILITY_AND_CALLER_BOUNDS', + 'cuts_checked_in_each_direction':fresh['cuts'], + 'prefix_max_row_l1':fresh['prefix_max_row_l1'], + 'suffix_max_row_l1':fresh['suffix_max_row_l1'], + 'all_interval_scalar_bound':'2^'+str(interval['E']), + 'complete_caller_coordinate_bound':'2^(5844+ceil((265*f+1)/2))', + 'new_Gaussian_calls':fresh['residual_word']['new_Gaussian_calls'], + 'scalar_tariff_change':fresh['residual_word']['ordinary_scalar_tariff_change'], + 'new_kappa':False,'scientific_adoption':False,'selected_promotion':False, + 'scope':'Finite exact-word/caller error and range specialization; native/recursive implementation, tape, compiler and analytic framework premises remain.'} + +if __name__=='__main__': + print(json.dumps(run(),sort_keys=True)) diff --git a/research/p104-cut-stability/whole-caller/CHECKS.json b/research/p104-cut-stability/whole-caller/CHECKS.json new file mode 100644 index 0000000000..a1a2077ec8 --- /dev/null +++ b/research/p104-cut-stability/whole-caller/CHECKS.json @@ -0,0 +1,29 @@ +{ + "heavy_replays": false, + "runs": [ + { + "command": [ + "python3", + "-I", + "-B", + "check.py" + ], + "exit_code": 0, + "stdout": "PASS_SOURCE_SPECIFIC_DECLARED_INTERFACE_MAJORANTS\nwhole:2^5844*N^1295; denom:972+1295*f; raw slots:13062\nfresh raw R/G bits: 113 116\n", + "wall_seconds": 0.172205 + }, + { + "command": [ + "python3", + "-I", + "-O", + "-B", + "check.py" + ], + "exit_code": 0, + "stdout": "PASS_SOURCE_SPECIFIC_DECLARED_INTERFACE_MAJORANTS\nwhole:2^5844*N^1295; denom:972+1295*f; raw slots:13062\nfresh raw R/G bits: 113 116\n", + "wall_seconds": 0.171635 + } + ], + "status": "PASS" +} diff --git a/research/p104-cut-stability/whole-caller/FILES.sha256 b/research/p104-cut-stability/whole-caller/FILES.sha256 new file mode 100644 index 0000000000..2b5247d7da --- /dev/null +++ b/research/p104-cut-stability/whole-caller/FILES.sha256 @@ -0,0 +1,15 @@ +d411229d8205adceabc1e0f2ebb41c1738ca074c86c562741d29fe7fa5a346ec CHECKS.json +a0334011c8b94c9f57ff662770a8041214f9a0885ef61b89d51618bd49ab2cb0 PROOF.md +33638c2a2b4f9b53f33ba9c2f6e33e4ffc4d35cf9bd5925303fcb93b48d3aecb README.md +5145337b016180f376ca625cefcd6845373ee1cb02f33cf181027292e0ec54cd RESULT.json +c079827b29073bc9e303e616ad5c2023b8dbd2fda95a1ed8dcafedd265e9bada SOURCES.json +8e62ca95e8cf49765a7c77bf7354278df38bd18c3354244b7b476840013a8715 check.py +7b1cf55ecd8d8aac08c24916fd477acf155a6f63fce1680f505266e8686f33f5 inputs/CUT-STABILITY-RESULT.json +588743fb8890231da350fd86cef3fb6618769b953cdf20e2753e99d403ed54be inputs/HILBERT-FIBER-REVIEW.md +36a5680f43c7da67e570b6c919de2934c6a5ce46db002993ff162aa36972d0ba inputs/PR5551-RESULT.json +cda8f596f7854f42a228f757d5f8e68f6b2256a19c5ae3771fb40753cedc5b39 inputs/SELECTED-V16-APPLICATION-PROOF-v3.md +48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446 inputs/WORD.json.gz +300d40043953e4f6aecfde8f2d1004b8ad6dc5a79ec3c7666c9908c2466c91c8 inputs/caller.py +a84f6bbd547379597464e56c420cc665f96bc43a9a1351eed4b7cd0fce3cc4b9 inputs/controller.json +878734dfd64c4b9d362d0ae476cc5c2a19fe93e48b7378763b23f3e0dd0a5a71 inputs/local.py +b257eb40480269328821e334de3fef6c64a652ff4f0628411a98be398d4cfea0 inputs/physical.json diff --git a/research/p104-cut-stability/whole-caller/PROOF.md b/research/p104-cut-stability/whole-caller/PROOF.md new file mode 100644 index 0000000000..6570225e1b --- /dev/null +++ b/research/p104-cut-stability/whole-caller/PROOF.md @@ -0,0 +1,300 @@ +# Source-specific physical and precision application + +This is a finite application at the declared complete-field and canonical +native-C-factor interfaces, conditional on the selected native/all-column, +owned-erasure, finite-compiler, precision/tape and analytic-recovery premises. +It supplies source-specific numerical and ordinary-work constants. It does not +materialize a uniform recursive word, scalar/tape microprogram or rounded +multiplier, and does not establish an unconditional theorem or a new kappa. + +## 1. Fixed source, order and all fields + +The retained `inputs/WORD.json.gz` has container SHA256 +`48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446`. +It is the PR5551 local word retained on main +`13be6ac685845c1ff671f5d26e7166165abd998e`. The caller and local source are +byte-pinned by `check.py`. The caller is the credited p16/a7 Laurent controller +with sixteen explicit inverse wrappers replaced by forward LOCAL uses. +Execution is **RIGHT boundary, physical events, LEFT boundary**. The first +integer in each diagonal term is a Q exponent. The sixteen negative exponents +require central native X translations after LEFT; they are not scalar signs. + +There are 32 main banks, each containing 104 complete independent fields: +3328 main fields, not 1664. Each of the 18 LOCAL occurrences has its own 527 +independent dirty helpers. Their 9486 fields are not identified across calls, +discarded, or promised zero. The productive inventory is therefore 12814. +The 18 local owned sets have eight positions each. One additional 104-field +owned query bank can be reused between the fifteen sequential query events. +The resulting raw reservation is 248 owned and **13062 total positions**. +This is a constructive reservation, not an observed simultaneous peak. +Allocating every query occurrence separately gives the larger safe 14518 +position reservation. Recursive children and movement scratch are additional. + +The public source has 735 roles, plus eight owned labels. Its 25310 records +are 20947 ADD, 715 SCALE, 3624 MOVE, eight INIT, eight COPY and eight CLEAR. +The COPY service is implemented by **ADD into an exactly initialized owned +zero**. Thus arbitrary injected owned residuals are retained; assignment COPY +would have a different residual ABI. The exact all-column endpoint of the +original word is a retained source result; this checker does not replay it. +Replacing COPY by ADD leaves its exact initialized trajectory and tariff +unchanged. The root's separate residual-word replay checks that specialization. + +All other banks, helper fields, owned positions, descriptors and suspended +parent streams are parked complete spectators while a child runs. Each child +has instance-path-owned banks, completes the full positive Gaussian job, +restores both signed monomial adapters and ordering, and returns before the +parent resumes. Correlated data do not identify owners. The source's five +conditional premises cover those implementations and owned erasures. + +## 2. Actual operation and normalization ledger + +The physical event list has 18 LOCAL, 15 QUERY_SHEAR, 15 IDLE, 90 ADD, +48 SIGNED_SWAP and 32 Q_POWER records. The RIGHT boundary has 25 ADD, 27 SWAP +and three SCALE; LEFT has 56 ADD, 30 SWAP and four SCALE. All those ADD +coefficients are units and all boundary SCALEs are minus one. The literal +ordinary lowering is + +``` +SWAP(a,b): a+=b; b-=a; a+=b; b*=(-1) +SIGNED_SWAP(a,b): a+=b; b-=a; a+=b +``` + +Thus the outer controller has 486 ADD layers and 64 sign layers. Each layer +acts independently on the 104 port positions. In maximum-field or coordinate +sup norm the disjoint layer has the maximum of the module norms, not the +product of 104 norms. Its scalar tariff is +`104*(8*486+2*64)=417664` in the retained real-operation unit. + +A query uses its own position in the 104-field owned bank: clear owned entry, +ADD-copy the actual source, complete a positive rank-one Gaussian with its +two monomial adapters, apply the central X alias for inverse Q, scatter ADD +to the actual destination, and clear the owned result. The source is +preserved. The field module's safe partial norm is `2*N*2=4N`; clears and +unit monomials have norm at most one. The 104 modules are disjoint. Every +owned position is returned zero before the bank is reused. COPY plus scatter +cost 16 units per use; the two clears cost four more. All 1560 uses cost +31200, plus 208 units to initialize the query bank. This fresh ledger does +not assume the historical 1664-unit query estimate already paid those clears. + +The IDLE sequence has lengths 2,3,4,5,6,7,8,9,8,7,6,5,4,3,2. Each independent +field job has rank eight times its length. The sum of these ranks is 632; +the two banks and 104 ports are disjoint within an IDLE event. The actual +main target histogram and all 3120 IDLE paid jobs are regenerated from the +retained lists by the checker. The whole invoice has 69912 paid fields with +rank mass 239108 and 12814 productive targets with rank mass 239868. +No invoice or recursive price is changed here. + +The complete charged monomial occurrence ledger is: + +| Source/native maps | Field occurrences | +|---|---:| +| Two MOVE adapters, 3624 per LOCAL | 130464 | +| Source helper input/output aliases | 18972 | +| Intrinsic main phase adapters | 3744 | +| Four physical main contacts per LOCAL and port | 7488 | +| Controller central Q_POWER translations | 3328 | +| **Source subtotal** | **163996** | +| Whole main input/output layout permutations | 6656 | +| Whole helper input/output layout permutations | 18972 | +| Whole IDLE input/output layout permutations | 6240 | +| Final negative-Q central translations | 1664 | +| Query input/output layouts | 3120 | +| Query inverse-Q translations | 1560 | +| **Additional subtotal** | **38212** | + +These are 202208 field maps. Their P/D/X/phase components are ordinary +operations, not free Gaussian credit. For full tensor width f, P acts on +each complete f-axis slot, and fixed phases use the retained factorwise +signed recipe, with exterior scalar coefficients applied only once. There +is no distributivity claim obtained by tensoring a scalar sum. The source +phase-bearing native and physical-route receipts are retained dependencies; +this inexpensive census does not rerun their exact phase checks. + +## 3. Fresh ordinary finite constants + +The local scalar allowance is 217428 per LOCAL. Adding the actual lowered +controller, query clears and query-bank initialization gives the fresh scalar +allowance **4362776**. The old source raw upper 184647552 remains a diagnostic +input. It does not automatically pay the new global maps or query clears. + +Use the selected affine/quadratic finite recipe from the retained V16 +application sections 1 and 4. Elimination, fixed return routes, translations, +quadratic phases and descriptor passes for a d-axis map have the conservative +recipe bound `64*(d+1)^3`. Here d is **265**, not the old local nine-axis +bound. The script constructs a fresh I by summing all literal local records, +the controller and boundary records, four records per charged monomial +occurrence, every raw owned/productive/paid position, six records per query +use, and the historical raw upper again as a deliberate overcount. Set + +``` +Rraw = 64*266^3*I^3 + 4362776 +Graw = 4362776 + 8*Rraw. +``` + +The exact resulting integers are in RESULT.json; their bit lengths are 113 +and 116. Both are below 2^128. This fresh overestimate pays role/order +permutations, layouts and matching, both adapter directions, owned scans, +fixed descriptors and scalar recipes within the selected finite physical +compiler class. It is a bound on admitted primitive schemas, not a claim +that one schema is one literal Turing-tape instruction at arbitrary f. +The numbers below 2^128 bound fixed **265-axis recipe coefficients**. They +do not bound all operations of an arbitrarily wide tensor instance by a +constant. Tensoring gives a 265f-bit affine/quadratic recipe, for which +`64*(265f+1)^3 <=64*266^3*(f+1)^3`. A safe expanded symbolic recipe bound is +therefore `Rschema(f)<=Rraw*(f+1)^3`, and likewise +`Gschema(f)<=Graw*(f+1)^3`. The selected-bit execution/movement tariff and +precision-dependent arithmetic remain their retained framework contracts. +The compact-control, parked-parent, full-spectator and movement-domain +contracts remain selected premises. No downstream strictified-unit count, +all-n compiler recurrence or new numerical machine cutoff is asserted here. + +## 4. Scalar all-interval and physical chart bounds + +Use realified coordinate sup norm: the maximum of all real and imaginary +coordinate magnitudes. All monomial recipes have norm one and introduce +no denominator. A normalized C on one bit has norm at most two and binary +denominator exponent at most one. A complete f-column C direction therefore +has norm at most `2^f=N`, with binary denominator exponent at most f. + +The retained all-cut source certificate has exact prefix row sum 131072 and +exact suffix row sum 135415/4. Its additional all-interval upper bounds are +**Gamma=2^296** and **D=54**. These interval bounds are not asserted to be +attained maxima. The inexpensive checker independently reproduces them by +the following O(25310) recurrence on all 743 roles. Start each e,d at zero; +MOVE is logical identity. For ADD (including physical COPY), + +``` +e_dst = max(e_dst,e_src+ceil(log2(abs(q))))+1 +d_dst = max(d_dst,d_src+log2(den(q))). +``` + +For SCALE use `e=max(0,e+ceil(log2(abs(q))))` and add the coefficient's binary +denominator exponent. INIT/CLEAR reset both to zero. Keeping identity as a +possible restart at every cut dominates every scalar interval. Row-sum +triangle inequality proves the e recurrence, including coefficients below +one; denominator arithmetic proves d. COPY is ADD, so independent owned +residuals are present throughout this bound. Separately, the product of all +per-record `(1+abs(q))` bounds gives Gamma<=2^27646 and D<=17032; this weaker +bound is reproduced as an independent crosscheck. + +The source initial public chart dimension is at most five, and every current +chart dimension and native child rank is at most nine. Canonical Phi_F and +its inverse use exactly dim(F) normalized C directions, plus unit monomials. +Semantic local prefixes therefore cost at most `LambdaP*N^(5+9)`, suffixes +at most `LambdaS*N^(9+9)`. A cut inside a complete native C-factor recipe +adds at most nine C directions at each extremal end. Safe local bounds are + +``` +prefix <=LambdaP*N^23, suffix <=LambdaS*N^27, +any interval <=Gamma*N^36, +interval denominator exponent <=54+36f. +``` + +This includes the arbitrary dirty inputs and the owned residuals. The bound +is at declared field/native-C-factor cuts, including fully retained spectator +fields. Internal scalar accumulators, literal in-place butterfly lowerings, +movement/tape loops and recursive child internals need their admitted +primitive-prefix contracts. This proof does not silently assign norm one +to an unmaterialized internal implementation. + +## 5. Whole caller and error ABI + +An arbitrary whole interval intersects at most 18 LOCAL intervals, fifteen +queries and fifteen IDLE events. All individual upper bounds are at least +one, so retaining every event also bounds a truncated interval, prefix or +suffix. The 486 lowered outer ADD layers contribute at most 2^486; the +queries contribute at most `4^15*N^15`; all IDLEs contribute at most N^632. +Hence + +``` +K(N) = 2^516*Gamma^18*N^(18*36+15+632) + = 2^5844*N^1295, +Dwhole(f) = 18*54+1295f = 972+1295f. +``` + +Global whole-job and stage maps are unit monomials; they change neither +bound. The full 265 axes include the central block and all 32 fresh blocks. +There is no forgotten spectator-dimension factor in this componentwise +sup-norm argument. Parallel modules use disjoint raw positions. No sum over +13062 fields, 104 ports or external spectator addresses is needed. + +The input/output error ABI is explicit: an arbitrary realified coordinate +residual of sup norm eta at any declared interface is transported to a later +interface with sup norm at most K(N)*eta. For multiple injected residuals, +sum their separately transported contributions. A count of recursive +rounding sites and a bound for primitive interiors must still be supplied +by the retained precision/compiler specialization. K alone is not such a +site count. The weaker product crosscheck is `2^498144*N^1295`, with binary +denominator exponent `306576+1295f`. + +There is a sharper corollary using the retained active-fiber Hilbert method +credited to Ross Richardson and Adam Gall in the +`research/p104-retimed-internal-grid` lineage. Fix an outer spectator +address. Use maximum **individual-field** Hilbert norm over the common +265f active coordinates, not joint l2 over all fields. Each canonical chart, +complete native C factor, phase and route is unitary. At a local interval's +endpoints, each block is a scalar coefficient times a product of two +unitaries; its block norm is the coefficient's absolute value. Thus Gamma +alone, without N^36, bounds that local interval in this norm. The scalar ADD +factor is two, each query costs at most four, and whole IDLEs are unitary. +The complete caller's maximum-individual-field Hilbert interval bound is +therefore **2^5844**. + +Convert once, at the interval input, from realified coordinate norm to one +active complex fiber's Hilbert norm. Its dimension is `2^(265f)`, so + +``` +||delta_out||coordinate-infinity + <=2^5844*sqrt(2*2^(265f))*||delta_in||coordinate-infinity + <=2^(5844+ceil((265f+1)/2))*||delta_in||coordinate-infinity. +``` + +No factor from the number of fields or spectator addresses is dropped: +neither occurs in a maximum-individual-field/fixed-spectator-fiber norm. +All 265f active coordinates do occur. A cut inside a real-output accumulator +is not a complete C-factor cut and retains its separate primitive contract. +The independent scoped review is retained as HILBERT-FIBER-REVIEW.md. This +corollary improves the coordinate amplification; the coarse denominator +bound and storage expression below remain valid crosschecks. + +For dyadic real/imaginary inputs of magnitude at most 2^b and initial grid +2^-d0, every exact raw intermediate at these interfaces has a common binary +denominator dividing `2^(d0+972+1295f)`. A signed numerator therefore fits + +``` +b+d0+6818+2590f bits per real or imaginary component. +``` + +A dense raw reservation of all 13062 complete fields consequently fits +`2*13062*N^265*(b+d0+6818+2590f)` bits, plus fixed descriptors and separately +reserved recursive-child banks. This is a constructive coarse exact-value +range/storage majorant. It neither changes the input precision nor assumes +unbounded constant-size integers. Rounding errors use the same explicit +input/output ABI; a complete rounded multiplier is not constructed here. + +## 6. Fixed carrier and retained premises + +The PR5551 carrier is fixed at H=690116000000000 and N=2^H; its tested/claim +gap is 1/14000000000. None of this proof's constants is absorbed into an +uncertified power of that fixed N. Fresh finite recipe, range, storage and +error constants belong in the constructive precision/setup multipliers and +outer domain-entry thresholds. For any fixed C>=1 and positive rational +delta, `h>=2^ceil(log2(2C)/delta)` is a sufficient outer-size threshold for +`C<=h^delta/2`. Additional fixed polynomial/logarithmic factors use their +retained enlarged outer thresholds. They do not alter a paid/target ratio. + +All coefficients remain Gaussian dyadic; no new odd denominator, field +extension or fine-prime exclusion is introduced. Whole stock products, +instance-path ownership, scalar/movement compiler bounds, BIT stocks and +analytic recovery must be specialized with their actual selected premises. +No assumption that those constants are zero, or that a numerical census +proves the five premises, is made. The retained V16 proof documents the +known application method; its old source-specific counts or 145-axis +majorants are not reused for this 265-axis instance. + +Attribution: the P104 source credits David Arias, Cinna Davis and Gareth +Davidson; the actual all-forward caller and source application credit Ali +Romman with substantial OpenAI Codex assistance. The selected finite physical, +precision and compiler framework retains its existing contributor notices. +This inexpensive new instance census/majorant application is OpenAI Codex +assistance to the current contributor. All retained source notices remain. diff --git a/research/p104-cut-stability/whole-caller/README.md b/research/p104-cut-stability/whole-caller/README.md new file mode 100644 index 0000000000..8feae551b7 --- /dev/null +++ b/research/p104-cut-stability/whole-caller/README.md @@ -0,0 +1,34 @@ +# P104 whole-caller majorant application + +Source-specific finite application, conditional on the five selected framework +premises. The actual 265-axis caller, all 32 main banks, 9486 independent dirty +helpers and a 248-position owned reservation are retained. No new kappa, +selected promotion, unconditional or proof-kernel acceptance is claimed. + +`PROOF.md` derives every declared complete-field/native-C-factor interval, +prefix and suffix bound `2^5844*N^1295`, and binary denominator exponent +`972+1295f`, where N=2^f. The credited active-fiber Hilbert method sharpens +coordinate amplification to `2^(5844+ceil((265f+1)/2))`; its independent review +is retained. The proof gives explicit range/error/storage interfaces and +a fresh ordinary-work ledger, rather than assuming the historical raw cap +already funds new layouts or query clears. Literal scalar/tape microprogram +and recursive-child interior contracts remain selected dependencies. + +Run the cheap census and source-binding check: + +``` +python3 -I -B check.py +python3 -I -O -B check.py +``` + +The script uses only the standard library, performs a linear-time 743-role +interval-majorant recurrence, and compares `RESULT.json`. It does not run +endpoint/native phase replays, flows, family materializations or full caller +pricing. `inputs/` contains byte-pinned source and prior scoped receipts; +the exact all-cut prefix/suffix claims are retained inputs, while the interval +DP and caller/ordinary inventories are cheaply recomputed here. + +The exact COPY trajectory is implemented as ADD into owned zero, retaining +arbitrary injected residuals. The local tariff is unchanged. The 13062 raw +positions are a constructive allocation, not a measured peak. See the proof +for all scope limits, query-bank lifetime and source attribution. diff --git a/research/p104-cut-stability/whole-caller/RESULT.json b/research/p104-cut-stability/whole-caller/RESULT.json new file mode 100644 index 0000000000..73a7d5d89b --- /dev/null +++ b/research/p104-cut-stability/whole-caller/RESULT.json @@ -0,0 +1,241 @@ +{ + "caller": { + "boundary_ops": { + "left": { + "ADD": 56, + "SCALE": 4, + "SWAP": 30 + }, + "right": { + "ADD": 25, + "SCALE": 3, + "SWAP": 27 + } + }, + "event_ops": { + "ADD": 90, + "IDLE": 15, + "LOCAL": 18, + "QUERY_SHEAR": 15, + "Q_POWER": 32, + "SIGNED_SWAP": 48 + }, + "idle_lengths": [ + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2 + ], + "idle_paid": { + "16": 416, + "24": 416, + "32": 416, + "40": 416, + "48": 416, + "56": 416, + "64": 416, + "72": 208 + }, + "idle_sum_rank": 632, + "local_stages": [ + 0, + 1, + 3, + 5, + 7, + 9, + 11, + 13, + 15, + 17, + 19, + 21, + 23, + 25, + 27, + 29, + 31, + 32 + ], + "main_targets": { + "145": 208, + "17": 416, + "25": 416, + "33": 416, + "41": 416, + "49": 416, + "57": 416, + "65": 416, + "73": 208 + }, + "outer_lowered_ADD_layers": 486, + "outer_sign_layers": 64, + "query_uses": 1560 + }, + "input_sha256": { + "CUT-STABILITY-RESULT.json": "7b1cf55ecd8d8aac08c24916fd477acf155a6f63fce1680f505266e8686f33f5", + "HILBERT-FIBER-REVIEW.md": "588743fb8890231da350fd86cef3fb6618769b953cdf20e2753e99d403ed54be", + "PR5551-RESULT.json": "36a5680f43c7da67e570b6c919de2934c6a5ce46db002993ff162aa36972d0ba", + "SELECTED-V16-APPLICATION-PROOF-v3.md": "cda8f596f7854f42a228f757d5f8e68f6b2256a19c5ae3771fb40753cedc5b39", + "WORD.json.gz": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446", + "caller.py": "300d40043953e4f6aecfde8f2d1004b8ad6dc5a79ec3c7666c9908c2466c91c8", + "controller.json": "a84f6bbd547379597464e56c420cc665f96bc43a9a1351eed4b7cd0fce3cc4b9", + "local.py": "878734dfd64c4b9d362d0ae476cc5c2a19fe93e48b7378763b23f3e0dd0a5a71", + "physical.json": "b257eb40480269328821e334de3fef6c64a652ff4f0628411a98be398d4cfea0" + }, + "limits": [ + "No new efficiency ratio, kappa, selected promotion, unconditional theorem or human/proof-kernel acceptance.", + "No materialized uniform word or rounded multiplier; no fresh literal tape microprogram.", + "The native/all-column, owned-erasure, finite-compiler, precision/tape and analytic-recovery premises remain.", + "Fresh constants belong in precision/storage/setup and outer domain thresholds, not absorption at the fixed carrier N." + ], + "local": { + "all_interval_denominator_exponent": 54, + "all_interval_meaning": "Upper bound, not the exact maximal interval norm", + "all_interval_scalar_power": 296, + "current_max_chart_dim": 9, + "helper_targets": { + "4": 51, + "5": 36, + "7": 24, + "8": 122, + "9": 294 + }, + "independent_product_denominator": 17032, + "independent_product_power": 27646, + "initial_dim_histogram": { + "0": 439, + "1": 240, + "4": 32, + "5": 24 + }, + "input_max_chart_dim": 5, + "instructions": 25310, + "interval_declared_N_exponent": 36, + "max_abs_scalar": "65537/2", + "max_scalar_denominator_exponent": 16, + "ops": { + "ADD": 20947, + "CLEAR": 8, + "COPY": 8, + "INIT": 8, + "MOVE": 3624, + "SCALE": 715 + }, + "paid_profile": { + "1": 2430, + "2": 554, + "3": 390, + "4": 111, + "5": 108, + "6": 17, + "7": 13, + "9": 1 + }, + "prefix_declared_N_exponent": 23, + "roles_with_owned": 743, + "scalar_allowance": 217428, + "suffix_declared_N_exponent": 27 + }, + "ordinary": { + "Graw_bits": 116, + "Graw_upper": "62050920285344500910033482228830936", + "Rraw_bits": 113, + "Rraw_upper": "7756365035668062613754185278058520", + "additional_map_ledger": { + "negative_Q_final_X": 1664, + "query_inverse_Q_X": 1560, + "query_two_sided_layout_P": 3120, + "whole_IDLE_layout_P": 6240, + "whole_helper_layout_P": 18972, + "whole_main_layout_P": 6656 + }, + "fresh_explicit_scalar_allowance": 4362776, + "historical_source_raw_upper_diagnostic_only": 184647552, + "outer_scalar_allowance": 417664, + "query_bank_initialization_allowance": 208, + "query_scalar_allowance": 31200, + "raw_265_axis_recipe_factor": 1204550144, + "raw_inventory_overestimate_I": 186042051, + "scope": "Fixed primitive-schema/descriptor majorants under the selected finite physical compiler; not literal arbitrary-f tape-step counts", + "source_map_ledger": { + "MOVE_two_sided_maps": 130464, + "controller_Q_POWER_X_maps": 3328, + "intrinsic_main_maps": 3744, + "source_helper_alias_maps": 18972, + "stage_main_contacts": 7488 + }, + "tensor_f_recipe_bound": "Rschema(f)<=Rraw*(f+1)^3; Gschema(f)<=Graw*(f+1)^3" + }, + "reservation": { + "complete_raw_positions": 13062, + "independent_helper_fields": 9486, + "main_fields": 3328, + "meaning": "Constructive reservation, not an observed simultaneous peak", + "occurrence_tagged_local_owned": 144, + "owned_positions": 248, + "paid_jobs": 69912, + "paid_rank_mass": 239108, + "productive_fields": 12814, + "reusable_query_owned_bank": 104, + "separate_query_occurrences_overreservation": 14518, + "target_rank_mass": 239868 + }, + "source": { + "COPY_contract": "ADD into an initialized owned zero; arbitrary injected owned residual retained", + "execution_order": [ + "RIGHT", + "physical_events", + "LEFT" + ], + "main_banks": 32, + "main_commit": "13be6ac685845c1ff671f5d26e7166165abd998e", + "pairs": 16, + "physical_axes": 265, + "selected_V16_proof_sections": [ + 1, + 2, + 3, + 4, + 6, + 7, + 8 + ] + }, + "status": "PASS_SOURCE_SPECIFIC_DECLARED_INTERFACE_MAJORANTS", + "whole_declared_interface": { + "Hilbert_method_credit": "Ross Richardson / Adam Gall; retained p104-retimed-internal-grid lineage", + "coefficient_denominator_exponent": { + "constant": 972, + "f_coefficient": 1295 + }, + "cut_scope": "Declared field operations and canonical native-C factors only; unmaterialized scalar/movement/recursive-child interiors require their retained primitive contracts", + "independent_product_crosscheck": { + "N_exponent": 1295, + "denominator_constant": 306576, + "power_of_two": 498144 + }, + "input_output_error_ABI": "For every declared-interface interval, ||delta_out||inf <=2^5844*N^1295*||delta_in||inf; multiple site errors sum their separately transported contributions", + "interval_prefix_suffix_row_sum_bound": { + "N_exponent": 1295, + "power_of_two": 5844 + }, + "maximum_individual_field_Hilbert_power_of_two": 5844, + "norm": "realified coordinatewise sup norm", + "raw_storage_bits": "2*13062*N^265*(b+d0+6818+2590*f), plus fixed descriptors and recursive child reservations", + "sharper_active_fiber_coordinate_bound": "2^(5844+ceil((265*f+1)/2))", + "storage_per_real_imag_component_bits": "b+d0+6818+2590*f" + }, + "word_canonical_sha256": "b27b55b57b3814fabf531d95c684c361bb26ec5448b3a86fb52d8fe8e24203ca" +} diff --git a/research/p104-cut-stability/whole-caller/SOURCES.json b/research/p104-cut-stability/whole-caller/SOURCES.json new file mode 100644 index 0000000000..448ac767ce --- /dev/null +++ b/research/p104-cut-stability/whole-caller/SOURCES.json @@ -0,0 +1,27 @@ +{ + "kind": "source-specific conditional application capsule", + "main_commit": "13be6ac685845c1ff671f5d26e7166165abd998e", + "main_url": "https://github.com/CrocSwap/integer-mult-bounds/tree/13be6ac685845c1ff671f5d26e7166165abd998e", + "repository_bytes_compared": { + "inputs/caller.py": "research/p104-productive-controller/caller.py", + "inputs/local.py": "research/p104-productive-controller/local.py", + "inputs/WORD.json.gz": "research/p104-joint-contact/WORD.json.gz", + "inputs/SELECTED-V16-APPLICATION-PROOF-v3.md": "research/coupled-helper-neutral-completion/reports/proofs/V16-APPLICATION-PROOF-v3.md" + }, + "retained_local_receipts": { + "inputs/controller.json": "/tmp/p104-alpha-candidate-20261025-root/controller.json", + "inputs/physical.json": "/tmp/p104-alpha-candidate-20261025-root/physical.json", + "inputs/PR5551-RESULT.json": "/tmp/imb-p104-joint-contact-20261025/research/p104-joint-contact/RESULT.json", + "inputs/CUT-STABILITY-RESULT.json": "/tmp/p104-cut-stability-20261025-root/RESULT.json", + "inputs/HILBERT-FIBER-REVIEW.md": "/tmp/p104-hilbert-fiber-review-20261025-new-mechanism.md" + }, + "authorship": { + "P104": ["David Arias", "Cinna Davis", "Gareth Davidson"], + "all_forward_caller": "Ali Romman with substantial OpenAI Codex assistance", + "active_fiber_Hilbert_method": ["Ross Richardson", "Adam Gall"], + "new_application": "OpenAI Codex assistance to the current contributor; retained source notices remain" + }, + "verification_scope": "Source pins, cheap exact operation census, independent linear-time scalar interval-majorant DP, symbolic majorant arithmetic. Existing native/endpoint/physical-phase receipts are retained dependencies, not re-proved here.", + "premises": ["native/all-column", "owned-erasure", "finite-compiler", "precision/tape", "analytic-recovery"], + "not_claimed": ["new kappa", "selected promotion", "formal kernel acceptance", "unconditional multiplication theorem", "materialized rounded multiplier", "literal arbitrary-f tape microprogram"] +} diff --git a/research/p104-cut-stability/whole-caller/check.py b/research/p104-cut-stability/whole-caller/check.py new file mode 100644 index 0000000000..d8bd7b17c5 --- /dev/null +++ b/research/p104-cut-stability/whole-caller/check.py @@ -0,0 +1,273 @@ +#!/usr/bin/env python3 +"""Cheap source-specific census and majorants; no native/endpoint/flow replay.""" +from collections import Counter +from fractions import Fraction as Q +from hashlib import sha256 +from pathlib import Path +import gzip +import json +import sys + +HERE = Path(__file__).resolve().parent +PINS = { + 'HILBERT-FIBER-REVIEW.md': '588743fb8890231da350fd86cef3fb6618769b953cdf20e2753e99d403ed54be', + 'CUT-STABILITY-RESULT.json': '7b1cf55ecd8d8aac08c24916fd477acf155a6f63fce1680f505266e8686f33f5', + 'PR5551-RESULT.json': '36a5680f43c7da67e570b6c919de2934c6a5ce46db002993ff162aa36972d0ba', + 'SELECTED-V16-APPLICATION-PROOF-v3.md': 'cda8f596f7854f42a228f757d5f8e68f6b2256a19c5ae3771fb40753cedc5b39', + 'WORD.json.gz': '48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446', + 'caller.py': '300d40043953e4f6aecfde8f2d1004b8ad6dc5a79ec3c7666c9908c2466c91c8', + 'controller.json': 'a84f6bbd547379597464e56c420cc665f96bc43a9a1351eed4b7cd0fce3cc4b9', + 'local.py': '878734dfd64c4b9d362d0ae476cc5c2a19fe93e48b7378763b23f3e0dd0a5a71', + 'physical.json': 'b257eb40480269328821e334de3fef6c64a652ff4f0628411a98be398d4cfea0', +} + +def need(ok, message): + if not ok: + raise ValueError(message) + +def read(name): + raw = (HERE/'inputs'/name).read_bytes() + need(sha256(raw).hexdigest() == PINS[name], 'Input pin: '+name) + if name.endswith('.gz'): + raw = gzip.decompress(raw) + return json.loads(raw) if name.endswith(('.json', '.gz')) else raw.decode() + +def ceil_log2(q): + need(q > 0, 'Positive logarithm') + a, b = q.numerator, q.denominator + e = a.bit_length()-b.bit_length() + if e >= 0: + return e + (a > b << e) + return e + ((a << -e) > b) + +def derive(): + inputs = {name:read(name) for name in PINS} + w, c, p, old, cut = (inputs[n] for n in ( + 'WORD.json.gz', 'controller.json', 'physical.json', + 'PR5551-RESULT.json', 'CUT-STABILITY-RESULT.json')) + need(w['public'] == 735 and len(w['live']) == len(w['ports']) == 104, + 'Actual public/port census') + need(len(w['initial']) == len(w['final']) == 735, 'Every public role retained') + need((c['kind'], c['pairs'], c['prefix_pairs'], c['ambient_rank']) == + ('complex',16,7,145), 'Actual controller class') + ops = Counter(e[0] for e in w['program']) + need(ops == Counter(ADD=20947,SCALE=715,MOVE=3624,INIT=8,COPY=8,CLEAR=8), + 'Actual local opcode inventory') + dims = [len(f) for f in w['frames']] + current = list(w['initial']) + [None]*8 + owned = set() + paid, scalar = Counter(), 0 + growth = [0]*743 + den = [0]*743 + power, denmax, product_power, product_den = 0, 0, 0, 0 + maxq, maxqd, peak = Q(0), 0, 0 + maxdim = max(dims[i] for i in current if i is not None) + for e in w['program']: + op, r = e[:2] + need(0 <= r < 743, 'Role range') + if op == 'MOVE': + _, r, a, b, private = e + need(current[r] == a and private == (r in owned), 'Actual MOVE contact') + paid[abs(dims[b]-dims[a])] += 1 + current[r] = b + elif op in ('INIT','CLEAR'): + if op == 'INIT': + need(r >= 735 and r not in owned, 'Owned INIT') + owned.add(r) + current[r] = e[2] + peak = max(peak,len(owned)) + else: + need(r in owned and current[r] == e[2], 'Owned CLEAR') + owned.remove(r) + current[r] = None + growth[r] = den[r] = 0 + scalar += 2 + else: + q, frame = Q(e[-2]), e[-1] + need(q and current[r] == frame, 'Scalar destination chart') + n, d = abs(q.numerator), q.denominator + need(d & (d-1) == 0 and abs(q)+1 < 2**16, 'Gaussian-dyadic scalar guard') + qden, qgrowth = d.bit_length()-1, ceil_log2(abs(q)) + maxq, maxqd = max(maxq,abs(q)), max(maxqd,qden) + product_power += ceil_log2(1+abs(q)) + product_den += qden + if op == 'SCALE': + need(n & (n-1) == 0, 'Dyadic-unit SCALE') + growth[r] = max(0,growth[r]+qgrowth) + den[r] += qden + scalar += 2*(abs(n.bit_length()-d.bit_length())+int(q<0)) + else: + s = e[2] + need(s != r and current[s] == frame, 'Common-chart source') + need(op in ('ADD','COPY'), 'Local scalar opcode') + if op == 'COPY': + need(r in owned, 'COPY owns its destination') + # Physical COPY is ADD into the initialized zero. Arbitrary + # injected owned residuals are retained by this recurrence. + growth[r] = max(growth[r],growth[s]+qgrowth)+1 + den[r] = max(den[r],den[s]+qden) + scalar += 2*(3+n.bit_length()-1+n.bit_count()+qden) + power, denmax = max(power,growth[r]), max(denmax,den[r]) + if current[r] is not None: + maxdim = max(maxdim,dims[current[r]]) + need(not owned and current[:735] == w['final'] and peak == 1, 'All exits and local ownership') + need(scalar == old['local']['real_scalar_allowance'] == 217428, 'Actual scalar tariff') + need(dict(paid) == {int(k):v for k,v in old['local']['paid'].items()}, 'Actual paid profile') + interval = cut['all_interval_majorant'] + need((power,denmax) == (interval['scalar_amplification_power_of_two'], + interval['scalar_denominator_exponent_upper']) == (296,54), + 'Independent linear-time all-interval DP') + need(cut['word_sha256'] == PINS['WORD.json.gz'], 'All-cut source binding') + need(Q(cut['prefix_max_row_l1']) == 2**17 and Q(cut['suffix_max_row_l1']) == Q(135415,4), + 'Retained exact all-cut endpoint bounds') + need((product_power,product_den,maxq,maxqd,maxdim) == (27646,17032,Q(65537,2),16,9), + 'Independent product bound and source scalar/chart guards') + event_ops = Counter(e[0] for e in c['physical_events']) + side_ops = {side:Counter(e[0] for e in c['boundaries'][side+'_program']) + for side in ('right','left')} + need(event_ops == Counter(ADD=90,SIGNED_SWAP=48,Q_POWER=32,LOCAL=18,IDLE=15,QUERY_SHEAR=15), + 'Physical event species') + for side in ('right','left'): + for e in c['boundaries'][side+'_program']: + need(e[0] in ('ADD','SWAP','SCALE'), 'Boundary species') + if e[0] == 'ADD': need(abs(Q(e[3])) == 1,'Unit boundary ADD') + if e[0] == 'SCALE': need(Q(e[2]) == -1,'Boundary sign') + need(all(abs(Q(e[3])) == 1 for e in c['physical_events'] if e[0]=='ADD'), 'Unit physical ADD') + locals_ = [e for e in c['physical_events'] if e[0]=='LOCAL'] + need(all(not e[3] for e in locals_), 'All-forward implementation') + need(c['wrapper_sites'] == list(range(1,32,2)), 'Sixteen inverse wrappers') + idle_lengths = [len(e[2]) for e in c['physical_events'] if e[0]=='IDLE'] + need(idle_lengths == list(range(2,10))+list(range(8,1,-1)), 'Actual idle sequence') + idle_ranks = [8*n for n in idle_lengths] + main_profile = Counter() + for t in c['diagonal']: + need(t[0] in (-1,1), 'Q exponent, not scalar sign') + main_profile[1+8*sum(t[1:])] += 104 + need(dict(main_profile) == {int(k):v for k,v in p['main_targets'].items()}, '32-bank main targets') + idle_profile = Counter() + for r in idle_ranks: idle_profile[r] += 208 + need(dict(idle_profile) == {int(k):v for k,v in p['whole_idle_jobs'].items()}, 'Idle targets') + boundary_adds = sum(x['ADD'] for x in side_ops.values()) + boundary_swaps = sum(x['SWAP'] for x in side_ops.values()) + boundary_signs = sum(x['SCALE'] for x in side_ops.values()) + outer_layers = boundary_adds + event_ops['ADD'] + 3*(boundary_swaps+event_ops['SIGNED_SWAP']) + outer_signs = boundary_signs + boundary_swaps + norm_const = outer_layers + 2*event_ops['QUERY_SHEAR'] + norm_N = 36*len(locals_) + event_ops['QUERY_SHEAR'] + sum(idle_ranks) + whole_power, whole_den = norm_const+len(locals_)*power, len(locals_)*denmax + need((outer_layers,outer_signs,norm_const,norm_N,whole_power,whole_den) == (486,64,516,1295,5844,972), + 'Whole declared-interface composition') + main = set(w['live']) | {r+112 for r in w['live']} + helpers = 735-len(main) + helper_profile = Counter(dims[w['final'][r]]-dims[w['initial'][r]] for r in range(735) if r not in main) + need(dict(helper_profile) == {int(k):v for k,v in old['local']['helpers'].items()}, 'All dirty helpers retained') + owned_positions = 18*8+104 + productive = 32*104+18*helpers + paid_count = 18*sum(paid.values()) + 15*104 + sum(idle_profile.values()) + paid_mass = 18*sum(r*n for r,n in paid.items()) + 15*104 + sum(r*n for r,n in idle_profile.items()) + target_mass = sum(r*n for r,n in main_profile.items()) + 18*sum(r*n for r,n in helper_profile.items()) + need((productive,owned_positions,paid_count,paid_mass,target_mass) == (12814,248,69912,239108,239868), + 'Whole productive/owned/paid inventory') + local_maps = { + 'MOVE_two_sided_maps':2*ops['MOVE']*18, + 'source_helper_alias_maps':2*helpers*18, + 'intrinsic_main_maps':208*18, + 'stage_main_contacts':p['physical_contacts'], + 'controller_Q_POWER_X_maps':32*104, + } + added_maps = { + 'whole_main_layout_P':2*32*104, + 'whole_helper_layout_P':2*18*helpers, + 'whole_IDLE_layout_P':2*sum(idle_profile.values()), + 'negative_Q_final_X':16*104, + 'query_two_sided_layout_P':2*15*104, + 'query_inverse_Q_X':15*104, + } + need(sum(local_maps.values()) == 163996 and sum(added_maps.values()) == 38212, 'Charged monomial ledger') + outer_scalar = 104*(8*outer_layers+2*outer_signs) + query_scalar = 20*15*104 # COPY ADD8 + scatter ADD8 + two owned clears4 + initial_query_scalar = 2*104 + explicit_scalar = 18*scalar+outer_scalar+query_scalar+initial_query_scalar + historical_raw = old['complete_cost']['nonrecursive']['raw_scalar_upper'] + need(historical_raw == 184647552 and explicit_scalar == 4362776, 'Fresh scalar bill') + # Deliberately count the historical bound again as records; it cannot + # supply missing normalization/query tariffs in this fresh inventory. + I = (1+historical_raw+18*len(w['program'])+104*(len(c['physical_events'])+ + sum(sum(v.values()) for v in side_ops.values()))+ + 4*(sum(local_maps.values())+sum(added_maps.values()))+ + owned_positions+paid_count+productive+6*15*104) + axis_recipe = 64*(265+1)**3 + R = axis_recipe*I**3+explicit_scalar + G = explicit_scalar+8*R + need(max(I,R,G).bit_length() <= 128, 'Fresh raw fixed-recipe majorants') + return { + 'status':'PASS_SOURCE_SPECIFIC_DECLARED_INTERFACE_MAJORANTS', + 'input_sha256':PINS, + 'word_canonical_sha256':sha256(json.dumps(w,sort_keys=True,separators=(',',':')).encode()).hexdigest(), + 'source':{'main_commit':'13be6ac685845c1ff671f5d26e7166165abd998e', + 'execution_order':['RIGHT','physical_events','LEFT'], + 'physical_axes':265,'pairs':16,'main_banks':32, + 'selected_V16_proof_sections':[1,2,3,4,6,7,8], + 'COPY_contract':'ADD into an initialized owned zero; arbitrary injected owned residual retained'}, + 'local':{'ops':dict(ops),'instructions':len(w['program']),'roles_with_owned':743, + 'initial_dim_histogram':dict(Counter(dims[i] for i in w['initial'])), + 'input_max_chart_dim':5,'current_max_chart_dim':maxdim, + 'max_abs_scalar':str(maxq),'max_scalar_denominator_exponent':maxqd, + 'scalar_allowance':scalar,'paid_profile':dict(paid),'helper_targets':dict(helper_profile), + 'all_interval_scalar_power':power,'all_interval_denominator_exponent':denmax, + 'all_interval_meaning':'Upper bound, not the exact maximal interval norm', + 'independent_product_power':product_power,'independent_product_denominator':product_den, + 'prefix_declared_N_exponent':23,'suffix_declared_N_exponent':27, + 'interval_declared_N_exponent':36}, + 'caller':{'event_ops':dict(event_ops),'boundary_ops':{k:dict(v) for k,v in side_ops.items()}, + 'local_stages':[e[1] for e in locals_],'idle_lengths':idle_lengths, + 'idle_sum_rank':sum(idle_ranks),'outer_lowered_ADD_layers':outer_layers, + 'outer_sign_layers':outer_signs,'main_targets':dict(main_profile), + 'idle_paid':dict(idle_profile),'query_uses':15*104}, + 'reservation':{'main_fields':3328,'independent_helper_fields':18*helpers, + 'productive_fields':productive,'occurrence_tagged_local_owned':144, + 'reusable_query_owned_bank':104,'owned_positions':owned_positions, + 'complete_raw_positions':productive+owned_positions, + 'meaning':'Constructive reservation, not an observed simultaneous peak', + 'separate_query_occurrences_overreservation':productive+144+1560, + 'paid_jobs':paid_count,'paid_rank_mass':paid_mass,'target_rank_mass':target_mass}, + 'ordinary':{'historical_source_raw_upper_diagnostic_only':historical_raw, + 'source_map_ledger':local_maps,'additional_map_ledger':added_maps, + 'outer_scalar_allowance':outer_scalar,'query_scalar_allowance':query_scalar, + 'query_bank_initialization_allowance':initial_query_scalar, + 'fresh_explicit_scalar_allowance':explicit_scalar,'raw_inventory_overestimate_I':I, + 'raw_265_axis_recipe_factor':axis_recipe,'Rraw_upper':str(R),'Graw_upper':str(G), + 'Rraw_bits':R.bit_length(),'Graw_bits':G.bit_length(), + 'tensor_f_recipe_bound':'Rschema(f)<=Rraw*(f+1)^3; Gschema(f)<=Graw*(f+1)^3', + 'scope':'Fixed primitive-schema/descriptor majorants under the selected finite physical compiler; not literal arbitrary-f tape-step counts'}, + 'whole_declared_interface':{'norm':'realified coordinatewise sup norm', + 'maximum_individual_field_Hilbert_power_of_two':whole_power, + 'sharper_active_fiber_coordinate_bound':'2^(5844+ceil((265*f+1)/2))', + 'Hilbert_method_credit':'Ross Richardson / Adam Gall; retained p104-retimed-internal-grid lineage', + 'interval_prefix_suffix_row_sum_bound':{'power_of_two':whole_power,'N_exponent':norm_N}, + 'coefficient_denominator_exponent':{'constant':whole_den,'f_coefficient':norm_N}, + 'independent_product_crosscheck':{'power_of_two':norm_const+18*product_power, + 'N_exponent':norm_N,'denominator_constant':18*product_den}, + 'storage_per_real_imag_component_bits':'b+d0+6818+2590*f', + 'raw_storage_bits':'2*13062*N^265*(b+d0+6818+2590*f), plus fixed descriptors and recursive child reservations', + 'input_output_error_ABI':'For every declared-interface interval, ||delta_out||inf <=2^5844*N^1295*||delta_in||inf; multiple site errors sum their separately transported contributions', + 'cut_scope':'Declared field operations and canonical native-C factors only; unmaterialized scalar/movement/recursive-child interiors require their retained primitive contracts'}, + 'limits':['No new efficiency ratio, kappa, selected promotion, unconditional theorem or human/proof-kernel acceptance.', + 'No materialized uniform word or rounded multiplier; no fresh literal tape microprogram.', + 'The native/all-column, owned-erasure, finite-compiler, precision/tape and analytic-recovery premises remain.', + 'Fresh constants belong in precision/storage/setup and outer domain thresholds, not absorption at the fixed carrier N.'], + } + +def main(): + result = json.loads(json.dumps(derive())) + path = HERE/'RESULT.json' + if '--write' in sys.argv: + path.write_text(json.dumps(result,indent=2,sort_keys=True)+'\n') + else: + need(json.loads(path.read_text()) == result, 'Exact saved receipt') + print(result['status']) + print('whole:2^5844*N^1295; denom:972+1295*f; raw slots:13062') + print('fresh raw R/G bits:',result['ordinary']['Rraw_bits'],result['ordinary']['Graw_bits']) + +if __name__ == '__main__': + main() diff --git a/research/p104-cut-stability/whole-caller/inputs/CUT-STABILITY-RESULT.json b/research/p104-cut-stability/whole-caller/inputs/CUT-STABILITY-RESULT.json new file mode 100644 index 0000000000..0be2c53162 --- /dev/null +++ b/research/p104-cut-stability/whole-caller/inputs/CUT-STABILITY-RESULT.json @@ -0,0 +1,259 @@ +{ + "COPY_implementation": "ADD into an exactly initialized owned zero; injected residual is retained", + "all_interval_majorant": { + "meaning": "Upper bound for every scalar interval, not an exact maximum; each row recurrence restarts at identity at every cut.", + "native_factor_interior_N_exponent": 36, + "power_witness": [ + 24859, + 146, + 296 + ], + "scalar_amplification_power_of_two": 296, + "scalar_denominator_exponent_upper": 54, + "semantic_chart_N_exponent": 18 + }, + "cuts": 25311, + "error_interfaces": { + "completed_service_layers_including_input_output": 25312, + "completed_service_suffix_guard_bits": 30, + "literal_butterfly_layers_base_including_input_output": 21688, + "literal_butterfly_layers_slope_in_f": 5894, + "literal_butterfly_runtime_in_recursive_invoice": false + }, + "geometry": { + "current_max_chart_dimension": 9, + "endpoint_prefix_N_exponent": 14, + "endpoint_suffix_N_exponent": 18, + "input_max_chart_dimension": 5, + "native_recipe_prefix_N_exponent": 20, + "native_recipe_suffix_N_exponent": 27, + "output_max_chart_dimension": 9 + }, + "op_counts": { + "ADD": 20947, + "CLEAR": 8, + "COPY": 8, + "INIT": 8, + "MOVE": 3624, + "SCALE": 715 + }, + "owned_residual_controls": [ + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13491, + "output": 112, + "owned": 735, + "residual_response": "1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13502, + "output": 112, + "owned": 736, + "residual_response": "1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13513, + "output": 112, + "owned": 737, + "residual_response": "-1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13522, + "output": 113, + "owned": 738, + "residual_response": "1" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13538, + "output": 113, + "owned": 739, + "residual_response": "-1/2" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13553, + "output": 112, + "owned": 740, + "residual_response": "1/2" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13568, + "output": 112, + "owned": 741, + "residual_response": "1/2" + }, + { + "ADD_COPY_retains_residual": true, + "assignment_COPY_response": "0", + "event": 13583, + "output": 112, + "owned": 742, + "residual_response": "-1/2" + } + ], + "prefix_denominator_witness": [ + 21436, + 431, + 4 + ], + "prefix_max_entry_denominator_exponent": 4, + "prefix_max_row_l1": "131072", + "prefix_max_witness": { + "cut": 24096, + "l1": "131072", + "role": 93, + "row": { + "86": "-65536", + "93": "-65536" + } + }, + "public_inputs": 735, + "scalar_guard": { + "accumulator_magnitude_factor_upper": 65536, + "extra_accumulator_bits_upper": 35, + "max_abs_coefficient": "65537/2", + "max_denominator_exponent": 16 + }, + "scope": "Exact all-cut scalar matrices and elementary diagram norm bounds for this finite word. No uniform recursive-child internal implementation, full 265-axis caller precision/tape closure, new kappa, scientific admission or selected promotion is claimed.", + "source_head": "1123635a6f63f23638df9459c994160e5e649d30", + "state_roles": 743, + "status": "PASS_EXACT_P104_ALL_CUT_SCALAR_STABILITY", + "suffix_denominator_witness": [ + 24214, + 93, + 17 + ], + "suffix_max_entry_denominator_exponent": 17, + "suffix_max_row_l1": "135415/4", + "suffix_max_witness": { + "cut": 24297, + "l1": "135415/4", + "output": 205, + "row": { + "1": "-1/2", + "10": "-1/2", + "103": "1/2", + "104": "-1/2", + "105": "-1/2", + "106": "-1/2", + "11": "-1/2", + "16": "-1/2", + "17": "1/2", + "18": "1/2", + "19": "1/2", + "205": "1", + "226": "1/2", + "227": "-1/2", + "229": "1/2", + "230": "1/2", + "233": "-1/2", + "234": "-1/2", + "238": "1/2", + "239": "-1/2", + "240": "1/2", + "241": "-1/2", + "242": "1/2", + "243": "1/2", + "25": "1/2", + "253": "-1/2", + "255": "-1/2", + "256": "1/2", + "261": "1/2", + "267": "-1/2", + "27": "1/2", + "270": "1/2", + "271": "-1", + "276": "-1/2", + "28": "1/2", + "283": "1/2", + "286": "-1/2", + "288": "-1/2", + "29": "1/2", + "296": "1/2", + "299": "1/2", + "30": "1/2", + "31": "-1/2", + "319": "-1", + "347": "1", + "35": "-1/2", + "351": "-1", + "36": "1/2", + "363": "1", + "368": "1/2", + "37": "1/2", + "379": "1/2", + "383": "-1/2", + "388": "1/2", + "395": "1/2", + "398": "1/2", + "399": "-1", + "401": "-1/2", + "405": "-1/2", + "406": "-1/2", + "410": "1/2", + "411": "-1/2", + "413": "-1/2", + "414": "-1/2", + "419": "-1/2", + "422": "-1/2", + "426": "1/2", + "427": "-1", + "431": "-1/2", + "433": "1/2", + "434": "-1/2", + "435": "1/2", + "437": "1/2", + "441": "1/2", + "445": "1/2", + "446": "1/2", + "447": "-1/2", + "45": "1/2", + "46": "1/2", + "47": "1/2", + "51": "-1/2", + "52": "-1/2", + "53": "-1/2", + "54": "-1/2", + "55": "-1/2", + "56": "-1/2", + "57": "-1/2", + "58": "1/2", + "59": "1/2", + "6": "1/2", + "60": "1/2", + "67": "1/2", + "68": "1/2", + "69": "1/2", + "70": "1/2", + "71": "1/2", + "72": "1/2", + "78": "-1/2", + "8": "1/2", + "80": "1/2", + "85": "-1/2", + "86": "1/4", + "87": "1/2", + "9": "-1/2", + "92": "-1/2", + "93": "-33795", + "94": "-1/2", + "95": "1/2", + "96": "1/2", + "97": "1/2", + "98": "1/2" + } + }, + "word_sha256": "48f8734ca9c5adf5d60ded3a5fefbc24894d2c358ed7cb30fcc0d71718599446" +} diff --git a/research/p104-cut-stability/whole-caller/inputs/HILBERT-FIBER-REVIEW.md b/research/p104-cut-stability/whole-caller/inputs/HILBERT-FIBER-REVIEW.md new file mode 100644 index 0000000000..cf7dfe0ac8 --- /dev/null +++ b/research/p104-cut-stability/whole-caller/inputs/HILBERT-FIBER-REVIEW.md @@ -0,0 +1,64 @@ +# Bounded proof review: active-fiber Hilbert sharpening + +This reviews the proposed corollary only. The active-fiber unitary method is +credited to Ross Richardson / Adam Gall and the retained +`research/p104-retimed-internal-grid` lineage. It is not a new method or a +proof of the five framework premises. The new binding concerns the actual +735-input complete P104 word, COPY residuals, all intervals and whole caller. + +Fix a spectator address and let each active fiber have complex dimension +`D=2^(d f)`. For the state use **maximum individual-field Hilbert norm**, +`H(z)=max_r ||z_r||_2`. Do not use joint l2 over all fields. For coordinate +norm `C(z)=max_{r,a} max(|Re z_r(a)|,|Im z_r(a)|)`, + +`H(z) <= sqrt(2D) C(z)`, and `C(z) <= H(z)`. + +If a complete interval has maximum-individual-field Hilbert norm at most L, +its coordinate norm is therefore at most `L sqrt(2D)`. This uses only one +fiber conversion, on the input. There is no factor from the number of +fields, helpers, or spectator addresses. An integer power-of-two upper bound +is `L 2^ceil((d f+1)/2)`. + +For a local scalar/gauge interval, each field block has the form +`A_rs Psi_out,r Psi_in,s^-1`. The normalized native C factors and their +canonical P/D/X/phase factors are unitary. At an interior native cut the +current Psi is a partial native recipe times the previous canonical frame, +also unitary. Thus the block has Hilbert norm `|A_rs|`; the maximum absolute +scalar row sum bounds H on the whole interval. The previously proved +LambdaP / LambdaS / Gamma estimates consequently acquire no native N-power +in H. For local component estimates apply one conversion with d=9. + +For the whole caller, a complete or partial local module costs at most +Gamma=2^296 in H. An ADD costs at most 2 in H, even for different field +gauges. All native factors, routes, signs and whole IDLEs are isometries. +An owned copied-query schema costs at most 4 from its COPY-ADD and target +ADD, including arbitrary injected owned residual; its Q_f and partial +native factors are isometries. INIT/CLEAR are contractions on owned state. +The owned query stream must be cleared between ports, retaining the +declared block/ownership separation. No joint-l2 copy-isometry is asserted. + +The checked counts therefore give the whole-caller interval H bound +`2^(486+2*15) Gamma^18 = 2^5844`. Every truncated module has the same upper +bound as its full module, and all such majorants are at least one, so their +full product bounds intervals beginning or ending inside modules. The +explicit 265-axis chart/route support gives, conditionally on that declared +support, the coordinate interval corollary + +`2^(5844 + ceil((265 f+1)/2))`. + +Axes outside those 265 f coordinates must truly be fixed spectators; no +claim that arbitrary additional active axes are free is made. Different +modules may use different active subspaces inside the same 265-axis fiber. +The argument does not require a common smaller fiber across modules. + +The unitary cut statement applies after a complete C factor or complete +butterfly pair. Updating only some disjoint pairs is also a direct-sum +unitary. An accumulator halfway through computing a real output component +is not itself one of these field cuts and retains its separate fixed local +arithmetic guard. The earlier coarse component bounds remain valid. + +Conclusion: the proposed sharpening is mathematically sound at the declared +field/native-C-factor cuts, with the stated inherited native and ownership +contracts. It does not establish recursive internal precision or runtime, +uniform physical stock/tape bounds, scientific acceptance or a new κ. +Prepared for thu-nmrc with OpenAI Codex assistance, Apache-2.0. diff --git a/research/p104-cut-stability/whole-caller/inputs/PR5551-RESULT.json b/research/p104-cut-stability/whole-caller/inputs/PR5551-RESULT.json new file mode 100644 index 0000000000..a83db6d025 --- /dev/null +++ b/research/p104-cut-stability/whole-caller/inputs/PR5551-RESULT.json @@ -0,0 +1,332 @@ +{ + "complete_cost": { + "compiler": { + "H": 690116000000000, + "N": "2^690116000000000", + "eta": { + "lower": "0.000000184942858502899385581767", + "upper": "0.000000184942858502899385581768" + }, + "gap": "1/14000000000", + "integer_test_exponent": 49294, + "logarithm_power": 1000, + "theta": "63/64", + "uniform_saving": "21290713/7000000000", + "word_materialized": false + }, + "full_forward_calls": 18, + "gain": "9/25000000", + "kappa": "304153/100000000", + "kappa_decimal": ".00304153", + "margin_at_previous": { + "lower": "0.089671185966380263298820901941", + "upper": "0.089671185966380263298820901942" + }, + "negative_controls": { + "old_BIT": "Rejected by outer inequalities", + "old_cutoff": "Rejected by completion-tail ratio greater than one" + }, + "nonrecursive": { + "fixed_scalar_growth_bound": "At most 2^(16*26000) before native factors; a declared constant, not an attained norm.", + "local_routes": 5334000, + "local_scalar": 217428, + "peak_owned_fields": 1, + "raw_budget": 1000000000, + "raw_scalar_upper": 184647552, + "tensor_native_growth_bound": "Each rank-r Gaussian has row l1 norm at most 2^(rf); sum of local ranks is 5894." + }, + "ordinary_BIT": { + "admitted": "17/5000", + "after_cover": "69/20000", + "atom": "1/250", + "before_cover": "3459/1000000", + "ordinary_saving": "8590884599/2500000000000", + "prime_rule": "odd q > 2^26*N^5 avoiding all fixed denominators and rank witnesses" + }, + "outer": { + "functional_checks": { + "actual_new_BIT_stock_sublinear": "3485999999253/3500000000000", + "fixed_halo_explicit_metadata_branch": "269500000001/3500000000", + "new_BIT_row_stock_sublinear_in_active_group": "13957999997009/14000000000000", + "new_semantic_group_guard": "3/14000000000" + }, + "margins": { + "boundary_algebraic_matrix": "596139935957418577/196000000000000000000", + "fused_gaussian": "596139935872255731/196000000000000000000", + "global_coordinate_router": "2661339/875000000", + "group_bit_router": "37258746867015983/12250000000000000000", + "group_scans": "6999999999/7000000000", + "main_transform": "596139921957418577/196000000000000000000", + "microbox_face_corrections": "269500000001/3500000000", + "polynomial_products": "13999999999/14000000000", + "sparse_union_movement": "80221139935957418577/196000000000000000000" + }, + "parameters": { + "a": "2661339/875000000", + "b": "1703257/560000000", + "beta": "13999999997/14000000000", + "bit_saving": "17/5000", + "cap_xi": "178221139921957418577/196000000000000000000", + "complex_uniform_saving": "21290713/7000000000", + "d": "1/14000000000", + "epsilon": "13999999999/14000000000", + "kappa": "304153/100000000", + "lambda_": "3987833879/4000000000", + "lambda_prime": "13957418577/14000000000", + "layout": "1/14000000000", + "q": "42581423/14000000000", + "r0": "1/140000000000", + "stop": "1/14000000000", + "tested_saving": "6083061/2000000000" + }, + "strict_checks": { + "actual_bit_above_effective": "313661/875000000", + "actual_logarithmic_gamma_guard": "1/14000000000", + "actual_logarithmic_group_guard": "17778860099042581423/98000000000000000000", + "alpha_logarithm_absorption": "1/140000000000", + "boundary_algebraic_matrix_above_kappa": "55957418577/196000000000000000000", + "cap_above_band": "80221139921957418577/196000000000000000000", + "cap_below_cell": "17778860064042581423/196000000000000000000", + "cap_below_phase_cell_power": "213778860078042581423/196000000000000000000", + "complex_above_effective": "1/14000000000", + "complex_below_one_over_32": "15796743/560000000", + "complex_endpoint": "1/7000000000", + "epsilon_below_one": "1/14000000000", + "epsilon_positive": "13999999999/14000000000", + "fine_prime_halo_umbrella": "7/2", + "fused_gaussian_above_kappa": "55872255731/196000000000000000000", + "gaussian_above_main": "6957418577/98000000000000000000", + "global_coordinate_router_above_kappa": "1/3500000000", + "global_gamma_power_slack": "9/140000000000", + "group_below_dimension": "1/7000000000", + "group_bit_router_above_kappa": "4367015983/12250000000000000000", + "group_gauge_power_slack": "17778860098342581423/98000000000000000000", + "group_key_fits_record": "1/7000000000", + "group_positive": "13999999997/14000000000", + "group_scans_above_kappa": "6978709289/7000000000", + "halo_covers_generic_inverse_radius": "5", + "improvement_over_user_baseline": "655279790400418148631/500000000000000000000000", + "lambda_above_internal": "1/28000000000", + "lambda_above_sigma": "3/28000000000", + "lambda_above_tau": "1/28000000000", + "lambda_prime_above_lambda": "1/28000000000", + "lambda_prime_above_leaf": "1118296743/7840000000000000000", + "leaf_saving_above_effective": "558296743/7840000000000000000", + "main_transform_above_kappa": "41957418577/196000000000000000000", + "membership_arithmetic_fits_record": "1/14000000000", + "microbox_face_corrections_above_kappa": "134744677323/1750000000", + "microbox_halo_volume": "1106000000003/14000000000", + "new_complex_uniform_saving_above_b": "1/14000000000", + "new_semantic_guard_with_C1_one": "1/14000000000", + "polynomial_products_above_kappa": "13957418579/14000000000", + "positive_layout_slack": "1/14000000000", + "q_below_effective": "1/14000000000", + "q_below_internal": "1/14000000000", + "q_below_leaf": "1118296743/7840000000000000000", + "q_positive": "42581423/14000000000", + "short_record_fallback": "558296743/560000000", + "source_axis_superpolynomial": "1/14000000000", + "sparse_union_movement_above_kappa": "79625000055957418577/196000000000000000000", + "stop_below_one": "13999999999/14000000000", + "stop_positive": "1/14000000000", + "strassen_integer_power_gap": "1951441519231", + "support_router_span": "3/14000000000", + "theta_positive_polynomial_power": "2", + "union_header_fits_record": "3/14000000000", + "union_tag_work_per_visit_fits_record": "3/14000000000" + } + }, + "paid": { + "1": 45300, + "16": 416, + "2": 9972, + "24": 416, + "3": 7020, + "32": 416, + "4": 1998, + "40": 416, + "48": 416, + "5": 1944, + "56": 416, + "6": 306, + "64": 416, + "7": 234, + "72": 208, + "9": 18 + }, + "paid_calls": 69912, + "previous_open_pr5545": "304117/100000000", + "productive_fields": 12814, + "query_shears": 15, + "rank_mass_surplus": 760, + "raw_headroom": [ + "58357/50000000000000", + "23343/20000000000000" + ], + "raw_root_interval": [ + "152076558357/50000000000000", + "60830623343/20000000000000" + ], + "relative_gain_percent": "3600/304117", + "strictification": { + "alpha": { + "lower": "0.999999999302190665441264809032", + "upper": "0.999999999302190665441264809033" + }, + "cutoff": 17, + "delta": { + "lower": "0.963355290100190429734309350200", + "upper": "0.963355290100190429734309350201" + }, + "floor": 18, + "gamma": { + "lower": "0.965231303139134897171411452319", + "upper": "0.965231303139134897171411452320" + }, + "normalized_paid_upper": "5242880004882813/5242880536870912", + "power": 1024, + "reserve": "1/10000000000", + "tail_offset": "1/5", + "tested": "6083061/2000000000" + }, + "targets": { + "145": 208, + "17": 416, + "25": 416, + "33": 416, + "4": 918, + "41": 416, + "49": 416, + "5": 648, + "57": 416, + "65": 416, + "7": 432, + "73": 208, + "8": 2196, + "9": 5292 + }, + "whole_idle_jobs": 3120 + }, + "complete_paid_delta": { + "1": 36, + "2": -54, + "3": 18, + "4": -18, + "5": 18 + }, + "independent_peer_science_sha256": "357bf2617d364fb951c704b0bba7bb920629494686ab3866fed910fb0f2f57fc", + "limits": [ + "The five framework assumptions retained by PR5544/5545 remain.", + "The uniform compiler word and complete rounded multiplier are not materialized.", + "No independent human or proof-kernel acceptance, selected promotion, or core-contributor status is claimed." + ], + "local": { + "endpoint_coefficients": 552049, + "helpers": { + "4": 51, + "5": 36, + "7": 24, + "8": 122, + "9": 294 + }, + "owned_lifetimes": 8, + "paid": { + "1": 2430, + "2": 554, + "3": 390, + "4": 111, + "5": 108, + "6": 17, + "7": 13, + "9": 1 + }, + "peak_owned_fields": 1, + "public_inputs": 735, + "real_scalar_allowance": 217428 + }, + "local_paid_delta": { + "1": 2, + "2": -3, + "3": 1, + "4": -1, + "5": 1 + }, + "native": { + "distinct_maps": 2979, + "helper_normalizers": 1054, + "helpers": { + "4": 51, + "5": 36, + "7": 24, + "8": 122, + "9": 294 + }, + "main_adapters": 208, + "proof": "Every signed Pauli image and exact global phase; frame induction at every positive tensor width", + "recipe_payload_sha256": "f7dac0d38942f0b02ad21c166281aeed704bc133421843f2b0ededaaf654e4a9", + "wrong_phase_rejected": true + }, + "negative_controls": { + "missing_central_translation": "Rejected by the complete Laurent endpoint", + "one_operand_or_contact_left_at_old_chart": "Scalar destination and coefficient", + "stale_source_or_changed_read": "Exact source ADD at 10461", + "uncharged_recursive_call": "Complete field and call counts", + "wrong_butterfly_coefficient": "All 743 public and owned rows" + }, + "physical_caller": { + "central_square_columns": 53248, + "full_calls": 18, + "main_targets": { + "145": 208, + "17": 416, + "25": 416, + "33": 416, + "41": 416, + "49": 416, + "57": 416, + "65": 416, + "73": 208 + }, + "new_paid_jobs": 0, + "physical_contacts": 7488, + "ports": 104, + "route_payload_sha256": "7f4f0ca768ffbc4f93dcff575592c4c67411f46b4289e45b73f715a2ad47b142", + "tensor_rule": "Factorwise native maps; scalar signs stay outside the tensor power.", + "whole_idle_jobs": { + "16": 416, + "24": 416, + "32": 416, + "40": 416, + "48": 416, + "56": 416, + "64": 416, + "72": 208 + }, + "wrapper_sites": [ + 1, + 3, + 5, + 7, + 9, + 11, + 13, + 15, + 17, + 19, + 21, + 23, + 25, + 27, + 29, + 31 + ] + }, + "retained_source_files": 33, + "separate_columns": { + "arithmetic": "Dense integer rows with binary denominators; reverse chronology", + "coefficients": 552049, + "columns": 743 + }, + "source_commit": "18968423711fd902aaee1099979497d55603e1dc", + "status": "PASS_P104_JOINT_CONTACT_COMPLETE_KAPPA_00304153" +} diff --git a/research/p104-cut-stability/whole-caller/inputs/SELECTED-V16-APPLICATION-PROOF-v3.md b/research/p104-cut-stability/whole-caller/inputs/SELECTED-V16-APPLICATION-PROOF-v3.md new file mode 100644 index 0000000000..574c1d0bd7 --- /dev/null +++ b/research/p104-cut-stability/whole-caller/inputs/SELECTED-V16-APPLICATION-PROOF-v3.md @@ -0,0 +1,457 @@ +# Fresh physical/precision/stock application for the frozen neutral v16c caller + +This is a **conditional source-specialization proof**, under exactly the +selected native/all-column, owned-erasure, finite-compiler, precision/tape and +analytic-recovery premises. It supplies no new physical oracle and makes no +unconditional multiplication or formal-kernel claim. It must be read jointly +with the frozen649-column local proof, the corrected145-axis global normalizer +packet, the fresh v3 ordinary/norm census and the independent numerical funding +certificate. The original component receipts retain their narrower scopes and +false overall-admission flags. + +## Fixed objects and two preserved diagnostics + +The actual local words are `caller/NEUTRAL-BACKWARD-v16c.json`, SHA256 +`cc297ee54c2743615dfe857838d5f40424ccd33fdb08ecfafbc41b1710416d91`, and the +review-only forward word, SHA256 +`dfa125a8c26b86cfa2024edab9f8ed3c95ebe23bffc1bedfd3c90aa471e80ae0`. +The complete raw caller is `caller/NEUTRAL-CALLER-v16c.json`. It uses all18 +backward words in the exact #5398 direct controller, not16B+2standaloneF. +This avoids double counting the direct wrappers already in its20SIGNED_SWAP +and4Q_POWER records. + +Source execution is **right boundary, physical events, left boundary**: the +matrix convention is L*W*R with the rightmost factor first. V1's execution +description reversed those boundaries. V2 corrected the order but still +misread the first diagonal integer as a scalar sign. It is a **Q exponent**. +A negative Q exponent requires the native central translation Q²=X after +the left boundary, not a scalar−1. Both earlier artifacts and run receipts +remain diagnostic; their count-only passes do not certify those descriptions. +The final v3 result must bind the corrected normalizers and actual order. + +The v16c local words themselves did not change. Their signs in standalone +SIGNED_SWAP wrappers really are exterior scalar signs and remain applied once +per whole field; they are unrelated to the global diagonal Q exponent. + +## 1. Source physical class: every new instruction has a realization + +Use canonical main `1ec1119972c9aefe42525172d07b332fcff81cb4` and its selected +`final4610-independent-admission/SPECIALIZATION.md` sections1–3,6, +`FINITE-PRECOMPILATION.md` sections1,3–6 and +`FINITE-TEMPLATE-CLOSURE.md` sections3–6. The higher-moment and logarithmic +compiler theorems are those pinned in this lane's `PINNED-HIGHER-MOMENT.md`. +The generic class permits fixed finite Gaussian-dyadic scalar words, complete +positive Gaussian jobs with two-sided signed monomial adapters, arbitrary +complete spectators, fixed binary coordinate permutations/quadratic unit +phases and owned storage with restoration. The instance must be established +to belong to that class; no premise “the new program works cheaply” is added. + +The new local ADD coefficients are halves and units. CLEAR targets only +the eight new owned T fields. The original nine owned fields belong to the +unchanged audited provider. T is cleared and retagged zero before its first +SWAP; the original arbitrary h data is moved into T rather than erased. +The later ADD restores the complete original h direction before T is erased. +The root's649-column replay proves all632 original directions and all17 +arbitrary owned entries, including exact zero returns. No promised blank +productive input or borrowed erasure is involved. + +All800 helper normalizers are actual signed phase-bearing maps installed on +all400 named complete source helper jobs. Their independently checked +17-class phase identities are byte-bound; no normalization is moved inside a +partial job. Their P matrices are invertible and D/X/phase factors have unit +modulus. The240 Z-basis maps are the source Kp/Km words and their explicit +inverses. The16 paid C8/D8 axis routes and16 productive h/C8 routes are literal +axis0/8 permutations. Their full phase-bearing C8/D8 identities were checked +separately. Thus all1072 outer B maps are counted **once**, including these +800+240+16+16 maps. The source's own464 boundary maps are additional. + +For f columns, every fixed P acts on each complete f-axis slot, and every +quadratic phase is `a*f+sum_j q(x_j)` modulo4. Exterior ADD/SCALE coefficients +are left unchanged. The source free-operator substitution, rather than tensor +distributivity across a scalar sum, gives all-column logical correctness. +All extra T, query and suspended-parent fields remain full spectators during +the appropriate child. This introduces no new field extension or scalar1/12; +that metric belonged to a historical proposed120-port route and is absent here. + +The global145-axis normalizers are fixed permutations of complete f-axis +slots, together with native X on the shared central slot for negative Q +exponents. They are source-permitted monomials. Actual main input/output +permutations surround the **whole** source caller, not individual coupled +instructions. Each helper's input/output145-axis permutations surround its +entire LOCAL occurrence, and convert its known stage-local positive job to +the common global first-rank layout. These are14688 additional helper field +maps, separate from the800 source phase aliases per LOCAL. Main normalization +has7168 permutation field maps and1792 native central X maps. Whole-IDLE +positive jobs additionally have6720 input/output permutation field maps. +The7168+14688+6720 layouts are28576 field maps; including1792 native central X +maps gives30368 additional normalization field maps. None is declared free or +fused away. The corrected +normalizer packet is an acceptance +dependency of v3, rather than inferred from a Laurent histogram alone. + +## 2. Same-chart whole-field SWAP lowering, including zeros and errors + +The declared whole-field/chart SWAP can use the retained scalar realization + +``` +a+=b; b-=a; a+=b; b*=(-1). +``` + +This is an exact ordinary SWAP, with tariff3*8+2=26 in the inherited scalar +unit. Each ADD has safe factor2 in both declared field norms; sign has factor1. +A conservative interval exponent is therefore three per SWAP. Completed +norm1 is never substituted for this instruction-prefix bound. SIGNED_SWAP +uses the first three ADDs and tariff24. + +Every ADD in this lowering requires the same physical ordered address space +and chart. At outer main boundaries the complete standard caller fields share +the ground computational ABI. The new h/T swap has an explicit cleared, +ground-retagged T partner; its h field is at that ordinary outer ABI. + +For the source provider's eight terminal mode/cache swaps, the independent +source proof establishes that the original persistent mode row is exactly zero +before consuming the normalized cache. Retag that **proved zero** to the +cache's current chart, execute the scalar SWAP in that shared chart, and +reset/clear the returned owned zero as required. The persistent output obtains +the cache's required data and chart. Any reset of the private zero's descriptor +occurs before its next use. These are fixed proof-directed retags, not runtime +zero predicates, nonlinear projections or extra Gaussian calls. The source +already permits identity retags on an identically zero field; the full-column +zero proof is the requisite premise, not a guessed numerical smallness test. + +This lowering adds only finitely many metadata/descriptor records, covered by +the fresh raw primitive-schema majorant. It preserves the exact whole-SWAP +endpoint and all ownership rules. A perturbation at a zero retag is carried +through physical identity; it is not set to zero by the proof annotation. +The declared field residual bound therefore remains valid under arbitrary +injected residuals, rather than relying on numerical cancellations staying zero. + +Alternatively, a retained direct tape-swap realization may be used with its +actual primitive-prefix/rounding contract. The numerical bounds in v3 use the +explicit26-unit scalar lowering; no missing direct-swap implementation is +assumed to have norm1 at every internal instruction. + +## 3. Actual raw ownership, completion and chronological return + +Each raw LOCAL has17 private fields, tagged by its physical occurrence. Across +18 calls these are306 fields. The actual caller separately reserves one112-field +query bank, reused by15 sequential queries. Each query clears its arbitrary +entry, copies the actual source field, completes the one rank-one Gaussian +(and required inverse translation), adds to the actual destination and clears +the query field. It returns zero before the next query starts. Thus the raw +program uses418 private field positions before recursive/movement scratch. +A larger1986-position reservation obtained by allocating each query occurrence +separately is a conservative overestimate, not the actual minimum or a productive +count. The corrected inventory distinguishes allocation from1680 query uses. + +The ordinary uniform compiler tags every raw-unit occurrence by its full +instance path. All suspended parent banks, descriptors and complete role streams +remain parked while a child runs. The child has distinct own banks, completes +its entire job, restores both adapters and physical ordering, and returns +before its parent resumes. Correlated contents do not identify owners. No +one-bank-per-depth reuse or syntax-node alias is presumed. These rules are +exactly the source constructive finite-batch implementation. + +The new local main map is the same ordinary uncoded B used by the existing +direct controller. Its408 helper outputs are autonomous. Substitution into +the old chronological source main identity therefore preserves that main +identity for arbitrary inputs. The new helpers do not become operands of later +main events. With the corrected actual145-axis normalizers, the full raw +program has10,928 independent productive inputs and64,260 paid calls. +The signed paid-minus-target profile change is +144H8−144H8, identically zero +at every exponent. The only proposed improvement is separately certified +compiler/outer headroom. + +## 4. Fresh ordinary record and coefficient bounds + +The v3 parser independently reconstructs the unchanged source body, both basis +programs and its exterior scales, then the actual frozen v16c outer word, +the retained controller boundaries/events, query realization and corrected +whole-main normalizers. It counts literal P/D/X/phase occurrences and all +scalar tariffs. Input/output whole-job permutation maps, central X aliases, +metadata/zero resets, address descriptors, owner parking and restoration are +additional **ordinary work**, never Gaussian credit or zero machine work. + +For a fixed d-axis binary affine/quadratic monomial, elimination uses finitely +many selected-bit row additions, at most3XOR per row swap, d translations, +linear/quadratic unit phases and fixed return routes. The conservative bound +`64*(d+1)^3` covers both directions and descriptor/instruction passes. Here +the raw ambient is145, so this is a new raw145-axis recipe bound; the old +nine-axis1000-record local number is not blindly applied to a full145-axis map. + +Let I be the fresh complete raw field-record count plus all owned positions, +paid jobs and productive roles, with one extra for ceilings. The fresh +overestimate + +``` +Rraw <=64*(145+1)^3*I^3+exact_scalar_tariff, +Graw <=exact_scalar_tariff+8*Rraw +``` + +pays explicit role-order permutations (at most a square in incidences), all +route descriptors, whole-job matching, forward/inverse recipes, owned scans +and the literal source/new words. It is separate from the exact literal +census and may deliberately count already-emitted routes again. No productive +credit results. V3 checks these **values**, the actual height allowance, +raw arities and private inventory are below A0=2^128. No old181million or10^9 +numerical cap is an acceptance premise. + +The tariff unit is an admitted primitive schema with its retained physical +cost, not one literal Turing tape instruction at arbitrary f. Fixed binary +recipes use the source compact-control implementation, complete dirty-control +reservations and repair. Its domain remains f<=p, address boundA=O(p), +K/log p tending to infinity and a superpolynomial record fiber. At the outer +layer f<=e<=floor(b_in^epsilon), p=6b_in, with epsilon<1. The same domain holds +eventually. No arbitrary RAM gather, new tape per coordinate or new movement +exponent is introduced. + +## 5. New constructive expanded compiler majorant + +Apply the source chronological product, charged target completion, disjoint +splitting and integer finite compiler to this newly specified raw program. +At q=1024 and raw maximum145, the complete strictified-unit count/height/owner +overestimate has base-two logarithm at most + +``` +2*(1024*(2+2*128)+10+2*8192)+6+3*8193=585757<1048576. +``` + +The product factor charges every circuit/bank incidence; completion/splitting +add at most ambient-rank squared; squaring the whole inventory pays role +order; the cubic matcher bound pays both adapters and descriptor passes. +Choose D0=2^1048576 for this **new** strictified unit. + +For every n>=0 construct the source integer compiler with sequential rank-one +bases, full chronological substitution, product of the widths of all distinct +needed smaller ranks to clear batch denominators, fresh instance-path banks, +and row-elimination coordinate/role recipes. Define + +``` +F16(0)=D0, +X_n=(n+1)*(D0+1)*(F16(n-1)+1), +F16(n)=X_n^(16*(n+1)^2) (n>=1). +``` + +Strong induction bounds every actual W_n,P_n,U_n,O_n,R_n,G_n by F16(n). +Separation makes all substituted exit/complement widths strictly smaller. +There are at most (D0+1)^(2n+2) mixed instances; denominator clearance is at +most F16(n-1)^(n-1), one factor per distinct smaller width. Their complete +bodies, all owned banks, coefficients and restoration fit +I_n<=X_n^(3n+5). Role permutations and cubic fixed-coordinate matchers then +fit `64*(n+1)^3*(I_n+1)^3<=X_n^(9n+20)<=F16(n)`, since +`16*(n+1)^2-(9n+20)=16n^2+23n-4>=35` for n>=1. +This is a terminating constructive definition; no enormous value or program +has been materialized, and no finite probe is the all-n proof. + +The independently funded carrier is + +``` +H=38569300000000000, N=2^H, +M=F16(N), W,P,U,O,R,G<=M. +``` + +The fresh strict tested/claim gap is1/700000000000. The separate funding +receipt proves the actual rank-one efficiency through the paid/target moments, +completion/tails, shifted exits, eta and successful H grid. The majorant M +supplies **no** efficiency ratio, productive credit or improved kappa. + +## 6. D0 is not absorbed at the fixed carrier rank + +In particular, it is **not claimed** that D00`, after the source ordinary exponent guards apply. C_word may +be huge; it does not need to be below N^(sigma'-sigma). The retained stopped +weighted-tree theorem supplies its precise internal/leaf version and powers. +The new finite multiplier is then absorbed against the strict outer gaps as +the **outer input/record size** grows, not against the already fixed N. + +Explicitly, for any fixed C>=1 and positive rational spare power delta, +`h>=2^ceil(log2(2C)/delta)` implies C<=h^delta/2. The same construction, with +an enlarged exponent for the fixed polynomial/log setup factors, gives an +effective domain-entry threshold. C may be a computable expression in M. +This threshold can be vastly larger than N; no practical-size claim is made. +The source's superpolynomial fiber absorbs every new fixed setup degree, +with a new threshold. It does not excuse nonuniform data-dependent gathers +or an unproved operation species. + +## 7. Fresh semantic grid, injected errors, storage and tape thresholds + +Put + +``` +Zbar=2M, Ebar=64*(4M+N+1)^3, +Bbar=M+Ebar, C0bar=32*N*Bbar^2, C1=1. +``` + +These new integers satisfy +`2*M*Zbar^2+8*M+4*Zbar+4+32*N=3, the same induction gives +a linear bound2Bbar*e, after the elementary base. The finite tree has at most +`(M+1)^(Dord(e)+1)` nodes, Dord(e)<=log2 e. The logarithm of its coordinatewise +residual-site count can be bounded explicitly using + +``` +Jsites(e)<=(M+N+1)*e*(M+1)^(Dord(e)+1), +log2Jsites(e)<=(3M+N+4)*e. +``` + +Prefix/suffix amplification, site summation and the retained outer/remainder +passes therefore fit `(4Bbar+36+3M+N+4)*e=p_grid, Delta=C0bar*d_axes<=p/4 and signed width +`p+2Delta+3<=2p`. This is an outer precision threshold; no C0bar=2N`; direct elementary leaves +handle smaller widths. + +Productive divisibility needs W^Dord(d_axes) complete rows. A safe private/ +parking overreservation is `[W*(O+1)]^Dord(d_axes)`. The associated complete +chunk reserve is at most +`(ceil(log2W)+ceil(log2(O+1)))*Dord(d_axes)+2`, a fresh fixed-coefficient +O(log d_axes) quantity. If Lstock bounds that coefficient plus constants, +`d_axes>=2^(2*(Lstock+2))` is a sufficient source-style domain threshold after +enlarging ceilings. Simultaneous BIT/complex/other independent stocks multiply; +their chunk reserves add. Pad once per actual support-local phase to a multiple +of the full stock product, with factor<2; preserve full spectators, restore +appended zero rows and remove them before later phases. Do not pad anew at +every recursion depth or replace a product of live stocks by their maximum. + +For the current actual BIT atom.004, the support-local source reservation has +form `C_new*(log2 h+h^.004*(log2 p)^3+1)` complete chunks. C_new is enlarged for +this actual template. A sufficient polynomial part of its new domain-entry +threshold is `[1024*C_new*(log2p)^3]^(1/.996)`, enlarged for logarithmic/base +terms. The source outer gate proves beta*(1-.004)>0. Thus the BIT reserve and +the new complex O(log d_axes) reserve are simultaneously sublinear after their +fresh threshold; their row cardinalities still multiply. This is where the +updated source BIT-stock condition, rather than a maximum of two reserves, +is used. + +Here is an explicit coarse simultaneous-stock absorption, also valid when +the source reserve has already been weakened to a larger power. Put atom=.004, +eta=beta*atom>0 and suppose the retained source-domain bounds are + +``` +log2 S_BIT <= C_BIT*h^(beta*(1-atom)), +log2 S_complex <= C_stock0+C_stock1*log2 h. +``` + +The exact exponent difference is beta−beta*(1−atom)=eta, not merely the +positivity of beta*(1−atom). For +`h>=(4*C_BIT)^(1/eta)`, the first term is at most h^beta/4. Set +`Lstock=ceil(log2(16*(C_stock0+C_stock1+1)))` and + +``` +Tstock=max(16,ceil((4/beta)^2),ceil(4*Lstock/beta)). +``` + +For h>=2^Tstock, put t=log2h. The inequalities log2t<=sqrt(t)<=beta*t/4 +and Lstock<=beta*t/4 show +`C_stock0+C_stock1*t<=h^beta/4`, with further slack. Therefore + +``` +log2(S_BIT*S_complex) + =log2S_BIT+log2S_complex <=h^beta/20; the computable condition +`h>=(log2p)^(2s/gamma)` bounds this factor by h^(gamma/2) and yields a weaker +power still below h^(beta*(1−atom)). Logarithmic h terms have an explicit +power-domination threshold of the same Tstock form. Alternatively, use the +source's supplied joint h,p threshold directly. This is compatible with the +checked outer source regime; no absorption at the fixed carrier N is used. + +Depth-first execution uses a fixed finite number of template-dependent tape, +route and instruction types. Levels occupy longer tape regions. Every parent +stream, owner bank and descriptor is parked and returned with the retained +selected-bit repair/movement tariff. No new tape per coordinate or RAM-to-tape +simulation is assumed. The final threshold is the maximum of the new grid, +stop, stock, polynomial setup, movement-domain, BIT and analytic/recovery +thresholds. If a source foundation supplies only an asymptotic domain-entry +hypothesis, its unknown implementation cutoff remains precisely that retained +hypothesis; no invented numerical cutoff replaces it. + +## 8. Funding, ordinary BIT and recovery interface + +The independent funding file uses K=.003027288235 and tested C=.003027288245, +reserve10^-12, cutoff20/floor21, offset1/5, product1024, ambient145, +theta63/64 and logarithm power1000. Its complete paid/target invoice is bound +to the actual neutral profile. The same general source theorem permits that +tuple and proves strict uniform leaf efficiency at the recorded H. All54 +strict and four functional outer predicates pass at its new rational +parameters, using the admitted ordinary BIT saving.0034 and actual atom.004. +The current source BIT interface, its simultaneous stock and effective-saving +gap are retained; no larger BIT exponent is invented. + +All new coefficients are dyadic; coordinate/phase maps introduce no new odd +denominator or field extension. Thus the source fine-prime exclusions, +conditioning, analytic decomposition and exact integer-recovery stack apply +in their same hypothesis class with the new precision/setup thresholds. +No rational1/12 metric or additional denominator3 avoidance is needed by v16c. +The numeric outer checks do not themselves prove that historical analytic/ +physical stack; it remains exactly the selected conditional premise set. + +The aggregate closure must bind this proof, corrected v3 inputs/results, +source controller/normalizers,649-column local acceptance, complete invoice +and numerical funding hashes. It may then state **fresh ordinary/precision/ +stock/source-compiler application under the five retained assumptions**. +It must not mutate earlier scoped receipts, present moment-neutral completion +as a recursive price improvement, or claim unconditional/end-to-end formal +acceptance. Selected-frontier promotion remains a separate maintainer action. + +Retain Dillon's provider campaign; Ali Romman's cached relations and direct +caller; Cao Yifan's native word; Cinna Davis's controller/helpers; zxv's +physical/compiler/semantic precision and higher-moment proofs; Jacob Alan +Sussman's integer flow; general Clifford/BIT/analytic contributors; and the +complete pinned predecessor notices. This new source application is Chris R / +Clear1nsight with substantial OpenAI Codex assistance, Apache-2.0. diff --git a/research/p104-cut-stability/whole-caller/inputs/WORD.json.gz b/research/p104-cut-stability/whole-caller/inputs/WORD.json.gz new file mode 100644 index 0000000000..c04a815c26 Binary files /dev/null and b/research/p104-cut-stability/whole-caller/inputs/WORD.json.gz differ diff --git a/research/p104-cut-stability/whole-caller/inputs/caller.py b/research/p104-cut-stability/whole-caller/inputs/caller.py new file mode 100644 index 0000000000..6ac5e73569 --- /dev/null +++ b/research/p104-cut-stability/whole-caller/inputs/caller.py @@ -0,0 +1,175 @@ +"""An all-forward caller for the credited P104 supplier. + +The Laurent controller is by Cinna Davis. Its replay and signed-swap +identity follow Ali Romman's PR5398. This inverse wrapper and source binding +are by Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +""" +from copy import deepcopy +from fractions import Fraction as Q +from collections import Counter +from hashlib import sha256 +import json +import local as L +need = L.need + +def replay(word): + """Check the literal p16 word and both rational boundary programs.""" + need((word['kind'], word['pairs'], word['prefix_pairs'], word['ambient_rank']) == ('complex', 16, 7, 145), 'Source p16/a7 controller') + zero = (0,) * 34 + def plus(dst, src, q): + for k, v in src.items(): + value = dst.get(k, Q(0)) + q * v + if value: dst[k] = value + else: dst.pop(k, None) + def shifted(row, term, sign=1): + return [{tuple(a + b for a, b in zip(k, term)): sign * v for k, v in cell.items()} for cell in row] + for side in ('left', 'right'): + matrix = [[Q(i == j) for j in range(32)] for i in range(32)] + for e in word['boundaries'][side + '_program']: + if e[0] == 'SWAP': matrix[e[1]], matrix[e[2]] = matrix[e[2]], matrix[e[1]] + elif e[0] == 'SCALE': matrix[e[1]] = [Q(e[2]) * x for x in matrix[e[1]]] + else: + need(e[0] == 'ADD', 'Boundary scalar opcode') + matrix[e[1]] = [x + Q(e[3]) * y for x, y in zip(matrix[e[1]], matrix[e[2]])] + need(matrix == [[Q(x) for x in row] for row in word['boundaries'][side]], 'Exact scalar boundary program') + rows = [[{zero: Q(x)} if Q(x) else {} for x in row] for row in word['boundaries']['right']] + for e in word['physical_events']: + if e[0] in ('LOCAL', 'QUERY_SHEAR'): + _, stage, pair, back = e + x, y = 2 * pair, 2 * pair + 1 + if back: x, y = y, x + term = (1 if back else -1,) + (0,) * 33 + for dst, src in zip(rows[y], shifted(rows[x], term)): + plus(dst, src, Q(-1 if back else 1)) + if e[0] == 'LOCAL': + term = (0,) + tuple(int(s == stage) for s in range(33)) + for r in (x, y): rows[r] = shifted(rows[r], term) + elif e[0] == 'Q_POWER': + need(e[2] in (-2, 2), 'Only even central powers are free') + rows[e[1]] = shifted(rows[e[1]], (e[2],) + (0,) * 33) + elif e[0] == 'IDLE': + term = (0,) + tuple(int(s in e[2]) for s in range(33)) + for r in (2 * e[1], 2 * e[1] + 1): rows[r] = shifted(rows[r], term) + elif e[0] == 'ADD': + for dst, src in zip(rows[e[1]], rows[e[2]]): plus(dst, src, Q(e[3])) + else: + need(e[0] in ('SWAP', 'SIGNED_SWAP'), 'Controller physical opcode') + rows[e[1]], rows[e[2]] = rows[e[2]], shifted(rows[e[1]], zero, -1 if e[0] == 'SIGNED_SWAP' else 1) + out = [[{} for _ in range(32)] for _ in range(32)] + for i, row in enumerate(word['boundaries']['left']): + for k, q in enumerate(row): + if Q(q): + for j in range(32): plus(out[i][j], rows[k][j], Q(q)) + expected = [[{tuple(word['diagonal'][i]): Q(1)} if i == j else {} for j in range(32)] for i in range(32)] + need(out == expected, 'All p16 Laurent coefficients, central signs and boundary factors') + return word + + + +def construct(): + source = L.read(L.ROOT/'research/joint-helper-lattice/CONTROLLER.json') + replay(source) + word = deepcopy(source) + events, sites = [], [] + for e in source['physical_events']: + if e[0] == 'LOCAL' and e[3]: + _, stage, pair, _ = e + x, y = 2*pair, 2*pair+1 + events += [['Q_POWER',x,-2], ['SIGNED_SWAP',x,y], ['LOCAL',stage,pair,False], + ['Q_POWER',y,2], ['SIGNED_SWAP',y,x]] + sites.append(stage) + else: + events.append(deepcopy(e)) + word['physical_events'] = events + word['wrapper_sites'] = sites + word.pop('invoice') + need(len(sites) == 16 and all(not e[3] for e in events if e[0] == 'LOCAL'), 'Eighteen forward suppliers') + replay(word) + return word + + +def physical(word, local): + N = L.load(L.ROOT/'research/pr4359-p7-padding/native_inventory.py', 'productive_p104_phase_polynomial') + source = L.read(L.ROOT/'research/kappa-0023-productive-jobs/dependencies/kappa-next-regime/direct-decoder/sources/DATA-PHASES.json') + recipes = {r['q']:r for r in source['recipes']} + dimension = 265 + axes = tuple(1 << i for i in range(dimension)) + def completed(stage): + return N.norm((axis,1) for axis in axes[:9+8*stage]) + contacts, squares, target_profile = [], 0, Counter() + idle_jobs = Counter() + for _,stage,pair,back in (e for e in word['physical_events'] if e[0] == 'LOCAL'): + need(not back, 'No inverse-transpose local implementation') + spectator = N.norm((axis,1) for axis in axes[9:9+8*stage]) + for q in local['ports']: + basis = recipes[q]['idle_children'][0]['orthogonal_axes'][:8] + need(all((x&q).bit_count()%2 == 0 for x in basis), 'Fresh-block basis fixes central port') + need(all((a&b).bit_count()%2 == int(i==j) for i,a in enumerate(basis) for j,b in enumerate(basis)), 'Actual orthonormal basis') + swaps = [] if stage == 0 else [b ^ axes[9+8*(stage-1)+i] for i,b in enumerate(basis)] + route = tuple(e ^ N.act(swaps,sum(((e&v).bit_count()%2) << i for i,v in enumerate(swaps))) for e in axes) + need(all(N.act(route,route[i]) == axes[i] for i in range(dimension)), 'Route inverse') + need(all((a&b).bit_count()%2 == int(i==j) for i,a in enumerate(route) for j,b in enumerate(route)), 'Orthogonal physical route') + need(N.act(route,q) == q, 'Route preserves Q') + raw_x = N.norm([(q,1)]) if stage == 0 else completed(stage-1) + raw_y = () if stage == 0 else N.norm(list(raw_x)+[(q,-1)]) + entry_x, entry_y = N.norm(list(spectator)+[(q,1)]), spectator + out0 = N.norm(list(spectator)+[(axis,1) for axis in axes[:9]]) + exit_x, exit_y = out0, N.norm(list(out0)+[(q,-1)]) + out_x, out_y = completed(stage), N.norm(list(completed(stage))+[(q,-1)]) + maps = [N.contact(a,b,route,dimension) for a,b in [(raw_x,entry_x),(raw_y,entry_y),(exit_x,out_x),(exit_y,out_y)]] + delta = N.norm([(axis,1) for axis in axes[:9]]+[(q,-1)]) if stage == 0 else N.norm((axis,1) for axis in axes[9+8*(stage-1):9+8*stage]) + for incoming,outgoing in [(raw_x,out_x),(raw_y,out_y)]: + need(N.polynomial(N.norm(list(outgoing)+[(a,-c) for a,c in incoming]),dimension) == N.polynomial(delta,dimension), 'Actual diagonal D_s') + cross = N.norm(list(out_y)+[(a,-c) for a,c in raw_x]) + need(N.polynomial(cross,dimension) == N.polynomial(N.norm(list(delta)+[(q,-1)]),dimension), 'Actual cross term D_s Q^-1') + need(sum(route[i] != axes[i] for i in range(dimension)) <= 17 and all(m['translation'].bit_count() <= 17 and m['inverse_translation'].bit_count() <= 17 for m in maps), 'Fixed seventeen-axis route allowance') + contacts.append([stage,q,maps]) + for q in local['ports']: + # Multiply the Gaussian pair twice with exact real and imaginary parts. + a,b = (Q(1,2),Q(1,2)), (Q(1,2),Q(-1,2)) + mul = lambda z,w: (z[0]*w[0]-z[1]*w[1],z[0]*w[1]+z[1]*w[0]) + plus = lambda z,w: (z[0]+w[0],z[1]+w[1]) + diagonal,off = plus(mul(a,a),mul(b,b)), plus(mul(a,b),mul(b,a)) + need(diagonal == (0,0) and off == (1,0), 'Q^2 is translation with phase +1') + for address in range(512): + need({address:diagonal,address^q:off}[address^q] == (1,0), 'Every central square column') + squares += 1 + for term in word['diagonal']: + qp,selected = term[0],term[1:] + physical = N.norm([(q,qp)]+[(axis,1) for s,yes in enumerate(selected) if yes for axis in (axes[:9] if s == 0 else axes[9+8*(s-1):9+8*s])]+[(q,-1)]*selected[0]) + positive = list(axes[:9]) if selected[0] else [q] + positive += [axis for s in range(1,len(selected)) if selected[s] for axis in axes[9+8*(s-1):9+8*s]] + need(N.polynomial(physical,dimension) == N.polynomial(N.norm([(x,1) for x in positive]+[(q,2)]*(qp == -1)),dimension), 'Full main output phase and rank') + target_profile[len(positive)] += 1 + for e in word['physical_events']: + if e[0] != 'IDLE': + continue + stages = e[2] + need(len(stages) == len(set(stages)), 'Whole idle has no repeated stage') + for q in local['ports']: + positive, physical = [], [] + for stage in stages: + if stage == 0: + positive += recipes[q]['idle_children'][0]['orthogonal_axes'][:8] + physical += [(x,1) for x in axes[:9]]+[(q,-1)] + else: + block = axes[9+8*(stage-1):9+8*stage] + positive += block + physical += [(x,1) for x in block] + need(len(positive) == 8*len(stages), 'All idle Gaussian axes') + need(all((a&b).bit_count()%2 == int(i==j) for i,a in enumerate(positive) for j,b in enumerate(positive)), 'Independent orthonormal idle axes') + N.contact(N.norm(physical),N.norm((x,1) for x in positive),axes,dimension) + idle_jobs[len(positive)] += 2 + return {'ports':104,'full_calls':18,'physical_contacts':4*len(contacts),'central_square_columns':squares, + 'main_targets':dict(target_profile),'whole_idle_jobs':dict(idle_jobs),'route_payload_sha256':sha256(json.dumps(contacts,separators=(',',':')).encode()).hexdigest(), + 'wrapper_sites':word['wrapper_sites'],'new_paid_jobs':0,'tensor_rule':'Factorwise native maps; scalar signs stay outside the tensor power.'} + + +def controls(word): + bad = deepcopy(word) + bad['physical_events'].remove(next(e for e in bad['physical_events'] if e[0] == 'Q_POWER')) + try: + replay(bad) + except ValueError: + return {'missing_central_translation':'Rejected by the complete Laurent endpoint'} + raise ValueError('Missing central translation accepted') diff --git a/research/p104-cut-stability/whole-caller/inputs/controller.json b/research/p104-cut-stability/whole-caller/inputs/controller.json new file mode 100644 index 0000000000..cc539db709 --- /dev/null +++ b/research/p104-cut-stability/whole-caller/inputs/controller.json @@ -0,0 +1,5480 @@ +{ + "ambient_rank": 145, + "boundaries": { + "left": [ + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "1", + "0", + "-1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "1", + "0", + "-1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "1", + "0", + "-1", + "0", + "1", + "0", + "-1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "1", + "0", + "-1", + "0", + "1", + "0", + "-1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "1", + "0", + "-1", + "0", + "1", + "0", + "-1", + "0", + "1", + "0", + "-1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "1", + "0", + "-1", + "0", + "1", + "0", + "-1", + "0", + "1", + "0", + "-1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "1", + "0", + "-1", + "0", + "1", + "0", + "-1", + "0", + "1", + "0", + "-1", + "0", + "1", + "0", + "-1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ] + ], + "left_program": [ + [ + "SWAP", + 30, + 31 + ], + [ + "SWAP", + 29, + 30 + ], + [ + "SWAP", + 28, + 30 + ], + [ + "SWAP", + 27, + 29 + ], + [ + "SWAP", + 26, + 28 + ], + [ + "SWAP", + 25, + 30 + ], + [ + "SWAP", + 24, + 25 + ], + [ + "SWAP", + 23, + 26 + ], + [ + "SWAP", + 22, + 30 + ], + [ + "SWAP", + 20, + 26 + ], + [ + "SWAP", + 19, + 22 + ], + [ + "SWAP", + 18, + 29 + ], + [ + "SWAP", + 17, + 23 + ], + [ + "SWAP", + 16, + 27 + ], + [ + "SCALE", + 15, + "-1" + ], + [ + "SWAP", + 15, + 31 + ], + [ + "ADD", + 12, + 14, + "1" + ], + [ + "ADD", + 10, + 14, + "-1" + ], + [ + "ADD", + 8, + 14, + "1" + ], + [ + "ADD", + 6, + 14, + "-1" + ], + [ + "ADD", + 4, + 14, + "1" + ], + [ + "ADD", + 2, + 14, + "-1" + ], + [ + "ADD", + 0, + 14, + "1" + ], + [ + "SWAP", + 14, + 15 + ], + [ + "ADD", + 31, + 13, + "1" + ], + [ + "SWAP", + 13, + 30 + ], + [ + "ADD", + 10, + 12, + "1" + ], + [ + "ADD", + 8, + 12, + "-1" + ], + [ + "ADD", + 6, + 12, + "1" + ], + [ + "ADD", + 4, + 12, + "-1" + ], + [ + "ADD", + 2, + 12, + "1" + ], + [ + "ADD", + 0, + 12, + "-1" + ], + [ + "SWAP", + 12, + 14 + ], + [ + "ADD", + 31, + 11, + "-1" + ], + [ + "ADD", + 30, + 11, + "-1" + ], + [ + "SCALE", + 11, + "-1" + ], + [ + "SWAP", + 11, + 29 + ], + [ + "ADD", + 8, + 10, + "1" + ], + [ + "ADD", + 6, + 10, + "-1" + ], + [ + "ADD", + 4, + 10, + "1" + ], + [ + "ADD", + 2, + 10, + "-1" + ], + [ + "ADD", + 0, + 10, + "1" + ], + [ + "SWAP", + 10, + 13 + ], + [ + "ADD", + 31, + 9, + "1" + ], + [ + "ADD", + 30, + 9, + "1" + ], + [ + "ADD", + 29, + 9, + "1" + ], + [ + "SWAP", + 9, + 28 + ], + [ + "ADD", + 6, + 8, + "1" + ], + [ + "ADD", + 4, + 8, + "-1" + ], + [ + "ADD", + 2, + 8, + "1" + ], + [ + "ADD", + 0, + 8, + "-1" + ], + [ + "SWAP", + 8, + 12 + ], + [ + "ADD", + 31, + 7, + "-1" + ], + [ + "ADD", + 30, + 7, + "-1" + ], + [ + "ADD", + 29, + 7, + "-1" + ], + [ + "ADD", + 28, + 7, + "-1" + ], + [ + "SCALE", + 7, + "-1" + ], + [ + "SWAP", + 7, + 27 + ], + [ + "ADD", + 4, + 6, + "1" + ], + [ + "ADD", + 2, + 6, + "-1" + ], + [ + "ADD", + 0, + 6, + "1" + ], + [ + "SWAP", + 6, + 11 + ], + [ + "ADD", + 31, + 5, + "1" + ], + [ + "ADD", + 30, + 5, + "1" + ], + [ + "ADD", + 29, + 5, + "1" + ], + [ + "ADD", + 28, + 5, + "1" + ], + [ + "ADD", + 27, + 5, + "1" + ], + [ + "SWAP", + 5, + 26 + ], + [ + "ADD", + 2, + 4, + "1" + ], + [ + "ADD", + 0, + 4, + "-1" + ], + [ + "SWAP", + 4, + 10 + ], + [ + "ADD", + 31, + 3, + "-1" + ], + [ + "ADD", + 30, + 3, + "-1" + ], + [ + "ADD", + 29, + 3, + "-1" + ], + [ + "ADD", + 28, + 3, + "-1" + ], + [ + "ADD", + 27, + 3, + "-1" + ], + [ + "ADD", + 26, + 3, + "-1" + ], + [ + "SCALE", + 3, + "-1" + ], + [ + "SWAP", + 3, + 25 + ], + [ + "ADD", + 0, + 2, + "1" + ], + [ + "SWAP", + 2, + 9 + ], + [ + "ADD", + 31, + 1, + "1" + ], + [ + "ADD", + 30, + 1, + "1" + ], + [ + "ADD", + 29, + 1, + "1" + ], + [ + "ADD", + 28, + 1, + "1" + ], + [ + "ADD", + 27, + 1, + "1" + ], + [ + "ADD", + 26, + 1, + "1" + ], + [ + "ADD", + 25, + 1, + "1" + ], + [ + "SWAP", + 1, + 24 + ], + [ + "SWAP", + 0, + 8 + ] + ], + "right": [ + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "-1", + "1", + "-1", + "1", + "-1", + "1", + "-1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "-1", + "1", + "-1", + "1", + "-1", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "-1", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "-1", + "1", + "-1", + "1", + "-1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "-1", + "1", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "-1", + "1", + "-1", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "-1", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "-1", + "1", + "-1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "-1", + "1", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "-1", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "-1", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "-1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "-1", + "1", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "-1" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ] + ], + "right_program": [ + [ + "ADD", + 30, + 31, + "-1" + ], + [ + "ADD", + 29, + 31, + "-1" + ], + [ + "ADD", + 28, + 31, + "-1" + ], + [ + "ADD", + 27, + 31, + "-1" + ], + [ + "SCALE", + 31, + "-1" + ], + [ + "ADD", + 31, + 30, + "-1" + ], + [ + "ADD", + 29, + 30, + "-1" + ], + [ + "ADD", + 28, + 30, + "-1" + ], + [ + "ADD", + 27, + 30, + "-1" + ], + [ + "ADD", + 31, + 29, + "-1" + ], + [ + "ADD", + 28, + 29, + "-1" + ], + [ + "ADD", + 27, + 29, + "-1" + ], + [ + "SCALE", + 29, + "-1" + ], + [ + "ADD", + 31, + 28, + "-1" + ], + [ + "ADD", + 27, + 28, + "-1" + ], + [ + "SWAP", + 28, + 29 + ], + [ + "ADD", + 31, + 27, + "-1" + ], + [ + "SCALE", + 27, + "-1" + ], + [ + "SWAP", + 27, + 29 + ], + [ + "ADD", + 31, + 26, + "1" + ], + [ + "SWAP", + 26, + 29 + ], + [ + "ADD", + 29, + 25, + "-1" + ], + [ + "ADD", + 24, + 25, + "-1" + ], + [ + "SWAP", + 25, + 28 + ], + [ + "ADD", + 28, + 24, + "1" + ], + [ + "SWAP", + 23, + 29 + ], + [ + "SWAP", + 22, + 25 + ], + [ + "SWAP", + 20, + 23 + ], + [ + "SWAP", + 19, + 25 + ], + [ + "SWAP", + 18, + 27 + ], + [ + "SWAP", + 17, + 29 + ], + [ + "SWAP", + 16, + 31 + ], + [ + "ADD", + 14, + 15, + "-1" + ], + [ + "SWAP", + 15, + 30 + ], + [ + "ADD", + 13, + 14, + "-1" + ], + [ + "SWAP", + 14, + 30 + ], + [ + "ADD", + 12, + 13, + "-1" + ], + [ + "SWAP", + 13, + 22 + ], + [ + "ADD", + 11, + 12, + "-1" + ], + [ + "SWAP", + 12, + 30 + ], + [ + "ADD", + 10, + 11, + "-1" + ], + [ + "SWAP", + 11, + 18 + ], + [ + "ADD", + 9, + 10, + "-1" + ], + [ + "SWAP", + 10, + 22 + ], + [ + "ADD", + 8, + 9, + "-1" + ], + [ + "SWAP", + 9, + 26 + ], + [ + "SWAP", + 8, + 30 + ], + [ + "SWAP", + 7, + 16 + ], + [ + "SWAP", + 6, + 18 + ], + [ + "SWAP", + 5, + 20 + ], + [ + "SWAP", + 4, + 22 + ], + [ + "SWAP", + 3, + 24 + ], + [ + "SWAP", + 2, + 26 + ], + [ + "SWAP", + 1, + 28 + ], + [ + "SWAP", + 0, + 30 + ] + ] + }, + "diagonal": [ + [ + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1 + ], + [ + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1 + ], + [ + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 1 + ], + [ + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1 + ], + [ + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1 + ], + [ + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1 + ], + [ + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1 + ], + [ + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1 + ], + [ + -1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + -1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + -1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + -1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + -1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + -1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + -1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + -1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 1 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1 + ], + [ + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1 + ] + ], + "keep_mask": 35047648968703, + "kind": "complex", + "pairs": 16, + "physical_events": [ + [ + "LOCAL", + 0, + 0, + false + ], + [ + "Q_POWER", + 0, + -2 + ], + [ + "SIGNED_SWAP", + 0, + 1 + ], + [ + "LOCAL", + 1, + 0, + false + ], + [ + "Q_POWER", + 1, + 2 + ], + [ + "SIGNED_SWAP", + 1, + 0 + ], + [ + "IDLE", + 1, + [ + 0, + 1 + ] + ], + [ + "ADD", + 0, + 2, + 1 + ], + [ + "ADD", + 3, + 1, + -1 + ], + [ + "QUERY_SHEAR", + 2, + 0, + false + ], + [ + "ADD", + 0, + 2, + -1 + ], + [ + "ADD", + 3, + 1, + 1 + ], + [ + "Q_POWER", + 2, + -2 + ], + [ + "SIGNED_SWAP", + 2, + 3 + ], + [ + "LOCAL", + 3, + 1, + false + ], + [ + "Q_POWER", + 3, + 2 + ], + [ + "SIGNED_SWAP", + 3, + 2 + ], + [ + "IDLE", + 2, + [ + 0, + 1, + 3 + ] + ], + [ + "ADD", + 2, + 4, + 1 + ], + [ + "ADD", + 5, + 3, + -1 + ], + [ + "QUERY_SHEAR", + 4, + 1, + false + ], + [ + "ADD", + 2, + 4, + -1 + ], + [ + "ADD", + 5, + 3, + 1 + ], + [ + "Q_POWER", + 4, + -2 + ], + [ + "SIGNED_SWAP", + 4, + 5 + ], + [ + "LOCAL", + 5, + 2, + false + ], + [ + "Q_POWER", + 5, + 2 + ], + [ + "SIGNED_SWAP", + 5, + 4 + ], + [ + "IDLE", + 3, + [ + 0, + 1, + 3, + 5 + ] + ], + [ + "ADD", + 4, + 6, + 1 + ], + [ + "ADD", + 7, + 5, + -1 + ], + [ + "QUERY_SHEAR", + 6, + 2, + false + ], + [ + "ADD", + 4, + 6, + -1 + ], + [ + "ADD", + 7, + 5, + 1 + ], + [ + "Q_POWER", + 6, + -2 + ], + [ + "SIGNED_SWAP", + 6, + 7 + ], + [ + "LOCAL", + 7, + 3, + false + ], + [ + "Q_POWER", + 7, + 2 + ], + [ + "SIGNED_SWAP", + 7, + 6 + ], + [ + "IDLE", + 4, + [ + 0, + 1, + 3, + 5, + 7 + ] + ], + [ + "ADD", + 6, + 8, + 1 + ], + [ + "ADD", + 9, + 7, + -1 + ], + [ + "QUERY_SHEAR", + 8, + 3, + false + ], + [ + "ADD", + 6, + 8, + -1 + ], + [ + "ADD", + 9, + 7, + 1 + ], + [ + "Q_POWER", + 8, + -2 + ], + [ + "SIGNED_SWAP", + 8, + 9 + ], + [ + "LOCAL", + 9, + 4, + false + ], + [ + "Q_POWER", + 9, + 2 + ], + [ + "SIGNED_SWAP", + 9, + 8 + ], + [ + "IDLE", + 5, + [ + 0, + 1, + 3, + 5, + 7, + 9 + ] + ], + [ + "ADD", + 8, + 10, + 1 + ], + [ + "ADD", + 11, + 9, + -1 + ], + [ + "QUERY_SHEAR", + 10, + 4, + false + ], + [ + "ADD", + 8, + 10, + -1 + ], + [ + "ADD", + 11, + 9, + 1 + ], + [ + "Q_POWER", + 10, + -2 + ], + [ + "SIGNED_SWAP", + 10, + 11 + ], + [ + "LOCAL", + 11, + 5, + false + ], + [ + "Q_POWER", + 11, + 2 + ], + [ + "SIGNED_SWAP", + 11, + 10 + ], + [ + "IDLE", + 6, + [ + 0, + 1, + 3, + 5, + 7, + 9, + 11 + ] + ], + [ + "ADD", + 10, + 12, + 1 + ], + [ + "ADD", + 13, + 11, + -1 + ], + [ + "QUERY_SHEAR", + 12, + 5, + false + ], + [ + "ADD", + 10, + 12, + -1 + ], + [ + "ADD", + 13, + 11, + 1 + ], + [ + "Q_POWER", + 12, + -2 + ], + [ + "SIGNED_SWAP", + 12, + 13 + ], + [ + "LOCAL", + 13, + 6, + false + ], + [ + "Q_POWER", + 13, + 2 + ], + [ + "SIGNED_SWAP", + 13, + 12 + ], + [ + "IDLE", + 7, + [ + 0, + 1, + 3, + 5, + 7, + 9, + 11, + 13 + ] + ], + [ + "ADD", + 12, + 14, + 1 + ], + [ + "ADD", + 15, + 13, + -1 + ], + [ + "QUERY_SHEAR", + 14, + 6, + false + ], + [ + "ADD", + 12, + 14, + -1 + ], + [ + "ADD", + 15, + 13, + 1 + ], + [ + "Q_POWER", + 14, + -2 + ], + [ + "SIGNED_SWAP", + 14, + 15 + ], + [ + "LOCAL", + 15, + 7, + false + ], + [ + "Q_POWER", + 15, + 2 + ], + [ + "SIGNED_SWAP", + 15, + 14 + ], + [ + "ADD", + 14, + 16, + 1 + ], + [ + "ADD", + 17, + 15, + -1 + ], + [ + "QUERY_SHEAR", + 16, + 7, + false + ], + [ + "ADD", + 14, + 16, + -1 + ], + [ + "ADD", + 17, + 15, + 1 + ], + [ + "Q_POWER", + 16, + -2 + ], + [ + "SIGNED_SWAP", + 16, + 17 + ], + [ + "LOCAL", + 17, + 8, + false + ], + [ + "Q_POWER", + 17, + 2 + ], + [ + "SIGNED_SWAP", + 17, + 16 + ], + [ + "ADD", + 16, + 18, + 1 + ], + [ + "ADD", + 19, + 17, + -1 + ], + [ + "QUERY_SHEAR", + 18, + 8, + false + ], + [ + "ADD", + 16, + 18, + -1 + ], + [ + "ADD", + 19, + 17, + 1 + ], + [ + "Q_POWER", + 18, + -2 + ], + [ + "SIGNED_SWAP", + 18, + 19 + ], + [ + "LOCAL", + 19, + 9, + false + ], + [ + "Q_POWER", + 19, + 2 + ], + [ + "SIGNED_SWAP", + 19, + 18 + ], + [ + "ADD", + 18, + 20, + 1 + ], + [ + "ADD", + 21, + 19, + -1 + ], + [ + "QUERY_SHEAR", + 20, + 9, + false + ], + [ + "ADD", + 18, + 20, + -1 + ], + [ + "ADD", + 21, + 19, + 1 + ], + [ + "Q_POWER", + 20, + -2 + ], + [ + "SIGNED_SWAP", + 20, + 21 + ], + [ + "LOCAL", + 21, + 10, + false + ], + [ + "Q_POWER", + 21, + 2 + ], + [ + "SIGNED_SWAP", + 21, + 20 + ], + [ + "ADD", + 20, + 22, + 1 + ], + [ + "ADD", + 23, + 21, + -1 + ], + [ + "QUERY_SHEAR", + 22, + 10, + false + ], + [ + "ADD", + 20, + 22, + -1 + ], + [ + "ADD", + 23, + 21, + 1 + ], + [ + "Q_POWER", + 22, + -2 + ], + [ + "SIGNED_SWAP", + 22, + 23 + ], + [ + "LOCAL", + 23, + 11, + false + ], + [ + "Q_POWER", + 23, + 2 + ], + [ + "SIGNED_SWAP", + 23, + 22 + ], + [ + "ADD", + 22, + 24, + 1 + ], + [ + "ADD", + 25, + 23, + -1 + ], + [ + "QUERY_SHEAR", + 24, + 11, + false + ], + [ + "ADD", + 22, + 24, + -1 + ], + [ + "ADD", + 25, + 23, + 1 + ], + [ + "Q_POWER", + 24, + -2 + ], + [ + "SIGNED_SWAP", + 24, + 25 + ], + [ + "LOCAL", + 25, + 12, + false + ], + [ + "Q_POWER", + 25, + 2 + ], + [ + "SIGNED_SWAP", + 25, + 24 + ], + [ + "ADD", + 24, + 26, + 1 + ], + [ + "ADD", + 27, + 25, + -1 + ], + [ + "QUERY_SHEAR", + 26, + 12, + false + ], + [ + "ADD", + 24, + 26, + -1 + ], + [ + "ADD", + 27, + 25, + 1 + ], + [ + "Q_POWER", + 26, + -2 + ], + [ + "SIGNED_SWAP", + 26, + 27 + ], + [ + "LOCAL", + 27, + 13, + false + ], + [ + "Q_POWER", + 27, + 2 + ], + [ + "SIGNED_SWAP", + 27, + 26 + ], + [ + "ADD", + 26, + 28, + 1 + ], + [ + "ADD", + 29, + 27, + -1 + ], + [ + "QUERY_SHEAR", + 28, + 13, + false + ], + [ + "ADD", + 26, + 28, + -1 + ], + [ + "ADD", + 29, + 27, + 1 + ], + [ + "Q_POWER", + 28, + -2 + ], + [ + "SIGNED_SWAP", + 28, + 29 + ], + [ + "LOCAL", + 29, + 14, + false + ], + [ + "Q_POWER", + 29, + 2 + ], + [ + "SIGNED_SWAP", + 29, + 28 + ], + [ + "ADD", + 28, + 30, + 1 + ], + [ + "ADD", + 31, + 29, + -1 + ], + [ + "QUERY_SHEAR", + 30, + 14, + false + ], + [ + "ADD", + 28, + 30, + -1 + ], + [ + "ADD", + 31, + 29, + 1 + ], + [ + "Q_POWER", + 30, + -2 + ], + [ + "SIGNED_SWAP", + 30, + 31 + ], + [ + "LOCAL", + 31, + 15, + false + ], + [ + "Q_POWER", + 31, + 2 + ], + [ + "SIGNED_SWAP", + 31, + 30 + ], + [ + "LOCAL", + 32, + 15, + false + ], + [ + "IDLE", + 7, + [ + 17, + 19, + 21, + 23, + 25, + 27, + 29, + 31, + 32 + ] + ], + [ + "IDLE", + 8, + [ + 19, + 21, + 23, + 25, + 27, + 29, + 31, + 32 + ] + ], + [ + "IDLE", + 9, + [ + 21, + 23, + 25, + 27, + 29, + 31, + 32 + ] + ], + [ + "IDLE", + 10, + [ + 23, + 25, + 27, + 29, + 31, + 32 + ] + ], + [ + "IDLE", + 11, + [ + 25, + 27, + 29, + 31, + 32 + ] + ], + [ + "IDLE", + 12, + [ + 27, + 29, + 31, + 32 + ] + ], + [ + "IDLE", + 13, + [ + 29, + 31, + 32 + ] + ], + [ + "IDLE", + 14, + [ + 31, + 32 + ] + ], + [ + "ADD", + 30, + 28, + 1 + ], + [ + "ADD", + 29, + 31, + -1 + ], + [ + "ADD", + 28, + 26, + 1 + ], + [ + "ADD", + 27, + 29, + -1 + ], + [ + "ADD", + 26, + 24, + 1 + ], + [ + "ADD", + 25, + 27, + -1 + ], + [ + "ADD", + 24, + 22, + 1 + ], + [ + "ADD", + 23, + 25, + -1 + ], + [ + "ADD", + 22, + 20, + 1 + ], + [ + "ADD", + 21, + 23, + -1 + ], + [ + "ADD", + 20, + 18, + 1 + ], + [ + "ADD", + 19, + 21, + -1 + ], + [ + "ADD", + 18, + 16, + 1 + ], + [ + "ADD", + 17, + 19, + -1 + ], + [ + "ADD", + 16, + 14, + 1 + ], + [ + "ADD", + 15, + 17, + -1 + ], + [ + "ADD", + 14, + 12, + 1 + ], + [ + "ADD", + 13, + 15, + -1 + ], + [ + "ADD", + 12, + 10, + 1 + ], + [ + "ADD", + 11, + 13, + -1 + ], + [ + "ADD", + 10, + 8, + 1 + ], + [ + "ADD", + 9, + 11, + -1 + ], + [ + "ADD", + 8, + 6, + 1 + ], + [ + "ADD", + 7, + 9, + -1 + ], + [ + "ADD", + 6, + 4, + 1 + ], + [ + "ADD", + 5, + 7, + -1 + ], + [ + "ADD", + 4, + 2, + 1 + ], + [ + "ADD", + 3, + 5, + -1 + ], + [ + "ADD", + 2, + 0, + 1 + ], + [ + "ADD", + 1, + 3, + -1 + ], + [ + "SIGNED_SWAP", + 0, + 1 + ], + [ + "SIGNED_SWAP", + 2, + 3 + ], + [ + "SIGNED_SWAP", + 4, + 5 + ], + [ + "SIGNED_SWAP", + 6, + 7 + ], + [ + "SIGNED_SWAP", + 8, + 9 + ], + [ + "SIGNED_SWAP", + 10, + 11 + ], + [ + "SIGNED_SWAP", + 12, + 13 + ], + [ + "SIGNED_SWAP", + 14, + 15 + ], + [ + "SIGNED_SWAP", + 16, + 17 + ], + [ + "SIGNED_SWAP", + 18, + 19 + ], + [ + "SIGNED_SWAP", + 20, + 21 + ], + [ + "SIGNED_SWAP", + 22, + 23 + ], + [ + "SIGNED_SWAP", + 24, + 25 + ], + [ + "SIGNED_SWAP", + 26, + 27 + ], + [ + "SIGNED_SWAP", + 28, + 29 + ], + [ + "SIGNED_SWAP", + 30, + 31 + ] + ], + "prefix_pairs": 7, + "wrapper_sites": [ + 1, + 3, + 5, + 7, + 9, + 11, + 13, + 15, + 17, + 19, + 21, + 23, + 25, + 27, + 29, + 31 + ] +} diff --git a/research/p104-cut-stability/whole-caller/inputs/local.py b/research/p104-cut-stability/whole-caller/inputs/local.py new file mode 100644 index 0000000000..dbb3d56a4f --- /dev/null +++ b/research/p104-cut-stability/whole-caller/inputs/local.py @@ -0,0 +1,264 @@ +"""Replay the credited P104 word and its complete native interfaces. + +David Arias supplied the coalesced word. Cinna Davis supplied private reuse. +Gareth Davidson supplied their composition. Ali Romman prepared this caller +with substantial OpenAI Codex assistance. Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as Q +from functools import lru_cache +from hashlib import sha256 +from pathlib import Path +import gzip +import importlib.util +import json +import sys +import tarfile +import tempfile + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +PREFIX = 'research/p104-coalesced-private-reuse/' +GEOMETRY = ('research/complex-block-rank-optimum/inputs/selected.json.gz', + 'research/frame-sa504/inputs/hamming/PROTOTYPE.json', + 'research/p104-native-channel/inputs/P104-FIXTURE.json') + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +def read(path): + raw = path.read_bytes() + return json.loads(gzip.decompress(raw) if path.suffix == '.gz' else raw) + + +def load(path, name): + spec = importlib.util.spec_from_file_location(name, path) + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + + +def add(dst, src, q): + for k, v in tuple(src.items()): + value = dst.get(k, 0) + q*v + if value: + dst[k] = value + else: + dst.pop(k, None) + + +def span(basis): + out = {0} + for v in basis: + need(type(v) is int and 0 < v < 512 and v not in out, 'Independent binary basis') + out |= {x ^ v for x in tuple(out)} + return frozenset(out) + + +def construct(): + """Rebuild the published source without its obsolete owner-price engine.""" + manifest = read(ROOT / (PREFIX+'SOURCES.json')) + archive, = manifest['archives'] + raw = (ROOT / (PREFIX+'predecessor2152.tar.gz')).read_bytes() + need(sha256(raw).hexdigest() == archive['sha256'], 'Exact predecessor archive') + pins = {x['path']: x for x in archive['members']} + with tempfile.TemporaryDirectory(prefix='p104-source-') as tmp: + root = Path(tmp) + with tarfile.open(ROOT / (PREFIX+'predecessor2152.tar.gz')) as data: + members = data.getmembers() + need(len(members) == len(pins) == 11 and {m.name for m in members} == set(pins), 'Archive inventory') + for m in members: + need(m.isfile() and not Path(m.name).is_absolute() and '..' not in Path(m.name).parts, 'Archive file') + raw = data.extractfile(m).read() + need(sha256(raw).hexdigest() == pins[m.name]['sha256'], 'Archive member pin') + path = root/m.name + path.parent.mkdir(parents=True, exist_ok=True) + path.write_bytes(raw) + for path in GEOMETRY: + target = root/path + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes((ROOT/path).read_bytes()) + C = load(root/'research/p104-interleaved-search/coalesced.py', 'productive_p104_coalesced') + A = load(ROOT/(PREFIX+'compose.py'), 'productive_p104_composition') + built = A.construct(C, C.construct()) + need(built['report'] == read(ROOT/(PREFIX+'RESULT.json'))['composition'], 'Published complete source report') + frames, numbers = [], {} + def frame(basis): + key = tuple(basis) + if key not in numbers: + numbers[key] = len(frames) + frames.append(list(key)) + return numbers[key] + initial = [frame(C.F.basis(x)) for x in built['initial']] + final = [frame(C.F.basis(x)) for x in built['final']] + live = [r for r in range(112) if len(built['initial'][r]) == 2] + edges = built['transport_edges'] + program = [] + for e in built['scalar_operations']: + op = e['kind'] + if op == 'transport': + edge = edges[e['occurrence']] + program.append(['MOVE', edge['register'], frame(edge['source_frame']), frame(edge['target_frame']), edge['private']]) + elif op in ('private_init', 'private_discard'): + program.append(['INIT' if op == 'private_init' else 'CLEAR', e['register'], frame(e['frame'])]) + else: + program.append([{'add':'ADD', 'scale':'SCALE', 'private_copy':'COPY'}[op], *e['registers'], e['coefficient'], frame(e['frame'])]) + return {'schema':'p104-productive-source/1', 'public':735, 'live':live, 'ports':built['ports'], + 'frames':frames, 'initial':initial, 'final':final, 'program':program} + + +def replay(w): + need(len(w['program']) < 26000, 'Fixed operation bound') + frames = [span(x) for x in w['frames']] + rows = [{r:Q(1)} for r in range(743)] + current = list(w['initial']) + [None]*8 + paid, scalar, live_owned, peak = Counter(), 0, set(), 0 + for e in w['program']: + op, r = e[:2] + need(0 <= r < 743, 'Role index') + if op == 'MOVE': + _, r, a, b, private = e + need(current[r] == a and (r in live_owned) == private, 'Transport source and ownership') + need(frames[b] < frames[a] if private else frames[a] < frames[b], 'Nested chronological transport') + paid[abs(len(w['frames'][b])-len(w['frames'][a]))] += 1 + current[r] = b + elif op == 'INIT': + need(r >= 735 and r not in live_owned, 'Owned initialization') + live_owned.add(r) + peak = max(peak, len(live_owned)) + rows[r] = {} + current[r] = e[2] + scalar += 2 + elif op == 'CLEAR': + need(r in live_owned and current[r] == e[2], 'Owned erasure at declared frame') + rows[r] = {} + current[r] = None + live_owned.remove(r) + scalar += 2 + else: + q, f = Q(e[-2]), e[-1] + need(q and current[r] == f, 'Scalar destination and coefficient') + n, d = abs(q.numerator), q.denominator + need(d & (d-1) == 0, 'Dyadic scalar coefficient') + need(abs(q)+1 < 2**16, 'Fixed scalar growth bound') + if op == 'SCALE': + need(n & (n-1) == 0, 'Dyadic unit SCALE') + rows[r] = {k:q*x for k,x in rows[r].items()} + scalar += 2*(abs(n.bit_length()-d.bit_length()) + int(q < 0)) + else: + s = e[2] + need(s != r and 0 <= s < 743 and current[s] == f, 'Common scalar chart') + if op == 'COPY': + need(r in live_owned and not rows[r], 'COPY into cleared owned field') + rows[r] = {k:q*x for k,x in rows[s].items()} + else: + need(op == 'ADD', 'Scalar opcode') + add(rows[r], rows[s], q) + scalar += 2*(3+n.bit_length()-1+n.bit_count()+d.bit_length()-1) + need(not live_owned and peak == 1 and current[:735] == w['final'], 'All public and owned exits') + live = set(w['live']) + for r,row in enumerate(rows): + expected = {r:Q(1)} if r < 735 else {} + if r-112 in live: + expected[r-112] = Q(1) + need(row == expected, 'All 743 public and owned rows') + main = live | {r+112 for r in live} + helpers = Counter(len(w['frames'][w['final'][r]])-len(w['frames'][w['initial'][r]]) for r in range(735) if r not in main) + need(len(live) == len(w['ports']) == 104 and len(main) == 208 and min(helpers) > 0, 'Independent productive inputs') + return {'paid':dict(paid), 'helpers':dict(helpers), 'public_inputs':735, 'owned_lifetimes':8, + 'peak_owned_fields':peak, 'real_scalar_allowance':scalar, 'endpoint_coefficients':743*743} + + +def reverse_columns(w): + """Check the transpose with dense dyadic rows and the reverse chronology.""" + n = 743 + rows = [[int(i == j) for j in range(n)] for i in range(n)] + exponents = [0]*n + for e in reversed(w['program']): + op,r = e[:2] + if op == 'MOVE': + continue + if op in ('INIT','CLEAR'): + rows[r] = [0]*n + exponents[r] = 0 + continue + q = Q(e[-2]) + qe = q.denominator.bit_length()-1 + if op == 'SCALE': + rows[r] = [q.numerator*x for x in rows[r]] + exponents[r] += qe + else: + s = e[2] + level = max(exponents[s], exponents[r]+qe) + a, b = 1 << (level-exponents[s]), q.numerator << (level-exponents[r]-qe) + rows[s] = [a*x+b*y for x,y in zip(rows[s],rows[r])] + exponents[s] = level + if op == 'COPY': + rows[r] = [0]*n + exponents[r] = 0 + r = s + while exponents[r] and not any(x & 1 for x in rows[r]): + rows[r] = [x//2 for x in rows[r]] + exponents[r] -= 1 + for r,row in enumerate(rows): + expected = [0]*n + if r < 735: + expected[r] = 1 << exponents[r] + if r in w['live']: + expected[r+112] = 1 << exponents[r] + need(row == expected, 'Independent dense transpose columns') + return {'columns':n, 'coefficients':n*n, 'arithmetic':'Dense integer rows with binary denominators; reverse chronology'} + + +def native(w): + C = load(ROOT/'research/p104-native-channel/vendor/clifford_exact.py', 'p104_productive_clifford') + V = load(ROOT/'research/p104-native-channel/vendor/native_verify.py', 'p104_productive_gaussian') + @lru_cache(None) + def chart(i): + return C.canonical_frame(9, tuple(w['frames'][i])) + recipes = {} + def check(a,b): + if (a,b) not in recipes: + recipe,_ = C.lower_child(chart(a).adjoint().then(chart(b))) + expected = V.adjoint(V.frame(w['frames'][a],9)) + V.frame(w['frames'][b],9) + V.equal(V.recipe(recipe),expected,'Native chart change and exact global phase') + need(recipe['rank'] == abs(len(w['frames'][a])-len(w['frames'][b])), 'Native boundary rank') + recipes[a,b] = recipe + return recipes[a,b] + for e in w['program']: + if e[0] == 'MOVE': + check(e[2],e[3]) + main = set(w['live']) | {r+112 for r in w['live']} + helper_profile = Counter() + for r in range(735): + if r not in main: + helper_profile[check(w['initial'][r],w['final'][r])['rank']] += 1 + adapters = [] + for r,q in zip(w['live'],w['ports']): + need(w['frames'][w['initial'][r]] == [q], 'Literal central port') + need(span(w['frames'][w['final'][r+112]]) == frozenset(x for x in range(512) if not (x&q).bit_count()%2), 'Literal output hyperplane') + tests = [ + (C.cgate(9,q,1).adjoint().then(chart(w['initial'][r])), V.adjoint((('C',q,1),))+V.frame(w['frames'][w['initial'][r]],9)), + (chart(w['final'][r+112]).adjoint().then(C.cgate(9,q,-1).then(C.fourier(9))), V.adjoint(V.frame(w['frames'][w['final'][r+112]],9))+(('C',q,-1),)+V.fourier(9))] + for actual,expected in tests: + recipe,_ = C.lower_child(actual) + need(recipe['rank'] == 0, 'Free intrinsic main adapter') + V.equal(V.recipe(recipe),expected,'Main endpoint phase') + adapters.append(recipe) + bad = json.loads(json.dumps(next(iter(recipes.values())))) + bad['left']['phase'] = (bad['left']['phase']+1)%4 + a,b = next(iter(recipes)) + try: + V.equal(V.recipe(bad),V.adjoint(V.frame(w['frames'][a],9))+V.frame(w['frames'][b],9),'Wrong phase control') + except ValueError: + pass + else: + raise ValueError('Wrong native phase accepted') + payload = [[a,b,recipes[a,b]] for a,b in sorted(recipes)] + adapters + return {'distinct_maps':len(recipes),'main_adapters':len(adapters),'helper_normalizers':2*sum(helper_profile.values()), + 'helpers':dict(helper_profile),'recipe_payload_sha256':sha256(json.dumps(payload,sort_keys=True,separators=(',',':')).encode()).hexdigest(), + 'wrong_phase_rejected':True, 'proof':'Every signed Pauli image and exact global phase; frame induction at every positive tensor width'} diff --git a/research/p104-cut-stability/whole-caller/inputs/physical.json b/research/p104-cut-stability/whole-caller/inputs/physical.json new file mode 100644 index 0000000000..e8f5aa076b --- /dev/null +++ b/research/p104-cut-stability/whole-caller/inputs/physical.json @@ -0,0 +1,48 @@ +{ + "central_square_columns": 53248, + "full_calls": 18, + "main_targets": { + "17": 416, + "25": 416, + "33": 416, + "41": 416, + "49": 416, + "57": 416, + "65": 416, + "73": 208, + "145": 208 + }, + "new_paid_jobs": 0, + "physical_contacts": 7488, + "ports": 104, + "route_payload_sha256": "7f4f0ca768ffbc4f93dcff575592c4c67411f46b4289e45b73f715a2ad47b142", + "tensor_rule": "Factorwise native maps; scalar signs stay outside the tensor power.", + "whole_idle_jobs": { + "16": 416, + "24": 416, + "32": 416, + "40": 416, + "48": 416, + "56": 416, + "64": 416, + "72": 208 + }, + "wrapper_sites": [ + 1, + 3, + 5, + 7, + 9, + 11, + 13, + 15, + 17, + 19, + 21, + 23, + 25, + 27, + 29, + 31 + ] +}