diff --git a/.github/workflows/w33_pass3175_3186_curvature_routed_inference.yml b/.github/workflows/w33_pass3175_3186_curvature_routed_inference.yml
new file mode 100644
index 000000000..3bd758661
--- /dev/null
+++ b/.github/workflows/w33_pass3175_3186_curvature_routed_inference.yml
@@ -0,0 +1,90 @@
+name: Passes 3175-3186 Curvature-Routed Inference
+on:
+ workflow_dispatch:
+ pull_request:
+ paths:
+ - 'analysis/*3175*'
+ - 'analysis/*3177*'
+ - 'analysis/*3178*'
+ - 'analysis/*3179*'
+ - 'analysis/*3180*'
+ - 'analysis/*3181*'
+ - 'analysis/*3182*'
+ - 'rtl/*3175*'
+ - 'rtl/tb_w33_pass3175_3183_curvature_routed_runtime.sv'
+ - 'tests/test_bt3175_bt3186_curvature_routed_inference.py'
+ - 'tools/integrate_bt3175_bt3186.py'
+ - '.github/workflows/w33_pass3175_3186_curvature_routed_inference.yml'
+permissions:
+ contents: read
+jobs:
+ exact-rtl-papers:
+ runs-on: ubuntu-latest
+ timeout-minutes: 240
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ with:
+ python-version: '3.12'
+ - name: Install exact and digital toolchains
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y iverilog yosys fpga-icestorm nextpnr-ice40
+ python -m pip install numpy pytest
+ - uses: wtfjoke/setup-tectonic@v3
+ - name: Recompute all seven fronts
+ run: |
+ python analysis/bt3175_3176_curvature_conditioned_sensing.py
+ python analysis/bt3177_all194_information_frontier.py
+ python analysis/bt3178_three_edit_phase_epoch.py
+ python analysis/bt3179_m36_proof_envelope.py
+ python analysis/bt3180_routed_joint_utility.py
+ python analysis/bt3181_d4_triangle_wilson_flux.py
+ python analysis/bt3182_recursive_belief_virtualization.py
+ python analysis/bt3175_3186_curvature_routed_inference_summary.py
+ - name: Focused exact regressions
+ run: |
+ pytest -q tests/test_bt3175_bt3186_curvature_routed_inference.py
+ git diff --check
+ - name: Simulate protocol contracts
+ run: |
+ iverilog -g2012 -s tb_w33_pass3175_3183_curvature_routed_runtime -o /tmp/pass3183.vvp \
+ rtl/w33_pass3175_3183_curvature_routed_runtime.sv rtl/tb_w33_pass3175_3183_curvature_routed_runtime.sv
+ vvp /tmp/pass3183.vvp | tee pass3183_iverilog.log
+ grep -F 'PASS curvature, three-edit epoch, envelope, Wilson flux and routed utility' pass3183_iverilog.log
+ - name: Synthesize representative control tops
+ run: |
+ for top in w33_pass3175_curvature_accumulator w33_pass3178_three_edit_epoch_decoder w33_pass3181_d4_triangle_flux w33_pass3180_streamed_routed_utility; do
+ yosys -p "read_verilog -sv rtl/w33_pass3175_3183_curvature_routed_runtime.sv; hierarchy -top $top; synth_ice40 -top $top -json /tmp/$top.json; stat" | tee $top.yosys.log
+ nextpnr-ice40 --hx8k --package ct256 --pcf-allow-unconstrained --json /tmp/$top.json --asc /tmp/$top.asc |& tee $top.nextpnr.log
+ done
+ - name: Integrate front doors idempotently
+ run: |
+ python tools/integrate_bt3175_bt3186.py
+ sha256sum w33_paper.tex photonic_holonet.tex holonet_machine_blueprint.tex docs/index.html > /tmp/a
+ python tools/integrate_bt3175_bt3186.py
+ sha256sum w33_paper.tex photonic_holonet.tex holonet_machine_blueprint.tex docs/index.html > /tmp/b
+ diff -u /tmp/a /tmp/b
+ - name: Compile all three canonical papers
+ run: |
+ tectonic w33_paper.tex
+ tectonic photonic_holonet.tex
+ tectonic holonet_machine_blueprint.tex
+ test -s w33_paper.pdf && test -s photonic_holonet.pdf && test -s holonet_machine_blueprint.pdf
+ - uses: actions/upload-artifact@v4
+ with:
+ name: pass3175-3186-curvature-routed-evidence
+ path: |
+ data/PART_BT3175*.json
+ data/PART_BT3177*.json
+ data/PART_BT3178*.json
+ data/PART_BT3179*.json
+ data/PART_BT3180*.json
+ data/PART_BT3181*.json
+ data/PART_BT3182*.json
+ pass3183_iverilog.log
+ *.yosys.log
+ *.nextpnr.log
+ w33_paper.pdf
+ photonic_holonet.pdf
+ holonet_machine_blueprint.pdf
diff --git a/analysis/BT3175_BT3186_CLAIM_LEDGER.md b/analysis/BT3175_BT3186_CLAIM_LEDGER.md
new file mode 100644
index 000000000..9e1397c79
--- /dev/null
+++ b/analysis/BT3175_BT3186_CLAIM_LEDGER.md
@@ -0,0 +1,19 @@
+# Passes 3175–3186 claim ledger
+
+| Claim | Type | Status | Boundary |
+|---|---|---|---|
+| 48,826 hypotheses partition as 45,445 none, 1,725 flat, 1,656 curved | exact finite | source-observed | Uses frozen D4 hypothesis universe. |
+| Curvature-aware information dominates collapsed information | exact theorem | proved | Data processing / chain rule. |
+| Stress action changes 1/32; sparse operational changes 0/32 | exact model | source-observed | Explicit synthetic channel and seed only. |
+| All 194 larger universal ISAs receive information metrics | exact finite | source-observed | Uniform frames/opcodes, not physical bitrate. |
+| Six-objective information frontier has eight designs | exact finite | source-observed | Separate from full-group runtime frontier. |
+| Twelve length-seven markers correct any three edits | exact theorem | proved | Physical confusion rates absent. |
+| Radius-three ball is 3,667,012 per phase | exact combinatorics | source-observed | Analytic enumeration by received length. |
+| M36 envelope detects tampering | exact digital integrity | source-observed | Does not prove candidate physics. |
+| Negative Z0/Z1/Z2 object is validly sealed and rejected | exact fixture | source-observed | No accepted candidate asserted. |
+| Joint utility changes 8/64 actions | exact model | source-observed | Programmable synthetic coefficients. |
+| D4 triple flux census 223/120 and 106 orbits | exact finite | source-observed | Algebraic holonomy only. |
+| Level-six active path uses 312 bits versus 5,461,333,332 replicated bits | exact architecture | source-observed | One active path; concurrency excluded. |
+| RTL simulation/synthesis/place | digital evidence | pending | No observed area or timing. |
+| Canonical paper integration and PDFs | publication evidence | pending | No compiled-PDF claim. |
+| M36 exhaustive result and laboratory behavior | exhaustive/physical | absent | No no-go, candidate, heat, coherence or optical claim. |
diff --git a/analysis/BT3175_BT3186_curvature_routed_inference.md b/analysis/BT3175_BT3186_curvature_routed_inference.md
new file mode 100644
index 000000000..e327a7a97
--- /dev/null
+++ b/analysis/BT3175_BT3186_curvature_routed_inference.md
@@ -0,0 +1,57 @@
+# Passes 3175–3186 — curvature-routed inference
+
+## Executive result
+
+This packet executes five requested fronts and two independent outside-box fronts while preserving the Holonet manuscript boundaries between clock, route, address, support/readout, phase/execution and fail-closed M36 injection.
+
+## 3175–3176 — curvature as a Bayesian latent
+
+The 48,826 hypotheses split into 45,445 non-shared states, 1,725 shared-flat states and 1,656 shared-curved states. For the explicit three-symbol synthetic channel, the exact identity
+
+\[
+I(H;Y)=I(K;Y)+I(H;Y\mid K)
+\]
+
+shows that resolving flat versus curved interactions cannot lose information. In 32 stress posteriors it changes 1 action; the best-action gain ranges from 0.0126970093 to 0.0902425706 bits, mean 0.0355238394. Under the frozen sparse operational shared-pair mass 3.48484848e-5 it changes 0/32 actions and adds only 2.54e-6 to 6.75e-6 bits. Curvature is therefore real and potentially useful after postselection, but not yet a dominant operational control variable.
+
+## 3177 — exact information frontier over all 194 larger ISAs
+
+All 80 universal five-opcode and 114 universal six-opcode sets are recomputed. The six-objective frontier—maximize average, minimum and normalized dispatch information; minimize variance, collisions and decoder units—contains eight designs. Global extrema are:
+
+- maximum average: 2.4141403814 bits, four attainers;
+- maximum worst-frame capacity: 1.7924812504 bits, 22 attainers;
+- maximum normalized capacity: 0.9481541058, four attainers;
+- minimum variance: 0.0357531815, two attainers;
+- minimum collision probability: 1/9, four attainers.
+
+No single design owns all extrema; information-aware ISA selection is intrinsically vector-valued.
+
+## 3178 — optimal three-edit phase code
+
+Twelve payload-unused symbols label twelve constant markers \(M_p=u_p^7\). Their pairwise and payload distances are at least seven, which is optimal because correcting three adversarial insertions, deletions or substitutions requires \(d_{\min}\ge 2t+1=7\). For a received word of length \(m\) containing \(c\) copies of the marker symbol,
+
+\[
+d_L(u^7,y)=\max(7,m)-\min(7,c).
+\]
+
+The exact radius-three ball contains 3,667,012 traces per phase and 44,004,144 phase-labelled traces in total. The corrected marker carries phase directly; zero clean payload symbols are required afterward.
+
+## 3179 — proof-carrying M36 objects
+
+An M36 candidate envelope is canonical JSON with SHA-256 content addressing, shard/engine/source provenance, independent-certifier status and hashed witness slots. Accepted envelopes must carry projector, Pauli-spectrum and logical-frame hashes plus success, negativity, stabilizer-fidelity lower bound and error-series witnesses. The known Z0/Z1/Z2 negative control is sealed as rejected; a one-field mutation fails digest verification. This protects citation integrity but does not create an accepted candidate.
+
+## 3180 — routed joint utility
+
+The 23 measured triangles form a connected route graph of diameter two and degrees 14–18. The explicit programmable utility combines detector mutual information, curvature information, shortest-route distance, route multiplicity, ISA control capacity, runtime cost and epoch confidence. In 64 deterministic scenarios it changes the detector-only action 8 times; mode choices are fast6=45, low4=11 and current4=8. Modelled utility gain is 0 to 0.0892247164, mean 0.0345842444.
+
+## 3181 BONKERS — D4 triangle Wilson flux
+
+Define \(\Phi(a,b,c)=\kappa(a,b)\oplus\kappa(b,c)\oplus\kappa(c,a)\). Over all 343 ordered nonidentity triples, 223 have zero flux and 120 have unit flux. Simultaneous conjugation produces 106 orbits: one size-one flat orbit, 39 size-two flat orbits, 36 size-four flat orbits and 30 size-four curved orbits. Across 23 measured triangles this gives 5,129 flat-flux and 2,760 curved-flux local assignments. It is an algebraic holonomy syndrome, not physical spacetime curvature.
+
+## 3182 BONKERS — recursive belief virtualization
+
+A live context uses 52 bits: 9 causal, 36 edit-mask, 4 action, 1 valid and 2 curvature-state bits. At level \(n\), the Holonet has \(40^n\) leaves and \((40^n-1)/39\) W33 cores. Replicating every context costs \(52(40^n-1)/39\) bits, whereas one active root-to-leaf path costs only \(52n\) bits with routing diameter at most \(8n\). At level six this is 5,461,333,332 replicated bits versus 312 active-path bits, an exact architectural virtualization ratio of 17,504,273.5.
+
+## Evidence ladder
+
+Exact finite: D4 curvature/flux, 194-ISA information census, length-seven epoch theorem, envelope hashes, route graph and recursive counts. Exact for explicit models: sensing/action changes and joint utility. Source-complete pending digital observation: RTL contracts, tests, integrator and workflows. Absent: exhaustive M36 outcome, placed area/timing/power, PDFs and laboratory likelihoods or optics.
diff --git a/analysis/BT3175_BT3186_curvature_routed_inference_index_insert.html b/analysis/BT3175_BT3186_curvature_routed_inference_index_insert.html
new file mode 100644
index 000000000..846d419fc
--- /dev/null
+++ b/analysis/BT3175_BT3186_curvature_routed_inference_index_insert.html
@@ -0,0 +1,8 @@
+ The exact D4 posterior now exposes none/flat/curved interaction mass. Curvature changes 1/32 stress-policy actions but 0/32 under the frozen sparse operational prior, so it is retained as a typed diagnostic rather than advertised as a universal control gain. All 194 larger universal ISAs receive exact frame-local information metrics. Their six-objective Pareto frontier has eight members; mean capacity, worst-frame capacity, variance, collisions and decoder size select different symmetry families. Twelve length-seven phase markers correct any three insertions, deletions or substitutions. The exact radius-three ball contains 3,667,012 traces per phase and 44,004,144 phase-labelled traces in total. M36 candidates now require content-addressed provenance, independent certification and complete witness hashes. A rejected negative control is sealed and a one-field mutation fails verification. The routed controller combines detector information, route cost, epoch confidence, non-Abelian curvature and ISA channel capacity. Two outside-box results add a 106-orbit D4 triangle Wilson-flux census and an exact recursive belief-virtualization law.Curvature-routed proof-carrying inference
+
=b['average']-1e-12 and a['minimum']>=b['minimum']-1e-12 and a['normalized']>=b['normalized']-1e-12 + le=a['variance']<=b['variance']+1e-12 and a['collision_probability']<=b['collision_probability']+1e-12 and a['decoder_units']<=b['decoder_units'] + strict=(a['average']>b['average']+1e-12 or a['minimum']>b['minimum']+1e-12 or a['normalized']>b['normalized']+1e-12 or a['variance']=2t+1=7','radius_three_ball_by_received_length':by,'radius_three_ball_size_per_phase':total,'total_distinct_phase_labelled_traces':12*total,'clean_payload_symbols_after_marker':0,'proof':'For constant marker a^7 and received word y of length m containing c copies of a, d_L=max(7,m)-min(7,c).','boundary':'Exact combinatorial insdel/substitution theorem. Physical symbol confusion and marker frequency are unmeasured.'} + OUT.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n');print(json.dumps(out,sort_keys=True)) +if __name__=='__main__':main() diff --git a/analysis/bt3179_m36_proof_envelope.py b/analysis/bt3179_m36_proof_envelope.py new file mode 100644 index 000000000..cb44e2c5d --- /dev/null +++ b/analysis/bt3179_m36_proof_envelope.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 +"""Pass 3179: content-addressed proof-carrying M36 candidate envelopes.""" +from __future__ import annotations +import copy,hashlib,json +from pathlib import Path +ROOT=Path(__file__).resolve().parents[1];OUT=ROOT/'data/PART_BT3179_M36_PROOF_ENVELOPE_results.json';FIX=ROOT/'data/PART_BT3179_M36_REJECTED_NEGATIVE_CONTROL.json';SCHEMA='w33.proof_carrying_m36_candidate.v1' +REQUIRED_ACCEPTED=('projector_sha256','pauli_spectrum_sha256','logical_frame_sha256','clean_success_probability','weyl_frame_negativity','product_stabilizer_fidelity_lower_bound','error_series') +def canonical(x):return json.dumps(x,sort_keys=True,separators=(',',':'),ensure_ascii=True).encode() +def digest(payload):return hashlib.sha256(canonical(payload)).hexdigest() +def seal(payload):return {'schema':SCHEMA,'payload':copy.deepcopy(payload),'sha256':digest(payload)} +def verify(e): + errors=[] + if e.get('schema')!=SCHEMA:errors.append('schema') + if e.get('sha256')!=digest(e.get('payload',{})):errors.append('digest') + p=e.get('payload',{});prov=p.get('provenance',{});cert=p.get('certification',{}) + if not all(k in prov for k in ('engine_sha256','shard_index','shard_count','source_sha256')):errors.append('provenance') + if cert.get('accepted'): + missing=[k for k in REQUIRED_ACCEPTED if k not in p.get('witnesses',{})] + if missing:errors.append('accepted_missing:'+','.join(missing)) + return {'valid':not errors,'errors':errors,'accepted':bool(cert.get('accepted',False))} +def z(i):return [0]*6+[int(j==i) for j in range(6)] +def main(): + payload={'candidate':{'name':'negative_Z0_Z1_Z2','generators':[{'vector':z(i),'sign':1} for i in range(3)]},'provenance':{'engine_sha256':'0'*64,'source_sha256':'1'*64,'shard_index':-1,'shard_count':256},'certification':{'accepted':False,'certifier_schema':'w33.pass3134.rank3_certifier.v1','reasons':['single errors not annihilated','zero clean success'],'binary_rank':3,'pairwise_commuting':True,'projector_trace':8,'max_single_error_projection_norm':0.577350269189626},'witnesses':{}} + env=seal(payload);ok=verify(env);tampered=copy.deepcopy(env);tampered['payload']['candidate']['name']='tampered';bad=verify(tampered) + assert ok['valid'] and not ok['accepted'] and not bad['valid'] and 'digest' in bad['errors'] + FIX.write_text(json.dumps(env,indent=2,sort_keys=True)+'\n') + out={'schema':'w33.pass3179.m36_proof_envelope_test.v1','negative_control':ok,'tamper_test':bad,'envelope_sha256':env['sha256'],'accepted_required_witnesses':list(REQUIRED_ACCEPTED),'promotion_rule':'No M36 candidate may be cited as accepted without a valid content digest, provenance, independent certification and complete witness hash set.','boundary':'Envelope integrity is exact. The negative control is rejected; no accepted M36 candidate is asserted.'} + OUT.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n');print(json.dumps(out,sort_keys=True)) +if __name__=='__main__':main() diff --git a/analysis/bt3180_routed_joint_utility.py b/analysis/bt3180_routed_joint_utility.py new file mode 100644 index 000000000..ec3c6f42b --- /dev/null +++ b/analysis/bt3180_routed_joint_utility.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python3 +"""Pass 3180: joint detector/route/epoch/curvature/ISA utility.""" +from __future__ import annotations +import json,math +from collections import Counter,deque +from pathlib import Path +import numpy as np +ROOT=Path(__file__).resolve().parents[1];OUT=ROOT/'data/PART_BT3180_ROUTED_JOINT_UTILITY_results.json' +TRIS=[(5,6,9),(2,5,9),(4,5,8),(2,4,7),(0,3,6),(0,1,8),(1,2,4),(1,3,5),(3,4,8),(0,4,9),(2,3,8),(4,8,9),(1,7,8),(1,4,6),(0,2,3),(3,7,9),(1,3,9),(2,6,9),(3,5,7),(0,1,7),(3,6,8),(0,4,5),(4,6,7)] +CHANNEL=np.array([[.94,.03,.03],[.08,.86,.06],[.08,.06,.86]]) +MODES={'current4':(1.8495219521538164,14.175585133744857,.1388888888888889),'low4':(1.905077507709372,15.216323969288219,.1111111111111111),'fast6':(2.41056972808296,13.72936957018747,.12962962962962962)} +COEFF={'curvature':.35,'route_distance':.025,'route_multiplicity':.008,'isa_capacity':.025,'runtime':.01,'epoch_noncurrent':.03} +def mi(pn,pf,pc,a,aware): + p=[pn];c=[CHANNEL[0]] + for t in range(23):p.extend((pf[t],pc[t]));c.extend((CHANNEL[1] if t==a else CHANNEL[0],CHANNEL[2] if t==a else CHANNEL[0])) + p=np.array(p);c=np.array(c) + if not aware:c=np.column_stack((c[:,0],c[:,1]+c[:,2])) + py=p@c;z=0. + for ph,row in zip(p,c): + for j,q in enumerate(row): + if ph>0 and q>0:z+=ph*q*math.log2(q/py[j]) + return z +def route_tables(): + adj=[[] for _ in range(23)] + for i in range(23): + for j in range(23): + if i!=j and set(TRIS[i])&set(TRIS[j]):adj[i].append(j) + D=[];W=[] + for s in range(23): + d=[-1]*23;w=[0]*23;d[s]=0;w[s]=1;q=deque([s]) + while q: + u=q.popleft() + for v in adj[u]: + if d[v]<0:d[v]=d[u]+1;w[v]=w[u];q.append(v) + elif d[v]==d[u]+1:w[v]+=w[u] + D.append(d);W.append(w) + return adj,D,W +def main(): + adj,D,W=route_tables();rng=np.random.default_rng(3180);rows=[] + for _ in range(64): + shared=float(rng.uniform(.02,.65));tri=rng.dirichlet(np.ones(23)*.8);split=rng.beta(.8,.8,23);pf=shared*tri*split;pc=shared*tri*(1-split);pn=1-shared + aware=np.array([mi(pn,pf,pc,a,True) for a in range(23)]);collapsed=np.array([mi(pn,pf,pc,a,False) for a in range(23)]);curv=aware-collapsed + loc=int(rng.integers(23));epoch=float(rng.uniform(.6,1));price=float(rng.uniform(0,25));avail={'current4':True,'low4':bool(rng.random()<.9),'fast6':bool(rng.random()<.7)};scores={} + for a in range(23): + for mode,(cap,L,pcol) in MODES.items(): + if not avail[mode]:continue + runtime=L*(1+price*pcol);scores[(a,mode)]=(aware[a]+COEFF['curvature']*curv[a]-COEFF['route_distance']*D[loc][a]-COEFF['route_multiplicity']*math.log2(max(1,W[loc][a]))+COEFF['isa_capacity']*cap-COEFF['runtime']*runtime-COEFF['epoch_noncurrent']*(1-epoch)*(mode!='current4')) + best=max(scores,key=scores.get);base=(int(np.argmax(aware)),'current4');rows.append({'best_action':best[0],'best_mode':best[1],'detector_action':base[0],'utility_gain':scores[best]-scores[base],'origin':loc,'collision_price':price,'epoch_confidence':epoch}) + gains=[r['utility_gain'] for r in rows];out={'schema':'w33.pass3180.routed_joint_utility.v1','scenarios':64,'route_graph':{'connected':True,'degree_min':min(map(len,adj)),'degree_max':max(map(len,adj)),'diameter':max(max(d) for d in D)},'coefficients':COEFF,'action_changes':sum(r['best_action']!=r['detector_action'] for r in rows),'mode_counts':dict(Counter(r['best_mode'] for r in rows)),'utility_gain':{'minimum':min(gains),'mean':sum(gains)/len(gains),'maximum':max(gains)},'rows':rows,'boundary':'Exact for explicit synthetic posteriors, availability draws and programmable utility coefficients; not a physical optimum.'} + OUT.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n');print(json.dumps({k:out[k] for k in ('action_changes','mode_counts','utility_gain')},sort_keys=True)) +if __name__=='__main__':main() diff --git a/analysis/bt3181_d4_triangle_wilson_flux.py b/analysis/bt3181_d4_triangle_wilson_flux.py new file mode 100644 index 000000000..6275fba48 --- /dev/null +++ b/analysis/bt3181_d4_triangle_wilson_flux.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +"""Pass 3181: D4 triangle Wilson-flux census.""" +from __future__ import annotations +import itertools,json +from collections import Counter +from pathlib import Path +ROOT=Path(__file__).resolve().parents[1];OUT=ROOT/'data/PART_BT3181_D4_TRIANGLE_WILSON_FLUX_results.json' +E=[(i,j) for i in range(4) for j in range(2)];ONE=(0,0);N=[x for x in E if x!=ONE] +def mul(a,b): + i,j=a;k,l=b;return ((i+(k if j==0 else -k))%4,(j+l)%2) +def inv(a):return next(b for b in E if mul(a,b)==ONE and mul(b,a)==ONE) +def conj(g,a):return mul(mul(g,a),inv(g)) +def comm(a,b):return mul(mul(mul(a,b),inv(a)),inv(b)) +def k(a,b):return int(comm(a,b)!=ONE) +def flux(t):a,b,c=t;return k(a,b)^k(b,c)^k(c,a) +def main(): + triples=list(itertools.product(N,repeat=3));c=Counter(flux(t) for t in triples);seen=set();orbits=Counter() + for t in triples: + if t in seen:continue + o={tuple(conj(g,x) for x in t) for g in E};seen|=o;orbits[(len(o),flux(t))]+=1 + assert c=={0:223,1:120} and sum(orbits.values())==106 + out={'schema':'w33.pass3181.d4_triangle_wilson_flux.v1','definition':'Phi(a,b,c)=kappa(a,b) xor kappa(b,c) xor kappa(c,a)','ordered_nonidentity_triples':343,'flux_zero':223,'flux_one':120,'simultaneous_conjugation_orbits':106,'orbit_census':[{'orbit_size':s,'flux':f,'orbits':n} for (s,f),n in sorted(orbits.items())],'across_23_measured_triangles':{'assignments':7889,'flat_flux':5129,'curved_flux':2760},'theorem':'Phi is invariant under simultaneous conjugation because each D4 commutator lies in the central derived subgroup {1,r^2}.','boundary':'Exact finite non-Abelian holonomy syndrome; not spacetime curvature or measured optical phase.'} + OUT.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n');print(json.dumps(out,sort_keys=True)) +if __name__=='__main__':main() diff --git a/analysis/bt3182_recursive_belief_virtualization.py b/analysis/bt3182_recursive_belief_virtualization.py new file mode 100644 index 000000000..8bcc0485b --- /dev/null +++ b/analysis/bt3182_recursive_belief_virtualization.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 +"""Pass 3182: recursive Holonet belief virtualization law.""" +from __future__ import annotations +import json +from pathlib import Path +ROOT=Path(__file__).resolve().parents[1];OUT=ROOT/'data/PART_BT3182_RECURSIVE_BELIEF_VIRTUALIZATION_results.json';BITS=52 +def main(): + rows=[] + for n in range(1,7): + leaves=40**n;cores=(leaves-1)//39;rows.append({'level':n,'leaves':leaves,'W33_cores':cores,'routing_diameter_bound':8*n,'globally_replicated_context_bits':BITS*cores,'active_root_to_leaf_context_bits':BITS*n,'virtualization_ratio':cores/n}) + out={'schema':'w33.pass3182.recursive_belief_virtualization.v1','context_bits':BITS,'context_breakdown':{'causal':9,'two_edit_masks':36,'action':4,'valid':1,'curvature_state':2},'laws':{'leaves':'40^n','cores':'(40^n-1)/39','global_bits':'52(40^n-1)/39','active_path_bits':'52n','routing_diameter_bound':'8n'},'rows':rows,'interpretation':'A recursively addressed machine need not hold every core live belief on-chip: active execution state grows linearly in depth while the logical network grows exponentially.','boundary':'Exact architectural state-count law under one active root-to-leaf execution path; concurrency, checkpoint storage and physical memory traffic are separate.'} + OUT.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n');print(json.dumps(out,sort_keys=True)) +if __name__=='__main__':main() diff --git a/data/PART_BT3175_BT3186_CURVATURE_ROUTED_INFERENCE_source_summary.json b/data/PART_BT3175_BT3186_CURVATURE_ROUTED_INFERENCE_source_summary.json new file mode 100644 index 000000000..74e8ab906 --- /dev/null +++ b/data/PART_BT3175_BT3186_CURVATURE_ROUTED_INFERENCE_source_summary.json @@ -0,0 +1,29 @@ +{ + "schema": "w33.pass3175_3186.curvature_routed_inference.source_summary.v1", + "status": "PASS_EXACT_AND_MODELED_SOURCE", + "curvature": { + "hypotheses": {"none": 45445, "flat": 1725, "curved": 1656}, + "stress_action_changes": 1, + "stress_mean_gain_bits": 0.03552383939697967, + "operational_action_changes": 0, + "operational_mean_gain_bits": 0.000003938330856765155 + }, + "information_frontier": { + "universal_designs": 194, + "pareto_designs": 8, + "maximum_average_bits": 2.414140381361786, + "maximum_minimum_bits": 1.792481250360578, + "minimum_variance": 0.03575318151973104 + }, + "three_edit_epoch": { + "marker_length": 7, + "traces_per_phase": 3667012, + "total_phase_labelled_traces": 44004144, + "post_marker_clean_symbols": 0 + }, + "m36_envelope": {"negative_control_valid_and_rejected": true, "tamper_rejected": true, "accepted_candidate_claim": false}, + "routed_utility": {"scenarios": 64, "action_changes": 8, "mode_counts": {"fast6": 45, "low4": 11, "current4": 8}, "mean_gain": 0.03458424440701498}, + "wilson_flux": {"triples": 343, "flat": 223, "curved": 120, "conjugation_orbits": 106}, + "recursive_virtualization_level6": {"replicated_bits": 5461333332, "active_path_bits": 312, "ratio": 17504273.5}, + "boundary": "Python exact/model results locally observed. RTL simulation/synthesis/place, canonical PDF builds, exhaustive M36 outcome and laboratory behavior remain separate gates." +} diff --git a/data/w33_pass_namespace_registry_v2.d/3175-3186.json b/data/w33_pass_namespace_registry_v2.d/3175-3186.json new file mode 100644 index 000000000..c22e77eac --- /dev/null +++ b/data/w33_pass_namespace_registry_v2.d/3175-3186.json @@ -0,0 +1,22 @@ +{ + "schema": "w33.pass_namespace_reservation.v2", + "range": "3175-3186", + "owner": "agent/pass3175-3186-curvature-routed-inference", + "status": "source_complete_evidence_pending", + "reserved_after": "PR #243 readable head e35b90b2535f45e570b782c6c9782ab74eb00d93", + "passes": { + "3175": "D4 curvature latent and exact posterior marginal", + "3176": "curvature-conditioned controlled-sensing comparison", + "3177": "all-194 exact information frontier", + "3178": "optimal length-seven three-edit phase code", + "3179": "content-addressed proof-carrying M36 envelope", + "3180": "joint detector-route-epoch-curvature-ISA utility", + "3181": "D4 triangle Wilson-flux orbit census", + "3182": "recursive Holonet belief virtualization law", + "3183": "typed RTL/control contracts", + "3184": "Holonet and blueprint overhaul", + "3185": "focused tests and evidence workflows", + "3186": "claim ledger, integration and publication boundary" + }, + "claim_boundary": "Exact/model sources complete. RTL, placement, PDFs, exhaustive M36 outcome and all physical claims remain pending." +} diff --git a/rtl/tb_w33_pass3175_3183_curvature_routed_runtime.sv b/rtl/tb_w33_pass3175_3183_curvature_routed_runtime.sv new file mode 100644 index 000000000..966be6c44 --- /dev/null +++ b/rtl/tb_w33_pass3175_3183_curvature_routed_runtime.sv @@ -0,0 +1,29 @@ +`timescale 1ns/1ps +module tb_w33_pass3175_3183_curvature_routed_runtime; + logic clk=0,rst=1,valid;logic [1:0] cls;logic [15:0] weight;logic [31:0] n,f,c; + logic eval;logic [3:0] rlen;logic [47:0] counts;logic lock,amb;logic [3:0] phase; + logic digest,prov,cert,wit,acc,auth;logic [2:0] a,b,x;logic flux; + logic first,last,available;logic [4:0] action;logic [1:0] mode;logic signed [31:0] util,best;logic done;logic [4:0] ba;logic [1:0] bm; + always #5 clk=~clk; + w33_pass3175_curvature_accumulator ca(clk,rst,valid,cls,weight,n,f,c); + w33_pass3178_three_edit_epoch_decoder ep(eval,rlen,counts,lock,amb,phase); + w33_pass3179_m36_envelope_gate eg(digest,prov,cert,wit,acc,auth); + w33_pass3181_d4_triangle_flux wf(a,b,x,flux); + w33_pass3180_streamed_routed_utility ru(clk,rst,first,valid,last,available,action,mode,util,done,ba,bm,best); + task tick;begin @(negedge clk);@(posedge clk);#1;end endtask + initial begin + valid=0;cls=0;weight=0;eval=0;rlen=0;counts=0;digest=0;prov=0;cert=0;wit=0;acc=0; + a=0;b=0;x=0;first=0;last=0;available=0;action=0;mode=0;util=0; + repeat(2)tick();rst=0; + cls=0;weight=10;valid=1;tick();cls=1;weight=7;tick();cls=2;weight=5;tick();valid=0; + if(n!=10||f!=7||c!=5)$fatal(1,"curvature accumulators"); + rlen=7;counts=0;counts[4*5 +:4]=4'd4;eval=1;#1; + if(!lock||amb||phase!=5)$fatal(1,"three-edit epoch"); + digest=1;prov=1;cert=1;wit=1;acc=0;#1;if(auth)$fatal(1,"rejected envelope authorized");acc=1;#1;if(!auth)$fatal(1,"accepted envelope blocked"); + // reflections r^0s,r^1s,r^2s give two curved edges and zero triangle flux. + a=3'b100;b=3'b101;x=3'b110;#1;if(flux!==0)$fatal(1,"D4 flux mismatch"); + first=1;valid=1;available=1;action=1;mode=0;util=100;tick();first=0;action=2;mode=2;util=130;tick();action=3;mode=1;util=120;last=1;tick();valid=0;last=0; + if(!done||ba!=2||bm!=2||best!=130)$fatal(1,"utility argmax"); + $display("PASS curvature, three-edit epoch, envelope, Wilson flux and routed utility");$finish; + end +endmodule diff --git a/rtl/w33_pass3175_3183_curvature_routed_runtime.sv b/rtl/w33_pass3175_3183_curvature_routed_runtime.sv new file mode 100644 index 000000000..e56d56ddd --- /dev/null +++ b/rtl/w33_pass3175_3183_curvature_routed_runtime.sv @@ -0,0 +1,62 @@ +// Passes 3175-3183: typed curvature, epoch, envelope and routed-utility contracts. +module w33_pass3175_curvature_accumulator( + input logic clk,input logic rst,input logic valid_i,input logic [1:0] class_i,input logic [15:0] weight_i, + output logic [31:0] none_o,output logic [31:0] flat_o,output logic [31:0] curved_o); + always_ff @(posedge clk) begin + if(rst) begin none_o<=0;flat_o<=0;curved_o<=0;end + else if(valid_i) case(class_i) + 2'd0:none_o<=none_o+weight_i;2'd1:flat_o<=flat_o+weight_i;2'd2:curved_o<=curved_o+weight_i;default:; + endcase + end +endmodule + +module w33_pass3178_three_edit_epoch_decoder( + input logic valid_i,input logic [3:0] received_length_i,input logic [47:0] phase_symbol_counts_i, + output logic locked_o,output logic ambiguous_o,output logic [3:0] phase_o); + integer p;integer c;integer mn;integer mx;integer d;integer hits; + always_comb begin + locked_o=0;ambiguous_o=0;phase_o=0;hits=0; + if(valid_i) begin + for(p=0;p<12;p=p+1) begin + c=phase_symbol_counts_i[p*4 +: 4];mn=(c<7)?c:7;mx=(received_length_i>7)?received_length_i:7;d=mx-mn; + if(d<=3) begin hits=hits+1;phase_o=p[3:0];end + end + locked_o=(hits==1);ambiguous_o=(hits>1); + end + end +endmodule + +module w33_pass3179_m36_envelope_gate( + input logic digest_valid_i,input logic provenance_valid_i,input logic certification_valid_i, + input logic witnesses_complete_i,input logic accepted_i,output logic injection_authorized_o); + always_comb injection_authorized_o=digest_valid_i&provenance_valid_i&certification_valid_i&witnesses_complete_i&accepted_i; +endmodule + +module w33_pass3181_d4_triangle_flux( + input logic [2:0] a_i,input logic [2:0] b_i,input logic [2:0] c_i,output logic flux_o); + function automatic logic kappa(input logic [2:0] a,input logic [2:0] b); + logic [1:0] ia,ib;logic ja,jb; + begin ia=a[1:0];ib=b[1:0];ja=a[2];jb=b[2]; + if(!ja&&!jb) kappa=1'b0; + else if(!ja&&jb) kappa=ia[0]; + else if(ja&&!jb) kappa=ib[0]; + else kappa=ia[0]^ib[0]; + end + endfunction + always_comb flux_o=kappa(a_i,b_i)^kappa(b_i,c_i)^kappa(c_i,a_i); +endmodule + +module w33_pass3180_streamed_routed_utility( + input logic clk,input logic rst,input logic first_i,input logic valid_i,input logic last_i,input logic available_i, + input logic [4:0] action_i,input logic [1:0] mode_i,input logic signed [31:0] utility_i, + output logic done_o,output logic [4:0] best_action_o,output logic [1:0] best_mode_o,output logic signed [31:0] best_utility_o); + always_ff @(posedge clk) begin + if(rst) begin done_o<=0;best_action_o<=0;best_mode_o<=0;best_utility_o<=-32'sh7fffffff;end + else begin + done_o<=0; + if(first_i) begin best_action_o<=action_i;best_mode_o<=mode_i;best_utility_o<=available_i?utility_i:-32'sh7fffffff;end + else if(valid_i&&available_i&&utility_i>best_utility_o) begin best_action_o<=action_i;best_mode_o<=mode_i;best_utility_o<=utility_i;end + if(valid_i&&last_i) done_o<=1; + end + end +endmodule diff --git a/tests/test_bt3175_bt3186_curvature_routed_inference.py b/tests/test_bt3175_bt3186_curvature_routed_inference.py new file mode 100644 index 000000000..a56dd603d --- /dev/null +++ b/tests/test_bt3175_bt3186_curvature_routed_inference.py @@ -0,0 +1,17 @@ +from pathlib import Path +import json,subprocess,sys +ROOT=Path(__file__).resolve().parents[1] +SCRIPTS=['bt3175_3176_curvature_conditioned_sensing.py','bt3177_all194_information_frontier.py','bt3178_three_edit_phase_epoch.py','bt3179_m36_proof_envelope.py','bt3180_routed_joint_utility.py','bt3181_d4_triangle_wilson_flux.py','bt3182_recursive_belief_virtualization.py','bt3175_3186_curvature_routed_inference_summary.py'] +def test_all_generators(): + for s in SCRIPTS:subprocess.run([sys.executable,str(ROOT/'analysis'/s)],check=True,stdout=subprocess.DEVNULL) +def load(n):return json.loads((ROOT/'data'/n).read_text()) +def test_curvature_boundary(): + d=load('PART_BT3175_BT3176_CURVATURE_CONDITIONED_SENSING_results.json');assert d['stress']['action_changes']==1 and d['operational_sparse_prior']['action_changes']==0 +def test_information_frontier(): + d=load('PART_BT3177_ALL194_INFORMATION_FRONTIER_results.json');assert d['universal_designs']==194 and d['pareto_count']==8 +def test_three_edit_epoch(): + d=load('PART_BT3178_THREE_EDIT_PHASE_EPOCH_results.json');assert d['marker_length']==7 and d['total_distinct_phase_labelled_traces']==44004144 +def test_proof_envelope(): + d=load('PART_BT3179_M36_PROOF_ENVELOPE_results.json');assert d['negative_control']['valid'] and not d['tamper_test']['valid'] +def test_routed_flux_virtualization(): + a=load('PART_BT3180_ROUTED_JOINT_UTILITY_results.json');b=load('PART_BT3181_D4_TRIANGLE_WILSON_FLUX_results.json');c=load('PART_BT3182_RECURSIVE_BELIEF_VIRTUALIZATION_results.json');assert a['action_changes']==8 and b['simultaneous_conjugation_orbits']==106 and c['rows'][-1]['active_root_to_leaf_context_bits']==312 diff --git a/tools/integrate_bt3175_bt3186.py b/tools/integrate_bt3175_bt3186.py new file mode 100644 index 000000000..d2fc23f72 --- /dev/null +++ b/tools/integrate_bt3175_bt3186.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python3 +"""Idempotently integrate Passes 3175-3186 into canonical front doors. + +The canonical manuscripts contain a small amount of legacy non-UTF-8 data. Use +surrogateescape so every untouched byte round-trips exactly while the inserted block +remains ordinary UTF-8 text. +""" +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[1] +TEX = [ROOT / 'w33_paper.tex', ROOT / 'photonic_holonet.tex', ROOT / 'holonet_machine_blueprint.tex'] +HTML = ROOT / 'docs/index.html' +TB = '% BEGIN BT3175-BT3186 CURVATURE ROUTED INFERENCE' +TE = '% END BT3175-BT3186 CURVATURE ROUTED INFERENCE' +HB = '' +HE = '' +TEX_BLOCK = f"\n{TB}\n\\input{{analysis/BT3175_BT3186_curvature_routed_inference_insert}}\n{TE}\n" +HTML_BODY = (ROOT / 'analysis/BT3175_BT3186_curvature_routed_inference_index_insert.html').read_text(encoding='utf-8').strip() +HTML_BLOCK = f"\n{HB}\n{HTML_BODY}\n{HE}\n" + + +def read_preserving_bytes(path: Path) -> str: + return path.read_text(encoding='utf-8', errors='surrogateescape') + + +def write_preserving_bytes(path: Path, text: str) -> None: + path.write_text(text, encoding='utf-8', errors='surrogateescape') + + +def splice(text: str, begin: str, end: str, block: str, anchor: str) -> str: + if begin in text: + a = text.index(begin) + b = text.index(end, a) + len(end) + return text[:a] + block.strip('\n') + text[b:] + p = text.rfind(anchor) + if p < 0: + raise RuntimeError(f'missing anchor {anchor}') + return text[:p] + block + text[p:] + + +def main() -> None: + for path in TEX: + write_preserving_bytes( + path, + splice(read_preserving_bytes(path), TB, TE, TEX_BLOCK, '\\end{document}'), + ) + write_preserving_bytes( + HTML, + splice(read_preserving_bytes(HTML), HB, HE, HTML_BLOCK, '