diff --git a/.github/workflows/r420-forest-cut-budget.yml b/.github/workflows/r420-forest-cut-budget.yml new file mode 100644 index 0000000000..41f284b9df --- /dev/null +++ b/.github/workflows/r420-forest-cut-budget.yml @@ -0,0 +1,82 @@ +name: R420 forest finite and formal coverage + +on: + pull_request: + paths: + - 'research/r420-forest-cut-budget/**' + - 'research/e8-bit-r420/**' + - 'research/e8-bit-carrier-skeleton/**' + - 'certificates/checkpoints/k492626.json' + - '.github/workflows/r420-forest-cut-budget.yml' + push: + paths: + - 'research/r420-forest-cut-budget/**' + - 'research/e8-bit-r420/**' + - 'research/e8-bit-carrier-skeleton/**' + - 'certificates/checkpoints/k492626.json' + - '.github/workflows/r420-forest-cut-budget.yml' + workflow_dispatch: + +permissions: + contents: read + +defaults: + run: + shell: bash + +jobs: + finite-and-formal: + runs-on: ubuntu-24.04 + timeout-minutes: 45 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7, repository baseline pin + with: + # Historical source pins must be checked at the submitted head. + ref: ${{ github.event.pull_request.head.sha || github.sha }} + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7, repository baseline pin + with: + python-version: '3.13' + - name: Install C++ and Lean dependencies + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends g++ libboost-dev + curl --proto '=https' --tlsv1.2 -sSf --connect-timeout 15 --max-time 120 https://raw.githubusercontent.com/leanprover/elan/0e36a07b9bbcc5381fa6250df109f9a4f94d7bac/elan-init.sh -o "$RUNNER_TEMP/elan-init.sh" + sh "$RUNNER_TEMP/elan-init.sh" -y --default-toolchain none + "$HOME/.elan/bin/elan" toolchain install "$(cat research/r420-forest-cut-budget/lean-toolchain)" + echo "$HOME/.elan/bin" >> "$GITHUB_PATH" + - name: Record the checked revision, files and environment + run: | + mkdir -p "$RUNNER_TEMP/r420-forest-cut-budget" + git rev-parse HEAD | tee "$RUNNER_TEMP/r420-forest-cut-budget/HEAD.txt" + git ls-tree -r HEAD -- research/r420-forest-cut-budget > "$RUNNER_TEMP/r420-forest-cut-budget/FILES.txt" + { + python3 --version + g++ --version + elan run "$(cat research/r420-forest-cut-budget/lean-toolchain)" lean --version + } | tee "$RUNNER_TEMP/r420-forest-cut-budget/environment.txt" + - name: Rebuild finite certificates, run controls and check Lean axioms + timeout-minutes: 10 + run: | + lean_bin="$(cd research/r420-forest-cut-budget && elan which lean)" + python3 -B research/r420-forest-cut-budget/reproduce.py --lean "$lean_bin" | tee "$RUNNER_TEMP/r420-forest-cut-budget/reproduce.log" + - name: Replay selected circuit and missing-restoration control + timeout-minutes: 20 + run: | + python3 -B research/r420-forest-cut-budget/native.py --cxx g++ --boost /usr/include --out "$RUNNER_TEMP/r420-forest-cut-budget/selected" + - name: Require native rejection of the uncut 106-bit calibration + timeout-minutes: 20 + run: | + python3 -B research/r420-forest-cut-budget/native.py --cxx g++ --boost /usr/include --out "$RUNNER_TEMP/r420-forest-cut-budget/uncut" --candidate research/r420-forest-cut-budget/data/optimum.json.gz --recipe research/r420-forest-cut-budget/data/optimum-recipe.json --expect-prefix-rejection + - name: Require committed artifacts unchanged + run: git diff --exit-code + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + if: always() + with: + name: r420-forest-finite-and-formal + path: | + ${{ runner.temp }}/r420-forest-cut-budget/*.txt + ${{ runner.temp }}/r420-forest-cut-budget/*.log + ${{ runner.temp }}/r420-forest-cut-budget/*/*.log + ${{ runner.temp }}/r420-forest-cut-budget/*/VERIFY.json + ${{ runner.temp }}/r420-forest-cut-budget/*/NATIVE-RESULTS.json diff --git a/research/r420-forest-cut-budget/CLAIM.json b/research/r420-forest-cut-budget/CLAIM.json new file mode 100644 index 0000000000..aca2aef97a --- /dev/null +++ b/research/r420-forest-cut-budget/CLAIM.json @@ -0,0 +1,60 @@ +{ + "track": "bit supplier", + "assignment_seed": 6, + "base_commit": "66849e1475c930fd7732b1a0067ffee7e1e95f60", + "started_utc": "2026-10-13T04:52:39.487231+00:00", + "claimed_utc": "2026-10-13T04:58:55.587591+00:00", + "expected_finish_utc": "2026-10-13T06:25:00+00:00", + "scope": "R420 frame-zero compensation: reversible rooted-forest target basis and exact minimum-spanning-tree certificate for this circuit class", + "method": "All 120 target rows; 7140 undirected pair weights plus 120 root weights; seed 6 deterministically orders equal-cost edges; complete exact basis-column replay and cut/cycle certificate; positive-prefix accounting and meaningful mutants. Reserve final quarter for verification and handoff.", + "expected_deliverable": "One research construction with restricted optimality theorem, standalone replay, exact certificate and focused PR; no new kappa claim.", + "candidate_tasks": [ + { + "task": "R420 local block/cleanup resynthesis", + "decision": "Not chosen: overlaps #670/#674/#688/#691/#710." + }, + { + "task": "R420 early helper reuse or target-read hoist", + "decision": "Not chosen: monotone frame constraints; early target reads conflict with retained-copy scatter boundary." + }, + { + "task": "R420 rooted-forest target compensation", + "decision": "Chosen: expands #713/#716 disjoint-pair class to arbitrary forests with polynomial exact optimum and a separate proof certificate." + } + ], + "coordination": "GitHub repository pinnedIssues query returned no pinned issue; open issue list only #650. Claim recorded locally as brief permits.", + "overlap_checked": [ + "#450", + "#476", + "#478", + "#686", + "#694", + "#713", + "#716", + "#731", + "#733", + "#742", + "#748", + "#753", + "#759" + ], + "status": "complete", + "attribution": "Anthony (@anthonylei), substantial OpenAI Codex multi-agent assistance; predecessor lineage credited in the research note", + "completed_utc": "2026-10-13T05:21:00.572178+00:00", + "result": "Finite target-forest construction:4897 fewer XORs, unchanged104-bit admission; exact14921 unrestricted class optimum (106-bit rejected calibration); exact15025 cut-class optimum via724states; generic Lean proof; no new kappa.", + "result_url": "https://github.com/anthonylei/integer-mult-bounds/tree/research/seed06-bit-supplier/research/r420-forest-cut-budget", + "coverage": { + "complete_graph_vertices": 121, + "complete_graph_edges": 7260, + "non_tree_edges_certified": 7140, + "cut_positions": 116, + "cut_subsets_covered": "83076749736557242056487941267521536", + "cut_dp_states": 724, + "stopping_rule": "Complete fixed seed-6 MST and exact all-cut DP, followed by independent verification. No broader tree or circuit optimization claim.", + "assignment_randomness": "One secrets.randbelow(100) call; draw6, recorded before task selection.", + "seed_diversification": "SHA256(seed:u:v) total order selects one tied MST for the fixed-tree cut theorem." + }, + "evidence_driven_pivot": "After the uncut scalar optimum failed native104-bit payload checks, solve the complete cut-subset budget problem rather than reuse its failing invoice.", + "scope_control": "Reparent32 from37 to34 gives15023 D XORs and exact104-bit scalar/frame pass outside the frozen cut family; explicitly documented and tested.", + "late_overlap": "Oscar Fennell PR759 arrived during final validation with same forest class and14921 floor. This independently corroborates its floor and adds exact all-cut budget optimum15025 (113 XORs below its15138 construction) and generic Lean proof. Renamed package to r420-forest-cut-budget to avoid path collision. No priority for the forest mechanism claimed." +} diff --git a/research/r420-forest-cut-budget/Forest.lean b/research/r420-forest-cut-budget/Forest.lean new file mode 100644 index 0000000000..abcaac58a9 --- /dev/null +++ b/research/r420-forest-cut-budget/Forest.lean @@ -0,0 +1,213 @@ +import Init + +/-! +Generic Boolean semantics for target-forest compensation. + +The circuit theorems below quantify over arbitrary register types, arbitrary +initial target/helper values, and arbitrary finite lists of legal XOR gates. +The inverse is the literal reversed gate list. No concrete R420 word, geometry, +cost bound, COPY/ERASE lifecycle, or physical frame transport is asserted here. +Prepared with OpenAI assistance; original project attribution is retained. +-/ + +namespace TargetForest + +set_option Elab.async false + +abbrev State (Reg : Type) := Reg → Bool + +/-- A reversible target transvection; self-addition is excluded at the boundary. -/ +structure Gate (Reg : Type) where + dst : Reg + src : Reg + distinct : dst ≠ src + +variable {Reg : Type} [DecidableEq Reg] + +def add (x y : State Reg) : State Reg := fun r => x r ^^ y r + +def step (g : Gate Reg) (x : State Reg) : State Reg := + fun r => if r = g.dst then x r ^^ x g.src else x r + +/-- Execute from left to right, exactly as a sequential gate word. -/ +def run : List (Gate Reg) → State Reg → State Reg + | [], x => x + | g :: gs, x => run gs (step g x) + +private theorem xor_shuffle (a b c d : Bool) : + ((a ^^ b) ^^ (c ^^ d)) = ((a ^^ c) ^^ (b ^^ d)) := by + cases a <;> cases b <;> cases c <;> cases d <;> rfl + +private theorem xor_cancel (a b : Bool) : ((a ^^ b) ^^ b) = a := by + cases a <;> cases b <;> rfl + +theorem step_add (g : Gate Reg) (x y : State Reg) : + step g (add x y) = add (step g x) (step g y) := by + funext r + by_cases hr : r = g.dst + · simp only [step, add, if_pos hr] + exact xor_shuffle _ _ _ _ + · simp only [step, add, if_neg hr] + +theorem step_involutive (g : Gate Reg) (x : State Reg) : + step g (step g x) = x := by + funext r + by_cases hr : r = g.dst + · have hs : g.src ≠ g.dst := Ne.symm g.distinct + simp only [step, if_pos hr, if_neg hs] + exact xor_cancel _ _ + · simp only [step, if_neg hr] + +theorem run_add (gs : List (Gate Reg)) (x y : State Reg) : + run gs (add x y) = add (run gs x) (run gs y) := by + induction gs generalizing x y with + | nil => rfl + | cons g gs ih => + simp only [run, step_add, ih] + +theorem run_append (as bs : List (Gate Reg)) (x : State Reg) : + run (as ++ bs) x = run bs (run as x) := by + induction as generalizing x with + | nil => rfl + | cons a as ih => + exact ih (step a x) + +/-- Reversing a legal XOR word constructs its inverse, for every initial state. -/ +theorem run_reverse (gs : List (Gate Reg)) (x : State Reg) : + run gs.reverse (run gs x) = x := by + induction gs generalizing x with + | nil => rfl + | cons g gs ih => + simp only [List.reverse_cons, run_append, run] + rw [ih, step_involutive] + +/-- Core compensation identity: prepare by A, inject A d, then undo A. -/ +theorem compensated_injection (gs : List (Gate Reg)) (x d : State Reg) : + run gs.reverse (add (run gs x) (run gs d)) = add x d := by + rw [← run_add, run_reverse] + +/-- Every destination occurs once, and a parent is changed only after its children. +Roots need no gate. The condition also permits parents outside the target list. -/ +def ForestOrdered : List (Gate Reg) → Prop + | [] => True + | g :: gs => ForestOrdered gs ∧ + ∀ h ∈ gs, g.dst ≠ h.dst ∧ g.dst ≠ h.src + +/-- The parent edge encoded by a child's unique gate. -/ +def parent : List (Gate Reg) → Reg → Option Reg + | [], _ => none + | g :: gs, r => if r = g.dst then some g.src else parent gs r + +/-- The sparse forest matrix I + P, expressed without a matrix library. -/ +def forestAction (gs : List (Gate Reg)) (x : State Reg) : State Reg := + fun r => match parent gs r with + | none => x r + | some p => x r ^^ x p + +theorem run_untouched (gs : List (Gate Reg)) (x : State Reg) (r : Reg) + (h : ∀ g ∈ gs, r ≠ g.dst) : run gs x r = x r := by + induction gs generalizing x with + | nil => rfl + | cons g gs ih => + change run gs (step g x) r = x r + rw [ih (step g x) (fun q hq => h q (List.mem_cons_of_mem g hq))] + simp only [step, if_neg (h g List.mem_cons_self)] + +private theorem parent_some (gs : List (Gate Reg)) (r p : Reg) + (h : parent gs r = some p) : + ∃ g ∈ gs, r = g.dst ∧ p = g.src := by + induction gs with + | nil => simp [parent] at h + | cons g gs ih => + by_cases hr : r = g.dst + · simp only [parent, if_pos hr, Option.some.injEq] at h + exact ⟨g, List.mem_cons_self, hr, h.symm⟩ + · simp only [parent, if_neg hr] at h + obtain ⟨q, hq, hrq, hpq⟩ := ih h + exact ⟨q, List.mem_cons_of_mem g hq, hrq, hpq⟩ + +private theorem forestAction_step (gs : List (Gate Reg)) (g : Gate Reg) + (h : ∀ q ∈ gs, g.dst ≠ q.src) (x : State Reg) (r : Reg) + (hr : r ≠ g.dst) : forestAction gs (step g x) r = forestAction gs x r := by + unfold forestAction + cases hp : parent gs r with + | none => simp only [step, if_neg hr] + | some p => + obtain ⟨q, hq, _, hpq⟩ := parent_some gs r p hp + have hpg : p ≠ g.dst := by + rw [hpq] + exact Ne.symm (h q hq) + simp only [step, if_neg hr, if_neg hpg] + +/-- Children-before-parent execution really is A = I + P on all initial bits. -/ +theorem run_forestAction (gs : List (Gate Reg)) (ordered : ForestOrdered gs) + (x : State Reg) : run gs x = forestAction gs x := by + induction gs generalizing x with + | nil => rfl + | cons g gs ih => + rcases ordered with ⟨tail, fresh⟩ + funext r + by_cases hr : r = g.dst + · subst r + change run gs (step g x) g.dst = _ + rw [run_untouched gs (step g x) g.dst (fun q hq => (fresh q hq).1)] + simp [step, forestAction, parent] + · change run gs (step g x) r = _ + rw [ih tail (step g x)] + rw [forestAction_step gs g (fun q hq => (fresh q hq).2) x r hr] + simp only [forestAction, parent, if_neg hr] + +/-- Forest compensation uses exactly the local increment d(child) XOR d(parent). -/ +theorem forest_compensated_injection (gs : List (Gate Reg)) + (ordered : ForestOrdered gs) (x d : State Reg) : + run gs.reverse (add (run gs x) (forestAction gs d)) = add x d := by + rw [← run_forestAction gs ordered d] + exact compensated_injection gs x d + +/-- A register bank split explicitly into arbitrary helpers and targets. -/ +structure Banks (Helper Target : Type) where + helpers : State Helper + targets : State Target + +variable {Helper : Type} + +/-- The unchanged helpers determine the intended target increment `K h`. +The executed middle injection uses the compensated increment `A (K h)`. +`K` can be any function; linearity is needed only for the target circuit A. -/ +def compensatedShear (gs : List (Gate Reg)) + (K : State Helper → State Reg) (s : Banks Helper Reg) : Banks Helper Reg := + { helpers := s.helpers + targets := run gs.reverse (add (run gs s.targets) (run gs (K s.helpers))) } + +/-- Exact dirty-helper/dirty-target semantics of the three-stage construction. -/ +theorem compensatedShear_correct (gs : List (Gate Reg)) + (K : State Helper → State Reg) (s : Banks Helper Reg) : + compensatedShear gs K s = + { helpers := s.helpers, targets := add s.targets (K s.helpers) } := by + simp only [compensatedShear, compensated_injection] + +/-- The same bank operation, using the explicit one-parent compensation formula. -/ +def forestShear (gs : List (Gate Reg)) + (K : State Helper → State Reg) (s : Banks Helper Reg) : Banks Helper Reg := + { helpers := s.helpers + targets := run gs.reverse + (add (run gs s.targets) (forestAction gs (K s.helpers))) } + +/-- Local forest compensation preserves arbitrary helpers and adds K h to +arbitrary initial targets; no clean-register assumption occurs in the theorem. -/ +theorem forestShear_correct (gs : List (Gate Reg)) + (ordered : ForestOrdered gs) (K : State Helper → State Reg) + (s : Banks Helper Reg) : + forestShear gs K s = + { helpers := s.helpers, targets := add s.targets (K s.helpers) } := by + simp only [forestShear, forest_compensated_injection gs ordered] + +end TargetForest + +#print axioms TargetForest.run_add +#print axioms TargetForest.run_reverse +#print axioms TargetForest.compensated_injection +#print axioms TargetForest.run_forestAction +#print axioms TargetForest.forest_compensated_injection +#print axioms TargetForest.compensatedShear_correct +#print axioms TargetForest.forestShear_correct diff --git a/research/r420-forest-cut-budget/NOTICE.md b/research/r420-forest-cut-budget/NOTICE.md new file mode 100644 index 0000000000..171dd6067b --- /dev/null +++ b/research/r420-forest-cut-budget/NOTICE.md @@ -0,0 +1,52 @@ +# Attribution and license + +New material is contributed under the repository's Apache-2.0 license by +Anthony (@anthonylei), with substantial OpenAI Codex multi-agent assistance. + +The input word and its construction are eumemic's PR543, pinned at +`2065fe4f72a914d907f1046603f5a36f17018535`, as preserved on the stated base. +Its full lineage and source licenses remain in +`research/e8-bit-r420/NOTICE.md`. In particular, credit belongs to eumemic +for the R420 word and interleaved-source construction; Dylan Crow +(@utcorvusvolat-dotcom) for the E8 bit format and decoder; Jacob Sussman +for the E8 unit; DreamingOfClouds for retained dead-register totals and +nine-stage pricing; Zhihao Chen for the scalar interface; and chafreaky, +DaysSky, icekylinx and the cumulative community for compilation, common +labels, hosting, checkers and assembly. + +Scott Woolsey Biggart's concurrent #713 and Sagar Thakrar's #716 are the +closest target-pair predecessors. Dugongue's #476 and earlier #450/#478 +are reversible target-factoring precedents. Greer Guthrie's #694 and #686 +show related helper-basis substitutions and explicit semantic D contracts. +No code or changed circuit from those pending packages is vendored here. +The final overlap refresh also credits @ellipsi2's #742 shared-donor +forest construction and Scott Woolsey Biggart's #733 two-sided basis +composition. Their contributions are distinct and are not superseded by +this restricted target-forest certificate. + +Oscar Fennell (@ofennell-quipex)'s #759 appeared during final validation +and independently provides the same rooted-forest class and 14,921-XOR +floor. It is expressly credited: no priority for that mechanism or floor +is claimed. The present package adds exact coefficient-constrained cut +optimization and scoped Lean verification; no #759 code is imported. + +The native harness invokes original exporter, geometry and C++ checking +files unchanged; their copyright, licenses and notices remain with their +source packages. `SOURCES.json` pins those files. The Python forest +constructor, independent verifier, budget solver and scoped Lean proof +are new implementation for this contribution. + +The mathematical background includes Vandaele, Martiel and Goubault de +Brugière's tree-based parity synthesis (arXiv:2104.00934), classical +minimum-spanning-tree optimality, and reversible binary-matrix circuit +synthesis. The claim is a concrete repository contribution and restricted +certificate, not invention of these general techniques. + +The upstream-integration follow-up applies woklerx's PR1194 semantic-D +contract and chronological substitution bridge, source head +`2e39c98238f543d988f9efc1b076590a4b780dca`, and Arham Tahir's PR1311 concrete +bridge audit, source head `a2875c1834b9c9ef42a84eda4890d5462cc98fa5`. +Their proof and predecessor checker remain unchanged. The new R420 tests +check the premises of that argument; they do not claim its invention or +full supplier admission. Gareth Davidson's PR915 R439 target compensation +is the retained precedent for any future selected-supplier transfer. diff --git a/research/r420-forest-cut-budget/PROOF.md b/research/r420-forest-cut-budget/PROOF.md new file mode 100644 index 0000000000..fa73d18e81 --- /dev/null +++ b/research/r420-forest-cut-budget/PROOF.md @@ -0,0 +1,337 @@ +# Rooted-forest compensation: correctness and restricted optimality + +This construction changes R420's frame-zero dirt compensation. It preserves +arbitrary target and helper inputs, introduces no register, and changes no +paid frame path. The claim is a finite circuit simplification, not a new +bit exponent or multiplication theorem. Prepared by Anthony Lei with +substantial OpenAI Codex assistance; Apache-2.0. + +Postorder row-CNOT synthesis using spanning arborescences is established +work: see Vandaele, Martiel and Goubault de Brugière, +[*Phase polynomials synthesis algorithms for NISQ architectures and beyond*, +arXiv:2104.00934v1, §3.1](https://arxiv.org/pdf/2104.00934v1). +Our contribution is the scoped R420 application, its compensation cost +model and certificates, and complete coefficient accounting. We do not +claim the first tree-based XOR synthesis method. The R420 supplier belongs +to eumemic (#543); restored target-pair compensation precedes this work +in #713/#716. Larger forest components extend that restricted pair class. +Concurrent #759 (Oscar Fennell) independently published the forest class +and the same unconstrained floor during final validation. We credit that +result without a priority claim; the additional result here is the exact +fixed-tree cut budget and its separately compiled generic Lean proof. + +## 1. Circuit class and dirty-input correctness + +Let targets have arbitrary initial values \(y\in\mathbb F_2^n\), helpers +have arbitrary values \(s\in\mathbb F_2^m\), and sources be \(x\). +Fix the binary compensation matrix \(K\), with row supports \(K_i\). +The required map is + +\[ +D_K:(x,s,y)\longmapsto(x,s,y+Ks). +\] + +Sources are neither read nor written. Helpers are read but never written. +Every binary XOR costs one; directly injecting a row costs its Hamming +weight. All targets and helpers remain at frame zero. No input is +assumed clean and no scratch register is available. + +Choose a rooted forest on the fixed targets, with parent \(p(i)\) for +each nonroot. Its circuit has exactly these three parts: + +1. Prepare `y_i ^= y_p(i)` once per nonroot, children before parents. +2. Inject \(K_i\) at each root and \(K_i\mathbin\triangle K_{p(i)}\) + at each nonroot, directly from helpers. +3. Reverse the preparation gate list, giving parents-before-children + unpreparation. + +**Theorem 1.** Every such circuit implements \(D_K\). + +**Proof.** Put \(T_{i,p(i)}=1\), with other entries zero. During +preparation each child reads its parent's original value, because the +parent has not yet been modified. Thus preparation is exactly +\(A=I+T\). If the maximum forest depth is \(d\), then +\(T^{d+1}=0\), and over \(\mathbb F_2\), + +\[ +A^{-1}=I+T+\cdots+T^d. +\] + +The injection matrix is \(AK\): its rows are precisely the stated root +rows and child-parent differences. Reversed XOR gates implement +\(A^{-1}\), since each gate is an involution. Therefore + +\[ +y\longmapsto Ay\longmapsto Ay+AKs + \longmapsto A^{-1}(Ay+AKs)=y+Ks. +\] + +Sources and helpers are unchanged throughout. No restriction was placed +on their values or on \(y\). ∎ + +The order is essential: parent-first preparation generally accumulates +additional ancestors and would need different injection rows. + +## 2. Substitution into R420's scalar interface + +R420's original H2 requires D to read only helpers. The new target-target +preparation gates violate that syntactic condition. We explicitly replace +it by the exact semantic condition: + +> **H2′.** D runs before any climb, is legal at frame zero, fixes all +> sources and helpers, and has map \((x,s,y)\mapsto(x,s,y+Ns)\). + +Theorem 1 proves H2′ with \(N=K\). Keep R420's other hypotheses. With +\(z=(x,s)\), its raw A/scatter/B stream has map +\((z,y)\mapsto(Uz,y+Jx+Ks)\); no z-destination gate reads a target, +and the raw target-to-target block is identity. Its unchanged cleanup +applies \(U^{-1}\) to z. Consequently the complete circuit with H2′ is + +\[ +(x,s,y)\longmapsto(x,s,y+Jx+(K+N)s). +\] + +The original identities \(J=I\), \(N=K\) give the required addition +of x into y. A, scatter, B, C, and literal z-cleanup are unchanged. +An audit must check D's complete matrix, including the target identity +block and zero source block; the individual new injection rows need not +equal the original rows. + +The block calculation alone does not justify reordering the framed stream. +Apply the chronological substitution bridge of woklerx's +[#1194](../r439-semantic-d-contract-seed10/PROOF.md), also used by Arham Tahir's +[#1311](../r439-abc-semantic-bridge/README.md): replace the candidate's D with +the original D to obtain a proof-only virtual word. Here that word is literally +the original R420 word, so the unchanged checker passes all original H1–H5 +and U/J/K/C conditions, including the separately checked J=I. The actual D +and original D are legal source-free prefixes at the common zero frame, +with equal complete binary operators and equal exit frames. Their matrix +equality holds over every compatible F2 module, including streams. The same +chronological continuation therefore receives identical values and frames; +no later operation is moved or treated as a frame-free stream operator. + +`test_semantic_bridge.py` checks this splice, all 660 boundary columns, frames +and complete paid paths with the pinned original checker. It records exactly +the original syntactic H2 and K_equals_D failures on the actual word, and +rejects missing restoration, scalar-neutral frame changes and forbidden target +feedback. Only the actual D is executed and priced; the virtual D is a proof +device. This is a concrete application of the credited conditional bridge, +not a new all-size realization theorem. + +All new operands start at frame zero, so every new XOR is legal there +without a climb. The replacement preserves helpers, retained totals, +stage count, hosting demand, and paid-rank profile. The inherited +physical/compiler and all-size assumptions remain assumptions. + +## 3. Exact minimum within the forest class + +For a forest F with r roots, both preparation and unpreparation cost +\(n-r\). Its complete cost is + +\[ +C(F)=\sum_{i\text{ root}}|K_i| + +\sum_{i\text{ nonroot}}\bigl(2+|K_i\triangle K_{p(i)}|\bigr). +\tag{1} +\] + +Empty injection rows cost zero. This count includes all restoration XORs. +The original cost is \(C_0=\sum_i|K_i|\). + +Add one abstract sentinel vertex * to the n targets. On the complete +undirected graph assign integer edge weights + +\[ +w(*,i)=|K_i|,\qquad w(i,j)=2+|K_i\triangle K_j|. +\] + +**Theorem 2.** Minimum spanning-tree weight equals the minimum of (1) +over all rooted forests in §1, without a coefficient or depth constraint. + +**Proof.** Given a rooted forest, attach every root to *. The result is +connected and has n edges on \(n+1\) vertices, hence is a tree. Its +weight is (1). Conversely, remove * from any spanning tree. Each +remaining component contains exactly one former neighbor of *: at least +one by connectedness, and at most one because two would create a cycle. +Root each component at that neighbor. These constructions are inverse +and preserve weight. ∎ + +For an independently checkable optimality certificate, a proposed tree Q +must satisfy, for every non-tree edge \(e=(u,v)\), + +\[ +w(e)\ge\max_{f\in P_Q(u,v)}w(f), \tag{2} +\] + +where \(P_Q(u,v)\) is its unique tree path. Necessity follows by +replacing a heavier path edge with e. For sufficiency, remove an edge f +of Q. Every other edge e crossing its resulting cut has +\(w(e)\ge w(f)\), because its Q-path contains f. Compare Q with any +spanning tree S. Choose \(f\in Q\setminus S\). The S-path joining +f's endpoints crosses this cut in some edge e outside Q. Replacing e +by f preserves the tree, does not increase weight, and increases its +overlap with Q. Repeating at most n times gives Q. Thus Q is minimum, +including when weights tie. + +The independent checker recomputes row supports, graph weights, tree +cost and every inequality (2). The theorem concerns only this forest +class. It does not optimize general target basis changes, helper basis +changes, or the physical coefficient invoice. In particular, a selected +forest obtained by cutting edges is not claimed globally optimal among +forests satisfying an invoice limit. + +**A concrete limit.** Partition nine helpers into disjoint size-three +sets A, B, C. Take \(K_1=A\cup B\), \(K_2=B\cup C\), +\(K_3=A\cup C\). Every root costs 6 and every target edge costs 8. +A forest with k target edges costs \(6(3-k)+8k=18+2k\), so its +optimum is 18. A general target basis does better: prepare +`y3 ^= y1; y3 ^= y2`, inject \(K_1\) into y1 and \(K_2\) into y2, +and reverse preparation. Since \(K_3=K_1+K_2\), it implements the +same dirty-input map with \(2+6+6+2=16\) XORs. Thus forest optimality +must not be described as unrestricted circuit optimality. + +## 4. Unsigned coefficients and controlled cuts + +Exact binary cancellation is not a valid integer norm estimate. Regard +T now as a nonnegative integer matrix, and let H be the zero-one +incidence matrix of the injection supports. Preparation has unsigned +transfer \(I+T\); unpreparation has +\(U_+=I+T+\cdots+T^d\). The unsigned D transfer is + +\[ +y\longmapsto + \left(I+2\sum_{j=1}^dT^j\right)y+U_+Hs. \tag{3} +\] + +The factor two on every proper ancestor is real in this calculation. +With unit initial magnitudes, the row bound at target i is exactly + +\[ +q_i=1+2\operatorname{depth}(i) + +\sum_{v\in\text{root-to-}i}|H_v|. +\tag{4} +\] + +Equivalently, a root has \(q_i=1+|K_i|\), and a nonroot has +\(q_i=q_{p(i)}+2+|K_i\triangle K_{p(i)}|\). Every unsigned operation +is an addition, so intermediate bounds are at most the final bound. +The reversed D word has the same unsigned transfer: it again has the +same preparation and unpreparation, while the reversed helper injections +commute. The complete compiled forward and backward invoices must still +be recomputed; scalar equivalence alone supplies no such invoice. + +**Cut lemma.** Delete an edge from child i to its parent p and make i +a root. The new forest is correct by Theorem 1, and its cost changes by + +\[ +\Delta C=|K_i|-|K_i\triangle K_p|-2. \tag{5} +\] + +Only i's injection and its two edge gates change, proving (5). For +every descendant of i, the new unsigned helper path replaces the whole +old root-to-i prefix by \(K_i\). The XOR of those old injection rows +is \(K_i\), so its zero-one incidence is entrywise at most their +integer incidence sum. Proper ancestors above i also disappear from +(3). Hence cutting weakly decreases the unsigned D transfer entrywise +in both directions; other components are unchanged. In (4), every +descendant's depth decreases by the old depth of i. Multiple cuts +preserve these conclusions by iteration. A cut is therefore a precise +way to trade additional XORs for smaller coefficients, but passing a +particular global bound still requires its actual invoice. + +## 5. Exact budget optimization over cuts of one fixed tree + +Freeze the oriented seed-6 minimum forest, including its tie-breaking. +Only its 116 target edges may be cut; the remaining edges cannot be +reoriented or replaced. The following optimum concerns all \(2^{116}\) +cut subsets of this fixed forest, not all forests. + +The invoice is the integer quantity \(64F^3B^2<2^{104}\), where F +and B are complete forward and backward unsigned maxima. In this word, +unchanged source/helper rows attain \(F_*=144651\), also the uncut +forward maximum. No gate in the unchanged tail reads a target. Cutting +decreases D's unsigned outputs, while these work rows remain unchanged; +therefore every cut subset has exactly \(F=F_*\). Its reverse cap is + +\[ +B_{\rm cap}=\left\lfloor\sqrt{ + \left\lfloor\frac{2^{104}-1}{64F_*^3}\right\rfloor}\right\rfloor. +\] + +Replay the unchanged reverse tail before D once. Let its maximum be +\(B_0\), target endpoint magnitudes be \(a_i\), helper magnitudes be +\(h_j\), and \(w_h(S)=\sum_{j\in S}h_j\). First require +\(B_0\le B_{\rm cap}\). If r is the retained root above i, the exact +backward D endpoint satisfies + +\[ +b_r(r)=a_r+w_h(K_r),\qquad +b_i(r)=b_{p(i)}(r)+a_i+a_{p(i)} + +w_h(K_i\triangle K_{p(i)}). +\] + +This is (3) with nonuniform incoming magnitudes. Nonnegative additions +make endpoint bounds sufficient for every intermediate D prefix. + +Define \(c_i(r)=|K_i|\) when \(i=r\), and otherwise +\(c_i(r)=2+|K_i\triangle K_{p(i)}|\). For each vertex i and ancestor +r, let \(D(i,r)\) be the minimum feasible subtree cost when i remains +connected to root r. Set it to infinity if \(b_i(r)>B_{\rm cap}\). +Otherwise, + +\[ +D(i,r)=c_i(r)+\sum_{j\text{ child of }i} + \min\{D(j,r),D(j,j)\}. \tag{6} +\] + +**Proof of exactness.** Each child edge has precisely two possibilities: +retain it, preserving root r, or cut it, making j a new root. Once this +choice is made, child subtrees share no gates, costs or constraints; +their only inherited quantity is their root. Induction from leaves +therefore proves (6). Summing \(D(r,r)\) over the original roots +enumerates every cut subset implicitly and returns its exact minimum +feasible cost. There are at most \(n^2\) ancestor states. Full literal +replay independently checks the selected reconstruction's invoice. ∎ + +The verifier can also use the unchanged work-row value merely as a +necessary forward lower bound: a feasible reconstructed word attaining +the resulting DP lower bound still proves cut-class optimality. Neither +argument establishes an optimum among other minimum trees, different +orientations, or arbitrary forests under the payload constraint. + +## 6. Calibration, selected witness, and formalization boundary + +On the pinned R420 word, the unconstrained forest minimum is 14,921 +XORs, compared with the original 19,922: a calibration saving of 5,001. +The particular seed-6 minimum tree is **not an admissible selected witness** under the fixed +104-bit payload limit. Its finite bill has forward norm 144,651, +backward norm 20,395,400, and payload 106 bits. This failure is retained +as evidence that minimizing XOR count does not minimize the invoice. + +The selected cuts are the child indices **5, 34, 39, 57, 78**. The +independently reproduced 724-state recurrence gives D cost **15,025**, +saving **4,897** against the original, with **22,019** whole-word ADDs. +Literal replay gives F = 144,651 and B = 9,800,790, hence +`64 F^3 B^2 = 18606576056688220135806852422400 < 2^104`. +The exact B cap is 10,232,638. This is the optimum in the fixed oriented +tree's cut class, not a global optimum under the payload constraint. + +That distinction has a concrete R420 witness: changing only the selected +parent of vertex 32 from 37 to 34 yields D cost **15,023**, complete cost +**22,017**, and the same F, B and strict payload pass. The independent +scope-control test replays all 660 columns and the unchanged frame paths, +then correctly rejects its certificate as outside the frozen cut family. +This nearby word has not received a separate native or hosted replay. +It demonstrates why the 15,025 certificate must not be described as the +best admissible target forest or best known R420 XOR count. + +`Forest.lean` proves generic Boolean XOR linearity, reversal, the +children-before-parent action, and compensation with arbitrary helpers +and targets. It does not prove the minimum-spanning-tree theorem, +the concrete numerical optimum, unsigned invoices, physical frame +transport, or multiplication. Forest optimality rests on the written +proof and independent exact finite certificate; circuit admission also +requires full-column replay and the complete coefficient bill. + +The paid profile is unchanged, so a scalar-operation saving establishes +no new bit exponent or κ. The result retains the original supplier's +compiler, common-label, hosting, precision, tape, and analytic assumptions. diff --git a/research/r420-forest-cut-budget/README.md b/research/r420-forest-cut-budget/README.md new file mode 100644 index 0000000000..e4bbb3b7ef --- /dev/null +++ b/research/r420-forest-cut-budget/README.md @@ -0,0 +1,208 @@ +# R420 target forests with a checked coefficient budget + +This finite bit-circuit construction saves **4,897 binary XORs** in eumemic's +PR543 R420 supplier: **26,916 → 22,019** for the complete local word. The +frame-zero dirt-compensation stage D falls **19,922 → 15,025**, including +every target preparation and restoration operation. It preserves arbitrary +initial helper and target contents, all 660 scalar columns, the 420 helpers, +nine retained copies, and the paid rank profile of mass 5,112. +**No new κ or practical multiplication speedup is claimed.** + +During final validation, Oscar Fennell's +[#759](https://github.com/CrocSwap/integer-mult-bounds/pull/759) +independently published the same forest class and 14,921-XOR floor, with +a 15,138-XOR admissible D circuit. We credit that concurrent result and +claim no priority for forest factoring or the floor. This package adds +the exact coefficient-constrained cut optimization, **113 fewer XORs** +than that submitted circuit, an independent derivation/checker, and a +generic Lean compensation proof. Its distinct directory avoids a source +collision with #759's package. + +The contribution includes two precisely scoped optimality results: + +1. A dummy-root minimum spanning tree certifies **14,921** as the minimum + XOR count among single-parent forest target-basis substitutions with + direct residual helper injection. The particular seed-6 optimum needs + **106 payload bits** and fails the unchanged 104-bit native admission + check. It is retained as a failing calibration, not the selected circuit. +2. Cutting child-parent edges at target indices **5, 34, 39, 57, 78** gives + the selected **15,025**-XOR D circuit. Independent dynamic programs prove + that cost is optimal among **all 2^116 cut subsets of this fixed, oriented + seed-6 tree**, under the unchanged local prefix allowance. They visit + 724 ancestor states. This does not optimize other trees, rerootings, + arbitrary target bases, or all circuits subject to that allowance. + +A scope-control test makes that limitation concrete: changing just +`parent[32]` from 37 to 34 gives **15,023** D XORs with the same payload +bound and valid exact scalar/frame replay. It is outside the certified +cut family and has not received a separate native or hosted replay. +The frozen 15,025 result is a reproducible restricted optimum, not a claim +to the best known R420 circuit. + +| Exact quantity | Original R420 | Uncut calibration | Selected five-cut forest | +|---|---:|---:|---:| +| D binary XORs | 19,922 | 14,921 | 15,025 | +| Complete local binary XORs | 26,916 | 21,915 | 22,019 | +| Forward positive-prefix maximum F | 144,651 | 144,651 | 144,651 | +| Reverse positive-prefix maximum B | 2,270,064 | 20,395,400 | 9,800,790 | +| Bit length of 64 F³ B² | 100 | 106 | 104 | +| Strictly below 2^104 | yes | **no** | yes | + +The selected exact payload is +`18606576056688220135806852422400 < 20282409603651670423947251286016 = 2^104`. +The 104-bit entry is therefore a strict pass, not a rounded comparison. + +## Reproduce + +From the repository root, with Python 3.10+ and its standard library: + +```sh +python3 -B research/r420-forest-cut-budget/reproduce.py +``` + +Expected final line: + +```text +PASS_R420_TARGET_FOREST D=19922->15025 ADDs=26916->22019 saved=4897 columns=660 payload_bits=104 cut_states=724; uncut_optimum=14921 rejected_at_106_bits +``` + +This reconstructs both words, compact recipes and the budget certificate, +compares canonical JSON rather than gzip container bytes, runs the independent +checker, and executes 37 adversarial and positive tests. These include an +independent exhaustive audit of 620 small ancestor states (7,904 cut choices), +the semantic-D substitution premises, and historical source-pin controls. +The checker imports no constructor +or budget implementation: it derives K from A/scatter/B, checks every input +column, exact frame spans and COPY/ERASE lifetimes, the 7,140 non-tree cycle +inequalities, both positive-prefix passes, and a separate budget recurrence. + +Optional formal and native checks: + +```sh +python3 -B research/r420-forest-cut-budget/reproduce.py --lean /path/to/lean-4.21.0/bin/lean +python3 -B research/r420-forest-cut-budget/native.py --out /absolute/fresh/output --boost /directory/containing/boost +``` + +Native replay needs a C++17 compiler and Boost headers. It compiles the +unchanged predecessor checkers and tests the original and selected words at +5, 9 and 11 stages: 900, 1,380 and 1,620 formal columns, with 6, 18 and 24 +omitted-bridge controls. A deleted restoration ADD remains frame-legal but +fails each native formal-column check. The uncut failure can be reproduced +using `--candidate data/optimum.json.gz --recipe data/optimum-recipe.json +--expect-prefix-rejection`, with those artifact paths prefixed by this package. + +The [dedicated CI workflow](../../.github/workflows/r420-forest-cut-budget.yml) +requires finite reconstruction, all controls, the pinned Lean proof and both +native replay modes in one Linux job. It checks the submitted PR head and +retains its file inventory, environment, logs and native receipts as artifacts. +[Review coverage](REVIEW.md) maps these checks to the complete submitted +package and records the local follow-up to PR #774. + +## Why the transformation works + +Let K_i be the helper support of target i's original compensation. Choose +a rooted forest and prepare `y_i ^= y_parent(i)` with children before +parents. Inject K_i at roots and K_i XOR K_parent(i) at other targets, +then reverse the preparation. If the preparation matrix is A, the full map is +`A^-1(Ay + AKs) = y + Ks`, for arbitrary y and s. + +A root costs |K_i|; each forest edge costs |K_i XOR K_j| + 2, charging +both target XORs. Adding a graph-only dummy root converts this exact cost +to a minimum spanning tree. Long paths inflate the cancellation-free +coefficient bound; the second certificate optimally cuts this particular +tree to meet the existing limit. [PROOF.md](PROOF.md) gives the proofs, +counterexample to unrestricted XOR optimality, and exact claim boundaries. + +All replacement gates operate at frame zero and the complete state at the +D boundary is identical to the original. The old helper-only H2 syntax and +its literal helper-name extractor reject target mixing; neither predecessor +checker is patched. The semantic replacement checks the actual D operator +and retains all other interface requirements. The native stream admits it +using existing common-frame XOR operations. + +Following woklerx's [#1194](https://github.com/CrocSwap/integer-mult-bounds/pull/1194) +and Arham Tahir's [#1311](https://github.com/CrocSwap/integer-mult-bounds/pull/1311), +`test_semantic_bridge.py` now checks the chronological substitution argument: +restoring the original D makes the candidate exactly the original checked word; +the actual D supplies identical values and frames to that unchanged continuation. +This applies their conditional interface argument, without claiming supplier adoption. + +## Formal scope and remaining work + +[Forest.lean](Forest.lean), compiled with Lean 4.21.0, proves generic XOR +linearity, reverse-circuit inversion, children-before-parent forest execution, +and compensation preserving arbitrary helpers and arbitrary initial targets. +Its seven printed axiom reports contain only `propext` and `Quot.sound`. +There are no `sorry`, extra axioms or `native_decide` proofs. + +Lean does **not** bind this R420 file, synthesize the middle helper gates, +prove the MST or budget optimum, or formalize frames, invoices or integer +multiplication. Those finite obligations have written derivations and +independent exact executable checks. The complete hosted parent, whole-owner +invoice and changed-word outer assembly have not been rebuilt; the scalar +saving does not change the recursive profile. Uniform compilation, +common-label/mutable-basis realization, hosting, precision/tape and analytic +assumptions remain inherited. Original local macOS execution is recorded in +[VALIDATION.json](VALIDATION.json); [REVIEW.md](REVIEW.md) records the subsequent +local and hosted Linux finite/formal coverage. No repository-wide suite pass +is claimed. + +## Provenance and previous work + +Base commit: `66849e1475c930fd7732b1a0067ffee7e1e95f60`. +PR543 source head: `2065fe4f72a914d907f1046603f5a36f17018535`. +The historical selected frontier at this base was #626 with #543, +κ = `51110230636731/31250000000000000`. Source and comparison pins are in +[SOURCES.json](SOURCES.json); the local seed-6 bit-track claim, alternatives +and completed search scope are in [CLAIM.json](CLAIM.json). + +The branch now incorporates canonical `main` at +`0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2`, whose selected result is #1094, +κ = `836330098538459/500000000000000000`, with the PR589/555 R439 bit supplier. +Our scientific baseline remains the pinned R420 word. The old selected-record +hash is checked against `certificates/checkpoints/k492626.json`, which retains +the identical #626 bytes; the live selection and all frozen certificates stay +unchanged. [REVIEW.md](REVIEW.md) records the upstream comparison and adopted ideas. + +Concurrent [#713](https://github.com/CrocSwap/integer-mult-bounds/pull/713) +(Scott Woolsey Biggart) and +[#716](https://github.com/CrocSwap/integer-mult-bounds/pull/716) +(Sagar Thakrar) factor disjoint target pairs. The latter proves a 3,250-XOR +optimum in that narrower class. Our admitted forest saves 1,647 additional +XORs relative to that count. No priority for target factoring is claimed. +Earlier #450/#476/#478 and helper-basis #686/#694 supply related precedents; +their changed circuits are not imported or combined here. + +The submission refresh also found +[#742](https://github.com/CrocSwap/integer-mult-bounds/pull/742) (@ellipsi2), +a 3,288-XOR saving using shared donors with disjoint donor/receiver sets. +That is a shallow forest precedent; this package adds arbitrary-depth +forest optimality, exact coefficient-constrained cuts and a generic Lean +proof. [#733](https://github.com/CrocSwap/integer-mult-bounds/pull/733) +(Scott Woolsey Biggart) combines helper and target bases for a larger +8,368-XOR saving. This package keeps helpers untouched during D and does +not supersede that broader construction or claim an overall saving record. + +Tree-based XOR synthesis is established prior work. In particular, +[Vandaele, Martiel and Goubault de Brugière, §3.1](https://arxiv.org/pdf/2104.00934) +use successors-first row operations and a minimum-weight spanning +arborescence to optimize a parity table. This package specializes those +ideas to a fixed dirty-helper compensation shear, charges preparation and +restoration, and certifies the actual R420 circuit and its budget tradeoff. +It makes no literature-wide priority claim. + +## Open next questions + +- Can this exact R420 word receive a complete hosted-parent/whole-owner invoice? + First bind its native receipts to a hosted exporter and account for every + changed operation. Local semantic substitution is checked; full hosting, + precision/tape and outer assembly remain blockers to supplier admission. +- Does the fixed-tree budget method answer a new precision question on R439? + First compare Gareth Davidson's merged [#915](https://github.com/CrocSwap/integer-mult-bounds/pull/915) + target compensation and existing invoices. A port needs a distinct question: + reducing frame-zero ADDs alone preserves the paid profile and does not raise κ. + +Prepared by Anthony (@anthonylei), with substantial OpenAI Codex assistance +across independent research, implementation, formalization and adversarial +review panels. This is AI-assisted work, not independent human peer review. +See [NOTICE.md](NOTICE.md) for the retained community attribution. diff --git a/research/r420-forest-cut-budget/REVIEW.md b/research/r420-forest-cut-budget/REVIEW.md new file mode 100644 index 0000000000..1f87dace9c --- /dev/null +++ b/research/r420-forest-cut-budget/REVIEW.md @@ -0,0 +1,122 @@ +# PR #774 finite and formal coverage + +The [review continuation](https://github.com/CrocSwap/integer-mult-bounds/pull/774#issuecomment-6160960125) +requests both finite and formal coverage of the constrained forest construction. +The reviewed construction is commit `50f8c366f27a9083e0655593a1be3d6810d1f053`, +whose complete diff from `66849e1475c930fd7732b1a0067ffee7e1e95f60` adds the +22 files below. The initial follow-up added CI and documentation. The later +upstream integration below adds verification and a credited written interface +argument; the construction, Lean proof, source hashes and frozen certificates +are unchanged. + +## Coverage of the submitted package + +| Files | Obligation and evidence | +| --- | --- | +| `construct.py`, `data/word.json.gz`, `data/recipe.json`, `data/optimum.json.gz`, `data/optimum-recipe.json` | `reproduce.py` rebuilds both words and recipes and compares canonical JSON. `verify.py` independently derives K from A/scatter/B, checks all 660 arbitrary-input columns and exact frame/COPY/ERASE paths, and checks all 7,140 non-tree cycle inequalities including seed-6 tie order. | +| `budget.py`, `data/budget.json` | Reconstruction compares the entire 724-state certificate. The independent `verify.cut_budget` recurrence returns 15,025 D XORs; literal replay attains this lower bound with cuts 5, 34, 39, 57, 78 and strict `64 F^3 B^2 < 2^104`. | +| `verify.py`, `test_verify.py`, `reproduce.py` | All 23 adversarial/positive tests pass, including wrong endpoints, pricing, provenance, source types, the 106-bit uncut failure and the cheaper out-of-class 15,023-XOR rewire. The CLI requires the selected circuit to attain the cut-class optimum. | +| `Forest.lean`, `lean-toolchain`, `data/lean-axioms.txt` | Lean 4.21.0 compiles the complete file. Its seven audited theorems cover linearity, reversal, ordered forest action and compensated injection for arbitrary helper/target inputs. Each reports only `propext` and `Quot.sound`; the fresh output matches the recorded axiom report. | +| `native.py`, `data/native-selected.json`, `data/native-unconstrained.json` | Fresh unchanged C++ checkers accept the original and selected circuits at 5/9/11 stages: 900/1,380/1,620 formal columns and 6/18/24 omitted-bridge controls. Missing restoration is frame-legal but fails every endpoint checker. The uncut calibration fails all three native 104-bit checks. Fresh receipts match the historical results after normalizing elapsed times and output-directory paths. | +| `PROOF.md` | The forest/dummy-root-tree bijection preserves cost including both target XORs. The cycle exchange argument proves the unconstrained minimum. The cut recurrence considers retain/cut for each child, conditioned on its retained ancestor; the fixed work-row forward lower bound plus an attaining literal replay certifies the restricted optimum. These are written arguments with exact finite checks, not Lean optimality theorems. | +| `SOURCES.json`, `CLAIM.json`, `VALIDATION.json`, `NOTICE.md`, `README.md` | All 14 pinned repository inputs match. The original validation is historical macOS evidence. Attribution, seed/search scope, concurrent #759 credit and the distinction between the unconstrained floor and the feasible cut optimum remain explicit. | + +## Reproduction and execution status + +Run from the repository root, using a fresh output directory outside it: + +```sh +python3 -B research/r420-forest-cut-budget/reproduce.py --lean /path/to/lean-4.21.0/bin/lean +python3 -B research/r420-forest-cut-budget/native.py --out /fresh/selected --boost /path/containing/boost +python3 -B research/r420-forest-cut-budget/native.py --out /fresh/uncut --boost /path/containing/boost --candidate research/r420-forest-cut-budget/data/optimum.json.gz --recipe research/r420-forest-cut-budget/data/optimum-recipe.json --expect-prefix-rejection +``` + +The 2026-10-14 follow-up reran these checks locally on macOS arm64 with +Python 3.14.7, Apple clang 21.0.0, Boost 1.85.0 and Lean 4.21.0. The selected +record integrity check also passed. The +[CI workflow](../../.github/workflows/r420-forest-cut-budget.yml) requires +the same finite, formal and native coverage on Ubuntu 24.04 / Python 3.13, +with bounded runtimes, read-only permissions and retained revision/input +identities and receipts. A local pass does not establish a hosted Linux pass; +the Actions run for the checked revision supplies that evidence separately. + +Hosted Linux coverage passed at `e1a23bbecf308368865d827febf185fc03a74546`: +[run 38681040914](https://github.com/anthonylei/integer-mult-bounds/actions/runs/38681040914). +All finite, Lean, native acceptance/rejection and unchanged-artifact steps +passed; the run retains its revision, file inventory, logs and receipts. + +## Claim boundary + +Lean proves the generic Boolean compensation identity and forest ordering. +It does not bind the concrete JSON word or prove MST/DP optimality, physical +frames, global invoices or multiplication. The executable checks supply the +concrete finite evidence. In particular, 15,025 is optimal only over cuts of +the fixed oriented seed-6 tree; the 15,023 rewire demonstrates the boundary. + +Full changed-word hosted-parent/whole-owner reconstruction, maintained supplier +adoption of semantic D, global invoices and outer assembly remain open, as disclosed in +the original submission. Repository-wide verification and native replay of +the separate 15,023 scope-control word were not run. No new κ or completed +supplier admission follows from this coverage. This follow-up is Codex-assisted +verification and written review, not independent human peer review. + +## Integration with refreshed upstream + +Canonical `main` at `0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2` was merged +without conflicts in `ce12313f`. This brings in 1,817 upstream commits since +the scientific base `66849e1475c930fd7732b1a0067ffee7e1e95f60`. The original +R420 inputs and certificates remain the research baseline. The updated root +guidance has `priority_revision: 4`; the selected record is now #1094 with +PR589/555's R439 bit supplier, and the complex side binds the selected κ. +The selected record, manifest and review were read through its declared paths. +The pre-submission upstream check recorded at `2026-10-15T04:46:45Z` found the same canonical +head, selected record and priority revision. + +The final live overlap search completed at `2026-10-15T04:47:26Z`, using +`target forest`, `cut budget`, `semantic D` and `H2-sem`: 527 open PRs, +1,022 discussion/comment/reply records and 1,537 local notes, with complete +remote pagination and no warnings. It searches titles/bodies/comments and +local notes, not arbitrary diffs, so it is not a novelty certificate. The +discussion start-here #1163 was read. Pending #794 at +`6be7364e0245c5a1c931cb1c43b3da991b755850` and #2191 at +`c368d1b1f59c28b7a837fd6d080bd57703266d2c`, plus discussion #1796's R439 +hosted invoice, reinforce the distinction between a local identity, pricing +and supplier admission. Their changed circuits are not imported here. + +| Upstream work | Decision for this PR | +| --- | --- | +| Oscar Fennell #759, `467b9da6fe130a12d0d6edda310cd6b0efd22a7e` | Retain the original credit for forest factoring and the 14,921 floor. Our additional result remains the 15,025 optimum over this fixed tree's budgeted cuts. | +| Scott Woolsey Biggart #733, `dfe84e09298abc5c5e0074afda59a821e10abfb4` | Its broader two-sided basis saves more ADDs. Preserve the narrower untouched-helper class and avoid an overall-record claim. | +| Gareth Davidson #915, `e9daefe320a0043000bd9746664ed02c3287d056` | R439 target compensation already exists. Defer a port until it answers a distinct precision or hosting question. | +| woklerx #1194, `2e39c98238f543d988f9efc1b076590a4b780dca`; Arham Tahir #1311, `a2875c1834b9c9ef42a84eda4890d5462cc98fa5` | Apply their chronological semantic-D bridge to the frozen R420 word. Document its conditional proof and execute the original checker on the actual and virtual words. | +| Aaron Wang #1782, `1cfe5e10ce38b04209699c1a6b0e62b87e21833f`; Wentao Li (@VictorLiwentao) #1805, `b34e0620bd92af49c9095e0eeb885f601fffd137` | Keep semantic admission, actual local price and full hosted adoption separate. Do not treat endpoint equality as an integer-prefix bound. | + +The merge exposed one replay failure: `certificates/selected-result.json` +now contains #1094. `reproduce.check_source_pins` explicitly resolves that +historical input to `certificates/checkpoints/k492626.json`, whose SHA256 is +the original `b3bf402f31a69bde0629936a9b569bed48281568d7b16d5fba120b5311ea1f53`. +No expected hash changes. Missing or corrupt checkpoints fail without a +fallback to the live selection. CI watches the actual checkpoint dependency. + +| Added check | Coverage and limitation | +| --- | --- | +| `test_reproduce.py` (4 tests) | A newer live selection stays untouched; missing/corrupt historical checkpoints and changes to each of the other 13 pinned inputs fail. | +| `test_budget.py` (4 tests) | Independently reconstructs unsigned reverse-tail magnitudes and literally executes every cut assignment for 620 recorded states with at most eight descendant edges: 7,904 assignments, 44 infeasible states and 62 states requiring cuts. Checks minimum cost and attaining witnesses; rejects underpricing, false infeasibility and a nonattaining witness. It imports no recurrence and makes no exhaustive claim about the remaining 104 states. | +| `test_semantic_bridge.py` (6 tests) | Pins the original source/checker, reports the two exact legacy syntactic failures, checks the original-D splice, all 660 dirty boundary columns and frames, and unchanged complete paths/profile. Missing restoration, cancelling illegal frame changes and cancelling target feedback are rejected. This applies #1194/#1311; it does not formalize their bridge in Lean or rebuild hosting. | + +All 37 tests run through the bounded reproduction command. The frozen +15,025-XOR word, 724-state certificate and Lean file remain unchanged. The +small exhaustive oracle supplements the two complete recurrences; it does +not replace their full fixed-tree optimality argument. See the README's +**Open next questions** for bounded follow-ups. + +Post-merge verification passed on macOS arm64 with the same Python/Clang/ +Boost/Lean versions listed above: combined reconstruction and all 37 tests, +seven Lean axiom reports, selected and uncut native modes at 5/9/11 stages, +`scripts/verify_selected_result.py`, `scripts/research_baseline.py`, Python +syntax, actionlint 1.7.12 and `git diff --check`. The baseline command checks +selected bindings/arithmetic only. Both new mathematical suites also pass +under Python `-O`, and an independent Codex read-through found no concrete +bugs. All original data, source hashes, claim, validation and Lean files were +compared byte-for-byte with the original submission. No current-frontier cold +replay or whole-repository suite was run: this PR does not change that supplier. diff --git a/research/r420-forest-cut-budget/SOURCES.json b/research/r420-forest-cut-budget/SOURCES.json new file mode 100644 index 0000000000..b52eea4ebb --- /dev/null +++ b/research/r420-forest-cut-budget/SOURCES.json @@ -0,0 +1,70 @@ +{ + "base_commit": "66849e1475c930fd7732b1a0067ffee7e1e95f60", + "bit_source_head": "2065fe4f72a914d907f1046603f5a36f17018535", + "bit_source_pr": 543, + "boost_header_archive": { + "sha256": "7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617", + "url": "https://archives.boost.io/release/1.85.0/source/boost_1_85_0.tar.bz2", + "version": "1.85.0" + }, + "comparison_prs": { + "694": { + "headRefOid": "9732ac127dd4bef98a846aaa904c20b5a84e72c1", + "title": "Research: save 6,934 R420 XORs with a restored helper basis", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/694" + }, + "713": { + "headRefOid": "1a19af5c5ddb6de9797a6d085e5df0b90ed6d58b", + "title": "Research: save 3,150 R420 XORs with a restored target basis", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/713" + }, + "716": { + "headRefOid": "afeb452f58ff0cbf109172335e2ba282aac3dcde", + "title": "Research: optimal disjoint R420 target pairs save 3,250 XORs (no new kappa)", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/716" + }, + "733": { + "headRefOid": "dfe84e09298abc5c5e0074afda59a821e10abfb4", + "title": "Research: compose R420 bases for 8,368 fewer XORs", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/733" + }, + "742": { + "headRefOid": "6e7a5d271a123886dc7b54ca3180d0b9f9beda5a", + "title": "Research: shared target donors save 3,288 R420 XORs (no new kappa)", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/742" + }, + "759": { + "headRefOid": "467b9da6fe130a12d0d6edda310cd6b0efd22a7e", + "title": "Research: rooted R420 target forests save 4,784 XORs with exact class floor", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/759" + } + }, + "formal_toolchain": "leanprover/lean4:v4.21.0", + "primary_literature": [ + { + "authors": "Vivien Vandaele, Simon Martiel, Timothee Goubault de Brugiere", + "section": "3.1", + "title": "Phase polynomials synthesis algorithms for NISQ architectures and beyond", + "url": "https://arxiv.org/pdf/2104.00934v1", + "use": "Acknowledged tree/postorder parity-synthesis precedent; no code imported", + "version": "arXiv:2104.00934v1" + } + ], + "repository_inputs_sha256": { + "certificates/selected-result.json": "b3bf402f31a69bde0629936a9b569bed48281568d7b16d5fba120b5311ea1f53", + "research/e8-bit-carrier-skeleton/code/bit/checkers/columns_h.cpp": "d1297f9052be4f2496e1ff2a77e4db2c0cdbd7d460d489b4c03e50bf317238ce", + "research/e8-bit-carrier-skeleton/code/bit/checkers/columns_k.cpp": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "research/e8-bit-carrier-skeleton/code/bit/checkers/gram_frames.py": "223a5a07731fc315a90a3e48177796babc155c1d9985c7ae5017eff6af2a0608", + "research/e8-bit-carrier-skeleton/code/bit/checkers/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "research/e8-bit-carrier-skeleton/code/bit/checkers/legality_h.cpp": "6c1ef2b24e57781d6951c172a1024fc4300e6fd392c9d6672079a7806ab663b3", + "research/e8-bit-carrier-skeleton/code/bit/export_records.py": "8a5999601f917dbb492bb9ae9a344611f18cc7cedc53dc3c76496a369e530eb3", + "research/e8-bit-carrier-skeleton/code/bit/regression/stage_cohort.py": "6c288f6f234b528c1a7c0a4adfb724e91e0fe6b18c8dffad96af3f973de1829a", + "research/e8-bit-carrier-skeleton/code/pricing/prime_witnesses.py": "98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab", + "research/e8-bit-carrier-skeleton/portable-include/bits/stdc++.h": "420094be2af295eed03a983dd66debbbe9cfb78d8252859f4498a615a0074b99", + "research/e8-bit-r420/NOTICE.md": "12ba6e0845f222e9940b00f6c60d261db104246a8d3143da267682973479f811", + "research/e8-bit-r420/README.md": "9807be57c6adf26b30e4f54e2f8160075bbc05091f1a6d157e43d2a4620c1c9f", + "research/e8-bit-r420/code/xcheck.py": "5737d18a7826fd51e131035f2d7bebba2e2868af91dd7672a5f11208b036d424", + "research/e8-bit-r420/data/bitE8mut-r420.json.gz": "9721a3819efd68307f66f00d84a952eb28eb7c3ad2ce79653ce295c98a764784" + }, + "source_word_canonical_sha256": "e597e3885c0a8daa262afa5985ee2930443329126aece76d33159d81882bdcc2" +} diff --git a/research/r420-forest-cut-budget/VALIDATION.json b/research/r420-forest-cut-budget/VALIDATION.json new file mode 100644 index 0000000000..7085dffe60 --- /dev/null +++ b/research/r420-forest-cut-budget/VALIDATION.json @@ -0,0 +1,54 @@ +{ + "base_commit": "66849e1475c930fd7732b1a0067ffee7e1e95f60", + "checks": [ + { + "command": "python3 -B research/r420-forest-cut-budget/reproduce.py --lean /path/to/lean-4.21.0/bin/lean", + "result": "PASS; canonical source/candidate recipes and budget rebuilt; independent scalar, geometry, MST and budget replay; 23 adversarial/positive tests; seven Lean axiom reports." + }, + { + "command": "python3 -B research/r420-forest-cut-budget/native.py --out /fresh/output --boost /path/containing/boost", + "receipt": "data/native-selected.json", + "result": "PASS; source and selected: 900/1380/1620 formal columns, 6/18/24 omitted-bridge controls each; scalar/frame/Gram/prefix checks; missing restoration remains legal but all stage checkers reject endpoint." + }, + { + "command": "python3 -B research/r420-forest-cut-budget/native.py --out /fresh/output --boost /path/containing/boost --candidate research/r420-forest-cut-budget/data/optimum.json.gz --recipe research/r420-forest-cut-budget/data/optimum-recipe.json --expect-prefix-rejection", + "receipt": "data/native-unconstrained.json", + "result": "PASS expected rejection: all three unchanged native column checkers reject the uncut 106-bit payload." + }, + { + "command": "python3 -B scripts/verify_selected_result.py", + "result": "PASS selected record, exact kappa, source inventory and proof supplements." + }, + { + "command": "Relocated minimal checkout: python3 -I -B research/r420-forest-cut-budget/reproduce.py", + "result": "PASS from a temporary directory containing only this package and its14 pinned predecessor files. All package Python sources compile; all local Markdown links resolve." + } + ], + "environment": { + "boost": "1.85.0; archive hash pinned in SOURCES.json", + "cxx": "Apple clang version 21.0.0 (clang-2100.1.1.101)", + "lean": "Lean (version 4.21.0, arm64-apple-darwin23.6.0, commit 6741444a63ee, Release)", + "platform": "macOS-26.6.2-arm64-arm-64bit-Mach-O", + "python": "3.14.7 (main, Aug 5 2026, 10:29:49) [Clang 21.0.0 (clang-2100.1.1.101)]" + }, + "formal_scope": "Generic Boolean forest compensation only; no formal MST/cutDP/candidate-file/physical/asymptotic theorem.", + "not_run": [ + "Full repository make verify", + "Unchanged selected frontier626 cold reconstruction", + "Changed-word hosted-parent/whole-owner/global finite invoice/outer assembly", + "Linux execution or remote CI", + "Native replay of the separate15023 scope-control word" + ], + "recorded_utc": "2026-10-13T05:25:11.708282+00:00", + "review": { + "issues_resolved": [ + "Uncut optimum exceeds original104-bit cap; final candidate selected by exact constrained cut recurrence.", + "Canonical JSON comparison replaces Python equality for non-D source binding, rejecting int/float and bool aliases.", + "Recipe provenance, seed tie-breaking and scope fields checked.", + "Native expected-failure mode forwards the explicit calibration mode to the strict independent verifier." + ], + "late_overlap": "#759 independently establishes the same forest class and floor; credit recorded, distinct directory selected, exact cut-budget DP and generic Lean proof are additional contributions.", + "panels": "Distinct AI-assisted selection, overlap/literature, algebraic proof, MST adversary, unsigned accounting, geometry, constructor, independent verifier, Lean, native replay and code-adversary roles; no human peer review claimed.", + "scope_control": "A separately emitted reparent32:=34 word costs15023 and passes660 columns and104-bit scalar bill but is not a cut of the fixed oriented tree; no global constrained optimality claim." + } +} diff --git a/research/r420-forest-cut-budget/budget.py b/research/r420-forest-cut-budget/budget.py new file mode 100644 index 0000000000..fe2d701eaf --- /dev/null +++ b/research/r420-forest-cut-budget/budget.py @@ -0,0 +1,195 @@ +"""Exact positive-prefix accounting and optimal cuts of one rooted forest. + +This module owns unsigned coefficient growth, not scalar F2 correctness. +The dynamic program minimizes XOR count over all subsets of the fixed MST's +nonroot edges, subject to the unchanged 104-bit local prefix allowance. +""" + +from __future__ import annotations + +from functools import lru_cache +from math import isqrt + +from construct import construct, extract_kernels + + +def scalar_events(word: dict) -> list[tuple[str, int, int, str]]: + """Flatten the exporter order; frame moves do not affect scalar norms.""" + events = [] + count = 2 * word["v"] + word["R"] + for phase in ("D", "A"): + for _, destination, sources in word[phase]: + events.extend(("add", destination, source, phase) for source in sources) + for index, helper in enumerate(word["ret"]): + events.append(("copy", count, helper, "scatter")) + events.extend(("add", word["v"] + target, count, "scatter") + for target, row in enumerate(word["scatter"]) if index in row) + events.append(("erase", count, helper, "scatter")) + for phase in ("B", "C"): + for _, destination, sources in word[phase]: + events.extend(("add", destination, source, phase) for source in sources) + return events + + +def positive_pass(word: dict, reverse: bool = False, omit_d: bool = False) -> dict: + """Use the official unit-start, absolute-ADD, COPY/ERASE convention.""" + count = 2 * word["v"] + word["R"] + values = [1] * (count + 1) + events = scalar_events(word) + if reverse: + events.reverse() + largest = 1 + opened = False + for operation, destination, source, phase in events: + if omit_d and phase == "D": + continue + if reverse: + operation = {"copy": "erase", "erase": "copy"}.get(operation, operation) + if operation == "add": + if destination == source or destination == count: + raise ValueError("invalid scalar ADD") + values[destination] += values[source] + largest = max(largest, values[destination]) + elif operation == "copy": + if opened: + raise ValueError("overlapping copied-center lifetimes") + values[count] = values[source] + opened = True + else: + if operation != "erase" or not opened: + raise ValueError("unmatched copied-center erase") + values[count] = 0 + opened = False + if opened: + raise ValueError("unclosed copied center") + return {"maximum": largest, "final_norms": values[:count]} + + +def prefix_bill(word: dict, allowance_bits: int = 104) -> dict: + if type(allowance_bits) is not int or allowance_bits <= 0: + raise ValueError("allowance_bits must be a positive integer") + forward = positive_pass(word)["maximum"] + backward = positive_pass(word, reverse=True)["maximum"] + payload = 64 * forward ** 3 * backward ** 2 + return {"forward_maximum": forward, "reverse_maximum": backward, + "payload_upper": payload, "payload_bits": payload.bit_length(), + "allowance_bits": allowance_bits, + "within_allowance": payload < 1 << allowance_bits} + + +def solve_budget(word: dict, seed: int = 6, allowance_bits: int = 104) -> dict: + """Optimize every cut subset by ancestor-state dynamic programming. + + For the pinned word, work-register growth fixes F=144651 independently + of D. Removing an ancestor edge cannot increase any positive D output: + weighted |K_i| <= weighted |K_i xor K_p| + weighted |K_p|, and all + initial target norms are nonnegative. The unchanged tail never reads a + target, so every cut forest retains this same forward maximum. + """ + kernels = extract_kernels(word) + candidate, recipe = construct(word, seed=seed) + count = word["v"] + dummy = count + parents = recipe["mst_parents"] + children = [[] for _ in range(count)] + roots = [] + for vertex, parent in enumerate(parents): + if parent == dummy: + roots.append(vertex) + else: + children[parent].append(vertex) + for phase in ("A", "B", "C"): + for _, _, sources in word[phase]: + if any(count <= source < 2 * count for source in sources): + raise ValueError("forward cut monotonicity requires a target-free tail") + forward = positive_pass(candidate) + work_maximum = max(forward["final_norms"][:count] + + forward["final_norms"][2 * count:]) + if work_maximum != forward["maximum"]: + raise ValueError("uncut forward bound is not fixed by unchanged work rows") + if type(allowance_bits) is not int or allowance_bits <= 0: + raise ValueError("allowance_bits must be a positive integer") + cap = isqrt(((1 << allowance_bits) - 1) // (64 * work_maximum ** 3)) + boundary = positive_pass(word, reverse=True, omit_d=True) + if boundary["maximum"] > cap: + raise ValueError("unchanged reverse tail already exceeds the allowance") + incoming = boundary["final_norms"][count:2 * count] + helper_weights = boundary["final_norms"] + root_norm = [incoming[i] + sum(helper_weights[h] for h in kernels[i]) + for i in range(count)] + edge_norm = [0 if parent == dummy else + incoming[i] + incoming[parent] + + sum(helper_weights[h] for h in kernels[i] ^ kernels[parent]) + for i, parent in enumerate(parents)] + root_cost = [len(kernel) for kernel in kernels] + edge_cost = [0 if parent == dummy else + len(kernels[i] ^ kernels[parent]) + 2 + for i, parent in enumerate(parents)] + + @lru_cache(maxsize=count * count) + def path_norm(vertex: int, ancestor: int) -> int: + if vertex == ancestor: + return root_norm[vertex] + parent = parents[vertex] + if parent == dummy: + raise ValueError("invalid ancestor state") + return edge_norm[vertex] + path_norm(parent, ancestor) + + states = [] + + @lru_cache(maxsize=count * count) + def best(vertex: int, ancestor: int) -> tuple[int, tuple[int, ...]] | None: + norm = path_norm(vertex, ancestor) + if norm > cap: + states.append({"vertex": vertex, "root": ancestor, "norm": norm, + "cost": None, "cuts": None}) + return None + cost = root_cost[vertex] if vertex == ancestor else edge_cost[vertex] + cuts = () + for child in children[vertex]: + options = [] + retained = best(child, ancestor) + if retained is not None: + options.append(retained) + detached = best(child, child) + if detached is not None: + options.append((detached[0], tuple(sorted((child,) + detached[1])))) + if not options: + states.append({"vertex": vertex, "root": ancestor, "norm": norm, + "cost": None, "cuts": None}) + return None + chosen_cost, chosen_cuts = min(options) + cost += chosen_cost + cuts = tuple(sorted(cuts + chosen_cuts)) + states.append({"vertex": vertex, "root": ancestor, "norm": norm, + "cost": cost, "cuts": list(cuts)}) + return cost, cuts + + total = 0 + cuts = () + for root in roots: + optimum = best(root, root) + if optimum is None: + raise ValueError("no cut subset meets the unchanged prefix allowance") + total += optimum[0] + cuts = tuple(sorted(cuts + optimum[1])) + selected, selected_recipe = construct(word, seed=seed, cuts=cuts) + bill = prefix_bill(selected, allowance_bits) + if not bill["within_allowance"] or bill["forward_maximum"] != work_maximum: + raise ValueError("dynamic program disagrees with the full literal prefix pass") + if selected_recipe["metrics"]["tree_weight"] != total: + raise ValueError("dynamic program disagrees with emitted XOR count") + return {"format": "r420-target-forest-budget/1", "seed": seed, + "source_canonical_sha256": recipe["source"]["canonical_sha256"], + "uncut_canonical_sha256": recipe["candidate_canonical_sha256"], + "selected_canonical_sha256": selected_recipe["candidate_canonical_sha256"], + "scope": "all cut subsets of the fixed seeded MST; no claim over other forests", + "cut_positions": sum(parent != dummy for parent in parents), + "subsets_covered": 1 << sum(parent != dummy for parent in parents), + "forward_maximum_for_every_cut_subset": work_maximum, + "reverse_maximum_allowed": cap, "minimum_D_xors": total, + "cuts": list(cuts), "prefix": bill, + "states": sorted(states, key=lambda row: (row["vertex"], row["root"])), + "state_count": len(states), + "reverse_boundary_target_norms": incoming, + "reverse_boundary_helper_norms": helper_weights[2 * count:]} diff --git a/research/r420-forest-cut-budget/construct.py b/research/r420-forest-cut-budget/construct.py new file mode 100644 index 0000000000..a3ebc85cc2 --- /dev/null +++ b/research/r420-forest-cut-budget/construct.py @@ -0,0 +1,304 @@ +#!/usr/bin/env python3 +"""Build a minimum-cost rooted-forest realization of the pinned R420 D map. + +Public API: ``load_source(path=SOURCE_PATH)`` reads the pinned source; +``construct(word, seed=6, cuts=())`` returns independent candidate/recipe dicts. +Only candidate['D'] differs from the source. ``canonical_payload`` fixes JSON +hashing; ``extract_kernels``, ``minimum_spanning_tree``, and ``xor_metrics`` +are pure-value helpers. No artifacts are written by this module. + +An edge i--j costs |K_i xor K_j|+2; i--dummy costs |K_i|. Kruskal therefore +minimizes XOR count within this rooted-forest construction, not all circuits. +All new gates run at frame zero before A. The child-before-parent preparation +y_i ^= y_parent, followed by difference injection and reversed preparation, +implements y_i ^= K_i s for arbitrary initial targets and helper contents. +""" + +from __future__ import annotations + +import copy +import gzip +import hashlib +import json +from pathlib import Path + + +SOURCE_RELATIVE_PATH = "research/e8-bit-r420/data/bitE8mut-r420.json.gz" +SOURCE_PATH = Path(__file__).resolve().parents[2] / SOURCE_RELATIVE_PATH +BASE_COMMIT = "66849e1475c930fd7732b1a0067ffee7e1e95f60" +SOURCE_FILE_SHA256 = "9721a3819efd68307f66f00d84a952eb28eb7c3ad2ce79653ce295c98a764784" +SOURCE_CANONICAL_SHA256 = "e597e3885c0a8daa262afa5985ee2930443329126aece76d33159d81882bdcc2" +TARGET_COUNT = 120 +HELPER_COUNT = 420 +DUMMY_VERTEX = TARGET_COUNT +REGISTER_COUNT = 2 * TARGET_COUNT + HELPER_COUNT + + +def canonical_payload(value: object) -> bytes: + """Canonical JSON: sorted keys, compact separators, ASCII, no NaN, no LF.""" + return json.dumps(value, sort_keys=True, separators=(",", ":"), + ensure_ascii=True, allow_nan=False).encode("ascii") + + +def _require(condition: bool, message: str) -> None: + if not condition: + raise ValueError(message) + + +def _integer(value: object, lower: int, upper: int) -> bool: + return type(value) is int and lower <= value < upper + + +def _validate_gates(gates: object, name: str, frame_count: int) -> None: + _require(isinstance(gates, list), f"{name}: expected a list of gates") + for index, gate in enumerate(gates): + prefix = f"{name}[{index}]" + _require(isinstance(gate, list) and len(gate) == 3, + f"{prefix}: expected [frame, destination, sources]") + frame, destination, sources = gate + _require(_integer(frame, 0, frame_count), f"{prefix}: invalid frame") + _require(_integer(destination, 0, REGISTER_COUNT), f"{prefix}: invalid destination") + _require(isinstance(sources, list) and bool(sources), f"{prefix}: empty or invalid sources") + _require(all(_integer(s, 0, REGISTER_COUNT) for s in sources), f"{prefix}: invalid source") + _require(len(set(sources)) == len(sources), f"{prefix}: duplicate source") + _require(destination not in sources, f"{prefix}: destination/source alias") + + +def extract_kernels(word: dict) -> list[frozenset[int]]: + """Validate source D and return helper-register supports in target order. + + A repeated D destination (including a duplicate whole gate), duplicate + control, nonhelper control, nonzero frame, or aliased control is rejected. + This helper checks the R420 shape but does not require the pinned digest. + """ + _require(isinstance(word, dict), "word must be a dictionary") + _require(type(word.get("v")) is int and word["v"] == TARGET_COUNT, + "expected v=120") + _require(type(word.get("R")) is int and word["R"] == HELPER_COUNT, + "expected R=420") + frames = word.get("frames") + _require(isinstance(frames, list) and bool(frames) and frames[0] == [], + "frame zero must be the empty frame") + start = word.get("start") + _require(isinstance(start, list) and len(start) == REGISTER_COUNT, + "expected 660 starting frames") + _require(all(type(f) is int and f == 0 for f in start[TARGET_COUNT:]), + "all targets and helpers must start at frame zero") + _validate_gates(word.get("D"), "D", len(frames)) + _require(len(word["D"]) == TARGET_COUNT, "D must contain exactly 120 gates") + kernels: list[frozenset[int] | None] = [None] * TARGET_COUNT + for frame, target, sources in word["D"]: + _require(frame == 0, "D must use only frame zero") + _require(TARGET_COUNT <= target < 2 * TARGET_COUNT, "D must write only targets") + vertex = target - TARGET_COUNT + _require(kernels[vertex] is None, "D has a duplicate target gate") + _require(all(2 * TARGET_COUNT <= s < REGISTER_COUNT for s in sources), + "source D must read only helpers") + kernels[vertex] = frozenset(sources) + _require(all(k is not None for k in kernels), "D omits a target") + return [kernel for kernel in kernels if kernel is not None] + + +def load_source(path: str | Path = SOURCE_PATH) -> dict: + """Read a gzip JSON source and require its pinned canonical payload hash.""" + with gzip.open(path, "rt", encoding="utf-8") as stream: + word = json.load(stream) + extract_kernels(word) + _require(hashlib.sha256(canonical_payload(word)).hexdigest() == SOURCE_CANONICAL_SHA256, + "source does not match the pinned R420 canonical payload") + return word + + +def minimum_spanning_tree(kernels: list[frozenset[int]], seed: int = 6) -> list[dict]: + """Return selected complete-graph edges in deterministic Kruskal order. + + Vertices 0..119 denote target rows; 120 denotes the zero kernel. Equal + weights use SHA256(ASCII '::'), then u,v, so runtime PRNG + implementation details do not influence the result. + """ + _require(type(seed) is int, "seed must be an integer") + _require(len(kernels) == TARGET_COUNT, "expected 120 kernels") + _require(all(isinstance(k, frozenset) and + all(_integer(s, 2 * TARGET_COUNT, REGISTER_COUNT) for s in k) + for k in kernels), "invalid helper kernel support") + edges = [] + for u in range(TARGET_COUNT): + for v in range(u + 1, TARGET_COUNT + 1): + weight = len(kernels[u]) if v == DUMMY_VERTEX else len(kernels[u] ^ kernels[v]) + 2 + tie = hashlib.sha256(f"{seed}:{u}:{v}".encode("ascii")).digest() + edges.append((weight, tie, u, v)) + edges.sort() + components = list(range(TARGET_COUNT + 1)) + + def representative(vertex: int) -> int: + # At most 120 links: each union reduces the component count by one. + for _ in range(TARGET_COUNT + 1): + if components[vertex] == vertex: + return vertex + vertex = components[vertex] + raise ValueError("internal union-find cycle") + + selected = [] + for weight, _, u, v in edges: + ru, rv = representative(u), representative(v) + if ru == rv: + continue + components[rv] = ru + selected.append({"u": u, "v": v, "weight": weight}) + if len(selected) == TARGET_COUNT: + break + _require(len(selected) == TARGET_COUNT, "complete graph did not produce a spanning tree") + return selected + + +def _orient_tree(edges: list[dict]) -> tuple[list[int], list[int], list[int]]: + adjacency = [[] for _ in range(TARGET_COUNT + 1)] + for edge in edges: + u, v = edge["u"], edge["v"] + adjacency[u].append(v) + adjacency[v].append(u) + parents = [-1] * (TARGET_COUNT + 1) + levels = [-1] * (TARGET_COUNT + 1) + parents[DUMMY_VERTEX] = DUMMY_VERTEX + levels[DUMMY_VERTEX] = 0 + queue = [DUMMY_VERTEX] + for position in range(TARGET_COUNT + 1): + _require(position < len(queue), "tree is disconnected") + vertex = queue[position] + for child in sorted(adjacency[vertex]): + if child == parents[vertex]: + continue + _require(parents[child] == -1, "tree contains a cycle") + parents[child] = vertex + levels[child] = levels[vertex] + 1 + queue.append(child) + _require(len(queue) == TARGET_COUNT + 1, "invalid tree vertex count") + order = sorted(range(TARGET_COUNT), key=lambda vertex: (-levels[vertex], vertex)) + return parents[:TARGET_COUNT], levels[:TARGET_COUNT], order + + +def _emit_forest(kernels: list[frozenset[int]], parents: list[int], order: list[int]) -> tuple[list, dict]: + prepare = [[0, TARGET_COUNT + i, [TARGET_COUNT + parents[i]]] + for i in order if parents[i] != DUMMY_VERTEX] + injection = [] + injection_order = [] + for vertex, kernel in enumerate(kernels): + parent = parents[vertex] + difference = kernel if parent == DUMMY_VERTEX else kernel ^ kernels[parent] + # Equal kernels require no injection. Empty-source gates are omitted. + if difference: + injection.append([0, TARGET_COUNT + vertex, sorted(difference)]) + injection_order.append(vertex) + unprepare = copy.deepcopy(prepare[::-1]) + first, second = len(prepare), len(prepare) + len(injection) + return prepare + injection + unprepare, { + "prepare": [0, first], "inject": [first, second], + "unprepare": [second, second + len(unprepare)], + "injection_order": injection_order, + } + + +def _gate_stream(word: dict) -> list: + scatter = [[word["final"][TARGET_COUNT + i], TARGET_COUNT + i, + [word["ret"][j] for j in indices]] + for i, indices in enumerate(word["scatter"]) if indices] + return word["D"] + word["A"] + scatter + word["B"] + word["C"] + + +def _gate_metrics(gates: list) -> dict: + data_ready = [0] * REGISTER_COUNT + wire_ready = [0] * REGISTER_COUNT + count = 0 + for _, destination, sources in gates: + for source in sources: + count += 1 + data_ready[destination] = 1 + max(data_ready[destination], data_ready[source]) + depth = 1 + max(wire_ready[destination], wire_ready[source]) + wire_ready[destination] = wire_ready[source] = depth + return {"xor_count": count, "gate_records": len(gates), + "ordered_data_dependency_depth": max(data_ready), + "ordered_wire_disjoint_depth": max(wire_ready)} + + +def xor_metrics(word: dict) -> dict: + """XOR cost and two explicitly ordered depth models, for D and full word. + + Each multisource record expands in listed source order into dst ^= src. + Data-dependency depth updates only the destination's ready time (free + fanout); wire-disjoint depth updates both wires, forbidding simultaneous + reuse. Neither metric is an optimized schedule or an unsigned prefix bound. + Full order is D,A,scatter,B,C; climbs have zero XOR cost here. + """ + return {"D": _gate_metrics(word["D"]), "full": _gate_metrics(_gate_stream(word))} + + +def construct(word: dict, seed: int = 6, cuts: tuple[int, ...] | list[int] = ()) -> tuple[dict, dict]: + """Return candidate/recipe without mutation; optionally re-root subtrees. + + Each cut is a distinct nonroot child in the original MST orientation. Its + parent edge is replaced by an edge to the dummy, increasing XOR cost but + potentially reducing unsigned growth. A cut candidate is not claimed to + be a minimum-cost forest satisfying any prefix bound. + """ + kernels = extract_kernels(word) + for phase in ("A", "B", "C"): + _validate_gates(word.get(phase), phase, len(word["frames"])) + source_digest = hashlib.sha256(canonical_payload(word)).hexdigest() + _require(source_digest == SOURCE_CANONICAL_SHA256, + "source does not match the pinned R420 canonical payload") + mst_edges = minimum_spanning_tree(kernels, seed) + mst_parents, _, _ = _orient_tree(mst_edges) + _require(isinstance(cuts, (tuple, list)) and + all(_integer(vertex, 0, TARGET_COUNT) for vertex in cuts), + "cuts must be a tuple or list of target vertex IDs") + _require(len(set(cuts)) == len(cuts), "duplicate cut vertex") + _require(all(mst_parents[vertex] != DUMMY_VERTEX for vertex in cuts), + "cannot cut a vertex that is already a root") + cut_vertices = sorted(cuts) + removed_edges = {frozenset((vertex, mst_parents[vertex])) for vertex in cut_vertices} + edges = [dict(edge) for edge in mst_edges + if frozenset((edge["u"], edge["v"])) not in removed_edges] + edges.extend({"u": vertex, "v": DUMMY_VERTEX, "weight": len(kernels[vertex])} + for vertex in cut_vertices) + parents, levels, order = _orient_tree(edges) + gates, boundaries = _emit_forest(kernels, parents, order) + _validate_gates(gates, "candidate D", len(word["frames"])) + candidate = copy.deepcopy(word) + candidate["D"] = gates + roots = [i for i, parent in enumerate(parents) if parent == DUMMY_VERTEX] + source_metrics, candidate_metrics = xor_metrics(word), xor_metrics(candidate) + tree_cost = sum(edge["weight"] for edge in edges) + _require(tree_cost == candidate_metrics["D"]["xor_count"], "tree and emitted XOR costs differ") + recipe = { + "format": "r420-target-forest/1", + "source": {"path": SOURCE_RELATIVE_PATH, "base_commit": BASE_COMMIT, + "canonical_sha256": source_digest, "file_sha256": SOURCE_FILE_SHA256}, + "candidate_canonical_sha256": hashlib.sha256(canonical_payload(candidate)).hexdigest(), + "seed": seed, + "algorithm": "Kruskal, ascending (weight, SHA256(ASCII seed:u:v), u, v)", + "optimality_scope": "The uncut MST minimizes XOR count within the rooted target-forest " + "construction; cut variants have no unrestricted optimality claim.", + "dummy_vertex": DUMMY_VERTEX, + "vertices": [{"vertex": i, "target_register": TARGET_COUNT + i, + "kernel_weight": len(k)} + for i, k in enumerate(kernels)] + + [{"vertex": DUMMY_VERTEX, "target_register": None, + "kernel_weight": 0}], + "mst_edges": mst_edges, + "mst_parents": mst_parents, + "tree_edges": edges, + "cuts": cut_vertices, + "parents": parents, + "roots": roots, + "levels_from_dummy": levels, + "forest_height_edges": max(levels) - 1, + "child_before_parent_order": order, + "D_boundaries": boundaries, + "metrics": {"source": source_metrics, "candidate": candidate_metrics, + "mst_weight": sum(edge["weight"] for edge in mst_edges), + "tree_weight": tree_cost, + "xor_saved": source_metrics["D"]["xor_count"] - tree_cost}, + "depth_model": "Listed-order binary XOR expansion; data dependency updates destination only; " + "wire-disjoint updates both wires. Neither is a prefix-coefficient bound.", + } + return candidate, recipe diff --git a/research/r420-forest-cut-budget/data/budget.json b/research/r420-forest-cut-budget/data/budget.json new file mode 100644 index 0000000000..c9d419f142 --- /dev/null +++ b/research/r420-forest-cut-budget/data/budget.json @@ -0,0 +1,6000 @@ +{ + "cut_positions": 116, + "cuts": [ + 5, + 34, + 39, + 57, + 78 + ], + "format": "r420-target-forest-budget/1", + "forward_maximum_for_every_cut_subset": 144651, + "minimum_D_xors": 15025, + "prefix": { + "allowance_bits": 104, + "forward_maximum": 144651, + "payload_bits": 104, + "payload_upper": 18606576056688220135806852422400, + "reverse_maximum": 9800790, + "within_allowance": true + }, + "reverse_boundary_helper_norms": [ + 801, + 19383, + 5615, + 11511, + 5095, + 2295, + 29275, + 661, + 7291, + 1657, + 79323, + 11523, + 201, + 8943, + 11529, + 4939, + 2979, + 15855, + 16171, + 5287, + 5605, + 11227, + 16853, + 7935, + 16385, + 19815, + 1565, + 4139, + 5661, + 8811, + 3291, + 2459, + 1057, + 1463, + 6903, + 4889, + 7567, + 2919, + 4965, + 1503, + 5207, + 10995, + 6089, + 17471, + 5673, + 5149, + 2313, + 8475, + 11687, + 1059, + 7859, + 2353, + 981, + 27065, + 3789, + 2721, + 1931, + 14911, + 19795, + 13191, + 933, + 2681, + 3845, + 2575, + 907, + 2853, + 1855, + 1263, + 22737, + 31383, + 3073, + 1265, + 88751, + 87739, + 43205, + 5143, + 17787, + 12761, + 757, + 789, + 4249, + 5655, + 11385, + 7971, + 1461, + 1471, + 3135, + 3873, + 30663, + 3281, + 40591, + 40881, + 8315, + 6173, + 2475, + 3577, + 1875, + 4641, + 6011, + 4863, + 665, + 5015, + 4287, + 7571, + 1677, + 681, + 10253, + 26437, + 2735, + 10235, + 435, + 423, + 8263, + 6849, + 5973, + 8737, + 19133, + 16925, + 7471, + 21235, + 7655, + 3313, + 13149, + 16615, + 11055, + 853, + 4769, + 2021, + 31645, + 427, + 2563, + 2835, + 1077, + 1849, + 4121, + 2541, + 2561, + 2677, + 361, + 7465, + 975, + 20941, + 9479, + 12513, + 2903, + 2647, + 26359, + 24673, + 12727, + 8381, + 6407, + 10027, + 47835, + 4651, + 16525, + 32027, + 1775, + 13023, + 3027, + 205, + 2609, + 3441, + 8899, + 5539, + 1991, + 4871, + 10601, + 5097, + 4499, + 1981, + 2283, + 5341, + 2869, + 2401, + 3807, + 3529, + 441, + 1151, + 5801, + 4419, + 1801, + 4649, + 7375, + 28699, + 14557, + 1273, + 43757, + 110587, + 16461, + 575, + 3777, + 5691, + 5599, + 3275, + 2111, + 16623, + 539, + 6239, + 3653, + 10423, + 12521, + 17969, + 1829, + 7023, + 15895, + 15717, + 3391, + 7877, + 1887, + 1227, + 23257, + 11071, + 4221, + 5215, + 22217, + 30189, + 4833, + 8345, + 4855, + 5709, + 7541, + 6023, + 767, + 451, + 7903, + 26739, + 29973, + 10459, + 10271, + 2613, + 1409, + 6749, + 3775, + 15965, + 6127, + 8291, + 21327, + 20617, + 15527, + 14537, + 79251, + 57219, + 20657, + 8275, + 10881, + 41861, + 5191, + 3605, + 4455, + 2615, + 53179, + 6975, + 72621, + 6233, + 6271, + 5431, + 6799, + 7647, + 34627, + 9427, + 6493, + 13217, + 31815, + 44501, + 3611, + 46585, + 2377, + 3077, + 4189, + 5163, + 7539, + 3373, + 2197, + 3373, + 1349, + 71071, + 21859, + 7753, + 4233, + 4165, + 4997, + 23077, + 3907, + 6667, + 13251, + 5843, + 7971, + 1779, + 144651, + 20471, + 8379, + 33677, + 12407, + 23025, + 8213, + 10185, + 5385, + 5009, + 3339, + 24957, + 8939, + 4883, + 5055, + 6241, + 7757, + 3435, + 24811, + 11939, + 2465, + 1341, + 9255, + 49401, + 285, + 5425, + 3927, + 3785, + 2397, + 10045, + 483, + 3881, + 3829, + 457, + 4691, + 741, + 6723, + 3007, + 1407, + 19033, + 6225, + 98717, + 7275, + 3005, + 5031, + 4669, + 529, + 9675, + 1849, + 2661, + 493, + 3713, + 4157, + 1905, + 27437, + 8791, + 699, + 571, + 5239, + 3361, + 5395, + 13835, + 1787, + 1145, + 1803, + 4575, + 4157, + 5267, + 8743, + 14993, + 4651, + 3121, + 2537, + 3543, + 3261, + 30037, + 46375, + 3005, + 2747, + 1193, + 1925, + 1863, + 1129, + 2785, + 2747, + 5353, + 4057, + 5861, + 6475, + 6681, + 2307, + 1291, + 1325, + 1101, + 20133, + 3735, + 2639, + 965, + 1465, + 2153, + 1195, + 1555, + 1235, + 1361, + 1009, + 461, + 13453, + 3283, + 1653, + 555, + 1127, + 903, + 5353, + 2807, + 2297, + 7303, + 1063, + 1167, + 1029, + 1833, + 885, + 997, + 17669, + 241, + 6867, + 993, + 1111, + 2451, + 3199, + 5191, + 927, + 1233 + ], + "reverse_boundary_target_norms": [ + 2207, + 3146, + 7373, + 3790, + 22311, + 5065, + 14250, + 8717, + 3962, + 4934, + 3023, + 6680, + 3604, + 5484, + 13620, + 13567, + 2474, + 4828, + 4408, + 13867, + 5785, + 4427, + 6559, + 4147, + 4861, + 5327, + 6177, + 9792, + 7376, + 14079, + 6898, + 8116, + 3194, + 4369, + 23743, + 5283, + 25419, + 6881, + 6682, + 3148, + 6513, + 5881, + 4664, + 7322, + 13048, + 8269, + 17087, + 7771, + 4782, + 5474, + 4241, + 18427, + 5238, + 3636, + 6802, + 5506, + 14875, + 5206, + 5161, + 7091, + 5123, + 10698, + 12961, + 7801, + 17517, + 8560, + 4624, + 3985, + 3191, + 4523, + 4387, + 27392, + 11174, + 4869, + 6857, + 3804, + 4133, + 6524, + 6514, + 6336, + 6645, + 8147, + 6592, + 6381, + 7755, + 6886, + 7004, + 6274, + 7951, + 41343, + 5916, + 93294, + 9959, + 12658, + 5964, + 7467, + 8983, + 15126, + 9713, + 8015, + 4681, + 8026, + 10482, + 5864, + 8542, + 10958, + 6756, + 6770, + 6010, + 27129, + 18899, + 7723, + 8013, + 10508, + 18757, + 10538, + 12666, + 10151, + 7703, + 8703 + ], + "reverse_maximum_allowed": 10232638, + "scope": "all cut subsets of the fixed seeded MST; no claim over other forests", + "seed": 6, + "selected_canonical_sha256": "5ab4c26b9a54795f8bc71ef48a244624f3826d5c46570afc8e582ec27c402b7c", + "source_canonical_sha256": "e597e3885c0a8daa262afa5985ee2930443329126aece76d33159d81882bdcc2", + "state_count": 724, + "states": [ + { + "cost": 1180, + "cuts": [], + "norm": 1640066, + "root": 0, + "vertex": 0 + }, + { + "cost": 1151, + "cuts": [], + "norm": 3416250, + "root": 5, + "vertex": 0 + }, + { + "cost": 1247, + "cuts": [ + 18, + 113 + ], + "norm": 9534698, + "root": 49, + "vertex": 0 + }, + { + "cost": 1247, + "cuts": [ + 18, + 113 + ], + "norm": 8120516, + "root": 50, + "vertex": 0 + }, + { + "cost": null, + "cuts": null, + "norm": 10940446, + "root": 85, + "vertex": 0 + }, + { + "cost": 1183, + "cuts": [ + 16 + ], + "norm": 7024388, + "root": 97, + "vertex": 0 + }, + { + "cost": 1183, + "cuts": [ + 16 + ], + "norm": 5658672, + "root": 100, + "vertex": 0 + }, + { + "cost": 1183, + "cuts": [ + 16 + ], + "norm": 4621058, + "root": 102, + "vertex": 0 + }, + { + "cost": 170, + "cuts": [], + "norm": 2106556, + "root": 1, + "vertex": 1 + }, + { + "cost": 133, + "cuts": [], + "norm": 3113432, + "root": 7, + "vertex": 1 + }, + { + "cost": 133, + "cuts": [], + "norm": 9592184, + "root": 32, + "vertex": 1 + }, + { + "cost": 133, + "cuts": [], + "norm": 8046898, + "root": 34, + "vertex": 1 + }, + { + "cost": null, + "cuts": null, + "norm": 10965758, + "root": 37, + "vertex": 1 + }, + { + "cost": 133, + "cuts": [], + "norm": 5944390, + "root": 49, + "vertex": 1 + }, + { + "cost": 133, + "cuts": [], + "norm": 4530208, + "root": 50, + "vertex": 1 + }, + { + "cost": 133, + "cuts": [], + "norm": 7350138, + "root": 85, + "vertex": 1 + }, + { + "cost": 179, + "cuts": [], + "norm": 2114774, + "root": 2, + "vertex": 2 + }, + { + "cost": 134, + "cuts": [], + "norm": 3431992, + "root": 4, + "vertex": 2 + }, + { + "cost": 134, + "cuts": [], + "norm": 6040282, + "root": 19, + "vertex": 2 + }, + { + "cost": 134, + "cuts": [], + "norm": 5001816, + "root": 21, + "vertex": 2 + }, + { + "cost": null, + "cuts": null, + "norm": 11608396, + "root": 58, + "vertex": 2 + }, + { + "cost": 134, + "cuts": [], + "norm": 8654570, + "root": 61, + "vertex": 2 + }, + { + "cost": 134, + "cuts": [], + "norm": 7243316, + "root": 76, + "vertex": 2 + }, + { + "cost": 134, + "cuts": [], + "norm": 9640706, + "root": 78, + "vertex": 2 + }, + { + "cost": 766, + "cuts": [], + "norm": 1637582, + "root": 3, + "vertex": 3 + }, + { + "cost": 731, + "cuts": [], + "norm": 3540468, + "root": 5, + "vertex": 3 + }, + { + "cost": 839, + "cuts": [ + 6, + 114 + ], + "norm": 9658916, + "root": 49, + "vertex": 3 + }, + { + "cost": 839, + "cuts": [ + 6, + 114 + ], + "norm": 8244734, + "root": 50, + "vertex": 3 + }, + { + "cost": null, + "cuts": null, + "norm": 11064664, + "root": 85, + "vertex": 3 + }, + { + "cost": 767, + "cuts": [ + 87 + ], + "norm": 7148606, + "root": 97, + "vertex": 3 + }, + { + "cost": 731, + "cuts": [], + "norm": 5782890, + "root": 100, + "vertex": 3 + }, + { + "cost": 731, + "cuts": [], + "norm": 4745276, + "root": 102, + "vertex": 3 + }, + { + "cost": 309, + "cuts": [], + "norm": 2007832, + "root": 4, + "vertex": 4 + }, + { + "cost": 272, + "cuts": [], + "norm": 4616122, + "root": 19, + "vertex": 4 + }, + { + "cost": 272, + "cuts": [], + "norm": 3577656, + "root": 21, + "vertex": 4 + }, + { + "cost": null, + "cuts": null, + "norm": 11146008, + "root": 50, + "vertex": 4 + }, + { + "cost": 317, + "cuts": [ + 2 + ], + "norm": 10184236, + "root": 58, + "vertex": 4 + }, + { + "cost": 272, + "cuts": [], + "norm": 7230410, + "root": 61, + "vertex": 4 + }, + { + "cost": 272, + "cuts": [], + "norm": 5819156, + "root": 76, + "vertex": 4 + }, + { + "cost": 272, + "cuts": [], + "norm": 8216546, + "root": 78, + "vertex": 4 + }, + { + "cost": 2059, + "cuts": [], + "norm": 2046860, + "root": 5, + "vertex": 5 + }, + { + "cost": null, + "cuts": null, + "norm": 10267816, + "root": 34, + "vertex": 5 + }, + { + "cost": 2083, + "cuts": [ + 0, + 3 + ], + "norm": 8165308, + "root": 49, + "vertex": 5 + }, + { + "cost": 2083, + "cuts": [ + 0, + 3 + ], + "norm": 6751126, + "root": 50, + "vertex": 5 + }, + { + "cost": 2083, + "cuts": [ + 0, + 3 + ], + "norm": 9571056, + "root": 85, + "vertex": 5 + }, + { + "cost": 2083, + "cuts": [ + 0, + 3 + ], + "norm": 5654998, + "root": 97, + "vertex": 5 + }, + { + "cost": 2048, + "cuts": [ + 0 + ], + "norm": 4289282, + "root": 100, + "vertex": 5 + }, + { + "cost": 2048, + "cuts": [ + 0 + ], + "norm": 3251668, + "root": 102, + "vertex": 5 + }, + { + "cost": 376, + "cuts": [], + "norm": 2972610, + "root": 3, + "vertex": 6 + }, + { + "cost": 376, + "cuts": [], + "norm": 4875496, + "root": 5, + "vertex": 6 + }, + { + "cost": 420, + "cuts": [], + "norm": 1868446, + "root": 6, + "vertex": 6 + }, + { + "cost": null, + "cuts": null, + "norm": 10993944, + "root": 49, + "vertex": 6 + }, + { + "cost": 426, + "cuts": [ + 82 + ], + "norm": 9579762, + "root": 50, + "vertex": 6 + }, + { + "cost": 412, + "cuts": [ + 87 + ], + "norm": 8483634, + "root": 97, + "vertex": 6 + }, + { + "cost": 376, + "cuts": [], + "norm": 7117918, + "root": 100, + "vertex": 6 + }, + { + "cost": 376, + "cuts": [], + "norm": 6080304, + "root": 102, + "vertex": 6 + }, + { + "cost": 286, + "cuts": [], + "norm": 1715566, + "root": 7, + "vertex": 7 + }, + { + "cost": 269, + "cuts": [], + "norm": 8194318, + "root": 32, + "vertex": 7 + }, + { + "cost": 269, + "cuts": [], + "norm": 6649032, + "root": 34, + "vertex": 7 + }, + { + "cost": 306, + "cuts": [ + 1 + ], + "norm": 9567892, + "root": 37, + "vertex": 7 + }, + { + "cost": 269, + "cuts": [], + "norm": 4546524, + "root": 49, + "vertex": 7 + }, + { + "cost": 269, + "cuts": [], + "norm": 3132342, + "root": 50, + "vertex": 7 + }, + { + "cost": 269, + "cuts": [], + "norm": 5952272, + "root": 85, + "vertex": 7 + }, + { + "cost": 182, + "cuts": [], + "norm": 1831100, + "root": 8, + "vertex": 8 + }, + { + "cost": 98, + "cuts": [], + "norm": 2824762, + "root": 14, + "vertex": 8 + }, + { + "cost": 98, + "cuts": [], + "norm": 4399432, + "root": 24, + "vertex": 8 + }, + { + "cost": null, + "cuts": null, + "norm": 10549288, + "root": 48, + "vertex": 8 + }, + { + "cost": 98, + "cuts": [], + "norm": 9244478, + "root": 57, + "vertex": 8 + }, + { + "cost": 98, + "cuts": [], + "norm": 8034844, + "root": 63, + "vertex": 8 + }, + { + "cost": 98, + "cuts": [], + "norm": 5439416, + "root": 72, + "vertex": 8 + }, + { + "cost": 98, + "cuts": [], + "norm": 6778910, + "root": 75, + "vertex": 8 + }, + { + "cost": 282, + "cuts": [], + "norm": 1698254, + "root": 9, + "vertex": 9 + }, + { + "cost": 261, + "cuts": [], + "norm": 4815804, + "root": 10, + "vertex": 9 + }, + { + "cost": 261, + "cuts": [], + "norm": 6365972, + "root": 12, + "vertex": 9 + }, + { + "cost": 261, + "cuts": [], + "norm": 3577738, + "root": 15, + "vertex": 9 + }, + { + "cost": 261, + "cuts": [], + "norm": 7535464, + "root": 52, + "vertex": 9 + }, + { + "cost": 796, + "cuts": [], + "norm": 1605250, + "root": 10, + "vertex": 10 + }, + { + "cost": 780, + "cuts": [], + "norm": 3155418, + "root": 12, + "vertex": 10 + }, + { + "cost": 780, + "cuts": [], + "norm": 4324910, + "root": 52, + "vertex": 10 + }, + { + "cost": 176, + "cuts": [], + "norm": 1964542, + "root": 11, + "vertex": 11 + }, + { + "cost": 102, + "cuts": [], + "norm": 2611088, + "root": 13, + "vertex": 11 + }, + { + "cost": 102, + "cuts": [], + "norm": 5307014, + "root": 41, + "vertex": 11 + }, + { + "cost": 102, + "cuts": [], + "norm": 4086170, + "root": 45, + "vertex": 11 + }, + { + "cost": null, + "cuts": null, + "norm": 10236496, + "root": 48, + "vertex": 11 + }, + { + "cost": 102, + "cuts": [], + "norm": 8931686, + "root": 57, + "vertex": 11 + }, + { + "cost": 102, + "cuts": [], + "norm": 8036008, + "root": 77, + "vertex": 11 + }, + { + "cost": 102, + "cuts": [], + "norm": 6932290, + "root": 79, + "vertex": 11 + }, + { + "cost": 1755, + "cuts": [], + "norm": 1472196, + "root": 12, + "vertex": 12 + }, + { + "cost": 1739, + "cuts": [], + "norm": 2641688, + "root": 52, + "vertex": 12 + }, + { + "cost": 260, + "cuts": [], + "norm": 1492004, + "root": 13, + "vertex": 13 + }, + { + "cost": null, + "cuts": null, + "norm": 10390666, + "root": 37, + "vertex": 13 + }, + { + "cost": 239, + "cuts": [], + "norm": 4187930, + "root": 41, + "vertex": 13 + }, + { + "cost": 239, + "cuts": [], + "norm": 2967086, + "root": 45, + "vertex": 13 + }, + { + "cost": 313, + "cuts": [ + 11 + ], + "norm": 9117412, + "root": 48, + "vertex": 13 + }, + { + "cost": 239, + "cuts": [], + "norm": 7812602, + "root": 57, + "vertex": 13 + }, + { + "cost": 239, + "cuts": [], + "norm": 6916924, + "root": 77, + "vertex": 13 + }, + { + "cost": 239, + "cuts": [], + "norm": 5813206, + "root": 79, + "vertex": 13 + }, + { + "cost": 266, + "cuts": [], + "norm": 1747830, + "root": 14, + "vertex": 14 + }, + { + "cost": 229, + "cuts": [], + "norm": 3322500, + "root": 24, + "vertex": 14 + }, + { + "cost": null, + "cuts": null, + "norm": 10745610, + "root": 37, + "vertex": 14 + }, + { + "cost": 313, + "cuts": [ + 8 + ], + "norm": 9472356, + "root": 48, + "vertex": 14 + }, + { + "cost": 229, + "cuts": [], + "norm": 8167546, + "root": 57, + "vertex": 14 + }, + { + "cost": 229, + "cuts": [], + "norm": 6957912, + "root": 63, + "vertex": 14 + }, + { + "cost": 229, + "cuts": [], + "norm": 4362484, + "root": 72, + "vertex": 14 + }, + { + "cost": 229, + "cuts": [], + "norm": 5701978, + "root": 75, + "vertex": 14 + }, + { + "cost": 391, + "cuts": [], + "norm": 3135122, + "root": 10, + "vertex": 15 + }, + { + "cost": 391, + "cuts": [], + "norm": 4685290, + "root": 12, + "vertex": 15 + }, + { + "cost": 438, + "cuts": [], + "norm": 1897056, + "root": 15, + "vertex": 15 + }, + { + "cost": 391, + "cuts": [], + "norm": 5854782, + "root": 52, + "vertex": 15 + }, + { + "cost": 525, + "cuts": [], + "norm": 4635048, + "root": 0, + "vertex": 16 + }, + { + "cost": 525, + "cuts": [], + "norm": 6411232, + "root": 5, + "vertex": 16 + }, + { + "cost": 557, + "cuts": [], + "norm": 1559898, + "root": 16, + "vertex": 16 + }, + { + "cost": 525, + "cuts": [], + "norm": 3320752, + "root": 18, + "vertex": 16 + }, + { + "cost": null, + "cuts": null, + "norm": 11115498, + "root": 50, + "vertex": 16 + }, + { + "cost": 615, + "cuts": [ + 22, + 96 + ], + "norm": 10019370, + "root": 97, + "vertex": 16 + }, + { + "cost": 615, + "cuts": [ + 22, + 96 + ], + "norm": 8653654, + "root": 100, + "vertex": 16 + }, + { + "cost": 563, + "cuts": [ + 96 + ], + "norm": 7616040, + "root": 102, + "vertex": 16 + }, + { + "cost": 273, + "cuts": [], + "norm": 2104074, + "root": 17, + "vertex": 17 + }, + { + "cost": 228, + "cuts": [], + "norm": 4577140, + "root": 19, + "vertex": 17 + }, + { + "cost": 228, + "cuts": [], + "norm": 3538674, + "root": 21, + "vertex": 17 + }, + { + "cost": null, + "cuts": null, + "norm": 11107026, + "root": 50, + "vertex": 17 + }, + { + "cost": 310, + "cuts": [ + 23 + ], + "norm": 10145254, + "root": 58, + "vertex": 17 + }, + { + "cost": 228, + "cuts": [], + "norm": 7191428, + "root": 61, + "vertex": 17 + }, + { + "cost": 228, + "cuts": [], + "norm": 5780174, + "root": 76, + "vertex": 17 + }, + { + "cost": 228, + "cuts": [], + "norm": 8177564, + "root": 78, + "vertex": 17 + }, + { + "cost": 785, + "cuts": [], + "norm": 3182480, + "root": 0, + "vertex": 18 + }, + { + "cost": 785, + "cuts": [], + "norm": 4958664, + "root": 5, + "vertex": 18 + }, + { + "cost": 822, + "cuts": [], + "norm": 1868184, + "root": 18, + "vertex": 18 + }, + { + "cost": null, + "cuts": null, + "norm": 11077112, + "root": 49, + "vertex": 18 + }, + { + "cost": 877, + "cuts": [ + 16, + 20 + ], + "norm": 9662930, + "root": 50, + "vertex": 18 + }, + { + "cost": 817, + "cuts": [ + 16 + ], + "norm": 8566802, + "root": 97, + "vertex": 18 + }, + { + "cost": 817, + "cuts": [ + 16 + ], + "norm": 7201086, + "root": 100, + "vertex": 18 + }, + { + "cost": 817, + "cuts": [ + 16 + ], + "norm": 6163472, + "root": 102, + "vertex": 18 + }, + { + "cost": 1075, + "cuts": [], + "norm": 1976628, + "root": 19, + "vertex": 19 + }, + { + "cost": 1148, + "cuts": [ + 21, + 112 + ], + "norm": 9920696, + "root": 49, + "vertex": 19 + }, + { + "cost": 1132, + "cuts": [ + 21, + 118 + ], + "norm": 8506514, + "root": 50, + "vertex": 19 + }, + { + "cost": 1132, + "cuts": [ + 21, + 118 + ], + "norm": 7544742, + "root": 58, + "vertex": 19 + }, + { + "cost": 1028, + "cuts": [], + "norm": 4590916, + "root": 61, + "vertex": 19 + }, + { + "cost": 1028, + "cuts": [], + "norm": 3179662, + "root": 76, + "vertex": 19 + }, + { + "cost": 1028, + "cuts": [], + "norm": 5577052, + "root": 78, + "vertex": 19 + }, + { + "cost": null, + "cuts": null, + "norm": 11326444, + "root": 85, + "vertex": 19 + }, + { + "cost": 121, + "cuts": [], + "norm": 4424446, + "root": 0, + "vertex": 20 + }, + { + "cost": 121, + "cuts": [], + "norm": 6200630, + "root": 5, + "vertex": 20 + }, + { + "cost": 121, + "cuts": [], + "norm": 3110150, + "root": 18, + "vertex": 20 + }, + { + "cost": 181, + "cuts": [], + "norm": 1962876, + "root": 20, + "vertex": 20 + }, + { + "cost": null, + "cuts": null, + "norm": 10904896, + "root": 50, + "vertex": 20 + }, + { + "cost": 121, + "cuts": [], + "norm": 9808768, + "root": 97, + "vertex": 20 + }, + { + "cost": 121, + "cuts": [], + "norm": 8443052, + "root": 100, + "vertex": 20 + }, + { + "cost": 121, + "cuts": [], + "norm": 7405438, + "root": 102, + "vertex": 20 + }, + { + "cost": 626, + "cuts": [], + "norm": 3308530, + "root": 19, + "vertex": 21 + }, + { + "cost": 697, + "cuts": [], + "norm": 2270064, + "root": 21, + "vertex": 21 + }, + { + "cost": null, + "cuts": null, + "norm": 11252598, + "root": 49, + "vertex": 21 + }, + { + "cost": 708, + "cuts": [ + 4, + 17 + ], + "norm": 9838416, + "root": 50, + "vertex": 21 + }, + { + "cost": 708, + "cuts": [ + 4, + 17 + ], + "norm": 8876644, + "root": 58, + "vertex": 21 + }, + { + "cost": 626, + "cuts": [], + "norm": 5922818, + "root": 61, + "vertex": 21 + }, + { + "cost": 626, + "cuts": [], + "norm": 4511564, + "root": 76, + "vertex": 21 + }, + { + "cost": 626, + "cuts": [], + "norm": 6908954, + "root": 78, + "vertex": 21 + }, + { + "cost": 129, + "cuts": [], + "norm": 6288772, + "root": 0, + "vertex": 22 + }, + { + "cost": 129, + "cuts": [], + "norm": 8064956, + "root": 5, + "vertex": 22 + }, + { + "cost": 129, + "cuts": [], + "norm": 3213622, + "root": 16, + "vertex": 22 + }, + { + "cost": 129, + "cuts": [], + "norm": 4974476, + "root": 18, + "vertex": 22 + }, + { + "cost": 181, + "cuts": [], + "norm": 2008832, + "root": 22, + "vertex": 22 + }, + { + "cost": null, + "cuts": null, + "norm": 11673094, + "root": 97, + "vertex": 22 + }, + { + "cost": null, + "cuts": null, + "norm": 10307378, + "root": 100, + "vertex": 22 + }, + { + "cost": 129, + "cuts": [], + "norm": 9269764, + "root": 102, + "vertex": 22 + }, + { + "cost": 91, + "cuts": [], + "norm": 3034420, + "root": 17, + "vertex": 23 + }, + { + "cost": 91, + "cuts": [], + "norm": 5507486, + "root": 19, + "vertex": 23 + }, + { + "cost": 91, + "cuts": [], + "norm": 4469020, + "root": 21, + "vertex": 23 + }, + { + "cost": 173, + "cuts": [], + "norm": 1881978, + "root": 23, + "vertex": 23 + }, + { + "cost": null, + "cuts": null, + "norm": 11075600, + "root": 58, + "vertex": 23 + }, + { + "cost": 91, + "cuts": [], + "norm": 8121774, + "root": 61, + "vertex": 23 + }, + { + "cost": 91, + "cuts": [], + "norm": 6710520, + "root": 76, + "vertex": 23 + }, + { + "cost": 91, + "cuts": [], + "norm": 9107910, + "root": 78, + "vertex": 23 + }, + { + "cost": 532, + "cuts": [], + "norm": 1693366, + "root": 24, + "vertex": 24 + }, + { + "cost": 582, + "cuts": [ + 14, + 29 + ], + "norm": 9116476, + "root": 37, + "vertex": 24 + }, + { + "cost": 525, + "cuts": [ + 14 + ], + "norm": 7843222, + "root": 48, + "vertex": 24 + }, + { + "cost": 488, + "cuts": [], + "norm": 6538412, + "root": 57, + "vertex": 24 + }, + { + "cost": 488, + "cuts": [], + "norm": 5328778, + "root": 63, + "vertex": 24 + }, + { + "cost": 488, + "cuts": [], + "norm": 2733350, + "root": 72, + "vertex": 24 + }, + { + "cost": 488, + "cuts": [], + "norm": 4072844, + "root": 75, + "vertex": 24 + }, + { + "cost": 250, + "cuts": [], + "norm": 1669970, + "root": 25, + "vertex": 25 + }, + { + "cost": 229, + "cuts": [], + "norm": 6418090, + "root": 33, + "vertex": 25 + }, + { + "cost": 229, + "cuts": [], + "norm": 3437110, + "root": 51, + "vertex": 25 + }, + { + "cost": 229, + "cuts": [], + "norm": 4643070, + "root": 64, + "vertex": 25 + }, + { + "cost": 229, + "cuts": [], + "norm": 5415100, + "root": 66, + "vertex": 25 + }, + { + "cost": 125, + "cuts": [], + "norm": 4324022, + "root": 10, + "vertex": 26 + }, + { + "cost": 125, + "cuts": [], + "norm": 5874190, + "root": 12, + "vertex": 26 + }, + { + "cost": 181, + "cuts": [], + "norm": 1946068, + "root": 26, + "vertex": 26 + }, + { + "cost": 125, + "cuts": [], + "norm": 2970380, + "root": 31, + "vertex": 26 + }, + { + "cost": 125, + "cuts": [], + "norm": 7043682, + "root": 52, + "vertex": 26 + }, + { + "cost": 152, + "cuts": [], + "norm": 1498006, + "root": 27, + "vertex": 27 + }, + { + "cost": 134, + "cuts": [], + "norm": 3292568, + "root": 30, + "vertex": 27 + }, + { + "cost": 134, + "cuts": [], + "norm": 8523516, + "root": 37, + "vertex": 27 + }, + { + "cost": 134, + "cuts": [], + "norm": 7250262, + "root": 48, + "vertex": 27 + }, + { + "cost": 134, + "cuts": [], + "norm": 5925850, + "root": 68, + "vertex": 27 + }, + { + "cost": 134, + "cuts": [], + "norm": 4801576, + "root": 70, + "vertex": 27 + }, + { + "cost": 93, + "cuts": [], + "norm": 2606826, + "root": 25, + "vertex": 28 + }, + { + "cost": 178, + "cuts": [], + "norm": 1665822, + "root": 28, + "vertex": 28 + }, + { + "cost": 93, + "cuts": [], + "norm": 7354946, + "root": 33, + "vertex": 28 + }, + { + "cost": 93, + "cuts": [], + "norm": 4373966, + "root": 51, + "vertex": 28 + }, + { + "cost": 93, + "cuts": [], + "norm": 5579926, + "root": 64, + "vertex": 28 + }, + { + "cost": 93, + "cuts": [], + "norm": 6351956, + "root": 66, + "vertex": 28 + }, + { + "cost": 124, + "cuts": [], + "norm": 3042622, + "root": 24, + "vertex": 29 + }, + { + "cost": 181, + "cuts": [], + "norm": 1757364, + "root": 29, + "vertex": 29 + }, + { + "cost": null, + "cuts": null, + "norm": 10465732, + "root": 37, + "vertex": 29 + }, + { + "cost": 124, + "cuts": [], + "norm": 9192478, + "root": 48, + "vertex": 29 + }, + { + "cost": 124, + "cuts": [], + "norm": 7887668, + "root": 57, + "vertex": 29 + }, + { + "cost": 124, + "cuts": [], + "norm": 6678034, + "root": 63, + "vertex": 29 + }, + { + "cost": 124, + "cuts": [], + "norm": 4082606, + "root": 72, + "vertex": 29 + }, + { + "cost": 124, + "cuts": [], + "norm": 5422100, + "root": 75, + "vertex": 29 + }, + { + "cost": 288, + "cuts": [], + "norm": 1608930, + "root": 30, + "vertex": 30 + }, + { + "cost": 263, + "cuts": [], + "norm": 6839878, + "root": 37, + "vertex": 30 + }, + { + "cost": 263, + "cuts": [], + "norm": 5566624, + "root": 48, + "vertex": 30 + }, + { + "cost": 263, + "cuts": [], + "norm": 4242212, + "root": 68, + "vertex": 30 + }, + { + "cost": 263, + "cuts": [], + "norm": 3117938, + "root": 70, + "vertex": 30 + }, + { + "cost": 260, + "cuts": [], + "norm": 3074814, + "root": 10, + "vertex": 31 + }, + { + "cost": 260, + "cuts": [], + "norm": 4624982, + "root": 12, + "vertex": 31 + }, + { + "cost": 291, + "cuts": [], + "norm": 1721172, + "root": 31, + "vertex": 31 + }, + { + "cost": 260, + "cuts": [], + "norm": 5794474, + "root": 52, + "vertex": 31 + }, + { + "cost": 5987, + "cuts": [ + 5, + 34, + 78 + ], + "norm": 1560540, + "root": 32, + "vertex": 32 + }, + { + "cost": 5980, + "cuts": [ + 5, + 34, + 78 + ], + "norm": 2934114, + "root": 37, + "vertex": 32 + }, + { + "cost": 1584, + "cuts": [], + "norm": 1195300, + "root": 33, + "vertex": 33 + }, + { + "cost": 5746, + "cuts": [ + 0, + 78, + 100 + ], + "norm": 2995812, + "root": 32, + "vertex": 34 + }, + { + "cost": 5723, + "cuts": [ + 5, + 78 + ], + "norm": 1450526, + "root": 34, + "vertex": 34 + }, + { + "cost": 5747, + "cuts": [ + 5, + 49, + 78 + ], + "norm": 4369386, + "root": 37, + "vertex": 34 + }, + { + "cost": 264, + "cuts": [], + "norm": 3910420, + "root": 33, + "vertex": 35 + }, + { + "cost": 312, + "cuts": [], + "norm": 1756616, + "root": 35, + "vertex": 35 + }, + { + "cost": 264, + "cuts": [], + "norm": 2907430, + "root": 66, + "vertex": 35 + }, + { + "cost": 102, + "cuts": [], + "norm": 7331166, + "root": 33, + "vertex": 36 + }, + { + "cost": 153, + "cuts": [], + "norm": 1647082, + "root": 36, + "vertex": 36 + }, + { + "cost": 102, + "cuts": [], + "norm": 4350186, + "root": 51, + "vertex": 36 + }, + { + "cost": 102, + "cuts": [], + "norm": 5556146, + "root": 64, + "vertex": 36 + }, + { + "cost": 102, + "cuts": [], + "norm": 6328176, + "root": 66, + "vertex": 36 + }, + { + "cost": 102, + "cuts": [], + "norm": 2972676, + "root": 80, + "vertex": 36 + }, + { + "cost": 11459, + "cuts": [ + 5, + 34, + 39, + 57, + 78 + ], + "norm": 1613492, + "root": 37, + "vertex": 37 + }, + { + "cost": 126, + "cuts": [], + "norm": 2913248, + "root": 32, + "vertex": 38 + }, + { + "cost": 126, + "cuts": [], + "norm": 4286822, + "root": 37, + "vertex": 38 + }, + { + "cost": 170, + "cuts": [], + "norm": 1848632, + "root": 38, + "vertex": 38 + }, + { + "cost": null, + "cuts": null, + "norm": 10545890, + "root": 37, + "vertex": 39 + }, + { + "cost": 382, + "cuts": [], + "norm": 1873002, + "root": 39, + "vertex": 39 + }, + { + "cost": 369, + "cuts": [], + "norm": 3172898, + "root": 47, + "vertex": 39 + }, + { + "cost": 391, + "cuts": [ + 65 + ], + "norm": 9272636, + "root": 48, + "vertex": 39 + }, + { + "cost": 391, + "cuts": [ + 65 + ], + "norm": 7967826, + "root": 57, + "vertex": 39 + }, + { + "cost": 369, + "cuts": [], + "norm": 6758192, + "root": 63, + "vertex": 39 + }, + { + "cost": 369, + "cuts": [], + "norm": 5502258, + "root": 75, + "vertex": 39 + }, + { + "cost": 369, + "cuts": [], + "norm": 4136438, + "root": 91, + "vertex": 39 + }, + { + "cost": null, + "cuts": null, + "norm": 10783846, + "root": 34, + "vertex": 40 + }, + { + "cost": 183, + "cuts": [], + "norm": 1685534, + "root": 40, + "vertex": 40 + }, + { + "cost": 127, + "cuts": [], + "norm": 8681338, + "root": 49, + "vertex": 40 + }, + { + "cost": 127, + "cuts": [], + "norm": 7267156, + "root": 50, + "vertex": 40 + }, + { + "cost": 127, + "cuts": [], + "norm": 6305384, + "root": 58, + "vertex": 40 + }, + { + "cost": 127, + "cuts": [], + "norm": 3351558, + "root": 61, + "vertex": 40 + }, + { + "cost": 127, + "cuts": [], + "norm": 4337694, + "root": 78, + "vertex": 40 + }, + { + "cost": 127, + "cuts": [], + "norm": 10087086, + "root": 85, + "vertex": 40 + }, + { + "cost": 634, + "cuts": [ + 13 + ], + "norm": 7656012, + "root": 37, + "vertex": 41 + }, + { + "cost": 641, + "cuts": [], + "norm": 1453276, + "root": 41, + "vertex": 41 + }, + { + "cost": 634, + "cuts": [ + 13 + ], + "norm": 6382758, + "root": 48, + "vertex": 41 + }, + { + "cost": 613, + "cuts": [], + "norm": 5077948, + "root": 57, + "vertex": 41 + }, + { + "cost": 613, + "cuts": [], + "norm": 4182270, + "root": 77, + "vertex": 41 + }, + { + "cost": 613, + "cuts": [], + "norm": 3078552, + "root": 79, + "vertex": 41 + }, + { + "cost": 106, + "cuts": [], + "norm": 10136860, + "root": 37, + "vertex": 42 + }, + { + "cost": 142, + "cuts": [], + "norm": 1419704, + "root": 42, + "vertex": 42 + }, + { + "cost": 106, + "cuts": [], + "norm": 8863606, + "root": 48, + "vertex": 42 + }, + { + "cost": 106, + "cuts": [], + "norm": 7558796, + "root": 57, + "vertex": 42 + }, + { + "cost": 106, + "cuts": [], + "norm": 4401204, + "root": 59, + "vertex": 42 + }, + { + "cost": 106, + "cuts": [], + "norm": 6663118, + "root": 77, + "vertex": 42 + }, + { + "cost": 106, + "cuts": [], + "norm": 5559400, + "root": 79, + "vertex": 42 + }, + { + "cost": 106, + "cuts": [], + "norm": 2597012, + "root": 93, + "vertex": 42 + }, + { + "cost": 256, + "cuts": [], + "norm": 2550402, + "root": 33, + "vertex": 43 + }, + { + "cost": 275, + "cuts": [], + "norm": 1585402, + "root": 43, + "vertex": 43 + }, + { + "cost": 135, + "cuts": [], + "norm": 9261616, + "root": 37, + "vertex": 44 + }, + { + "cost": 135, + "cuts": [], + "norm": 3058880, + "root": 41, + "vertex": 44 + }, + { + "cost": 150, + "cuts": [], + "norm": 1391920, + "root": 44, + "vertex": 44 + }, + { + "cost": 135, + "cuts": [], + "norm": 7988362, + "root": 48, + "vertex": 44 + }, + { + "cost": 135, + "cuts": [], + "norm": 6683552, + "root": 57, + "vertex": 44 + }, + { + "cost": 135, + "cuts": [], + "norm": 5787874, + "root": 77, + "vertex": 44 + }, + { + "cost": 135, + "cuts": [], + "norm": 4684156, + "root": 79, + "vertex": 44 + }, + { + "cost": 380, + "cuts": [ + 13 + ], + "norm": 9000576, + "root": 37, + "vertex": 45 + }, + { + "cost": 359, + "cuts": [], + "norm": 2797840, + "root": 41, + "vertex": 45 + }, + { + "cost": 402, + "cuts": [], + "norm": 1576996, + "root": 45, + "vertex": 45 + }, + { + "cost": 380, + "cuts": [ + 13 + ], + "norm": 7727322, + "root": 48, + "vertex": 45 + }, + { + "cost": 359, + "cuts": [], + "norm": 6422512, + "root": 57, + "vertex": 45 + }, + { + "cost": 359, + "cuts": [], + "norm": 5526834, + "root": 77, + "vertex": 45 + }, + { + "cost": 359, + "cuts": [], + "norm": 4423116, + "root": 79, + "vertex": 45 + }, + { + "cost": 125, + "cuts": [], + "norm": 3951942, + "root": 33, + "vertex": 46 + }, + { + "cost": 125, + "cuts": [], + "norm": 2986942, + "root": 43, + "vertex": 46 + }, + { + "cost": 167, + "cuts": [], + "norm": 1741504, + "root": 46, + "vertex": 46 + }, + { + "cost": 487, + "cuts": [ + 39 + ], + "norm": 9133388, + "root": 37, + "vertex": 47 + }, + { + "cost": 530, + "cuts": [], + "norm": 1760396, + "root": 47, + "vertex": 47 + }, + { + "cost": 487, + "cuts": [ + 39 + ], + "norm": 7860134, + "root": 48, + "vertex": 47 + }, + { + "cost": 487, + "cuts": [ + 39 + ], + "norm": 6555324, + "root": 57, + "vertex": 47 + }, + { + "cost": 474, + "cuts": [], + "norm": 5345690, + "root": 63, + "vertex": 47 + }, + { + "cost": 474, + "cuts": [], + "norm": 4089756, + "root": 75, + "vertex": 47 + }, + { + "cost": 474, + "cuts": [], + "norm": 2723936, + "root": 91, + "vertex": 47 + }, + { + "cost": 5354, + "cuts": [ + 39, + 57 + ], + "norm": 2899508, + "root": 37, + "vertex": 48 + }, + { + "cost": 5389, + "cuts": [ + 39, + 57 + ], + "norm": 1626254, + "root": 48, + "vertex": 48 + }, + { + "cost": 5516, + "cuts": [ + 0, + 78, + 100 + ], + "norm": 5455348, + "root": 32, + "vertex": 49 + }, + { + "cost": 5483, + "cuts": [ + 5, + 78 + ], + "norm": 3910062, + "root": 34, + "vertex": 49 + }, + { + "cost": 5531, + "cuts": [ + 5, + 50, + 78 + ], + "norm": 6828922, + "root": 37, + "vertex": 49 + }, + { + "cost": 5517, + "cuts": [ + 5, + 78 + ], + "norm": 1807554, + "root": 49, + "vertex": 49 + }, + { + "cost": 5483, + "cuts": [ + 5, + 78 + ], + "norm": 3213302, + "root": 85, + "vertex": 49 + }, + { + "cost": 5139, + "cuts": [ + 0, + 78, + 100 + ], + "norm": 6726428, + "root": 32, + "vertex": 50 + }, + { + "cost": 5106, + "cuts": [ + 5, + 78 + ], + "norm": 5181142, + "root": 34, + "vertex": 50 + }, + { + "cost": 5156, + "cuts": [ + 0, + 7, + 78, + 100 + ], + "norm": 8100002, + "root": 37, + "vertex": 50 + }, + { + "cost": 5106, + "cuts": [ + 5, + 78 + ], + "norm": 3078634, + "root": 49, + "vertex": 50 + }, + { + "cost": 5154, + "cuts": [ + 5, + 78 + ], + "norm": 1664452, + "root": 50, + "vertex": 50 + }, + { + "cost": 5106, + "cuts": [ + 5, + 78 + ], + "norm": 4484382, + "root": 85, + "vertex": 50 + }, + { + "cost": 699, + "cuts": [], + "norm": 4848188, + "root": 33, + "vertex": 51 + }, + { + "cost": 746, + "cuts": [], + "norm": 1867208, + "root": 51, + "vertex": 51 + }, + { + "cost": 699, + "cuts": [], + "norm": 3073168, + "root": 64, + "vertex": 51 + }, + { + "cost": 699, + "cuts": [], + "norm": 3845198, + "root": 66, + "vertex": 51 + }, + { + "cost": 1861, + "cuts": [], + "norm": 1482410, + "root": 52, + "vertex": 52 + }, + { + "cost": 315, + "cuts": [ + 54 + ], + "norm": 9642822, + "root": 37, + "vertex": 53 + }, + { + "cost": 239, + "cuts": [], + "norm": 8369568, + "root": 48, + "vertex": 53 + }, + { + "cost": 276, + "cuts": [], + "norm": 2034966, + "root": 53, + "vertex": 53 + }, + { + "cost": 239, + "cuts": [], + "norm": 7064758, + "root": 57, + "vertex": 53 + }, + { + "cost": 239, + "cuts": [], + "norm": 3574406, + "root": 60, + "vertex": 53 + }, + { + "cost": 239, + "cuts": [], + "norm": 5855124, + "root": 63, + "vertex": 53 + }, + { + "cost": 239, + "cuts": [], + "norm": 4599190, + "root": 75, + "vertex": 53 + }, + { + "cost": null, + "cuts": null, + "norm": 10760848, + "root": 37, + "vertex": 54 + }, + { + "cost": 100, + "cuts": [], + "norm": 9487594, + "root": 48, + "vertex": 54 + }, + { + "cost": 100, + "cuts": [], + "norm": 3152992, + "root": 53, + "vertex": 54 + }, + { + "cost": 176, + "cuts": [], + "norm": 1920850, + "root": 54, + "vertex": 54 + }, + { + "cost": 100, + "cuts": [], + "norm": 8182784, + "root": 57, + "vertex": 54 + }, + { + "cost": 100, + "cuts": [], + "norm": 4692432, + "root": 60, + "vertex": 54 + }, + { + "cost": 100, + "cuts": [], + "norm": 6973150, + "root": 63, + "vertex": 54 + }, + { + "cost": 100, + "cuts": [], + "norm": 5717216, + "root": 75, + "vertex": 54 + }, + { + "cost": 129, + "cuts": [], + "norm": 5443868, + "root": 33, + "vertex": 55 + }, + { + "cost": 129, + "cuts": [], + "norm": 3290064, + "root": 35, + "vertex": 55 + }, + { + "cost": 174, + "cuts": [], + "norm": 2040362, + "root": 55, + "vertex": 55 + }, + { + "cost": 129, + "cuts": [], + "norm": 4440878, + "root": 66, + "vertex": 55 + }, + { + "cost": 238, + "cuts": [], + "norm": 7017028, + "root": 37, + "vertex": 56 + }, + { + "cost": 238, + "cuts": [], + "norm": 5743774, + "root": 48, + "vertex": 56 + }, + { + "cost": 269, + "cuts": [], + "norm": 1759884, + "root": 56, + "vertex": 56 + }, + { + "cost": 238, + "cuts": [], + "norm": 4438964, + "root": 57, + "vertex": 56 + }, + { + "cost": 238, + "cuts": [], + "norm": 3229330, + "root": 63, + "vertex": 56 + }, + { + "cost": 4501, + "cuts": [ + 13, + 75, + 93 + ], + "norm": 4102226, + "root": 37, + "vertex": 57 + }, + { + "cost": 4496, + "cuts": [ + 13, + 75 + ], + "norm": 2828972, + "root": 48, + "vertex": 57 + }, + { + "cost": 4473, + "cuts": [ + 39 + ], + "norm": 1524162, + "root": 57, + "vertex": 57 + }, + { + "cost": 2181, + "cuts": [ + 78 + ], + "norm": 8105570, + "root": 32, + "vertex": 58 + }, + { + "cost": 2181, + "cuts": [ + 78 + ], + "norm": 6560284, + "root": 34, + "vertex": 58 + }, + { + "cost": 2181, + "cuts": [ + 78 + ], + "norm": 9479144, + "root": 37, + "vertex": 58 + }, + { + "cost": 2181, + "cuts": [ + 78 + ], + "norm": 4457776, + "root": 49, + "vertex": 58 + }, + { + "cost": 2181, + "cuts": [ + 78 + ], + "norm": 3043594, + "root": 50, + "vertex": 58 + }, + { + "cost": 2242, + "cuts": [ + 78 + ], + "norm": 2081822, + "root": 58, + "vertex": 58 + }, + { + "cost": 2181, + "cuts": [ + 78 + ], + "norm": 5863524, + "root": 85, + "vertex": 58 + }, + { + "cost": 756, + "cuts": [ + 93 + ], + "norm": 7495614, + "root": 37, + "vertex": 59 + }, + { + "cost": 751, + "cuts": [], + "norm": 6222360, + "root": 48, + "vertex": 59 + }, + { + "cost": 751, + "cuts": [], + "norm": 4917550, + "root": 57, + "vertex": 59 + }, + { + "cost": 799, + "cuts": [], + "norm": 1759958, + "root": 59, + "vertex": 59 + }, + { + "cost": 751, + "cuts": [], + "norm": 4021872, + "root": 77, + "vertex": 59 + }, + { + "cost": 751, + "cuts": [], + "norm": 2918154, + "root": 79, + "vertex": 59 + }, + { + "cost": 411, + "cuts": [ + 53 + ], + "norm": 8106612, + "root": 37, + "vertex": 60 + }, + { + "cost": 374, + "cuts": [], + "norm": 6833358, + "root": 48, + "vertex": 60 + }, + { + "cost": 374, + "cuts": [], + "norm": 5528548, + "root": 57, + "vertex": 60 + }, + { + "cost": 404, + "cuts": [], + "norm": 2038196, + "root": 60, + "vertex": 60 + }, + { + "cost": 374, + "cuts": [], + "norm": 4318914, + "root": 63, + "vertex": 60 + }, + { + "cost": 374, + "cuts": [], + "norm": 3062980, + "root": 75, + "vertex": 60 + }, + { + "cost": null, + "cuts": null, + "norm": 10802188, + "root": 32, + "vertex": 61 + }, + { + "cost": 1810, + "cuts": [ + 40, + 76, + 98 + ], + "norm": 9256902, + "root": 34, + "vertex": 61 + }, + { + "cost": 1685, + "cuts": [ + 19 + ], + "norm": 7154394, + "root": 49, + "vertex": 61 + }, + { + "cost": 1685, + "cuts": [ + 19 + ], + "norm": 5740212, + "root": 50, + "vertex": 61 + }, + { + "cost": 1685, + "cuts": [ + 19 + ], + "norm": 4778440, + "root": 58, + "vertex": 61 + }, + { + "cost": 1706, + "cuts": [], + "norm": 1824614, + "root": 61, + "vertex": 61 + }, + { + "cost": 1638, + "cuts": [], + "norm": 2810750, + "root": 78, + "vertex": 61 + }, + { + "cost": 1732, + "cuts": [ + 19, + 103 + ], + "norm": 8560142, + "root": 85, + "vertex": 61 + }, + { + "cost": 102, + "cuts": [], + "norm": 8164182, + "root": 37, + "vertex": 62 + }, + { + "cost": 102, + "cuts": [], + "norm": 6890928, + "root": 48, + "vertex": 62 + }, + { + "cost": 102, + "cuts": [], + "norm": 2907038, + "root": 56, + "vertex": 62 + }, + { + "cost": 102, + "cuts": [], + "norm": 5586118, + "root": 57, + "vertex": 62 + }, + { + "cost": 155, + "cuts": [], + "norm": 1635452, + "root": 62, + "vertex": 62 + }, + { + "cost": 102, + "cuts": [], + "norm": 4376484, + "root": 63, + "vertex": 62 + }, + { + "cost": 2506, + "cuts": [ + 75 + ], + "norm": 5369986, + "root": 37, + "vertex": 63 + }, + { + "cost": 2506, + "cuts": [ + 75 + ], + "norm": 4096732, + "root": 48, + "vertex": 63 + }, + { + "cost": 2476, + "cuts": [ + 39 + ], + "norm": 2791922, + "root": 57, + "vertex": 63 + }, + { + "cost": 2513, + "cuts": [], + "norm": 1582288, + "root": 63, + "vertex": 63 + }, + { + "cost": 814, + "cuts": [], + "norm": 3666990, + "root": 33, + "vertex": 64 + }, + { + "cost": 862, + "cuts": [], + "norm": 1891970, + "root": 64, + "vertex": 64 + }, + { + "cost": 814, + "cuts": [], + "norm": 2664000, + "root": 66, + "vertex": 64 + }, + { + "cost": 238, + "cuts": [], + "norm": 3246032, + "root": 39, + "vertex": 65 + }, + { + "cost": 238, + "cuts": [], + "norm": 4545928, + "root": 47, + "vertex": 65 + }, + { + "cost": null, + "cuts": null, + "norm": 10645666, + "root": 48, + "vertex": 65 + }, + { + "cost": 302, + "cuts": [ + 71 + ], + "norm": 9340856, + "root": 57, + "vertex": 65 + }, + { + "cost": 238, + "cuts": [], + "norm": 8131222, + "root": 63, + "vertex": 65 + }, + { + "cost": 260, + "cuts": [], + "norm": 2031252, + "root": 65, + "vertex": 65 + }, + { + "cost": 238, + "cuts": [], + "norm": 6875288, + "root": 75, + "vertex": 65 + }, + { + "cost": 238, + "cuts": [], + "norm": 5509468, + "root": 91, + "vertex": 65 + }, + { + "cost": 1201, + "cuts": [], + "norm": 2566994, + "root": 33, + "vertex": 66 + }, + { + "cost": 1226, + "cuts": [], + "norm": 1564004, + "root": 66, + "vertex": 66 + }, + { + "cost": 251, + "cuts": [], + "norm": 6854610, + "root": 32, + "vertex": 67 + }, + { + "cost": 251, + "cuts": [], + "norm": 5309324, + "root": 34, + "vertex": 67 + }, + { + "cost": 251, + "cuts": [], + "norm": 8228184, + "root": 37, + "vertex": 67 + }, + { + "cost": 251, + "cuts": [], + "norm": 3206816, + "root": 49, + "vertex": 67 + }, + { + "cost": 291, + "cuts": [], + "norm": 1827498, + "root": 67, + "vertex": 67 + }, + { + "cost": 251, + "cuts": [], + "norm": 4612564, + "root": 85, + "vertex": 67 + }, + { + "cost": 508, + "cuts": [], + "norm": 4205700, + "root": 37, + "vertex": 68 + }, + { + "cost": 508, + "cuts": [], + "norm": 2932446, + "root": 48, + "vertex": 68 + }, + { + "cost": 526, + "cuts": [], + "norm": 1608034, + "root": 68, + "vertex": 68 + }, + { + "cost": 122, + "cuts": [], + "norm": 8142434, + "root": 32, + "vertex": 69 + }, + { + "cost": 122, + "cuts": [], + "norm": 6597148, + "root": 34, + "vertex": 69 + }, + { + "cost": 122, + "cuts": [], + "norm": 9516008, + "root": 37, + "vertex": 69 + }, + { + "cost": 122, + "cuts": [], + "norm": 4494640, + "root": 49, + "vertex": 69 + }, + { + "cost": 122, + "cuts": [], + "norm": 3115322, + "root": 67, + "vertex": 69 + }, + { + "cost": 185, + "cuts": [], + "norm": 1690032, + "root": 69, + "vertex": 69 + }, + { + "cost": 122, + "cuts": [], + "norm": 5900388, + "root": 85, + "vertex": 69 + }, + { + "cost": 387, + "cuts": [], + "norm": 5557012, + "root": 37, + "vertex": 70 + }, + { + "cost": 387, + "cuts": [], + "norm": 4283758, + "root": 48, + "vertex": 70 + }, + { + "cost": 387, + "cuts": [], + "norm": 2959346, + "root": 68, + "vertex": 70 + }, + { + "cost": 412, + "cuts": [], + "norm": 1835072, + "root": 70, + "vertex": 70 + }, + { + "cost": 102, + "cuts": [], + "norm": 4441838, + "root": 39, + "vertex": 71 + }, + { + "cost": 102, + "cuts": [], + "norm": 5741734, + "root": 47, + "vertex": 71 + }, + { + "cost": null, + "cuts": null, + "norm": 10536662, + "root": 57, + "vertex": 71 + }, + { + "cost": 102, + "cuts": [], + "norm": 9327028, + "root": 63, + "vertex": 71 + }, + { + "cost": 102, + "cuts": [], + "norm": 3227058, + "root": 65, + "vertex": 71 + }, + { + "cost": 166, + "cuts": [], + "norm": 1889814, + "root": 71, + "vertex": 71 + }, + { + "cost": 102, + "cuts": [], + "norm": 8071094, + "root": 75, + "vertex": 71 + }, + { + "cost": 102, + "cuts": [], + "norm": 6705274, + "root": 91, + "vertex": 71 + }, + { + "cost": 654, + "cuts": [ + 24 + ], + "norm": 7902990, + "root": 37, + "vertex": 72 + }, + { + "cost": 647, + "cuts": [ + 14 + ], + "norm": 6629736, + "root": 48, + "vertex": 72 + }, + { + "cost": 610, + "cuts": [], + "norm": 5324926, + "root": 57, + "vertex": 72 + }, + { + "cost": 610, + "cuts": [], + "norm": 4115292, + "root": 63, + "vertex": 72 + }, + { + "cost": 642, + "cuts": [], + "norm": 1519864, + "root": 72, + "vertex": 72 + }, + { + "cost": 610, + "cuts": [], + "norm": 2859358, + "root": 75, + "vertex": 72 + }, + { + "cost": 230, + "cuts": [], + "norm": 6948926, + "root": 12, + "vertex": 73 + }, + { + "cost": 230, + "cuts": [], + "norm": 8118418, + "root": 52, + "vertex": 73 + }, + { + "cost": 287, + "cuts": [], + "norm": 2084520, + "root": 73, + "vertex": 73 + }, + { + "cost": 230, + "cuts": [], + "norm": 5151678, + "root": 83, + "vertex": 73 + }, + { + "cost": 230, + "cuts": [], + "norm": 4519354, + "root": 90, + "vertex": 73 + }, + { + "cost": 230, + "cuts": [], + "norm": 3265024, + "root": 92, + "vertex": 73 + }, + { + "cost": 106, + "cuts": [], + "norm": 8128416, + "root": 12, + "vertex": 74 + }, + { + "cost": 106, + "cuts": [], + "norm": 9297908, + "root": 52, + "vertex": 74 + }, + { + "cost": 106, + "cuts": [], + "norm": 3264010, + "root": 73, + "vertex": 74 + }, + { + "cost": 171, + "cuts": [], + "norm": 1948274, + "root": 74, + "vertex": 74 + }, + { + "cost": 106, + "cuts": [], + "norm": 6331168, + "root": 83, + "vertex": 74 + }, + { + "cost": 106, + "cuts": [], + "norm": 5698844, + "root": 90, + "vertex": 74 + }, + { + "cost": 106, + "cuts": [], + "norm": 4444514, + "root": 92, + "vertex": 74 + }, + { + "cost": 1919, + "cuts": [ + 39, + 60, + 72 + ], + "norm": 6607022, + "root": 37, + "vertex": 75 + }, + { + "cost": 1889, + "cuts": [ + 39, + 72 + ], + "norm": 5333768, + "root": 48, + "vertex": 75 + }, + { + "cost": 1857, + "cuts": [ + 39 + ], + "norm": 4028958, + "root": 57, + "vertex": 75 + }, + { + "cost": 1844, + "cuts": [], + "norm": 2819324, + "root": 63, + "vertex": 75 + }, + { + "cost": 1887, + "cuts": [], + "norm": 1563390, + "root": 75, + "vertex": 75 + }, + { + "cost": null, + "cuts": null, + "norm": 10582220, + "root": 34, + "vertex": 76 + }, + { + "cost": 1194, + "cuts": [ + 19 + ], + "norm": 8479712, + "root": 49, + "vertex": 76 + }, + { + "cost": 1194, + "cuts": [ + 19 + ], + "norm": 7065530, + "root": 50, + "vertex": 76 + }, + { + "cost": 1194, + "cuts": [ + 19 + ], + "norm": 6103758, + "root": 58, + "vertex": 76 + }, + { + "cost": 1147, + "cuts": [], + "norm": 3149932, + "root": 61, + "vertex": 76 + }, + { + "cost": 1213, + "cuts": [], + "norm": 1738678, + "root": 76, + "vertex": 76 + }, + { + "cost": 1147, + "cuts": [], + "norm": 4136068, + "root": 78, + "vertex": 76 + }, + { + "cost": 1194, + "cuts": [ + 19 + ], + "norm": 9885460, + "root": 85, + "vertex": 76 + }, + { + "cost": 1869, + "cuts": [ + 13, + 93 + ], + "norm": 5304988, + "root": 37, + "vertex": 77 + }, + { + "cost": 1864, + "cuts": [ + 13 + ], + "norm": 4031734, + "root": 48, + "vertex": 77 + }, + { + "cost": 1843, + "cuts": [], + "norm": 2726924, + "root": 57, + "vertex": 77 + }, + { + "cost": 1885, + "cuts": [], + "norm": 1831246, + "root": 77, + "vertex": 77 + }, + { + "cost": 2178, + "cuts": [ + 61, + 94 + ], + "norm": 9669226, + "root": 32, + "vertex": 78 + }, + { + "cost": 2160, + "cuts": [ + 61, + 88 + ], + "norm": 8123940, + "root": 34, + "vertex": 78 + }, + { + "cost": null, + "cuts": null, + "norm": 11042800, + "root": 37, + "vertex": 78 + }, + { + "cost": 2089, + "cuts": [ + 19 + ], + "norm": 6021432, + "root": 49, + "vertex": 78 + }, + { + "cost": 2089, + "cuts": [ + 19 + ], + "norm": 4607250, + "root": 50, + "vertex": 78 + }, + { + "cost": 2089, + "cuts": [ + 19 + ], + "norm": 3645478, + "root": 58, + "vertex": 78 + }, + { + "cost": 2055, + "cuts": [], + "norm": 1677788, + "root": 78, + "vertex": 78 + }, + { + "cost": 2160, + "cuts": [ + 61, + 88 + ], + "norm": 7427180, + "root": 85, + "vertex": 78 + }, + { + "cost": 1753, + "cuts": [ + 13, + 93 + ], + "norm": 6201150, + "root": 37, + "vertex": 79 + }, + { + "cost": 1748, + "cuts": [ + 13 + ], + "norm": 4927896, + "root": 48, + "vertex": 79 + }, + { + "cost": 1727, + "cuts": [], + "norm": 3623086, + "root": 57, + "vertex": 79 + }, + { + "cost": 1727, + "cuts": [], + "norm": 2727408, + "root": 77, + "vertex": 79 + }, + { + "cost": 1789, + "cuts": [], + "norm": 1623690, + "root": 79, + "vertex": 79 + }, + { + "cost": 360, + "cuts": [], + "norm": 6300640, + "root": 33, + "vertex": 80 + }, + { + "cost": 360, + "cuts": [], + "norm": 3319660, + "root": 51, + "vertex": 80 + }, + { + "cost": 360, + "cuts": [], + "norm": 4525620, + "root": 64, + "vertex": 80 + }, + { + "cost": 360, + "cuts": [], + "norm": 5297650, + "root": 66, + "vertex": 80 + }, + { + "cost": 411, + "cuts": [], + "norm": 1942150, + "root": 80, + "vertex": 80 + }, + { + "cost": 128, + "cuts": [], + "norm": 7585194, + "root": 33, + "vertex": 81 + }, + { + "cost": 128, + "cuts": [], + "norm": 4604214, + "root": 51, + "vertex": 81 + }, + { + "cost": 128, + "cuts": [], + "norm": 5810174, + "root": 64, + "vertex": 81 + }, + { + "cost": 128, + "cuts": [], + "norm": 6582204, + "root": 66, + "vertex": 81 + }, + { + "cost": 128, + "cuts": [], + "norm": 3226704, + "root": 80, + "vertex": 81 + }, + { + "cost": 145, + "cuts": [], + "norm": 1554284, + "root": 81, + "vertex": 81 + }, + { + "cost": 250, + "cuts": [], + "norm": 4341056, + "root": 3, + "vertex": 82 + }, + { + "cost": 250, + "cuts": [], + "norm": 6243942, + "root": 5, + "vertex": 82 + }, + { + "cost": 250, + "cuts": [], + "norm": 3236892, + "root": 6, + "vertex": 82 + }, + { + "cost": null, + "cuts": null, + "norm": 10948208, + "root": 50, + "vertex": 82 + }, + { + "cost": 300, + "cuts": [], + "norm": 1972494, + "root": 82, + "vertex": 82 + }, + { + "cost": 286, + "cuts": [ + 87 + ], + "norm": 9852080, + "root": 97, + "vertex": 82 + }, + { + "cost": 250, + "cuts": [], + "norm": 8486364, + "root": 100, + "vertex": 82 + }, + { + "cost": 250, + "cuts": [], + "norm": 7448750, + "root": 102, + "vertex": 82 + }, + { + "cost": 603, + "cuts": [], + "norm": 2795706, + "root": 12, + "vertex": 83 + }, + { + "cost": 603, + "cuts": [], + "norm": 3965198, + "root": 52, + "vertex": 83 + }, + { + "cost": 619, + "cuts": [], + "norm": 998458, + "root": 83, + "vertex": 83 + }, + { + "cost": 121, + "cuts": [], + "norm": 1305942, + "root": 84, + "vertex": 84 + }, + { + "cost": 5617, + "cuts": [ + 0, + 78, + 100 + ], + "norm": 3931046, + "root": 32, + "vertex": 85 + }, + { + "cost": 5584, + "cuts": [ + 5, + 78 + ], + "norm": 2385760, + "root": 34, + "vertex": 85 + }, + { + "cost": 5618, + "cuts": [ + 5, + 49, + 78 + ], + "norm": 5304620, + "root": 37, + "vertex": 85 + }, + { + "cost": 5651, + "cuts": [ + 5, + 78 + ], + "norm": 1689000, + "root": 85, + "vertex": 85 + }, + { + "cost": 132, + "cuts": [], + "norm": 3336212, + "root": 9, + "vertex": 86 + }, + { + "cost": 132, + "cuts": [], + "norm": 6453762, + "root": 10, + "vertex": 86 + }, + { + "cost": 132, + "cuts": [], + "norm": 8003930, + "root": 12, + "vertex": 86 + }, + { + "cost": 132, + "cuts": [], + "norm": 5215696, + "root": 15, + "vertex": 86 + }, + { + "cost": 132, + "cuts": [], + "norm": 9173422, + "root": 52, + "vertex": 86 + }, + { + "cost": 164, + "cuts": [], + "norm": 2094812, + "root": 86, + "vertex": 86 + }, + { + "cost": 128, + "cuts": [], + "norm": 5735756, + "root": 3, + "vertex": 87 + }, + { + "cost": 128, + "cuts": [], + "norm": 7638642, + "root": 5, + "vertex": 87 + }, + { + "cost": 128, + "cuts": [], + "norm": 4631592, + "root": 6, + "vertex": 87 + }, + { + "cost": 128, + "cuts": [], + "norm": 3367194, + "root": 82, + "vertex": 87 + }, + { + "cost": 164, + "cuts": [], + "norm": 1895528, + "root": 87, + "vertex": 87 + }, + { + "cost": null, + "cuts": null, + "norm": 11246780, + "root": 97, + "vertex": 87 + }, + { + "cost": 128, + "cuts": [], + "norm": 9881064, + "root": 100, + "vertex": 87 + }, + { + "cost": 128, + "cuts": [], + "norm": 8843450, + "root": 102, + "vertex": 87 + }, + { + "cost": null, + "cuts": null, + "norm": 11336432, + "root": 34, + "vertex": 88 + }, + { + "cost": 135, + "cuts": [], + "norm": 9233924, + "root": 49, + "vertex": 88 + }, + { + "cost": 135, + "cuts": [], + "norm": 7819742, + "root": 50, + "vertex": 88 + }, + { + "cost": 135, + "cuts": [], + "norm": 6857970, + "root": 58, + "vertex": 88 + }, + { + "cost": 135, + "cuts": [], + "norm": 4890280, + "root": 78, + "vertex": 88 + }, + { + "cost": null, + "cuts": null, + "norm": 10639672, + "root": 85, + "vertex": 88 + }, + { + "cost": 185, + "cuts": [], + "norm": 2101272, + "root": 88, + "vertex": 88 + }, + { + "cost": 135, + "cuts": [], + "norm": 3719048, + "root": 94, + "vertex": 88 + }, + { + "cost": 133, + "cuts": [], + "norm": 9326606, + "root": 37, + "vertex": 89 + }, + { + "cost": 133, + "cuts": [], + "norm": 8053352, + "root": 48, + "vertex": 89 + }, + { + "cost": 133, + "cuts": [], + "norm": 6748542, + "root": 57, + "vertex": 89 + }, + { + "cost": 133, + "cuts": [], + "norm": 5538908, + "root": 63, + "vertex": 89 + }, + { + "cost": 133, + "cuts": [], + "norm": 4282974, + "root": 75, + "vertex": 89 + }, + { + "cost": 193, + "cuts": [], + "norm": 2034762, + "root": 89, + "vertex": 89 + }, + { + "cost": 133, + "cuts": [], + "norm": 2917154, + "root": 91, + "vertex": 89 + }, + { + "cost": 486, + "cuts": [], + "norm": 4087588, + "root": 12, + "vertex": 90 + }, + { + "cost": 486, + "cuts": [], + "norm": 5257080, + "root": 52, + "vertex": 90 + }, + { + "cost": 486, + "cuts": [], + "norm": 2290340, + "root": 83, + "vertex": 90 + }, + { + "cost": 531, + "cuts": [], + "norm": 1658016, + "root": 90, + "vertex": 90 + }, + { + "cost": 748, + "cuts": [ + 39 + ], + "norm": 8001048, + "root": 37, + "vertex": 91 + }, + { + "cost": 748, + "cuts": [ + 39 + ], + "norm": 6727794, + "root": 48, + "vertex": 91 + }, + { + "cost": 748, + "cuts": [ + 39 + ], + "norm": 5422984, + "root": 57, + "vertex": 91 + }, + { + "cost": 735, + "cuts": [], + "norm": 4213350, + "root": 63, + "vertex": 91 + }, + { + "cost": 735, + "cuts": [], + "norm": 2957416, + "root": 75, + "vertex": 91 + }, + { + "cost": 749, + "cuts": [], + "norm": 1591596, + "root": 91, + "vertex": 91 + }, + { + "cost": 357, + "cuts": [], + "norm": 5474848, + "root": 12, + "vertex": 92 + }, + { + "cost": 357, + "cuts": [], + "norm": 6644340, + "root": 52, + "vertex": 92 + }, + { + "cost": 357, + "cuts": [], + "norm": 3677600, + "root": 83, + "vertex": 92 + }, + { + "cost": 357, + "cuts": [], + "norm": 3045276, + "root": 90, + "vertex": 92 + }, + { + "cost": 399, + "cuts": [], + "norm": 1790946, + "root": 92, + "vertex": 92 + }, + { + "cost": 530, + "cuts": [ + 107 + ], + "norm": 9008686, + "root": 37, + "vertex": 93 + }, + { + "cost": 494, + "cuts": [], + "norm": 7735432, + "root": 48, + "vertex": 93 + }, + { + "cost": 494, + "cuts": [], + "norm": 6430622, + "root": 57, + "vertex": 93 + }, + { + "cost": 494, + "cuts": [], + "norm": 3273030, + "root": 59, + "vertex": 93 + }, + { + "cost": 494, + "cuts": [], + "norm": 5534944, + "root": 77, + "vertex": 93 + }, + { + "cost": 494, + "cuts": [], + "norm": 4431226, + "root": 79, + "vertex": 93 + }, + { + "cost": 499, + "cuts": [], + "norm": 1468838, + "root": 93, + "vertex": 93 + }, + { + "cost": null, + "cuts": null, + "norm": 11286474, + "root": 32, + "vertex": 94 + }, + { + "cost": 321, + "cuts": [ + 88 + ], + "norm": 9741188, + "root": 34, + "vertex": 94 + }, + { + "cost": 271, + "cuts": [], + "norm": 7638680, + "root": 49, + "vertex": 94 + }, + { + "cost": 271, + "cuts": [], + "norm": 6224498, + "root": 50, + "vertex": 94 + }, + { + "cost": 271, + "cuts": [], + "norm": 5262726, + "root": 58, + "vertex": 94 + }, + { + "cost": 271, + "cuts": [], + "norm": 3295036, + "root": 78, + "vertex": 94 + }, + { + "cost": 321, + "cuts": [ + 88 + ], + "norm": 9044428, + "root": 85, + "vertex": 94 + }, + { + "cost": 339, + "cuts": [], + "norm": 2123804, + "root": 94, + "vertex": 94 + }, + { + "cost": 136, + "cuts": [], + "norm": 8763762, + "root": 37, + "vertex": 95 + }, + { + "cost": 136, + "cuts": [], + "norm": 7490508, + "root": 48, + "vertex": 95 + }, + { + "cost": 136, + "cuts": [], + "norm": 6185698, + "root": 57, + "vertex": 95 + }, + { + "cost": 136, + "cuts": [], + "norm": 3028106, + "root": 59, + "vertex": 95 + }, + { + "cost": 136, + "cuts": [], + "norm": 5290020, + "root": 77, + "vertex": 95 + }, + { + "cost": 136, + "cuts": [], + "norm": 4186302, + "root": 79, + "vertex": 95 + }, + { + "cost": 177, + "cuts": [], + "norm": 1832674, + "root": 95, + "vertex": 95 + }, + { + "cost": 260, + "cuts": [], + "norm": 6231336, + "root": 0, + "vertex": 96 + }, + { + "cost": 260, + "cuts": [], + "norm": 8007520, + "root": 5, + "vertex": 96 + }, + { + "cost": 260, + "cuts": [], + "norm": 3156186, + "root": 16, + "vertex": 96 + }, + { + "cost": 260, + "cuts": [], + "norm": 4917040, + "root": 18, + "vertex": 96 + }, + { + "cost": 298, + "cuts": [], + "norm": 2006766, + "root": 96, + "vertex": 96 + }, + { + "cost": null, + "cuts": null, + "norm": 11615658, + "root": 97, + "vertex": 96 + }, + { + "cost": null, + "cuts": null, + "norm": 10249942, + "root": 100, + "vertex": 96 + }, + { + "cost": 321, + "cuts": [ + 101 + ], + "norm": 9212328, + "root": 102, + "vertex": 96 + }, + { + "cost": 2572, + "cuts": [ + 0, + 100 + ], + "norm": 7860866, + "root": 32, + "vertex": 97 + }, + { + "cost": 2539, + "cuts": [ + 5 + ], + "norm": 6315580, + "root": 34, + "vertex": 97 + }, + { + "cost": 2572, + "cuts": [ + 0, + 100 + ], + "norm": 9234440, + "root": 37, + "vertex": 97 + }, + { + "cost": 2539, + "cuts": [ + 5 + ], + "norm": 4213072, + "root": 49, + "vertex": 97 + }, + { + "cost": 2539, + "cuts": [ + 5 + ], + "norm": 2798890, + "root": 50, + "vertex": 97 + }, + { + "cost": 2539, + "cuts": [ + 5 + ], + "norm": 5618820, + "root": 85, + "vertex": 97 + }, + { + "cost": 2572, + "cuts": [ + 5 + ], + "norm": 1702762, + "root": 97, + "vertex": 97 + }, + { + "cost": null, + "cuts": null, + "norm": 10458008, + "root": 34, + "vertex": 98 + }, + { + "cost": 262, + "cuts": [], + "norm": 8355500, + "root": 49, + "vertex": 98 + }, + { + "cost": 262, + "cuts": [], + "norm": 6941318, + "root": 50, + "vertex": 98 + }, + { + "cost": 262, + "cuts": [], + "norm": 5979546, + "root": 58, + "vertex": 98 + }, + { + "cost": 262, + "cuts": [], + "norm": 3025720, + "root": 61, + "vertex": 98 + }, + { + "cost": 262, + "cuts": [], + "norm": 4011856, + "root": 78, + "vertex": 98 + }, + { + "cost": 309, + "cuts": [ + 103 + ], + "norm": 9761248, + "root": 85, + "vertex": 98 + }, + { + "cost": 312, + "cuts": [], + "norm": 1627294, + "root": 98, + "vertex": 98 + }, + { + "cost": 91, + "cuts": [], + "norm": 9800790, + "root": 34, + "vertex": 99 + }, + { + "cost": 91, + "cuts": [], + "norm": 7698282, + "root": 49, + "vertex": 99 + }, + { + "cost": 91, + "cuts": [], + "norm": 6284100, + "root": 50, + "vertex": 99 + }, + { + "cost": 91, + "cuts": [], + "norm": 9104030, + "root": 85, + "vertex": 99 + }, + { + "cost": 91, + "cuts": [], + "norm": 5187972, + "root": 97, + "vertex": 99 + }, + { + "cost": 181, + "cuts": [], + "norm": 1730692, + "root": 99, + "vertex": 99 + }, + { + "cost": 91, + "cuts": [], + "norm": 3822256, + "root": 100, + "vertex": 99 + }, + { + "cost": 91, + "cuts": [], + "norm": 2784642, + "root": 102, + "vertex": 99 + }, + { + "cost": 2452, + "cuts": [ + 0, + 102 + ], + "norm": 9190546, + "root": 32, + "vertex": 100 + }, + { + "cost": 2402, + "cuts": [ + 5 + ], + "norm": 7645260, + "root": 34, + "vertex": 100 + }, + { + "cost": null, + "cuts": null, + "norm": 10564120, + "root": 37, + "vertex": 100 + }, + { + "cost": 2402, + "cuts": [ + 5 + ], + "norm": 5542752, + "root": 49, + "vertex": 100 + }, + { + "cost": 2402, + "cuts": [ + 5 + ], + "norm": 4128570, + "root": 50, + "vertex": 100 + }, + { + "cost": 2402, + "cuts": [ + 5 + ], + "norm": 6948500, + "root": 85, + "vertex": 100 + }, + { + "cost": 2402, + "cuts": [ + 5 + ], + "norm": 3032442, + "root": 97, + "vertex": 100 + }, + { + "cost": 2435, + "cuts": [ + 0 + ], + "norm": 1666726, + "root": 100, + "vertex": 100 + }, + { + "cost": 121, + "cuts": [], + "norm": 7479400, + "root": 0, + "vertex": 101 + }, + { + "cost": 121, + "cuts": [], + "norm": 9255584, + "root": 5, + "vertex": 101 + }, + { + "cost": 121, + "cuts": [], + "norm": 4404250, + "root": 16, + "vertex": 101 + }, + { + "cost": 121, + "cuts": [], + "norm": 6165104, + "root": 18, + "vertex": 101 + }, + { + "cost": 121, + "cuts": [], + "norm": 3254830, + "root": 96, + "vertex": 101 + }, + { + "cost": 182, + "cuts": [], + "norm": 1856862, + "root": 101, + "vertex": 101 + }, + { + "cost": null, + "cuts": null, + "norm": 10460392, + "root": 102, + "vertex": 101 + }, + { + "cost": null, + "cuts": null, + "norm": 10432060, + "root": 32, + "vertex": 102 + }, + { + "cost": 2275, + "cuts": [ + 5 + ], + "norm": 8886774, + "root": 34, + "vertex": 102 + }, + { + "cost": 2275, + "cuts": [ + 5 + ], + "norm": 6784266, + "root": 49, + "vertex": 102 + }, + { + "cost": 2275, + "cuts": [ + 5 + ], + "norm": 5370084, + "root": 50, + "vertex": 102 + }, + { + "cost": 2275, + "cuts": [ + 5 + ], + "norm": 8190014, + "root": 85, + "vertex": 102 + }, + { + "cost": 2275, + "cuts": [ + 5 + ], + "norm": 4273956, + "root": 97, + "vertex": 102 + }, + { + "cost": 2264, + "cuts": [ + 0 + ], + "norm": 2908240, + "root": 100, + "vertex": 102 + }, + { + "cost": 2325, + "cuts": [ + 0 + ], + "norm": 1870626, + "root": 102, + "vertex": 102 + }, + { + "cost": 129, + "cuts": [], + "norm": 10017410, + "root": 49, + "vertex": 103 + }, + { + "cost": 129, + "cuts": [], + "norm": 8603228, + "root": 50, + "vertex": 103 + }, + { + "cost": 129, + "cuts": [], + "norm": 7641456, + "root": 58, + "vertex": 103 + }, + { + "cost": 129, + "cuts": [], + "norm": 4687630, + "root": 61, + "vertex": 103 + }, + { + "cost": 129, + "cuts": [], + "norm": 5673766, + "root": 78, + "vertex": 103 + }, + { + "cost": null, + "cuts": null, + "norm": 11423158, + "root": 85, + "vertex": 103 + }, + { + "cost": 129, + "cuts": [], + "norm": 3289204, + "root": 98, + "vertex": 103 + }, + { + "cost": 176, + "cuts": [], + "norm": 2041900, + "root": 103, + "vertex": 103 + }, + { + "cost": 93, + "cuts": [], + "norm": 3803136, + "root": 12, + "vertex": 104 + }, + { + "cost": 93, + "cuts": [], + "norm": 4972628, + "root": 52, + "vertex": 104 + }, + { + "cost": 172, + "cuts": [], + "norm": 1845950, + "root": 104, + "vertex": 104 + }, + { + "cost": 93, + "cuts": [], + "norm": 2728138, + "root": 110, + "vertex": 104 + }, + { + "cost": 266, + "cuts": [], + "norm": 6825628, + "root": 37, + "vertex": 105 + }, + { + "cost": 266, + "cuts": [], + "norm": 5552374, + "root": 48, + "vertex": 105 + }, + { + "cost": 266, + "cuts": [], + "norm": 4247564, + "root": 57, + "vertex": 105 + }, + { + "cost": 266, + "cuts": [], + "norm": 3037930, + "root": 63, + "vertex": 105 + }, + { + "cost": 279, + "cuts": [], + "norm": 1641446, + "root": 105, + "vertex": 105 + }, + { + "cost": 264, + "cuts": [], + "norm": 4144994, + "root": 37, + "vertex": 106 + }, + { + "cost": 264, + "cuts": [], + "norm": 2871740, + "root": 48, + "vertex": 106 + }, + { + "cost": 298, + "cuts": [], + "norm": 1642816, + "root": 106, + "vertex": 106 + }, + { + "cost": 313, + "cuts": [ + 109 + ], + "norm": 10025338, + "root": 37, + "vertex": 107 + }, + { + "cost": 263, + "cuts": [], + "norm": 8752084, + "root": 48, + "vertex": 107 + }, + { + "cost": 263, + "cuts": [], + "norm": 7447274, + "root": 57, + "vertex": 107 + }, + { + "cost": 263, + "cuts": [], + "norm": 4289682, + "root": 59, + "vertex": 107 + }, + { + "cost": 263, + "cuts": [], + "norm": 6551596, + "root": 77, + "vertex": 107 + }, + { + "cost": 263, + "cuts": [], + "norm": 5447878, + "root": 79, + "vertex": 107 + }, + { + "cost": 263, + "cuts": [], + "norm": 2485490, + "root": 93, + "vertex": 107 + }, + { + "cost": 299, + "cuts": [], + "norm": 1862338, + "root": 107, + "vertex": 107 + }, + { + "cost": 132, + "cuts": [], + "norm": 5819488, + "root": 37, + "vertex": 108 + }, + { + "cost": 132, + "cuts": [], + "norm": 4546234, + "root": 48, + "vertex": 108 + }, + { + "cost": 132, + "cuts": [], + "norm": 3317310, + "root": 106, + "vertex": 108 + }, + { + "cost": 150, + "cuts": [], + "norm": 1629916, + "root": 108, + "vertex": 108 + }, + { + "cost": null, + "cuts": null, + "norm": 11312474, + "root": 37, + "vertex": 109 + }, + { + "cost": 125, + "cuts": [], + "norm": 10039220, + "root": 48, + "vertex": 109 + }, + { + "cost": 125, + "cuts": [], + "norm": 8734410, + "root": 57, + "vertex": 109 + }, + { + "cost": 125, + "cuts": [], + "norm": 5576818, + "root": 59, + "vertex": 109 + }, + { + "cost": 125, + "cuts": [], + "norm": 7838732, + "root": 77, + "vertex": 109 + }, + { + "cost": 125, + "cuts": [], + "norm": 6735014, + "root": 79, + "vertex": 109 + }, + { + "cost": 125, + "cuts": [], + "norm": 3772626, + "root": 93, + "vertex": 109 + }, + { + "cost": 125, + "cuts": [], + "norm": 3149474, + "root": 107, + "vertex": 109 + }, + { + "cost": 175, + "cuts": [], + "norm": 1877664, + "root": 109, + "vertex": 109 + }, + { + "cost": 234, + "cuts": [], + "norm": 2856354, + "root": 12, + "vertex": 110 + }, + { + "cost": 234, + "cuts": [], + "norm": 4025846, + "root": 52, + "vertex": 110 + }, + { + "cost": 256, + "cuts": [], + "norm": 1781356, + "root": 110, + "vertex": 110 + }, + { + "cost": 127, + "cuts": [], + "norm": 8165738, + "root": 37, + "vertex": 111 + }, + { + "cost": 127, + "cuts": [], + "norm": 6892484, + "root": 48, + "vertex": 111 + }, + { + "cost": 127, + "cuts": [], + "norm": 5587674, + "root": 57, + "vertex": 111 + }, + { + "cost": 127, + "cuts": [], + "norm": 4378040, + "root": 63, + "vertex": 111 + }, + { + "cost": 127, + "cuts": [], + "norm": 2981556, + "root": 105, + "vertex": 111 + }, + { + "cost": 179, + "cuts": [], + "norm": 1913086, + "root": 111, + "vertex": 111 + }, + { + "cost": 272, + "cuts": [], + "norm": 3266626, + "root": 19, + "vertex": 112 + }, + { + "cost": null, + "cuts": null, + "norm": 11210694, + "root": 49, + "vertex": 112 + }, + { + "cost": 305, + "cuts": [ + 118 + ], + "norm": 9796512, + "root": 50, + "vertex": 112 + }, + { + "cost": 305, + "cuts": [ + 118 + ], + "norm": 8834740, + "root": 58, + "vertex": 112 + }, + { + "cost": 272, + "cuts": [], + "norm": 5880914, + "root": 61, + "vertex": 112 + }, + { + "cost": 272, + "cuts": [], + "norm": 4469660, + "root": 76, + "vertex": 112 + }, + { + "cost": 272, + "cuts": [], + "norm": 6867050, + "root": 78, + "vertex": 112 + }, + { + "cost": 321, + "cuts": [], + "norm": 1963006, + "root": 112, + "vertex": 112 + }, + { + "cost": 238, + "cuts": [], + "norm": 3085496, + "root": 0, + "vertex": 113 + }, + { + "cost": 238, + "cuts": [], + "norm": 4861680, + "root": 5, + "vertex": 113 + }, + { + "cost": null, + "cuts": null, + "norm": 10980128, + "root": 49, + "vertex": 113 + }, + { + "cost": 332, + "cuts": [ + 119 + ], + "norm": 9565946, + "root": 50, + "vertex": 113 + }, + { + "cost": 238, + "cuts": [], + "norm": 8469818, + "root": 97, + "vertex": 113 + }, + { + "cost": 238, + "cuts": [], + "norm": 7104102, + "root": 100, + "vertex": 113 + }, + { + "cost": 238, + "cuts": [], + "norm": 6066488, + "root": 102, + "vertex": 113 + }, + { + "cost": 297, + "cuts": [], + "norm": 1873622, + "root": 113, + "vertex": 113 + }, + { + "cost": 232, + "cuts": [], + "norm": 3122920, + "root": 3, + "vertex": 114 + }, + { + "cost": 232, + "cuts": [], + "norm": 5025806, + "root": 5, + "vertex": 114 + }, + { + "cost": null, + "cuts": null, + "norm": 11144254, + "root": 49, + "vertex": 114 + }, + { + "cost": 307, + "cuts": [ + 116 + ], + "norm": 9730072, + "root": 50, + "vertex": 114 + }, + { + "cost": 232, + "cuts": [], + "norm": 8633944, + "root": 97, + "vertex": 114 + }, + { + "cost": 232, + "cuts": [], + "norm": 7268228, + "root": 100, + "vertex": 114 + }, + { + "cost": 232, + "cuts": [], + "norm": 6230614, + "root": 102, + "vertex": 114 + }, + { + "cost": 296, + "cuts": [], + "norm": 2036456, + "root": 114, + "vertex": 114 + }, + { + "cost": 271, + "cuts": [], + "norm": 7590340, + "root": 37, + "vertex": 115 + }, + { + "cost": 271, + "cuts": [], + "norm": 6317086, + "root": 48, + "vertex": 115 + }, + { + "cost": 271, + "cuts": [], + "norm": 5012276, + "root": 57, + "vertex": 115 + }, + { + "cost": 271, + "cuts": [], + "norm": 4116598, + "root": 77, + "vertex": 115 + }, + { + "cost": 271, + "cuts": [], + "norm": 3012880, + "root": 79, + "vertex": 115 + }, + { + "cost": 313, + "cuts": [], + "norm": 1884506, + "root": 115, + "vertex": 115 + }, + { + "cost": 101, + "cuts": [], + "norm": 4224300, + "root": 3, + "vertex": 116 + }, + { + "cost": 101, + "cuts": [], + "norm": 6127186, + "root": 5, + "vertex": 116 + }, + { + "cost": null, + "cuts": null, + "norm": 10831452, + "root": 50, + "vertex": 116 + }, + { + "cost": 101, + "cuts": [], + "norm": 9735324, + "root": 97, + "vertex": 116 + }, + { + "cost": 101, + "cuts": [], + "norm": 8369608, + "root": 100, + "vertex": 116 + }, + { + "cost": 101, + "cuts": [], + "norm": 7331994, + "root": 102, + "vertex": 116 + }, + { + "cost": 101, + "cuts": [], + "norm": 3137836, + "root": 114, + "vertex": 116 + }, + { + "cost": 176, + "cuts": [], + "norm": 1731372, + "root": 116, + "vertex": 116 + }, + { + "cost": 133, + "cuts": [], + "norm": 8994296, + "root": 37, + "vertex": 117 + }, + { + "cost": 133, + "cuts": [], + "norm": 7721042, + "root": 48, + "vertex": 117 + }, + { + "cost": 133, + "cuts": [], + "norm": 6416232, + "root": 57, + "vertex": 117 + }, + { + "cost": 133, + "cuts": [], + "norm": 5520554, + "root": 77, + "vertex": 117 + }, + { + "cost": 133, + "cuts": [], + "norm": 4416836, + "root": 79, + "vertex": 117 + }, + { + "cost": 133, + "cuts": [], + "norm": 3288462, + "root": 115, + "vertex": 117 + }, + { + "cost": 189, + "cuts": [], + "norm": 1787484, + "root": 117, + "vertex": 117 + }, + { + "cost": 132, + "cuts": [], + "norm": 4674428, + "root": 19, + "vertex": 118 + }, + { + "cost": null, + "cuts": null, + "norm": 11204314, + "root": 50, + "vertex": 118 + }, + { + "cost": null, + "cuts": null, + "norm": 10242542, + "root": 58, + "vertex": 118 + }, + { + "cost": 132, + "cuts": [], + "norm": 7288716, + "root": 61, + "vertex": 118 + }, + { + "cost": 132, + "cuts": [], + "norm": 5877462, + "root": 76, + "vertex": 118 + }, + { + "cost": 132, + "cuts": [], + "norm": 8274852, + "root": 78, + "vertex": 118 + }, + { + "cost": 132, + "cuts": [], + "norm": 3370808, + "root": 112, + "vertex": 118 + }, + { + "cost": 165, + "cuts": [], + "norm": 1658972, + "root": 118, + "vertex": 118 + }, + { + "cost": 103, + "cuts": [], + "norm": 4203374, + "root": 0, + "vertex": 119 + }, + { + "cost": 103, + "cuts": [], + "norm": 5979558, + "root": 5, + "vertex": 119 + }, + { + "cost": null, + "cuts": null, + "norm": 10683824, + "root": 50, + "vertex": 119 + }, + { + "cost": 103, + "cuts": [], + "norm": 9587696, + "root": 97, + "vertex": 119 + }, + { + "cost": 103, + "cuts": [], + "norm": 8221980, + "root": 100, + "vertex": 119 + }, + { + "cost": 103, + "cuts": [], + "norm": 7184366, + "root": 102, + "vertex": 119 + }, + { + "cost": 103, + "cuts": [], + "norm": 2991500, + "root": 113, + "vertex": 119 + }, + { + "cost": 197, + "cuts": [], + "norm": 1911190, + "root": 119, + "vertex": 119 + } + ], + "subsets_covered": 83076749736557242056487941267521536, + "uncut_canonical_sha256": "4b2a3bed0f8256dd0e075615e8c3aceff31e2efda0ae46e4083217406d870ed7" +} diff --git a/research/r420-forest-cut-budget/data/lean-axioms.txt b/research/r420-forest-cut-budget/data/lean-axioms.txt new file mode 100644 index 0000000000..3820feac47 --- /dev/null +++ b/research/r420-forest-cut-budget/data/lean-axioms.txt @@ -0,0 +1,7 @@ +'TargetForest.run_add' depends on axioms: [propext, Quot.sound] +'TargetForest.run_reverse' depends on axioms: [propext, Quot.sound] +'TargetForest.compensated_injection' depends on axioms: [propext, Quot.sound] +'TargetForest.run_forestAction' depends on axioms: [propext, Quot.sound] +'TargetForest.forest_compensated_injection' depends on axioms: [propext, Quot.sound] +'TargetForest.compensatedShear_correct' depends on axioms: [propext, Quot.sound] +'TargetForest.forestShear_correct' depends on axioms: [propext, Quot.sound] diff --git a/research/r420-forest-cut-budget/data/native-selected.json b/research/r420-forest-cut-budget/data/native-selected.json new file mode 100644 index 0000000000..0ca9ff8b0a --- /dev/null +++ b/research/r420-forest-cut-budget/data/native-selected.json @@ -0,0 +1,1238 @@ +{ + "baseline": { + "columns": { + "columns_h": { + "exit": 0, + "log": "baseline-columns_h.log", + "receipt": { + "bridge_additions": 720, + "copied_center_original_source_immutable": true, + "five_stage_additions": 134580, + "formal_columns_checked": 900, + "fresh_center_copies": 45, + "global_live_registers": 900, + "independent_dirty_registers": 420, + "local_odd_scalar_additions": 26916, + "local_raw_H": [ + [ + 1, + 1320 + ], + [ + 2, + 1440 + ], + [ + 4, + 60 + ], + [ + 5, + 120 + ], + [ + 8, + 9 + ] + ], + "local_registers": 660, + "local_scalar_additions": 26916, + "local_scalar_stream": "/private/tmp/r420-forest-native/final-selected/baseline/cout/COHORT249-RECORDS.bin", + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 100, + "payload_prefix_upper": "998206739997057013039187410944", + "reverse_fresh_center_copies": 18, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "seconds": 0.001387166, + "signed_lift_prefix": [ + { + "bits": 18, + "cancellation_free_signed_row_l1_upper": "144651", + "reverse": false + }, + { + "bits": 22, + "cancellation_free_signed_row_l1_upper": "2270064", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 4 + } + ], + "status": "PASS_NEW_COHORT249_ALL_FIVE_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "seconds": 0.214659, + "stderr": "stage 0 PASS elapsed 0.000285666s\nstage 1 PASS elapsed 0.000548958s\nstage 2 PASS elapsed 0.000818s\nstage 3 PASS elapsed 0.00108638s\nstage 4 PASS elapsed 0.00135896s" + }, + "columns_k4": { + "exit": 0, + "log": "baseline-columns_k4.log", + "receipt": { + "bridge_additions": 2160, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1380, + "fresh_center_copies": 81, + "global_live_registers": 1380, + "independent_dirty_registers": 420, + "local_odd_scalar_additions": 26916, + "local_raw_H": [ + [ + 1, + 1320 + ], + [ + 2, + 1440 + ], + [ + 4, + 60 + ], + [ + 5, + 120 + ], + [ + 8, + 9 + ] + ], + "local_registers": 660, + "local_scalar_additions": 26916, + "local_scalar_stream": "/private/tmp/r420-forest-native/final-selected/baseline/cout/COHORT249-RECORDS.bin", + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 100, + "payload_prefix_upper": "998206739997057013039187410944", + "reverse_fresh_center_copies": 36, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "seconds": 0.002991875, + "signed_lift_prefix": [ + { + "bits": 18, + "cancellation_free_signed_row_l1_upper": "144651", + "reverse": false + }, + { + "bits": 22, + "cancellation_free_signed_row_l1_upper": "2270064", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 242244, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 8 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "seconds": 0.212443, + "stderr": "stage 0 PASS elapsed 0.000357834s\nstage 1 PASS elapsed 0.000693084s\nstage 2 PASS elapsed 0.00101829s\nstage 3 PASS elapsed 0.00134337s\nstage 4 PASS elapsed 0.00167671s\nstage 5 PASS elapsed 0.00199704s\nstage 6 PASS elapsed 0.00230562s\nstage 7 PASS elapsed 0.00262054s\nstage 8 PASS elapsed 0.00294604s" + }, + "columns_k5": { + "exit": 0, + "log": "baseline-columns_k5.log", + "receipt": { + "bridge_additions": 2880, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1620, + "fresh_center_copies": 99, + "global_live_registers": 1620, + "independent_dirty_registers": 420, + "local_odd_scalar_additions": 26916, + "local_raw_H": [ + [ + 1, + 1320 + ], + [ + 2, + 1440 + ], + [ + 4, + 60 + ], + [ + 5, + 120 + ], + [ + 8, + 9 + ] + ], + "local_registers": 660, + "local_scalar_additions": 26916, + "local_scalar_stream": "/private/tmp/r420-forest-native/final-selected/baseline/cout/COHORT249-RECORDS.bin", + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + }, + { + "omit_bridge": 18, + "rejected": true + }, + { + "omit_bridge": 19, + "rejected": true + }, + { + "omit_bridge": 20, + "rejected": true + }, + { + "omit_bridge": 21, + "rejected": true + }, + { + "omit_bridge": 22, + "rejected": true + }, + { + "omit_bridge": 23, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 100, + "payload_prefix_upper": "998206739997057013039187410944", + "reverse_fresh_center_copies": 45, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "seconds": 0.003617291, + "signed_lift_prefix": [ + { + "bits": 18, + "cancellation_free_signed_row_l1_upper": "144651", + "reverse": false + }, + { + "bits": 22, + "cancellation_free_signed_row_l1_upper": "2270064", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 296076, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 8 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 9 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 10 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "seconds": 0.216095, + "stderr": "stage 0 PASS elapsed 0.000366875s\nstage 1 PASS elapsed 0.000692875s\nstage 2 PASS elapsed 0.00100967s\nstage 3 PASS elapsed 0.00132004s\nstage 4 PASS elapsed 0.00163183s\nstage 5 PASS elapsed 0.00194171s\nstage 6 PASS elapsed 0.00225217s\nstage 7 PASS elapsed 0.002567s\nstage 8 PASS elapsed 0.00288638s\nstage 9 PASS elapsed 0.00322079s\nstage 10 PASS elapsed 0.00355958s" + } + }, + "gram_passed": true, + "legality": { + "all_final_frames_pass": true, + "common_frame_ADDs": 26916, + "containment_pairs_checked": 2460, + "copies": 9, + "donor_intersections": 0, + "erasures": 9, + "max_inherited_integer_abs": 2, + "nested_MOVEs": 2940, + "new_frame_ids_collision": false, + "nondegeneracy_checked_by_separate_exact_bank_audit": true, + "old_max_frame_id": 671, + "paid_histogram": [ + [ + 1, + 1320 + ], + [ + 2, + 1440 + ], + [ + 4, + 60 + ], + [ + 5, + 120 + ], + [ + 8, + 9 + ] + ], + "rank_mass": 5112, + "records": 29874, + "scope": "Independent chronological geometry/copy/source-owner audit. F2 all-column replay is in the separately freshly compiled transform receipt; address transform theorem and bank completion remain separate.", + "selected_helpers": 0, + "selected_pairs": 0, + "source_owner_intersections": 0, + "status": "PASS_INDEPENDENT_COHORT_LEGALITY_SOURCE_OWNERS_AND_LIFECYCLE" + } + }, + "candidate": { + "columns": { + "columns_h": { + "exit": 0, + "log": "candidate-columns_h.log", + "receipt": { + "bridge_additions": 720, + "copied_center_original_source_immutable": true, + "five_stage_additions": 110095, + "formal_columns_checked": 900, + "fresh_center_copies": 45, + "global_live_registers": 900, + "independent_dirty_registers": 420, + "local_odd_scalar_additions": 22019, + "local_raw_H": [ + [ + 1, + 1320 + ], + [ + 2, + 1440 + ], + [ + 4, + 60 + ], + [ + 5, + 120 + ], + [ + 8, + 9 + ] + ], + "local_registers": 660, + "local_scalar_additions": 22019, + "local_scalar_stream": "/private/tmp/r420-forest-native/final-selected/candidate/cout/COHORT249-RECORDS.bin", + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 104, + "payload_prefix_upper": "18606576056688220135806852422400", + "reverse_fresh_center_copies": 18, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "seconds": 0.00115225, + "signed_lift_prefix": [ + { + "bits": 18, + "cancellation_free_signed_row_l1_upper": "144651", + "reverse": false + }, + { + "bits": 24, + "cancellation_free_signed_row_l1_upper": "9800790", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": false, + "stage": 4 + } + ], + "status": "PASS_NEW_COHORT249_ALL_FIVE_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "seconds": 0.005831, + "stderr": "stage 0 PASS elapsed 0.000233958s\nstage 1 PASS elapsed 0.000452875s\nstage 2 PASS elapsed 0.000669458s\nstage 3 PASS elapsed 0.00089625s\nstage 4 PASS elapsed 0.00112504s" + }, + "columns_k4": { + "exit": 0, + "log": "candidate-columns_k4.log", + "receipt": { + "bridge_additions": 2160, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1380, + "fresh_center_copies": 81, + "global_live_registers": 1380, + "independent_dirty_registers": 420, + "local_odd_scalar_additions": 22019, + "local_raw_H": [ + [ + 1, + 1320 + ], + [ + 2, + 1440 + ], + [ + 4, + 60 + ], + [ + 5, + 120 + ], + [ + 8, + 9 + ] + ], + "local_registers": 660, + "local_scalar_additions": 22019, + "local_scalar_stream": "/private/tmp/r420-forest-native/final-selected/candidate/cout/COHORT249-RECORDS.bin", + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 104, + "payload_prefix_upper": "18606576056688220135806852422400", + "reverse_fresh_center_copies": 36, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "seconds": 0.002536208, + "signed_lift_prefix": [ + { + "bits": 18, + "cancellation_free_signed_row_l1_upper": "144651", + "reverse": false + }, + { + "bits": 24, + "cancellation_free_signed_row_l1_upper": "9800790", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 198171, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": false, + "stage": 8 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "seconds": 0.007085, + "stderr": "stage 0 PASS elapsed 0.000306916s\nstage 1 PASS elapsed 0.000585166s\nstage 2 PASS elapsed 0.000856541s\nstage 3 PASS elapsed 0.00113125s\nstage 4 PASS elapsed 0.00140113s\nstage 5 PASS elapsed 0.00167642s\nstage 6 PASS elapsed 0.00194775s\nstage 7 PASS elapsed 0.00221721s\nstage 8 PASS elapsed 0.00248954s" + }, + "columns_k5": { + "exit": 0, + "log": "candidate-columns_k5.log", + "receipt": { + "bridge_additions": 2880, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1620, + "fresh_center_copies": 99, + "global_live_registers": 1620, + "independent_dirty_registers": 420, + "local_odd_scalar_additions": 22019, + "local_raw_H": [ + [ + 1, + 1320 + ], + [ + 2, + 1440 + ], + [ + 4, + 60 + ], + [ + 5, + 120 + ], + [ + 8, + 9 + ] + ], + "local_registers": 660, + "local_scalar_additions": 22019, + "local_scalar_stream": "/private/tmp/r420-forest-native/final-selected/candidate/cout/COHORT249-RECORDS.bin", + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + }, + { + "omit_bridge": 18, + "rejected": true + }, + { + "omit_bridge": 19, + "rejected": true + }, + { + "omit_bridge": 20, + "rejected": true + }, + { + "omit_bridge": 21, + "rejected": true + }, + { + "omit_bridge": 22, + "rejected": true + }, + { + "omit_bridge": 23, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 104, + "payload_prefix_upper": "18606576056688220135806852422400", + "reverse_fresh_center_copies": 45, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "seconds": 0.003143083, + "signed_lift_prefix": [ + { + "bits": 18, + "cancellation_free_signed_row_l1_upper": "144651", + "reverse": false + }, + { + "bits": 24, + "cancellation_free_signed_row_l1_upper": "9800790", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 242209, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": false, + "stage": 8 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": true, + "stage": 9 + }, + { + "fresh_copies": 9, + "scalar_additions": 22019, + "signed_inverse": false, + "stage": 10 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "seconds": 0.007952, + "stderr": "stage 0 PASS elapsed 0.000319125s\nstage 1 PASS elapsed 0.000595125s\nstage 2 PASS elapsed 0.00087s\nstage 3 PASS elapsed 0.00114308s\nstage 4 PASS elapsed 0.00141883s\nstage 5 PASS elapsed 0.00169608s\nstage 6 PASS elapsed 0.00197408s\nstage 7 PASS elapsed 0.00224842s\nstage 8 PASS elapsed 0.00252913s\nstage 9 PASS elapsed 0.0028015s\nstage 10 PASS elapsed 0.00307787s" + } + }, + "gram_passed": true, + "legality": { + "all_final_frames_pass": true, + "common_frame_ADDs": 22019, + "containment_pairs_checked": 2460, + "copies": 9, + "donor_intersections": 0, + "erasures": 9, + "max_inherited_integer_abs": 2, + "nested_MOVEs": 2940, + "new_frame_ids_collision": false, + "nondegeneracy_checked_by_separate_exact_bank_audit": true, + "old_max_frame_id": 671, + "paid_histogram": [ + [ + 1, + 1320 + ], + [ + 2, + 1440 + ], + [ + 4, + 60 + ], + [ + 5, + 120 + ], + [ + 8, + 9 + ] + ], + "rank_mass": 5112, + "records": 24977, + "scope": "Independent chronological geometry/copy/source-owner audit. F2 all-column replay is in the separately freshly compiled transform receipt; address transform theorem and bank completion remain separate.", + "selected_helpers": 0, + "selected_pairs": 0, + "source_owner_intersections": 0, + "status": "PASS_INDEPENDENT_COHORT_LEGALITY_SOURCE_OWNERS_AND_LIFECYCLE" + } + }, + "candidate_canonical_sha256": "5ab4c26b9a54795f8bc71ef48a244624f3826d5c46570afc8e582ec27c402b7c", + "candidate_corruption_control": { + "all_endpoint_rejected": true, + "columns": { + "columns_h": { + "endpoint_rejected": true, + "exit": 2, + "log": "mutant-columns_h.log", + "seconds": 0.005348, + "stderr": "local defining-decoder full formal column" + }, + "columns_k4": { + "endpoint_rejected": true, + "exit": 2, + "log": "mutant-columns_k4.log", + "seconds": 0.005744, + "stderr": "local defining-decoder full formal column" + }, + "columns_k5": { + "endpoint_rejected": true, + "exit": 2, + "log": "mutant-columns_k5.log", + "seconds": 0.005323, + "stderr": "local defining-decoder full formal column" + } + }, + "deleted_record": [ + 1, + 219, + 222, + 1, + 0, + 1 + ], + "deleted_record_index": 15024, + "legality_passed": true, + "mutation": "delete final target-to-target D unpreparation ADD" + }, + "checker_source_sha256": { + "code/bit/checkers/columns_h.cpp": "d1297f9052be4f2496e1ff2a77e4db2c0cdbd7d460d489b4c03e50bf317238ce", + "code/bit/checkers/columns_k.cpp": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "code/bit/checkers/gram_frames.py": "223a5a07731fc315a90a3e48177796babc155c1d9985c7ae5017eff6af2a0608", + "code/bit/checkers/legality_h.cpp": "6c1ef2b24e57781d6951c172a1024fc4300e6fd392c9d6672079a7806ab663b3", + "code/bit/export_records.py": "8a5999601f917dbb492bb9ae9a344611f18cc7cedc53dc3c76496a369e530eb3", + "code/bit/regression/stage_cohort.py": "6c288f6f234b528c1a7c0a4adfb724e91e0fe6b18c8dffad96af3f973de1829a" + }, + "configuration": "HDIM=8 NCOPY=9 VPORTS=120 RHELP=420; columns_h, KPAIRS=4,5", + "fixed_payload_cap": "payload < 2^104; unchanged upstream checker", + "scope": "Concrete native legality, finite F2 columns, bridge controls, Gram witnesses and positive-prefix bound only. All-size forest theorem, global routing and outer pricing are separate; no improved asymptotic constant is claimed.", + "status": "PASS_UNCHANGED_NATIVE_COHORT_CHECKERS" +} diff --git a/research/r420-forest-cut-budget/data/native-unconstrained.json b/research/r420-forest-cut-budget/data/native-unconstrained.json new file mode 100644 index 0000000000..6d530b49a2 --- /dev/null +++ b/research/r420-forest-cut-budget/data/native-unconstrained.json @@ -0,0 +1,676 @@ +{ + "baseline": { + "columns": { + "columns_h": { + "exit": 0, + "log": "baseline-columns_h.log", + "receipt": { + "bridge_additions": 720, + "copied_center_original_source_immutable": true, + "five_stage_additions": 134580, + "formal_columns_checked": 900, + "fresh_center_copies": 45, + "global_live_registers": 900, + "independent_dirty_registers": 420, + "local_odd_scalar_additions": 26916, + "local_raw_H": [ + [ + 1, + 1320 + ], + [ + 2, + 1440 + ], + [ + 4, + 60 + ], + [ + 5, + 120 + ], + [ + 8, + 9 + ] + ], + "local_registers": 660, + "local_scalar_additions": 26916, + "local_scalar_stream": "/private/tmp/r420-forest-native/unconstrained/baseline/cout/COHORT249-RECORDS.bin", + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 100, + "payload_prefix_upper": "998206739997057013039187410944", + "reverse_fresh_center_copies": 18, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "seconds": 0.001347209, + "signed_lift_prefix": [ + { + "bits": 18, + "cancellation_free_signed_row_l1_upper": "144651", + "reverse": false + }, + { + "bits": 22, + "cancellation_free_signed_row_l1_upper": "2270064", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 4 + } + ], + "status": "PASS_NEW_COHORT249_ALL_FIVE_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "seconds": 0.140926, + "stderr": "stage 0 PASS elapsed 0.000274459s\nstage 1 PASS elapsed 0.000530667s\nstage 2 PASS elapsed 0.000795292s\nstage 3 PASS elapsed 0.00105762s\nstage 4 PASS elapsed 0.00131971s" + }, + "columns_k4": { + "exit": 0, + "log": "baseline-columns_k4.log", + "receipt": { + "bridge_additions": 2160, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1380, + "fresh_center_copies": 81, + "global_live_registers": 1380, + "independent_dirty_registers": 420, + "local_odd_scalar_additions": 26916, + "local_raw_H": [ + [ + 1, + 1320 + ], + [ + 2, + 1440 + ], + [ + 4, + 60 + ], + [ + 5, + 120 + ], + [ + 8, + 9 + ] + ], + "local_registers": 660, + "local_scalar_additions": 26916, + "local_scalar_stream": "/private/tmp/r420-forest-native/unconstrained/baseline/cout/COHORT249-RECORDS.bin", + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 100, + "payload_prefix_upper": "998206739997057013039187410944", + "reverse_fresh_center_copies": 36, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "seconds": 0.003013, + "signed_lift_prefix": [ + { + "bits": 18, + "cancellation_free_signed_row_l1_upper": "144651", + "reverse": false + }, + { + "bits": 22, + "cancellation_free_signed_row_l1_upper": "2270064", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 242244, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 8 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "seconds": 0.14486, + "stderr": "stage 0 PASS elapsed 0.000359875s\nstage 1 PASS elapsed 0.000690708s\nstage 2 PASS elapsed 0.00100858s\nstage 3 PASS elapsed 0.00133958s\nstage 4 PASS elapsed 0.00166983s\nstage 5 PASS elapsed 0.00199625s\nstage 6 PASS elapsed 0.002327s\nstage 7 PASS elapsed 0.00264704s\nstage 8 PASS elapsed 0.00296658s" + }, + "columns_k5": { + "exit": 0, + "log": "baseline-columns_k5.log", + "receipt": { + "bridge_additions": 2880, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1620, + "fresh_center_copies": 99, + "global_live_registers": 1620, + "independent_dirty_registers": 420, + "local_odd_scalar_additions": 26916, + "local_raw_H": [ + [ + 1, + 1320 + ], + [ + 2, + 1440 + ], + [ + 4, + 60 + ], + [ + 5, + 120 + ], + [ + 8, + 9 + ] + ], + "local_registers": 660, + "local_scalar_additions": 26916, + "local_scalar_stream": "/private/tmp/r420-forest-native/unconstrained/baseline/cout/COHORT249-RECORDS.bin", + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + }, + { + "omit_bridge": 18, + "rejected": true + }, + { + "omit_bridge": 19, + "rejected": true + }, + { + "omit_bridge": 20, + "rejected": true + }, + { + "omit_bridge": 21, + "rejected": true + }, + { + "omit_bridge": 22, + "rejected": true + }, + { + "omit_bridge": 23, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 100, + "payload_prefix_upper": "998206739997057013039187410944", + "reverse_fresh_center_copies": 45, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "seconds": 0.003686541, + "signed_lift_prefix": [ + { + "bits": 18, + "cancellation_free_signed_row_l1_upper": "144651", + "reverse": false + }, + { + "bits": 22, + "cancellation_free_signed_row_l1_upper": "2270064", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 296076, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 8 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": true, + "stage": 9 + }, + { + "fresh_copies": 9, + "scalar_additions": 26916, + "signed_inverse": false, + "stage": 10 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "seconds": 0.148023, + "stderr": "stage 0 PASS elapsed 0.000370333s\nstage 1 PASS elapsed 0.000698958s\nstage 2 PASS elapsed 0.00102517s\nstage 3 PASS elapsed 0.00134808s\nstage 4 PASS elapsed 0.00166908s\nstage 5 PASS elapsed 0.00199271s\nstage 6 PASS elapsed 0.00232125s\nstage 7 PASS elapsed 0.00264192s\nstage 8 PASS elapsed 0.00296658s\nstage 9 PASS elapsed 0.00329629s\nstage 10 PASS elapsed 0.00362371s" + } + }, + "gram_passed": true, + "legality": { + "all_final_frames_pass": true, + "common_frame_ADDs": 26916, + "containment_pairs_checked": 2460, + "copies": 9, + "donor_intersections": 0, + "erasures": 9, + "max_inherited_integer_abs": 2, + "nested_MOVEs": 2940, + "new_frame_ids_collision": false, + "nondegeneracy_checked_by_separate_exact_bank_audit": true, + "old_max_frame_id": 671, + "paid_histogram": [ + [ + 1, + 1320 + ], + [ + 2, + 1440 + ], + [ + 4, + 60 + ], + [ + 5, + 120 + ], + [ + 8, + 9 + ] + ], + "rank_mass": 5112, + "records": 29874, + "scope": "Independent chronological geometry/copy/source-owner audit. F2 all-column replay is in the separately freshly compiled transform receipt; address transform theorem and bank completion remain separate.", + "selected_helpers": 0, + "selected_pairs": 0, + "source_owner_intersections": 0, + "status": "PASS_INDEPENDENT_COHORT_LEGALITY_SOURCE_OWNERS_AND_LIFECYCLE" + } + }, + "candidate": { + "columns": { + "columns_h": { + "exit": 2, + "log": "candidate-columns_h.log", + "seconds": 0.004394, + "stderr": "payloadfiniteprefix2^104" + }, + "columns_k4": { + "exit": 2, + "log": "candidate-columns_k4.log", + "seconds": 0.004426, + "stderr": "payloadfiniteprefix2^104" + }, + "columns_k5": { + "exit": 2, + "log": "candidate-columns_k5.log", + "seconds": 0.004283, + "stderr": "payloadfiniteprefix2^104" + } + }, + "gram_passed": true, + "legality": { + "all_final_frames_pass": true, + "common_frame_ADDs": 21915, + "containment_pairs_checked": 2460, + "copies": 9, + "donor_intersections": 0, + "erasures": 9, + "max_inherited_integer_abs": 2, + "nested_MOVEs": 2940, + "new_frame_ids_collision": false, + "nondegeneracy_checked_by_separate_exact_bank_audit": true, + "old_max_frame_id": 671, + "paid_histogram": [ + [ + 1, + 1320 + ], + [ + 2, + 1440 + ], + [ + 4, + 60 + ], + [ + 5, + 120 + ], + [ + 8, + 9 + ] + ], + "rank_mass": 5112, + "records": 24873, + "scope": "Independent chronological geometry/copy/source-owner audit. F2 all-column replay is in the separately freshly compiled transform receipt; address transform theorem and bank completion remain separate.", + "selected_helpers": 0, + "selected_pairs": 0, + "source_owner_intersections": 0, + "status": "PASS_INDEPENDENT_COHORT_LEGALITY_SOURCE_OWNERS_AND_LIFECYCLE" + } + }, + "candidate_canonical_sha256": "4b2a3bed0f8256dd0e075615e8c3aceff31e2efda0ae46e4083217406d870ed7", + "candidate_corruption_control": { + "not_run": "The fixed prefix check rejects before the endpoint audit can run." + }, + "checker_source_sha256": { + "code/bit/checkers/columns_h.cpp": "d1297f9052be4f2496e1ff2a77e4db2c0cdbd7d460d489b4c03e50bf317238ce", + "code/bit/checkers/columns_k.cpp": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "code/bit/checkers/gram_frames.py": "223a5a07731fc315a90a3e48177796babc155c1d9985c7ae5017eff6af2a0608", + "code/bit/checkers/legality_h.cpp": "6c1ef2b24e57781d6951c172a1024fc4300e6fd392c9d6672079a7806ab663b3", + "code/bit/export_records.py": "8a5999601f917dbb492bb9ae9a344611f18cc7cedc53dc3c76496a369e530eb3", + "code/bit/regression/stage_cohort.py": "6c288f6f234b528c1a7c0a4adfb724e91e0fe6b18c8dffad96af3f973de1829a" + }, + "configuration": "HDIM=8 NCOPY=9 VPORTS=120 RHELP=420; columns_h, KPAIRS=4,5", + "fixed_payload_cap": "payload < 2^104; unchanged upstream checker", + "scope": "Concrete native legality, finite F2 columns, bridge controls, Gram witnesses and positive-prefix bound only. All-size forest theorem, global routing and outer pricing are separate; no improved asymptotic constant is claimed.", + "status": "PASS_EXPECTED_UNCONSTRAINED_PREFIX_REJECTION" +} diff --git a/research/r420-forest-cut-budget/data/optimum-recipe.json b/research/r420-forest-cut-budget/data/optimum-recipe.json new file mode 100644 index 0000000000..efab88dfc5 --- /dev/null +++ b/research/r420-forest-cut-budget/data/optimum-recipe.json @@ -0,0 +1,2491 @@ +{ + "D_boundaries": { + "inject": [ + 116, + 236 + ], + "injection_order": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119 + ], + "prepare": [ + 0, + 116 + ], + "unprepare": [ + 236, + 352 + ] + }, + "algorithm": "Kruskal, ascending (weight, SHA256(ASCII seed:u:v), u, v)", + "candidate_canonical_sha256": "4b2a3bed0f8256dd0e075615e8c3aceff31e2efda0ae46e4083217406d870ed7", + "child_before_parent_order": [ + 101, + 2, + 22, + 23, + 87, + 96, + 4, + 16, + 17, + 20, + 82, + 116, + 118, + 119, + 6, + 18, + 21, + 112, + 113, + 114, + 0, + 3, + 19, + 103, + 5, + 40, + 71, + 76, + 88, + 98, + 99, + 8, + 11, + 61, + 65, + 94, + 102, + 109, + 1, + 13, + 14, + 29, + 39, + 42, + 54, + 78, + 100, + 107, + 7, + 24, + 44, + 45, + 47, + 53, + 58, + 69, + 74, + 89, + 93, + 95, + 97, + 117, + 27, + 28, + 36, + 41, + 50, + 59, + 60, + 62, + 67, + 72, + 73, + 81, + 86, + 91, + 111, + 115, + 9, + 25, + 26, + 30, + 49, + 56, + 75, + 79, + 80, + 92, + 105, + 15, + 31, + 51, + 55, + 63, + 70, + 77, + 85, + 90, + 104, + 108, + 10, + 34, + 35, + 38, + 46, + 57, + 64, + 68, + 83, + 106, + 110, + 12, + 32, + 43, + 48, + 66, + 33, + 37, + 52, + 84 + ], + "cuts": [], + "depth_model": "Listed-order binary XOR expansion; data dependency updates destination only; wire-disjoint updates both wires. Neither is a prefix-coefficient bound.", + "dummy_vertex": 120, + "forest_height_edges": 14, + "format": "r420-target-forest/1", + "levels_from_dummy": [ + 11, + 8, + 14, + 11, + 13, + 10, + 12, + 7, + 9, + 5, + 3, + 9, + 2, + 8, + 8, + 4, + 13, + 13, + 12, + 11, + 13, + 12, + 14, + 14, + 7, + 5, + 5, + 6, + 6, + 8, + 5, + 4, + 2, + 1, + 3, + 3, + 6, + 1, + 3, + 8, + 10, + 6, + 8, + 2, + 7, + 7, + 3, + 7, + 2, + 5, + 6, + 4, + 1, + 7, + 8, + 4, + 5, + 3, + 7, + 6, + 6, + 9, + 6, + 4, + 3, + 9, + 2, + 6, + 3, + 7, + 4, + 10, + 6, + 6, + 7, + 5, + 10, + 4, + 8, + 5, + 5, + 6, + 13, + 3, + 1, + 4, + 6, + 14, + 10, + 7, + 4, + 6, + 5, + 7, + 9, + 7, + 14, + 7, + 10, + 10, + 8, + 15, + 9, + 11, + 4, + 5, + 3, + 8, + 4, + 9, + 3, + 6, + 12, + 12, + 12, + 6, + 13, + 7, + 13, + 13 + ], + "metrics": { + "candidate": { + "D": { + "gate_records": 352, + "ordered_data_dependency_depth": 145, + "ordered_wire_disjoint_depth": 346, + "xor_count": 14921 + }, + "full": { + "gate_records": 6034, + "ordered_data_dependency_depth": 156, + "ordered_wire_disjoint_depth": 662, + "xor_count": 21915 + } + }, + "mst_weight": 14921, + "source": { + "D": { + "gate_records": 120, + "ordered_data_dependency_depth": 204, + "ordered_wire_disjoint_depth": 390, + "xor_count": 19922 + }, + "full": { + "gate_records": 5802, + "ordered_data_dependency_depth": 214, + "ordered_wire_disjoint_depth": 710, + "xor_count": 26916 + } + }, + "tree_weight": 14921, + "xor_saved": 5001 + }, + "mst_edges": [ + { + "u": 99, + "v": 102, + "weight": 91 + }, + { + "u": 17, + "v": 23, + "weight": 91 + }, + { + "u": 77, + "v": 79, + "weight": 92 + }, + { + "u": 104, + "v": 110, + "weight": 93 + }, + { + "u": 25, + "v": 28, + "weight": 93 + }, + { + "u": 8, + "v": 14, + "weight": 98 + }, + { + "u": 53, + "v": 54, + "weight": 100 + }, + { + "u": 114, + "v": 116, + "weight": 101 + }, + { + "u": 34, + "v": 85, + "weight": 101 + }, + { + "u": 65, + "v": 71, + "weight": 102 + }, + { + "u": 11, + "v": 13, + "weight": 102 + }, + { + "u": 61, + "v": 78, + "weight": 102 + }, + { + "u": 36, + "v": 80, + "weight": 102 + }, + { + "u": 56, + "v": 62, + "weight": 102 + }, + { + "u": 113, + "v": 119, + "weight": 103 + }, + { + "u": 47, + "v": 91, + "weight": 105 + }, + { + "u": 42, + "v": 93, + "weight": 106 + }, + { + "u": 73, + "v": 74, + "weight": 106 + }, + { + "u": 37, + "v": 48, + "weight": 109 + }, + { + "u": 51, + "v": 64, + "weight": 110 + }, + { + "u": 57, + "v": 63, + "weight": 115 + }, + { + "u": 64, + "v": 66, + "weight": 115 + }, + { + "u": 57, + "v": 77, + "weight": 116 + }, + { + "u": 49, + "v": 50, + "weight": 117 + }, + { + "u": 12, + "v": 83, + "weight": 117 + }, + { + "u": 61, + "v": 76, + "weight": 119 + }, + { + "u": 41, + "v": 79, + "weight": 119 + }, + { + "u": 41, + "v": 45, + "weight": 120 + }, + { + "u": 96, + "v": 101, + "weight": 121 + }, + { + "u": 18, + "v": 20, + "weight": 121 + }, + { + "u": 48, + "v": 68, + "weight": 121 + }, + { + "u": 59, + "v": 79, + "weight": 121 + }, + { + "u": 84, + "v": 120, + "weight": 121 + }, + { + "u": 72, + "v": 75, + "weight": 122 + }, + { + "u": 52, + "v": 120, + "weight": 122 + }, + { + "u": 12, + "v": 52, + "weight": 122 + }, + { + "u": 6, + "v": 82, + "weight": 122 + }, + { + "u": 67, + "v": 69, + "weight": 122 + }, + { + "u": 3, + "v": 5, + "weight": 123 + }, + { + "u": 33, + "v": 66, + "weight": 123 + }, + { + "u": 24, + "v": 29, + "weight": 124 + }, + { + "u": 73, + "v": 92, + "weight": 124 + }, + { + "u": 68, + "v": 70, + "weight": 124 + }, + { + "u": 43, + "v": 46, + "weight": 125 + }, + { + "u": 59, + "v": 93, + "weight": 125 + }, + { + "u": 26, + "v": 31, + "weight": 125 + }, + { + "u": 63, + "v": 75, + "weight": 125 + }, + { + "u": 100, + "v": 102, + "weight": 125 + }, + { + "u": 107, + "v": 109, + "weight": 125 + }, + { + "u": 37, + "v": 120, + "weight": 125 + }, + { + "u": 49, + "v": 85, + "weight": 126 + }, + { + "u": 19, + "v": 21, + "weight": 126 + }, + { + "u": 50, + "v": 58, + "weight": 126 + }, + { + "u": 32, + "v": 38, + "weight": 126 + }, + { + "u": 3, + "v": 6, + "weight": 126 + }, + { + "u": 48, + "v": 57, + "weight": 126 + }, + { + "u": 40, + "v": 61, + "weight": 127 + }, + { + "u": 97, + "v": 100, + "weight": 127 + }, + { + "u": 105, + "v": 111, + "weight": 127 + }, + { + "u": 33, + "v": 120, + "weight": 127 + }, + { + "u": 90, + "v": 92, + "weight": 127 + }, + { + "u": 80, + "v": 81, + "weight": 128 + }, + { + "u": 0, + "v": 5, + "weight": 128 + }, + { + "u": 75, + "v": 91, + "weight": 128 + }, + { + "u": 82, + "v": 87, + "weight": 128 + }, + { + "u": 16, + "v": 22, + "weight": 129 + }, + { + "u": 10, + "v": 12, + "weight": 129 + }, + { + "u": 35, + "v": 55, + "weight": 129 + }, + { + "u": 98, + "v": 103, + "weight": 129 + }, + { + "u": 30, + "v": 70, + "weight": 129 + }, + { + "u": 9, + "v": 15, + "weight": 129 + }, + { + "u": 32, + "v": 34, + "weight": 129 + }, + { + "u": 83, + "v": 90, + "weight": 129 + }, + { + "u": 49, + "v": 67, + "weight": 129 + }, + { + "u": 51, + "v": 80, + "weight": 130 + }, + { + "u": 19, + "v": 76, + "weight": 130 + }, + { + "u": 10, + "v": 15, + "weight": 130 + }, + { + "u": 39, + "v": 47, + "weight": 131 + }, + { + "u": 14, + "v": 24, + "weight": 131 + }, + { + "u": 33, + "v": 43, + "weight": 131 + }, + { + "u": 32, + "v": 37, + "weight": 131 + }, + { + "u": 3, + "v": 114, + "weight": 131 + }, + { + "u": 106, + "v": 108, + "weight": 132 + }, + { + "u": 48, + "v": 106, + "weight": 132 + }, + { + "u": 9, + "v": 86, + "weight": 132 + }, + { + "u": 112, + "v": 118, + "weight": 132 + }, + { + "u": 61, + "v": 98, + "weight": 133 + }, + { + "u": 1, + "v": 7, + "weight": 133 + }, + { + "u": 89, + "v": 91, + "weight": 133 + }, + { + "u": 58, + "v": 78, + "weight": 133 + }, + { + "u": 115, + "v": 117, + "weight": 133 + }, + { + "u": 27, + "v": 30, + "weight": 134 + }, + { + "u": 2, + "v": 4, + "weight": 134 + }, + { + "u": 24, + "v": 72, + "weight": 135 + }, + { + "u": 41, + "v": 44, + "weight": 135 + }, + { + "u": 88, + "v": 94, + "weight": 135 + }, + { + "u": 35, + "v": 66, + "weight": 135 + }, + { + "u": 0, + "v": 113, + "weight": 135 + }, + { + "u": 60, + "v": 75, + "weight": 135 + }, + { + "u": 10, + "v": 31, + "weight": 135 + }, + { + "u": 39, + "v": 65, + "weight": 136 + }, + { + "u": 56, + "v": 63, + "weight": 136 + }, + { + "u": 78, + "v": 94, + "weight": 136 + }, + { + "u": 7, + "v": 50, + "weight": 136 + }, + { + "u": 16, + "v": 18, + "weight": 136 + }, + { + "u": 59, + "v": 95, + "weight": 136 + }, + { + "u": 25, + "v": 51, + "weight": 136 + }, + { + "u": 50, + "v": 97, + "weight": 137 + }, + { + "u": 13, + "v": 45, + "weight": 137 + }, + { + "u": 17, + "v": 21, + "weight": 137 + }, + { + "u": 5, + "v": 102, + "weight": 137 + }, + { + "u": 93, + "v": 107, + "weight": 138 + }, + { + "u": 79, + "v": 115, + "weight": 138 + }, + { + "u": 4, + "v": 21, + "weight": 138 + }, + { + "u": 0, + "v": 18, + "weight": 139 + }, + { + "u": 16, + "v": 96, + "weight": 139 + }, + { + "u": 63, + "v": 105, + "weight": 139 + }, + { + "u": 53, + "v": 60, + "weight": 139 + }, + { + "u": 19, + "v": 112, + "weight": 140 + }, + { + "u": 12, + "v": 110, + "weight": 141 + } + ], + "mst_parents": [ + 5, + 7, + 4, + 5, + 21, + 102, + 3, + 50, + 14, + 15, + 12, + 13, + 52, + 45, + 24, + 10, + 18, + 21, + 0, + 76, + 18, + 19, + 16, + 17, + 72, + 51, + 31, + 30, + 25, + 24, + 70, + 10, + 37, + 120, + 32, + 66, + 80, + 120, + 32, + 47, + 61, + 79, + 93, + 33, + 41, + 41, + 43, + 91, + 37, + 85, + 49, + 64, + 120, + 60, + 53, + 35, + 63, + 48, + 50, + 79, + 75, + 78, + 56, + 57, + 66, + 39, + 33, + 49, + 48, + 67, + 68, + 65, + 75, + 92, + 73, + 63, + 61, + 57, + 58, + 77, + 51, + 80, + 6, + 12, + 120, + 34, + 9, + 82, + 94, + 91, + 83, + 75, + 90, + 59, + 78, + 59, + 16, + 50, + 61, + 102, + 97, + 96, + 100, + 98, + 110, + 63, + 48, + 93, + 106, + 107, + 12, + 105, + 19, + 0, + 3, + 79, + 114, + 115, + 112, + 113 + ], + "optimality_scope": "The uncut MST minimizes XOR count within the rooted target-forest construction; cut variants have no unrestricted optimality claim.", + "parents": [ + 5, + 7, + 4, + 5, + 21, + 102, + 3, + 50, + 14, + 15, + 12, + 13, + 52, + 45, + 24, + 10, + 18, + 21, + 0, + 76, + 18, + 19, + 16, + 17, + 72, + 51, + 31, + 30, + 25, + 24, + 70, + 10, + 37, + 120, + 32, + 66, + 80, + 120, + 32, + 47, + 61, + 79, + 93, + 33, + 41, + 41, + 43, + 91, + 37, + 85, + 49, + 64, + 120, + 60, + 53, + 35, + 63, + 48, + 50, + 79, + 75, + 78, + 56, + 57, + 66, + 39, + 33, + 49, + 48, + 67, + 68, + 65, + 75, + 92, + 73, + 63, + 61, + 57, + 58, + 77, + 51, + 80, + 6, + 12, + 120, + 34, + 9, + 82, + 94, + 91, + 83, + 75, + 90, + 59, + 78, + 59, + 16, + 50, + 61, + 102, + 97, + 96, + 100, + 98, + 110, + 63, + 48, + 93, + 106, + 107, + 12, + 105, + 19, + 0, + 3, + 79, + 114, + 115, + 112, + 113 + ], + "roots": [ + 33, + 37, + 52, + 84 + ], + "seed": 6, + "source": { + "base_commit": "66849e1475c930fd7732b1a0067ffee7e1e95f60", + "canonical_sha256": "e597e3885c0a8daa262afa5985ee2930443329126aece76d33159d81882bdcc2", + "file_sha256": "9721a3819efd68307f66f00d84a952eb28eb7c3ad2ce79653ce295c98a764784", + "path": "research/e8-bit-r420/data/bitE8mut-r420.json.gz" + }, + "tree_edges": [ + { + "u": 99, + "v": 102, + "weight": 91 + }, + { + "u": 17, + "v": 23, + "weight": 91 + }, + { + "u": 77, + "v": 79, + "weight": 92 + }, + { + "u": 104, + "v": 110, + "weight": 93 + }, + { + "u": 25, + "v": 28, + "weight": 93 + }, + { + "u": 8, + "v": 14, + "weight": 98 + }, + { + "u": 53, + "v": 54, + "weight": 100 + }, + { + "u": 114, + "v": 116, + "weight": 101 + }, + { + "u": 34, + "v": 85, + "weight": 101 + }, + { + "u": 65, + "v": 71, + "weight": 102 + }, + { + "u": 11, + "v": 13, + "weight": 102 + }, + { + "u": 61, + "v": 78, + "weight": 102 + }, + { + "u": 36, + "v": 80, + "weight": 102 + }, + { + "u": 56, + "v": 62, + "weight": 102 + }, + { + "u": 113, + "v": 119, + "weight": 103 + }, + { + "u": 47, + "v": 91, + "weight": 105 + }, + { + "u": 42, + "v": 93, + "weight": 106 + }, + { + "u": 73, + "v": 74, + "weight": 106 + }, + { + "u": 37, + "v": 48, + "weight": 109 + }, + { + "u": 51, + "v": 64, + "weight": 110 + }, + { + "u": 57, + "v": 63, + "weight": 115 + }, + { + "u": 64, + "v": 66, + "weight": 115 + }, + { + "u": 57, + "v": 77, + "weight": 116 + }, + { + "u": 49, + "v": 50, + "weight": 117 + }, + { + "u": 12, + "v": 83, + "weight": 117 + }, + { + "u": 61, + "v": 76, + "weight": 119 + }, + { + "u": 41, + "v": 79, + "weight": 119 + }, + { + "u": 41, + "v": 45, + "weight": 120 + }, + { + "u": 96, + "v": 101, + "weight": 121 + }, + { + "u": 18, + "v": 20, + "weight": 121 + }, + { + "u": 48, + "v": 68, + "weight": 121 + }, + { + "u": 59, + "v": 79, + "weight": 121 + }, + { + "u": 84, + "v": 120, + "weight": 121 + }, + { + "u": 72, + "v": 75, + "weight": 122 + }, + { + "u": 52, + "v": 120, + "weight": 122 + }, + { + "u": 12, + "v": 52, + "weight": 122 + }, + { + "u": 6, + "v": 82, + "weight": 122 + }, + { + "u": 67, + "v": 69, + "weight": 122 + }, + { + "u": 3, + "v": 5, + "weight": 123 + }, + { + "u": 33, + "v": 66, + "weight": 123 + }, + { + "u": 24, + "v": 29, + "weight": 124 + }, + { + "u": 73, + "v": 92, + "weight": 124 + }, + { + "u": 68, + "v": 70, + "weight": 124 + }, + { + "u": 43, + "v": 46, + "weight": 125 + }, + { + "u": 59, + "v": 93, + "weight": 125 + }, + { + "u": 26, + "v": 31, + "weight": 125 + }, + { + "u": 63, + "v": 75, + "weight": 125 + }, + { + "u": 100, + "v": 102, + "weight": 125 + }, + { + "u": 107, + "v": 109, + "weight": 125 + }, + { + "u": 37, + "v": 120, + "weight": 125 + }, + { + "u": 49, + "v": 85, + "weight": 126 + }, + { + "u": 19, + "v": 21, + "weight": 126 + }, + { + "u": 50, + "v": 58, + "weight": 126 + }, + { + "u": 32, + "v": 38, + "weight": 126 + }, + { + "u": 3, + "v": 6, + "weight": 126 + }, + { + "u": 48, + "v": 57, + "weight": 126 + }, + { + "u": 40, + "v": 61, + "weight": 127 + }, + { + "u": 97, + "v": 100, + "weight": 127 + }, + { + "u": 105, + "v": 111, + "weight": 127 + }, + { + "u": 33, + "v": 120, + "weight": 127 + }, + { + "u": 90, + "v": 92, + "weight": 127 + }, + { + "u": 80, + "v": 81, + "weight": 128 + }, + { + "u": 0, + "v": 5, + "weight": 128 + }, + { + "u": 75, + "v": 91, + "weight": 128 + }, + { + "u": 82, + "v": 87, + "weight": 128 + }, + { + "u": 16, + "v": 22, + "weight": 129 + }, + { + "u": 10, + "v": 12, + "weight": 129 + }, + { + "u": 35, + "v": 55, + "weight": 129 + }, + { + "u": 98, + "v": 103, + "weight": 129 + }, + { + "u": 30, + "v": 70, + "weight": 129 + }, + { + "u": 9, + "v": 15, + "weight": 129 + }, + { + "u": 32, + "v": 34, + "weight": 129 + }, + { + "u": 83, + "v": 90, + "weight": 129 + }, + { + "u": 49, + "v": 67, + "weight": 129 + }, + { + "u": 51, + "v": 80, + "weight": 130 + }, + { + "u": 19, + "v": 76, + "weight": 130 + }, + { + "u": 10, + "v": 15, + "weight": 130 + }, + { + "u": 39, + "v": 47, + "weight": 131 + }, + { + "u": 14, + "v": 24, + "weight": 131 + }, + { + "u": 33, + "v": 43, + "weight": 131 + }, + { + "u": 32, + "v": 37, + "weight": 131 + }, + { + "u": 3, + "v": 114, + "weight": 131 + }, + { + "u": 106, + "v": 108, + "weight": 132 + }, + { + "u": 48, + "v": 106, + "weight": 132 + }, + { + "u": 9, + "v": 86, + "weight": 132 + }, + { + "u": 112, + "v": 118, + "weight": 132 + }, + { + "u": 61, + "v": 98, + "weight": 133 + }, + { + "u": 1, + "v": 7, + "weight": 133 + }, + { + "u": 89, + "v": 91, + "weight": 133 + }, + { + "u": 58, + "v": 78, + "weight": 133 + }, + { + "u": 115, + "v": 117, + "weight": 133 + }, + { + "u": 27, + "v": 30, + "weight": 134 + }, + { + "u": 2, + "v": 4, + "weight": 134 + }, + { + "u": 24, + "v": 72, + "weight": 135 + }, + { + "u": 41, + "v": 44, + "weight": 135 + }, + { + "u": 88, + "v": 94, + "weight": 135 + }, + { + "u": 35, + "v": 66, + "weight": 135 + }, + { + "u": 0, + "v": 113, + "weight": 135 + }, + { + "u": 60, + "v": 75, + "weight": 135 + }, + { + "u": 10, + "v": 31, + "weight": 135 + }, + { + "u": 39, + "v": 65, + "weight": 136 + }, + { + "u": 56, + "v": 63, + "weight": 136 + }, + { + "u": 78, + "v": 94, + "weight": 136 + }, + { + "u": 7, + "v": 50, + "weight": 136 + }, + { + "u": 16, + "v": 18, + "weight": 136 + }, + { + "u": 59, + "v": 95, + "weight": 136 + }, + { + "u": 25, + "v": 51, + "weight": 136 + }, + { + "u": 50, + "v": 97, + "weight": 137 + }, + { + "u": 13, + "v": 45, + "weight": 137 + }, + { + "u": 17, + "v": 21, + "weight": 137 + }, + { + "u": 5, + "v": 102, + "weight": 137 + }, + { + "u": 93, + "v": 107, + "weight": 138 + }, + { + "u": 79, + "v": 115, + "weight": 138 + }, + { + "u": 4, + "v": 21, + "weight": 138 + }, + { + "u": 0, + "v": 18, + "weight": 139 + }, + { + "u": 16, + "v": 96, + "weight": 139 + }, + { + "u": 63, + "v": 105, + "weight": 139 + }, + { + "u": 53, + "v": 60, + "weight": 139 + }, + { + "u": 19, + "v": 112, + "weight": 140 + }, + { + "u": 12, + "v": 110, + "weight": 141 + } + ], + "vertices": [ + { + "kernel_weight": 157, + "target_register": 120, + "vertex": 0 + }, + { + "kernel_weight": 170, + "target_register": 121, + "vertex": 1 + }, + { + "kernel_weight": 179, + "target_register": 122, + "vertex": 2 + }, + { + "kernel_weight": 158, + "target_register": 123, + "vertex": 3 + }, + { + "kernel_weight": 175, + "target_register": 124, + "vertex": 4 + }, + { + "kernel_weight": 177, + "target_register": 125, + "vertex": 5 + }, + { + "kernel_weight": 170, + "target_register": 126, + "vertex": 6 + }, + { + "kernel_weight": 153, + "target_register": 127, + "vertex": 7 + }, + { + "kernel_weight": 182, + "target_register": 128, + "vertex": 8 + }, + { + "kernel_weight": 150, + "target_register": 129, + "vertex": 9 + }, + { + "kernel_weight": 145, + "target_register": 130, + "vertex": 10 + }, + { + "kernel_weight": 176, + "target_register": 131, + "vertex": 11 + }, + { + "kernel_weight": 138, + "target_register": 132, + "vertex": 12 + }, + { + "kernel_weight": 158, + "target_register": 133, + "vertex": 13 + }, + { + "kernel_weight": 168, + "target_register": 134, + "vertex": 14 + }, + { + "kernel_weight": 177, + "target_register": 135, + "vertex": 15 + }, + { + "kernel_weight": 168, + "target_register": 136, + "vertex": 16 + }, + { + "kernel_weight": 182, + "target_register": 137, + "vertex": 17 + }, + { + "kernel_weight": 176, + "target_register": 138, + "vertex": 18 + }, + { + "kernel_weight": 177, + "target_register": 139, + "vertex": 19 + }, + { + "kernel_weight": 181, + "target_register": 140, + "vertex": 20 + }, + { + "kernel_weight": 197, + "target_register": 141, + "vertex": 21 + }, + { + "kernel_weight": 181, + "target_register": 142, + "vertex": 22 + }, + { + "kernel_weight": 173, + "target_register": 143, + "vertex": 23 + }, + { + "kernel_weight": 179, + "target_register": 144, + "vertex": 24 + }, + { + "kernel_weight": 157, + "target_register": 145, + "vertex": 25 + }, + { + "kernel_weight": 181, + "target_register": 146, + "vertex": 26 + }, + { + "kernel_weight": 152, + "target_register": 147, + "vertex": 27 + }, + { + "kernel_weight": 178, + "target_register": 148, + "vertex": 28 + }, + { + "kernel_weight": 181, + "target_register": 149, + "vertex": 29 + }, + { + "kernel_weight": 154, + "target_register": 150, + "vertex": 30 + }, + { + "kernel_weight": 166, + "target_register": 151, + "vertex": 31 + }, + { + "kernel_weight": 138, + "target_register": 152, + "vertex": 32 + }, + { + "kernel_weight": 127, + "target_register": 153, + "vertex": 33 + }, + { + "kernel_weight": 139, + "target_register": 154, + "vertex": 34 + }, + { + "kernel_weight": 183, + "target_register": 155, + "vertex": 35 + }, + { + "kernel_weight": 153, + "target_register": 156, + "vertex": 36 + }, + { + "kernel_weight": 125, + "target_register": 157, + "vertex": 37 + }, + { + "kernel_weight": 170, + "target_register": 158, + "vertex": 38 + }, + { + "kernel_weight": 144, + "target_register": 159, + "vertex": 39 + }, + { + "kernel_weight": 183, + "target_register": 160, + "vertex": 40 + }, + { + "kernel_weight": 147, + "target_register": 161, + "vertex": 41 + }, + { + "kernel_weight": 142, + "target_register": 162, + "vertex": 42 + }, + { + "kernel_weight": 150, + "target_register": 163, + "vertex": 43 + }, + { + "kernel_weight": 150, + "target_register": 164, + "vertex": 44 + }, + { + "kernel_weight": 163, + "target_register": 165, + "vertex": 45 + }, + { + "kernel_weight": 167, + "target_register": 166, + "vertex": 46 + }, + { + "kernel_weight": 161, + "target_register": 167, + "vertex": 47 + }, + { + "kernel_weight": 144, + "target_register": 168, + "vertex": 48 + }, + { + "kernel_weight": 160, + "target_register": 169, + "vertex": 49 + }, + { + "kernel_weight": 165, + "target_register": 170, + "vertex": 50 + }, + { + "kernel_weight": 157, + "target_register": 171, + "vertex": 51 + }, + { + "kernel_weight": 122, + "target_register": 172, + "vertex": 52 + }, + { + "kernel_weight": 176, + "target_register": 173, + "vertex": 53 + }, + { + "kernel_weight": 176, + "target_register": 174, + "vertex": 54 + }, + { + "kernel_weight": 174, + "target_register": 175, + "vertex": 55 + }, + { + "kernel_weight": 167, + "target_register": 176, + "vertex": 56 + }, + { + "kernel_weight": 154, + "target_register": 177, + "vertex": 57 + }, + { + "kernel_weight": 187, + "target_register": 178, + "vertex": 58 + }, + { + "kernel_weight": 169, + "target_register": 179, + "vertex": 59 + }, + { + "kernel_weight": 165, + "target_register": 180, + "vertex": 60 + }, + { + "kernel_weight": 170, + "target_register": 181, + "vertex": 61 + }, + { + "kernel_weight": 155, + "target_register": 182, + "vertex": 62 + }, + { + "kernel_weight": 165, + "target_register": 183, + "vertex": 63 + }, + { + "kernel_weight": 163, + "target_register": 184, + "vertex": 64 + }, + { + "kernel_weight": 158, + "target_register": 185, + "vertex": 65 + }, + { + "kernel_weight": 148, + "target_register": 186, + "vertex": 66 + }, + { + "kernel_weight": 169, + "target_register": 187, + "vertex": 67 + }, + { + "kernel_weight": 139, + "target_register": 188, + "vertex": 68 + }, + { + "kernel_weight": 185, + "target_register": 189, + "vertex": 69 + }, + { + "kernel_weight": 149, + "target_register": 190, + "vertex": 70 + }, + { + "kernel_weight": 166, + "target_register": 191, + "vertex": 71 + }, + { + "kernel_weight": 154, + "target_register": 192, + "vertex": 72 + }, + { + "kernel_weight": 181, + "target_register": 193, + "vertex": 73 + }, + { + "kernel_weight": 171, + "target_register": 194, + "vertex": 74 + }, + { + "kernel_weight": 168, + "target_register": 195, + "vertex": 75 + }, + { + "kernel_weight": 185, + "target_register": 196, + "vertex": 76 + }, + { + "kernel_weight": 158, + "target_register": 197, + "vertex": 77 + }, + { + "kernel_weight": 146, + "target_register": 198, + "vertex": 78 + }, + { + "kernel_weight": 154, + "target_register": 199, + "vertex": 79 + }, + { + "kernel_weight": 181, + "target_register": 200, + "vertex": 80 + }, + { + "kernel_weight": 145, + "target_register": 201, + "vertex": 81 + }, + { + "kernel_weight": 172, + "target_register": 202, + "vertex": 82 + }, + { + "kernel_weight": 133, + "target_register": 203, + "vertex": 83 + }, + { + "kernel_weight": 121, + "target_register": 204, + "vertex": 84 + }, + { + "kernel_weight": 168, + "target_register": 205, + "vertex": 85 + }, + { + "kernel_weight": 164, + "target_register": 206, + "vertex": 86 + }, + { + "kernel_weight": 164, + "target_register": 207, + "vertex": 87 + }, + { + "kernel_weight": 185, + "target_register": 208, + "vertex": 88 + }, + { + "kernel_weight": 193, + "target_register": 209, + "vertex": 89 + }, + { + "kernel_weight": 174, + "target_register": 210, + "vertex": 90 + }, + { + "kernel_weight": 142, + "target_register": 211, + "vertex": 91 + }, + { + "kernel_weight": 169, + "target_register": 212, + "vertex": 92 + }, + { + "kernel_weight": 130, + "target_register": 213, + "vertex": 93 + }, + { + "kernel_weight": 204, + "target_register": 214, + "vertex": 94 + }, + { + "kernel_weight": 177, + "target_register": 215, + "vertex": 95 + }, + { + "kernel_weight": 177, + "target_register": 216, + "vertex": 96 + }, + { + "kernel_weight": 170, + "target_register": 217, + "vertex": 97 + }, + { + "kernel_weight": 183, + "target_register": 218, + "vertex": 98 + }, + { + "kernel_weight": 181, + "target_register": 219, + "vertex": 99 + }, + { + "kernel_weight": 171, + "target_register": 220, + "vertex": 100 + }, + { + "kernel_weight": 182, + "target_register": 221, + "vertex": 101 + }, + { + "kernel_weight": 186, + "target_register": 222, + "vertex": 102 + }, + { + "kernel_weight": 176, + "target_register": 223, + "vertex": 103 + }, + { + "kernel_weight": 172, + "target_register": 224, + "vertex": 104 + }, + { + "kernel_weight": 152, + "target_register": 225, + "vertex": 105 + }, + { + "kernel_weight": 166, + "target_register": 226, + "vertex": 106 + }, + { + "kernel_weight": 174, + "target_register": 227, + "vertex": 107 + }, + { + "kernel_weight": 150, + "target_register": 228, + "vertex": 108 + }, + { + "kernel_weight": 175, + "target_register": 229, + "vertex": 109 + }, + { + "kernel_weight": 163, + "target_register": 230, + "vertex": 110 + }, + { + "kernel_weight": 179, + "target_register": 231, + "vertex": 111 + }, + { + "kernel_weight": 189, + "target_register": 232, + "vertex": 112 + }, + { + "kernel_weight": 194, + "target_register": 233, + "vertex": 113 + }, + { + "kernel_weight": 195, + "target_register": 234, + "vertex": 114 + }, + { + "kernel_weight": 180, + "target_register": 235, + "vertex": 115 + }, + { + "kernel_weight": 176, + "target_register": 236, + "vertex": 116 + }, + { + "kernel_weight": 189, + "target_register": 237, + "vertex": 117 + }, + { + "kernel_weight": 165, + "target_register": 238, + "vertex": 118 + }, + { + "kernel_weight": 197, + "target_register": 239, + "vertex": 119 + }, + { + "kernel_weight": 0, + "target_register": null, + "vertex": 120 + } + ] +} diff --git a/research/r420-forest-cut-budget/data/optimum.json.gz b/research/r420-forest-cut-budget/data/optimum.json.gz new file mode 100644 index 0000000000..dafd8a9a4f Binary files /dev/null and b/research/r420-forest-cut-budget/data/optimum.json.gz differ diff --git a/research/r420-forest-cut-budget/data/recipe.json b/research/r420-forest-cut-budget/data/recipe.json new file mode 100644 index 0000000000..0fdc3a641f --- /dev/null +++ b/research/r420-forest-cut-budget/data/recipe.json @@ -0,0 +1,2502 @@ +{ + "D_boundaries": { + "inject": [ + 111, + 231 + ], + "injection_order": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119 + ], + "prepare": [ + 0, + 111 + ], + "unprepare": [ + 231, + 342 + ] + }, + "algorithm": "Kruskal, ascending (weight, SHA256(ASCII seed:u:v), u, v)", + "candidate_canonical_sha256": "5ab4c26b9a54795f8bc71ef48a244624f3826d5c46570afc8e582ec27c402b7c", + "child_before_parent_order": [ + 99, + 2, + 8, + 11, + 23, + 74, + 102, + 109, + 1, + 4, + 13, + 14, + 17, + 27, + 28, + 29, + 36, + 42, + 54, + 73, + 81, + 86, + 100, + 101, + 107, + 118, + 7, + 9, + 21, + 22, + 24, + 25, + 26, + 30, + 44, + 45, + 47, + 53, + 58, + 69, + 80, + 87, + 89, + 92, + 93, + 95, + 96, + 97, + 112, + 117, + 15, + 16, + 19, + 20, + 31, + 41, + 50, + 51, + 55, + 59, + 60, + 62, + 67, + 70, + 72, + 82, + 90, + 91, + 103, + 104, + 108, + 111, + 115, + 116, + 119, + 6, + 10, + 18, + 35, + 38, + 40, + 46, + 49, + 56, + 64, + 68, + 71, + 75, + 76, + 79, + 83, + 88, + 98, + 105, + 106, + 110, + 113, + 114, + 0, + 3, + 12, + 32, + 43, + 48, + 61, + 63, + 65, + 66, + 77, + 85, + 94, + 5, + 33, + 34, + 37, + 39, + 52, + 57, + 78, + 84 + ], + "cuts": [ + 5, + 34, + 39, + 57, + 78 + ], + "depth_model": "Listed-order binary XOR expansion; data dependency updates destination only; wire-disjoint updates both wires. Neither is a prefix-coefficient bound.", + "dummy_vertex": 120, + "forest_height_edges": 7, + "format": "r420-target-forest/1", + "levels_from_dummy": [ + 2, + 6, + 7, + 2, + 6, + 1, + 3, + 5, + 7, + 5, + 3, + 7, + 2, + 6, + 6, + 4, + 4, + 6, + 3, + 4, + 4, + 5, + 5, + 7, + 5, + 5, + 5, + 6, + 6, + 6, + 5, + 4, + 2, + 1, + 1, + 3, + 6, + 1, + 3, + 1, + 3, + 4, + 6, + 2, + 5, + 5, + 3, + 5, + 2, + 3, + 4, + 4, + 1, + 5, + 6, + 4, + 3, + 1, + 5, + 4, + 4, + 2, + 4, + 2, + 3, + 2, + 2, + 4, + 3, + 5, + 4, + 3, + 4, + 6, + 7, + 3, + 3, + 2, + 1, + 3, + 5, + 6, + 4, + 3, + 1, + 2, + 6, + 5, + 3, + 5, + 4, + 4, + 5, + 5, + 2, + 5, + 5, + 5, + 3, + 8, + 6, + 6, + 7, + 4, + 4, + 3, + 3, + 6, + 4, + 7, + 3, + 4, + 5, + 3, + 3, + 4, + 4, + 5, + 6, + 4 + ], + "metrics": { + "candidate": { + "D": { + "gate_records": 342, + "ordered_data_dependency_depth": 182, + "ordered_wire_disjoint_depth": 350, + "xor_count": 15025 + }, + "full": { + "gate_records": 6024, + "ordered_data_dependency_depth": 193, + "ordered_wire_disjoint_depth": 666, + "xor_count": 22019 + } + }, + "mst_weight": 14921, + "source": { + "D": { + "gate_records": 120, + "ordered_data_dependency_depth": 204, + "ordered_wire_disjoint_depth": 390, + "xor_count": 19922 + }, + "full": { + "gate_records": 5802, + "ordered_data_dependency_depth": 214, + "ordered_wire_disjoint_depth": 710, + "xor_count": 26916 + } + }, + "tree_weight": 15025, + "xor_saved": 4897 + }, + "mst_edges": [ + { + "u": 99, + "v": 102, + "weight": 91 + }, + { + "u": 17, + "v": 23, + "weight": 91 + }, + { + "u": 77, + "v": 79, + "weight": 92 + }, + { + "u": 104, + "v": 110, + "weight": 93 + }, + { + "u": 25, + "v": 28, + "weight": 93 + }, + { + "u": 8, + "v": 14, + "weight": 98 + }, + { + "u": 53, + "v": 54, + "weight": 100 + }, + { + "u": 114, + "v": 116, + "weight": 101 + }, + { + "u": 34, + "v": 85, + "weight": 101 + }, + { + "u": 65, + "v": 71, + "weight": 102 + }, + { + "u": 11, + "v": 13, + "weight": 102 + }, + { + "u": 61, + "v": 78, + "weight": 102 + }, + { + "u": 36, + "v": 80, + "weight": 102 + }, + { + "u": 56, + "v": 62, + "weight": 102 + }, + { + "u": 113, + "v": 119, + "weight": 103 + }, + { + "u": 47, + "v": 91, + "weight": 105 + }, + { + "u": 42, + "v": 93, + "weight": 106 + }, + { + "u": 73, + "v": 74, + "weight": 106 + }, + { + "u": 37, + "v": 48, + "weight": 109 + }, + { + "u": 51, + "v": 64, + "weight": 110 + }, + { + "u": 57, + "v": 63, + "weight": 115 + }, + { + "u": 64, + "v": 66, + "weight": 115 + }, + { + "u": 57, + "v": 77, + "weight": 116 + }, + { + "u": 49, + "v": 50, + "weight": 117 + }, + { + "u": 12, + "v": 83, + "weight": 117 + }, + { + "u": 61, + "v": 76, + "weight": 119 + }, + { + "u": 41, + "v": 79, + "weight": 119 + }, + { + "u": 41, + "v": 45, + "weight": 120 + }, + { + "u": 96, + "v": 101, + "weight": 121 + }, + { + "u": 18, + "v": 20, + "weight": 121 + }, + { + "u": 48, + "v": 68, + "weight": 121 + }, + { + "u": 59, + "v": 79, + "weight": 121 + }, + { + "u": 84, + "v": 120, + "weight": 121 + }, + { + "u": 72, + "v": 75, + "weight": 122 + }, + { + "u": 52, + "v": 120, + "weight": 122 + }, + { + "u": 12, + "v": 52, + "weight": 122 + }, + { + "u": 6, + "v": 82, + "weight": 122 + }, + { + "u": 67, + "v": 69, + "weight": 122 + }, + { + "u": 3, + "v": 5, + "weight": 123 + }, + { + "u": 33, + "v": 66, + "weight": 123 + }, + { + "u": 24, + "v": 29, + "weight": 124 + }, + { + "u": 73, + "v": 92, + "weight": 124 + }, + { + "u": 68, + "v": 70, + "weight": 124 + }, + { + "u": 43, + "v": 46, + "weight": 125 + }, + { + "u": 59, + "v": 93, + "weight": 125 + }, + { + "u": 26, + "v": 31, + "weight": 125 + }, + { + "u": 63, + "v": 75, + "weight": 125 + }, + { + "u": 100, + "v": 102, + "weight": 125 + }, + { + "u": 107, + "v": 109, + "weight": 125 + }, + { + "u": 37, + "v": 120, + "weight": 125 + }, + { + "u": 49, + "v": 85, + "weight": 126 + }, + { + "u": 19, + "v": 21, + "weight": 126 + }, + { + "u": 50, + "v": 58, + "weight": 126 + }, + { + "u": 32, + "v": 38, + "weight": 126 + }, + { + "u": 3, + "v": 6, + "weight": 126 + }, + { + "u": 48, + "v": 57, + "weight": 126 + }, + { + "u": 40, + "v": 61, + "weight": 127 + }, + { + "u": 97, + "v": 100, + "weight": 127 + }, + { + "u": 105, + "v": 111, + "weight": 127 + }, + { + "u": 33, + "v": 120, + "weight": 127 + }, + { + "u": 90, + "v": 92, + "weight": 127 + }, + { + "u": 80, + "v": 81, + "weight": 128 + }, + { + "u": 0, + "v": 5, + "weight": 128 + }, + { + "u": 75, + "v": 91, + "weight": 128 + }, + { + "u": 82, + "v": 87, + "weight": 128 + }, + { + "u": 16, + "v": 22, + "weight": 129 + }, + { + "u": 10, + "v": 12, + "weight": 129 + }, + { + "u": 35, + "v": 55, + "weight": 129 + }, + { + "u": 98, + "v": 103, + "weight": 129 + }, + { + "u": 30, + "v": 70, + "weight": 129 + }, + { + "u": 9, + "v": 15, + "weight": 129 + }, + { + "u": 32, + "v": 34, + "weight": 129 + }, + { + "u": 83, + "v": 90, + "weight": 129 + }, + { + "u": 49, + "v": 67, + "weight": 129 + }, + { + "u": 51, + "v": 80, + "weight": 130 + }, + { + "u": 19, + "v": 76, + "weight": 130 + }, + { + "u": 10, + "v": 15, + "weight": 130 + }, + { + "u": 39, + "v": 47, + "weight": 131 + }, + { + "u": 14, + "v": 24, + "weight": 131 + }, + { + "u": 33, + "v": 43, + "weight": 131 + }, + { + "u": 32, + "v": 37, + "weight": 131 + }, + { + "u": 3, + "v": 114, + "weight": 131 + }, + { + "u": 106, + "v": 108, + "weight": 132 + }, + { + "u": 48, + "v": 106, + "weight": 132 + }, + { + "u": 9, + "v": 86, + "weight": 132 + }, + { + "u": 112, + "v": 118, + "weight": 132 + }, + { + "u": 61, + "v": 98, + "weight": 133 + }, + { + "u": 1, + "v": 7, + "weight": 133 + }, + { + "u": 89, + "v": 91, + "weight": 133 + }, + { + "u": 58, + "v": 78, + "weight": 133 + }, + { + "u": 115, + "v": 117, + "weight": 133 + }, + { + "u": 27, + "v": 30, + "weight": 134 + }, + { + "u": 2, + "v": 4, + "weight": 134 + }, + { + "u": 24, + "v": 72, + "weight": 135 + }, + { + "u": 41, + "v": 44, + "weight": 135 + }, + { + "u": 88, + "v": 94, + "weight": 135 + }, + { + "u": 35, + "v": 66, + "weight": 135 + }, + { + "u": 0, + "v": 113, + "weight": 135 + }, + { + "u": 60, + "v": 75, + "weight": 135 + }, + { + "u": 10, + "v": 31, + "weight": 135 + }, + { + "u": 39, + "v": 65, + "weight": 136 + }, + { + "u": 56, + "v": 63, + "weight": 136 + }, + { + "u": 78, + "v": 94, + "weight": 136 + }, + { + "u": 7, + "v": 50, + "weight": 136 + }, + { + "u": 16, + "v": 18, + "weight": 136 + }, + { + "u": 59, + "v": 95, + "weight": 136 + }, + { + "u": 25, + "v": 51, + "weight": 136 + }, + { + "u": 50, + "v": 97, + "weight": 137 + }, + { + "u": 13, + "v": 45, + "weight": 137 + }, + { + "u": 17, + "v": 21, + "weight": 137 + }, + { + "u": 5, + "v": 102, + "weight": 137 + }, + { + "u": 93, + "v": 107, + "weight": 138 + }, + { + "u": 79, + "v": 115, + "weight": 138 + }, + { + "u": 4, + "v": 21, + "weight": 138 + }, + { + "u": 0, + "v": 18, + "weight": 139 + }, + { + "u": 16, + "v": 96, + "weight": 139 + }, + { + "u": 63, + "v": 105, + "weight": 139 + }, + { + "u": 53, + "v": 60, + "weight": 139 + }, + { + "u": 19, + "v": 112, + "weight": 140 + }, + { + "u": 12, + "v": 110, + "weight": 141 + } + ], + "mst_parents": [ + 5, + 7, + 4, + 5, + 21, + 102, + 3, + 50, + 14, + 15, + 12, + 13, + 52, + 45, + 24, + 10, + 18, + 21, + 0, + 76, + 18, + 19, + 16, + 17, + 72, + 51, + 31, + 30, + 25, + 24, + 70, + 10, + 37, + 120, + 32, + 66, + 80, + 120, + 32, + 47, + 61, + 79, + 93, + 33, + 41, + 41, + 43, + 91, + 37, + 85, + 49, + 64, + 120, + 60, + 53, + 35, + 63, + 48, + 50, + 79, + 75, + 78, + 56, + 57, + 66, + 39, + 33, + 49, + 48, + 67, + 68, + 65, + 75, + 92, + 73, + 63, + 61, + 57, + 58, + 77, + 51, + 80, + 6, + 12, + 120, + 34, + 9, + 82, + 94, + 91, + 83, + 75, + 90, + 59, + 78, + 59, + 16, + 50, + 61, + 102, + 97, + 96, + 100, + 98, + 110, + 63, + 48, + 93, + 106, + 107, + 12, + 105, + 19, + 0, + 3, + 79, + 114, + 115, + 112, + 113 + ], + "optimality_scope": "The uncut MST minimizes XOR count within the rooted target-forest construction; cut variants have no unrestricted optimality claim.", + "parents": [ + 5, + 7, + 4, + 5, + 21, + 120, + 3, + 50, + 14, + 15, + 12, + 13, + 52, + 45, + 24, + 10, + 18, + 21, + 0, + 76, + 18, + 19, + 16, + 17, + 72, + 51, + 31, + 30, + 25, + 24, + 70, + 10, + 37, + 120, + 120, + 66, + 80, + 120, + 32, + 120, + 61, + 79, + 93, + 33, + 41, + 41, + 43, + 91, + 37, + 85, + 49, + 64, + 120, + 60, + 53, + 35, + 63, + 120, + 50, + 79, + 75, + 78, + 56, + 57, + 66, + 39, + 33, + 49, + 48, + 67, + 68, + 65, + 75, + 92, + 73, + 63, + 61, + 57, + 120, + 77, + 51, + 80, + 6, + 12, + 120, + 34, + 9, + 82, + 94, + 91, + 83, + 75, + 90, + 59, + 78, + 59, + 16, + 50, + 61, + 102, + 97, + 96, + 100, + 98, + 110, + 63, + 48, + 93, + 106, + 107, + 12, + 105, + 19, + 0, + 3, + 79, + 114, + 115, + 112, + 113 + ], + "roots": [ + 5, + 33, + 34, + 37, + 39, + 52, + 57, + 78, + 84 + ], + "seed": 6, + "source": { + "base_commit": "66849e1475c930fd7732b1a0067ffee7e1e95f60", + "canonical_sha256": "e597e3885c0a8daa262afa5985ee2930443329126aece76d33159d81882bdcc2", + "file_sha256": "9721a3819efd68307f66f00d84a952eb28eb7c3ad2ce79653ce295c98a764784", + "path": "research/e8-bit-r420/data/bitE8mut-r420.json.gz" + }, + "tree_edges": [ + { + "u": 99, + "v": 102, + "weight": 91 + }, + { + "u": 17, + "v": 23, + "weight": 91 + }, + { + "u": 77, + "v": 79, + "weight": 92 + }, + { + "u": 104, + "v": 110, + "weight": 93 + }, + { + "u": 25, + "v": 28, + "weight": 93 + }, + { + "u": 8, + "v": 14, + "weight": 98 + }, + { + "u": 53, + "v": 54, + "weight": 100 + }, + { + "u": 114, + "v": 116, + "weight": 101 + }, + { + "u": 34, + "v": 85, + "weight": 101 + }, + { + "u": 65, + "v": 71, + "weight": 102 + }, + { + "u": 11, + "v": 13, + "weight": 102 + }, + { + "u": 61, + "v": 78, + "weight": 102 + }, + { + "u": 36, + "v": 80, + "weight": 102 + }, + { + "u": 56, + "v": 62, + "weight": 102 + }, + { + "u": 113, + "v": 119, + "weight": 103 + }, + { + "u": 47, + "v": 91, + "weight": 105 + }, + { + "u": 42, + "v": 93, + "weight": 106 + }, + { + "u": 73, + "v": 74, + "weight": 106 + }, + { + "u": 37, + "v": 48, + "weight": 109 + }, + { + "u": 51, + "v": 64, + "weight": 110 + }, + { + "u": 57, + "v": 63, + "weight": 115 + }, + { + "u": 64, + "v": 66, + "weight": 115 + }, + { + "u": 57, + "v": 77, + "weight": 116 + }, + { + "u": 49, + "v": 50, + "weight": 117 + }, + { + "u": 12, + "v": 83, + "weight": 117 + }, + { + "u": 61, + "v": 76, + "weight": 119 + }, + { + "u": 41, + "v": 79, + "weight": 119 + }, + { + "u": 41, + "v": 45, + "weight": 120 + }, + { + "u": 96, + "v": 101, + "weight": 121 + }, + { + "u": 18, + "v": 20, + "weight": 121 + }, + { + "u": 48, + "v": 68, + "weight": 121 + }, + { + "u": 59, + "v": 79, + "weight": 121 + }, + { + "u": 84, + "v": 120, + "weight": 121 + }, + { + "u": 72, + "v": 75, + "weight": 122 + }, + { + "u": 52, + "v": 120, + "weight": 122 + }, + { + "u": 12, + "v": 52, + "weight": 122 + }, + { + "u": 6, + "v": 82, + "weight": 122 + }, + { + "u": 67, + "v": 69, + "weight": 122 + }, + { + "u": 3, + "v": 5, + "weight": 123 + }, + { + "u": 33, + "v": 66, + "weight": 123 + }, + { + "u": 24, + "v": 29, + "weight": 124 + }, + { + "u": 73, + "v": 92, + "weight": 124 + }, + { + "u": 68, + "v": 70, + "weight": 124 + }, + { + "u": 43, + "v": 46, + "weight": 125 + }, + { + "u": 59, + "v": 93, + "weight": 125 + }, + { + "u": 26, + "v": 31, + "weight": 125 + }, + { + "u": 63, + "v": 75, + "weight": 125 + }, + { + "u": 100, + "v": 102, + "weight": 125 + }, + { + "u": 107, + "v": 109, + "weight": 125 + }, + { + "u": 37, + "v": 120, + "weight": 125 + }, + { + "u": 49, + "v": 85, + "weight": 126 + }, + { + "u": 19, + "v": 21, + "weight": 126 + }, + { + "u": 50, + "v": 58, + "weight": 126 + }, + { + "u": 32, + "v": 38, + "weight": 126 + }, + { + "u": 3, + "v": 6, + "weight": 126 + }, + { + "u": 40, + "v": 61, + "weight": 127 + }, + { + "u": 97, + "v": 100, + "weight": 127 + }, + { + "u": 105, + "v": 111, + "weight": 127 + }, + { + "u": 33, + "v": 120, + "weight": 127 + }, + { + "u": 90, + "v": 92, + "weight": 127 + }, + { + "u": 80, + "v": 81, + "weight": 128 + }, + { + "u": 0, + "v": 5, + "weight": 128 + }, + { + "u": 75, + "v": 91, + "weight": 128 + }, + { + "u": 82, + "v": 87, + "weight": 128 + }, + { + "u": 16, + "v": 22, + "weight": 129 + }, + { + "u": 10, + "v": 12, + "weight": 129 + }, + { + "u": 35, + "v": 55, + "weight": 129 + }, + { + "u": 98, + "v": 103, + "weight": 129 + }, + { + "u": 30, + "v": 70, + "weight": 129 + }, + { + "u": 9, + "v": 15, + "weight": 129 + }, + { + "u": 83, + "v": 90, + "weight": 129 + }, + { + "u": 49, + "v": 67, + "weight": 129 + }, + { + "u": 51, + "v": 80, + "weight": 130 + }, + { + "u": 19, + "v": 76, + "weight": 130 + }, + { + "u": 10, + "v": 15, + "weight": 130 + }, + { + "u": 14, + "v": 24, + "weight": 131 + }, + { + "u": 33, + "v": 43, + "weight": 131 + }, + { + "u": 32, + "v": 37, + "weight": 131 + }, + { + "u": 3, + "v": 114, + "weight": 131 + }, + { + "u": 106, + "v": 108, + "weight": 132 + }, + { + "u": 48, + "v": 106, + "weight": 132 + }, + { + "u": 9, + "v": 86, + "weight": 132 + }, + { + "u": 112, + "v": 118, + "weight": 132 + }, + { + "u": 61, + "v": 98, + "weight": 133 + }, + { + "u": 1, + "v": 7, + "weight": 133 + }, + { + "u": 89, + "v": 91, + "weight": 133 + }, + { + "u": 115, + "v": 117, + "weight": 133 + }, + { + "u": 27, + "v": 30, + "weight": 134 + }, + { + "u": 2, + "v": 4, + "weight": 134 + }, + { + "u": 24, + "v": 72, + "weight": 135 + }, + { + "u": 41, + "v": 44, + "weight": 135 + }, + { + "u": 88, + "v": 94, + "weight": 135 + }, + { + "u": 35, + "v": 66, + "weight": 135 + }, + { + "u": 0, + "v": 113, + "weight": 135 + }, + { + "u": 60, + "v": 75, + "weight": 135 + }, + { + "u": 10, + "v": 31, + "weight": 135 + }, + { + "u": 39, + "v": 65, + "weight": 136 + }, + { + "u": 56, + "v": 63, + "weight": 136 + }, + { + "u": 78, + "v": 94, + "weight": 136 + }, + { + "u": 7, + "v": 50, + "weight": 136 + }, + { + "u": 16, + "v": 18, + "weight": 136 + }, + { + "u": 59, + "v": 95, + "weight": 136 + }, + { + "u": 25, + "v": 51, + "weight": 136 + }, + { + "u": 50, + "v": 97, + "weight": 137 + }, + { + "u": 13, + "v": 45, + "weight": 137 + }, + { + "u": 17, + "v": 21, + "weight": 137 + }, + { + "u": 93, + "v": 107, + "weight": 138 + }, + { + "u": 79, + "v": 115, + "weight": 138 + }, + { + "u": 4, + "v": 21, + "weight": 138 + }, + { + "u": 0, + "v": 18, + "weight": 139 + }, + { + "u": 16, + "v": 96, + "weight": 139 + }, + { + "u": 63, + "v": 105, + "weight": 139 + }, + { + "u": 53, + "v": 60, + "weight": 139 + }, + { + "u": 19, + "v": 112, + "weight": 140 + }, + { + "u": 12, + "v": 110, + "weight": 141 + }, + { + "u": 5, + "v": 120, + "weight": 177 + }, + { + "u": 34, + "v": 120, + "weight": 139 + }, + { + "u": 39, + "v": 120, + "weight": 144 + }, + { + "u": 57, + "v": 120, + "weight": 154 + }, + { + "u": 78, + "v": 120, + "weight": 146 + } + ], + "vertices": [ + { + "kernel_weight": 157, + "target_register": 120, + "vertex": 0 + }, + { + "kernel_weight": 170, + "target_register": 121, + "vertex": 1 + }, + { + "kernel_weight": 179, + "target_register": 122, + "vertex": 2 + }, + { + "kernel_weight": 158, + "target_register": 123, + "vertex": 3 + }, + { + "kernel_weight": 175, + "target_register": 124, + "vertex": 4 + }, + { + "kernel_weight": 177, + "target_register": 125, + "vertex": 5 + }, + { + "kernel_weight": 170, + "target_register": 126, + "vertex": 6 + }, + { + "kernel_weight": 153, + "target_register": 127, + "vertex": 7 + }, + { + "kernel_weight": 182, + "target_register": 128, + "vertex": 8 + }, + { + "kernel_weight": 150, + "target_register": 129, + "vertex": 9 + }, + { + "kernel_weight": 145, + "target_register": 130, + "vertex": 10 + }, + { + "kernel_weight": 176, + "target_register": 131, + "vertex": 11 + }, + { + "kernel_weight": 138, + "target_register": 132, + "vertex": 12 + }, + { + "kernel_weight": 158, + "target_register": 133, + "vertex": 13 + }, + { + "kernel_weight": 168, + "target_register": 134, + "vertex": 14 + }, + { + "kernel_weight": 177, + "target_register": 135, + "vertex": 15 + }, + { + "kernel_weight": 168, + "target_register": 136, + "vertex": 16 + }, + { + "kernel_weight": 182, + "target_register": 137, + "vertex": 17 + }, + { + "kernel_weight": 176, + "target_register": 138, + "vertex": 18 + }, + { + "kernel_weight": 177, + "target_register": 139, + "vertex": 19 + }, + { + "kernel_weight": 181, + "target_register": 140, + "vertex": 20 + }, + { + "kernel_weight": 197, + "target_register": 141, + "vertex": 21 + }, + { + "kernel_weight": 181, + "target_register": 142, + "vertex": 22 + }, + { + "kernel_weight": 173, + "target_register": 143, + "vertex": 23 + }, + { + "kernel_weight": 179, + "target_register": 144, + "vertex": 24 + }, + { + "kernel_weight": 157, + "target_register": 145, + "vertex": 25 + }, + { + "kernel_weight": 181, + "target_register": 146, + "vertex": 26 + }, + { + "kernel_weight": 152, + "target_register": 147, + "vertex": 27 + }, + { + "kernel_weight": 178, + "target_register": 148, + "vertex": 28 + }, + { + "kernel_weight": 181, + "target_register": 149, + "vertex": 29 + }, + { + "kernel_weight": 154, + "target_register": 150, + "vertex": 30 + }, + { + "kernel_weight": 166, + "target_register": 151, + "vertex": 31 + }, + { + "kernel_weight": 138, + "target_register": 152, + "vertex": 32 + }, + { + "kernel_weight": 127, + "target_register": 153, + "vertex": 33 + }, + { + "kernel_weight": 139, + "target_register": 154, + "vertex": 34 + }, + { + "kernel_weight": 183, + "target_register": 155, + "vertex": 35 + }, + { + "kernel_weight": 153, + "target_register": 156, + "vertex": 36 + }, + { + "kernel_weight": 125, + "target_register": 157, + "vertex": 37 + }, + { + "kernel_weight": 170, + "target_register": 158, + "vertex": 38 + }, + { + "kernel_weight": 144, + "target_register": 159, + "vertex": 39 + }, + { + "kernel_weight": 183, + "target_register": 160, + "vertex": 40 + }, + { + "kernel_weight": 147, + "target_register": 161, + "vertex": 41 + }, + { + "kernel_weight": 142, + "target_register": 162, + "vertex": 42 + }, + { + "kernel_weight": 150, + "target_register": 163, + "vertex": 43 + }, + { + "kernel_weight": 150, + "target_register": 164, + "vertex": 44 + }, + { + "kernel_weight": 163, + "target_register": 165, + "vertex": 45 + }, + { + "kernel_weight": 167, + "target_register": 166, + "vertex": 46 + }, + { + "kernel_weight": 161, + "target_register": 167, + "vertex": 47 + }, + { + "kernel_weight": 144, + "target_register": 168, + "vertex": 48 + }, + { + "kernel_weight": 160, + "target_register": 169, + "vertex": 49 + }, + { + "kernel_weight": 165, + "target_register": 170, + "vertex": 50 + }, + { + "kernel_weight": 157, + "target_register": 171, + "vertex": 51 + }, + { + "kernel_weight": 122, + "target_register": 172, + "vertex": 52 + }, + { + "kernel_weight": 176, + "target_register": 173, + "vertex": 53 + }, + { + "kernel_weight": 176, + "target_register": 174, + "vertex": 54 + }, + { + "kernel_weight": 174, + "target_register": 175, + "vertex": 55 + }, + { + "kernel_weight": 167, + "target_register": 176, + "vertex": 56 + }, + { + "kernel_weight": 154, + "target_register": 177, + "vertex": 57 + }, + { + "kernel_weight": 187, + "target_register": 178, + "vertex": 58 + }, + { + "kernel_weight": 169, + "target_register": 179, + "vertex": 59 + }, + { + "kernel_weight": 165, + "target_register": 180, + "vertex": 60 + }, + { + "kernel_weight": 170, + "target_register": 181, + "vertex": 61 + }, + { + "kernel_weight": 155, + "target_register": 182, + "vertex": 62 + }, + { + "kernel_weight": 165, + "target_register": 183, + "vertex": 63 + }, + { + "kernel_weight": 163, + "target_register": 184, + "vertex": 64 + }, + { + "kernel_weight": 158, + "target_register": 185, + "vertex": 65 + }, + { + "kernel_weight": 148, + "target_register": 186, + "vertex": 66 + }, + { + "kernel_weight": 169, + "target_register": 187, + "vertex": 67 + }, + { + "kernel_weight": 139, + "target_register": 188, + "vertex": 68 + }, + { + "kernel_weight": 185, + "target_register": 189, + "vertex": 69 + }, + { + "kernel_weight": 149, + "target_register": 190, + "vertex": 70 + }, + { + "kernel_weight": 166, + "target_register": 191, + "vertex": 71 + }, + { + "kernel_weight": 154, + "target_register": 192, + "vertex": 72 + }, + { + "kernel_weight": 181, + "target_register": 193, + "vertex": 73 + }, + { + "kernel_weight": 171, + "target_register": 194, + "vertex": 74 + }, + { + "kernel_weight": 168, + "target_register": 195, + "vertex": 75 + }, + { + "kernel_weight": 185, + "target_register": 196, + "vertex": 76 + }, + { + "kernel_weight": 158, + "target_register": 197, + "vertex": 77 + }, + { + "kernel_weight": 146, + "target_register": 198, + "vertex": 78 + }, + { + "kernel_weight": 154, + "target_register": 199, + "vertex": 79 + }, + { + "kernel_weight": 181, + "target_register": 200, + "vertex": 80 + }, + { + "kernel_weight": 145, + "target_register": 201, + "vertex": 81 + }, + { + "kernel_weight": 172, + "target_register": 202, + "vertex": 82 + }, + { + "kernel_weight": 133, + "target_register": 203, + "vertex": 83 + }, + { + "kernel_weight": 121, + "target_register": 204, + "vertex": 84 + }, + { + "kernel_weight": 168, + "target_register": 205, + "vertex": 85 + }, + { + "kernel_weight": 164, + "target_register": 206, + "vertex": 86 + }, + { + "kernel_weight": 164, + "target_register": 207, + "vertex": 87 + }, + { + "kernel_weight": 185, + "target_register": 208, + "vertex": 88 + }, + { + "kernel_weight": 193, + "target_register": 209, + "vertex": 89 + }, + { + "kernel_weight": 174, + "target_register": 210, + "vertex": 90 + }, + { + "kernel_weight": 142, + "target_register": 211, + "vertex": 91 + }, + { + "kernel_weight": 169, + "target_register": 212, + "vertex": 92 + }, + { + "kernel_weight": 130, + "target_register": 213, + "vertex": 93 + }, + { + "kernel_weight": 204, + "target_register": 214, + "vertex": 94 + }, + { + "kernel_weight": 177, + "target_register": 215, + "vertex": 95 + }, + { + "kernel_weight": 177, + "target_register": 216, + "vertex": 96 + }, + { + "kernel_weight": 170, + "target_register": 217, + "vertex": 97 + }, + { + "kernel_weight": 183, + "target_register": 218, + "vertex": 98 + }, + { + "kernel_weight": 181, + "target_register": 219, + "vertex": 99 + }, + { + "kernel_weight": 171, + "target_register": 220, + "vertex": 100 + }, + { + "kernel_weight": 182, + "target_register": 221, + "vertex": 101 + }, + { + "kernel_weight": 186, + "target_register": 222, + "vertex": 102 + }, + { + "kernel_weight": 176, + "target_register": 223, + "vertex": 103 + }, + { + "kernel_weight": 172, + "target_register": 224, + "vertex": 104 + }, + { + "kernel_weight": 152, + "target_register": 225, + "vertex": 105 + }, + { + "kernel_weight": 166, + "target_register": 226, + "vertex": 106 + }, + { + "kernel_weight": 174, + "target_register": 227, + "vertex": 107 + }, + { + "kernel_weight": 150, + "target_register": 228, + "vertex": 108 + }, + { + "kernel_weight": 175, + "target_register": 229, + "vertex": 109 + }, + { + "kernel_weight": 163, + "target_register": 230, + "vertex": 110 + }, + { + "kernel_weight": 179, + "target_register": 231, + "vertex": 111 + }, + { + "kernel_weight": 189, + "target_register": 232, + "vertex": 112 + }, + { + "kernel_weight": 194, + "target_register": 233, + "vertex": 113 + }, + { + "kernel_weight": 195, + "target_register": 234, + "vertex": 114 + }, + { + "kernel_weight": 180, + "target_register": 235, + "vertex": 115 + }, + { + "kernel_weight": 176, + "target_register": 236, + "vertex": 116 + }, + { + "kernel_weight": 189, + "target_register": 237, + "vertex": 117 + }, + { + "kernel_weight": 165, + "target_register": 238, + "vertex": 118 + }, + { + "kernel_weight": 197, + "target_register": 239, + "vertex": 119 + }, + { + "kernel_weight": 0, + "target_register": null, + "vertex": 120 + } + ] +} diff --git a/research/r420-forest-cut-budget/data/word.json.gz b/research/r420-forest-cut-budget/data/word.json.gz new file mode 100644 index 0000000000..3cc7344bfb Binary files /dev/null and b/research/r420-forest-cut-budget/data/word.json.gz differ diff --git a/research/r420-forest-cut-budget/lean-toolchain b/research/r420-forest-cut-budget/lean-toolchain new file mode 100644 index 0000000000..980709bbba --- /dev/null +++ b/research/r420-forest-cut-budget/lean-toolchain @@ -0,0 +1 @@ +leanprover/lean4:v4.21.0 diff --git a/research/r420-forest-cut-budget/native.py b/research/r420-forest-cut-budget/native.py new file mode 100644 index 0000000000..d642b5bd5a --- /dev/null +++ b/research/r420-forest-cut-budget/native.py @@ -0,0 +1,239 @@ +#!/usr/bin/env python3 +"""Run the normal verifier, then the unchanged upstream native cohort checkers. + +Usage: python native.py --out /tmp/r420-forest-native --boost /path/to/boost +Requires a C++17 compiler and genuine Boost headers. Every subprocess has a +180-second limit and the whole run has a 20-minute deadline. Logs, records, +candidate artifacts, and executables are written only under --out. +""" + +from __future__ import annotations + +import argparse +from concurrent.futures import ThreadPoolExecutor +import gzip +import hashlib +import json +import os +from pathlib import Path +import shutil +import struct +import subprocess +import sys +import time + +sys.dont_write_bytecode = True +from construct import canonical_payload, SOURCE_PATH + + +HERE = Path(__file__).resolve().parent +PACKAGE = HERE.parent / "e8-bit-carrier-skeleton" +BIT = PACKAGE / "code/bit" +CHECKERS = BIT / "checkers" +PAID_HISTOGRAM = [[1, 1320], [2, 1440], [4, 60], [5, 120], [8, 9]] +LEG_PASS = "PASS_INDEPENDENT_COHORT_LEGALITY_SOURCE_OWNERS_AND_LIFECYCLE" +FIVE_PASS = "PASS_NEW_COHORT249_ALL_FIVE_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" +BRIDGE_PASS = "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + + +def require(condition: bool, message: str) -> None: + if not condition: + raise RuntimeError(message) + + +def write_json(path: Path, value: object) -> None: + path.write_text(json.dumps(value, sort_keys=True, indent=2) + "\n", encoding="utf-8") + + +def read_json(path: Path) -> dict: + return json.loads(path.read_text(encoding="utf-8")) + + +class Runner: + def __init__(self, out: Path): + self.out = out + self.deadline = time.monotonic() + 1200 + self.env = dict(os.environ, PYTHONDONTWRITEBYTECODE="1", PYTHONUTF8="1") + + def run(self, name: str, command: list, *, required: bool = True) -> dict: + remaining = self.deadline - time.monotonic() + require(remaining > 0, "native verification exceeded its 20-minute deadline") + began = time.monotonic() + try: + result = subprocess.run(list(map(str, command)), capture_output=True, text=True, + encoding="utf-8", errors="replace", env=self.env, + timeout=min(180, remaining), check=False) + except subprocess.TimeoutExpired as error: + (self.out / (name + ".log")).write_text(str(error) + "\n", encoding="utf-8") + raise RuntimeError(f"{name} timed out; see {self.out / (name + '.log')}") from error + log = self.out / (name + ".log") + log.write_text(result.stdout + result.stderr, encoding="utf-8") + receipt = {"exit": result.returncode, "seconds": round(time.monotonic() - began, 6), + "log": log.name, "stderr": result.stderr.strip()} + require(not required or result.returncode == 0, + f"{name} failed ({result.returncode}); see {log}: {result.stderr[-1000:]}") + print(f"{name}: exit {result.returncode}", flush=True) + return receipt + + +def compile_checkers(runner: Runner, cxx: str, boost: Path) -> dict[str, Path]: + require((boost / "boost/multiprecision/cpp_int.hpp").is_file(), "genuine Boost headers missing") + bindir = runner.out / "bin" + bindir.mkdir(exist_ok=True) + common = [cxx, "-O2", "-std=c++17", "-DHDIM=8", "-DNCOPY=9", + "-I" + str(PACKAGE / "portable-include"), "-I" + str(CHECKERS), "-I" + str(boost)] + jobs = [("legality", "legality_h.cpp", []), + ("columns_h", "columns_h.cpp", ["-DVPORTS=120", "-DRHELP=420"]), + ("columns_k4", "columns_k.cpp", ["-DVPORTS=120", "-DRHELP=420", "-DKPAIRS=4"]), + ("columns_k5", "columns_k.cpp", ["-DVPORTS=120", "-DRHELP=420", "-DKPAIRS=5"])] + with ThreadPoolExecutor(max_workers=4) as pool: + futures = [pool.submit(runner.run, "compile-" + name, + common + extra + [CHECKERS / source, "-o", bindir / name]) + for name, source, extra in jobs] + for future in futures: + future.result() + return {name: bindir / name for name, _, _ in jobs} + + +def check_word(runner: Runner, binaries: dict[str, Path], name: str, word: Path) -> dict: + root = runner.out / name + root.mkdir(exist_ok=True) + records, cin, cout = (root / sub for sub in ("records", "cin", "cout")) + python = [sys.executable, "-I", "-B"] + runner.run(name + "-export", python + [BIT / "export_records.py", word, records]) + runner.run(name + "-stage", python + [BIT / "regression/stage_cohort.py", records, records, cin, cout]) + runner.run(name + "-legality", [binaries["legality"], cin, cout, cout / "legality.json"]) + legality = read_json(cout / "legality.json") + require(legality["status"] == LEG_PASS and legality["copies"] == legality["erasures"] == 9, + name + ": unexpected legality receipt") + require(legality["rank_mass"] == 5112 and legality["paid_histogram"] == PAID_HISTOGRAM, + name + ": paid profile changed") + checked = {} + for binary, stages, columns, bridges in [("columns_h", 5, 900, 6), + ("columns_k4", 9, 1380, 18), + ("columns_k5", 11, 1620, 24)]: + receipt_path = cout / (binary + ".json") + receipt_path.unlink(missing_ok=True) + run = runner.run(name + "-" + binary, + [binaries[binary], cout / "COHORT249-RECORDS.bin", receipt_path], required=False) + if run["exit"] == 0: + receipt = read_json(receipt_path) + require(receipt["status"] == (FIVE_PASS if stages == 5 else BRIDGE_PASS), "column status") + require(receipt["formal_columns_checked"] == columns and len(receipt["stages"]) == stages, + "formal column or stage count") + require(receipt["bridge_additions"] == bridges * 120 and + len(receipt["negative_controls"]) == bridges and + all(control["rejected"] for control in receipt["negative_controls"]), "bridge controls") + require(receipt["local_raw_H"] == PAID_HISTOGRAM and + int(receipt["payload_prefix_upper"]) < 2 ** 104, "profile or fixed prefix cap") + run["receipt"] = receipt + checked[binary] = run + runner.run(name + "-gram", python + [CHECKERS / "gram_frames.py", records, + "--gram", "e8ham", "--h", "8", "--positive"]) + return {"legality": legality, "columns": checked, "gram_passed": True} + + +def corruption_control(runner: Runner, binaries: dict[str, Path]) -> dict: + """Delete one target-to-target D ADD; all frame and COPY events stay intact.""" + source = runner.out / "candidate/cout" + mutant = runner.out / "candidate-mutant" + mutant.mkdir(exist_ok=True) + for path in source.iterdir(): + if path.is_file() and path.suffix != ".json": + shutil.copyfile(path, mutant / path.name) + elif path.name in ("COHORT249-FRAMES.json", "COHORT249-INITIAL.json", "COHORT249-SELECTION.json"): + shutil.copyfile(path, mutant / path.name) + raw = (source / "COHORT249-RECORDS.bin").read_bytes() + require(len(raw) % 24 == 0, "record alignment") + rows = list(struct.iter_unpack("<6i", raw)) + sites = [i for i, row in enumerate(rows) if row[0] == 1 and row[5] == 1 + and 120 <= row[1] < 240 and 120 <= row[2] < 240] + require(bool(sites), "candidate has no target unpreparation ADD") + index = sites[-1] + (mutant / "COHORT249-RECORDS.bin").write_bytes(raw[:24 * index] + raw[24 * (index + 1):]) + runner.run("mutant-legality", [binaries["legality"], runner.out / "candidate/cin", mutant, + mutant / "legality.json"]) + require(read_json(mutant / "legality.json")["status"] == LEG_PASS, "mutant legality") + results = {} + for binary in ("columns_h", "columns_k4", "columns_k5"): + run = runner.run("mutant-" + binary, + [binaries[binary], mutant / "COHORT249-RECORDS.bin", mutant / (binary + ".json")], + required=False) + run["endpoint_rejected"] = (run["exit"] != 0 and + "local defining-decoder full formal column" in run["stderr"]) + results[binary] = run + return {"mutation": "delete final target-to-target D unpreparation ADD", + "deleted_record_index": index, "deleted_record": rows[index], + "legality_passed": True, "columns": results, + "all_endpoint_rejected": all(result["endpoint_rejected"] for result in results.values())} + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--out", type=Path, required=True) + parser.add_argument("--boost", type=Path, required=True) + parser.add_argument("--cxx", default=os.environ.get("CXX", "c++")) + parser.add_argument("--candidate", type=Path, + help="candidate path (default: package data/word.json.gz)") + parser.add_argument("--recipe", type=Path, help="recipe for --candidate; both options are required together") + parser.add_argument("--expect-prefix-rejection", action="store_true", + help="require the independently valid unconstrained candidate to fail the fixed 104-bit cap") + args = parser.parse_args() + out = args.out.resolve() + require(not out.is_relative_to(HERE.parents[1]), "--out must be outside the repository") + out.mkdir(parents=True, exist_ok=True) + (out / "NATIVE-RESULTS.json").unlink(missing_ok=True) + runner = Runner(out) + require((args.candidate is None) == (args.recipe is None), + "--candidate and --recipe must be provided together") + input_word = args.candidate or HERE / "data/word.json.gz" + input_recipe = args.recipe or HERE / "data/recipe.json" + opener = gzip.open if input_word.suffix == ".gz" else open + with opener(input_word, "rt", encoding="utf-8") as stream: + candidate = json.load(stream) + recipe = read_json(input_recipe) + candidate_path, recipe_path = out / "candidate.json.gz", out / "recipe.json" + candidate_path.write_bytes(gzip.compress(canonical_payload(candidate), mtime=0)) + write_json(recipe_path, recipe) + verifier_command = [sys.executable, "-B", HERE / "verify.py", "--source", SOURCE_PATH, + "--candidate", candidate_path, "--recipe", recipe_path, + "--json", out / "VERIFY.json"] + if args.expect_prefix_rejection: + verifier_command.append("--expect-prefix-rejection") + runner.run("normal-verifier", verifier_command) + binaries = compile_checkers(runner, args.cxx, args.boost.resolve()) + baseline = check_word(runner, binaries, "baseline", SOURCE_PATH) + candidate_result = check_word(runner, binaries, "candidate", candidate_path) + baseline_passed = all(run["exit"] == 0 for run in baseline["columns"].values()) + if args.expect_prefix_rejection: + prefix = read_json(out / "VERIFY.json")["positive_prefix"]["candidate"] + control = {"not_run": "The fixed prefix check rejects before the endpoint audit can run."} + passed = (baseline_passed and prefix["payload_bits"] == 106 and + not prefix["below_2_pow_104"] and + all(run["exit"] != 0 and run["stderr"] == "payloadfiniteprefix2^104" + for run in candidate_result["columns"].values())) + status = "PASS_EXPECTED_UNCONSTRAINED_PREFIX_REJECTION" if passed else "NATIVE_CHECK_REJECTED" + else: + control = corruption_control(runner, binaries) + passed = (baseline_passed and all(run["exit"] == 0 for run in candidate_result["columns"].values()) + and control["all_endpoint_rejected"]) + status = "PASS_UNCHANGED_NATIVE_COHORT_CHECKERS" if passed else "NATIVE_CHECK_REJECTED" + source_files = [BIT / "export_records.py", BIT / "regression/stage_cohort.py"] + [ + CHECKERS / name for name in ("legality_h.cpp", "columns_h.cpp", "columns_k.cpp", "gram_frames.py")] + receipt = {"status": status, + "candidate_canonical_sha256": hashlib.sha256(canonical_payload(candidate)).hexdigest(), + "checker_source_sha256": {str(path.relative_to(PACKAGE)): hashlib.sha256(path.read_bytes()).hexdigest() + for path in source_files}, + "configuration": "HDIM=8 NCOPY=9 VPORTS=120 RHELP=420; columns_h, KPAIRS=4,5", + "fixed_payload_cap": "payload < 2^104; unchanged upstream checker", + "baseline": baseline, "candidate": candidate_result, "candidate_corruption_control": control, + "scope": "Concrete native legality, finite F2 columns, bridge controls, Gram witnesses and " + "positive-prefix bound only. All-size forest theorem, global routing and outer pricing " + "are separate; no improved asymptotic constant is claimed."} + write_json(out / "NATIVE-RESULTS.json", receipt) + print(json.dumps({"status": receipt["status"], "receipt": str(out / "NATIVE-RESULTS.json")})) + return 0 if passed else 2 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/research/r420-forest-cut-budget/reproduce.py b/research/r420-forest-cut-budget/reproduce.py new file mode 100644 index 0000000000..6924f2191a --- /dev/null +++ b/research/r420-forest-cut-budget/reproduce.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python3 +"""Rebuild both certificates and run the independent checker and controls.""" +import argparse +import hashlib +import json +import os +from pathlib import Path +import subprocess +import sys + +sys.dont_write_bytecode = True +sys.path.insert(0, str(Path(__file__).resolve().parent)) +from budget import solve_budget +from construct import canonical_payload, construct, load_source +from verify import read_word + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def check_source_pins(root=ROOT): + pins = json.loads((HERE / "SOURCES.json").read_text()) + for relative, expected in pins["repository_inputs_sha256"].items(): + # The original selected record is now retained as an exact checkpoint. + resolved = ("certificates/checkpoints/k492626.json" + if relative == "certificates/selected-result.json" else relative) + path = root / resolved + require(path.is_file(), "missing pinned input: " + resolved) + require(hashlib.sha256(path.read_bytes()).hexdigest() == expected, + "pinned input changed: " + resolved) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--lean", type=Path, help="optional Lean 4.21.0 executable") + args = parser.parse_args() + check_source_pins() + source = load_source() + result = solve_budget(source, seed=6) + expected = json.loads((HERE / "data/budget.json").read_text()) + require(canonical_payload(result) == canonical_payload(expected), "budget reconstruction differs") + for name, cuts, recipe_name in (("word", result["cuts"], "recipe"), + ("optimum", (), "optimum-recipe")): + word, recipe = construct(source, seed=6, cuts=cuts) + frozen_word = read_word(HERE / "data" / (name + ".json.gz")) + frozen_recipe = json.loads((HERE / "data" / (recipe_name + ".json")).read_text()) + require(canonical_payload(word) == canonical_payload(frozen_word), name + " payload differs") + require(canonical_payload(recipe) == canonical_payload(frozen_recipe), name + " recipe differs") + env = dict(os.environ, PYTHONDONTWRITEBYTECODE="1") + commands = [ + [sys.executable, "-B", HERE / "verify.py"], + [sys.executable, "-B", HERE / "verify.py", "--candidate", HERE / "data/optimum.json.gz", + "--recipe", HERE / "data/optimum-recipe.json", "--expect-prefix-rejection"], + [sys.executable, "-B", HERE / "test_verify.py"], + [sys.executable, "-B", HERE / "test_reproduce.py"], + [sys.executable, "-B", HERE / "test_budget.py"], + [sys.executable, "-B", HERE / "test_semantic_bridge.py"], + ] + for command in commands: + completed = subprocess.run(list(map(str, command)), env=env, capture_output=True, + text=True, timeout=120, check=False) + require(completed.returncode == 0, completed.stdout + completed.stderr) + if command[2].name.startswith("test_"): + print(completed.stdout + completed.stderr, end="", flush=True) + if args.lean: + version = subprocess.run([str(args.lean), "--version"], capture_output=True, + text=True, timeout=30, check=True).stdout + require("version 4.21.0" in version, "expected pinned Lean 4.21.0") + completed = subprocess.run([str(args.lean.resolve()), str(HERE / "Forest.lean")], + capture_output=True, text=True, timeout=120, check=False) + require(completed.returncode == 0, completed.stdout + completed.stderr) + lines = completed.stdout.splitlines() + require(len(lines) == 7 and all("[propext, Quot.sound]" in line for line in lines), + "unexpected Lean theorem axiom report: " + completed.stdout) + print("PASS_LEAN_FOREST generic compensation; seven axiom reports checked") + print("PASS_R420_TARGET_FOREST D=19922->15025 ADDs=26916->22019 saved=4897 " + "columns=660 payload_bits=104 cut_states=724; uncut_optimum=14921 rejected_at_106_bits") + + +if __name__ == "__main__": + main() diff --git a/research/r420-forest-cut-budget/test_budget.py b/research/r420-forest-cut-budget/test_budget.py new file mode 100644 index 0000000000..8f29c7341b --- /dev/null +++ b/research/r420-forest-cut-budget/test_budget.py @@ -0,0 +1,226 @@ +"""Exhaustive literal-ADD audit of small subtrees in the frozen cut certificate. + +This checks every cut of the 620 recorded ancestor states with at most eight +descendant edges: 7,904 assignments. It does not prove the remaining states or +search other trees. No constructor, verifier, or budget recurrence is imported. +""" + +from copy import deepcopy +import gzip +import hashlib +from itertools import combinations +import json +from math import isqrt +from pathlib import Path +import time +import unittest + + +HERE = Path(__file__).resolve().parent +MAX_DESCENDANT_EDGES = 8 +EXPECTED_STATES = 620 +EXPECTED_ASSIGNMENTS = 7904 +AUDIT_SECONDS = 90 + + +def require(condition, message): + if not condition: + raise AssertionError(message) + + +def unsigned_pass(events, count, reverse=False): + """Execute binary ADDs and literal temporary COPY/ERASE lifetimes.""" + values, maximum, work_maximum, active = [1] * (count + 1), 1, 1, None + for operation, destination, source in reversed(events) if reverse else events: + if reverse: + operation = {"COPY": "ERASE", "ERASE": "COPY"}.get(operation, operation) + if operation == "ADD": + values[destination] += values[source] + maximum = max(maximum, values[destination]) + if not 120 <= destination < 240: + work_maximum = max(work_maximum, values[destination]) + elif operation == "COPY": + require(active is None, "overlapping reverse-boundary copy") + values[destination], active = values[source], source + else: + require(operation == "ERASE" and active == source, "unmatched copy closure") + values[destination], active = 0, None + require(active is None, "unclosed temporary") + return values[:count], maximum, work_maximum + + +def load_inputs(): + budget = json.loads((HERE / "data/budget.json").read_text()) + recipe = json.loads((HERE / "data/optimum-recipe.json").read_text()) + with gzip.open(HERE.parents[1] / "research/e8-bit-r420/data/bitE8mut-r420.json.gz", "rt") as stream: + word = json.load(stream) + canonical = json.dumps(word, sort_keys=True, separators=(",", ":"), + ensure_ascii=True, allow_nan=False).encode("ascii") + require(hashlib.sha256(canonical).hexdigest() == budget["source_canonical_sha256"] == + recipe["source"]["canonical_sha256"], "source canonical identity") + require((word["v"], word["R"]) == (120, 420), "expected pinned R420 dimensions") + kernels = [None] * 120 + for frame, destination, sources in word["D"]: + require(frame == 0 and 120 <= destination < 240 and + all(240 <= source < 660 for source in sources), "original D shape") + require(kernels[destination - 120] is None, "duplicate original D target") + kernels[destination - 120] = frozenset(sources) + require(all(kernel is not None for kernel in kernels), "missing original D target") + + def additions(gates): + return [("ADD", destination, source) + for _, destination, sources in gates for source in sources] + + tail = additions(word["A"]) + for index, helper in enumerate(word["ret"]): + tail.append(("COPY", 660, helper)) + tail.extend(("ADD", 120 + target, 660) + for target, row in enumerate(word["scatter"]) if index in row) + tail.append(("ERASE", 660, helper)) + tail += additions(word["B"]) + additions(word["C"]) + boundary, tail_maximum, _ = unsigned_pass(tail, 660, reverse=True) + _, _, fixed_forward = unsigned_pass(additions(word["D"]) + tail, 660) + require(fixed_forward == budget["forward_maximum_for_every_cut_subset"], "fixed forward bound") + cap = isqrt(((1 << 104) - 1) // (64 * fixed_forward ** 3)) + require(cap == budget["reverse_maximum_allowed"] and tail_maximum <= cap, + "unchanged reverse-tail allowance") + require(boundary[120:240] == budget["reverse_boundary_target_norms"] and + boundary[240:] == budget["reverse_boundary_helper_norms"], "reverse-boundary magnitudes") + return budget, recipe["mst_parents"], kernels, boundary, cap + + +def tree_shape(parents): + require(len(parents) == 120 and all(type(p) is int and 0 <= p <= 120 for p in parents), + "parent domain") + children, depths = [[] for _ in range(121)], [] + for vertex, parent in enumerate(parents): + children[parent].append(vertex) + node, depth = vertex, 0 + for _ in range(121): + if node == 120: + break + node, depth = parents[node], depth + 1 + require(node == 120, "parent cycle") + depths.append(depth) + subtrees = [] + for vertex in range(120): + nodes = [vertex] + for position in range(120): + if position == len(nodes): + break + nodes.extend(children[nodes[position]]) + require(len(nodes) <= 120 and len(set(nodes)) == len(nodes), "invalid subtree") + subtrees.append(frozenset(nodes)) + return depths, subtrees + + +def enumerate_state(record, parents, depths, subtree, kernels, boundary, cap): + """Use actual gates, charging only destinations inside the tested subtree.""" + vertex, root = record["vertex"], record["root"] + path, node = [], vertex + for _ in range(120): + path.append(node) + if node == root: + break + node = parents[node] + require(node != 120, "state root is not an ancestor") + require(node == root, "ancestor path limit") + order = sorted(subtree | set(path), key=lambda i: (-depths[i], i)) + descendants = sorted(subtree - {vertex}) + root_sources = {i: sorted(kernels[i]) for i in order} + edge_sources = {i: sorted(kernels[i] ^ kernels[parents[i]]) for i in order if i != root} + feasible_costs, endpoint = {}, None + assignments = 0 + for cut_count in range(len(descendants) + 1): + for cuts in combinations(descendants, cut_count): + assignments += 1 + cut_set = set(cuts) + prepare = [(i, parents[i]) for i in order if i != root and i not in cut_set] + values, cost = list(boundary), 0 + for child, parent in prepare: + values[120 + child] += values[120 + parent] + cost += child in subtree + for target in order: + sources = root_sources[target] if target == root or target in cut_set else edge_sources[target] + for helper in sources: + values[120 + target] += values[helper] + cost += target in subtree + for child, parent in reversed(prepare): + values[120 + child] += values[120 + parent] + cost += child in subtree + if endpoint is None: + endpoint = values[120 + vertex] + require(endpoint == values[120 + vertex], "descendant cut changed ancestor endpoint") + # Every literal ADD is nonnegative, so final values bound all prefixes. + if max(values[120 + target] for target in order) <= cap: + feasible_costs[cuts] = cost + return {"minimum": min(feasible_costs.values(), default=None), "costs": feasible_costs, + "endpoint": endpoint, "assignments": assignments} + + +def check_record(record, result): + state = (record["vertex"], record["root"]) + require(record["norm"] == result["endpoint"], f"state {state}: incorrect endpoint") + require(record["cost"] == result["minimum"], f"state {state}: incorrect minimum cost") + if result["minimum"] is None: + require(record["cuts"] is None, f"state {state}: infeasible cuts") + else: + # Childwise tie choices need not give the globally lexicographically first tuple. + cuts = tuple(record["cuts"]) + require(result["costs"].get(cuts) == result["minimum"], + f"state {state}: recorded cuts do not attain the minimum") + + +class BudgetAudit(unittest.TestCase): + @classmethod + def setUpClass(cls): + deadline = time.monotonic() + AUDIT_SECONDS + budget, parents, kernels, boundary, cap = load_inputs() + depths, subtrees = tree_shape(parents) + cls.rows = [] + for record in budget["states"]: + subtree = subtrees[record["vertex"]] + if len(subtree) - 1 <= MAX_DESCENDANT_EDGES: + require(time.monotonic() < deadline, "bounded budget audit exceeded 90 seconds") + result = enumerate_state(record, parents, depths, subtree, kernels, boundary, cap) + cls.rows.append((record, result)) + cls.assignments = sum(result["assignments"] for _, result in cls.rows) + + def test_exhaustive_literal_subtree_costs(self): + self.assertEqual(len(self.rows), EXPECTED_STATES) + self.assertEqual(self.assignments, EXPECTED_ASSIGNMENTS) + self.assertEqual(sum(result["minimum"] is None for _, result in self.rows), 44) + self.assertEqual(sum(bool(record["cuts"]) for record, _ in self.rows), 62) + for record, result in self.rows: + with self.subTest(vertex=record["vertex"], root=record["root"]): + check_record(record, result) + + def test_underpriced_feasible_state_is_rejected(self): + record, result = next(pair for pair in self.rows if pair[0]["cuts"]) + damaged = deepcopy(record) + damaged["cost"] -= 1 + with self.assertRaisesRegex(AssertionError, "incorrect minimum cost"): + check_record(damaged, result) + + def test_false_infeasibility_is_rejected(self): + record, result = next(pair for pair in self.rows if pair[0]["cuts"]) + damaged = deepcopy(record) + damaged["cost"], damaged["cuts"] = None, None + with self.assertRaisesRegex(AssertionError, "incorrect minimum cost"): + check_record(damaged, result) + + def test_nonattaining_cut_witness_is_rejected(self): + record, result = next(pair for pair in self.rows if pair[0]["cuts"] and + pair[1]["costs"].get(()) != pair[1]["minimum"]) + damaged = deepcopy(record) + damaged["cuts"] = [] + with self.assertRaisesRegex(AssertionError, "recorded cuts do not attain"): + check_record(damaged, result) + + +if __name__ == "__main__": + run = unittest.main(exit=False) + if run.result.wasSuccessful(): + print(f"PASS_R420_BUDGET_EXHAUSTIVE states={EXPECTED_STATES} " + f"cut_assignments={EXPECTED_ASSIGNMENTS} max_descendant_edges={MAX_DESCENDANT_EDGES}") + raise SystemExit(not run.result.wasSuccessful()) diff --git a/research/r420-forest-cut-budget/test_reproduce.py b/research/r420-forest-cut-budget/test_reproduce.py new file mode 100644 index 0000000000..077289b936 --- /dev/null +++ b/research/r420-forest-cut-budget/test_reproduce.py @@ -0,0 +1,65 @@ +"""Historical source identity survives selection updates without weakening pins.""" +import json +from pathlib import Path +import shutil +import tempfile +import unittest + +import reproduce + + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +SELECTED = "certificates/selected-result.json" +CHECKPOINT = "certificates/checkpoints/k492626.json" + + +class SourcePins(unittest.TestCase): + def setUp(self): + self.temporary = tempfile.TemporaryDirectory(prefix="r420-source-pins-") + self.addCleanup(self.temporary.cleanup) + self.root = Path(self.temporary.name) + self.pins = json.loads((HERE / "SOURCES.json").read_text())["repository_inputs_sha256"] + for relative in self.pins: + retained = CHECKPOINT if relative == SELECTED else relative + target = self.root / retained + target.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(ROOT / retained, target) + (self.root / SELECTED).write_text('{"source_prs": [1094]}\n') + + def test_historical_checkpoint_accepts_new_selection_without_writes(self): + before = {path: path.read_bytes() for path in self.root.rglob("*") if path.is_file()} + self.assertNotEqual(before[self.root / SELECTED], before[self.root / CHECKPOINT]) + reproduce.check_source_pins(self.root) + self.assertEqual({path: path.read_bytes() for path in before}, before) + + def test_missing_checkpoint_rejects_even_with_matching_live_selection(self): + checkpoint = self.root / CHECKPOINT + (self.root / SELECTED).write_bytes(checkpoint.read_bytes()) + checkpoint.unlink() + with self.assertRaisesRegex(ValueError, "missing pinned input: .*k492626"): + reproduce.check_source_pins(self.root) + + def test_corrupt_checkpoint_rejects_even_with_matching_live_selection(self): + checkpoint = self.root / CHECKPOINT + original = checkpoint.read_bytes() + (self.root / SELECTED).write_bytes(original) + checkpoint.write_bytes(original + b"\n") + with self.assertRaisesRegex(ValueError, "pinned input changed: .*k492626"): + reproduce.check_source_pins(self.root) + + def test_every_other_pin_still_rejects_changed_working_bytes(self): + for relative in self.pins: + if relative == SELECTED: + continue + with self.subTest(path=relative): + path = self.root / relative + original = path.read_bytes() + path.write_bytes(original + b"\n") + with self.assertRaisesRegex(ValueError, "pinned input changed:"): + reproduce.check_source_pins(self.root) + path.write_bytes(original) + + +if __name__ == "__main__": + unittest.main() diff --git a/research/r420-forest-cut-budget/test_semantic_bridge.py b/research/r420-forest-cut-budget/test_semantic_bridge.py new file mode 100644 index 0000000000..89e75a0f4b --- /dev/null +++ b/research/r420-forest-cut-budget/test_semantic_bridge.py @@ -0,0 +1,140 @@ +"""Source-bound application of the conditional semantic-D chronology bridge. + +Credits: woklerx, PR1194 at 2e39c98238f543d988f9efc1b076590a4b780dca +(research/r439-semantic-d-contract-seed10/PROOF.md), and Arham Tahir, +PR1311 at a2875c1834b9c9ef42a84eda4890d5462cc98fa5 +(research/r439-abc-semantic-bridge). Their argument substitutes equal zero-frame +prefixes before an identical continuation, retaining the realization premises. +This checks that application's concrete premises; it proves no new theorem or +full hosted admission. The package reproduce.py runs this suite with a timeout. +""" +from copy import deepcopy +import hashlib +import importlib.util +import json +from pathlib import Path +import unittest + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +SOURCE_PATH = "research/e8-bit-r420/data/bitE8mut-r420.json.gz" +CHECKER_PATH = "research/e8-bit-r420/code/xcheck.py" + + +def load_module(name, path): + spec = importlib.util.spec_from_file_location(name, path) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +v = load_module("forest_verify", HERE / "verify.py") + + +class SemanticBridge(unittest.TestCase): + @classmethod + def setUpClass(cls): + pins = json.loads((HERE / "SOURCES.json").read_text()) + for relative in (SOURCE_PATH, CHECKER_PATH): + actual = hashlib.sha256((ROOT / relative).read_bytes()).hexdigest() + v.need(actual == pins["repository_inputs_sha256"][relative], + "bridge pinned input changed: " + relative) + cls.source = v.pinned_source(ROOT / SOURCE_PATH) + cls.candidate = v.read_word(HERE / "data/word.json.gz") + cls.recipe = json.loads((HERE / "data/recipe.json").read_text()) + v.need(v.digest(cls.source) == pins["source_word_canonical_sha256"] == + cls.recipe["source"]["canonical_sha256"], "bridge source identity") + v.need(v.digest(cls.candidate) == cls.recipe["candidate_canonical_sha256"], + "bridge candidate identity") + cls.checker = load_module("pinned_r420_xcheck", ROOT / CHECKER_PATH) + cls.source_check = cls.checker.check(cls.source) + cls.candidate_check = cls.checker.check(cls.candidate) + cls.kernels = v.kernel(cls.source) + cls.geom = v.geometry(cls.source) + + def test_original_interface_and_exact_legacy_rejections(self): + _, _, source_flow, source_h, source_c, _ = self.source_check + _, _, candidate_flow, candidate_h, candidate_c, _ = self.candidate_check + self.assertEqual(source_flow["columns"], 660) + self.assertEqual(candidate_flow["columns"], 660) + self.assertEqual(len(source_h), 5) + self.assertEqual(len(source_c), 4) + self.assertTrue(all(source_h.values()), source_h) + self.assertTrue(all(source_c.values()), source_c) + self.assertEqual(candidate_h.keys(), source_h.keys()) + self.assertEqual(candidate_c.keys(), source_c.keys()) + self.assertEqual({name for name, ok in candidate_h.items() if not ok}, + {"H2_D_frame0_targets_from_helpers"}) + self.assertEqual({name for name, ok in candidate_c.items() if not ok}, + {"K_equals_D"}) + + def test_original_d_splice_is_the_original_checked_word(self): + virtual = deepcopy(self.candidate) + virtual["D"] = deepcopy(self.source["D"]) + self.assertEqual(v.digest(virtual), v.digest(self.source)) + self.assertEqual(virtual, self.source) + # Exact equality transfers the already executed original interface + # check; the proof-only D is never charged as the candidate's circuit. + self.assertTrue(all(self.source_check[3].values())) + self.assertTrue(all(self.source_check[4].values())) + + def test_equal_dirty_prefix_values_frames_and_complete_paths(self): + self.assertEqual(v.check_d(self.source, self.kernels), 19922) + self.assertEqual(v.check_d(self.candidate, self.kernels), 15025) + source_values, source_frames, _ = self.source_check[0].replay(sections=("D",)) + candidate_values, candidate_frames, _ = self.candidate_check[0].replay(sections=("D",)) + self.assertEqual(len(source_values), 660) + self.assertEqual(candidate_values, source_values) + self.assertEqual(candidate_frames, source_frames) + self.assertEqual(source_frames, self.source["start"]) + zero = self.source["frames"].index([]) + self.assertTrue(all(f == zero for f in candidate_frames[v.V:])) + source = v.whole_word(self.source, self.geom) + candidate = v.whole_word(self.candidate, self.geom) + self.assertEqual(source["columns"], candidate["columns"]) + self.assertEqual(source["columns"], 660) + self.assertEqual(source["path"], candidate["path"]) + self.assertEqual(source["paid_histogram"], candidate["paid_histogram"]) + self.assertEqual(source["rank_mass"], candidate["rank_mass"]) + self.assertEqual(candidate["rank_mass"], 5112) + + def test_missing_restoration_breaks_the_dirty_boundary(self): + bad = deepcopy(self.candidate) + del bad["D"][-1] + with self.assertRaisesRegex(v.Reject, "D endpoint mismatch"): + v.check_d(bad, self.kernels) + with self.assertRaisesRegex(v.Reject, "full endpoint mismatch"): + v.whole_word(bad, self.geom) + + def test_neutral_frame_change_is_not_a_valid_prefix_substitution(self): + bad = deepcopy(self.candidate) + full = self.candidate_check[0].FULL + gate = [full, v.V, [v.V + 1]] + bad["D"] = [deepcopy(gate), deepcopy(gate)] + bad["D"] + # Cancelling XORs preserve scalar columns but cannot undo frame climbs. + self.assertEqual(v.scalar_replay(bad, ("D",)), + v.scalar_replay(self.candidate, ("D",))) + with self.assertRaisesRegex(v.Reject, "frame zero"): + v.check_d(bad, self.kernels) + with self.assertRaisesRegex(v.Reject, "illegal frame climb"): + v.whole_word(bad, self.geom) + + def test_neutral_target_feedback_still_violates_retained_h1(self): + bad = deepcopy(self.candidate) + zero = bad["frames"].index([]) + gate = [zero, 2 * v.V, [v.V]] + bad["D"] = [deepcopy(gate), deepcopy(gate)] + bad["D"] + self.assertEqual(v.scalar_replay(bad, ("D",)), + v.scalar_replay(self.candidate, ("D",))) + # Endpoint and frames alone would accept this neutral helper write. + replay = v.whole_word(bad, self.geom) + self.assertEqual(replay["columns"], 660) + self.assertEqual(replay["rank_mass"], 5112) + with self.assertRaisesRegex(v.Reject, "write targets"): + v.check_d(bad, self.kernels) + hypotheses, _, _ = self.checker.Word(bad).interface() + self.assertFalse(hypotheses["H1_no_target_feeds_z"]) + + +if __name__ == "__main__": + unittest.main(verbosity=2) diff --git a/research/r420-forest-cut-budget/test_verify.py b/research/r420-forest-cut-budget/test_verify.py new file mode 100644 index 0000000000..db462a760b --- /dev/null +++ b/research/r420-forest-cut-budget/test_verify.py @@ -0,0 +1,251 @@ +"""Adversarial controls for semantic, geometric, pricing, and certificate layers.""" +from copy import deepcopy +import gzip +import importlib.util +import json +from pathlib import Path +import tempfile +import unittest + +HERE = Path(__file__).resolve().parent + + +def module(name): + spec = importlib.util.spec_from_file_location(name, HERE / (name + ".py")) + result = importlib.util.module_from_spec(spec) + spec.loader.exec_module(result) + return result + + +v = module("verify") + + +class Controls(unittest.TestCase): + @classmethod + def setUpClass(cls): + constructor = module("construct") + cls.source = v.pinned_source() + cls.candidate, cls.recipe = constructor.construct(cls.source) + cls.kernels = v.kernel(cls.source) + cls.geom = v.geometry(cls.source) + + def test_positive_full_certificate(self): + self.assertEqual(v.verify(self.source, self.candidate, self.recipe)["status"], "PASS") + + def test_selected_budget_optimum(self): + word, recipe = module("construct").construct(self.source, cuts=[5, 34, 39, 57, 78]) + receipt = v.verify(self.source, word, recipe) + self.assertEqual(receipt["D_additions"]["candidate"], 15025) + self.assertEqual(receipt["positive_prefix"]["candidate"]["reverse"], 9800790) + self.assertTrue(receipt["cut_budget"]["selected_attains_cut_class_optimum"]) + + def test_feasible_nonoptimal_cut_not_claimed_optimal(self): + cuts = [i for i, p in enumerate(self.recipe["mst_parents"]) if p != 120] + word, recipe = module("construct").construct(self.source, cuts=cuts) + receipt = v.verify(self.source, word, recipe) + self.assertTrue(receipt["cut_budget"]["selected_feasible"]) + self.assertFalse(receipt["cut_budget"]["selected_attains_cut_class_optimum"]) + + def test_missing_prepare(self): + word = deepcopy(self.candidate) + del word["D"][0] + with self.assertRaisesRegex(v.Reject, "D endpoint"): + v.check_d(word, self.kernels) + with self.assertRaisesRegex(v.Reject, "full endpoint"): + v.whole_word(word, self.geom) + + def test_missing_unprepare(self): + word = deepcopy(self.candidate) + del word["D"][-1] + with self.assertRaisesRegex(v.Reject, "D endpoint"): + v.check_d(word, self.kernels) + + def test_missing_helper_term(self): + word = deepcopy(self.candidate) + index = self.recipe["D_boundaries"]["inject"][0] + word["D"][index][2].pop() + with self.assertRaisesRegex(v.Reject, "D endpoint"): + v.check_d(word, self.kernels) + + def test_source_dependent_D(self): + word = deepcopy(self.candidate) + word["D"].append([0, 120, [0]]) + with self.assertRaisesRegex(v.Reject, "read targets/helpers"): + v.check_d(word, self.kernels) + + def test_invalid_parent(self): + recipe = deepcopy(self.recipe) + recipe["parents"][0] = 121 + with self.assertRaisesRegex(v.Reject, "invalid parent"): + v.check_tree(recipe, self.kernels) + + def test_parent_cycle(self): + recipe = deepcopy(self.recipe) + recipe["parents"][:3] = [1, 2, 0] + with self.assertRaises(v.Reject): + v.check_tree(recipe, self.kernels) + + def test_underpriced_edge(self): + recipe = deepcopy(self.recipe) + recipe["mst_edges"][0]["weight"] -= 1 + with self.assertRaisesRegex(v.Reject, "mispriced edge"): + v.check_tree(recipe, self.kernels) + + def test_underpriced_total(self): + recipe = deepcopy(self.recipe) + recipe["metrics"]["tree_weight"] -= 1 + with self.assertRaisesRegex(v.Reject, "mispriced selected tree cost"): + v.check_recipe(self.source, self.candidate, recipe, self.kernels) + + def test_malformed_source_pin(self): + recipe = deepcopy(self.recipe) + recipe["source"]["canonical_sha256"] = "0" * 64 + with self.assertRaisesRegex(v.Reject, "malformed source pin"): + v.check_recipe(self.source, self.candidate, recipe, self.kernels) + + def test_misleading_metadata(self): + for field, value in (("seed", 7), ("algorithm", "oracle"), ("optimality_scope", "globally optimal")): + with self.subTest(field=field): + recipe = deepcopy(self.recipe) + recipe[field] = value + with self.assertRaises(v.Reject): + v.check_recipe(self.source, self.candidate, recipe, self.kernels) + for field in ("path", "base_commit"): + with self.subTest(field=field): + recipe = deepcopy(self.recipe) + recipe["source"][field] = "not-the-source" + with self.assertRaisesRegex(v.Reject, "source provenance"): + v.check_recipe(self.source, self.candidate, recipe, self.kernels) + + def test_different_tied_MST_cannot_claim_seed6(self): + word, recipe = module("construct").construct(self.source, seed=0) + recipe["seed"] = 6 + with self.assertRaisesRegex(v.Reject, "tie certificate"): + v.check_recipe(self.source, word, recipe, self.kernels) + + def test_nonminimal_honestly_priced_spanning_tree(self): + recipe = {"parents": [120] * 120, + "mst_edges": [{"u": i, "v": 120, "weight": self.kernels[i].bit_count()} for i in range(120)]} + self.assertEqual(v.check_tree(recipe, self.kernels, minimal=False)["total_weight"], 19922) + with self.assertRaisesRegex(v.Reject, "cycle property"): + v.check_tree(recipe, self.kernels) + + def test_neutral_paid_pair_semantically_valid_but_costs_two(self): + word = deepcopy(self.candidate) + word["D"].extend([[0, 120, [121]], [0, 120, [121]]]) + self.assertEqual(v.check_d(word, self.kernels), 14923) + original = v.whole_word(self.candidate, self.geom) + neutral = v.whole_word(word, self.geom) + self.assertEqual(neutral["path"], original["path"]) + self.assertEqual(neutral["additions"], original["additions"] + 2) + recipe = deepcopy(self.recipe) + recipe["candidate_canonical_sha256"] = v.digest(word) + with self.assertRaisesRegex(v.Reject, "claimed recipe"): + v.check_recipe(self.source, word, recipe, self.kernels) + + def test_changed_nonD_even_if_semantically_neutral(self): + word = deepcopy(self.candidate) + full = self.geom[0].index(8) + word["C"].extend([[full, 0, [1]], [full, 0, [1]]]) + v.whole_word(word, self.geom) + with self.assertRaisesRegex(v.Reject, "outside D"): + v.verify(self.source, word, self.recipe) + + def test_numerically_equal_nonD_type_changes_rejected(self): + for field in ("v", "start"): + with self.subTest(field=field): + word, recipe = deepcopy(self.candidate), deepcopy(self.recipe) + if field == "v": + word["v"] = 120.0 + else: + word["start"][120] = False + recipe["candidate_canonical_sha256"] = v.digest(word) + with self.assertRaisesRegex(v.Reject, "outside D"): + v.verify(self.source, word, recipe) + + def test_wrong_D_frame(self): + word = deepcopy(self.candidate) + word["D"][0][0] = self.source["start"][0] + with self.assertRaisesRegex(v.Reject, "frame zero"): + v.check_d(word, self.kernels) + with self.assertRaisesRegex(v.Reject, "illegal frame climb"): + v.whole_word(word, self.geom) + + def test_recompression_preserves_source_identity(self): + with tempfile.TemporaryDirectory() as directory: + path = Path(directory) / "source.json.gz" + with gzip.open(path, "wt", compresslevel=1) as stream: + json.dump(self.source, stream, indent=1) + self.assertEqual(v.pinned_source(path), self.source) + damaged = deepcopy(self.source) + damaged["D"][0][2].pop() + with gzip.open(path, "wt") as stream: + json.dump(damaged, stream) + with self.assertRaisesRegex(v.Reject, "canonical SHA256"): + v.pinned_source(path) + + def test_prefix_cap_exposes_unconstrained_optimum_failure(self): + baseline = v.positive_prefix(v.whole_word(self.source, self.geom)["events"]) + optimum = v.positive_prefix(v.whole_word(self.candidate, self.geom)["events"]) + self.assertEqual((baseline["forward"], baseline["reverse"], baseline["payload_bits"]), (144651, 2270064, 100)) + self.assertEqual((optimum["forward"], optimum["reverse"], optimum["payload_bits"]), (144651, 20395400, 106)) + self.assertFalse(optimum["below_2_pow_104"]) + + def test_forest_optimality_does_not_mean_global_linear_optimality(self): + a, b, c = 0b111, 0b111000, 0b111000000 + rows = [a ^ b, b ^ c, a ^ c] + self.assertEqual([x.bit_count() for x in rows], [6, 6, 6]) + self.assertEqual([(rows[i] ^ rows[j]).bit_count() + 2 for i in range(3) for j in range(i)], [8, 8, 8]) + self.assertEqual(rows[2] ^ rows[0] ^ rows[1], 0) + self.assertLess(2 + 6 + 6 + 2, 6 + 6 + 6) + targets = [1 << (9 + i) for i in range(3)] + targets[2] ^= targets[0] + targets[2] ^= targets[1] + targets[0] ^= rows[0] + targets[1] ^= rows[1] + targets[2] ^= targets[1] + targets[2] ^= targets[0] + self.assertEqual(targets, [(1 << (9 + i)) ^ rows[i] for i in range(3)]) + + def test_feasible_R420_rewire_beats_selected_cut_outside_certified_class(self): + word, recipe = module("construct").construct(self.source, cuts=[5, 34, 39, 57, 78]) + parent = list(recipe["parents"]) + self.assertEqual(parent[32], 37) + parent[32] = 34 + levels = [] + for target in range(120): + node, level = target, 0 + for _ in range(121): + if node == 120: + break + node, level = parent[node], level + 1 + self.assertEqual(node, 120, "rewired parent chain must reach dummy") + levels.append(level) + order = sorted(range(120), key=lambda i: (-levels[i], i)) + prepare = [[0, 120 + i, [120 + parent[i]]] for i in order if parent[i] != 120] + inject = [] + for i, p in enumerate(parent): + residual = self.kernels[i] ^ (self.kernels[p] if p != 120 else 0) + helpers = [r for r in range(240, 660) if residual >> r & 1] + if helpers: + inject.append([0, 120 + i, helpers]) + word["D"] = prepare + inject + list(reversed(prepare)) + self.assertEqual(v.check_d(word, self.kernels), 15023) + replay = v.whole_word(word, self.geom) + self.assertEqual((replay["columns"], replay["additions"]), (660, 22017)) + self.assertEqual(replay["path"], v.whole_word(self.source, self.geom)["path"]) + prefix = v.positive_prefix(replay["events"]) + self.assertEqual((prefix["forward"], prefix["reverse"], prefix["payload_bits"]), (144651, 9800790, 104)) + self.assertTrue(prefix["below_2_pow_104"]) + recipe["candidate_canonical_sha256"] = v.digest(word) + recipe["parents"] = parent + recipe["tree_edges"] = [{"u": min(i, p), "v": max(i, p), + "weight": self.kernels[i].bit_count() if p == 120 else + (self.kernels[i] ^ self.kernels[p]).bit_count() + 2} + for i, p in enumerate(parent)] + with self.assertRaisesRegex(v.Reject, "not declared cut"): + v.check_recipe(self.source, word, recipe, self.kernels) + + +if __name__ == "__main__": + unittest.main() diff --git a/research/r420-forest-cut-budget/verify.py b/research/r420-forest-cut-budget/verify.py new file mode 100644 index 0000000000..62289b0291 --- /dev/null +++ b/research/r420-forest-cut-budget/verify.py @@ -0,0 +1,486 @@ +#!/usr/bin/env python3 +"""Independent exact checker: data only; never imports the constructor. + +Symbolic bitsets check all 660 independent input columns, including dirty helpers. +Tree optimality is certified by the cycle property, not by rerunning an MST solver. +""" +import argparse +from collections import Counter +import gzip +import hashlib +import json +from functools import lru_cache +from math import gcd, isqrt +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +SOURCE = ROOT / "research/e8-bit-r420/data/bitE8mut-r420.json.gz" +SOURCE_FILE_SHA256 = "9721a3819efd68307f66f00d84a952eb28eb7c3ad2ce79653ce295c98a764784" +SOURCE_CONTENT_SHA256 = "e597e3885c0a8daa262afa5985ee2930443329126aece76d33159d81882bdcc2" +V, R, N = 120, 420, 660 + + +class Reject(ValueError): + """A concrete certificate, circuit, or provenance check failed.""" + + +def need(condition, message): + if not condition: + raise Reject(message) + + +def digest(word): + return hashlib.sha256(json.dumps(word, sort_keys=True, separators=(",", ":")).encode()).hexdigest() + + +def read_word(path): + with gzip.open(path, "rt") if str(path).endswith(".gz") else open(path) as stream: + return json.load(stream) + + +def pinned_source(path=SOURCE): + word = read_word(path) + need(digest(word) == SOURCE_CONTENT_SHA256, "source canonical SHA256 mismatch") + return word + + +def reduce_row(row, basis): + row = list(row) + for pivot, vector in basis: + if row[pivot]: + a, b = row[pivot], vector[pivot] + row = [b * x - a * y for x, y in zip(row, vector)] + divisor = 0 + for x in row: + divisor = gcd(divisor, x) + if divisor: + row = [x // divisor for x in row] + return row + + +def geometry(word): + """Exact integer elimination computes rational frame spans and closure.""" + need((word["v"], word["R"], word["h"], word["form"]) == (V, R, 8, "/2"), + "unexpected R420 header") + lines = word["lines"] + need(len(lines) == V and all(len(row) == 8 for row in lines), "bad label dimensions") + dimensions, sets = [], [] + for frame in word["frames"]: + need(len(set(frame)) == len(frame) and all(type(i) is int and 0 <= i < V for i in frame), + "bad frame membership") + basis = [] + for i in frame: + row = reduce_row(lines[i], basis) + if any(row): + basis.append((next(k for k, x in enumerate(row) if x), row)) + basis.sort() + closed = {i for i, row in enumerate(lines) if not any(reduce_row(row, basis))} + need(closed == set(frame), "frame is not closed") + dimensions.append(len(basis)) + sets.append(closed) + need(dimensions.count(0) == dimensions.count(8) == 1, "nonunique zero/full frame") + need(len(word["start"]) == len(word["final"]) == N, "bad register boundary size") + for register, frame in enumerate(word["start"]): + need(type(frame) is int and 0 <= frame < len(sets), "invalid start frame") + need(sets[frame] == ({register} if register < V else set()), "wrong initial frame") + for register, frame in enumerate(word["final"]): + need(type(frame) is int and 0 <= frame < len(sets), "invalid final frame") + if V <= register < 2 * V: + target = register - V + expected = {i for i in range(V) if sum(a * b for a, b in zip(lines[i], lines[target])) == 0} + need(sets[frame] == expected, "target final frame is not its perpendicular") + else: + need(dimensions[frame] == 8, "source/helper final frame not full") + return dimensions, sets + + +def gate_shape(gate, frame_count): + need(isinstance(gate, list) and len(gate) == 3, "malformed gate") + frame, dst, srcs = gate + need(type(frame) is int and 0 <= frame < frame_count, "invalid gate frame") + need(isinstance(srcs, list) and srcs, "empty/malformed gate sources") + operands = [dst] + srcs + need(all(type(r) is int and 0 <= r < N for r in operands), "invalid gate register") + need(len(set(operands)) == len(operands), "duplicate/self gate operand") + + +def scalar_replay(word, sections): + """Return the complete linear map, using independent arbitrary input symbols.""" + values = [1 << i for i in range(N)] + for section in sections: + if section == "scatter": + copies = [values[q] for q in word["ret"]] + for t, row in enumerate(word["scatter"]): + for k in row: + values[V + t] ^= copies[k] + else: + for gate in word[section]: + gate_shape(gate, len(word["frames"])) + _, dst, srcs = gate + for src in srcs: + values[dst] ^= values[src] + return values + + +def kernel(word): + """Derive K from A/scatter/B, independently of both source and candidate D.""" + raw = scalar_replay(word, ("A", "scatter", "B")) + target_mask = ((1 << V) - 1) << V + source_mask = (1 << V) - 1 + helper_mask = ((1 << R) - 1) << (2 * V) + for r in range(N): + if V <= r < 2 * V: + need(raw[r] & target_mask == 1 << r, "raw target block is not identity") + need(raw[r] & source_mask == 1 << (r - V), "raw source-to-target block is not identity") + else: + need(raw[r] & target_mask == 0, "raw target-to-source/helper leakage") + return [raw[V + t] & helper_mask for t in range(V)] + + +def check_d(word, kernels): + zero = word["frames"].index([]) + for gate in word["D"]: + gate_shape(gate, len(word["frames"])) + frame, dst, srcs = gate + need(frame == zero and V <= dst < 2 * V and all(s >= V for s in srcs), + "D must stay at frame zero, write targets, and read targets/helpers") + actual = scalar_replay(word, ("D",)) + for r in range(N): + expected = (1 << r) ^ (kernels[r - V] if V <= r < 2 * V else 0) + need(actual[r] == expected, "D endpoint mismatch at register %d" % r) + return sum(len(g[2]) for g in word["D"]) + + +def whole_word(word, geom): + """Replay all scalar columns and the complete MOVE/COPY/ERASE path.""" + dimensions, frame_sets = geom + cur = list(word["start"]) + path, events, histogram = [], [], Counter() + zero = dimensions.index(0) + + def move(register, frame): + old = cur[register] + if old == frame: + return + rank = dimensions[frame] - dimensions[old] + need(rank > 0 and frame_sets[old] <= frame_sets[frame], "illegal frame climb") + path.append(("MOVE", register, old, frame, rank)) + histogram[rank] += 1 + cur[register] = frame + + for section in ("D", "A", "scatter", "B", "C"): + if section == "scatter": + need(len(word["scatter"]) == V, "scatter must have120 rows") + need(len(set(word["ret"])) == len(word["ret"]) == 9, "invalid retained totals") + need(all(type(q) is int and 2 * V <= q < N for q in word["ret"]), "retained total not helper") + need(all(cur[V + t] == zero for t in range(V)), "target left zero before scatter") + for row in word["scatter"]: + need(len(set(row)) == len(row) and all(type(k) is int and 0 <= k < 9 for k in row), + "invalid scatter indices") + for k, q in enumerate(word["ret"]): + path.append(("COPY", q, N, cur[q], zero, dimensions[cur[q]])) + histogram[dimensions[cur[q]]] += 1 + events.append(("COPY", N, q)) + for t, row in enumerate(word["scatter"]): + if k in row: + events.append(("ADD", V + t, N)) + events.append(("ERASE", N, q)) + path.append(("ERASE", q, N, cur[q], zero, 0)) + else: + for gate in word[section]: + gate_shape(gate, len(dimensions)) + frame, dst, srcs = gate + for r in [dst] + srcs: + move(r, frame) + events.extend(("ADD", dst, src) for src in srcs) + for register, frame in enumerate(word["final"]): + move(register, frame) + values = [1 << r for r in range(N)] + [0] + active = None + for kind, dst, src in events: + if kind == "COPY": + need(active is None and dst == N, "invalid copy opening") + values[N], active = values[src], src + elif kind == "ERASE": + need(active == src and values[N] == values[src], "invalid copy closure") + values[N], active = 0, None + else: + need(dst != N and (src != N or active is not None), "invalid temporary use") + need(dst != active, "retained source changed in copy window") + values[dst] ^= values[src] + need(active is None and values[N] == 0, "unclosed temporary") + for r in range(N): + need(values[r] == ((1 << r) ^ (1 << (r - V) if V <= r < 2 * V else 0)), + "full endpoint mismatch at register %d" % r) + adds = sum(kind == "ADD" for kind, _, _ in events) + return {"columns": N, "additions": adds, "records": adds + len(path), + "paid_histogram": dict(sorted(histogram.items())), + "rank_mass": sum(k * v for k, v in histogram.items()), + "path": path, "events": events} + + +def positive_prefix(events): + """Cancellation-free signed row bounds in native exporter scalar-event order.""" + maxima = [] + for reverse in (False, True): + norms, largest, active = [1] * (N + 1), 1, None + for kind, dst, src in reversed(events) if reverse else events: + if reverse and kind != "ADD": + kind = "ERASE" if kind == "COPY" else "COPY" + if kind == "ADD": + norms[dst] += norms[src] + largest = max(largest, norms[dst]) + elif kind == "COPY": + need(active is None, "prefix copy opening") + norms[N], active = norms[src], src + else: + need(active == src, "prefix copy closure") + norms[N], active = 0, None + need(active is None, "prefix unclosed copy") + maxima.append(largest) + forward, reverse = maxima + payload = 64 * forward ** 3 * reverse ** 2 + return {"forward": forward, "reverse": reverse, "payload_upper": payload, + "payload_bits": payload.bit_length(), "below_2_pow_104": payload < 2 ** 104} + + +def cut_budget(word, recipe, kernels, replay): + """Independent DP lower bound over all cuts of the pinned minimum tree. + + Fixed source/helper forward norms give a necessary reverse cap for every + feasible cut. A candidate attaining this cost and passing full prefix replay + proves cut-class optimality without assuming forward norms are constant. + """ + events, parent = replay["events"], recipe["mst_parents"] + need(all(V <= d < 2 * V or all(not V <= s < 2 * V for s in srcs) + for phase in ("A", "B", "C") for _, d, srcs in word[phase]), "target feeds source/helper") + fixed_forward, norms = 1, [1] * (N + 1) + for kind, dst, src in events: + if kind == "ADD": + norms[dst] += norms[src] + if not V <= dst < 2 * V: + fixed_forward = max(fixed_forward, norms[dst]) + else: + norms[N] = norms[src] if kind == "COPY" else 0 + cap = isqrt(((1 << 104) - 1) // (64 * fixed_forward ** 3)) + base = [1] * (N + 1) + d_count = sum(len(g[2]) for g in word["D"]) + for kind, dst, src in reversed(events[d_count:]): + if kind == "ADD": + base[dst] += base[src] + else: + base[N] = base[src] if kind == "ERASE" else 0 + children = [[] for _ in range(V + 1)] + for i, p in enumerate(parent): + children[p].append(i) + root_norm, edge_norm = [], [] + for i, p in enumerate(parent): + root_norm.append(base[V + i] + sum(base[s] for s in range(2 * V, N) if kernels[i] >> s & 1)) + delta = kernels[i] ^ (kernels[p] if p != V else 0) + edge_norm.append(base[V + i] + (base[V + p] if p != V else 0) + + sum(base[s] for s in range(2 * V, N) if delta >> s & 1)) + + @lru_cache(None) + def endpoint(i, root): + return root_norm[i] if i == root else edge_norm[i] + endpoint(parent[i], root) + + @lru_cache(None) + def cost(i, root): + if endpoint(i, root) > cap: + return 10 ** 9 + local = kernels[i].bit_count() if i == root else (kernels[i] ^ kernels[parent[i]]).bit_count() + 2 + return local + sum(min(cost(child, root), cost(child, child)) for child in children[i]) + + optimum = sum(cost(root, root) for root in children[V]) + selected_cost = sum(len(g[2]) for g in word["D"]) + prefix = positive_prefix(events) + return {"scope": "all edge cuts of the certified seed-6 minimum tree", + "fixed_source_helper_forward_lower_bound": fixed_forward, "necessary_reverse_cap": cap, + "minimum_D_additions": optimum, "dynamic_states": cost.cache_info().currsize, + "selected_feasible": prefix["below_2_pow_104"], + "selected_attains_cut_class_optimum": prefix["below_2_pow_104"] and selected_cost == optimum} + + +def check_tree(recipe, kernels, minimal=True): + """Validate a spanning tree then all non-tree edges by the cycle criterion.""" + parent = recipe["parents"] + need(len(parent) == V and all(type(p) is int and 0 <= p <= V for p in parent), "invalid parent") + need(all(p != i for i, p in enumerate(parent)), "self parent") + adjacency = [[] for _ in range(V + 1)] + + def weight(i, j): + return kernels[min(i, j)].bit_count() if V in (i, j) else (kernels[i] ^ kernels[j]).bit_count() + 2 + + def key(i, j): + i, j = sorted((i, j)) + return weight(i, j), hashlib.sha256(f"6:{i}:{j}".encode("ascii")).hexdigest(), i, j + + expected_edges = {tuple(sorted((i, p))) for i, p in enumerate(parent)} + need(len(expected_edges) == V, "repeated tree edge") + for i, p in enumerate(parent): + cost = weight(i, p) + adjacency[i].append((p, cost)) + adjacency[p].append((i, cost)) + depths, stack = {V: 0}, [V] + while stack: + i = stack.pop() + for j, _ in adjacency[i]: + if j not in depths: + depths[j] = depths[i] + 1 + stack.append(j) + need(len(depths) == V + 1, "parents contain cycle/disconnected component") + need(all(depths[i] == depths[p] + 1 for i, p in enumerate(parent)), "parents point away from dummy root") + listed = recipe["mst_edges"] + need(len(listed) == V, "wrong number of listed MST edges") + actual_edges = set() + for edge in listed: + i, j, cost = edge["u"], edge["v"], edge["weight"] + need(type(i) is int and type(j) is int and 0 <= i < j <= V, "invalid listed edge") + need(type(cost) is int and cost == weight(i, j), "underpriced/mispriced edge") + actual_edges.add((i, j)) + need(actual_edges == expected_edges, "listed edges do not match parents") + checked, slack_min = 0, None + for start in range(V + 1) if minimal else (): + maxima, visit = {start: (-1, "", -1, -1)}, [start] + while visit: + i = visit.pop() + for j, cost in adjacency[i]: + if j not in maxima: + maxima[j] = max(maxima[i], key(i, j)) + visit.append(j) + for end in range(start + 1, V + 1): + if (start, end) not in expected_edges: + slack = weight(start, end) - maxima[end][0] + need(slack >= 0, "nonminimal tree: cycle property violated") + need(key(start, end) >= maxima[end], "seed-6 tie certificate violated") + slack_min = slack if slack_min is None else min(slack_min, slack) + checked += 1 + return {"total_weight": sum(weight(i, p) for i, p in enumerate(parent)), + "non_tree_edges_checked": checked, "minimum_cycle_slack": slack_min, + "roots": sum(p == V for p in parent), "target_edges": sum(p != V for p in parent), + "maximum_target_depth": max(depths.values()) - 1} + + +def check_recipe(source, candidate, recipe, kernels): + need(recipe["format"] == "r420-target-forest/1" and recipe["dummy_vertex"] == V, + "invalid recipe format/dummy") + need(recipe["source"]["file_sha256"] == SOURCE_FILE_SHA256 and + recipe["source"]["canonical_sha256"] == SOURCE_CONTENT_SHA256, "malformed source pin") + need(recipe["source"]["path"] == "research/e8-bit-r420/data/bitE8mut-r420.json.gz" and + recipe["source"]["base_commit"] == "66849e1475c930fd7732b1a0067ffee7e1e95f60", "wrong source provenance") + need(type(recipe["seed"]) is int and recipe["seed"] == 6, "wrong assignment seed") + need(recipe["algorithm"] == "Kruskal, ascending (weight, SHA256(ASCII seed:u:v), u, v)", "wrong algorithm declaration") + need(recipe["optimality_scope"] == "The uncut MST minimizes XOR count within the rooted target-forest " + "construction; cut variants have no unrestricted optimality claim.", "unsupported optimality claim") + need(recipe["candidate_canonical_sha256"] == digest(candidate), "candidate digest mismatch") + mst = check_tree({"parents": recipe["mst_parents"], "mst_edges": recipe["mst_edges"]}, kernels) + tree = check_tree({"parents": recipe["parents"], "mst_edges": recipe["tree_edges"]}, kernels, minimal=False) + cuts = recipe["cuts"] + need(all(type(i) is int and 0 <= i < V for i in cuts) and cuts == sorted(set(cuts)), "invalid cut list") + need(all(recipe["mst_parents"][i] != V for i in cuts), "cut is already a root") + expected_parent = [V if i in cuts else p for i, p in enumerate(recipe["mst_parents"])] + need(recipe["parents"] == expected_parent, "selected tree is not declared cut of minimum tree") + parent, order = recipe["parents"], recipe["child_before_parent_order"] + need(sorted(order) == list(range(V)), "bad preparation order") + position = {t: i for i, t in enumerate(order)} + need(all(p == V or position[i] < position[p] for i, p in enumerate(parent)), "not children before parents") + need(recipe["roots"] == [i for i, p in enumerate(parent) if p == V], "wrong root list") + zero = source["frames"].index([]) + prepare = [[zero, V + i, [V + parent[i]]] for i in order if parent[i] != V] + inject, injection_order = [], [] + for i, p in enumerate(parent): + residual = kernels[i] ^ (kernels[p] if p != V else 0) + sources = [r for r in range(2 * V, N) if residual >> r & 1] + if sources: + inject.append([zero, V + i, sources]) + injection_order.append(i) + e, j = len(prepare), len(inject) + need(recipe["D_boundaries"] == {"prepare": [0, e], "inject": [e, e + j], + "unprepare": [e + j, 2 * e + j], "injection_order": injection_order}, "invalid D boundaries") + need(candidate["D"] == prepare + inject + list(reversed(prepare)), "D does not implement claimed recipe") + need(sum(len(g[2]) for g in candidate["D"]) == tree["total_weight"], "circuit cost does not equal tree weight") + vertices = [{"vertex": i, "target_register": V + i, + "kernel_weight": kernels[i].bit_count()} for i in range(V)] + vertices.append({"vertex": V, "target_register": None, "kernel_weight": 0}) + need(recipe["vertices"] == vertices, "declared kernels do not match raw word") + levels = [] + for i in range(V): + level, current = 0, i + for _ in range(V + 1): + if current == V: + break + current, level = parent[current], level + 1 + levels.append(level) + need(recipe["levels_from_dummy"] == levels and recipe["forest_height_edges"] == max(levels) - 1, + "incorrect declared depth") + need(recipe["metrics"]["mst_weight"] == mst["total_weight"], "mispriced minimum tree cost") + need(recipe["metrics"]["tree_weight"] == tree["total_weight"], "mispriced selected tree cost") + need(recipe["metrics"]["xor_saved"] == sum(len(g[2]) for g in source["D"]) - tree["total_weight"], + "incorrect declared savings") + for label, word in (("source", source), ("candidate", candidate)): + scatter = [[0, V + t, [word["ret"][k] for k in row]] for t, row in enumerate(word["scatter"]) if row] + for section, gates in (("D", word["D"]), ("full", word["D"] + word["A"] + scatter + word["B"] + word["C"])): + data, wires, count = [0] * N, [0] * N, 0 + for _, dst, srcs in gates: + for src in srcs: + count += 1 + data[dst] = max(data[dst], data[src]) + 1 + wires[dst] = wires[src] = max(wires[dst], wires[src]) + 1 + measured = {"xor_count": count, "gate_records": len(gates), + "ordered_data_dependency_depth": max(data), "ordered_wire_disjoint_depth": max(wires)} + need(recipe["metrics"][label][section] == measured, "incorrect declared circuit metrics") + return {"minimum_tree": mst, "selected_tree": tree, "cuts": cuts} + + +def verify(source, candidate, recipe): + need(digest(source) == SOURCE_CONTENT_SHA256, "source canonical SHA256 mismatch") + need(digest({k: v for k, v in source.items() if k != "D"}) == + digest({k: v for k, v in candidate.items() if k != "D"}), "changed word outside D") + geom = geometry(source) + kernels = kernel(source) + source_d, candidate_d = check_d(source, kernels), check_d(candidate, kernels) + tree = check_recipe(source, candidate, recipe, kernels) + old, new = whole_word(source, geom), whole_word(candidate, geom) + need(old["path"] == new["path"], "MOVE/COPY/ERASE path changed") + need(old["paid_histogram"] == new["paid_histogram"] == {1: 1320, 2: 1440, 4: 60, 5: 120, 8: 9}, + "paid histogram changed") + need(old["rank_mass"] == new["rank_mass"] == 5112, "rank mass changed") + return {"status": "PASS", "source_sha256": digest(source), "candidate_sha256": digest(candidate), + "D_additions": {"source": source_d, "candidate": candidate_d, "saved": source_d - candidate_d}, + "tree_certificate": tree, "identical_frame_path": True, + "source": {k: v for k, v in old.items() if k not in ("path", "events")}, + "candidate": {k: v for k, v in new.items() if k not in ("path", "events")}, + "positive_prefix": {"source": positive_prefix(old["events"]), "candidate": positive_prefix(new["events"])}, + "cut_budget": cut_budget(candidate, recipe, kernels, new)} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--source", type=Path, default=SOURCE) + parser.add_argument("--candidate", type=Path, default=HERE / "data/word.json.gz") + parser.add_argument("--recipe", type=Path, default=HERE / "data/recipe.json") + parser.add_argument("--json", type=Path) + parser.add_argument("--expect-prefix-rejection", action="store_true", + help="verify the uncut optimum calibration and require its expected prefix failure") + args = parser.parse_args() + try: + result = verify(pinned_source(args.source), read_word(args.candidate), json.loads(args.recipe.read_text())) + if args.expect_prefix_rejection: + need(not result["tree_certificate"]["cuts"] and not result["positive_prefix"]["candidate"]["below_2_pow_104"], + "expected uncut optimum prefix rejection not observed") + result["status"] = "PASS_CIRCUIT_AND_TREE_CALIBRATION_EXPECTED_PREFIX_REJECTION" + else: + need(result["positive_prefix"]["candidate"]["below_2_pow_104"], "candidate exceeds unchanged104-bit prefix cap") + need(result["cut_budget"]["selected_attains_cut_class_optimum"], "candidate is not an optimal feasible tree cut") + result["status"] = "PASS_ADMITTED_CIRCUIT_AND_OPTIMAL_TREE_CUT" + except (Reject, KeyError, TypeError, IndexError) as error: + parser.exit(1, "REJECT: %s\n" % error) + payload = json.dumps(result, indent=2, sort_keys=True) + "\n" + if args.json: + args.json.write_text(payload) + print(payload, end="") + + +if __name__ == "__main__": + main()