diff --git a/research/p104-contact-independent-audit/CAPSULE-INVENTORY.json b/research/p104-contact-independent-audit/CAPSULE-INVENTORY.json new file mode 100644 index 0000000000..82ea6df830 --- /dev/null +++ b/research/p104-contact-independent-audit/CAPSULE-INVENTORY.json @@ -0,0 +1,34 @@ +{ + "schema": "byte-preserved-audit-capsule/v1", + "files": { + "expected/contact-ceiling.json": "3c4d8db5a9695924027f5801901b55cefe0cdc5ea07450aaf396de7e5887e608", + "expected/native.json": "34299df26387b69f1a89cc52d52cae3add51f4e12c0715e0de38d42fab302c9f", + "capsule/outputs/economic-sensitivity-feasibility-20261025/interval_math.py": "14f28d0358c11d55683984f1037c23d58f7d8c9d69b8e23503545b0519246ab4", + "capsule/outputs/p104-native-contact-audit-20261025/check.py": "43fd40847a0853c0ac511d58ce77ef822a5c6dd1b25f662f01cefaa3196a2f7d", + "capsule/outputs/p104-native-contact-audit-20261025/INPUTS.json": "ae975357dc858791d122579425525625b34039dca664be9a43e0738921dc3315", + "capsule/outputs/p104-contact-reassessment-20261025/check.py": "c4963f22cc862e9b75db01097968d56b3222f64ee796679b0b6ba810a8e6a19c", + "capsule/outputs/p104-contact-reassessment-20261025/RESULT-normal.json": "3c4d8db5a9695924027f5801901b55cefe0cdc5ea07450aaf396de7e5887e608", + "capsule/outputs/p104-contact-reassessment-20261025/PAIR-RECEIPT.json": "d9f284021cb5f2757b05cbf5f979f5ba7cf7372993d65a2e060002aca7841fa8", + "capsule/outputs/p104-contact-reassessment-20261025/INPUTS.json": "5c3061c48cfc2a408cafe3e23f1050db0cc529179758b918547e9ed06bd3147a", + "capsule/outputs/p104-native-contact-audit-20261025/sources/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "capsule/outputs/p104-native-contact-audit-20261025/sources/native_verify.py": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38", + "capsule/outputs/p104-contact-reassessment-20261025/sources/contact/VERIFY.json": "4543e838e81dff7cceb7f539a94eedbd891ed5330518e55e997ba93ec4f51356", + "capsule/outputs/p104-contact-reassessment-20261025/sources/contact/verify.py": "24074e4e954cf455b207ff346c7d983d51c06e1fa967747bc98e8f24f5bd1f80", + "capsule/outputs/p104-contact-reassessment-20261025/sources/contact/PROOF.md": "1961e8b8be133cee19ec2523f6ba40da02905444a8c9601e97f66627b1129b32", + "capsule/outputs/p104-contact-reassessment-20261025/sources/contact/WORD.json.gz": "a1e416add9d2bb44fce923111ebc50513e5d845e56aabe214f2f0bc7d5f2b45d", + "capsule/outputs/p104-contact-reassessment-20261025/sources/contact/TASK.json": "ae1aff13f641c94a977599c1946dd0ff678daae51aad83662aa7056626e0dee6", + "capsule/outputs/p104-contact-reassessment-20261025/sources/contact/RESULT.json": "b1dc682a4d9db5a726fbdf5c05c081f3c9ff9816829e5d8c900db1904a1f98c1", + "capsule/outputs/p104-contact-reassessment-20261025/sources/contact/SOURCES.json": "42a7f956bf450c15a92449e285bd2b355159cc99e78bc1d815a4b902221ab89f", + "capsule/outputs/p104-contact-reassessment-20261025/sources/contact/README.md": "19fec538e0eae59eeef90099ab220bef820467272410533fc95ee6236f44c4cd", + "capsule/outputs/p104-contact-reassessment-20261025/sources/contact/construct.py": "b95eeb2c21c9e2d97d9a441483aa398e38eba65ecec57241bce77cd1234682d0", + "capsule/outputs/p104-contact-reassessment-20261025/sources/contact/pricing.py": "f74461d08c1cfdb9d500ac4f0da11f1b2d66a149bb342145b9aab9df703017a9", + "capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/caller.py": "300d40043953e4f6aecfde8f2d1004b8ad6dc5a79ec3c7666c9908c2466c91c8", + "capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/WORD.json.gz": "e5e955d7c9d5ea5dfea49c0e093037df577aa43813dcad5427ebca41a4ad35ec", + "capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/CONTROLLER.json": "a84f6bbd547379597464e56c420cc665f96bc43a9a1351eed4b7cd0fce3cc4b9", + "capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/price.py": "e46c1264c4acb037bae4df36ccdf3386980ef3d178aa7f0607dbd3f3333ed139", + "capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/PROOF.md": "f4c4e400092954562252df6c4dd157a9b4c1642252168ce72738cdbecfc5ad41", + "capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/RESULT.json": "03e9f8424b9166899d3ae3b188d9defb851162a3183ecab237fb783d78216782", + "capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/local.py": "878734dfd64c4b9d362d0ae476cc5c2a19fe93e48b7378763b23f3e0dd0a5a71", + "capsule/swarm-price-plane-20261023T112711Z/coordination/run_guarded.py": "720153b7491acede2c66bdc2dfd3174653195fa3222ec3589d0671c406a5bad8" + } +} diff --git a/research/p104-contact-independent-audit/CEILING.md b/research/p104-contact-independent-audit/CEILING.md new file mode 100644 index 0000000000..0f7e2ba26e --- /dev/null +++ b/research/p104-contact-independent-audit/CEILING.md @@ -0,0 +1,43 @@ +# Ceiling for the frozen-target H1+H5 to H6 family + +Freeze PR5545's complete targets and all other costs. Let H_r(C)=r^(1−C). +Only further H1+H5→H6 replacements are allowed. Each consumes one H5 and +creates none. There are107 per local word and18 calls, so at most1926 global +edits. Grant all a legal independent implementation at no additional cost. +This is a relaxation, not source feasibility evidence. + +At C=.0033 the current signed moment is near−64.23498004898747535. Each edit +gains.00888683048950051237. It needs at least7229 edits, exceeding1926. The +all-edits relaxed invoice still has moment near−47.11894452620948852. +Complete outward intervals and threshold checks: expected/contact-ceiling.json. + +Its unique raw crossing is + +`3106074473/10^12 < C_* < 3106074474/10^12`. + +This cannot fund κ=.0033 under the retained supplier-to-outer convention. +It does not bound different edits, targets, callers or P104 generally. + +For uniqueness, put t=1−C and divide by6^t. Signed rank1..9 coefficients are +(-43338,-10026,-7002,-1098,+648,-2232,+198,+2196,+5274). Only the positive +rank-five term has an adverse derivative below6. On0≤t≤1, the positive +rank-one derivative is at least(43338/6)log6>7223; the adverse magnitude is +at most648log(6/5)<648/5. Other low terms increase. High terms are416 copies +of((r+1)/6)^t−(r/6)^t for r=16,24,…,64,208 at r=72, and208 copies of(145/6)^t. +Their derivatives are positive since x^t logx increases for x>1,t≥0. +The normalized moment strictly increases in t. Its C=0 rank surplus is760 +and C=1 count deficit−55172. It has one crossing and remains negative beyond +that saving. Fewer edits have still smaller moment for0=735 and dst not in active,'owned entry only') + active.add(dst) + rows[dst]={} + charts[dst]=event[2] + peak=max(peak,len(active)) + elif op=='CLEAR': + need(dst in active and charts[dst]==event[2],'live owned clear') + active.remove(dst) + rows[dst]={} + charts[dst]=None + else: + coefficient,chart=Q(event[-2]),event[-1] + need(coefficient!=0 and charts[dst]==chart,'scalar chart/coefficient') + if op=='SCALE': + rows[dst]={k:coefficient*v for k,v in rows[dst].items()} + else: + need(op in ('ADD','COPY'),'known scalar instruction') + src=event[2] + need(src!=dst and charts[src]==chart,'common source chart') + if op=='COPY': + need(dst in active and not rows[dst],'COPY into owned zero') + rows[dst]={k:coefficient*v for k,v in rows[src].items()} + else: + rows[dst]=add(rows[dst],rows[src],coefficient) + need(not active and peak==1 and charts[:735]==word['final'],'complete public and owned frames') + live=set(word['live']) + for i,row in enumerate(rows): + target={i:Q(1)} if i<735 else {} + if i-112 in live: + target[i-112]=Q(1) + need(row==target,'all743 exact endpoint rows') + helpers=Counter(dims[word['final'][i]]-dims[word['initial'][i]] + for i in range(735) if i not in live and i-112 not in live) + need(sum(helpers.values())==527 and min(helpers)>0,'527 independent productive helpers') + return paid,helpers + + +def invoice(local_paid,helpers,controller): + p,t=Counter(),Counter() + counts=Counter() + for e in controller['physical_events']: + counts[e[0]]+=1 + if e[0]=='LOCAL': + need(e[3] is False,'forward invocation at every full site') + p.update(local_paid) + t.update(helpers) + elif e[0]=='QUERY_SHEAR': + p[1]+=104 + elif e[0]=='IDLE': + need(len(e[2])==len(set(e[2])),'distinct idle stages') + p[8*len(e[2])]+=208 + for term in controller['diagonal']: + t[1+8*sum(term[1:])]+=104 + need(counts['LOCAL']==18 and counts['QUERY_SHEAR']==counts['IDLE']==15 and + len(controller['diagonal'])==32,'literal complete occurrence map') + return p,t + + +def main(): + for name,sha in PINS['files'].items(): + need(hashlib.sha256((ROOT/name).read_bytes()).hexdigest()==sha,'source pin '+name) + source=read(B/'sources/predecessor/WORD.json.gz') + emitted=read(B/'sources/contact/WORD.json.gz') + modified,windows=contact(source) + need(modified==emitted,'independently emitted word equals full committed JSON') + old_p,old_t=replay(source) + new_p,new_t=replay(modified) + delta=Counter(new_p);delta.subtract(old_p) + need({r:n for r,n in delta.items() if n}=={1:-1,5:-1,6:1},'local paid delta') + need(new_t==old_t,'all helper targets retained') + controller=read(B/'sources/predecessor/CONTROLLER.json') + old_P,old_T=invoice(old_p,old_t,controller) + P,T=invoice(new_p,new_t,controller) + published=read(B/'sources/contact/RESULT.json') + prior=read(B/'sources/predecessor/RESULT.json') + for saved,p,t in [(published,P,T),(prior,old_P,old_T)]: + costs=saved['complete_cost'] + need(p==Counter({int(r):n for r,n in costs['paid'].items()}) and + t==Counter({int(r):n for r,n in costs['targets'].items()}),'complete saved invoice') + need(T==old_T,'zero complete target delta') + spec=importlib.util.spec_from_file_location('earlier_interval_engine',ROOT/'outputs/economic-sensitivity-feasibility-20261025/interval_math.py') + im=importlib.util.module_from_spec(spec);spec.loader.exec_module(im) + power=lru_cache(None)(im.power) + + def moment(p,t,c): + lo=hi=Q(0) + for r in set(p)|set(t): + n=t[r]-p[r] + if n: + a,b=power(r,c) + lo+=n*(a if n>0 else b) + hi+=n*(b if n>0 else a) + return lo,hi + + def display(pair): + return im.interval(*pair) + + root_lo,root_hi=map(Q,published['complete_cost']['raw_root_interval']) + need(moment(P,T,root_lo)[0]>0 and moment(P,T,root_hi)[1]<0,'published raw crossing independently bracketed') + C=Q('.0033') + current=moment(P,T,C) + g=moment(Counter({6:1}),Counter({1:1,5:1}),C) + need(current[1]<0 and g[0]>0,'target deficit and strict single-edit gain') + limit=P[5] + maxed=Counter(P) + maxed[1]-=limit;maxed[5]-=limit;maxed[6]+=limit + ceiling=moment(maxed,T,C) + need(ceiling[1]<0,'even every rank5 edit misses target') + # Exact sufficient derivative bound for uniqueness of the optimistic-family + # crossing after division by6^t; see the paper derivation in the report. + signed=Counter(T);signed.subtract(maxed) + need(signed[1]<0 and signed[2]<0 and signed[3]<0 and signed[4]<0 and signed[5]>0, + 'only adverse normalized derivative below6 is rank5') + need(all(signed[r]>0 for r in (7,8,9)),'positive local high-rank terms') + need(Q(-signed[1],6)>Q(signed[5],5),'rank1 derivative dominates adverse rank5 term on0<=t<=1') + need(all(T[r+1]==P[r] for r in (16,24,32,40,48,56,64,72)), 'positive paired tail derivative') + grid=10**12 + lo,hi=0,10**10 + need(moment(maxed,T,Q(lo,grid))[0]>0 and moment(maxed,T,Q(hi,grid))[1]<0,'optimistic-family root bracket') + while hi-lo>1: + mid=(lo+hi)//2 + pair=moment(maxed,T,Q(mid,grid)) + need(pair[0]>0 or pair[1]<0,'strict bisection decision') + if pair[0]>0:lo=mid + else:hi=mid + need(moment(maxed,T,Q(lo,grid))[0]>0 and moment(maxed,T,Q(hi,grid))[1]<0,'strict family ceiling enclosure') + ceil=lambda x:-(-x.numerator//x.denominator) + required=[ceil(-current[1]/g[1]),ceil(-current[0]/g[0])] + need(required[0]==required[1] and required[0]>limit,'required edit count exceeds inventory') + + rank_mass=sum(r*n for r,n in new_p.items()) + need(rank_mass==5894,'preserved local paid rank mass') + q,rem=divmod(rank_mass,9) + relaxed_local=Counter({9:q}) + if rem:relaxed_local[rem]+=1 + relaxed=Counter(P) + relaxed.subtract({r:18*n for r,n in new_p.items()}) + relaxed.update({r:18*n for r,n in relaxed_local.items()}) + need(min(relaxed.values())>=0,'only local calls replaced in broad relaxation') + broad=moment(relaxed,T,C) + need(broad[0]>0,'broader rank-mass relaxation is not economically excluded') + costs=published['complete_cost'] + compiler=costs['compiler'];H=compiler['H'];j=compiler['integer_test_exponent'] + gap=Q(compiler['gap']);step=gap.denominator + need(gap.numerator==1 and H==step*j and (H+1)**1000<2**j and + (step*(j-1)+1)**1000>=2**(j-1),'reported integer compiler threshold and preceding grid failure') + need(735==source['public']==emitted['public'] and len(source['program'])==25311 and + len(emitted['program'])==25310,'unchanged source contract within fixed26000 event budget') + + controls={} + for name,change in [('one_operand_only',lambda w:w['program'][16798].__setitem__(3,240)), + ('wrong_sign',lambda w:w['program'][16800].__setitem__(3,'1'))]: + bad=deepcopy(modified);change(bad) + try:replay(bad) + except (ValueError,IndexError,TypeError):controls[name]='rejected' + else:raise ValueError('control accepted '+name) + bad=deepcopy(source);bad['program'][16801]=['ADD',400,341,'1',240] + try:contact(bad) + except ValueError:controls['intervening_source_read']='rejected' + else:raise ValueError('undeclared read accepted') + controls['target_loss_reverses_credit']='explicit full target equality checked' + result={'schema':'p104-focused-contact-audit/v1','reviewed_head':PINS['reviewed_head'], + 'source_windows':windows,'source_events':len(source['program']),'new_events':len(modified['program']), + 'independent_normalized_endpoint_rows':743,'coefficients_including_zeros':743**2, + 'source_endpoint':'pass','changed_endpoint':'pass','owned_returns':'pass', + 'native_phase_and_allwidth':'inherited chart identity; not freshly replayed', + 'local_paid_before':dict(old_p),'local_paid_after':dict(new_p), + 'complete_paid_before':dict(old_P),'complete_paid_after':dict(P),'complete_targets':dict(T), + 'compiler_integer_threshold_only_checked':H, + 'funding_scope':'complete native/precision/compiler theorem and58outer obligations not independently admitted here', + 'C_probe':str(C),'current_moment_at_target':display(current), + 'one_1plus5_to6_edit_gain_at_target':display(g), + 'remaining_global_edit_inventory':limit,'remaining_identical_local_contacts_upper':new_p[5], + 'required_global_edits_at_target':required[0], + 'required_identical_contacts_per18sites':ceil(Q(required[0],18)), + 'all_remaining_edits_moment_at_target':display(ceiling), + 'all_remaining_edits_raw_ceiling_interval':[str(Q(lo,grid)),str(Q(hi,grid))], + 'ceiling_monotonicity':'after division by6^t, rank1 dominates only adverse rank5 derivative; paired high tails positive', + 'broader_relaxed_local_profile':dict(relaxed_local), + 'broader_relaxed_moment_at_target':display(broad), + 'broader_relaxation_physical_witness':False,'controls':controls, + 'new_kappa':None,'stop':True} + print(json.dumps(result,sort_keys=True,separators=(',',':'))) + + +if __name__=='__main__':main() diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/PROOF.md b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/PROOF.md new file mode 100644 index 0000000000..013734fb2c --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/PROOF.md @@ -0,0 +1,169 @@ +# One full-frame contact in the productive P104 caller + +This package changes one contact in the exact word of +[PR5544](https://github.com/CrocSwap/integer-mult-bounds/pull/5544), at +`e2a6cce2f9db5a2c5f9714f4b9e5292dd3a10581`. The new conditional endpoint is +`kappa = 304117/100000000 = .00304117`. The gain over PR5544 is +`3/5000000 = .00000060`. The selected record stays unchanged. + +The five source assumptions remain: native all-column implementation, +owned erasure, the uniform compiler, precision and tape costs, and analytic +recovery. The ideal operator proof and the complete conditional price are +given below. The enormous uniform word and the rounded integer multiplier +are not materialized. + +## Exact source change + +Let `A=span(30,70,429)`, `B=span(13,19,70,416)`, and `D=F_2^9`. +These are source frames 739, 240 and 127, with `A < B < D` and dimensions +3, 4 and 9. The zero-based source events are: + +| Event | Source instruction | +| --- | --- | +| 16798 | Move register 345 from A to B | +| 16799 | `341 -= 345`, in B | +| 16800 | `341 *= -1`, in B | +| 17061 | Move register 341 from B to D | +| 17067 | Move register 345 from B to D | + +Register 341 is already in B at event 16798. It has no other read or write +before event 17061. Register 345 has no other read or write between events +16798 and 17067. The constructor checks the complete intervening event lists, +including source operands. Other registers can retain their original order. + +Replace event 16798 by moves `341: B -> D` and `345: A -> D`. Run events +16799 and 16800 in D. Remove events 17061 and 17067. Keep all other events +byte-equivalent as JSON records. The scalar coefficients, scalar order, +public boundaries, independent inputs and owned lifetimes stay the same. +The word has 25,310 events, one fewer than the source. + +## Uniform operator identity + +Use the source chart Phi_V at frame V. Put +`T_VU = Phi_V Phi_U^(-1)`. On logical values x and y, the old two-register +fragment ends with + +```text +register 341: Phi_D (y - x) +register 345: Phi_D y. +``` + +The new fragment first places both values in chart D, then performs the same +subtraction and sign. It has exactly these outputs. Equivalently, a common +linear transport on both operands commutes with a scalar ADD and SCALE. +The checked read intervals permit this equality inside the complete word. +The next reads of each register use D in both words. + +For every positive digit-column count, replace each chart by its prescribed +tensor power. The common-chart identity is still valid. Scalar coefficients +remain outside tensor powers. No sum of operators is tensor-powered. +The source native compiler lowers every candidate MOVE and helper boundary. +Its separate Gaussian interpreter checks signed Pauli images and absolute +phase. In particular, the new `A -> D` child has rank six, with its actual +monomial adapters. It is not an uncharged change of coordinates. + +The sparse rational interpreter checks all 743 endpoint rows. The independent +reverse interpreter uses dense integer columns and binary denominators. Both +cover all 552,049 public and owned coefficients. All 735 public inputs remain +arbitrary. The eight owned lifetimes still start and return at the declared +zero states, with peak occupancy one. + +## Complete cost and transfer + +The old fragment pays H1 + 2H5. The replacement pays H5 + H6. Thus + +```text +local paid delta: -H1 - H5 + H6 +complete paid delta: -18H1 - 18H5 + 18H6 +target delta: zero at every rank. +``` + +For `0 < t < 1`, strict subadditivity gives `6^t < 1 + 5^t`. Therefore the +complete signed recursive moment is strictly smaller at every such power. +Rank mass is unchanged. The standard signed-invoice comparator gives the +same conclusion for the actual complete histograms. This comparison uses +all helper targets and all thin and idle jobs, not a local cost alone. + +The new local profile is + +```text +{1:2428, 2:557, 3:389, 4:112, 5:107, 6:17, 7:13, 9:1}. +``` + +All 527 helper targets keep their source ranks +`{4:51, 5:36, 7:24, 8:122, 9:294}`. The 104-port caller, both orientations, +its 18 forward source invocations, 15 thin queries, 15 whole idles and +32 main banks are unchanged. The source's signed exchanges and central-square +translations still supply all backward interfaces. The full bill has 69,912 +paid calls and 12,814 productive fields, with rank surplus 760. The unused +helper 711 keeps both its paid H9 and its productive H9. + +`pricing.py` adapts the pinned PR5544 price engine. Its only mathematical +changes are the new paid-call count, claimed and tested endpoints, and the +comparison endpoint. It recomputes both complete histograms by two counts, +the raw crossing with rational intervals, and a second independent moment +enclosure. The tested saving is `.003041171`. Cutoff 17, floor 18, tail offset +1/5, reserve `10^-10`, power 1024 and logarithm power 1000 remain fixed. +All completion, splitting, capacity, compiler-grid, BIT-stock and 58 outer +predicates must pass. `RESULT.json` records their exact rational values. +The fixed-invoice crossing and its remaining headroom are reported there; +no global optimum or exclusion of other words is claimed. + +The new crossing is in `(.00304117181649, .00304117181650)`. Its increase +over the source crossing is in `(.00000059374018, .00000059374020)`. +The claimed endpoint is below the new crossing by between +`.00000000181649` and `.00000000181650`. The strict compiler gap is +`1/7000000000`; its independently checked integer height is +`H=337848000000000`, with test exponent 48264. The previous grid point fails. +The stated endpoint gain `.00000060` also reflects the different safety +margins below the two crossings; it is not the exact raw-root difference. + +This mixed-target caller is outside the historical fixed-rank packing model +in `research/complex-local-word-ceiling/ceiling.py`. It retains independent +productive helpers and targets of unequal ranks, rather than one target rank +and the old hosted coverage law. The replacement bound is the exact crossing +of this complete fixed invoice. The endpoint attains between +99.9999402697% and 99.9999402701% of that crossing. + +For this invoice the crossing is unique for `0 < kappa < 1`. To see this, +put `t=1-kappa` and divide its signed moment by `6^t`. The signed coefficients +at ranks 1 through 6 are negative; those at ranks 7 through 9 are positive. +Each of these normalized terms increases with t, except the constant rank-six +term. The other terms are 416 copies of `((r+1)/6)^t-(r/6)^t` for +`r=16,24,...,64`, 208 copies at r=72, and `208*(145/6)^t`. +They also increase for `t >= 0`: the derivative of each difference is positive +because `x^t*log(x)` increases for `x > 1`. The full normalized moment is +strictly increasing. Its values at t=0 and t=1 have opposite signs, since +the count difference is -57,098 and the rank surplus is 760. Thus the upper +crossing endpoint bounds the saving allowed by this fixed invoice. It does +not bound a changed word, caller, target contract or invoice. + +The local scalar program is unchanged. There is one fewer native call and +no new owned field. Native ranks stay at most nine locally; complete maximum +target and child ranks stay 145 and 72. The source's finite bound of fewer +than 26,000 events, scalar growth factor below `2^16` per event and total +local Gaussian rank 5,894 still applies. These bounds fund the reordered +prefix as well as the old prefix. All caller routes, private COPY paths, +returns, normalizers and matching remain in the complete ordinary allowance. +No precision or machine-operation cost is set to zero. + +## Controls and limits + +The checker rejects a one-operand retiming, a changed subtraction sign, an +intervening source read and an omitted paid charge. It also reruns the source +caller controls, exact phase control and adverse compiler/outer controls. +The dependency hashes are checked before the source modules are imported. + +These are author-side exact checks. They are not independent human review or +a proof-kernel verification. The source interpreters and mathematical +framework remain credited dependencies. No merge or selected-frontier update +is part of this contribution. + +Credit Ali Romman's PR5544 for the productive caller; Gareth Davidson's +PR2305, David Arias's PR2152 and Cinna Davis's PR2219 for the composed word. +The P104 shared-chart and dual-ADD retiming packages already use the standard +two-operand identity. The new result is this literal contact and its complete +conditional endpoint. Retain Jacob Alan Sussman's productive recursion, +Cinna Davis's controller, zxv's compiler and outer machinery, Cao Yifan's +pricing lineage, and all geometry, native, COPY and analytic source notices. +Prepared by Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/README.md b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/README.md new file mode 100644 index 0000000000..ace72d1358 --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/README.md @@ -0,0 +1,82 @@ +# Conditional kappa .00304117 from one P104 contact + +This contribution increases complete conditional kappa from **.00304057 in +[PR5544](https://github.com/CrocSwap/integer-mult-bounds/pull/5544)** to +**.00304117**, a gain of **.00000060**. It changes the recursive paid profile. +The selected record remains .003027288235 and is not edited. + +The change moves the subtraction on registers 341 and 345, and its sign, +from a four-dimensional frame to the full nine-dimensional frame. It replaces +H1 + H5 by H6 in each of 18 local calls. All scalar coefficients, public +boundaries, independent outputs and owned lifetimes remain unchanged. +The full bill has **69,912 paid calls and 12,814 productive fields**. + +Read [the proof](PROOF.md), [the five-site constructor](construct.py), +[the full receipt](RESULT.json), [the emitted word](WORD.json.gz), and +[the exact source pins](SOURCES.json). The raw crossing and remaining headroom +are recorded in the receipt. No global optimum is claimed. + +This is a focused successor to the released PR5544 at +`e2a6cce2f9db5a2c5f9714f4b9e5292dd3a10581`. Its original commit remains the +parent. The predecessor package is unchanged and is required for replay. +The research started at canonical main +`32890bc5de034ab8fc93ac88ead7279a6a416d04`, priority revision 7. + +## Replay and evidence + +Python 3.12 and the standard library suffice: + +```sh +python3 -B scripts/research_package.py --package research/p104-full-frame-contact +``` + +The scientific marker is `PASS_P104_CONTACT_COMPLETE_KAPPA_00304117`. +The normal and optimized commands reconstruct the source, apply the literal +change, check all 552,049 public/owned coefficients by two interpreters, check +all native maps and target phases, replay the complete physical caller and +compute both full histograms. Two rational moment engines, all compiler and +stock bounds, and all 54 strict plus four functional outer predicates run. +Controls reject a one-sided move, wrong sign, undeclared source read and +omitted cost. Saved compressed words are compared by decompressed JSON. + +[VALIDATION.md](VALIDATION.md) records the checks actually run and their limits. +The standard signed-invoice preflight is also recorded there. The first +search was a bounded common-contact descent on the exact source; the final +constructor contains only the one verified replacement, not that search. + +The five native all-column, owned-erasure, compiler, precision/tape and +analytic-recovery assumptions of PR5544 remain. The enormous uniform word and +complete rounded multiplier are not materialized. No independent human or +proof-kernel acceptance is claimed. The source libraries are inherited, +although their candidate checks run again. + +## Open next questions + +Independent review should check the five edited sites, source-read intervals, +all-width chart identity and complete cost join. Start with the literal +constructor and the before/after invoices. Human or proof-kernel acceptance +is still absent. A later cost improvement must change a paid path or target +contract and pass the same full checks; more digits of this crossing are not +another structural gain. See [TASK.json](TASK.json) for the structured handoff. + +## Credit + +Ali Romman's [PR5544](https://github.com/CrocSwap/integer-mult-bounds/pull/5544) +supplies the productive caller, two scalar interpreters and full price engine. +Gareth Davidson (@bitplane) supplied +[PR2305](https://github.com/CrocSwap/integer-mult-bounds/pull/2305), which joins +David Arias's (@DavidAriasC) +[PR2152](https://github.com/CrocSwap/integer-mult-bounds/pull/2152) coalesced word +and Cinna Davis's (@1337isnot1337) +[PR2219](https://github.com/CrocSwap/integer-mult-bounds/pull/2219) private reuse. +The retained [shared-chart retiming](../p104-shared-chart-retiming/README.md) +and [dual-ADD retiming](../p104-dual-add-retiming/README.md) already give the +two-operand transport method. This package claims the new source contact and +its complete conditional endpoint, not that general identity. + +Retain Jacob Alan Sussman, Cinna Davis, zxv, Cao Yifan and all geometry, +scalar, native, COPY, compiler, precision and analytic authors in the +[predecessor proof](../p104-productive-controller/PROOF.md) and +[native notices](../p104-native-channel/notices). +Prepared by Ali Romman with substantial OpenAI Codex assistance; no subagents. +New work is Apache-2.0. diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/RESULT.json b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/RESULT.json new file mode 100644 index 0000000000..a4daa8e3f1 --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/RESULT.json @@ -0,0 +1,326 @@ +{ + "complete_cost": { + "compiler": { + "H": 337848000000000, + "N": "2^337848000000000", + "eta": { + "lower": "0.000000185282065079605829383859", + "upper": "0.000000185282065079605829383860" + }, + "gap": "1/7000000000", + "integer_test_exponent": 48264, + "logarithm_power": 1000, + "theta": "63/64", + "uniform_saving": "5322049/1750000000", + "word_materialized": false + }, + "full_forward_calls": 18, + "gain": "3/5000000", + "kappa": "304117/100000000", + "kappa_decimal": ".00304117", + "margin_at_previous": { + "lower": "0.149437868133364955605863720182", + "upper": "0.149437868133364955605863720183" + }, + "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": "1742999999253/1750000000000", + "fixed_halo_explicit_metadata_branch": "134750000001/1750000000", + "new_BIT_row_stock_sublinear_in_active_group": "6978999997009/7000000000000", + "new_semantic_group_guard": "3/7000000000" + }, + "margins": { + "boundary_algebraic_matrix": "149017357978711807/49000000000000000000", + "fused_gaussian": "149017357936135421/49000000000000000000", + "global_coordinate_router": "10644097/3500000000", + "group_bit_router": "74508682468067709/24500000000000000000", + "group_scans": "3499999999/3500000000", + "main_transform": "149017350978711807/49000000000000000000", + "microbox_face_corrections": "134750000001/1750000000", + "polynomial_products": "6999999999/7000000000", + "sparse_union_movement": "20055267357978711807/49000000000000000000" + }, + "parameters": { + "a": "10644097/3500000000", + "b": "4257639/1400000000", + "beta": "6999999997/7000000000", + "bit_saving": "17/5000", + "cap_xi": "44555267350978711807/49000000000000000000", + "complex_uniform_saving": "5322049/1750000000", + "d": "1/7000000000", + "epsilon": "6999999999/7000000000", + "kappa": "304117/100000000", + "lambda_": "1993917659/2000000000", + "lambda_prime": "6978711807/7000000000", + "layout": "1/7000000000", + "q": "21288193/7000000000", + "r0": "1/70000000000", + "stop": "1/7000000000", + "tested_saving": "3041171/1000000000" + }, + "strict_checks": { + "actual_bit_above_effective": "1255903/3500000000", + "actual_logarithmic_gamma_guard": "1/7000000000", + "actual_logarithmic_group_guard": "4444732659521288193/24500000000000000000", + "alpha_logarithm_absorption": "1/70000000000", + "boundary_algebraic_matrix_above_kappa": "27978711807/49000000000000000000", + "cap_above_band": "20055267350978711807/49000000000000000000", + "cap_below_cell": "4444732642021288193/49000000000000000000", + "cap_below_phase_cell_power": "53444732649021288193/49000000000000000000", + "complex_above_effective": "1/7000000000", + "complex_below_one_over_32": "39492361/1400000000", + "complex_endpoint": "1/3500000000", + "epsilon_below_one": "1/7000000000", + "epsilon_positive": "6999999999/7000000000", + "fine_prime_halo_umbrella": "7/2", + "fused_gaussian_above_kappa": "27936135421/49000000000000000000", + "gaussian_above_main": "3478711807/24500000000000000000", + "global_coordinate_router_above_kappa": "1/1750000000", + "global_gamma_power_slack": "9/70000000000", + "group_below_dimension": "1/3500000000", + "group_bit_router_above_kappa": "17468067709/24500000000000000000", + "group_gauge_power_slack": "4444732659171288193/24500000000000000000", + "group_key_fits_record": "1/3500000000", + "group_positive": "6999999997/7000000000", + "group_scans_above_kappa": "27260593/27343750", + "halo_covers_generic_inverse_radius": "5", + "improvement_over_user_baseline": "655099790400418148631/500000000000000000000000", + "lambda_above_internal": "1/14000000000", + "lambda_above_sigma": "3/14000000000", + "lambda_above_tau": "1/14000000000", + "lambda_prime_above_lambda": "1/14000000000", + "lambda_prime_above_leaf": "2795742361/9800000000000000000", + "leaf_saving_above_effective": "1395742361/9800000000000000000", + "main_transform_above_kappa": "20978711807/49000000000000000000", + "membership_arithmetic_fits_record": "1/7000000000", + "microbox_face_corrections_above_kappa": "269489355907/3500000000", + "microbox_halo_volume": "553000000003/7000000000", + "new_complex_uniform_saving_above_b": "1/7000000000", + "new_semantic_guard_with_C1_one": "1/7000000000", + "polynomial_products_above_kappa": "6978711809/7000000000", + "positive_layout_slack": "1/7000000000", + "q_below_effective": "1/7000000000", + "q_below_internal": "1/7000000000", + "q_below_leaf": "2795742361/9800000000000000000", + "q_positive": "21288193/7000000000", + "short_record_fallback": "1395742361/1400000000", + "source_axis_superpolynomial": "1/7000000000", + "sparse_union_movement_above_kappa": "19906250027978711807/49000000000000000000", + "stop_below_one": "6999999999/7000000000", + "stop_positive": "1/7000000000", + "strassen_integer_power_gap": "1951441519231", + "support_router_span": "3/7000000000", + "theta_positive_polynomial_power": "2", + "union_header_fits_record": "3/7000000000", + "union_tag_work_per_visit_fits_record": "3/7000000000" + } + }, + "paid": { + "1": 45264, + "16": 416, + "2": 10026, + "24": 416, + "3": 7002, + "32": 416, + "4": 2016, + "40": 416, + "48": 416, + "5": 1926, + "56": 416, + "6": 306, + "64": 416, + "7": 234, + "72": 208, + "9": 18 + }, + "paid_calls": 69912, + "previous_open_pr5544": "304057/100000000", + "productive_fields": 12814, + "query_shears": 15, + "rank_mass_surplus": 760, + "raw_headroom": [ + "181649/100000000000000", + "3633/2000000000000" + ], + "raw_root_interval": [ + "304117181649/100000000000000", + "6082343633/2000000000000" + ], + "relative_gain_percent": "6000/304057", + "strictification": { + "alpha": { + "lower": "0.999999999145880726810628283573", + "upper": "0.999999999145880726810628283574" + }, + "cutoff": 17, + "delta": { + "lower": "0.963355080494670721016731077055", + "upper": "0.963355080494670721016731077056" + }, + "floor": 18, + "gamma": { + "lower": "0.965211488800306029729343582168", + "upper": "0.965211488800306029729343582169" + }, + "normalized_paid_upper": "5242880004882813/5242880536870912", + "power": 1024, + "reserve": "1/10000000000", + "tail_offset": "1/5", + "tested": "3041171/1000000000" + }, + "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": -18, + "5": -18, + "6": 18 + }, + "limits": [ + "The five framework assumptions of PR5544 remain.", + "The uniform compiler word and complete rounded multiplier are not materialized.", + "No independent human or proof-kernel acceptance is claimed." + ], + "local": { + "endpoint_coefficients": 552049, + "helpers": { + "4": 51, + "5": 36, + "7": 24, + "8": 122, + "9": 294 + }, + "owned_lifetimes": 8, + "paid": { + "1": 2428, + "2": 557, + "3": 389, + "4": 112, + "5": 107, + "6": 17, + "7": 13, + "9": 1 + }, + "peak_owned_fields": 1, + "public_inputs": 735, + "real_scalar_allowance": 217428 + }, + "local_paid_delta": { + "1": -1, + "5": -1, + "6": 1 + }, + "native": { + "distinct_maps": 2981, + "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": "5901f62355998c69803fb961c5b0d20415f7006880b2cefbb4a57fbdb982d9a4", + "wrong_phase_rejected": true + }, + "negative_controls": { + "intervening_source_read": "No intervening read or write", + "missing_central_translation": "Rejected by the complete Laurent endpoint", + "one_operand_only": "Common scalar chart", + "uncharged_call": "Complete field and call counts", + "wrong_contact_sign": "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 + ] + }, + "separate_columns": { + "arithmetic": "Dense integer rows with binary denominators; reverse chronology", + "coefficients": 552049, + "columns": 743 + }, + "source_inputs_authenticated": 22, + "status": "PASS_P104_CONTACT_COMPLETE_KAPPA_00304117" +} diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/SOURCES.json b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/SOURCES.json new file mode 100644 index 0000000000..5c136e714d --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/SOURCES.json @@ -0,0 +1,150 @@ +{ + "schema_version": 1, + "base_commit": "e2a6cce2f9db5a2c5f9714f4b9e5292dd3a10581", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "fc3d4ba105e1f097d0d7d051a308281e86ab1446", + "sha256": "66974efdced4083c00025f97d95d83909a226cdf801edb9301c195c6641f6903" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "f126dd2e2dad2b669e75d1d0d0bd05c600725602", + "sha256": "f7a48bfa2659b88378282a8eee7d9fe52cdf505594124c4d1686b58510fffd72" + }, + { + "path": "research/p104-productive-controller/CONTROLLER.json", + "usage": "input", + "git_blob": "cc539db709cf7a6c42872c4380902736ad453af3", + "sha256": "a84f6bbd547379597464e56c420cc665f96bc43a9a1351eed4b7cd0fce3cc4b9" + }, + { + "path": "research/p104-productive-controller/RESULT.json", + "usage": "input", + "git_blob": "5637130d4a3884948eda39c185e3b6e8f4b4717b", + "sha256": "03e9f8424b9166899d3ae3b188d9defb851162a3183ecab237fb783d78216782" + }, + { + "path": "research/p104-productive-controller/WORD.json.gz", + "usage": "input", + "git_blob": "70f954b346dcf5ee27d394f74d0804731deafd86", + "sha256": "e5e955d7c9d5ea5dfea49c0e093037df577aa43813dcad5427ebca41a4ad35ec" + }, + { + "path": "research/p104-productive-controller/caller.py", + "usage": "input", + "git_blob": "6ac5e735691555ecafe2afbcff71edd923178113", + "sha256": "300d40043953e4f6aecfde8f2d1004b8ad6dc5a79ec3c7666c9908c2466c91c8" + }, + { + "path": "research/p104-productive-controller/local.py", + "usage": "input", + "git_blob": "dbb3d56a4f5b733bb0c32a91249d1f6a7e1ab5d2", + "sha256": "878734dfd64c4b9d362d0ae476cc5c2a19fe93e48b7378763b23f3e0dd0a5a71" + }, + { + "path": "research/p104-productive-controller/price.py", + "usage": "input", + "git_blob": "6c856e173c58f2f201064a88745bb80052cd3875", + "sha256": "e46c1264c4acb037bae4df36ccdf3386980ef3d178aa7f0607dbd3f3333ed139" + }, + { + "path": "research/p104-coalesced-private-reuse/compose.py", + "usage": "input", + "git_blob": "402e0ff402bc9822288e1bf069f0b5712069c11e", + "sha256": "9ac1c0e5ac26ed98976148ef9fd73ee58533533f9581c701deaf26ced899ae9e" + }, + { + "path": "research/p104-coalesced-private-reuse/predecessor2152.tar.gz", + "usage": "input", + "git_blob": "cc1a5cb5735ee489388004c27b709a825faf59d1", + "sha256": "67867369c99212184c13d75369811ea928c89dca0e004287a9dcf0b2c93bcdb8" + }, + { + "path": "research/complex-block-rank-optimum/inputs/selected.json.gz", + "usage": "input", + "git_blob": "5f9ef680983b0b63a4c82a4ed909837b78e690cd", + "sha256": "16bc0ebb04b4be6c0ade74badc6a0c0cdba4215eda86e4ff9f13abf8ecebd219" + }, + { + "path": "research/frame-sa504/inputs/hamming/PROTOTYPE.json", + "usage": "input", + "git_blob": "9efe30ee107b9c67f15f1c726e1a1cb5cef03929", + "sha256": "327d2a868043e846381aa58a33053c24425e8cad522ff401b10ec8af1d649a3f" + }, + { + "path": "research/p104-native-channel/inputs/P104-FIXTURE.json", + "usage": "input", + "git_blob": "2e16f99b295bb386fd13bd8fbd57b42ef54143a9", + "sha256": "516c06f6ec3cb84be588c546108de897650288576dd5fbf5fe44b9c5546ad8a4" + }, + { + "path": "research/p104-native-channel/vendor/clifford_exact.py", + "usage": "input", + "git_blob": "166841a037f069249f6f7f6dedb89248812f59e2", + "sha256": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962" + }, + { + "path": "research/p104-native-channel/vendor/native_verify.py", + "usage": "input", + "git_blob": "2c209dfa9cfade3bc20ac5fc9d876b433a147f8c", + "sha256": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38" + }, + { + "path": "research/kappa-0023-productive-jobs/dependencies/kappa-next-regime/direct-decoder/sources/DATA-PHASES.json", + "usage": "input", + "git_blob": "d9a4f84211182ca200c081ea061d724c8a2cfb70", + "sha256": "c5916ff312678f12aba403847643fbbc29f643acec60bdf836fa56cd3e8251fa" + }, + { + "path": "research/joint-helper-lattice/CONTROLLER.json", + "usage": "input", + "git_blob": "49a2f0675819f9deeea27ed77be2c2b6ff2e87e5", + "sha256": "1f5d6aa267e4e66048818714b5d3b5eae17a58abe91d15deeaa34574f7391a5f" + }, + { + "path": "research/higher-moment-strictification/verify.py", + "usage": "input", + "git_blob": "4b24a5096154736ce060474eb8c72dc64c303699", + "sha256": "0ce7e7137422d5ffeda22085c81fa88471bbe963100fdad62e659f1e3bf89326" + }, + { + "path": "research/kappa-rebuild/architecture/mixed_target_probe.py", + "usage": "input", + "git_blob": "4fc05ab08138218ba9f09e5c89b649afae7c914e", + "sha256": "011c3c9d0cf81103dc84d709a0e36793eb7c5ae3f23c85eac27650ef13afa04a" + }, + { + "path": "research/pr4359-p7-padding/dependencies/compiler-refill/endpoint.py", + "usage": "input", + "git_blob": "340e1f0ffb8a1a9c38fbbd9119580b6d23e01b59", + "sha256": "d097e55f06c3f244f2074ffd7c1a0a5f3c4b4b6a6accf9619d1dde5c0ae85e15" + }, + { + "path": "research/query-thinned-controllers/RESULT.json", + "usage": "input", + "git_blob": "e0695152c98d727edfd0d2034b58a1c7e8682c0c", + "sha256": "6ebfc8c0f09166f4834e9d7427410cb31aefff2cd4d4ce588c8e52c9c70e9a0f" + }, + { + "path": "research/pr4359-p7-padding/native_inventory.py", + "usage": "input", + "git_blob": "8d2d96e3998254c2333c43fe47cdfd074cbd811e", + "sha256": "65539acaf45bdfe8c5aee6830f9c9b3d1107c442a60842ef803fdd7688de8f32" + }, + { + "path": "research/p104-coalesced-private-reuse/RESULT.json", + "usage": "input", + "git_blob": "f4cb528c2cc413f34e2ac83c42225c7a1cf11bd3", + "sha256": "580adb3de7037acc6f7e41cc186e8a210463afaa696d57892643d55acd0040c8" + }, + { + "path": "research/p104-coalesced-private-reuse/SOURCES.json", + "usage": "input", + "git_blob": "58f245e194b794b7bacd8ea88f9814d373ed91c3", + "sha256": "232fc3ca3928acc704333def0b8391f94a8e8736ef045c1b5de5b396be37cdc2" + } + ] +} diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/TASK.json b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/TASK.json new file mode 100644 index 0000000000..c917d3fc0c --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/TASK.json @@ -0,0 +1,106 @@ +{ + "schema_version": 1, + "task_id": "scalar-to-moment", + "priority_revision": 7, + "base_commit": "e2a6cce2f9db5a2c5f9714f4b9e5292dd3a10581", + "original_card": { + "id": "scalar-to-moment", + "question": "Can a changed frame itinerary remove a paid transition beyond the already covered scalar A2 contractions?", + "starting_points": [ + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "research/staged544-a2-graph-rewrite/README.md", + "research/staged544-separated-a2/README.md", + "research/staged544-a2-composition-audit/README.md", + "research/staged544-a1858-contraction-audit/README.md" + ], + "methods": [ + "Derive the changed legal frame itinerary and exact child histogram.", + "Prove a scoped obstruction showing why that scalar gain cannot change the paid contract." + ], + "acceptance_gate": "An unchanged histogram is not a kappa gain; record any separate runtime or proof benefit explicitly.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the A2 and separated-A2 constructions and their composition/contraction audits. Scalar contractions can preserve the complete recursive histogram; fewer ADDs alone do not justify further scans.", + "scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately." + }, + "first_experiment": "Identify an actual paid transition to remove and construct a legal replacement frame itinerary, charging restoration, source windows and changed helpers. Compare complete before/after histograms. Stop if only scalar count changes; report that benefit honestly, without expanding the same scalar-only census.", + "bottleneck_link": "A legal change to the histogram, not addition count alone, is the bridge to an exponent gain.", + "allowed_variations": [ + "One existing scalar simplification and one proposed frame-path change." + ], + "scope_change_triggers": [ + "Submitting only another scalar count as completion of a paid-profile task." + ], + "overlap_terms": [ + "scalar simplification", + "paid profile", + "R439", + "3998", + "4019", + "4112", + "4152", + "staged544-a2-graph-rewrite", + "staged544-separated-a2", + "staged544-a2-composition-audit", + "staged544-a1858-contraction-audit" + ], + "existing_checks": [ + { + "scope": "PR #3998: consecutive A2 scalar contraction", + "evidence": "research/staged544-a2-graph-rewrite/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "status": "author-checked", + "source_commit": "389268a6b5e0373a3125d5c6fcd6995f4ea324f5", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4019: separated A2 sites with unchanged recursive histogram", + "evidence": "research/staged544-separated-a2/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "status": "author-checked", + "source_commit": "f408e09df300b575235f7f77f81948071397e16d", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4112: composition audit", + "evidence": "research/staged544-a2-composition-audit/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "status": "author-checked", + "source_commit": "205b7380656ba4b6316a8a493b1a3c679b8f7a0e", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4152: A1858 contraction audit", + "evidence": "research/staged544-a1858-contraction-audit/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "status": "author-checked", + "source_commit": "caaa14cde5962adc372fdca71f63d0f29e73c8b2", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "refined", + "actual_scope": "Retime the register341/register345 P104 contact from the four-plane to the full frame, and certify a complete conditional kappa gain over PR5544.", + "scope_change_reason": "The donor requires a kappa gain. PR5544 released a new P104 productive caller during this investigation. The previous native-word and helper-boundary screens found no gain. This card classifies the resulting source-bound paid-path change; no task was rerolled.", + "bottleneck_link": "The exact local change -H1-H5+H6 reduces the complete paid moment at all 18 FULL sites with every productive target retained.", + "budget_minutes": null, + "stop_rule": "Accept only an exact arbitrary-input native replacement and a fully funded complete kappa above PR5544; otherwise release the finite candidate.", + "outcome": "completed", + "evidence": "See RESULT.json, PROOF.md and VALIDATION.md for executed checks and inherited assumptions.", + "author": "Ali Romman with OpenAI Codex assistance", + "ai_assistance": "Substantial OpenAI Codex assistance; no subagents.", + "open_questions": [ + { + "question": "Can an independent reviewer accept the exact contact replacement and its complete conditional funding?", + "why_it_matters": "All checks here are author-side; source libraries and the five framework assumptions remain inherited.", + "first_step": "Check the five source sites and read intervals, then replay the native endpoint and both complete moment engines.", + "blocked_by": "No technical dependency is missing; independent scientific review remains pending." + } + ] +} diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/VERIFY.json b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/VERIFY.json new file mode 100644 index 0000000000..e6d663d6fd --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/VERIFY.json @@ -0,0 +1,51 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/p104-productive-controller/CONTROLLER.json", + "research/p104-productive-controller/RESULT.json", + "research/p104-productive-controller/WORD.json.gz", + "research/p104-productive-controller/caller.py", + "research/p104-productive-controller/local.py", + "research/p104-productive-controller/price.py", + "research/p104-coalesced-private-reuse/compose.py", + "research/p104-coalesced-private-reuse/predecessor2152.tar.gz", + "research/complex-block-rank-optimum/inputs/selected.json.gz", + "research/frame-sa504/inputs/hamming/PROTOTYPE.json", + "research/p104-native-channel/inputs/P104-FIXTURE.json", + "research/p104-native-channel/vendor/clifford_exact.py", + "research/p104-native-channel/vendor/native_verify.py", + "research/kappa-0023-productive-jobs/dependencies/kappa-next-regime/direct-decoder/sources/DATA-PHASES.json", + "research/joint-helper-lattice/CONTROLLER.json", + "research/higher-moment-strictification/verify.py", + "research/kappa-rebuild/architecture/mixed_target_probe.py", + "research/pr4359-p7-padding/dependencies/compiler-refill/endpoint.py", + "research/query-thinned-controllers/RESULT.json", + "research/pr4359-p7-padding/native_inventory.py", + "research/p104-coalesced-private-reuse/RESULT.json", + "research/p104-coalesced-private-reuse/SOURCES.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 600, + "checks": "Verify the exact two-register retiming, complete scalar and native endpoints, productive caller, changed full invoice, two moment engines, compiler, BIT and all outer predicates. Reject one-sided transport, wrong sign, undeclared read and undercharged cost." + }, + { + "argv": [ + "{python}", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 600, + "checks": "Verify the exact two-register retiming, complete scalar and native endpoints, productive caller, changed full invoice, two moment engines, compiler, BIT and all outer predicates. Reject one-sided transport, wrong sign, undeclared read and undercharged cost." + } + ] +} diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/WORD.json.gz b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/WORD.json.gz new file mode 100644 index 0000000000..1ce96b0130 Binary files /dev/null and b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/WORD.json.gz differ diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/construct.py b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/construct.py new file mode 100644 index 0000000000..416e5f5845 --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/construct.py @@ -0,0 +1,48 @@ +"""Move one P104 contact to the full frame. + +The two-operand transport identity is standard. The source is PR5544, +PR2305, David Arias's coalesced word and Cinna Davis's private reuse. +Ali Romman with OpenAI Codex assistance. Apache-2.0. +""" +from copy import deepcopy +import local as L + + +def construct(source): + word = deepcopy(source) + old = source['program'] + expected = { + 16798: ['MOVE', 345, 739, 240, False], + 16799: ['ADD', 341, 345, '-1', 240], + 16800: ['SCALE', 341, '-1', 240], + 17061: ['MOVE', 341, 240, 127, False], + 17067: ['MOVE', 345, 240, 127, False], + } + L.need(all(old[i] == e for i,e in expected.items()), 'Exact source contact') + L.need(source['frames'][739] == [30,70,429], 'Source three-plane') + L.need(source['frames'][240] == [13,19,70,416], 'Source four-plane') + L.need(source['frames'][127] == [1,2,4,8,16,32,64,128,256], 'Full frame') + for role, end in ((341,17061),(345,17067)): + touched = [] + for i in range(16798,end): + e = old[i] + used = e[1:3] if e[0] in ('ADD','COPY') else e[1:2] + if role in used: + touched.append(i) + L.need(touched == ([16799,16800] if role == 341 else [16798,16799]), + 'No intervening read or write') + replacement = { + 16798: [['MOVE',341,240,127,False], ['MOVE',345,739,127,False]], + 16799: [['ADD',341,345,'-1',127]], + 16800: [['SCALE',341,'-1',127]], + 17061: [], + 17067: [], + } + word['program'] = [e for i,old_event in enumerate(old) + for e in replacement.get(i,[deepcopy(old_event)])] + # Scalar coefficients and their order are equal in both words. + def scalars(program): + return [e[:-1] for e in program if e[0] != 'MOVE'] + L.need(scalars(word['program']) == scalars(old), 'Same scalar and owned word') + L.need(len(word['program']) == len(old)-1 == 25310, 'One fewer paid event') + return word diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/pricing.py b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/pricing.py new file mode 100644 index 0000000000..c88c425a2f --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/pricing.py @@ -0,0 +1,154 @@ +"""Complete mixed-target price, compiler and outer transfer. + +The interval and compiler bounds follow zxv and Cao Yifan. The productive +recursion is by Jacob Alan Sussman. The controller is by Cinna Davis. +Adapted from PR5544 for the H1+H5 to H6 contact change. +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as Q +import local as L + +KAPPA, TESTED = Q('.00304117'), Q('.003041171') +PREVIOUS = Q('.00304057') + + +def encode(x): + if isinstance(x,Q): + return str(x) + if isinstance(x,dict): + return {str(k):encode(v) for k,v in x.items()} + if isinstance(x,(list,tuple)): + return [encode(v) for v in x] + return x + + +def assemble(local, native, word, physical): + paid, targets = Counter(), Counter() + counts = Counter() + L.need(local['helpers'] == native['helpers'], 'Every productive helper has a native target') + for e in word['physical_events']: + counts[e[0]] += 1 + if e[0] == 'LOCAL': + L.need(e[3] is False, 'Every source invocation is forward') + paid.update(local['paid']) + targets.update(local['helpers']) + elif e[0] == 'QUERY_SHEAR': + paid[1] += 104 + elif e[0] == 'IDLE': + paid[8*len(e[2])] += 208 + main = Counter() + idle = Counter({8*len(e[2]):0 for e in word['physical_events'] if e[0] == 'IDLE'}) + for e in word['physical_events']: + if e[0] == 'IDLE': + idle[8*len(e[2])] += 208 + L.need(idle == physical['whole_idle_jobs'], 'Every whole idle has a native Gaussian and full rank') + for term in word['diagonal']: + main[1+8*sum(term[1:])] += 104 + L.need(main == physical['main_targets'], 'Every main target has its full native phase') + targets.update(main) + L.need(counts['LOCAL'] == 18 and counts['QUERY_SHEAR'] == counts['IDLE'] == 15, 'Complete call census') + # Recount by the two path lengths, without using emitted main diagonals. + second_t = Counter({r:18*n for r,n in local['helpers'].items()}) + second_p = Counter({r:18*n for r,n in local['paid'].items()}) + second_t[145] += 208 + second_p[1] += 15*104 + for length in (7,8): + for j in range(1,length+1): + second_t[1+8*(j+1)] += 208 + second_p[8*(j+1)] += 208 + L.need((targets,paid) == (second_t,second_p), 'Independent full invoice') + L.need(max(targets) == 145 and max(paid) == 72, 'Maximum recursive ranks') + L.need(sum(targets.values()) == 12814 and sum(paid.values()) == 69912, 'Complete field and call counts') + L.need(sum(r*n for r,n in targets.items())-sum(r*n for r,n in paid.items()) == 760, 'Complete rank surplus') + return targets,paid,counts + + +def run(local,native,word,physical): + T,P,counts = assemble(local,native,word,physical) + E = L.load(L.ROOT/'research/higher-moment-strictification/verify.py','p104_productive_intervals') + other = L.load(L.ROOT/'research/kappa-rebuild/architecture/mixed_target_probe.py','p104_productive_second_intervals') + def margin(k): + a,b = E.moment(T,1-k), E.moment(P,1-k) + return a[0]-b[1],a[1]-b[0] + lo,hi,grid = 0,10**12,10**14 + while hi-lo > 1: + m=(lo+hi)//2 + if margin(Q(m,grid))[0] > 0: + lo=m + else: + hi=m + lower,upper = Q(lo,grid),Q(hi,grid) + L.need(margin(lower)[0] > 0 and margin(upper)[1] < 0, 'Strict rational crossing enclosure') + L.need(PREVIOUS < KAPPA < TESTED < lower and margin(PREVIOUS)[0] > 0, 'Changed complete bill improves selected kappa') + t,u,v,c,b = 1-TESTED,Q(1,5),1024,17,18 + target,paid = E.moment(T,t),E.moment(P,t) + tl,th = other.moment(T,TESTED) + pl,ph = other.moment(P,TESTED) + L.need(tl > ph and max(tl,target[0]) <= min(th,target[1]) and max(pl,paid[0]) <= min(ph,paid[1]), 'Two exact moment engines') + alpha = E.divide(paid,target) + gamma = E.divide(E.moment(P,t+u),E.mul(E.power(c,u),target)) + delta = E.divide((Q(sum(T.values())*b),)*2,E.mul(E.power(c,TESTED),target)) + reserve,decay = Q(1,10**10),Q(97,100) + L.need(alpha[1] < 1-reserve and gamma[1] < decay and delta[1] < decay, 'All three charged tail ratios') + L.need(decay**128 < Q(1,16), 'Both tail decay blocks') + normalized = 1/(1+v*reserve)+Q(4,2**32) + L.need(normalized < 1 and c**64 < b**63, 'Full completion, splitting and rounding charges') + theta,power = Q(63,64),1000 + eta = E.scale(E.power(145,-v*TESTED),t) + L.need(2*(c**v)**64 <= (145**v)**63 and eta[0] > theta**power, 'Shifted exits and complement capacity') + L.need(E.power(145,v*TESTED)[1] < 2**power, 'Compiler initial range') + gap = (TESTED-KAPPA)/7 + L.need(gap.numerator == 1, 'Exact compiler integer grid') + step = gap.denominator + def wins(j): + return (step*j+1)**power < 2**j + left,right=1,2 + while not wins(right): + left,right=right,2*right + while right-left > 1: + m=(left+right)//2 + if wins(m): + right=m + else: + left=m + H=step*right + L.need(H > 8*v and wins(right) and not wins(right-1), 'Finite uniform threshold with predecessor rejection') + local_routes = (sum(local['paid'].values())+native['helper_normalizers']+native['main_adapters']+4*104+4*local['owned_lifetimes'])*1000 + L.need(local['real_scalar_allowance']+local_routes < 10**7, 'Every local scalar, route and owned operation is funded') + boundary = sum(len(word['boundaries'][side+'_program']) for side in ('left','right')) + raw = 18*10**7 + 15*1664 + 32*104*(len(word['physical_events'])+boundary) + raw += 32*104*(26+1000) + L.need(raw < 10**9, 'Complete nonrecursive raw bound') + bit = L.read(L.ROOT/'research/query-thinned-controllers/RESULT.json')['ordinary_BIT'] + atom = Q(bit['atom']) + ordinary=(1-atom)*Q(bit['after_cover'])+atom*Q('.0000384599') + admitted=Q(bit['admitted']) + L.need(atom > ordinary > admitted > TESTED and atom < 1-ordinary, 'Retained BIT admission and stock') + outer_module=L.load(L.ROOT/'research/pr4359-p7-padding/dependencies/compiler-refill/endpoint.py','p104_productive_outer') + params={'kappa':KAPPA,'tested_saving':TESTED,'complex_uniform_saving':KAPPA+6*gap, + 'b':KAPPA+5*gap,'a':KAPPA+4*gap,'q':KAPPA+3*gap,'bit_saving':admitted, + 'epsilon':1-gap,'beta':1-3*gap,'r0':gap/10,'stop':gap,'layout':gap,'d':gap} + outer=outer_module.ledger(params) + outer['functional_checks']['actual_new_BIT_stock_sublinear']=params['beta']*(1-atom) + L.need(len(outer['strict_checks']) == 54 and len(outer['functional_checks']) == 4, 'Complete outer predicate inventory') + L.need(all(x > 0 for key in ('strict_checks','functional_checks') for x in outer[key].values()), 'All outer inequalities strict') + wrong_cutoff = E.divide((Q(sum(T.values())*21),)*2,E.mul(E.power(20,TESTED),target)) + L.need(wrong_cutoff[0] > 1, 'Old cutoff fails with this helper inventory') + bad=outer_module.ledger(dict(params,bit_saving=Q('.0027'))) + L.need(any(x <= 0 for x in bad['strict_checks'].values()), 'Insufficient BIT contract rejected') + return encode({'kappa':KAPPA,'kappa_decimal':'.00304117','previous_open_pr5544':PREVIOUS,'gain':KAPPA-PREVIOUS, + 'relative_gain_percent':100*(KAPPA/PREVIOUS-1),'raw_root_interval':[lower,upper], + 'raw_headroom':[lower-KAPPA,upper-KAPPA],'margin_at_previous':E.display(margin(PREVIOUS)), + 'targets':T,'paid':P,'productive_fields':sum(T.values()),'paid_calls':sum(P.values()), + 'rank_mass_surplus':760,'full_forward_calls':18,'query_shears':15,'whole_idle_jobs':3120, + 'strictification':{'tested':TESTED,'power':v,'cutoff':c,'floor':b,'tail_offset':u,'reserve':reserve, + 'alpha':E.display(alpha),'gamma':E.display(gamma),'delta':E.display(delta),'normalized_paid_upper':normalized}, + 'compiler':{'theta':theta,'logarithm_power':power,'eta':E.display(eta),'gap':gap,'H':H,'N':'2^'+str(H), + 'integer_test_exponent':right,'uniform_saving':params['complex_uniform_saving'],'word_materialized':False}, + 'nonrecursive':{'local_scalar':local['real_scalar_allowance'],'local_routes':local_routes, + 'raw_scalar_upper':raw,'raw_budget':10**9,'peak_owned_fields':1, + 'fixed_scalar_growth_bound':'At most 2^(16*26000) before native factors; a declared constant, not an attained norm.', + 'tensor_native_growth_bound':'Each rank-r Gaussian has row l1 norm at most 2^(rf); sum of local ranks is 5894.'}, + 'ordinary_BIT':bit,'outer':outer, + 'negative_controls':{'old_cutoff':'Rejected by completion-tail ratio greater than one','old_BIT':'Rejected by outer inequalities'}}) diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/verify.py b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/verify.py new file mode 100644 index 0000000000..fb2d7f1a31 --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/contact/verify.py @@ -0,0 +1,117 @@ +"""Check the contact, complete native caller and conditional kappa gain. + +Source interpreters and caller are immutable PR5544 dependencies. +Ali Romman with OpenAI Codex assistance. Apache-2.0. +""" +import argparse +from collections import Counter +from copy import deepcopy +from hashlib import sha1, sha256 +import gzip +import json +from pathlib import Path +import sys + +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +SOURCE = ROOT/'research/p104-productive-controller' + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +def authenticate(): + rows = json.loads((HERE/'SOURCES.json').read_bytes())['files'] + count = 0 + for row in rows: + if row['usage'] == 'input': + raw = (ROOT/row['path']).read_bytes() + need(sha256(raw).hexdigest() == row['sha256'], 'Changed source: '+row['path']) + need(sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest() == row['git_blob'], + 'Source Git object: '+row['path']) + count += 1 + return count + + +def rejected(action): + try: + action() + except ValueError as error: + return str(error) + raise ValueError('A semantic control was accepted') + + +def run(): + pins = authenticate() + sys.path[:0] = [str(HERE),str(SOURCE)] + import local as L + import caller as C + import construct as R + import pricing as P + source = L.construct() + need(source == L.read(SOURCE/'WORD.json.gz'), 'Exact reconstructed PR5544 source') + baseline = L.replay(source) + word = R.construct(source) + local = L.replay(word) + columns = L.reverse_columns(word) + need(local['helpers'] == baseline['helpers'], 'All helper targets retained') + delta = Counter(local['paid']) + delta.subtract(baseline['paid']) + need({r:n for r,n in delta.items() if n} == {1:-1,5:-1,6:1}, 'Exact local paid delta') + print('PASS source, scalar endpoint, dense reverse columns and H1+H5 to H6',flush=True) + native = L.native(word) + controller = C.construct() + need(controller == L.read(SOURCE/'CONTROLLER.json'), 'Same literal caller') + physical = C.physical(controller,word) + print('PASS every native map, all productive targets and physical caller',flush=True) + costs = P.run(local,native,controller,physical) + controls = C.controls(controller) + bad = deepcopy(word) + event = next(e for e in bad['program'] if e == ['MOVE',345,739,127,False]) + event[3] = 240 + controls['one_operand_only'] = rejected(lambda:L.replay(bad)) + bad = deepcopy(word) + event = next(e for e in bad['program'] if e == ['ADD',341,345,'-1',127]) + event[3] = '1' + controls['wrong_contact_sign'] = rejected(lambda:L.replay(bad)) + bad = deepcopy(source) + bad['program'][16801] = ['ADD',400,341,'1',240] + controls['intervening_source_read'] = rejected(lambda:R.construct(bad)) + bad = deepcopy(local) + bad['paid'][1] -= 1 + controls['uncharged_call'] = rejected(lambda:P.assemble(bad,native,controller,physical)) + result = {'status':'PASS_P104_CONTACT_COMPLETE_KAPPA_00304117', + 'source_inputs_authenticated':pins,'local_paid_delta':{1:-1,5:-1,6:1}, + 'complete_paid_delta':{1:-18,5:-18,6:18}, + 'local':local,'separate_columns':columns,'native':native, + 'physical_caller':physical,'complete_cost':costs,'negative_controls':controls, + 'limits':['The five framework assumptions of PR5544 remain.', + 'The uniform compiler word and complete rounded multiplier are not materialized.', + 'No independent human or proof-kernel acceptance is claimed.']} + return P.encode(result),word + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--write',action='store_true') + args = parser.parse_args() + result,word = run() + for name,data in (('RESULT.json',result),('WORD.json.gz',word)): + path = HERE/name + if args.write: + raw = (json.dumps(data,sort_keys=True,indent=None if name.endswith('.gz') else 2)+'\n').encode() + path.write_bytes(gzip.compress(raw,mtime=0) if name.endswith('.gz') else raw) + else: + raw = path.read_bytes() + need(json.loads(gzip.decompress(raw) if name.endswith('.gz') else raw) == data, + 'Exact saved artifact: '+name) + print(result['status']) + print(json.dumps({k:result['complete_cost'][k] for k in + ('kappa','gain','raw_root_interval','productive_fields','paid_calls')},sort_keys=True)) + + +if __name__ == '__main__': + main() diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/CONTROLLER.json b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/CONTROLLER.json new file mode 100644 index 0000000000..cc539db709 --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/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-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/PROOF.md b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/PROOF.md new file mode 100644 index 0000000000..e0bb34fbef --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/PROOF.md @@ -0,0 +1,212 @@ +# Productive P104 caller and complete conditional cost + +This construction gives conditional `kappa = 304057/100000000 = 0.00304057`. +It changes the complete recursive profile. It does not change the selected +record. The five retained framework assumptions are native all-column +implementation, owned erasure, the uniform compiler, precision and tape cost, +and analytic recovery. This package checks the new finite interfaces and +all parameters of that conditional calculation. It does not claim an +unconditional integer multiplication theorem. + +## 1. The complete source word + +Use Gareth Davidson's PR2305 composition of David Arias's PR2152 coalesced +P104 word and Cinna Davis's PR2219 private reuse. `local.construct()` rebuilds +that exact word from its archived source and compares the full report with +PR2305. It does not run or reuse the old owner-price model. `WORD.json.gz` +contains the emitted word, all binary frames, all public boundaries and the +104 retained port indices. It has 25,311 events and 735 independent public +inputs. The 208 live main fields are X_r and Y_r for the 104 retained indices. +All other public fields are independent helpers, including the 16 punctured +main roles. Eight distinct owned lifetime labels can use one physical slot. + +At each frame V let Phi_V be the pinned nine-axis native chart. A register +in frame V contains Phi_V times its logical value. A MOVE applies +Phi_new Phi_old^(-1). Each ADD or SCALE uses the same frame on every operand. +COPY reads into a cleared owned field; each final private CLEAR uses the +retained owned-erasure contract. The exact endpoint is + +```text +X_r -> X_r +Y_r -> Y_r + X_r for every retained port r +h -> h for every one of the 527 helpers +owned -> 0 for all eight owned lifetime labels +``` + +The first interpreter checks this matrix on all 743 public and owned rows, +including arbitrary owned entrance values before initialization. A separate +interpreter applies the transposed instruction matrices in reverse order. +It uses dense integer rows with binary denominators. Both checks cover all +552,049 coefficients, including zeros. The private slot is initialized before +use and is cleared after use; its peak occupancy is one. It receives no +productive credit. The source word, correction and reuse are predecessor +results, not new local circuits. + +For each positive width f replace every chart by its factorwise tensor power. +Every common-chart scalar step still acts on the same logical values, with +its scalar coefficient outside the tensor power. The frame induction and +rational endpoint therefore hold at every f. Native phase checks include the +absolute scalar phase. Equality of an unsigned tableau alone is not used. +The pinned compiler produces each native recipe; a separate Gaussian +interpreter checks every Pauli image and the global phase. This establishes +the ideal linear identities. The retained all-column implementation and +rounded arithmetic hypotheses remain explicit. + +## 2. The local productive interface + +All public paths are nested. For each helper h, the complete boundary map +Phi_final Phi_initial^(-1) has Gaussian rank +`dim(final) - dim(initial)`. Native lowering checks this rank and supplies +its two monomial boundary maps. These maps give independent ordinary +Gaussian targets at these ranks: + +```text +helpers = {4:51, 5:36, 7:24, 8:122, 9:294} +paid = {1:2429, 2:557, 3:389, 4:112, 5:108, 6:16, 7:13, 9:1} +``` + +There are 527 helper targets and 3,625 paid calls. The paid rank mass is +5,894. Helper rank mass is 4,174. The main boundary progress is +`2*104*8 = 1664`, leaving 56 paid private-copy ranks. The unused helper 711 +keeps its paid H9 and its productive H9; they cancel in the moment. It is +not silently removed from one side of the calculation. + +The 2,981 distinct native maps include every paid occurrence and every helper +boundary. The 208 intrinsic main adapters have rank zero. Their phases give +these physical maps on port q: + +```math +Q_q=\frac{1+i}{2}I+\frac{1-i}{2}X_q,\qquad +F_s=D_s\begin{pmatrix}1&0\\Q_q^{-1}&1\end{pmatrix}. +``` + +At stage zero, `D_0=H9 Q_q^(-1)`. At later stages D_s acts on eight fresh +axes. The complete source accepts arbitrary main fields and arbitrary helper +fields, so this is a full interface, not a main-input subspace restriction. +Each full call uses a fresh independent helper inventory. + +## 3. A forward source supplies both caller orientations + +Retain Cinna Davis's literal p16/a7 controller from `joint-helper-lattice`. +Its 18 full sites formerly used two forward and sixteen backward interfaces. +Use the inverse of the direct wrapper in Ali Romman's PR5398. Put + +```math +R=\begin{pmatrix}0&1\\-Q^{-2}&0\end{pmatrix},\quad +B_s=R^{-1}F_sR + =D_s\begin{pmatrix}1&-Q\\0&1\end{pmatrix}. +``` + +For each backward site, the emitted execution order is + +```text +x <- Q^-2 x +(x,y) <- (y,-x) +execute the unchanged complete forward supplier +y <- Q^2 y +(x,y) <- (-y,x) +``` + +All 18 +full invocations now use the published forward word. No instruction-level +transpose of its COPY or CLEAR operations is needed. The wrapper acts only +on the two main fields; every helper and owned exit remains the source exit. + +Exact Gaussian arithmetic gives `Q^2=Q^-2=X_q`, with phase +1. It is a native +address translation, at every positive tensor width. Scalar minus signs stay +outside tensor substitution. D_s commutes with Q. Thus both signed exchanges +and both translations are ordinary operations. They add no Gaussian call. +The full Laurent replay retains Q as a formal invertible variable; it does +not impose Q^2=I to prove the caller identity. + +The physical check binds all 104 ports at all 18 full sites. It checks the +orthogonal route, inverse route, fixed central direction, four boundary +contacts and exact cross term. This gives 7,488 boundary contacts in the +265-axis layout. The 53,248 central-square column checks cover all nine-axis +columns at every port. Each route changes at most 17 axes. The phase check +also binds all 3,328 main targets and every whole idle job. If an idle includes +stage zero, its first eight axes are the actual orthonormal basis of +q-perpendicular; the residual translation is charged as ordinary work. +Unused fresh axes are spectators and can be deleted by an injective relabeling. + +The 15 thin queries keep the existing paid implementation: initialize an +owned field, COPY the source, perform Q or Q^-1, ADD to the target, and erase +the owned field. There is one paid rank-one call per port and no target +credit for that field. Q^-1 uses a positive Gaussian and its translation. +The one physical owned slot is reused sequentially by full and thin calls. + +## 4. The complete invoice + +For each full site add the local paid and helper profiles. For each thin +site add 104 H1 calls. For each idle with j stages add 208 H(8j) calls. +Each main Laurent diagonal gives 104 targets of rank `1+8j`. +A separate count from the two path lengths 7 and 8 gives the same invoice. +The resulting complete counts are + +```text +paid calls: 69930 +productive fields: 12814 = 18*527 + 32*104 +thin paid calls: 1560 +whole idle jobs: 3120 +rank mass surplus: 760 +maximum target: 145 +maximum paid rank: 72 +``` + +`RESULT.json` gives both full histograms. Every helper boundary and main target +has a native map. All COPY paths, source correction, cleanup, thin calls and +whole idles are included. The old fixed-window owner assignment is not used. +The retained mixed-target theorem supplies the productive matching and +uniform recursion from this complete field interface. No new helper output +is treated as free work without its corresponding paid path. + +Two rational interval engines check `sum(T_r*r^(1-k)) - sum(P_r*r^(1-k))`. +A sign-changing crossing is enclosed in +`(0.00304057807630, 0.00304057807631)`. This is a bound for the stated profile, +not an optimum over local words or controllers. The tested saving is +0.003040575. The claimed kappa 0.00304057 leaves more than 8.0763e-9 to this +crossing and improves selected 0.003027288235 by 0.000013281765. + +The complete tail calculation uses power 1024, cutoff 17, target floor 18, +offset 1/5, and reserve 1e-10. The paid ratio is less than +0.999999996781291. The higher-moment ratio is less than 0.965182173 and the +completion ratio is less than 0.963354733. Both tail ratios are below 0.97; +`0.97^128 < 1/16`. Splitting and rounding give the strict normalized bound +`5242880004882813/5242880536870912 < 1`. The old cutoff 20 fails for this +larger helper inventory and is rejected by a control. + +With complement factor 63/64 and logarithm power 1000, the compiler uses +`H=64215200000000` and `N=2^H`. The integer test exponent is 45,868; +`(H+1)^1000 < 2^45868`, and the preceding grid point fails. The arithmetic +checks all 54 strict outer predicates and four functional predicates. +The retained ordinary BIT saving is 0.0034, above the new complex requirement. +No stronger BIT result is needed. The uniform compiler word is specified by +the retained finite algorithm and is not materialized. + +## 5. Ordinary work, storage and precision boundary + +The source scalar allowance is 217,428 real operations. The route allowance +counts each paid map, both normalizers for every helper, all intrinsic main +adapters, all four fresh-stage contacts per port, and the eight owned +lifetimes. Each fixed map is on at most 17 active axes and has a 1,000-unit +allowance. The sum is below 10^7 per full call. The global raw allowance is +184,647,552, below the funded 10^9 bound. It includes thin COPY/ADD/erase, +scalar boundary programs, all signed exchanges and translations. One owned +field suffices in addition to the independent public fields. No helper +initialization assumes its arbitrary dirt is zero. + +The source checks fewer than 26,000 events and `1+abs(coefficient) < 2^16` +for every scalar update. A safe local scalar growth bound is 2^(16*26000). +Each rank-r tensor Gaussian has row l1 norm at most 2^(rf). The complete +raw implementation therefore has a conservative growth bound +`2^(10^9 + R*f)`, where R is the sum of the full paid ranks in RESULT.json. +Independent local defects can be bounded by the number of raw operations +and paid calls times this factor. These are finite upper bounds, not sharp +or attained norms. They include the intermediate growth in the three-ADD +signed exchange. They provide parameters for the retained precision/tape +contract; a complete rounded integer multiplier is not executed here. + +The claim retains the five framework assumptions stated at the start. +Normal and optimized Python checks, immutable source authentication, failure +controls and a Git-free export are verification of this conditional package. +They are not independent human acceptance or a proof-kernel theorem. diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/RESULT.json b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/RESULT.json new file mode 100644 index 0000000000..5637130d4a --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/RESULT.json @@ -0,0 +1,315 @@ +{ + "complete_cost": { + "compiler": { + "H": 64215200000000, + "N": "2^64215200000000", + "eta": { + "lower": "0.000000185845792706621973271570", + "upper": "0.000000185845792706621973271571" + }, + "gap": "1/1400000000", + "integer_test_exponent": 45868, + "logarithm_power": 1000, + "theta": "63/64", + "uniform_saving": "1064201/350000000", + "word_materialized": false + }, + "full_forward_calls": 18, + "gain": "2656353/200000000000", + "kappa": "304057/100000000", + "kappa_decimal": ".00304057", + "margin_at_previous": { + "lower": "3.300756773058285958096643251393", + "upper": "3.300756773058285958096643251394" + }, + "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": 5335000, + "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": "348599999253/350000000000", + "fixed_halo_explicit_metadata_branch": "26950000001/350000000", + "new_BIT_row_stock_sublinear_in_active_group": "1395799997009/1400000000000", + "new_semantic_group_guard": "3/1400000000" + }, + "margins": { + "boundary_algebraic_matrix": "5959522795743199/1960000000000000000", + "fused_gaussian": "5959522787229597/1960000000000000000", + "global_coordinate_router": "2128401/700000000", + "group_bit_router": "2979762093614797/980000000000000000", + "group_scans": "699999999/700000000", + "main_transform": "5959521395743199/1960000000000000000", + "microbox_face_corrections": "26950000001/350000000", + "polynomial_products": "1399999999/1400000000", + "sparse_union_movement": "802209522795743199/1960000000000000000" + }, + "parameters": { + "a": "2128401/700000000", + "b": "4256803/1400000000", + "beta": "1399999997/1400000000", + "bit_saving": "17/5000", + "cap_xi": "1782209521395743199/1960000000000000000", + "complex_uniform_saving": "1064201/350000000", + "d": "1/1400000000", + "epsilon": "1399999999/1400000000", + "kappa": "304057/100000000", + "lambda_": "398783771/400000000", + "lambda_prime": "1395743199/1400000000", + "layout": "1/1400000000", + "q": "4256801/1400000000", + "r0": "1/14000000000", + "stop": "1/1400000000", + "tested_saving": "121623/40000000" + }, + "strict_checks": { + "actual_bit_above_effective": "251599/700000000", + "actual_logarithmic_gamma_guard": "1/1400000000", + "actual_logarithmic_group_guard": "177790480704256801/980000000000000000", + "alpha_logarithm_absorption": "1/14000000000", + "boundary_algebraic_matrix_above_kappa": "5595743199/1960000000000000000", + "cap_above_band": "802209521395743199/1960000000000000000", + "cap_below_cell": "177790477204256801/1960000000000000000", + "cap_below_phase_cell_power": "2137790478604256801/1960000000000000000", + "complex_above_effective": "1/1400000000", + "complex_below_one_over_32": "39493197/1400000000", + "complex_endpoint": "1/700000000", + "epsilon_below_one": "1/1400000000", + "epsilon_positive": "1399999999/1400000000", + "fine_prime_halo_umbrella": "7/2", + "fused_gaussian_above_kappa": "5587229597/1960000000000000000", + "gaussian_above_main": "695743199/980000000000000000", + "global_coordinate_router_above_kappa": "1/350000000", + "global_gamma_power_slack": "9/14000000000", + "group_below_dimension": "1/700000000", + "group_bit_router_above_kappa": "3493614797/980000000000000000", + "group_gauge_power_slack": "177790480634256801/980000000000000000", + "group_key_fits_record": "1/700000000", + "group_positive": "1399999997/1400000000", + "group_scans_above_kappa": "1744679/1750000", + "halo_covers_generic_inverse_radius": "5", + "improvement_over_user_baseline": "654799790400418148631/500000000000000000000000", + "lambda_above_internal": "1/2800000000", + "lambda_above_sigma": "3/2800000000", + "lambda_above_tau": "1/2800000000", + "lambda_prime_above_lambda": "1/2800000000", + "lambda_prime_above_leaf": "2795743197/1960000000000000000", + "leaf_saving_above_effective": "1395743197/1960000000000000000", + "main_transform_above_kappa": "4195743199/1960000000000000000", + "membership_arithmetic_fits_record": "1/1400000000", + "microbox_face_corrections_above_kappa": "53897871603/700000000", + "microbox_halo_volume": "110600000003/1400000000", + "new_complex_uniform_saving_above_b": "1/1400000000", + "new_semantic_guard_with_C1_one": "1/1400000000", + "polynomial_products_above_kappa": "1395743201/1400000000", + "positive_layout_slack": "1/1400000000", + "q_below_effective": "1/1400000000", + "q_below_internal": "1/1400000000", + "q_below_leaf": "2795743197/1960000000000000000", + "q_positive": "4256801/1400000000", + "short_record_fallback": "1395743197/1400000000", + "source_axis_superpolynomial": "1/1400000000", + "sparse_union_movement_above_kappa": "796250005595743199/1960000000000000000", + "stop_below_one": "1399999999/1400000000", + "stop_positive": "1/1400000000", + "strassen_integer_power_gap": "1951441519231", + "support_router_span": "3/1400000000", + "theta_positive_polynomial_power": "2", + "union_header_fits_record": "3/1400000000", + "union_tag_work_per_visit_fits_record": "3/1400000000" + } + }, + "paid": { + "1": 45282, + "16": 416, + "2": 10026, + "24": 416, + "3": 7002, + "32": 416, + "4": 2016, + "40": 416, + "48": 416, + "5": 1944, + "56": 416, + "6": 288, + "64": 416, + "7": 234, + "72": 208, + "9": 18 + }, + "paid_calls": 69930, + "previous_selected": "605457647/200000000000", + "productive_fields": 12814, + "query_shears": 15, + "rank_mass_surplus": 760, + "raw_headroom": [ + "80763/10000000000000", + "807631/100000000000000" + ], + "raw_root_interval": [ + "30405780763/10000000000000", + "304057807631/100000000000000" + ], + "relative_gain_percent": "265635300/605457647", + "strictification": { + "alpha": { + "lower": "0.999999996781290806577194629544", + "upper": "0.999999996781290806577194629545" + }, + "cutoff": 17, + "delta": { + "lower": "0.963354732998265185478252854607", + "upper": "0.963354732998265185478252854608" + }, + "floor": 18, + "gamma": { + "lower": "0.965182172149361102612340648898", + "upper": "0.965182172149361102612340648899" + }, + "normalized_paid_upper": "5242880004882813/5242880536870912", + "power": 1024, + "reserve": "1/10000000000", + "tail_offset": "1/5", + "tested": "121623/40000000" + }, + "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 + }, + "limits": [ + "Conditional on the retained native all-column, owned-erasure, compiler, precision/tape and analytic-recovery framework.", + "The winning uniform compiler word and complete integer multiplier are not materialized.", + "No proof-kernel check or independent human review is claimed." + ], + "local": { + "endpoint_coefficients": 552049, + "helpers": { + "4": 51, + "5": 36, + "7": 24, + "8": 122, + "9": 294 + }, + "owned_lifetimes": 8, + "paid": { + "1": 2429, + "2": 557, + "3": 389, + "4": 112, + "5": 108, + "6": 16, + "7": 13, + "9": 1 + }, + "peak_owned_fields": 1, + "public_inputs": 735, + "real_scalar_allowance": 217428 + }, + "native": { + "distinct_maps": 2981, + "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": "0a12b2a43238496b226b47dd0e790882d03d1b1b66107308ab37dd6ce21a0481", + "wrong_phase_rejected": true + }, + "negative_controls": { + "missing_central_translation": "Rejected by the complete Laurent endpoint", + "omitted_copy": "Rejected by full arbitrary-input endpoint", + "unearned_helper": "Rejected by native helper census", + "wrong_frame": "Rejected by literal source-frame check" + }, + "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 + ] + }, + "separate_columns": { + "arithmetic": "Dense integer rows with binary denominators; reverse chronology", + "coefficients": 552049, + "columns": 743 + }, + "source_inputs_authenticated": 16, + "status": "PASS_P104_PRODUCTIVE_COMPLETE_KAPPA_00304057" +} diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/WORD.json.gz b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/WORD.json.gz new file mode 100644 index 0000000000..70f954b346 Binary files /dev/null and b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/WORD.json.gz differ diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/caller.py b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/caller.py new file mode 100644 index 0000000000..6ac5e73569 --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/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-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/local.py b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/local.py new file mode 100644 index 0000000000..dbb3d56a4f --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/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-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/price.py b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/price.py new file mode 100644 index 0000000000..6c856e173c --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-contact-reassessment-20261025/sources/predecessor/price.py @@ -0,0 +1,153 @@ +"""Complete mixed-target price, compiler and outer transfer. + +The interval and compiler bounds follow zxv and Cao Yifan. The productive +recursion is by Jacob Alan Sussman. The controller is by Cinna Davis. +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as Q +import local as L + +KAPPA, TESTED = Q('.00304057'), Q('.003040575') +PREVIOUS = Q('605457647/200000000000') + + +def encode(x): + if isinstance(x,Q): + return str(x) + if isinstance(x,dict): + return {str(k):encode(v) for k,v in x.items()} + if isinstance(x,(list,tuple)): + return [encode(v) for v in x] + return x + + +def assemble(local, native, word, physical): + paid, targets = Counter(), Counter() + counts = Counter() + L.need(local['helpers'] == native['helpers'], 'Every productive helper has a native target') + for e in word['physical_events']: + counts[e[0]] += 1 + if e[0] == 'LOCAL': + L.need(e[3] is False, 'Every source invocation is forward') + paid.update(local['paid']) + targets.update(local['helpers']) + elif e[0] == 'QUERY_SHEAR': + paid[1] += 104 + elif e[0] == 'IDLE': + paid[8*len(e[2])] += 208 + main = Counter() + idle = Counter({8*len(e[2]):0 for e in word['physical_events'] if e[0] == 'IDLE'}) + for e in word['physical_events']: + if e[0] == 'IDLE': + idle[8*len(e[2])] += 208 + L.need(idle == physical['whole_idle_jobs'], 'Every whole idle has a native Gaussian and full rank') + for term in word['diagonal']: + main[1+8*sum(term[1:])] += 104 + L.need(main == physical['main_targets'], 'Every main target has its full native phase') + targets.update(main) + L.need(counts['LOCAL'] == 18 and counts['QUERY_SHEAR'] == counts['IDLE'] == 15, 'Complete call census') + # Recount by the two path lengths, without using emitted main diagonals. + second_t = Counter({r:18*n for r,n in local['helpers'].items()}) + second_p = Counter({r:18*n for r,n in local['paid'].items()}) + second_t[145] += 208 + second_p[1] += 15*104 + for length in (7,8): + for j in range(1,length+1): + second_t[1+8*(j+1)] += 208 + second_p[8*(j+1)] += 208 + L.need((targets,paid) == (second_t,second_p), 'Independent full invoice') + L.need(max(targets) == 145 and max(paid) == 72, 'Maximum recursive ranks') + L.need(sum(targets.values()) == 12814 and sum(paid.values()) == 69930, 'Complete field and call counts') + L.need(sum(r*n for r,n in targets.items())-sum(r*n for r,n in paid.items()) == 760, 'Complete rank surplus') + return targets,paid,counts + + +def run(local,native,word,physical): + T,P,counts = assemble(local,native,word,physical) + E = L.load(L.ROOT/'research/higher-moment-strictification/verify.py','p104_productive_intervals') + other = L.load(L.ROOT/'research/kappa-rebuild/architecture/mixed_target_probe.py','p104_productive_second_intervals') + def margin(k): + a,b = E.moment(T,1-k), E.moment(P,1-k) + return a[0]-b[1],a[1]-b[0] + lo,hi,grid = 0,10**12,10**14 + while hi-lo > 1: + m=(lo+hi)//2 + if margin(Q(m,grid))[0] > 0: + lo=m + else: + hi=m + lower,upper = Q(lo,grid),Q(hi,grid) + L.need(margin(lower)[0] > 0 and margin(upper)[1] < 0, 'Strict rational crossing enclosure') + L.need(PREVIOUS < KAPPA < TESTED < lower and margin(PREVIOUS)[0] > 0, 'Changed complete bill improves selected kappa') + t,u,v,c,b = 1-TESTED,Q(1,5),1024,17,18 + target,paid = E.moment(T,t),E.moment(P,t) + tl,th = other.moment(T,TESTED) + pl,ph = other.moment(P,TESTED) + L.need(tl > ph and max(tl,target[0]) <= min(th,target[1]) and max(pl,paid[0]) <= min(ph,paid[1]), 'Two exact moment engines') + alpha = E.divide(paid,target) + gamma = E.divide(E.moment(P,t+u),E.mul(E.power(c,u),target)) + delta = E.divide((Q(sum(T.values())*b),)*2,E.mul(E.power(c,TESTED),target)) + reserve,decay = Q(1,10**10),Q(97,100) + L.need(alpha[1] < 1-reserve and gamma[1] < decay and delta[1] < decay, 'All three charged tail ratios') + L.need(decay**128 < Q(1,16), 'Both tail decay blocks') + normalized = 1/(1+v*reserve)+Q(4,2**32) + L.need(normalized < 1 and c**64 < b**63, 'Full completion, splitting and rounding charges') + theta,power = Q(63,64),1000 + eta = E.scale(E.power(145,-v*TESTED),t) + L.need(2*(c**v)**64 <= (145**v)**63 and eta[0] > theta**power, 'Shifted exits and complement capacity') + L.need(E.power(145,v*TESTED)[1] < 2**power, 'Compiler initial range') + gap = (TESTED-KAPPA)/7 + L.need(gap.numerator == 1, 'Exact compiler integer grid') + step = gap.denominator + def wins(j): + return (step*j+1)**power < 2**j + left,right=1,2 + while not wins(right): + left,right=right,2*right + while right-left > 1: + m=(left+right)//2 + if wins(m): + right=m + else: + left=m + H=step*right + L.need(H > 8*v and wins(right) and not wins(right-1), 'Finite uniform threshold with predecessor rejection') + local_routes = (sum(local['paid'].values())+native['helper_normalizers']+native['main_adapters']+4*104+4*local['owned_lifetimes'])*1000 + L.need(local['real_scalar_allowance']+local_routes < 10**7, 'Every local scalar, route and owned operation is funded') + boundary = sum(len(word['boundaries'][side+'_program']) for side in ('left','right')) + raw = 18*10**7 + 15*1664 + 32*104*(len(word['physical_events'])+boundary) + raw += 32*104*(26+1000) + L.need(raw < 10**9, 'Complete nonrecursive raw bound') + bit = L.read(L.ROOT/'research/query-thinned-controllers/RESULT.json')['ordinary_BIT'] + atom = Q(bit['atom']) + ordinary=(1-atom)*Q(bit['after_cover'])+atom*Q('.0000384599') + admitted=Q(bit['admitted']) + L.need(atom > ordinary > admitted > TESTED and atom < 1-ordinary, 'Retained BIT admission and stock') + outer_module=L.load(L.ROOT/'research/pr4359-p7-padding/dependencies/compiler-refill/endpoint.py','p104_productive_outer') + params={'kappa':KAPPA,'tested_saving':TESTED,'complex_uniform_saving':KAPPA+6*gap, + 'b':KAPPA+5*gap,'a':KAPPA+4*gap,'q':KAPPA+3*gap,'bit_saving':admitted, + 'epsilon':1-gap,'beta':1-3*gap,'r0':gap/10,'stop':gap,'layout':gap,'d':gap} + outer=outer_module.ledger(params) + outer['functional_checks']['actual_new_BIT_stock_sublinear']=params['beta']*(1-atom) + L.need(len(outer['strict_checks']) == 54 and len(outer['functional_checks']) == 4, 'Complete outer predicate inventory') + L.need(all(x > 0 for key in ('strict_checks','functional_checks') for x in outer[key].values()), 'All outer inequalities strict') + wrong_cutoff = E.divide((Q(sum(T.values())*21),)*2,E.mul(E.power(20,TESTED),target)) + L.need(wrong_cutoff[0] > 1, 'Old cutoff fails with this helper inventory') + bad=outer_module.ledger(dict(params,bit_saving=Q('.0027'))) + L.need(any(x <= 0 for x in bad['strict_checks'].values()), 'Insufficient BIT contract rejected') + return encode({'kappa':KAPPA,'kappa_decimal':'.00304057','previous_selected':PREVIOUS,'gain':KAPPA-PREVIOUS, + 'relative_gain_percent':100*(KAPPA/PREVIOUS-1),'raw_root_interval':[lower,upper], + 'raw_headroom':[lower-KAPPA,upper-KAPPA],'margin_at_previous':E.display(margin(PREVIOUS)), + 'targets':T,'paid':P,'productive_fields':sum(T.values()),'paid_calls':sum(P.values()), + 'rank_mass_surplus':760,'full_forward_calls':18,'query_shears':15,'whole_idle_jobs':3120, + 'strictification':{'tested':TESTED,'power':v,'cutoff':c,'floor':b,'tail_offset':u,'reserve':reserve, + 'alpha':E.display(alpha),'gamma':E.display(gamma),'delta':E.display(delta),'normalized_paid_upper':normalized}, + 'compiler':{'theta':theta,'logarithm_power':power,'eta':E.display(eta),'gap':gap,'H':H,'N':'2^'+str(H), + 'integer_test_exponent':right,'uniform_saving':params['complex_uniform_saving'],'word_materialized':False}, + 'nonrecursive':{'local_scalar':local['real_scalar_allowance'],'local_routes':local_routes, + 'raw_scalar_upper':raw,'raw_budget':10**9,'peak_owned_fields':1, + 'fixed_scalar_growth_bound':'At most 2^(16*26000) before native factors; a declared constant, not an attained norm.', + 'tensor_native_growth_bound':'Each rank-r Gaussian has row l1 norm at most 2^(rf); sum of local ranks is 5894.'}, + 'ordinary_BIT':bit,'outer':outer, + 'negative_controls':{'old_cutoff':'Rejected by completion-tail ratio greater than one','old_BIT':'Rejected by outer inequalities'}}) diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-native-contact-audit-20261025/INPUTS.json b/research/p104-contact-independent-audit/capsule/outputs/p104-native-contact-audit-20261025/INPUTS.json new file mode 100644 index 0000000000..9f02abfb43 --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-native-contact-audit-20261025/INPUTS.json @@ -0,0 +1,22 @@ +{ + "schema": "p104-native-contact-inputs/v1", + "canonical_main": "32890bc5de034ab8fc93ac88ead7279a6a416d04", + "reviewed_head": "18968423711fd902aaee1099979497d55603e1dc", + "created_utc": "2026-10-25T10:54:02.444375+00:00", + "files": { + "outputs/p104-native-contact-audit-20261025/sources/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "outputs/p104-native-contact-audit-20261025/sources/native_verify.py": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38", + "swarm-price-plane-20261023T112711Z/coordination/run_guarded.py": "720153b7491acede2c66bdc2dfd3174653195fa3222ec3589d0671c406a5bad8", + "outputs/p104-contact-reassessment-20261025/INPUTS.json": "5c3061c48cfc2a408cafe3e23f1050db0cc529179758b918547e9ed06bd3147a", + "outputs/p104-contact-reassessment-20261025/PAIR-RECEIPT.json": "d9f284021cb5f2757b05cbf5f979f5ba7cf7372993d65a2e060002aca7841fa8", + "outputs/p104-contact-reassessment-20261025/RESULT-normal.json": "3c4d8db5a9695924027f5801901b55cefe0cdc5ea07450aaf396de7e5887e608", + "outputs/p104-contact-reassessment-20261025/check.py": "c4963f22cc862e9b75db01097968d56b3222f64ee796679b0b6ba810a8e6a19c", + "outputs/p104-contact-reassessment-20261025/sources/predecessor/WORD.json.gz": "e5e955d7c9d5ea5dfea49c0e093037df577aa43813dcad5427ebca41a4ad35ec", + "outputs/p104-contact-reassessment-20261025/sources/contact/WORD.json.gz": "a1e416add9d2bb44fce923111ebc50513e5d845e56aabe214f2f0bc7d5f2b45d", + "outputs/p104-contact-reassessment-20261025/sources/predecessor/CONTROLLER.json": "a84f6bbd547379597464e56c420cc665f96bc43a9a1351eed4b7cd0fce3cc4b9", + "outputs/p104-contact-reassessment-20261025/sources/contact/SOURCES.json": "42a7f956bf450c15a92449e285bd2b355159cc99e78bc1d815a4b902221ab89f", + "outputs/p104-contact-reassessment-20261025/sources/contact/RESULT.json": "b1dc682a4d9db5a726fbdf5c05c081f3c9ff9816829e5d8c900db1904a1f98c1", + "outputs/p104-contact-reassessment-20261025/sources/predecessor/local.py": "878734dfd64c4b9d362d0ae476cc5c2a19fe93e48b7378763b23f3e0dd0a5a71", + "outputs/p104-contact-reassessment-20261025/sources/predecessor/caller.py": "300d40043953e4f6aecfde8f2d1004b8ad6dc5a79ec3c7666c9908c2466c91c8" + } +} diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-native-contact-audit-20261025/check.py b/research/p104-contact-independent-audit/capsule/outputs/p104-native-contact-audit-20261025/check.py new file mode 100644 index 0000000000..e7e663beba --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-native-contact-audit-20261025/check.py @@ -0,0 +1,247 @@ +#!/usr/bin/env python3 +"""Exact native-contact matrices; no floating arithmetic or vendor state engine. + +Source compiler and literal circuit descriptions retain their original credit. +New dense Gaussian-dyadic execution and audit: Codex-assisted, Apache-2.0. +""" +from pathlib import Path +from collections import Counter +from functools import lru_cache +from copy import deepcopy +import gzip +import hashlib +import importlib.util +import json +import sys + +B=Path(__file__).resolve().parent +ROOT=B.parents[1] +PRIOR=ROOT/'outputs/p104-contact-reassessment-20261025' +N=512 + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +def sha(raw): + return hashlib.sha256(raw).hexdigest() + + +def authenticate(raw, expected): + need(sha(raw)==expected,'source authentication before import') + + +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 frozen(value): + return tuple(frozen(x) for x in value) if isinstance(value,(tuple,list)) else value + + +@lru_cache(None) +def prepared(gate): + tag=gate[0] + if tag=='P': + rows=gate[1] + need(len(rows)==9 and all(type(r) is int and 0<=r>j)&1)==((q[j]>>i)&1) for i in range(9) for j in range(9)), + 'symmetric quadratic form') + need(all((linear[i]&1)==((q[i]>>i)&1) for i in range(9)), 'quadratic diagonal parity') + phases=[] + for x in range(N): + degree_one=sum(linear[i] for i in range(9) if x>>i&1) + cross=0 + for i in range(9): + if x>>i&1: + for j in range(i+1,9): + if x>>j&1 and q[i]>>j&1: + cross+=2 + phases.append((degree_one+cross)%4) + return tag,tuple(phases) + if tag=='C': + direction,sign=gate[1:] + need(type(direction) is int and 0>remove for v in real];imag=[v>>remove for v in imag] + denominator-=remove + return real,imag,denominator + + +def compare_all(actual, expected, label): + a,b=compile_circuit(actual),compile_circuit(expected) + digest=hashlib.sha256() + for column in range(N): + left=dense_column(a,column) + right=dense_column(b,column) + need(left==right,label+' exact complete matrix column '+str(column)) + re,im,d=left + need(sum(v*v for v in re)+sum(v*v for v in im)==1<<(2*d),label+' exact column norm') + digest.update(json.dumps([column,d,re,im],separators=(',',':')).encode()) + digest.update(b'\n') + return {'columns':N,'complex_entries':N*N,'matrix_sha256':digest.hexdigest()} + + +def first_difference(actual,expected): + a,b=compile_circuit(actual),compile_circuit(expected) + for column in range(N): + if dense_column(a,column)!=dense_column(b,column): + return column + raise ValueError('deliberate native fault was accepted') + + +def main(): + manifest=json.loads((B/'INPUTS.json').read_text()) + for name,expected in manifest['files'].items(): + authenticate((ROOT/name).read_bytes(),expected) + # Transitive source closure and previous normalized/invoice evidence stay + # frozen. Authentication is not a rerun of their scientific computation. + oldpins=json.loads((PRIOR/'INPUTS.json').read_text()) + for name,expected in oldpins['files'].items(): + authenticate((ROOT/name).read_bytes(),expected) + oldreceipt=json.loads((PRIOR/'PAIR-RECEIPT.json').read_text()) + authenticate((PRIOR/'RESULT-normal.json').read_bytes(),oldreceipt['result_sha256']) + oldresult=json.loads((PRIOR/'RESULT-normal.json').read_text()) + need(oldresult['reviewed_head']==manifest['reviewed_head'] and + oldresult['source_endpoint']==oldresult['changed_endpoint']=='pass', + 'exact preceding source-bound endpoint coverage') + sourcepins=json.loads((PRIOR/'sources/contact/SOURCES.json').read_text())['files'] + for name in ('clifford_exact.py','native_verify.py'): + pin=next(p for p in sourcepins if p['path']=='research/p104-native-channel/vendor/'+name) + raw=(B/'sources'/name).read_bytes() + authenticate(raw,pin['sha256']) + try:authenticate(raw+b'\n',pin['sha256']) + except ValueError:pass + else:raise ValueError('source corruption control accepted') + C=load(B/'sources/clifford_exact.py','p104_native_audit_compiler') + V=load(B/'sources/native_verify.py','p104_native_literal_definitions') + old=json.loads(gzip.decompress((PRIOR/'sources/predecessor/WORD.json.gz').read_bytes())) + new=json.loads(gzip.decompress((PRIOR/'sources/contact/WORD.json.gz').read_bytes())) + need({k:v for k,v in old.items() if k!='program'}=={k:v for k,v in new.items() if k!='program'}, + 'public contract, charts, endpoints and ports unchanged') + edits={16798:[['MOVE',341,240,127,False],['MOVE',345,739,127,False]], + 16799:[['ADD',341,345,'-1',127]],16800:[['SCALE',341,'-1',127]],17061:[],17067:[]} + need(new['program']==[e for i,old_event in enumerate(old['program']) for e in edits.get(i,[old_event])], + 'only the five source sites change') + need([e[:-1] for e in old['program'] if e[0]!='MOVE']== + [e[:-1] for e in new['program'] if e[0]!='MOVE'],'owned and scalar schedule unchanged') + before=Counter((e[2],e[3]) for e in old['program'] if e[0]=='MOVE') + after=Counter((e[2],e[3]) for e in new['program'] if e[0]=='MOVE') + delta=Counter(after);delta.subtract(before) + need({k:v for k,v in delta.items() if v}=={(739,240):-1,(240,127):-1,(739,127):1}, + 'actual changed map multiplicities') + controller=json.loads((PRIOR/'sources/predecessor/CONTROLLER.json').read_text()) + full=[e for e in controller['physical_events'] if e[0]=='LOCAL'] + need(len(full)==18 and all(e[3] is False for e in full),'all18 full invocations use this forward word') + frames=old['frames'] + records={} + circuits={} + controls={} + for name,a,b,rank in [('AB',739,240,1),('BD',240,127,5),('AD',739,127,6)]: + need(len(frames[b])-len(frames[a])==rank,'literal native rank') + op=C.canonical_frame(9,tuple(frames[a])).adjoint().then(C.canonical_frame(9,tuple(frames[b]))) + recipe,_=C.lower_child(op) + need(recipe['rank']==rank and recipe['right'] is not None,'declared native child rank') + actual=V.recipe(recipe) + expected=V.adjoint(V.frame(frames[a],9))+V.frame(frames[b],9) + checked=compare_all(actual,expected,name) + records[name]={'old_frame':a,'new_frame':b,'rank':rank,'recipe':recipe, + 'actual_gate_count':len(actual),'expected_gate_count':len(expected),**checked} + circuits[name]=actual + phased=actual+(('phase',1),) + need(V.tableau(phased)==V.tableau(actual),'global phase fault invisible to signed Pauli tableau') + controls[name+'_global_phase']={'first_rejected_column':first_difference(phased,expected), + 'signed_tableau_unchanged':True} + inverse=list(actual) + at=next(i for i,g in enumerate(inverse) if g[0]=='C') + inverse[at]=('C',inverse[at][1],-inverse[at][2]) + controls[name+'_inverse_child']={'first_rejected_column':first_difference(tuple(inverse),expected)} + wrong=deepcopy(recipe);wrong['left']['offset']^=1 + controls[name+'_wrong_boundary']={'first_rejected_column':first_difference(V.recipe(wrong),expected)} + try:need(recipe['rank']+1==len(frames[b])-len(frames[a]),'wrong declared recursive rank') + except ValueError:controls[name+'_wrong_rank']='rejected' + else:raise ValueError('wrong rank accepted') + composition=compare_all(circuits['AB']+circuits['BD'],circuits['AD'],'old two-leg versus direct') + targets={str(r):{'initial_frame':old['initial'][r],'final_frame':old['final'][r], + 'rank':len(frames[old['final'][r]])-len(frames[old['initial'][r]])} + for r in (341,345)} + result={'schema':'p104-native-contact-exact-matrices/v1','reviewed_head':manifest['reviewed_head'], + 'source_hashes':manifest['files'],'maps':records,'old_route_equals_new':composition, + 'controls':controls,'source_authentication_controls':2, + 'direct_dense_complex_entries':3*N*N,'composition_complex_entries':N*N, + 'caller_binding':{'full_calls':18,'all_forward':True,'public_fields':735,'owned_lifetimes':8, + 'target_owners':targets,'public_chart_and_scalar_abi_unchanged':True, + 'previous_normalized_and_invoice_receipt_reused':oldreceipt['result_sha256'], + 'all_parent_native_maps_checked':False,'265_axis_routes_replayed':False}, + 'positive_width_implication':'exact one-column chart equality tensors factorwise; common transport commutes with scalar ADD/SCALE; exterior coefficients are not tensor-powered; spectators stay identity', + 'interpretation':'dense integer real/imaginary vectors with a common power-of-two denominator; no vendor state/tableau used for matrix equality', + 'new_kappa':None,'full_parent_funding_admitted':False,'stop':True} + print(json.dumps(result,sort_keys=True,separators=(',',':'))) + + +if __name__=='__main__':main() diff --git a/research/p104-contact-independent-audit/capsule/outputs/p104-native-contact-audit-20261025/sources/clifford_exact.py b/research/p104-contact-independent-audit/capsule/outputs/p104-native-contact-audit-20261025/sources/clifford_exact.py new file mode 100644 index 0000000000..166841a037 --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/outputs/p104-native-contact-audit-20261025/sources/clifford_exact.py @@ -0,0 +1,149 @@ +"""Small exact Gaussian-dyadic Clifford compiler, independent of gx internals. +Paulis use i^p X^x Z^z. State vectors use integer Gaussian numerators / 2^d. +The tableau is supplemented by a literal circuit, so global phases are kept. +""" +from dataclasses import dataclass + +def parity(x):return x.bit_count()&1 +def rank(rows): + p={} + for x in rows: + while x: + b=x.bit_length()-1 + if b not in p:p[b]=x;break + x^=p[b] + return len(p) +def transpose(rows,n):return tuple(sum(((rows[j]>>i)&1)<>j&1);a[j],a[k]=a[k],a[j] + for i in range(n): + if i!=j and a[i]>>j&1:a[i]^=a[j] + assert [r&((1<>n for r in a) +def basis_extend(cols,n): + out=[] + for x in list(cols)+[1<len(out):out.append(x) + assert len(out)==n + return tuple(out) +def nullspace(rows,n): + a=list(rows);p=[];k=0 + for j in range(n): + t=next((i for i in range(k,len(a)) if a[i]>>j&1),None) + if t is None:continue + a[t],a[k]=a[k],a[t] + for i in range(len(a)): + if i!=k and a[i]>>j&1:a[i]^=a[k] + p.append(j);k+=1 + return tuple((1<>j)&1)<>i&1:out=pmul(out,T[i]) + for i in range(n): + if z>>i&1:out=pmul(out,T[n+i]) + return out +def compose(A,B):return tuple(apply(A,p) for p in B) +def inverse(T): + n=len(T)//2;cols=[x|(z<>n;u,v,p=apply(T,(x,z,0));assert (u,v)==identity(n)[j][:2];out.append((x,z,(-p)%4)) + return tuple(out) +def qvalue(Q,alpha,x,n): + return (sum(alpha[i] for i in range(n) if x>>i&1)+2*sum(parity((Q[i]>>(i+1))&(x>>(i+1))) for i in range(n) if x>>i&1))%4 +def mul_i(a,p): + x,y=a;p%=4 + return [(x,y),(-y,x),(-x,-y),(y,-x)][p] +@dataclass +class Op: + n:int + tab:tuple + circuit:list + def then(self,b): + assert self.n==b.n + return Op(self.n,compose(b.tab,self.tab),self.circuit+b.circuit) + def adjoint(self): + circ=[] + for e in reversed(self.circuit): + if e[0]=='P':circ.append(('P',inv(e[1],self.n))) + elif e[0]=='D':circ.append(('D',e[1],tuple((-x)%4 for x in e[2]))) + elif e[0]=='C':circ.append(('C',e[1],-e[2])) + elif e[0]=='phase':circ.append(('phase',(-e[1])%4)) + else:circ.append(e) + return Op(self.n,inverse(self.tab),circ) + def zero_state(self,basis=0): + N=1<>i)&1 for i in range(n)) + assert all(alpha[i]%2==(Q[i]>>i)&1 for i in range(n)) + return Op(n,tuple([(1<>i&1 else 0,1<>i&1 else 0) for i in range(n)]),[('C',q,sgn)]) +def xgate(n,b):return Op(n,tuple([(1<>i)&1)) for i in range(n)]),[('X',b)]) +def fourier(n,axes=None): + out=ident(n) + for i in range(n) if axes is None else axes:out=out.then(cgate(n,1<len(selected):picks.append(j);selected.append(x) + assert len(picks)==r and all(x>>r==0 for x in Bcols) + Br=transpose(selected,r);Bi=inv(Br,r);Dr=transpose([Dcols[j]&((1<> 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-contact-independent-audit/capsule/swarm-price-plane-20261023T112711Z/coordination/run_guarded.py b/research/p104-contact-independent-audit/capsule/swarm-price-plane-20261023T112711Z/coordination/run_guarded.py new file mode 100644 index 0000000000..84af5ed235 --- /dev/null +++ b/research/p104-contact-independent-audit/capsule/swarm-price-plane-20261023T112711Z/coordination/run_guarded.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 +"""Serial local research executor with sampled descendant RSS and timeout.""" +import argparse +import fcntl +import hashlib +import json +import os +from pathlib import Path +import signal +import subprocess +import sys +import time + + +def tree_memory(root_pid): + records = {} + for p in Path('/proc').iterdir(): + if not p.name.isdecimal(): + continue + try: + info = (p/'stat').read_text().rsplit(')', 1)[1].split() + records[int(p.name)] = (int(info[1]), int(info[21]) * os.sysconf('SC_PAGE_SIZE')) + except (OSError, ValueError, IndexError): + continue + todo = [root_pid] + seen = set() + while todo: + pid = todo.pop() + if pid in seen: + continue + seen.add(pid) + todo.extend(p for p,(parent,_) in records.items() if parent == pid) + return sum(records.get(p,(0,0))[1] for p in seen), len(seen) + + +def main(): + ap = argparse.ArgumentParser(description=__doc__) + ap.add_argument('--name', required=True) + ap.add_argument('--seconds', type=float, default=150) + ap.add_argument('--memory-mib', type=int, default=1024) + ap.add_argument('--cwd', type=Path) + ap.add_argument('command', nargs=argparse.REMAINDER) + args = ap.parse_args() + command = args.command[1:] if args.command[:1] == ['--'] else args.command + if not command or args.seconds <= 0 or not (0 < args.memory_mib <= 1024): + ap.error('command, positive timeout, and memory <= 1024 MiB required') + workspace = Path(__file__).resolve().parents[1] + out = workspace/'runs'/args.name + out.mkdir(exist_ok=False) + cwd = (args.cwd or workspace).resolve() + lock = (workspace/'coordination'/'heavy.lock').open('w') + fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB) + started = time.monotonic() + env = dict(os.environ) + env.update(PYTHONDONTWRITEBYTECODE='1', OMP_NUM_THREADS='1', OPENBLAS_NUM_THREADS='1', MKL_NUM_THREADS='1') + peak = 0 + samples = 0 + cause = None + with (out/'stdout.log').open('wb') as log: + proc = subprocess.Popen(command, cwd=cwd, stdout=log, stderr=subprocess.STDOUT, env=env, start_new_session=True) + try: + while proc.poll() is None: + rss, count = tree_memory(proc.pid) + peak = max(peak, rss) + samples += 1 + if rss > args.memory_mib * 1024**2: + cause = 'memory_limit' + elif time.monotonic() - started > args.seconds: + cause = 'timeout' + if cause: + os.killpg(proc.pid, signal.SIGTERM) + try: + proc.wait(timeout=2) + except subprocess.TimeoutExpired: + os.killpg(proc.pid, signal.SIGKILL) + break + time.sleep(0.1) + code = proc.wait() + except BaseException: + try: + os.killpg(proc.pid, signal.SIGKILL) + except ProcessLookupError: + pass + proc.wait() + raise + receipt = {'schema':'serial-research-run/v1','command':command,'cwd':str(cwd), + 'exit_code':code,'termination':cause,'elapsed_seconds':time.monotonic()-started, + 'sampled_peak_descendant_rss_bytes':peak,'rss_samples':samples, + 'memory_limit_mib':args.memory_mib,'timeout_seconds':args.seconds, + 'python':sys.version,'log_sha256':hashlib.sha256((out/'stdout.log').read_bytes()).hexdigest(), + 'scope':'Fresh command execution only; scientific claim determined by reviewed output.'} + (out/'RECEIPT.json').write_text(json.dumps(receipt,indent=2)+'\n') + print(json.dumps(receipt)) + return 0 if code == 0 and not cause else 1 + + +if __name__ == '__main__': + raise SystemExit(main()) diff --git a/research/p104-contact-independent-audit/expected/contact-ceiling.json b/research/p104-contact-independent-audit/expected/contact-ceiling.json new file mode 100644 index 0000000000..05cb6fa035 --- /dev/null +++ b/research/p104-contact-independent-audit/expected/contact-ceiling.json @@ -0,0 +1 @@ +{"C_probe":"33/10000","all_remaining_edits_moment_at_target":{"lower_decimal_outward":"-47.1189445262094885178259","upper_decimal_outward":"-47.1189445262094885178246"},"all_remaining_edits_raw_ceiling_interval":["3106074473/1000000000000","1553037237/500000000000"],"broader_relaxation_physical_witness":false,"broader_relaxed_local_profile":{"8":1,"9":654},"broader_relaxed_moment_at_target":{"lower_decimal_outward":"470.055147407095922827173","upper_decimal_outward":"470.055147407095922827175"},"ceiling_monotonicity":"after division by6^t, rank1 dominates only adverse rank5 derivative; paired high tails positive","changed_endpoint":"pass","coefficients_including_zeros":552049,"compiler_integer_threshold_only_checked":337848000000000,"complete_paid_after":{"1":45264,"2":10026,"3":7002,"4":2016,"5":1926,"6":306,"7":234,"9":18,"16":416,"24":416,"32":416,"40":416,"48":416,"56":416,"64":416,"72":208},"complete_paid_before":{"1":45282,"2":10026,"3":7002,"4":2016,"5":1944,"6":288,"7":234,"9":18,"16":416,"24":416,"32":416,"40":416,"48":416,"56":416,"64":416,"72":208},"complete_targets":{"4":918,"5":648,"7":432,"8":2196,"9":5292,"17":416,"25":416,"33":416,"41":416,"49":416,"57":416,"65":416,"73":208,"145":208},"controls":{"intervening_source_read":"rejected","one_operand_only":"rejected","target_loss_reverses_credit":"explicit full target equality checked","wrong_sign":"rejected"},"current_moment_at_target":{"lower_decimal_outward":"-64.2349800489874753468198","upper_decimal_outward":"-64.2349800489874753468185"},"funding_scope":"complete native/precision/compiler theorem and58outer obligations not independently admitted here","independent_normalized_endpoint_rows":743,"local_paid_after":{"1":2428,"2":557,"3":389,"4":112,"5":107,"6":17,"7":13,"9":1},"local_paid_before":{"1":2429,"2":557,"3":389,"4":112,"5":108,"6":16,"7":13,"9":1},"native_phase_and_allwidth":"inherited chart identity; not freshly replayed","new_events":25310,"new_kappa":null,"one_1plus5_to6_edit_gain_at_target":{"lower_decimal_outward":"0.00888683048950051237227098","upper_decimal_outward":"0.00888683048950051237227100"},"owned_returns":"pass","remaining_global_edit_inventory":1926,"remaining_identical_local_contacts_upper":107,"required_global_edits_at_target":7229,"required_identical_contacts_per18sites":402,"reviewed_head":"18968423711fd902aaee1099979497d55603e1dc","schema":"p104-focused-contact-audit/v1","source_endpoint":"pass","source_events":25311,"source_windows":{"341":[16799,16800],"345":[16798,16799]},"stop":true} diff --git a/research/p104-contact-independent-audit/expected/native.json b/research/p104-contact-independent-audit/expected/native.json new file mode 100644 index 0000000000..44eb3b3a9c --- /dev/null +++ b/research/p104-contact-independent-audit/expected/native.json @@ -0,0 +1 @@ +{"caller_binding":{"265_axis_routes_replayed":false,"all_forward":true,"all_parent_native_maps_checked":false,"full_calls":18,"owned_lifetimes":8,"previous_normalized_and_invoice_receipt_reused":"3c4d8db5a9695924027f5801901b55cefe0cdc5ea07450aaf396de7e5887e608","public_chart_and_scalar_abi_unchanged":true,"public_fields":735,"target_owners":{"341":{"final_frame":127,"initial_frame":3,"rank":9},"345":{"final_frame":127,"initial_frame":3,"rank":9}}},"composition_complex_entries":262144,"controls":{"AB_global_phase":{"first_rejected_column":0,"signed_tableau_unchanged":true},"AB_inverse_child":{"first_rejected_column":0},"AB_wrong_boundary":{"first_rejected_column":0},"AB_wrong_rank":"rejected","AD_global_phase":{"first_rejected_column":0,"signed_tableau_unchanged":true},"AD_inverse_child":{"first_rejected_column":0},"AD_wrong_boundary":{"first_rejected_column":0},"AD_wrong_rank":"rejected","BD_global_phase":{"first_rejected_column":0,"signed_tableau_unchanged":true},"BD_inverse_child":{"first_rejected_column":0},"BD_wrong_boundary":{"first_rejected_column":0},"BD_wrong_rank":"rejected"},"direct_dense_complex_entries":786432,"full_parent_funding_admitted":false,"interpretation":"dense integer real/imaginary vectors with a common power-of-two denominator; no vendor state/tableau used for matrix equality","maps":{"AB":{"actual_gate_count":9,"columns":512,"complex_entries":262144,"expected_gate_count":15,"matrix_sha256":"99d71fe0e4b764a2b5cb1d0aa8ec0021acb2f58e0cb04be963b4730247009e7d","new_frame":240,"old_frame":739,"rank":1,"recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[2,5,9,17,33,65,128,257,1],"offset":0,"phase":0,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":1,"right":{"linear_Z4":[0,1,1,3,0,3,0,3,2],"matrix_rows":[422,9,258,268,256,272,288,64,384],"offset":61,"phase":1,"quadratic_rows":[8,166,174,13,0,166,0,166,0]}}},"AD":{"actual_gate_count":14,"columns":512,"complex_entries":262144,"expected_gate_count":16,"matrix_sha256":"d93336b68f5b77fec1291ac30cf53aebd37417fa29e5a9222fe54042385dac6b","new_frame":127,"old_frame":739,"rank":6,"recipe":{"left":{"linear_Z4":[3,2,3,2,3,3,0,0,0],"matrix_rows":[65,130,4,264,14,16,6,32,61],"offset":0,"phase":0,"quadratic_rows":[61,8,53,51,61,61,0,0,0]},"rank":6,"right":{"linear_Z4":[0,0,2,0,2,0,3,0,2],"matrix_rows":[81,18,340,328,288,384,336,64,80],"offset":398,"phase":1,"quadratic_rows":[256,80,336,272,14,256,326,256,237]}}},"BD":{"actual_gate_count":13,"columns":512,"complex_entries":262144,"expected_gate_count":17,"matrix_sha256":"619ba54279a3f49cb5901d0c77e7755e9387f9a18ddc9cfbbd7532f6266cb2cd","new_frame":127,"old_frame":240,"rank":5,"recipe":{"left":{"linear_Z4":[2,2,2,3,3,0,0,0,0],"matrix_rows":[33,66,4,133,3,264,6,16,24],"offset":0,"phase":0,"quadratic_rows":[6,5,3,24,24,0,0,0,0]},"rank":5,"right":{"linear_Z4":[2,0,2,0,0,0,0,0,1],"matrix_rows":[17,18,20,32,384,80,64,88,256],"offset":463,"phase":1,"quadratic_rows":[64,80,16,0,6,256,3,256,416]}}}},"new_kappa":null,"old_route_equals_new":{"columns":512,"complex_entries":262144,"matrix_sha256":"d93336b68f5b77fec1291ac30cf53aebd37417fa29e5a9222fe54042385dac6b"},"positive_width_implication":"exact one-column chart equality tensors factorwise; common transport commutes with scalar ADD/SCALE; exterior coefficients are not tensor-powered; spectators stay identity","reviewed_head":"18968423711fd902aaee1099979497d55603e1dc","schema":"p104-native-contact-exact-matrices/v1","source_authentication_controls":2,"source_hashes":{"outputs/p104-contact-reassessment-20261025/INPUTS.json":"5c3061c48cfc2a408cafe3e23f1050db0cc529179758b918547e9ed06bd3147a","outputs/p104-contact-reassessment-20261025/PAIR-RECEIPT.json":"d9f284021cb5f2757b05cbf5f979f5ba7cf7372993d65a2e060002aca7841fa8","outputs/p104-contact-reassessment-20261025/RESULT-normal.json":"3c4d8db5a9695924027f5801901b55cefe0cdc5ea07450aaf396de7e5887e608","outputs/p104-contact-reassessment-20261025/check.py":"c4963f22cc862e9b75db01097968d56b3222f64ee796679b0b6ba810a8e6a19c","outputs/p104-contact-reassessment-20261025/sources/contact/RESULT.json":"b1dc682a4d9db5a726fbdf5c05c081f3c9ff9816829e5d8c900db1904a1f98c1","outputs/p104-contact-reassessment-20261025/sources/contact/SOURCES.json":"42a7f956bf450c15a92449e285bd2b355159cc99e78bc1d815a4b902221ab89f","outputs/p104-contact-reassessment-20261025/sources/contact/WORD.json.gz":"a1e416add9d2bb44fce923111ebc50513e5d845e56aabe214f2f0bc7d5f2b45d","outputs/p104-contact-reassessment-20261025/sources/predecessor/CONTROLLER.json":"a84f6bbd547379597464e56c420cc665f96bc43a9a1351eed4b7cd0fce3cc4b9","outputs/p104-contact-reassessment-20261025/sources/predecessor/WORD.json.gz":"e5e955d7c9d5ea5dfea49c0e093037df577aa43813dcad5427ebca41a4ad35ec","outputs/p104-contact-reassessment-20261025/sources/predecessor/caller.py":"300d40043953e4f6aecfde8f2d1004b8ad6dc5a79ec3c7666c9908c2466c91c8","outputs/p104-contact-reassessment-20261025/sources/predecessor/local.py":"878734dfd64c4b9d362d0ae476cc5c2a19fe93e48b7378763b23f3e0dd0a5a71","outputs/p104-native-contact-audit-20261025/sources/clifford_exact.py":"2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962","outputs/p104-native-contact-audit-20261025/sources/native_verify.py":"3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38","swarm-price-plane-20261023T112711Z/coordination/run_guarded.py":"720153b7491acede2c66bdc2dfd3174653195fa3222ec3589d0671c406a5bad8"},"stop":true} diff --git a/research/p104-contact-independent-audit/verify.py b/research/p104-contact-independent-audit/verify.py new file mode 100644 index 0000000000..3e860bf532 --- /dev/null +++ b/research/p104-contact-independent-audit/verify.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python3 +"""Portable replay of byte-preserved focused contact and native audits. + +New material Apache-2.0; Chris R/Clear1nsight with OpenAI Codex assistance. +Frozen source/compiler/interval authors retain the notices in the capsule. +""" +from pathlib import Path +import hashlib +import json +import os +import subprocess +import sys + +HERE=Path(__file__).resolve().parent +ROOT=HERE.parents[1] + + +def need(ok,why): + if not ok: + raise ValueError(why) + + +def main(): + pins=json.loads((HERE/'SOURCES.json').read_text())['files'] + for row in pins: + if row['usage']=='input': + raw=(ROOT/row['path']).read_bytes() + need(hashlib.sha256(raw).hexdigest()==row['sha256'],'canonical live input '+row['path']) + need(hashlib.sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest()==row['git_blob'], + 'canonical source object '+row['path']) + inventory=json.loads((HERE/'CAPSULE-INVENTORY.json').read_text())['files'] + actual={str(p.relative_to(HERE)) for folder in ('capsule','expected') + for p in (HERE/folder).rglob('*') if p.is_file()} + need(actual==set(inventory),'complete capsule inventory') + for rel,expected in inventory.items(): + path=HERE/rel + need(not path.is_symlink() and hashlib.sha256(path.read_bytes()).hexdigest()==expected, + 'frozen capsule byte '+rel) + vendor=HERE/'capsule/outputs/p104-native-contact-audit-20261025/sources' + for name in ('clifford_exact.py','native_verify.py'): + need((vendor/name).read_bytes()==(ROOT/'research/p104-native-channel/vendor'/name).read_bytes(), + 'canonical native library binding '+name) + outputs=[] + for slug,expected in [('p104-contact-reassessment-20261025','contact-ceiling.json'), + ('p104-native-contact-audit-20261025','native.json')]: + script=HERE/'capsule/outputs'/slug/'check.py' + command=[sys.executable]+(['-O'] if sys.flags.optimize else [])+['-B',str(script)] + result=subprocess.run(command,cwd=HERE/'capsule',capture_output=True,timeout=60, + env=dict(os.environ,PYTHONDONTWRITEBYTECODE='1')) + need(result.returncode==0 and not result.stderr,'focused scientific subprocess '+slug) + need(result.stdout==(HERE/'expected'/expected).read_bytes(),'complete frozen scientific output '+slug) + outputs.append(json.loads(result.stdout)) + for rel,expected in inventory.items(): + need(hashlib.sha256((HERE/rel).read_bytes()).hexdigest()==expected,'source unchanged '+rel) + contact,native=outputs + need(contact['stop'] and native['stop'] and contact['new_kappa'] is native['new_kappa'] is None, + 'no new kappa or continuing search') + print('PASS_P104_CONTACT_INDEPENDENT_AUDIT') + print(json.dumps({'normalized_rows':contact['independent_normalized_endpoint_rows'], + 'native_complex_entries':native['direct_dense_complex_entries']+native['composition_complex_entries'], + 'fixed_edit_raw_ceiling':contact['all_remaining_edits_raw_ceiling_interval'], + 'full_parent_admitted':False,'new_kappa':None},sort_keys=True)) + + +if __name__=='__main__':main()