From e5cadfe3ac01d3bdaec1174f7b6191d9ec99dd19 Mon Sep 17 00:00:00 2001 From: commdata2338 <199849969+commdata2338@users.noreply.github.com> Date: Wed, 14 Oct 2026 17:00:10 -0500 Subject: [PATCH] Research: certify the P104 cut-2429 nested-contact price (864 rank units) PR #2163 showed that free nested-chart contacts at P104 cut 2429 raise the frozen chronology's source-to-target max flow from 8 to 104. Pricing each contact at its one-way dimension gap per transmitted array, the minimum cost of flow F is exactly C(F) = 9 max(0, F - 8), so 104 flows cost 864 added rank units: eight free paths and 96 paths of price nine, with integer node potentials (terminal gap 9, capacity penalty 72) as the dual certificate. A second checker rebuilds the uncompressed per-register network (1,427 layers, 399,680 unit edges) and verifies the lifted dual. Under the inherited unchanged-obligation coverage contract only, this price alone gives M(0) >= 8523/7592 > 1. A graph relaxation, not a correction circuit; no supplier or kappa change. Adds research/p104-single-cut-price/ only. Submitted by @commdata2338 with substantial AI assistance (OpenAI Codex research and implementation; packaged with Claude Code). Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01X86sCSXdoDd61SDFfC1PKG --- .../p104-single-cut-price/CERTIFICATE.json | 1 + research/p104-single-cut-price/README.md | 222 ++++++++++++++ research/p104-single-cut-price/SOURCES.json | 24 ++ research/p104-single-cut-price/TASK.json | 154 ++++++++++ research/p104-single-cut-price/VERIFY.json | 42 +++ research/p104-single-cut-price/model.py | 196 ++++++++++++ research/p104-single-cut-price/solve.py | 95 ++++++ research/p104-single-cut-price/test_verify.py | 153 ++++++++++ research/p104-single-cut-price/verify.py | 285 ++++++++++++++++++ 9 files changed, 1172 insertions(+) create mode 100644 research/p104-single-cut-price/CERTIFICATE.json create mode 100644 research/p104-single-cut-price/README.md create mode 100644 research/p104-single-cut-price/SOURCES.json create mode 100644 research/p104-single-cut-price/TASK.json create mode 100644 research/p104-single-cut-price/VERIFY.json create mode 100644 research/p104-single-cut-price/model.py create mode 100644 research/p104-single-cut-price/solve.py create mode 100644 research/p104-single-cut-price/test_verify.py create mode 100644 research/p104-single-cut-price/verify.py diff --git a/research/p104-single-cut-price/CERTIFICATE.json b/research/p104-single-cut-price/CERTIFICATE.json new file mode 100644 index 0000000000..c85fefb47c --- /dev/null +++ b/research/p104-single-cut-price/CERTIFICATE.json @@ -0,0 +1 @@ +{"baseline":{"cost":0,"flow":[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"value":8},"facts":{"cut":2429,"cut_classes":[["0x1",0,136],["0xffffffffffffffff0000000000000000ffffffffffffffff0000000000000000ffffffffffffffff0000000000000000ffffffffffffffff",8,1],["0xffffffff00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff",8,1],["0xffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff",8,1],["0xf0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f",8,1],["0xf0f0f0f0f0f0f0f0f0f0f0f0f0f0f0ff0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f00f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f",8,1],["0xf0f0f0ff0f0f0f00f0f0f0ff0f0f0f00f0f0f0ff0f0f0f00f0f0f0ff0f0f0f0f0f0f0f00f0f0f0ff0f0f0f00f0f0f0ff0f0f0f00f0f0f0ff0f0f0f00f0f0f0f",8,1],["0x33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333",8,1],["0x66669999666699996666999966669999666699996666999966669999666699996666999966669999666699996666999966669999666699996666999966669999",8,1],["0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",9,136]],"edges":3810,"event_kinds":{"add":2624,"copy":8,"erase":8,"transport":1410,"zero":8},"events":4058,"nodes":2604,"original_rank_mass":2368,"paid_edges":34,"private_lifetimes":8,"transport_profile":{"1":1074,"2":58,"3":86,"4":104,"5":48,"6":24,"7":8,"8":8}},"paid":{"cost":864,"flow":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,10,1,3,3,1,4,2,1,5,1,1,6,0,0,7,0,0,10,1,4,13,1,5,12,1,6,11,1,7,10,1,8,9,1,9,8,1,10,7,1,11,6,1,12,5,1,13,4,1,14,3,1,15,2,1,16,1,1,2,1,17,7,1,18,6,1,19,5,1,20,4,1,21,3,1,22,2,1,23,1,1,24,0,0,25,0,0,25,0,0,2,1,3,5,1,4,4,1,5,3,1,6,2,1,7,1,1,3,1,8,10,1,9,9,1,10,8,1,11,7,1,12,6,1,13,5,1,14,4,1,15,3,1,16,2,1,17,1,1,18,0,0,19,0,0,7,1,0,3,1,1,2,1,2,1,0,3,1,0,3,1,0,3,1,0,3,1,0,3,1,0,3,1,0,3,1,0,3,1,0,3,1,0,3,1,1,12,1,13,5,1,14,4,1,15,3,1,16,2,1,17,1,1,18,0,0,19,0,0,19,0,0,2,1,4,7,1,5,6,1,6,5,1,7,4,1,8,3,1,9,2,1,10,1,1,11,0,0,3,1,12,5,1,13,4,1,14,3,1,15,2,1,16,1,1,17,0,0,18,0,0,18,0,0,2,1,7,0,0,8,0,0,8,0,0,8,0,0,8,0,0,3,1,9,1,1,8,1,2,7,1,3,6,1,4,5,1,5,4,1,6,3,1,7,2,1,8,24,1,9,23,1,10,22,1,11,21,1,12,20,1,13,19,1,14,18,1,15,17,1,16,16,1,17,15,1,18,14,1,19,13,1,20,12,1,21,11,1,22,10,1,23,9,1,24,8,1,25,7,1,26,6,1,27,5,1,28,4,1,29,3,1,30,2,1,31,18,1,32,17,1,33,16,1,34,15,1,35,14,1,36,13,1,37,12,1,38,11,1,39,10,1,40,9,1,41,8,1,42,7,1,43,6,1,44,5,1,45,4,1,46,3,1,47,2,1,48,18,1,49,17,1,50,16,1,51,15,1,52,14,1,53,13,1,54,12,1,55,11,1,56,10,1,57,9,1,58,8,1,59,7,1,60,6,1,61,5,1,62,4,1,63,3,1,64,2,1,65,17,1,66,16,1,67,15,1,68,14,1,69,13,1,70,12,1,71,11,1,72,10,1,73,9,1,74,8,1,75,7,1,76,6,1,77,5,1,78,4,1,79,3,1,80,2,1,81,7,1,82,6,1,83,5,1,84,4,1,85,3,1,86,2,0,87,2,0,87,2,0,87,2,0,87,2,1,87,2,0,88,2,0,88,2,0,88,2,0,88,2,0,88,2,0,88,2,0,88,2,0,88,2,0,88,2,0,88,2,0,88,2,0,88,2,1,88,1,0,89,1,0,89,1,0,89,1,0,89,1,1,89,1,0,90,1,0,90,1,0,90,1,1,90,1,0,91,1,0,91,1,1,91,1,0,92,1,0,92,1,0,92,1,1,92,1,0,93,1,0,93,1,0,93,1,1,93,1,0,94,1,0,94,1,0,94,1,1,94,1,0,95,1,0,95,1,1,95,1,0,96,1,0,96,1,0,96,1,0,96,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,95,1,1,94,1,2,93,1,3,92,0,4,92,1,91,1,1,90,0,2,90,1,89,1,1,88,1,2,87,0,3,87,1,86,1,1,85,1,2,84,0,3,84,1,83,1,1,82,1,2,81,0,3,81,1,80,1,1,79,0,2,79,1,78,1,1,77,1,2,76,0,3,76,1,75,1,1,74,1,2,73,1,3,72,0,4,72,1,1,4,0,5,1,1,2,0,3,1,1,3,0,4,1,1,3,0,4,1,1,3,0,4,1,1,2,0,3,1,1,3,0,4,1,1,4,0,5,1,3,71,1,4,70,1,5,69,1,6,68,1,7,67,1,8,66,1,9,65,0,10,65,0,10,65,0,10,65,0,10,65,0,10,65,0,10,65,1,4,64,1,5,63,1,6,62,1,7,61,1,8,60,1,9,59,1,10,58,1,11,57,0,12,57,0,12,57,1,4,56,1,5,55,1,6,54,1,7,53,1,8,52,1,9,51,1,10,50,1,11,49,1,12,48,1,13,47,1,14,46,1,15,45,1,16,44,0,17,44,0,17,44,0,17,44,1,4,43,1,5,42,1,6,41,1,7,40,1,8,39,1,9,38,1,10,37,1,11,36,1,12,35,1,13,34,1,14,33,1,15,32,0,16,32,0,16,32,0,16,32,0,16,32,0,16,32,1,3,31,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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],"frontier":[[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[6,0],[7,0],[8,0],[9,9],[10,18],[11,27],[12,36],[13,45],[14,54],[15,63],[16,72],[17,81],[18,90],[19,99],[20,108],[21,117],[22,126],[23,135],[24,144],[25,153],[26,162],[27,171],[28,180],[29,189],[30,198],[31,207],[32,216],[33,225],[34,234],[35,243],[36,252],[37,261],[38,270],[39,279],[40,288],[41,297],[42,306],[43,315],[44,324],[45,333],[46,342],[47,351],[48,360],[49,369],[50,378],[51,387],[52,396],[53,405],[54,414],[55,423],[56,432],[57,441],[58,450],[59,459],[60,468],[61,477],[62,486],[63,495],[64,504],[65,513],[66,522],[67,531],[68,540],[69,549],[70,558],[71,567],[72,576],[73,585],[74,594],[75,603],[76,612],[77,621],[78,630],[79,639],[80,648],[81,657],[82,666],[83,675],[84,684],[85,693],[86,702],[87,711],[88,720],[89,729],[90,738],[91,747],[92,756],[93,765],[94,774],[95,783],[96,792],[97,801],[98,810],[99,819],[100,828],[101,837],[102,846],[103,855],[104,864]],"graph_sha256":"1d7751a3dc8651bf3ef784c3be79598c5eebe441938df820481d6b72e9261810","potential":[0,9,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17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,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"value":104},"schema_version":1,"source_sha256":"0f541bef7f19fdeffd67157684e9f03d785f42c89973632f508fc1a0452b580e"} diff --git a/research/p104-single-cut-price/README.md b/research/p104-single-cut-price/README.md new file mode 100644 index 0000000000..3c7054a25d --- /dev/null +++ b/research/p104-single-cut-price/README.md @@ -0,0 +1,222 @@ +# Exact price of the P104 nested-contact relaxation at cut 2429 + +The single-cut communication relaxation costs **864 added rank units** to +support 104 independent source-to-target flows. More precisely, for integer +`0 <= F <= 104`, its minimum dimension-gap price is + +\[ +C(F)=9\max(0,F-8). +\] + +This answers the minimum-cost-flow first step in Michael Yee's +[Discussion #2164](https://github.com/CrocSwap/integer-mult-bounds/discussions/2164) +and [PR #2163](https://github.com/CrocSwap/integer-mult-bounds/pull/2163), head +`9f6e1f2783aef0c52bb3f26f587a918a8be32fa9`. +That predecessor supplied the temporal graph and showed that **free** nested +contacts at this cut raise its capacity from 8 to 104. The new result prices +those contacts exactly, with a feasible flow and a dual certificate. + +**This is a finite graph optimum and scoped proof, not a correction circuit.** +Prices are one-way dimension gaps per transmitted array. Dirty restoration, +scalar coefficients realizing the identity, native phases, hosting and a +complete supplier bill are not supplied. No new supplier or kappa is claimed. +The result is author-checked, without independent human or formal-kernel review. + +## Frozen object and exact model + +The only mathematical input is the immutable +[PR1972 witness](../p104-native-channel/inputs/LOWRANK-WITNESS.json), authored by +Rohan Arun at `fd82d172f46933fd253c2c6de4bd5eaff5429cfd`, SHA-256 +`0f541bef7f19fdeffd67157684e9f03d785f42c89973632f508fc1a0452b580e`. +Its retained native realization is Chafik Boukhalfa's PR1991, +`6e222517e182e98499239bc9a4009f540e1c5520`. +The scientific base is main `0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2`. +Exact contextual predecessor heads and task selection are in [TASK.json](TASK.json). + +Use PR2163's per-register temporal network: + +1. Preserve all original frame transports and private lifetimes. Replace the + prescribed scalar additions by arbitrary common-frame communication at every + cut. Each live register between consecutive structural layers carries at + most one array. Initially only the 104 X inputs supply flow; finally only + the 104 Y outputs consume it. +2. Cut `c` is after instructions `0,...,c-1`. Cut **2429**, predecessor layer + 701, is immediately before the first `transport D0` instruction. Here the + live frames comprise 136 FULL registers (104 X and 32 G), 136 zero-frame + registers (104 Y and 32 D), and eight distinct rank-eight Q frames. +3. At this cut only, add directed arcs both ways between every **strictly + nested pair of live frame classes**. Charge each unit of flow on such an + arc `abs(dim A - dim B)`. Their capacities are 104, which is sufficient + for any source-to-target flow under consideration. All original arcs cost + zero: their existing invoice is paid separately. +4. As in PR2163's `nested_layers` relaxation, frame hubs have unlimited transit + capacity at the added-contact cut. The original incoming/outgoing register + capacities remain. Chaining paid contacts through a hub is allowed. No new + intermediate frame classes or contacts at other cuts are added. + +There are 10 live classes and 34 directed paid arcs: FULL/zero, FULL/every Q, +zero/every Q. Distinct rank-eight Q frames are not nested. An arc is a priced +information-flow relaxation; it is **not** asserted to be a legal restored ADD. +In particular, neither the graph upper bound nor the numeral 864 is an upper +bound on the cost of implementing `I-G/2`. + +## Certificate and proof + +[model.py](model.py) compresses the unchanged frame-class chains into **2,604 +nodes and 3,810 arcs**. It reconstructs subspaces by explicitly enumerating +all vectors in their spans. A frame-class epoch ends whenever a register +enters, leaves, is born or is discarded. A transport from class A to B has +one capacity-one A-to-B arc, a capacity `|A|-1` A carry arc and a capacity +`|B|` B carry arc. Private initialization has no source edge. + +This compression preserves the flow problem. At each cut arbitrary +common-frame mixing allows any pairing of the incoming and outgoing occupied +registers in a class. Thus integral class flows can be assigned to the actual +register slots. A class unchanged between membership events has only a carry +chain of constant capacity, which can be contracted. If its epoch contains the +paid-contact cut, its incoming and outgoing original flows each remain bounded +by its register count, while the hub itself admits transit just as in the +uncompressed model. The verifier checks both occupancy bounds. Conversely, +summing the per-register flows gives a feasible compressed flow with identical +paid cost. + +[CERTIFICATE.json](CERTIFICATE.json) supplies integral flows and integer node +potentials. The acceptance checker [verify.py](verify.py) **does not import or +run the optimizer**. It verifies every capacity, conservation equation and +residual reduced-cost inequality. For an arc `e=(u,v)` of capacity `b_e` and +cost `c_e`, put `r_e=c_e+p_u-p_v`. Any flow of value F satisfies + +\[ +\sum_e c_e x_e +=F(p_t-p_s)+\sum_e r_e x_e +\ge F(p_t-p_s)-\sum_e b_e\max(0,-r_e). +\] + +The supplied potential has terminal gap **9** and total capacity penalty +**72**, proving `cost >= 9F-72`. Nonnegative costs also give `cost >= 0`. +The feasible 104-flow decomposes into **eight zero-price paths and 96 paths +of price nine**. Its only used paid arc carries 96 units from FULL to zero. +Taking subsets of these paths attains the lower bound for every integer F. +This proves the whole claimed cost curve, including `C(104)=864`. + +A second checker reconstructs all **1,427 structural layers and 399,680 unit +register edges**, including the final 104 output edges. It uses Gaussian +elimination rather than span enumeration and never reads the compressed edge +list. It lifts the potentials to the full per-register graph: each entry takes +its preceding frame-hub potential and each exit its current hub potential. +The hub/entry/exit arcs then have zero reduced cost. Source, sink and all 34 +paid arcs are checked explicitly. The only negative unit edges are: + +| Register | First cut / penalty | Later cut / penalty | +| --- | --- | --- | +| Q0 | 1597 / 1 | 2462 / 8 | +| Q1 | 1592 / 1 | 2471 / 8 | +| Q2 | 1589 / 1 | 2478 / 8 | +| Q3 | 1585 / 1 | 2486 / 8 | +| Q4 | 1581 / 1 | 2494 / 8 | +| Q5 | 1577 / 1 | 2502 / 8 | +| Q6 | 1574 / 1 | 2509 / 8 | +| Q7 | 1570 / 1 | 2517 / 8 | + +Their capacity-weighted penalty is `8*1+8*8=72`. This independently checks +the lower bound on the predecessor's uncompressed network; it is not a second +optimization run or independent human review. + +## Conditional budget implication + +The source-bound recount gives original local rank mass 2368 and boundary +coverage 2312. **Only under the inherited, unchanged-obligation coverage +contract** `N=9, m=73, W=832`, with no new productive-progress credit, the idle +mass is `72*832-9*2312=39096`, and the available extra rank is `328/9` per call. +The already optimistic one-way price 864 fails this screen: + +\[ +M(0)\ge\frac{9(2368+864)+39096}{73\cdot832} +=\frac{8523}{7592}>1. +\] + +The verifier checks this rational arithmetic, not the coverage contract. +Bringing this expression merely to equality would require `7448/9` additional +units of valid rank credit per call; strict success needs more. Paid rank is +not automatically excess cost when a construction changes coverage, endpoints +or owner obligations. This comparison therefore does not exclude those changes. +There is no reason to synthesize this fixed-cut route under the unchanged bill. + +## Reproduction and controls + +Standard-library Python 3.12; all acceptance commands are read-only: + +```sh +python3 -I -B research/p104-single-cut-price/verify.py +python3 -I -B scripts/research_package.py --package research/p104-single-cut-price +``` + +Expected verifier output: + +```text +PASS_P104_SINGLE_CUT_PRICE cut=2429 flow=104 cost=864 baseline=8 dual=9*flow-72 frontier=0..104 no_new_kappa +``` + +The registered replay runs the verifier and seven test groups, normally and +with `-O`. Fifteen rejection cases cover capacity, conservation, cost, Boolean +substitution, invalid duals, underpriced contact, the expanded paid-arc guard, +nonmaximal baseline, moved cut, transport rank, nonnested transport, illegal +ADD frame, source bytes, intermediate price receipt and overwrite protection. +Positive controls include equivalent redundant frame bases and a small residual +rerouting instance where greedy path selection would give the wrong price. + +For an optional fresh optimization, choose a nonexistent output path: + +```sh +python3 -I -B research/p104-single-cut-price/solve.py --write p104-price-new.json +python3 -I -B research/p104-single-cut-price/verify.py --certificate p104-price-new.json +``` + +The optimizer refuses overwrites. Acceptance does not depend on identical +optimizer choices: a different valid optimal primal/dual witness is allowed. +Source pins and the graph model remain fixed. Use `verify.py --json` to inspect +the expanded dual and conditional budget receipt. + +## Scope and overlap + +PR2082/2090 establish the frozen temporal cut, PR2113 allows retiming, PR2127 +allows added storage, and PR2136/2148 study retained-path subdivision. Those +are different domains; this result does not replace their bounds. PR2163's +free nested-contact observation is credited rather than repeated as novel. +Its second handoff, formalizing the one-array-per-transport implication, is +separate from this exact fixed-graph price. No other cut is priced here. + +Not checked: a scalar identity or arbitrary-dirty restoration for the new +contacts; native Clifford/phase realization of a correction; actual owners, +COPY lifetimes, precision, tape, all-size lifting, complete cold replay, or a +formal translation of every physical program into this graph. Full flow only +certifies communication capacity, not prescribed source-to-target coefficients. +The old witness's scalar `G/2` endpoint is inherited, not replayed in this package. + +## Open next questions + +Also structured in TASK.json: + +- Can one actual changed P104 trajectory earn enough *proved* productive + progress credit to pass a complete moment? This matters because the present + fixed-cut price exceeds the retained slack. First specify the changed owner + and idle obligations and test a fully charged optimistic budget. A valid + coverage identity and dirty-restored schedule remain the blockers. +- Multiple paid cuts change this theorem's hypothesis. Such a search should + begin only with an explicit revised coverage contract or other source of + headroom: the earlier general 96-transport floor already fails the unchanged + budget. State the cut set and capacity semantics before another optimization; + free reachability alone would not establish a supplier. + +## Credit + +Temporal-network model, free-contact sensitivity and handoff: Michael Yee +(PR2163), with the assistance credited in that package. Channel and native +realization: Rohan Arun (PR1972), Chafik Boukhalfa (PR1991). Cut/budget lineage: +David Arias, Adam Gall, Jeremy Diviney, Ross Richardson, Tairitsu-Aya, +Nick Petalas and Aaron Wang/navinor, with their geometry/coverage predecessors +retained. Their sources were consulted; no pending checker is imported as an +acceptance oracle. The new code and price proof are supplied here. + +Prepared for commdata2338 (@commdata2338), with substantial OpenAI Codex assistance. +Apache-2.0. diff --git a/research/p104-single-cut-price/SOURCES.json b/research/p104-single-cut-price/SOURCES.json new file mode 100644 index 0000000000..a9ff7abd34 --- /dev/null +++ b/research/p104-single-cut-price/SOURCES.json @@ -0,0 +1,24 @@ +{ + "schema_version": 1, + "base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "e8870e5917057d59b730eb14721a778639eca050", + "sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7" + }, + { + "path": "research/p104-native-channel/inputs/LOWRANK-WITNESS.json", + "usage": "input", + "git_blob": "86beaf424e9f0f800ae3a62797d94ec9386b7706", + "sha256": "0f541bef7f19fdeffd67157684e9f03d785f42c89973632f508fc1a0452b580e" + } + ] +} diff --git a/research/p104-single-cut-price/TASK.json b/research/p104-single-cut-price/TASK.json new file mode 100644 index 0000000000..2701865bd3 --- /dev/null +++ b/research/p104-single-cut-price/TASK.json @@ -0,0 +1,154 @@ +{ + "schema_version": 1, + "task_id": "p104-side-correction", + "priority_revision": 4, + "base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "original_card": { + "id": "p104-side-correction", + "question": "Can the native P104 low-rank channel be completed with a legal, fully charged I-G/2 side correction?", + "starting_points": [ + "research/p104-native-channel/README.md", + "research/p104-native-channel/PROOF.md", + "docs/research/community-efficient1000-review.md" + ], + "methods": [ + "Construct one side-correction word at an explicit chronological cut with the needed frames still available.", + "Derive a lower bound on the side correction and hosting costs that decides whether this channel can beat the selected budget." + ], + "acceptance_gate": "An exact arbitrary-input identity, source/target frame availability and restoration at the chosen cut, plus the complete channel+correction+idle/hosting bill or an explicit favorable bound. The native channel alone is not a supplier.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the P104 open next questions and its fixed local histogram; inspect why appending I-G/2 after source completion is not justified. #1991 supplies the checked native channel, not the missing correction.", + "scope": "Source-bound orientation only. Read the named package and review before relying on its local evidence; this command is not its replay or supplier admission." + }, + "first_experiment": "Choose one exact side-correction cut and bound its allowed cost from a favorable completed moment at a declared target. Stop or hand off if the necessary source/target access cannot be justified or even the optimistic total misses the target.", + "bottleneck_link": "Completing an already realized changed channel tests a concrete construction opportunity, instead of refining the incumbent packing. A positive local result still needs global and all-size admission.", + "allowed_variations": [ + "One correction factorization, one chronological cut, or one explicit hosting obstruction.", + "A changed correction schedule with an updated full bill and native frame contract." + ], + "scope_change_triggers": [ + "Recompiling the already certified low-rank channel without closing a new obligation.", + "Treating a pending ancestor, local histogram or unpriced side correction as an admitted global supplier." + ], + "overlap_terms": [ + "P104", + "I-G/2", + "side correction", + "native channel", + "1972", + "1991" + ] + }, + "scope_status": "changed", + "actual_scope": "Exact minimum dimension-gap cost for 0..104 integral flows in PR #2163's optimistic P104 single-cut nested-contact graph at cut 2429; source-bound primal/dual certificate and conditional budget arithmetic.", + "scope_change_reason": "Take Discussion #2164's released first handoff. Price a necessary communication relaxation before attempting a side-correction word; this does not meet the original constructive admission gate.", + "bottleneck_link": "The binding complex P104 route has a free nested-contact capacity result but an unpriced exchange. The sharp price shows what this fixed-cut relaxation would require a changed coverage contract to credit; it does not close arbitrary changed-path mechanisms.", + "budget_minutes": 60, + "stop_rule": "Stop after a primal/dual optimum or a concrete failure of the network model. Do not build a correction when the one-way relaxation already exceeds the inherited no-progress-credit slack. Reserve final work for controls and handoff.", + "outcome": "completed", + "evidence": "CERTIFICATE.json: cost C(F)=9 max(0,F-8), F=0..104; cost 864 at 104, eight free paths and 96 price 9 paths. Independent acceptance checks conservation/capacity, dual gap 9 and penalty 72, and a Gaussian-elimination replay of 1427 layers/399680 unit edges. Seven test groups contain 15 rejecting controls. Conditional zero-saving moment 8523/7592 under unchanged idle obligations; no new kappa.", + "author": "commdata2338", + "ai_assistance": "Prepared for commdata2338 (@commdata2338), with substantial OpenAI Codex assistance in reasoning, implementation, verification and writing. Author-checked only; no independent human review or formal proof assistant.", + "open_questions": [ + { + "question": "Can a changed coverage contract credit the productive progress of one actual changed P104 path enough to pass its complete moment?", + "why_it_matters": "The fixed-cut one-way graph price864 exceeds the unchanged-obligation slack 328/9; frame nesting alone is not a cheap escape.", + "first_step": "Specify one changed trajectory and its exact owner/idle obligation changes, then evaluate a favorable fully charged moment before synthesizing the word.", + "blocked_by": "No such ownership/coverage identity or dirty-restored schedule is supplied; flow paths are not scalar circuits." + }, + { + "question": "Does a simultaneous paid-contact model at several explicitly chosen cuts have a materially lower exact price?", + "why_it_matters": "The present theorem fixes cut 2429 and does not constrain changed timing of added contacts.", + "first_step": "State the changed cut set and contact-capacity semantics, check current overlap, then apply the same primal/dual screen and stop if its favorable price already fails the intended budget.", + "blocked_by": "A useful changed contract and priced restoration must be specified; another free max-flow result would not establish admission." + } + ], + "selection": { + "nonce": "be616f53ab8ef692b99a0c2327f181ad", + "track": "complex-mechanisms", + "scope_key": "c5367b1a1b7bed20db53", + "handoff": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2164", + "choice": "Suggested p104-side-correction, refined to the released minimum-cost handoff; helper-inventory and rank-shape suggestions passed over for this concrete bounded question." + }, + "predecessors": [ + { + "pr": 2163, + "head": "9f6e1f2783aef0c52bb3f26f587a918a8be32fa9", + "author": "Michael Yee", + "role": "Temporal network definition, free nested-contact sensitivity and min-cost handoff; consulted but not imported or used as acceptance oracle." + }, + { + "pr": 1972, + "head": "fd82d172f46933fd253c2c6de4bd5eaff5429cfd", + "author": "Rohan Arun", + "role": "Immutable scalar/frame witness, retained on main by PR1991." + }, + { + "pr": 1991, + "head": "6e222517e182e98499239bc9a4009f540e1c5520", + "author": "Chafik Boukhalfa", + "role": "Native realization and retained witness; native proof inherited." + }, + { + "pr": 2082, + "head": "60f4e337ffba470e09727dd435b1f1be3b67d03d", + "author": "David Arias", + "role": "Temporal cut and conditional budget predecessor." + }, + { + "pr": 2090, + "head": "dff116efc2c4ddd7236020ad8316db5c98aa693e", + "author": "Adam Gall", + "role": "Eight-query cut at2429." + }, + { + "pr": 2113, + "head": "fa1a45f91c14bb4b372d19dd7d66e11fea480ef5", + "author": "Jeremy Diviney", + "role": "Retiming cut; different domain." + }, + { + "pr": 2127, + "head": "befebf0f4ae7a3f69fe9c5e136262559dcac125f", + "author": "Ross Richardson", + "role": "Added-storage floor; different domain." + }, + { + "pr": 2136, + "head": "9b8689e0153e038b2c1179b06026adfaa7f7593b", + "author": "Tairitsu-Aya", + "role": "Nested refinements; different domain." + }, + { + "pr": 2148, + "head": "937b132f3f143ce0f2621b3b12e1ebc413e66730", + "author": "Nick Petalas", + "role": "Refinement budget; different domain." + } + ], + "upstream_checkpoint": { + "utc": "2026-10-14T21:53:44Z", + "commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "priority_revision": 4, + "selected_record_sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32", + "changes": "No changes to canonical main since the initial base; guidance, selected record and witness unchanged. Continue the frozen experiment." + }, + "coordination": { + "claim": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2164#discussioncomment-18934634", + "separate_formal_handoff": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2164#discussioncomment-18934656", + "overlap_coverage": { + "open_prs_utc": "2026-10-14T21:48:46.733255+00:00", + "open_prs": 417, + "discussions_utc": "2026-10-14T21:51:47.765589+00:00", + "discussions": 849, + "complete_pagination": true + }, + "scope": "The separate formal transcript-capacity handoff does not price this graph; no overlap in theorem or implementation." + } +} diff --git a/research/p104-single-cut-price/VERIFY.json b/research/p104-single-cut-price/VERIFY.json new file mode 100644 index 0000000000..f5d7b64ef7 --- /dev/null +++ b/research/p104-single-cut-price/VERIFY.json @@ -0,0 +1,42 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/p104-native-channel/inputs/LOWRANK-WITNESS.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Source-bound primal/dual certificate, every flow value 0..104, expanded 1427-layer dual and conditional budget arithmetic." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/test_verify.py" + ], + "timeout_seconds": 120, + "checks": "Seven semantic test groups, 15 rejecting controls and positive equivalent-basis/residual-rerouting checks." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/test_verify.py" + ], + "timeout_seconds": 120, + "checks": "The same semantic controls with Python assertions disabled." + } + ] +} diff --git a/research/p104-single-cut-price/model.py b/research/p104-single-cut-price/model.py new file mode 100644 index 0000000000..fd05d1d677 --- /dev/null +++ b/research/p104-single-cut-price/model.py @@ -0,0 +1,196 @@ +"""Exact frame-class compression of the PR2163 temporal communication model. + +Prepared for commdata2338 with substantial OpenAI Codex assistance. +Apache-2.0. The temporal model and cut are credited to Michael Yee/PR2163 +and its P104 cut predecessors. This implementation uses only the PR1972 witness. +""" +from collections import Counter +from fractions import Fraction +from functools import lru_cache +import hashlib +import json +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[2] +SOURCE = "research/p104-native-channel/inputs/LOWRANK-WITNESS.json" +SOURCE_HASH = "0f541bef7f19fdeffd67157684e9f03d785f42c89973632f508fc1a0452b580e" +CUT = 2429 +LIMIT = 104 + + +class Invalid(ValueError): + pass + + +def need(ok, why): + if not ok: + raise Invalid(why) + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(",", ":")).encode() + + +def digest(value): + return hashlib.sha256(canonical(value)).hexdigest() + + +def load_source(path=None): + data = (Path(path) if path else ROOT / SOURCE).read_bytes() + need(hashlib.sha256(data).hexdigest() == SOURCE_HASH, "source hash") + return json.loads(data) + + +@lru_cache(None) +def span(vectors): + """All 512 possible vectors are explicit bits; no basis convention needed.""" + members = {0} + for v in vectors: + need(type(v) is int and 0 <= v < 512, "frame vector") + members |= {x ^ v for x in members} + return sum(1 << x for x in members) + + +def dimension(frame): + n = frame.bit_count() + need(n > 0 and n & (n - 1) == 0, "subspace cardinality") + return n.bit_length() - 1 + + +def nested(a, b): + return a & b in (a, b) + + +class Graph: + def __init__(self): + self.labels = ["source", "sink"] + self.edges = [] + self.cut_nodes = {} + self.facts = {} + + def node(self, cut, frame, count): + self.labels.append([cut, hex(frame), count]) + return len(self.labels) - 1 + + def edge(self, u, v, capacity, cost=0, kind="carry"): + if capacity: + self.edges.append([u, v, capacity, cost, kind]) + + def fingerprint(self): + return digest([self.labels, self.edges]) + + +def build(w, paid=True, cut=CUT): + """Contract unchanged frame-class chains; retain every membership event. + + Hubs have NO extra throughput constraint at the paid cut, exactly as in + PR2163's nested_layers relaxation. All 104 flows may use a hub as transit. + This explicitly optimistic graph does not model dirty-state restoration. + """ + initial = w["initial_frames"] + final = w["final_frames"] + expected = {f"{f}{i}" for f, n in (("X", 104), ("Y", 104), + ("G", 32), ("D", 32), ("Q", 8)) for i in range(n)} + need(set(initial) == set(final) == expected, "register inventory") + need(type(cut) is int and 0 <= cut <= len(w["program"]), "cut range") + state = {r: span(tuple(v)) for r, v in initial.items()} + counts = Counter(state.values()) + graph = Graph() + hubs = {f: graph.node(0, f, counts[f]) for f in sorted(counts)} + source_counts = Counter(f for r, f in state.items() if r.startswith("X")) + for f in sorted(source_counts): + graph.edge(0, hubs[f], source_counts[f], kind="source") + kinds = Counter() + rank_profile = Counter() + births = 0 + + def contact(): + graph.cut_nodes = {hex(f): hubs[f] for f in sorted(hubs)} + graph.facts["cut_classes"] = [[hex(f), dimension(f), counts[f]] + for f in sorted(hubs)] + if paid: + fs = sorted(hubs) + for i, a in enumerate(fs): + for b in fs[i + 1:]: + if nested(a, b): + gap = abs(dimension(a) - dimension(b)) + need(gap > 0, "distinct nested dimensions") + graph.edge(hubs[a], hubs[b], LIMIT, gap, "paid") + graph.edge(hubs[b], hubs[a], LIMIT, gap, "paid") + + for index, event in enumerate(w["program"]): + if index == cut: + contact() + kind = event[0] + kinds[kind] += 1 + if kind in ("add", "copy"): + need(len(event) == (5 if kind == "add" else 4), "scalar arity") + dst, src = event[1:3] + need(dst != src and dst in state and src in state, "scalar liveness") + f = span(tuple(event[-1])) + need(state[dst] == state[src] == f, "common frame") + if kind == "add": + need(Fraction(event[3]) != 0, "zero ADD") + continue + if kind == "transport": + need(len(event) == 5, "transport arity") + r, a, b, rank = event[1], span(tuple(event[2])), span(tuple(event[3])), event[4] + need(r in state and state[r] == a, "transport source") + need(nested(a, b), "nonnested transport") + need(type(rank) is int and rank == abs(dimension(a) - dimension(b)) > 0, + "transport rank") + old_a, old_b = hubs[a], hubs.get(b) + na, nb = counts[a], counts[b] + new_b = graph.node(index + 1, b, nb + 1) + graph.edge(old_a, new_b, 1, kind="transport") + if nb: + graph.edge(old_b, new_b, nb) + if na > 1: + new_a = graph.node(index + 1, a, na - 1) + graph.edge(old_a, new_a, na - 1) + hubs[a] = new_a + else: + del hubs[a] + hubs[b] = new_b + counts[a] -= 1 + counts[b] += 1 + state[r] = b + rank_profile[rank] += 1 + elif kind == "zero": + need(len(event) == 3 and event[1] == "C" and "C" not in state, "private birth") + f = span(tuple(event[2])) + new = graph.node(index + 1, f, counts[f] + 1) + if counts[f]: + graph.edge(hubs[f], new, counts[f]) + hubs[f] = new + counts[f] += 1 + state["C"] = f + births += 1 + elif kind == "erase": + need(len(event) == 3 and event[1] == "C" and "C" in state, "private erase") + f = span(tuple(event[2])) + need(state["C"] == f, "erase frame") + if counts[f] > 1: + new = graph.node(index + 1, f, counts[f] - 1) + graph.edge(hubs[f], new, counts[f] - 1) + hubs[f] = new + else: + del hubs[f] + counts[f] -= 1 + del state["C"] + else: + raise Invalid("unknown event") + if cut == len(w["program"]): + contact() + need(state == {r: span(tuple(v)) for r, v in final.items()}, "final frames") + target_counts = Counter(f for r, f in state.items() if r.startswith("Y")) + for f in sorted(target_counts): + graph.edge(hubs[f], 1, target_counts[f], kind="sink") + graph.facts.update({"cut": cut, "events": len(w["program"]), + "event_kinds": dict(sorted(kinds.items())), + "private_lifetimes": births, + "transport_profile": {str(r): n for r, n in sorted(rank_profile.items())}, + "original_rank_mass": sum(r * n for r, n in rank_profile.items()), + "nodes": len(graph.labels), "edges": len(graph.edges), + "paid_edges": sum(e[4] == "paid" for e in graph.edges)}) + return graph diff --git a/research/p104-single-cut-price/solve.py b/research/p104-single-cut-price/solve.py new file mode 100644 index 0000000000..487a8e6826 --- /dev/null +++ b/research/p104-single-cut-price/solve.py @@ -0,0 +1,95 @@ +"""Optional exact min-cost optimizer; acceptance uses a separate certificate check. + +Prepared for commdata2338 with substantial OpenAI Codex assistance. Apache-2.0. +""" +import argparse +import heapq +import importlib.util +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +spec = importlib.util.spec_from_file_location("p104_price_model", HERE / "model.py") +model = importlib.util.module_from_spec(spec) +spec.loader.exec_module(model) + + +def optimize(graph, requested=104): + n = len(graph.labels) + adj = [[] for _ in range(n)] + capacity, target, costs = [], [], [] + for u, v, cap, price, _ in graph.edges: + a = len(target) + adj[u].append(a) + adj[v].append(a + 1) + target.extend((v, u)) + capacity.extend((cap, 0)) + costs.extend((price, -price)) + potential = [0] * n + value = cost = 0 + frontier = [[0, 0]] + while value < requested: + dist = [None] * n + prev = [-1] * n + dist[0] = 0 + queue = [(0, 0)] + while queue: + du, u = heapq.heappop(queue) + if dist[u] != du: + continue + for a in adj[u]: + if not capacity[a]: + continue + v = target[a] + rc = costs[a] + potential[u] - potential[v] + model.need(rc >= 0, "optimizer reduced cost") + dv = du + rc + if dist[v] is None or dv < dist[v]: + dist[v] = dv + prev[v] = a + heapq.heappush(queue, (dv, v)) + if dist[1] is None: + break + far = max(x for x in dist if x is not None) + potential = [p + (far if d is None else d) for p, d in zip(potential, dist)] + u = 1 + amount = requested - value + path = [] + while u: + a = prev[u] + model.need(a >= 0, "optimizer predecessor") + path.append(a) + amount = min(amount, capacity[a]) + u = target[a ^ 1] + unit_cost = sum(costs[a] for a in path) + for a in path: + capacity[a] -= amount + capacity[a ^ 1] += amount + for _ in range(amount): + value += 1 + cost += unit_cost + frontier.append([value, cost]) + flow = [e[2] - capacity[2 * i] for i, e in enumerate(graph.edges)] + return {"value": value, "cost": cost, "flow": flow, "potential": potential, + "frontier": frontier, "graph_sha256": graph.fingerprint()} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--write", type=Path, required=True, help="new certificate path; refuses overwrite") + args = parser.parse_args() + w = model.load_source() + graph = model.build(w) + solution = optimize(graph) + baseline = optimize(model.build(w, paid=False)) + result = {"schema_version": 1, "source_sha256": model.SOURCE_HASH, + "facts": graph.facts, "baseline": baseline, "paid": solution} + with args.write.open("x") as f: + json.dump(result, f, sort_keys=True, separators=(",", ":")) + f.write("\n") + print(f"GENERATED_P104_SINGLE_CUT_PRICE flow={solution['value']} cost={solution['cost']} " + f"baseline={baseline['value']} nodes={len(graph.labels)} edges={len(graph.edges)}") + + +if __name__ == "__main__": + main() diff --git a/research/p104-single-cut-price/test_verify.py b/research/p104-single-cut-price/test_verify.py new file mode 100644 index 0000000000..b61646c359 --- /dev/null +++ b/research/p104-single-cut-price/test_verify.py @@ -0,0 +1,153 @@ +#!/usr/bin/env python3 +"""Semantic controls for the P104 price certificate. Apache-2.0.""" +import copy +import importlib.util +import json +from pathlib import Path +import subprocess +import sys +import tempfile +import unittest + +HERE = Path(__file__).resolve().parent +spec = importlib.util.spec_from_file_location("price_verify", HERE / "verify.py") +v = importlib.util.module_from_spec(spec) +spec.loader.exec_module(v) + + +class PriceControls(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.w = v.model.load_source() + cls.graph = v.model.build(cls.w) + cls.saved = json.loads((HERE / "CERTIFICATE.json").read_text()) + + def test_positive_and_expanded_oracle(self): + result = v.verify() + self.assertEqual(result["cost"], 864) + self.assertEqual(result["expanded"]["layers"], 1427) + self.assertEqual(result["expanded"]["register_unit_edges"], 399680) + self.assertEqual(result["expanded"]["capacity_penalty"], 72) + + def test_capacity_conservation_cost_and_type(self): + graph = self.graph + source_edge = next(i for i, e in enumerate(graph.edges) if e[4] == "source") + paid_edge = next(i for i, (e, f) in enumerate(zip(graph.edges, self.saved["paid"]["flow"])) + if e[4] == "paid" and f) + cases = [] + c = copy.deepcopy(self.saved["paid"]) + c["flow"][source_edge] = graph.edges[source_edge][2] + 1 + cases.append((c, "flow capacity")) + c = copy.deepcopy(self.saved["paid"]) + c["flow"][paid_edge] -= 1 + cases.append((c, "flow conservation")) + c = copy.deepcopy(self.saved["paid"]) + c["cost"] -= 1 + cases.append((c, "stated cost")) + c = copy.deepcopy(self.saved["paid"]) + c["flow"][source_edge] = True + cases.append((c, "integer certificate")) + for c, message in cases: + with self.subTest(message=message), self.assertRaisesRegex(v.Invalid, message): + v.certificate(graph, c) + + def test_dual_and_unpriced_contact(self): + c = copy.deepcopy(self.saved["paid"]) + c["potential"][self.graph.cut_nodes["0x1"]] += 1 + with self.assertRaisesRegex(v.Invalid, "reduced cost"): + v.certificate(self.graph, c) + graph = copy.deepcopy(self.graph) + i = next(i for i, (e, f) in enumerate(zip(graph.edges, c["flow"])) if e[4] == "paid" and f) + graph.edges[i][3] -= 1 + c = copy.deepcopy(self.saved["paid"]) + c["graph_sha256"] = graph.fingerprint() # Bypass hashing: test mathematical rejection. + c["cost"] -= c["flow"][i] + with self.assertRaisesRegex(v.Invalid, "forward reduced cost"): + v.certificate(graph, c) + p = self.saved["paid"]["potential"].copy() + p[self.graph.cut_nodes["0x1"]] += 1 + with self.assertRaisesRegex(v.Invalid, "expanded paid arc"): + v.expanded_dual(self.w, self.graph, p) + + def test_maximality_and_cut_binding(self): + # Removing all flows still gives a feasible, zero-cost min-cost flow of + # value zero; it must not be accepted as the baseline maximum. + graph = v.model.build(self.w, paid=False) + c = copy.deepcopy(self.saved["baseline"]) + c["flow"] = [0] * len(graph.edges) + c["value"] = 0 + with self.assertRaisesRegex(v.Invalid, "flow is not maximum"): + v.certificate(graph, c) + moved = v.model.build(self.w, cut=2430) + with self.assertRaisesRegex(v.Invalid, "graph binding"): + v.certificate(moved, self.saved["paid"]) + + def test_frame_legality_and_equivalent_bases(self): + rank_bad = copy.deepcopy(self.w) + event = next(e for e in rank_bad["program"] if e[0] == "transport") + event[4] += 1 + with self.assertRaisesRegex(v.Invalid, "transport rank"): + v.model.build(rank_bad) + nonnested = copy.deepcopy(self.w) + event = next(e for e in nonnested["program"] if e[0] == "transport" and e[2]) + a = v.model.span(tuple(event[2])) + event[3] = [next(x for x in range(1, 512) if not (a >> x & 1))] + with self.assertRaisesRegex(v.Invalid, "nonnested transport"): + v.model.build(nonnested) + wrong_add = copy.deepcopy(self.w) + event = next(e for e in wrong_add["program"] if e[0] == "add") + event[-1] = [1] if not event[-1] else [] + with self.assertRaisesRegex(v.Invalid, "common frame"): + v.model.build(wrong_add) + equivalent = copy.deepcopy(self.w) + frames = list(equivalent["initial_frames"].values()) + list(equivalent["final_frames"].values()) + for e in equivalent["program"]: + frames += [e[2], e[3]] if e[0] == "transport" else [e[-1]] + for f in frames: + f.reverse() + if f: + f.append(f[0]) + graph = v.model.build(equivalent) + self.assertEqual(graph.fingerprint(), self.graph.fingerprint()) + self.assertEqual(v.expanded_dual(equivalent, graph, self.saved["paid"]["potential"]) + ["capacity_penalty"], 72) + + def test_source_and_receipt_corruption(self): + with tempfile.TemporaryDirectory() as temp: + path = Path(temp) / "source.json" + path.write_bytes((v.model.ROOT / v.model.SOURCE).read_bytes() + b"\n") + with self.assertRaisesRegex(v.Invalid, "source hash"): + v.model.load_source(path) + path = Path(temp) / "receipt.json" + c = copy.deepcopy(self.saved) + c["paid"]["frontier"][9][1] = 8 + path.write_text(json.dumps(c)) + with self.assertRaisesRegex(v.Invalid, "frontier receipt"): + v.verify(path) + + def test_optimizer_rerouting_and_no_overwrite(self): + spec = importlib.util.spec_from_file_location("price_solve", HERE / "solve.py") + solver = importlib.util.module_from_spec(spec) + spec.loader.exec_module(solver) + g = v.model.Graph() + for i in range(4): + g.node(i, 1, 1) + # Greedy first path costs 0; a residual cancellation is needed to reach + # optimum 2 instead of committing to the second path of cost 100. + for u, target, cost in [(0, 2, 0), (0, 3, 0), (2, 4, 0), (2, 5, 1), + (3, 4, 1), (3, 5, 100), (4, 1, 0), (5, 1, 0)]: + g.edge(u, target, 1, cost) + solved = solver.optimize(g, requested=2) + self.assertEqual((solved["value"], solved["cost"]), (2, 2)) + v.certificate(g, solved) + with tempfile.TemporaryDirectory() as temp: + path = Path(temp) / "existing.json" + path.write_text("preserve me") + run = subprocess.run([sys.executable, "-I", "-B", str(HERE / "solve.py"), + "--write", str(path)], capture_output=True, text=True) + self.assertNotEqual(run.returncode, 0) + self.assertEqual(path.read_text(), "preserve me") + + +if __name__ == "__main__": + unittest.main() diff --git a/research/p104-single-cut-price/verify.py b/research/p104-single-cut-price/verify.py new file mode 100644 index 0000000000..34fa453178 --- /dev/null +++ b/research/p104-single-cut-price/verify.py @@ -0,0 +1,285 @@ +#!/usr/bin/env python3 +"""Check a source-bound primal/dual certificate without running the optimizer. + +Prepared for commdata2338 (@commdata2338), with substantial OpenAI Codex assistance. +Apache-2.0. This is a finite communication relaxation, not a circuit certificate. +""" +from collections import Counter, defaultdict, deque +from functools import lru_cache +from fractions import Fraction +import argparse +import importlib.util +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +spec = importlib.util.spec_from_file_location("p104_price_model", HERE / "model.py") +model = importlib.util.module_from_spec(spec) +spec.loader.exec_module(model) +need, Invalid = model.need, model.Invalid + + +def certificate(graph, solution): + """Ordinary flow conservation and LP weak duality, independently of solve.py.""" + need(set(solution) == {"value", "cost", "flow", "potential", "frontier", "graph_sha256"}, + "certificate fields") + need(solution["graph_sha256"] == graph.fingerprint(), "graph binding") + flow, potential = solution["flow"], solution["potential"] + need(len(flow) == len(graph.edges) and len(potential) == len(graph.labels), "certificate lengths") + need(all(type(x) is int for x in flow + potential), "integer certificate") + value, stated_cost = solution["value"], solution["cost"] + need(type(value) is type(stated_cost) is int, "integer value/cost") + balance = [0] * len(graph.labels) + residual = [[] for _ in graph.labels] + nonpaid_in = [0] * len(graph.labels) + nonpaid_out = [0] * len(graph.labels) + cost = penalty = 0 + negative = [] + for i, ((u, v, cap, price, kind), f) in enumerate(zip(graph.edges, flow)): + need(0 <= f <= cap, "flow capacity") + balance[u] -= f + balance[v] += f + cost += f * price + reduced = price + potential[u] - potential[v] + if f < cap: + need(reduced >= 0, "forward reduced cost") + residual[u].append(v) + if f: + need(reduced <= 0, "reverse reduced cost") + residual[v].append(u) + penalty += cap * max(0, -reduced) + if reduced < 0: + negative.append([i, cap, -reduced]) + if kind != "paid": + nonpaid_out[u] += f + nonpaid_in[v] += f + need(balance[:2] == [-value, value] and not any(balance[2:]), "flow conservation") + need(cost == stated_cost, "stated cost") + gap = potential[1] - potential[0] + need(value * gap - penalty == cost, "primal/dual equality") + # These are the pre/post-cut occupancy bounds in the lifting proof. + for v, label in enumerate(graph.labels[2:], 2): + need(nonpaid_in[v] <= label[2] and nonpaid_out[v] <= label[2], "frame-class occupancy") + reached = {0} + queue = deque([0]) + while queue: + for v in residual[queue.popleft()]: + if v not in reached: + reached.add(v) + queue.append(v) + need(1 not in reached, "flow is not maximum") + return {"value": value, "cost": cost, "dual_gap": gap, + "capacity_penalty": penalty, "negative_arcs": negative} + + +def path_prices(graph, solution): + """Extract integral paths, proving feasible upper bounds for every flow size.""" + left = solution["flow"].copy() + adjacency = [[] for _ in graph.labels] + for i, e in enumerate(graph.edges): + adjacency[e[0]].append(i) + prices = [] + for _ in range(solution["value"]): + parent = {0: None} + queue = deque([0]) + while queue and 1 not in parent: + for i in adjacency[queue.popleft()]: + v = graph.edges[i][1] + if left[i] and v not in parent: + parent[v] = i + queue.append(v) + need(1 in parent, "path decomposition") + v, price = 1, 0 + while v: + i = parent[v] + left[i] -= 1 + price += graph.edges[i][3] + v = graph.edges[i][0] + prices.append(price) + need(not any(left), "unreported flow circulation") + return sorted(prices) + + +@lru_cache(None) +def basis(vectors): + """Independent Gaussian-elimination frame oracle (model.py enumerates spans).""" + rows = [0] * 9 + for v in vectors: + need(type(v) is int and 0 <= v < 512, "reference frame vector") + while v: + i = v.bit_length() - 1 + if rows[i]: + v ^= rows[i] + else: + rows[i] = v + break + for i in range(9): + if rows[i]: + for j in range(i + 1, 9): + if rows[j] >> i & 1: + rows[j] ^= rows[i] + return tuple(v for v in rows if v) + + +@lru_cache(None) +def frame_key(b): + values = [0] + for v in b: + values += [x ^ v for x in values] + return hex(sum(1 << x for x in values)) + + +def expanded_dual(w, graph, potentials): + """Lift the potential to PR2163's full per-register, per-layer network. + + No compressed edge list is used. Rebuild all 1427 frame/liveness layers + with Gaussian elimination, then check the potentials on every unit edge. + Hub/entry/exit arcs have zero reduced cost by construction; source/sink + and nested arcs are explicitly checked. This gives a separate lower-bound + check directly on the uncompressed model. + """ + labels = defaultdict(dict) + for i, label in enumerate(graph.labels[2:], 2): + c, key, _ = label + need(key not in labels[c], "duplicate class epoch") + labels[c][key] = potentials[i] + current = dict(labels[0]) + state = {r: basis(tuple(f)) for r, f in w["initial_frames"].items()} + private = None + births = 0 + penalty = 0 + negative = [] + units = len(state) + layers = 1 + for r, b in state.items(): + if r.startswith("X"): + need(current[frame_key(b)] <= potentials[0], "expanded source arc") + + def paid_arcs(): + fs = sorted(set(state.values())) + count = 0 + for i, a in enumerate(fs): + for b in fs[i + 1:]: + joined = basis(a + b) + if joined in (a, b): + gap = abs(len(a) - len(b)) + pa, pb = current[frame_key(a)], current[frame_key(b)] + need(gap >= abs(pa - pb), "expanded paid arc") + count += 2 + return count + + checked_paid = None + for index, e in enumerate(w["program"]): + if index == model.CUT: + checked_paid = paid_arcs() + kind = e[0] + if kind in ("add", "copy"): + dst = private if e[1] == "C" else e[1] + src = private if e[2] == "C" else e[2] + need(state[dst] == state[src] == basis(tuple(e[-1])), "reference common frame") + continue + previous = state.copy() + old_potential = current.copy() + if kind == "transport": + r = private if e[1] == "C" else e[1] + a, b = basis(tuple(e[2])), basis(tuple(e[3])) + need(state[r] == a and basis(a + b) in (a, b), "reference transport") + need(e[4] == abs(len(a) - len(b)), "reference rank") + state[r] = b + elif kind == "zero": + need(private is None, "reference lifetime birth") + private = f"C#{births}" + births += 1 + state[private] = basis(tuple(e[2])) + elif kind == "erase": + need(private in state and state[private] == basis(tuple(e[2])), "reference lifetime end") + del state[private] + private = None + else: + raise Invalid("reference event") + current.update(labels[index + 1]) + for r, b in state.items(): + key = frame_key(b) + need(key in current, "missing class potential") + if r in previous: + change = current[key] - old_potential[frame_key(previous[r])] + if change > 0: + penalty += change + negative.append([index + 1, r, change]) + units += len(state) + layers += 1 + for r, b in state.items(): + need(b == basis(tuple(w["final_frames"][r])), "reference final frames") + if r.startswith("Y"): + need(current[frame_key(b)] >= potentials[1], "expanded sink arc") + need(checked_paid == graph.facts["paid_edges"], "expanded paid edge inventory") + return {"layers": layers, "register_unit_edges": units + 104, + "paid_arcs": checked_paid, "capacity_penalty": penalty, + "negative_unit_edges": negative} + + +def verify(path=None, source=None): + w = model.load_source(source) + graph = model.build(w) + saved = json.loads((Path(path) if path else HERE / "CERTIFICATE.json").read_text()) + need(set(saved) == {"schema_version", "source_sha256", "facts", "baseline", "paid"}, "receipt fields") + need(type(saved["schema_version"]) is int and saved["schema_version"] == 1, "schema") + need(saved["source_sha256"] == model.SOURCE_HASH, "receipt source") + need(model.canonical(saved["facts"]) == model.canonical(graph.facts), "receipt facts") + baseline_graph = model.build(w, paid=False) + baseline = certificate(baseline_graph, saved["baseline"]) + paid = certificate(graph, saved["paid"]) + prices = path_prices(graph, saved["paid"]) + frontier = [[0, 0]] + cost = 0 + for f, price in enumerate(prices, 1): + cost += price + need(cost == max(0, paid["dual_gap"] * f - paid["capacity_penalty"]), "frontier duality") + frontier.append([f, cost]) + need(model.canonical(frontier) == model.canonical(saved["paid"]["frontier"]), "frontier receipt") + base_prices = path_prices(baseline_graph, saved["baseline"]) + need(base_prices == [0] * 8 and model.canonical(saved["baseline"]["frontier"]) + == model.canonical([[f, 0] for f in range(9)]), + "baseline frontier") + full = expanded_dual(w, graph, saved["paid"]["potential"]) + need(full["capacity_penalty"] == paid["capacity_penalty"], "expanded dual penalty") + need((baseline["value"], paid["value"], paid["cost"], paid["dual_gap"], paid["capacity_penalty"]) + == (8, 104, 864, 9, 72), "result differs") + need(Counter(prices) == {0: 8, 9: 96}, "path price histogram") + # Only this arithmetic is checked: the coverage contract is inherited. + boundary = sum(abs(len(basis(tuple(w["final_frames"][r]))) + - len(basis(tuple(w["initial_frames"][r])))) + for r in w["initial_frames"]) + mass = graph.facts["original_rank_mass"] + idle = 72 * 832 - 9 * boundary + capacity = 73 * 832 + slack = Fraction(capacity - 9 * mass - idle, 9) + moment = Fraction(9 * (mass + paid["cost"]) + idle, capacity) + need((boundary, mass, idle, slack, moment) + == (2312, 2368, 39096, Fraction(328, 9), Fraction(8523, 7592)), "budget arithmetic") + return {"status": "PASS_P104_SINGLE_CUT_PRICE", "cut": model.CUT, + "baseline": baseline["value"], "flow": paid["value"], "cost": paid["cost"], + "dual_gap": paid["dual_gap"], "capacity_penalty": paid["capacity_penalty"], + "path_prices": dict(sorted(Counter(prices).items())), + "graph_sha256": graph.fingerprint(), "expanded": full, + "conditional_budget": {"boundary": boundary, "original_rank_mass": mass, + "idle": idle, "slack": str(slack), "moment_at_zero": str(moment), + "credit_to_reach_equality": str(paid["cost"] - slack)}} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--certificate", type=Path) + parser.add_argument("--source", type=Path) + parser.add_argument("--json", action="store_true") + args = parser.parse_args() + result = verify(args.certificate, args.source) + if args.json: + print(json.dumps(result, indent=2, sort_keys=True)) + else: + print("PASS_P104_SINGLE_CUT_PRICE cut=2429 flow=104 cost=864 baseline=8 " + "dual=9*flow-72 frontier=0..104 no_new_kappa") + + +if __name__ == "__main__": + main()