diff --git a/research/selected-k8-unrestricted-ends/DISCOVERY.json b/research/selected-k8-unrestricted-ends/DISCOVERY.json new file mode 100644 index 0000000000..1cf0950849 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/DISCOVERY.json @@ -0,0 +1,1462 @@ +{ + "versions": { + "highspy": "1.15.1", + "numpy": "2.5.4", + "scipy": "1.18.1", + "python": "3.12.3" + }, + "components": [ + { + "first": [ + "E", + 273 + ], + "nodes": 2134, + "rows": 97705, + "columns": 387989, + "fractional_columns": 0, + "numeric_objective": 10543.236464905558 + }, + { + "first": [ + "E", + 311 + ], + "nodes": 23, + "rows": 350, + "columns": 524, + "fractional_columns": 0, + "numeric_objective": 204.21695383497496 + }, + { + "first": [ + "E", + 500 + ], + "nodes": 9, + "rows": 72, + "columns": 81, + "fractional_columns": 0, + "numeric_objective": 102.10847691748745 + }, + { + "first": [ + "E", + 501 + ], + "nodes": 9, + "rows": 72, + "columns": 81, + "fractional_columns": 0, + "numeric_objective": 102.10847691748745 + }, + { + "first": [ + "G", + 616 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 758 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 900 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1042 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1184 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1266 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1270 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1274 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1278 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1420 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1424 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1428 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1432 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1574 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1578 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1582 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1586 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1728 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1732 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1736 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1740 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1882 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1886 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1890 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 1894 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2036 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2040 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2044 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2048 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2190 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2194 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2198 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2202 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2344 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2348 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2352 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2356 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2498 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2502 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2506 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2510 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2652 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2656 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2660 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2664 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2806 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2810 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2814 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2818 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2960 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2964 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2968 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 2972 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 3005 + ], + "nodes": 90, + "rows": 1514, + "columns": 2224, + "fractional_columns": 0, + "numeric_objective": 119.00453098089815 + }, + { + "first": [ + "G", + 3114 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 3118 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 3122 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 3126 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 3159 + ], + "nodes": 90, + "rows": 1514, + "columns": 2224, + "fractional_columns": 0, + "numeric_objective": 119.00453098089815 + }, + { + "first": [ + "G", + 3268 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 3272 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 3276 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 3280 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 3313 + ], + "nodes": 90, + "rows": 1514, + "columns": 2224, + "fractional_columns": 0, + "numeric_objective": 119.00453098089815 + }, + { + "first": [ + "G", + 3978 + ], + "nodes": 21, + "rows": 141, + "columns": 132, + "fractional_columns": 0, + "numeric_objective": 255.41699679873673 + }, + { + "first": [ + "G", + 4062 + ], + "nodes": 21, + "rows": 141, + "columns": 132, + "fractional_columns": 0, + "numeric_objective": 255.41699679873673 + }, + { + "first": [ + "G", + 4083 + ], + "nodes": 21, + "rows": 141, + "columns": 132, + "fractional_columns": 0, + "numeric_objective": 255.41699679873673 + }, + { + "first": [ + "G", + 4104 + ], + "nodes": 21, + "rows": 141, + "columns": 132, + "fractional_columns": 0, + "numeric_objective": 255.41699679873673 + }, + { + "first": [ + "G", + 4125 + ], + "nodes": 21, + "rows": 141, + "columns": 132, + "fractional_columns": 0, + "numeric_objective": 255.41699679873673 + }, + { + "first": [ + "G", + 4683 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4686 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4689 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4692 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4695 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4698 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4701 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4704 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4707 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4710 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4713 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4716 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4719 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4722 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4725 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4728 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4731 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4734 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4737 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4740 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4743 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4746 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4749 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4752 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4755 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4758 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4761 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4764 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4767 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4770 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4773 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4776 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4779 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4782 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4785 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4788 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4791 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4794 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4797 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4800 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4803 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4806 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4809 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4812 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4815 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4818 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4821 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4824 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4827 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4830 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4833 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4836 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4839 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4842 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4845 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + }, + { + "first": [ + "G", + 4848 + ], + "nodes": 1, + "rows": 1, + "columns": 2, + "fractional_columns": 0, + "numeric_objective": 3.948086077223247 + } + ], + "complete_integral_candidate": true, + "symbolic_component_objective": { + "1": "1063", + "2": "446", + "3": "416", + "4": "142", + "5": "82", + "6": "0", + "7": "0", + "8": "0", + "9": "0" + }, + "candidate_profile": { + "1": 2400, + "2": 446, + "3": 416, + "4": 142, + "5": 82, + "8": 8 + }, + "changed_endpoints": [ + 574, + 575, + 580, + 581 + ], + "changed_gate_frames": 159, + "canonical_duals_sha256": "afdf3858f6862bcb386c4e5c0f21fde8f05aed038d90f87025fe6915fa66a653", + "solver_options": { + "presolve": "on", + "threads": 1, + "solver": "simplex" + } +} diff --git a/research/selected-k8-unrestricted-ends/DUALS.json.gz b/research/selected-k8-unrestricted-ends/DUALS.json.gz new file mode 100644 index 0000000000..a97ee5d425 Binary files /dev/null and b/research/selected-k8-unrestricted-ends/DUALS.json.gz differ diff --git a/research/selected-k8-unrestricted-ends/EXPECTED.json b/research/selected-k8-unrestricted-ends/EXPECTED.json new file mode 100644 index 0000000000..f9f734e425 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/EXPECTED.json @@ -0,0 +1,184 @@ +{ + "a_bracket": [ + "845099025151/500000000000000", + "1690198050303/1000000000000000" + ], + "all_assignment_idle_mass_interval": [ + 1440, + 1692 + ], + "all_assignment_local_mass_interval": [ + 5540, + 5792 + ], + "attaining_changed_ends": [ + 574, + 575, + 580, + 581 + ], + "bills": { + "1690198050303/1000000000000000": [ + "164831441711219711256809062548369701947902785692060484013862439/57896044618658097711785492504343953926634992332820282019728792003956564819968", + "329662883422439422513618125096739403895805571384120968027724915/115792089237316195423570985008687907853269984665640564039457584007913129639936" + ], + "35491136290869/20000000000000000": [ + "28366093828269560521727384830766206250226840555885609297121176345453932379/115792089237316195423570985008687907853269984665640564039457584007913129639936", + "221610108033355941575995193990360986329897191842856322633759190198858847/904625697166532776746648320380374280103671755200316906558262375061821325312" + ], + "845099025151/500000000000000": [ + "-817584525779388915848662239543911811389968483603640981013099/14474011154664524427946373126085988481658748083205070504932198000989141204992", + "-6540676206235111326789297916351294491119747868829127848104755/115792089237316195423570985008687907853269984665640564039457584007913129639936" + ] + }, + "ceiling_ratio_upper": "563399350101/563351369696", + "component_sizes": { + "1": 117, + "21": 5, + "2134": 1, + "23": 1, + "9": 2, + "90": 3 + }, + "domain_sizes": { + "16": 28, + "2": 1192, + "374": 80, + "5": 1365, + "67": 2 + }, + "duality": { + "columns": 396241, + "components": 129, + "distinct_reduced_vectors": 1463, + "positive": 296044, + "rows": 103563, + "zero": 100197 + }, + "duals_sha256": "afdf3858f6862bcb386c4e5c0f21fde8f05aed038d90f87025fe6915fa66a653", + "endpoint_intervals": [ + { + "choices": 374, + "count": 32, + "lower_dimension": 4, + "upper_dimension": 9 + }, + { + "choices": 5, + "count": 46, + "lower_dimension": 7, + "upper_dimension": 9 + } + ], + "forced_ends": [], + "free_ends": [ + 273, + 275, + 277, + 282, + 289, + 291, + 293, + 298, + 305, + 307, + 309, + 311, + 314, + 321, + 323, + 325, + 327, + 330, + 337, + 339, + 341, + 346, + 353, + 355, + 357, + 362, + 369, + 371, + 373, + 378, + 385, + 387, + 389, + 394, + 448, + 449, + 450, + 451, + 452, + 453, + 454, + 455, + 484, + 485, + 498, + 500, + 501, + 508, + 509, + 510, + 512, + 513, + 531, + 532, + 533, + 543, + 554, + 555, + 556, + 557, + 566, + 567, + 572, + 573, + 574, + 575, + 580, + 581, + 582, + 583, + 584, + 585, + 586, + 587, + 588, + 589, + 590, + 591 + ], + "free_gates": 2589, + "gates": 5413, + "graph": { + "cone_edges": 106, + "cone_helpers": 78, + "cones_sha256": "5546e8ad5d979e0eaf618a4adbb333a7ec6b3528ef71bbf659b05ba2e5fc0004", + "domains_sha256": "d4af047a50406102f73bb1e4826f417c75844e4d0155194bbd15899693341c06", + "edge_count": 10328, + "edges_sha256": "4f30b8c3c22b7e70bf48ce5398212512081acb7fed4a61ad67873bc032218e62", + "node_count": 6941, + "nodes_sha256": "4eb47e21725d21f8c23bc5491a576fd817c31c2403fc7bc3ff626ced5750b881" + }, + "idle_mass": 1650, + "kappa_cap": "1690198050303/1001690198050303", + "local_mass": 5582, + "primal_sha256": "b97620f4bb69848445abd3053994fca2a40ab2bf248b4505c67e098700d5966c", + "profile": { + "1": 2400, + "2": 446, + "3": 416, + "4": 142, + "5": 82, + "8": 8 + }, + "restricted_ends": 78, + "schema": "selected-k8-unrestricted-end-bound-v1", + "scope": "fixed scalar word and entrances; arbitrary terminal subspaces of formerly restricted helpers and all gate frames; full idle charge; no global supplier or new kappa", + "status": "PASS_SELECTED_K8_UNRESTRICTED_END_BOUND", + "target_a": "35491136290869/20000000000000000", + "word_sha256": "c2b294300760e1fd6eeab8c22c4d13e4633dca40e52cac8da0d68163a76e3ca8" +} diff --git a/research/selected-k8-unrestricted-ends/INPUTS.json b/research/selected-k8-unrestricted-ends/INPUTS.json new file mode 100644 index 0000000000..e3cecc5518 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/INPUTS.json @@ -0,0 +1,14 @@ +{ + "research/r480-owner-optimum/inputs/local/FULL-WORD.json.gz": "WORD.json.gz", + "research/gauge44-slots/construction/slots/SLOT-PINS-k8.json": "SLOT-PINS.json", + "research/complex-x4-frame-bound/model.py": "frame_model.py", + "research/complex-x4-frame-bound/gen_duals.py": "gen_duals.py", + "research/complex-x4-frame-bound/README.md": "FRAME-METHOD.md", + "research/complex-local-word-ceiling/ceiling.py": "ceiling.py", + "research/complex-local-word-ceiling/README.md": "CEILING.md", + "research/gauge44-slots/independent/audit_local.py": "audit_local.py", + "research/k8-rank7-composition/data/END-RECIPE.json": "END-RECIPE.json", + "research/k8-rank7-composition/construct.py": "construct.py", + "research/k8-rank7-composition/README.md": "END-WITNESS.md", + "research/selected1042-lineage-resolution98/README.md": "WORD-LINEAGE.md" +} diff --git a/research/selected-k8-unrestricted-ends/NOTICE.md b/research/selected-k8-unrestricted-ends/NOTICE.md new file mode 100644 index 0000000000..f368c52e4d --- /dev/null +++ b/research/selected-k8-unrestricted-ends/NOTICE.md @@ -0,0 +1,38 @@ +# Attribution and retained sources + +New work is by Gareth Davidson (@bitplane), with substantial OpenAI Codex +assistance in mathematics, implementation, checking and writing. Apache-2.0. +This is not independent human peer review or a formal multiplication proof. + +The new unrestricted-terminal model, exact checker, separate bitset/covector +checker, discovery code and controls adapt Gareth Davidson's PR1995, +mathematical commit 73e323159d65c974debb180189694fd59144da5f, published head +d47b4b656732f840c9b3252cad5a4efa20924b71. That predecessor permits only nested +endpoint contractions. It in turn adapts PR1671's fixed-end selected-word +certificate, mathematical commit 11fbeaf34609147c124323c2f5e74fc450dad931. + +Aaron Wang / navinor supplies the retained complex-x4-frame-bound model and +symbolic LP-dual nomination method, following Chafik Boukhalfa/chafreaky PR557, +ntedvs PR776 and Rohan Guliani PR815. The retained model and generator are +unchanged source inputs; the new model extends terminal domains and supplies +an efficient complete quotient enumerator. Discovery is not certification. + +Alexander Schwartzman PR1030 and Cinna Davis PR1090 supply the earlier +rank-seven-end construction. The unchanged k8 recipe is a positive fixture. +Arham Tahir PR1583 supplies the fixed-gate-frame endpoint rigidity audit. +Ross Richardson's selected-k8-uniform-frame-audit extends PR1671 with fixed +ends over an exponent interval. Neither is an unrestricted-terminal bound. +Marius-Paul Dumitrean PR1186 supplies per-instance exact frame tooling and +changed-word searches, and Cinna Davis PR1996 the coordinate-plane rail census. +Those related results are credited, not used as certificate inputs. + +Douglas Colkitt PR1240 supplies the exact full-profile ceiling implementation, +and Sagar Thakrar PR1012 the coverage-law accounting. The selected R480 k8 word +retains the Jeremy Kothe, Rohan Arun, Hao Yan, icekylinx and earlier construction +lineage, with woklerx's retained word reconciliation. Source metadata binds +all consumed predecessor bytes and preserves the original notices. + +The new duals, complete-domain proof, receipts and any attaining assignments +are distinct artifacts for the larger declared domain. Standard subspace +enumeration, Gaussian counting, weak duality and exact interval arithmetic +are not claimed as new mathematical methods. diff --git a/research/selected-k8-unrestricted-ends/PRIMAL.json.gz b/research/selected-k8-unrestricted-ends/PRIMAL.json.gz new file mode 100644 index 0000000000..c4cddaec88 Binary files /dev/null and b/research/selected-k8-unrestricted-ends/PRIMAL.json.gz differ diff --git a/research/selected-k8-unrestricted-ends/PROOF.md b/research/selected-k8-unrestricted-ends/PROOF.md new file mode 100644 index 0000000000..fadb3ddb6a --- /dev/null +++ b/research/selected-k8-unrestricted-ends/PROOF.md @@ -0,0 +1,227 @@ +# Arbitrary terminal helper frames: complete fixed-word ceiling + +## Object and scope + +The fixed selected k8 word is identified by decompressed SHA256 +`c2b294300760e1fd6eeab8c22c4d13e4633dca40e52cac8da0d68163a76e3ca8`. +SLOT-PINS-k8 and the retained lineage reconciliation bind the R480 word to +the selected construction. It has 112 source ports, 112 target ports, +480 helpers, and 5,413 A/B/early-cleanup scalar gates. + +Fix all scalar operations, coefficients and order, every entrance, +centre/cut/target interface, and early/full cleanup membership and order. +For each of the 78 originally restricted helpers q, let S_q and H_q be +its original entrance and end. Permit every new end E_q satisfying +S_q <= E_q <= F2^9, with no relation required between E_q and H_q. +Here <= means subspace inclusion. The other +402 helpers occur in full-frame cleanup and retain full ends. Every +A/B/early-cleanup gate frame may vary, subject to monotone register paths, +common frames for both operands of ADD, and the native low-end cone rules. +The centre descents remain eight rank-eight children. + +The model charges climbs into fixed A/B centre and target pins; the native +auditor requires the preceding frame already equal its pin. Allowing the +charged climb enlarges the feasible set. Thus a lower bound for this +model applies to every native assignment in the stated class. The shipped +attaining assignment also passes that stronger native condition. + +This removes PR1995's original-end cap E_q <= H_q. It includes rotations, +enlargements and FULL ends as well as contractions. Register paths still +use nested transitions; arbitrary nonnested transitions are not admitted. +PR1583 fixes gate frames, while PR1671 and its uniform-price extension fix +ends. PR1030/1090 already supply particular contracted-end constructions. +The contribution is the quantified larger domain and its new certificate, +not a new LP method or first discovery of the four-end attaining profile. + +## Complete finite model + +Each register has an ordered chain from its fixed start through shared +gate nodes and applicable A/B pins to its end. Positive edge multiplicity +counts how many registers pay the same frame transition. A strict jump +of dimension d on an edge of multiplicity m creates m rank-d children. +End nodes for the 78 +originally restricted helpers are variable, with FULL as upper cap. + +Derive the exact scalar prefix P including its dirty-target compensation. +For each restricted helper q, compute + + K_q = (support of row q of P^-1) + union (support of column q of P), excluding q. + +If b(k) is register k's last pre-tail node, native admission requires +F_b(k) <= E_q for every k in K_q. Add these as zero-charge containment +edges b(k) -> E_q. They constrain frames and never create recursive work. +The helper's own condition follows from its register chain. There are +106 such edges, retained separately from the 10,222 merged paid edges. + +All edges go forward in event order. Join predecessor lower frames in +that order and intersect successor upper frames in reverse order; fixed +nodes retain their prescribed frames, and each variable terminal has upper +frame FULL. Induction proves lo_n <= F_n <= hi_n for every feasible +assignment. No old end cap enters this propagation. + +For each interval, choose a complement of lo_n in hi_n. Enumerate its +quotient subspaces by starting at zero and adjoining each possible vector, +retaining each canonical basis once. Every subspace is generated by a +basis, so induction on basis size proves coverage. Lifting these subspaces +and adjoining lo_n is a bijection with the interval. The checker also +requires distinctness, both containments and the exact sum of binary +Gaussian coefficients. For quotient dimensions 0 through 5 the counts +are 1,2,5,16,67,374. The retained enumeration stops at four; this package +implements and checks the required fifth dimension without that limit. + +The resulting domains have: + +- 2,589 free gates, plus 78 free helper ends; +- 32 end intervals from a forced four-space to FULL, with 374 choices each; +- 46 end intervals from a forced seven-space to FULL, with five choices each; +- 402 other helper ends fixed FULL by ordinary cleanup. + +Across all free nodes, domain sizes 2,5,16,67,374 occur respectively +1,192,1,365,28,2,80 times. This is a complete domain description, not an +enumeration of the Cartesian product of all assignments. Shared-node, +chain and cone containments still apply. The 129 free components have sizes + + 117 x 1, 2 x 9, 5 x 21, 1 x 23, 3 x 90, 1 x 2134. + +An independent implementation reconstructs all bounds, domains and edges +using 512-bit subspace sets, quotient closure and inverse row covectors. +It agrees with every geometry digest and count in EXPECTED.json. + +## Variable mass must be recharged + +Let P_r count all local rank-r children, including centre work. A register's +climb dimensions telescope from its fixed start to its chosen end. +Consequently local mass L = sum r P_r varies with the ends. The old +fixed-mass reduction subtracting L times the rank-one price cannot be +used as a constant objective here. + +Under the unchanged width-73, 896-family/nine-call coverage law, total +paid rank mass per call is + + T = 72 (896/9) + 64 = 7232. + +Any decrease in local mass exposes exactly as much idle mass, T-L. +The strict halving guard permits idle rank at most 51, since +2*51^2 < 73^2 <= 2*52^2. For a>=0, cost per unit rank decreases with rank. +Every idle packing therefore costs at least fractional rank-51 packing. +Put w=896/9 and define + + h_d(a) = (d/73)^(1-a), + Phi_d(a) = 73 [h_d(a) - (d/51) h_51(a)], d=1,...,9. + +The complete favorable normalized bill is + + B_P(a) = [sum P_d h_d(a) + ((T-L)/51) h_51(a)] / w + = [T (73/51)^a + sum P_d Phi_d(a)] / (73 w). + +The first term is constant across endpoint choices. Minimizing the sum of +Phi charges therefore minimizes the *complete* relaxed bill even though +local mass varies. All local ranks are at most nine. Telescoping gives +L = 5586 + sum_q (dim(E_q)-dim(H_q)), where the sum is over the 78 variable +ends. Their complete lower/upper dimensions give 5540 <= L <= 5792. +Consequently 1440 <= T-L <= 1692 for every feasible assignment. The idle +relaxation therefore remains applicable throughout the entire enlarged +domain; no endpoint choice receives negative or omitted idle work. + +The cost of omitting this recharging is observable: for the attaining +profile below, retaining the obsolete idle mass 1,646 instead of 1,650 +makes the 5% target incorrectly pass. The control checks this false +positive using exact outward bounds. Released workspace is not free work. + +## Exact dual certificate and attainment + +For every free node n and complete frame choice F, use a nonnegative +variable x(n,F). For every edge between free nodes, use y(n,m,F,G) for +every nested pair F<=G, with both marginals equal to the corresponding x +variables. Normalize each x distribution to one. Unary costs count edges +to fixed/forced nodes; pair costs count paid multiplicity, including zero +for the additional cone edges. Every literal legal assignment gives a +zero/one feasible LP point, so the LP minimum is a lower bound. + +For each component write min c.z subject to A z=b, z>=0. DUALS.json.gz +supplies a rational linear form in Phi_1,...,Phi_9 for every used equality +row. The two checkers reconstruct all rows/columns and prove + + c - A^T q >= 0, + b^T q = the shipped primal component cost, coefficient by coefficient. + +There are 103,563 rows and 396,241 columns. Of the reduced-cost vectors, +100,197 vanish identically and 296,044 are strictly positive at each of the +two test exponents below; 1,463 distinct vectors occur. No solver tolerance, +status, primal float or numerical basis is acceptance evidence. HiGHS +only nominated the rational certificate and integral assignment. + +The complete primal is checked against every domain and containment edge. +Together with fixed edges and centre work its profile is + + P* = {1:2400, 2:446, 3:416, 4:142, 5:82, 8:8}, + L* = 5582, T-L* = 1650. + +It contracts helpers 574,575,580,581 to rank-seven ends. The unchanged +native auditor accepts its actual annotated word on all 704 input columns +in both orientations, including arbitrary dirty helper data, frame paths, +entrances, full cleanup, endpoint maps and low-end cones. Baseline and +credited PR1090 two-end words pass the same audit. This is exact local +scalar/frame validation. Emitted native programs, phase/wrapper admission, +a new complete physical owner allocation and the outer invoice were not +replayed. The attaining profile and four end changes already appeared in +PR1995; this certificate shows that the larger terminal domain cannot +improve its favorable ceiling at the certified endpoint. + +## Certified ceiling and 5% exclusion + +Set + + a_lo = 1690198050302 / 10^15, + a_hi = 1690198050303 / 10^15, + a_target = (21/20) (1690054109089 / 10^15). + +The exact dual inequalities and primal-objective identities hold at a_hi +and a_target. At these exponents P* minimizes the complete LP relaxation. +Independent outward arithmetic proves + + B_P*(a_lo) < 1 < B_P*(a_hi), + B_P*(a_target) > 1. + +At a_hi every legal assignment has local excess cost at least P* and idle +cost at least the rank-51 relaxation. Its full bill exceeds one. Every +actual child has rank less than 73, so its cost increases with a; the +failure at a_hi excludes all larger savings. Summing the per-call bound +also permits different legal endpoint/frame assignments in different calls. + +The feasible P* assignment supplies the lower bracket for the favorable +relaxation; fractional idle packing need not be realizable. Thus the best +relaxed ceiling lies strictly between a_lo and a_hi. Relative to the old +ceiling's certified lower endpoint, the ratio is less than + + 563399350101 / 563351369696 < 1.0000852. + +Arbitrary terminal choices can therefore improve the fixed-end ceiling by less than +0.00852%, and cannot meet the 5% gate. Under the retained balanced planning +transfer, kappa < 1690198050303/1001690198050303. This is a bound on the +stated mechanism, not a new multiplication exponent. + +The theorem does not assert optimality at every exponent, classify all +attaining assignments, compare all possible helper inventories, or exclude +changed entrances, scalar rewrites, reordered/changed cleanup, nonmonotone +within-call transports, shared centres or a different coverage law. Arbitrary +terminal rotations and enlargements under the declared contract are covered. The small bracketed +ceiling gain does not establish an attainable global improvement. + +## Arithmetic and verification limits + +The primary uses the retained outward log/exp engine. The separate checker +uses 256-bit integer-square-root intervals and 96-bit dyadic exponent +brackets, outward multiplication and an explicit carry-to-one case. Exact +square comparisons calibrate 72 rank cases; an invalid root oracle fails. +Both implementations share source/JSON utilities and certificate data, but +no frame, LP or moment mathematics. Both were written by the same +AI-assisted author; no independent human or proof-assistant review is claimed. + +Finite controls additionally reject omitted rotated/FULL endpoint choices, +missing gate-frame choices, centre work, +common-gate edges, primal nodes, dual components, overstated objectives, +wrong idle mass/coverage, source drift and malformed JSON. They support the +implementation; the universal implication within the finite domain follows +from the complete-domain and weak-duality argument above. diff --git a/research/selected-k8-unrestricted-ends/README.md b/research/selected-k8-unrestricted-ends/README.md new file mode 100644 index 0000000000..9c71aae4b6 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/README.md @@ -0,0 +1,128 @@ +# Arbitrary helper terminal frames retain the selected k8 ceiling + +**Scoped obstruction; no new kappa.** Allowing every terminal subspace for +all 78 originally restricted helpers, jointly with all 5,413 gate frames, +still gives the favorable primitive ceiling + + 0.001690198050302 < best ceiling < 0.001690198050303. + +The upper planning bound is +`kappa < 1690198050303/1001690198050303`, approximately 0.001687346101213. +The ceiling gain over the fixed-end word is less than **0.00852%**, excluding +the declared 5% target. The full construction's exponent is unchanged. + +[PR1995](https://github.com/CrocSwap/integer-mult-bounds/pull/1995) permitted +only nested contractions inside each original end. This package removes +that cap: ends may rotate, enlarge or become FULL, subject only to containing +the fixed entrance and the unchanged scalar/frame/cleanup contract. The +larger domain has the same certified ceiling bracket. Its attaining four-end profile +is already known from PR1995; the new result is the complete larger-domain +bound, not another discovery of that construction. + +## Evidence + +The [proof](PROOF.md) fixes the exact R480 selected k8 word, scalar operations, +coefficients/order, entrances, centre/target pins and early/full cleanup +membership/order. The 402 helpers in full cleanup still end FULL. Register +paths remain monotone and gates use common operand frames; arbitrary terminal +orientation does not mean arbitrary nonnested transitions within a call. + +- All 78 terminal nodes are free: 32 have complete 374-choice intervals, + and 46 have complete five-choice intervals. There are 2,589 free gate nodes. +- The complete event graph retains all 106 low-end cone relations as + zero-charge containments. A new quotient enumerator covers dimensions + through five; the predecessor implementation intentionally stopped at four. +- Exact rational duals check all **396,241 columns and 103,563 rows in 129 + components**: 100,197 zero residual vectors and 296,044 strictly positive + ones, at both the ceiling upper endpoint and the 5% target. +- An integral assignment contracts ends 574,575,580,581 and gives + `{1:2400,2:446,3:416,4:142,5:82,8:8}`. Local mass is 5,582; idle mass is 1,650. + Its annotated word passes the retained scalar/frame auditor on all + **704 input columns in both orientations**. +- A separate bitset/covector/integer-root implementation reconstructs every + domain, edge and cone and checks every dual inequality. It imports no + primary frame, LP or moment implementation. + +The complete endpoint domain has local mass between 5,540 and 5,792, so +idle mass stays between 1,440 and 1,692. The objective charges this variable +idle mass using the favorable rank-51 relaxation. Keeping the old 1,646 idle +units after contracting four ends would falsely pass the 5% target; the +control from PR1995 remains relevant to this enlarged class. + +## Reproduce + +Python 3.12 and the standard library, from the repository root: + +```sh +python3.12 -I -B scripts/research_package.py \ + --package research/selected-k8-unrestricted-ends +``` + +The registered replay runs both exact checkers and the control suite. Normal +replay is read-only, including under `-O`; unchanged retained code is compiled +with its guards enabled. `verify.py --write-expected` explicitly regenerates +the receipt. Compressed DUALS and PRIMAL artifacts are compared by canonical +parsed payload, not gzip stream bytes. Canonical receipt SHA256: +`1891bcf17e86405d265ed4b51b9de6f6059be95c50a5b6c28b21d2ac8057093e`. + +The full registered replay passed on CPython 3.12.3, including all 20 control +groups. Both exact checkers also passed CPython 3.14.4 under `-I -O -B` +from a relocated package with read-only files and directories, preserving +all bytes. Subsequent edits record validation and clarify proof prose. + +`nominate.py` is optional solver-based discovery, using Python 3.12.3, +highspy 1.15.1, NumPy 2.5.4 and SciPy 1.18.1. Its output is a proposal; +acceptance needs no solver dependency or floating-point decision. The +nomination code caches the solver's copied basis-status lists once, keeping +extraction practical for this larger LP. DISCOVERY.json is diagnostic only. + +## Scope and coordination + +Single random nonce `5f5984c68e5381ec12276b69c721f48c`, revision-3 +`complex-mechanisms / complex-new-helper-inventory`; no reroll. Base main +`1c47876ef742ba64bf9140b0527d63acf656a3b4`. The prescribed baseline-source, +ceiling and lever controls passed. The initial waiver of all affected helper +climb costs, with released mass recharged, had planning headroom; it was not +a realized word or a universal lower bound for the final domain. +[Discussion2000](https://github.com/CrocSwap/integer-mult-bounds/discussions/2000) +records the claim and outcome. Published as [PR2013](https://github.com/CrocSwap/integer-mult-bounds/pull/2013); +mathematical commit `31e788df17a4df614fa5b3605a06d06e60f18bb6`. +TASK.json retains the original card, sources, +predecessor heads and overlap coverage. Metadata search is not a novelty +certificate. The final refresh covered 381 open PRs at 17:00:22 UTC and +643 Discussions at 17:01:43 UTC on 2026-10-14, with complete pagination. +Related PR1995/1186/1996 heads were unchanged. Main +`b6135f9fe8c0783f22bd87992a080575f2943511` preserved every mathematical +input and the selected record, with no package collision. Its new canonical +path validation passed separately; replay-command behavior was unchanged. + +This obstruction does not pass the card's physical-construction acceptance +gate. Emitted native programs, phase/wrapper admission, a new physical owner +map, selected cold replay and the global/outer invoice were not replayed. +Fractional ideal idle packing need not be realizable. The theorem does not +claim optimality at every exponent, unique optimal frames, or elimination of +remaining packing headroom below the ceiling. Changed entrances, scalar +rewrites/order, cleanup changes, nonmonotone internal transport, new helper +registers, shared centres or a changed coverage law remain outside scope. + +## Open next questions + +1. **Change an entrance or scalar dependency.** This changes the forced spans + that limit the current endpoint freedom. Pin one rewrite, establish its + arbitrary-dirty identity and complete frame/cone constraints, then screen + its whole local/idle bill. The blocker is a priced changed-word contract. +2. **Physically host the four-end word.** Compare its annotations with the + existing rank-seven-end constructions, then run native phase/wrapper and + complete owner admission. A local optimum supplies no global improvement; + the available ceiling gain is tiny and precision/outer obligations remain. + +## Credit + +Gareth Davidson (@bitplane), with substantial OpenAI Codex assistance. +Retains navinor's frame method and the chafreaky/PR557, ntedvs/PR776 and +Rohan Guliani/PR815 lineage; Alexander Schwartzman/PR1030 and Cinna Davis/PR1090; +Arham Tahir/PR1583; PR1671 and PR1995; Ross Richardson's uniform fixed-end +audit; Marius-Paul Dumitrean/PR1186 and Cinna Davis/PR1996; Douglas Colkitt/PR1240 +and Sagar Thakrar/PR1012; the full selected construction and word-reconciliation +lineage. See NOTICE.md and exact SOURCES.json pins. Apache-2.0; no independent +human or full formal verification is asserted. diff --git a/research/selected-k8-unrestricted-ends/SOURCES.json b/research/selected-k8-unrestricted-ends/SOURCES.json new file mode 100644 index 0000000000..e56d3e8b52 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/SOURCES.json @@ -0,0 +1,90 @@ +{ + "schema_version": 1, + "base_commit": "1c47876ef742ba64bf9140b0527d63acf656a3b4", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "06c96f5579bb67ed1b86d334e78fbed7da6945f1", + "sha256": "6686ad58f1fbdbc87134a78901b60fd53a20d3984355e91defbbebc9e9fa8075" + }, + { + "path": "research/complex-local-word-ceiling/README.md", + "usage": "input", + "git_blob": "f5f742f8196da29d2c3f4dffb3c27685ca9401f6", + "sha256": "b60be039cb0e03e064a27407d0bce9e58908d793da5ee405c876de5aebfa5f81" + }, + { + "path": "research/complex-local-word-ceiling/ceiling.py", + "usage": "input", + "git_blob": "6c0f54527d879396f689523bfde19928a9b6157c", + "sha256": "86a1432870b3b21d8454106ec9162fddc0471472d9214c590a1420f2426cedfc" + }, + { + "path": "research/complex-x4-frame-bound/README.md", + "usage": "input", + "git_blob": "e2ddf660ac1dabaf5286531dc784f9b21bfdd5bd", + "sha256": "0f5c4c73f9c20935b05698405543eccbf15a82663052a3d612ce7148799b34f4" + }, + { + "path": "research/complex-x4-frame-bound/gen_duals.py", + "usage": "input", + "git_blob": "bd85022a44dde95c14710d7dd28fed6b81926fd1", + "sha256": "9aac56f7cd1c497bfc50f0fb47bd5b14761033127575665d576d948ee11fc3f8" + }, + { + "path": "research/complex-x4-frame-bound/model.py", + "usage": "input", + "git_blob": "33cfb4f404be0ed9fabd53a362084ef8dbc1911c", + "sha256": "0fa808a82e12a8928e43de3131958b9018476ee8c25b1ebc841316705e4f0eff" + }, + { + "path": "research/gauge44-slots/construction/slots/SLOT-PINS-k8.json", + "usage": "input", + "git_blob": "2702c368f4de0b671577aee9a0e2df41c1b27658", + "sha256": "55dd229684febecb80638eff9c6b3986623e8539c6c956753b350209c3e0efe2" + }, + { + "path": "research/gauge44-slots/independent/audit_local.py", + "usage": "input", + "git_blob": "4744d8783c25bf7bf5076886169077ca3808309a", + "sha256": "03afcfc9da428b3f6edac81c1fee7f277ab81b64998efae78380b63498dec6cd" + }, + { + "path": "research/k8-rank7-composition/README.md", + "usage": "input", + "git_blob": "306ec133620358b6d043311d59f91013bbf1f886", + "sha256": "51a82cb44080ffa34fc0fa6a63a3ed7ecd63bea9c9e0258fb45adb36ae90563b" + }, + { + "path": "research/k8-rank7-composition/construct.py", + "usage": "input", + "git_blob": "5600f92cbb9d391563af88f59eafd0e16a3b33b0", + "sha256": "bdeb1584fc09457cb6d7e10977df6a9e009501ab26e52534e37df64ae3056324" + }, + { + "path": "research/k8-rank7-composition/data/END-RECIPE.json", + "usage": "input", + "git_blob": "7af7b6341c06589239bcf4c4634febbc8f757ec2", + "sha256": "071da31acee1c91c8297e81481bc505fb62b17444801c6b6bac3235e34dc0918" + }, + { + "path": "research/r480-owner-optimum/inputs/local/FULL-WORD.json.gz", + "usage": "input", + "git_blob": "723decbca8995e916d6f4b783aa3e1ddd4eb47fe", + "sha256": "49596aa4ed4fd36cd4582fd0e8ddeb09fd80370a7d8aea1ede52a135b536d289" + }, + { + "path": "research/selected1042-lineage-resolution98/README.md", + "usage": "input", + "git_blob": "b9d19db8834b1cd8b64e564555581748e870f948", + "sha256": "750417e6e34c6e0ce61fb85addfbdc5020dbbc12f01ba1a10df4cadc26d74845" + } + ] +} diff --git a/research/selected-k8-unrestricted-ends/TASK.json b/research/selected-k8-unrestricted-ends/TASK.json new file mode 100644 index 0000000000..03a5f6e04f --- /dev/null +++ b/research/selected-k8-unrestricted-ends/TASK.json @@ -0,0 +1,452 @@ +{ + "schema_version": 1, + "task_id": "complex-new-helper-inventory", + "priority_revision": 3, + "base_commit": "1c47876ef742ba64bf9140b0527d63acf656a3b4", + "original_card": { + "id": "complex-new-helper-inventory", + "question": "Can a new local cost interface change the deficit-to-recursive-cost ratio beyond current packing?", + "starting_points": [ + "research/complex-local-word-ceiling/README.md", + "research/heterogeneous-owner-assembly/README.md", + "certificates/selected-result.json" + ], + "methods": [ + "Propose a changed helper inventory and derive an optimistic exact moment.", + "Design a small completed instance and independently verify its endpoint and rank bill." + ], + "acceptance_gate": "A new physically realizable contract outside the frozen catalogue whose per-call profile, screened with ceiling.ceiling(), beats the selected word's packing ceiling; a lower cap does not establish identical circuitry or order attainable optima, and is insufficient to pass the stronger-budget target under this model.", + "first_step": { + "command": [ + "python3", + "-B", + "research/complex-local-word-ceiling/verify.py" + ], + "expected": "PASS_COMPLEX_LOCAL_WORD_CEILING", + "inspect": "Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.", + "scope": "Positive control and planning budget only; this is not a new construction or full cold replay." + }, + "first_experiment": "Before any synthesis, write the candidate per-call local profile (and centre charge / unpaid coordinates if changed) and screen it with ceiling.ceiling(); reject it if even the ideal ceiling does not beat the selected word's by your stated margin.", + "bottleneck_link": "Packing of the selected word is capped at +0.87% (ceiling model); only a lower local excess spend or a changed coverage law raises the cap.", + "allowed_variations": [ + "Narrow to one changed boundary or helper type with explicit counts.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "scope_change_triggers": [ + "Mixing only providers already inside the pinned catalogue." + ], + "overlap_terms": [ + "helper inventory", + "heterogeneous-owner", + "mutable leaver" + ] + }, + "scope_status": "refined", + "actual_scope": "All endpoints E_q between the original entrance S_q and FULL for each of 78 originally restricted selected k8 helpers, jointly with all A/B/early-cleanup frames. Original end subspace is no longer a cap. Fixed scalar operations/order, centre/target cut, entrances and early/full cleanup membership; all 402 full-cleanup helper ends stay FULL.", + "scope_change_reason": "Removes the old-terminal-subspace cap from PR1995, allowing every terminal subspace containing each fixed entrance, jointly with all gate frames. A negative screen does not satisfy the construction acceptance gate.", + "bottleneck_link": "Decides whether arbitrary helper terminal geometry can lower the complete per-call excess cost enough for the 5% target, beyond the proved nested-contraction class.", + "budget_minutes": 90, + "stop_rule": "One complete unrestricted-terminal endpoint screen or a precisely documented interface obstruction. No scalar reorder, entrance change or cleanup change.", + "outcome": "negative-result", + "evidence": "All 396241 LP columns in 129 components pass exact rational dual checks at the ceiling endpoint and the 5% target. A separate bitset/covector/integer-root checker agrees. The same four-end profile as PR1995 attains the bound; the unrestricted terminal domain retains a < 0.001690198050303, less than 0.00852% above the fixed-end ceiling. The attaining word passes the 704-column scalar/frame audit in both orientations.", + "author": "Gareth Davidson (@bitplane), with substantial OpenAI Codex assistance", + "ai_assistance": "Substantial OpenAI Codex assistance in mathematics, implementation, checking and writing; no independent human review.", + "open_questions": [ + { + "question": "Can changed entrances or one scalar dependency yield enough complete-profile gain?", + "why_it_matters": "Those changes alter the forced frame spans and escape this fixed-word, fixed-entrance domain.", + "first_step": "Pin one exact new entrance or dependency and reconstruct all gates, cones and the complete local/idle bill.", + "blocked_by": "Arbitrary-dirty scalar correctness, frame legality and a target-scale exact cost screen." + }, + { + "question": "Can a candidate attaining the unrestricted-terminal relaxation be physically hosted?", + "why_it_matters": "A local LP witness does not establish a global supplier improvement.", + "first_step": "Materialize its exact annotations, run native emission/phase/wrapper checks and price one complete owner placement.", + "blocked_by": "Emitted-interface admission, whole-call hosting and the inherited precision/outer obligations." + } + ], + "selection_nonce": "5f5984c68e5381ec12276b69c721f48c", + "catalogue_scope_key": "f3b0895a4f9f1cc62e75", + "discussion": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2000", + "first_experiment": { + "baseline": { + "1": 2412, + "2": 418, + "3": 432, + "4": 142, + "5": 82, + "8": 8 + }, + "removed_helper_climbs": { + "1": 194, + "3": 60, + "2": 46 + }, + "optimistic_profile": { + "1": 2218, + "2": 372, + "3": 372, + "4": 142, + "5": 82, + "8": 8 + }, + "ceiling": [ + "456620750029/250000000000000", + "1826483000117/1000000000000000" + ], + "target": "35491136290869/20000000000000000", + "headroom": true, + "scope": "Planning profile only: waive the baseline costs of the 78 restricted helpers and retain all other baseline calls. Released mass recharged as ideal idle. Not a universal unrestricted-domain lower bound or a physical assignment." + }, + "predecessors": { + "PR1995": "d47b4b656732f840c9b3252cad5a4efa20924b71", + "PR1671": "ce130d291f5ab6dd801544886a16f62d42d86118", + "PR1583": "04516881142961cdf97a828fbbc63d72e232a148", + "uniform_fixed_ends": "Ross Richardson, research/selected-k8-uniform-frame-audit at the pinned base" + }, + "domain_census": { + "graph": { + "nodes_sha256": "4eb47e21725d21f8c23bc5491a576fd817c31c2403fc7bc3ff626ced5750b881", + "domains_sha256": "d4af047a50406102f73bb1e4826f417c75844e4d0155194bbd15899693341c06", + "edges_sha256": "4f30b8c3c22b7e70bf48ce5398212512081acb7fed4a61ad67873bc032218e62", + "cones_sha256": "5546e8ad5d979e0eaf618a4adbb333a7ec6b3528ef71bbf659b05ba2e5fc0004", + "node_count": 6941, + "edge_count": 10328, + "cone_helpers": 78, + "cone_edges": 106 + }, + "free_gates": 2589, + "free_ends": 78, + "quotient_counts": [ + 1, + 2, + 5, + 16, + 67, + 374 + ], + "component_sizes": { + "1": 117, + "9": 2, + "21": 5, + "23": 1, + "90": 3, + "2134": 1 + }, + "local_mass_interval": [ + 5540, + 5792 + ], + "idle_mass_interval": [ + 1440, + 1692 + ] + }, + "overlap": { + "entry": { + "searched_at": "2026-10-14T16:39:12.840794+00:00", + "coverage": { + "open_prs": { + "fetched_at": "2026-10-14T16:38:03.332379+00:00", + "complete_pagination": true, + "records": 413 + }, + "discussions": { + "fetched_at": "2026-10-14T16:39:12.789009+00:00", + "complete_pagination": true, + "records": 623 + } + }, + "warnings": [], + "limits": "Remote PR scope is open PRs including drafts. Closed work is searched through local READMEs, TASK metadata and ledger only. No code diffs or arbitrary package files are searched. Recheck relevant heads before submission.", + "matches_total": 178, + "returned_matches": 20 + }, + "terminal_search": { + "searched_at": "2026-10-14T16:42:03.250912+00:00", + "coverage": { + "open_prs": { + "fetched_at": "2026-10-14T16:38:03.332379+00:00", + "complete_pagination": true, + "records": 413 + }, + "discussions": { + "fetched_at": "2026-10-14T16:39:12.789009+00:00", + "complete_pagination": true, + "records": 623 + } + }, + "warnings": [], + "limits": "Remote PR scope is open PRs including drafts. Closed work is searched through local READMEs, TASK metadata and ledger only. No code diffs or arbitrary package files are searched. Recheck relevant heads before submission.", + "matches_total": 167, + "returned_matches": 167 + }, + "rotations": { + "searched_at": "2026-10-14T16:40:29.678586+00:00", + "coverage": { + "open_prs": { + "fetched_at": "2026-10-14T16:38:03.332379+00:00", + "complete_pagination": true, + "records": 413 + }, + "discussions": { + "fetched_at": "2026-10-14T16:39:12.789009+00:00", + "complete_pagination": true, + "records": 623 + } + }, + "warnings": [], + "limits": "Remote PR scope is open PRs including drafts. Closed work is searched through local READMEs, TASK metadata and ledger only. No code diffs or arbitrary package files are searched. Recheck relevant heads before submission.", + "matches_total": 21, + "returned_matches": 20 + }, + "nearby_heads": [ + { + "headRefOid": "3855fd413a3ccfc31988033801b9648c25aee783", + "number": 1186, + "state": "OPEN", + "title": "Tooling: exact frame solver and delivery-rewrite search for gauge44/k8 local words (no new \u03ba)", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/1186" + }, + { + "headRefOid": "1885a1086172a61afbf97b0db01ec70927401d49", + "number": 1996, + "state": "OPEN", + "title": "Research: bound selected-word coordinate frame rails", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/1996" + } + ], + "final": { + "searched_at": "2026-10-14T17:01:44.009879+00:00", + "coverage": { + "open_prs": { + "fetched_at": "2026-10-14T17:00:22.435271+00:00", + "complete_pagination": true, + "records": 381 + }, + "discussions": { + "fetched_at": "2026-10-14T17:01:43.921041+00:00", + "complete_pagination": true, + "records": 643 + } + }, + "warnings": [], + "limits": "Remote PR scope is open PRs including drafts. Closed work is searched through local READMEs, TASK metadata and ledger only. No code diffs or arbitrary package files are searched. Recheck relevant heads before submission.", + "matches_total": 16, + "returned_matches": 16 + }, + "final_related_heads": [ + { + "headRefOid": "d47b4b656732f840c9b3252cad5a4efa20924b71", + "number": 1995, + "state": "OPEN", + "title": "Research: bound joint helper-end and frame contractions of the selected k8 word", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/1995" + }, + { + "headRefOid": "3855fd413a3ccfc31988033801b9648c25aee783", + "number": 1186, + "state": "OPEN", + "title": "Tooling: exact frame solver and delivery-rewrite search for gauge44/k8 local words (no new \u03ba)", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/1186" + }, + { + "headRefOid": "1885a1086172a61afbf97b0db01ec70927401d49", + "number": 1996, + "state": "OPEN", + "title": "Research: bound selected-word coordinate frame rails", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/1996" + } + ] + }, + "canonical_receipt_sha256": "1891bcf17e86405d265ed4b51b9de6f6059be95c50a5b6c28b21d2ac8057093e", + "canonical_duals_sha256": "afdf3858f6862bcb386c4e5c0f21fde8f05aed038d90f87025fe6915fa66a653", + "canonical_primal_sha256": "b97620f4bb69848445abd3053994fca2a40ab2bf248b4505c67e098700d5966c", + "latest_main_check": { + "verified_at_utc": "2026-10-14T17:01:26.908915+00:00", + "base": "1c47876ef742ba64bf9140b0527d63acf656a3b4", + "main": "b6135f9fe8c0783f22bd87992a080575f2943511", + "records": [ + { + "path": "AGENTS.md", + "base_blob": "860762e04e963e1b163b8fa5267854c0040a9e67", + "main_blob": "860762e04e963e1b163b8fa5267854c0040a9e67", + "same": true + }, + { + "path": "CONTRIBUTING.md", + "base_blob": "e51435543687f1bd88ab22248082dc689ce8b853", + "main_blob": "e51435543687f1bd88ab22248082dc689ce8b853", + "same": true + }, + { + "path": "autoresearch.md", + "base_blob": "84c108dd0d650944066ee34796e733f2329acf28", + "main_blob": "84c108dd0d650944066ee34796e733f2329acf28", + "same": true + }, + { + "path": "docs/research/agent-task-catalog.json", + "base_blob": "06c96f5579bb67ed1b86d334e78fbed7da6945f1", + "main_blob": "06c96f5579bb67ed1b86d334e78fbed7da6945f1", + "same": true + }, + { + "path": "certificates/selected-result.json", + "base_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "main_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "same": true + }, + { + "path": "scripts/research_package.py", + "base_blob": "2b85498087ba032c29d62a0b2080065ac9e53ff6", + "main_blob": "6733ec2f5700e6602d60dc95938c1ea1854980f0", + "same": false + }, + { + "path": "docs/research/research-package-guide.md", + "base_blob": "8dc1a921179dcc7a9ecc2dc961ccd77b5ed60c02", + "main_blob": "4aea949036c90566637d3c5f7f4a3054579dc40b", + "same": false + }, + { + "path": "research/r480-owner-optimum/inputs/local/FULL-WORD.json.gz", + "base_blob": "723decbca8995e916d6f4b783aa3e1ddd4eb47fe", + "main_blob": "723decbca8995e916d6f4b783aa3e1ddd4eb47fe", + "same": true + }, + { + "path": "research/gauge44-slots/construction/slots/SLOT-PINS-k8.json", + "base_blob": "2702c368f4de0b671577aee9a0e2df41c1b27658", + "main_blob": "2702c368f4de0b671577aee9a0e2df41c1b27658", + "same": true + }, + { + "path": "research/complex-x4-frame-bound/model.py", + "base_blob": "33cfb4f404be0ed9fabd53a362084ef8dbc1911c", + "main_blob": "33cfb4f404be0ed9fabd53a362084ef8dbc1911c", + "same": true + }, + { + "path": "research/complex-x4-frame-bound/gen_duals.py", + "base_blob": "bd85022a44dde95c14710d7dd28fed6b81926fd1", + "main_blob": "bd85022a44dde95c14710d7dd28fed6b81926fd1", + "same": true + }, + { + "path": "research/complex-x4-frame-bound/README.md", + "base_blob": "e2ddf660ac1dabaf5286531dc784f9b21bfdd5bd", + "main_blob": "e2ddf660ac1dabaf5286531dc784f9b21bfdd5bd", + "same": true + }, + { + "path": "research/complex-local-word-ceiling/ceiling.py", + "base_blob": "6c0f54527d879396f689523bfde19928a9b6157c", + "main_blob": "6c0f54527d879396f689523bfde19928a9b6157c", + "same": true + }, + { + "path": "research/complex-local-word-ceiling/README.md", + "base_blob": "f5f742f8196da29d2c3f4dffb3c27685ca9401f6", + "main_blob": "f5f742f8196da29d2c3f4dffb3c27685ca9401f6", + "same": true + }, + { + "path": "research/gauge44-slots/independent/audit_local.py", + "base_blob": "4744d8783c25bf7bf5076886169077ca3808309a", + "main_blob": "4744d8783c25bf7bf5076886169077ca3808309a", + "same": true + }, + { + "path": "research/k8-rank7-composition/data/END-RECIPE.json", + "base_blob": "7af7b6341c06589239bcf4c4634febbc8f757ec2", + "main_blob": "7af7b6341c06589239bcf4c4634febbc8f757ec2", + "same": true + }, + { + "path": "research/k8-rank7-composition/construct.py", + "base_blob": "5600f92cbb9d391563af88f59eafd0e16a3b33b0", + "main_blob": "5600f92cbb9d391563af88f59eafd0e16a3b33b0", + "same": true + }, + { + "path": "research/k8-rank7-composition/README.md", + "base_blob": "306ec133620358b6d043311d59f91013bbf1f886", + "main_blob": "306ec133620358b6d043311d59f91013bbf1f886", + "same": true + }, + { + "path": "research/selected1042-lineage-resolution98/README.md", + "base_blob": "b9d19db8834b1cd8b64e564555581748e870f948", + "main_blob": "b9d19db8834b1cd8b64e564555581748e870f948", + "same": true + } + ], + "package_path_collision": false + }, + "validation": { + "registered": { + "argv": [ + "/usr/bin/python3.12", + "-I", + "-B", + "scripts/research_package.py", + "--package", + "research/selected-k8-unrestricted-ends" + ], + "python": "Python 3.12.3", + "exit_code": 0, + "elapsed_seconds": 91.83699259298737 + }, + "controls": { + "groups": 20, + "separate_full_control_run": { + "argv": [ + "/usr/bin/python3.12", + "-I", + "-O", + "-B", + "research/selected-k8-unrestricted-ends/test_package.py" + ], + "exit_code": 0, + "elapsed_seconds": 75.95660864800448 + } + }, + "additional": { + "python": "CPython 3.14.4", + "commands": [ + "verify.py", + "independent.py" + ], + "flags": [ + "-I", + "-O", + "-B" + ], + "relocated": true, + "files_mode": "0444", + "directories_mode": "0555", + "exit_codes": [ + 0, + 0 + ], + "unchanged": true + }, + "latest_main_metadata": { + "main": "b6135f9fe8c0783f22bd87992a080575f2943511", + "check_only": true, + "exit_code": 0, + "scope": "Current-runner changes only canonical relative-path validation and planning; full command replay passed on the branch runner." + }, + "native_scope": "Three exact 704-column scalar/frame audits in both orientations. No emitted native program, phase/wrapper admission or full supplier replay.", + "unrun": [ + "selected full cold replay", + "emitted native programs and phase/wrapper admission", + "new physical owner allocation and global/outer invoice", + "all-size compiler and precision/tape obligations", + "outer analytic transfer" + ] + }, + "pr": "https://github.com/CrocSwap/integer-mult-bounds/pull/2013", + "mathematical_head": "31e788df17a4df614fa5b3605a06d06e60f18bb6" +} diff --git a/research/selected-k8-unrestricted-ends/VERIFY.json b/research/selected-k8-unrestricted-ends/VERIFY.json new file mode 100644 index 0000000000..0de87b87d6 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/VERIFY.json @@ -0,0 +1,54 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/complex-local-word-ceiling/README.md", + "research/complex-local-word-ceiling/ceiling.py", + "research/complex-x4-frame-bound/README.md", + "research/complex-x4-frame-bound/gen_duals.py", + "research/complex-x4-frame-bound/model.py", + "research/gauge44-slots/construction/slots/SLOT-PINS-k8.json", + "research/gauge44-slots/independent/audit_local.py", + "research/k8-rank7-composition/README.md", + "research/k8-rank7-composition/construct.py", + "research/k8-rank7-composition/data/END-RECIPE.json", + "research/r480-owner-optimum/inputs/local/FULL-WORD.json.gz", + "research/selected1042-lineage-resolution98/README.md" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 300, + "checks": "Complete unrestricted terminal subspaces and coupled frame LP, every exact dual column, primal attainment and full idle-recharged ceiling." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/independent.py" + ], + "timeout_seconds": 300, + "checks": "Separate bitset/covector graph and complete domains, all dual inequalities, integer-root full moment and global mass interval." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/test_package.py" + ], + "timeout_seconds": 600, + "checks": "Three all-column scalar/frame audits; rotated and full endpoint omissions, quotient enumeration, idle-cost false positive, exact dual/source corruption and optimized relocation." + } + ] +} diff --git a/research/selected-k8-unrestricted-ends/common.py b/research/selected-k8-unrestricted-ends/common.py new file mode 100644 index 0000000000..28147d3749 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/common.py @@ -0,0 +1,108 @@ +"""Source binding and serialization; no frame or optimization mathematics. + +Adapted from Gareth Davidson PR1995 (73e323159d65c974debb180189694fd59144da5f). +Gareth Davidson with OpenAI Codex assistance. Apache-2.0. +""" +import gzip +import hashlib +import json +from pathlib import Path +import types + +HERE = Path(__file__).resolve().parent +BASE = "1c47876ef742ba64bf9140b0527d63acf656a3b4" +WORD_SHA = "c2b294300760e1fd6eeab8c22c4d13e4633dca40e52cac8da0d68163a76e3ca8" +PROFILE = {1: 2412, 2: 418, 3: 432, 4: 142, 5: 82, 8: 8} +INPUTS = { + "research/r480-owner-optimum/inputs/local/FULL-WORD.json.gz": "WORD.json.gz", + "research/gauge44-slots/construction/slots/SLOT-PINS-k8.json": "SLOT-PINS.json", + "research/complex-x4-frame-bound/model.py": "frame_model.py", + "research/complex-x4-frame-bound/gen_duals.py": "gen_duals.py", + "research/complex-x4-frame-bound/README.md": "FRAME-METHOD.md", + "research/complex-local-word-ceiling/ceiling.py": "ceiling.py", + "research/complex-local-word-ceiling/README.md": "CEILING.md", + "research/gauge44-slots/independent/audit_local.py": "audit_local.py", + "research/k8-rank7-composition/data/END-RECIPE.json": "END-RECIPE.json", + "research/k8-rank7-composition/construct.py": "construct.py", + "research/k8-rank7-composition/README.md": "END-WITNESS.md", + "research/selected1042-lineage-resolution98/README.md": "WORD-LINEAGE.md" +} + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +def parse(raw): + def pairs(items): + result = {} + for key, value in items: + need(key not in result, "duplicate JSON key: " + key) + result[key] = value + return result + def bad(value): + raise ValueError("noninteger/nonfinite JSON number: " + value) + return json.loads(raw, object_pairs_hook=pairs, parse_float=bad, parse_constant=bad) + + +def canonical(obj): + return json.dumps(obj, sort_keys=True, separators=(",", ":"), allow_nan=False).encode() + + +def digest(obj): + return hashlib.sha256(canonical(obj)).hexdigest() + + +def source_bindings(): + need(parse((HERE / "INPUTS.json").read_bytes()) == INPUTS, "input mapping") + data = parse((HERE / "SOURCES.json").read_bytes()) + provenance = {"certificates/selected-result.json", "docs/research/agent-task-catalog.json"} + need(data["base_commit"] == BASE, "source base") + need(len(data["files"]) == len(INPUTS) + 2 and + {r["path"] for r in data["files"]} == set(INPUTS) | provenance, "source inventory") + for row in data["files"]: + path = row["path"] + need(row["usage"] == ("input" if path in INPUTS else "provenance"), "source role") + if path not in INPUTS: + continue + raw = (HERE / "references" / INPUTS[path]).read_bytes() + need(hashlib.sha256(raw).hexdigest() == row["sha256"], "retained source SHA256") + blob = hashlib.sha1(b"blob " + str(len(raw)).encode() + b"\0" + raw).hexdigest() + need(blob == row["git_blob"], "retained source Git blob") + live = HERE.parents[1] / path + if live.exists(): + need(live.read_bytes() == raw, "live mathematical source drift") + + +def retained(name): + """Keep the retained source's guards active even when the caller uses -O.""" + path = HERE / "references" / name + result = types.ModuleType("retained_" + path.stem) + result.__file__ = str(path) + exec(compile(path.read_bytes(), str(path), "exec", optimize=0), result.__dict__) + return result + + +def word(): + raw = gzip.decompress((HERE / "references/WORD.json.gz").read_bytes()) + pins = parse((HERE / "references/SLOT-PINS.json").read_bytes()) + need(hashlib.sha256(raw).hexdigest() == pins["word_sha256"] == WORD_SHA, "selected word content pin") + data = parse(raw) + need({int(r): n for r, n in data["report"]["local_profile"].items()} == PROFILE, "baseline local profile") + need(data["report"]["R"] == 480 and data["report"]["h"] == 9 and data["report"]["v"] == 112, + "selected word dimensions") + need(sum(r*n for r, n in PROFILE.items()) == 5586, "local rank mass") + return data + + +def duals(): + raw = gzip.decompress((HERE / "DUALS.json.gz").read_bytes()) + data = parse(raw) + need(data["schema"] == "selected-k8-unrestricted-end-duals-v1" and data["word_sha256"] == WORD_SHA, + "dual word binding") + return data + + +def primal_data(): + return parse(gzip.decompress((HERE / "PRIMAL.json.gz").read_bytes())) diff --git a/research/selected-k8-unrestricted-ends/independent.py b/research/selected-k8-unrestricted-ends/independent.py new file mode 100644 index 0000000000..1beba31f13 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/independent.py @@ -0,0 +1,462 @@ +#!/usr/bin/env python3 +"""Separate bitset/event-graph and integer-root dual checker. Apache-2.0. + +Shares only source binding/JSON utilities with the primary checker. Does not +import the retained frame model, LP generator, ceiling engine or primary code. +Adapts Gareth Davidson PR1995, mathematical commit +73e323159d65c974debb180189694fd59144da5f, to coupled variable endpoints. +Gareth Davidson, with substantial OpenAI Codex assistance. +""" +from collections import Counter, defaultdict +from fractions import Fraction as Q +from functools import lru_cache +import importlib.util +import json +from math import isqrt +from pathlib import Path + +HERE = Path(__file__).resolve().parent +spec = importlib.util.spec_from_file_location("independent_sources", HERE / "common.py") +U = importlib.util.module_from_spec(spec) +spec.loader.exec_module(U) +need = U.need +FULL = (1 << 512)-1 +SCALE = 1 << 256 +BITS = 96 +BASE_LO = Q(1690054109088, 10**15) +BASE_HI = Q(1690054109089, 10**15) +TARGET = Q(21, 20)*BASE_HI +RANKS = range(1, 10) + + +def elements(mask): + while mask: + bit = mask & -mask + yield bit.bit_length()-1 + mask ^= bit + + +@lru_cache(None) +def extend(frame, vector): + if (frame >> vector) & 1: + return frame + return frame | sum(1 << (x ^ vector) for x in elements(frame)) + + +def frame(vectors): + result = 1 + for vector in vectors: + need(type(vector) is int and 0 <= vector < 512, "frame-vector domain") + result = extend(result, vector) + return result + + +def dimension(space): + size = space.bit_count() + need(size > 0 and not size & (size-1), "subspace size") + return size.bit_length()-1 + + +@lru_cache(None) +def canonical_frame(space): + pivots = {} + for value in elements(space): + v = value + for p in sorted(pivots, reverse=True): + if (v >> p) & 1: + v ^= pivots[p] + if v: + p = v.bit_length()-1 + for k in list(pivots): + if (pivots[k] >> p) & 1: + pivots[k] ^= v + pivots[p] = v + result = tuple(pivots[p] for p in sorted(pivots, reverse=True)) + need(frame(result) == space, "canonical-frame span") + return result + + +@lru_cache(None) +def join(left, right): + result = left + for x in canonical_frame(right): + result = extend(result, x) + return result + + +@lru_cache(None) +def small_spaces(k): + seen, todo = {1}, [1] + while todo: + sub = todo.pop() + for x in range(1, 1 << k): + other = extend(sub, x) + if other not in seen: + seen.add(other) + todo.append(other) + return tuple(sorted(seen)) + + +def interval(lo, hi): + need(lo & ~hi == 0, "independent empty interval") + complement, current = [], lo + for x in canonical_frame(hi): + if not ((current >> x) & 1): + complement.append(x) + current = extend(current, x) + need(current == hi and len(complement) <= 5, "complete quotient domain") + result = [] + for sub in small_spaces(len(complement)): + value = lo + for bits in elements(sub): + x = 0 + for j, c in enumerate(complement): + if (bits >> j) & 1: + x ^= c + value = extend(value, x) + result.append(value) + need(len(set(result)) == len(result), "independent duplicate frame") + return sorted(result, key=lambda x: (dimension(x), canonical_frame(x))) + + +def operands(op): + need(op[0] in ("add", "scale"), "scalar primitive") + return op[1:3] if op[0] == "add" else op[1:2] + + +def scalar(rows, operations): + for op in operations: + if op[0] == "add": + t, s = op[1:3] + a = Q(op[3], op[4]) + for key, value in tuple(rows[s].items()): + new = rows[t].get(key, Q(0)) + a*value + if new: + rows[t][key] = new + else: + rows[t].pop(key, None) + else: + t = op[1] + a = Q(op[2], op[3]) + need(a, "invertible scale") + rows[t] = {key: a*value for key, value in rows[t].items()} + + +def cone_supports(word, n, v, low): + """Forward restricted columns, plus row covectors propagated through inverses.""" + main = word["A"]+word["cut"]+word["B"] + response = [{r: Q(1)} if r >= 2*v else {} for r in range(n)] + scalar(response, main) + dirty = [response[r].copy() if v <= r < 2*v else {} for r in range(n)] + scalar(dirty, word["precondition"]) + compensation = [["add", r, k, -a.numerator, a.denominator, []] + for r in range(v, 2*v) for k, a in sorted(dirty[r].items())] + prefix = word["precondition"]+compensation+main + columns = [{r: Q(1)} if r in low else {} for r in range(n)] + scalar(columns, prefix) + inverses = {q: {q: Q(1)} for q in low} + for op in prefix: + if op[0] == "add": + t, s = op[1:3] + a = Q(op[3], op[4]) + for row in inverses.values(): + if t in row: + new = row.get(s, Q(0))-a*row[t] + if new: + row[s] = new + else: + row.pop(s, None) + else: + t = op[1] + a = Q(op[2], op[3]) + for row in inverses.values(): + if t in row: + row[t] /= a + return {q: sorted((set(inverses[q]) | {k for k in range(n) if q in columns[k]})-{q}) + for q in low} + + +def build(word): + v, n = 112, 704 + fixed = {} + for q in range(n): + start = frame([word["ports"][q]]) if q < v else 1 + if str(q) in word["start_extra"]: + start = frame(word["start_extra"][str(q)]) + if v <= q < 2*v: + p = word["ports"][q-v] + end = sum(1 << x for x in range(512) if (x & p).bit_count() % 2 == 0) + else: + end = FULL + if str(q) in word["helper_final"]: + end = frame(word["helper_final"][str(q)]) + fixed[("S", q)], fixed[("E", q)] = start, end + low = {int(q): frame(x) for q, x in word["helper_final"].items()} + cones = cone_supports(word, n, v, low) + levels = {int(t): frame(x) for t, x in word["target_levels"].items()} + pins = {q: frame(x) for q, x in zip(word["centers"], word["center_frames"])} + need(len(pins) == 8, "independent centre count") + for t in range(v): + need(v+t not in pins, "centre/target collision") + pins[v+t] = levels.get(t, 1) + for q, f in pins.items(): + fixed[("P", q)] = f + centres = [] + for q, f in zip(word["centers"], word["center_frames"]): + cur = frame(f) + served = {levels.get(op[1]-v, 1) for op in word["cut"] if op[2] == q} + for target in sorted(served, key=lambda x: -dimension(x)): + need(target & ~cur == 0, "independent centre descent") + if target != cur: + centres.append(dimension(cur)-dimension(target)) + cur = target + tail = [word["cleanup"][i][:-1]+[f] for i, f in word["early_cleanup"]] + operations = word["A"]+word["B"]+tail + nA, nB = len(word["A"]), len(word["B"]) + chains = {q: [("S", q)] for q in range(n)} + order = [("S", q) for q in range(n)] + boundaries = {} + for i, op in enumerate(operations): + if i == nA: + for q in pins: + node = ("P", q) + chains[q].append(node) + order.append(node) + if i == nA+nB: + boundaries = {q: chains[q][-1] for q in range(n)} + node = ("G", i) + order.append(node) + for q in operands(op): + chains[q].append(node) + for q in range(n): + node = ("E", q) + chains[q].append(node) + order.append(node) + need(len(operations) > nA+nB, "selected word must have tail events") + edges = Counter((a, b) for ch in chains.values() for a, b in zip(ch, ch[1:])) + cone_edges = sorted({(boundaries[k], ("E",q)) for q,support in cones.items() for k in support}) + for edge in cone_edges: + edges.setdefault(edge, 0) + original_fixed = dict(fixed) + for q in low: + del fixed[("E",q)] + pred, succ = defaultdict(set), defaultdict(set) + for a, b in edges: + pred[b].add(a) + succ[a].add(b) + lo, hi = {}, {} + for node in order: + lower = 1 + for p in pred[node]: + lower = join(lower, lo[p]) + lo[node] = fixed.get(node, lower) + need(lower & ~lo[node] == 0, "independent fixed lower bound") + for node in reversed(order): + upper = FULL + for child in succ[node]: + upper &= hi[child] + hi[node] = fixed.get(node, upper) + need(hi[node] & ~upper == 0 and lo[node] & ~hi[node] == 0, "independent upper bound") + given = {**original_fixed, **{("G", i): frame(op[-1]) for i, op in enumerate(operations)}} + domains = {node: interval(lo[node],hi[node]) for node in order if lo[node]!=hi[node]} + profile = Counter(centres) + for (a, b), mult in edges.items(): + need(given[a] & ~given[b] == 0, "independent baseline nesting") + d = dimension(given[b])-dimension(given[a]) + if d and mult: + profile[d] += mult + need(dict(profile) == U.PROFILE, "independent baseline profile") + for node, f in given.items(): + need(lo[node] & ~f == 0 and f & ~hi[node] == 0, "independent given frame interval") + unseen, comps = set(domains), [] + while unseen: + start = min(unseen) + todo, comp = [start], set() + while todo: + node = todo.pop() + if node not in unseen: + continue + unseen.remove(node) + comp.add(node) + todo.extend((pred[node] | succ[node]) & unseen) + comps.append(sorted(comp)) + graph = {"nodes_sha256": U.digest([[list(n), lo[n], hi[n]] for n in sorted(lo)]), + "domains_sha256": U.digest([[list(n), sorted(domains[n])] for n in sorted(domains)]), + "edges_sha256": U.digest([[list(a), list(b), k] for (a, b), k in sorted(edges.items())]), + "cones_sha256": U.digest([[q,support] for q,support in sorted(cones.items())]), + "node_count": len(lo), "edge_count": len(edges), "cone_helpers": len(cones), "cone_edges": len(cone_edges)} + return dict(lo=lo, hi=hi, given=given, domains=domains, edges=edges, comps=comps, + graph=graph, centres=centres, chains=chains, original_caps=low, cones=cones) + + +def ceil_sqrt(n): + r = isqrt(n) + return r + int(r*r != n) + + +@lru_cache(None) +def child(r, a): + """Enclose (r/73)*(73/r)^a with dyadic exponent brackets and integer square roots.""" + need(1 <= r <= 73 and 0 <= a < 1, "root oracle domain") + lo = (73*SCALE)//r + hi = (73*SCALE+r-1)//r + integer_base = (lo, hi) + roots = [] + for _ in range(BITS): + lo, hi = isqrt(lo*SCALE), ceil_sqrt(hi*SCALE) + roots.append((lo, hi)) + power = (a.numerator << BITS)//a.denominator + def evaluate(k): + need(0 <= k <= 1 << BITS, "dyadic exponent bracket") + if k == 1 << BITS: + return integer_base + lower = upper = SCALE + for j, (left, right) in enumerate(roots, 1): + if (k >> (BITS-j)) & 1: + lower = (lower*left)//SCALE + upper = (upper*right+SCALE-1)//SCALE + return lower, upper + return Q(r*evaluate(power)[0], 73*SCALE), Q(r*evaluate(power+1)[1], 73*SCALE) + + +def charges(a): + costs={d:child(d,a) for d in RANKS} + idle=child(51,a) + return {d:(73*(costs[d][0]-Q(d,51)*idle[1]), + 73*(costs[d][1]-Q(d,51)*idle[0])) for d in RANKS} + + +def check(data, duals, bounds): + need(len(duals["components"]) == len(data["comps"]), "independent component coverage") + stats = Counter() + residuals = set() + for comp, record in zip(data["comps"], duals["components"]): + need(record["first"] == json.dumps(comp[0]) and record["nodes"] == len(comp), "independent component identity") + members = set(comp) + domain = data["domains"] + unary = {n: {f: Counter() for f in domain[n]} for n in comp} + pairs = {} + for (a, b), mult in data["edges"].items(): + if a in members and b in members: + pairs[(a, b)] = mult + elif a in members: + for f in domain[a]: + d = dimension(data["given"][b])-dimension(f) + need(f & ~data["given"][b] == 0, "independent unary nesting") + if d: + unary[a][f][d] += mult + elif b in members: + for f in domain[b]: + d = dimension(f)-dimension(data["given"][a]) + need(data["given"][a] & ~f == 0, "independent unary nesting") + if d: + unary[b][f][d] += mult + rows = {json.dumps(("N", n)) for n in comp} + touching = defaultdict(list) + for a, b in pairs: + for side, node in enumerate((a, b)): + touching[node].append((a, b, side)) + rows.update(json.dumps(("M", a, b, side, canonical_frame(f))) for f in domain[node]) + need(set(record["duals"]) <= rows, "independent unknown dual row") + q = {k: {int(d): Q(v) for d, v in vec.items()} for k, vec in record["duals"].items()} + need(all(d in RANKS for vec in q.values() for d in vec), "independent dual coordinate") + def add_to(vec, key, sign): + for d, v in q.get(json.dumps(key), {}).items(): + vec[d] = vec.get(d, Q(0))+sign*v + def accept(vec): + clean = {d: Q(vec.get(d, 0)) for d in RANKS} + if any(clean.values()): + for bound in bounds: + value = sum((v*bound[d][0 if v > 0 else 1] for d, v in clean.items() if v), Q(0)) + need(value > 0, "independent reduced cost") + stats["positive"] += 1 + else: + stats["zero"] += 1 + residuals.add(tuple(str(clean[d]) for d in RANKS)) + stats["columns"] += 1 + objective, baseline = Counter(), Counter() + for node in comp: + add_to(objective, ("N", node), 1) + baseline.update(unary[node][data["given"][node]]) + for f in domain[node]: + vec = dict(unary[node][f]) + add_to(vec, ("N", node), -1) + for a, b, side in touching[node]: + add_to(vec, ("M", a, b, side, canonical_frame(f)), 1) + accept(vec) + for (a, b), mult in pairs.items(): + d = dimension(data["given"][b])-dimension(data["given"][a]) + if d: + baseline[d] += mult + for left in domain[a]: + for right in domain[b]: + if left & ~right: + continue + d = dimension(right)-dimension(left) + vec = {d: mult} if d else {} + add_to(vec, ("M", a, b, 0, canonical_frame(left)), -1) + add_to(vec, ("M", a, b, 1, canonical_frame(right)), -1) + accept(vec) + need(all(objective[d] == baseline[d] for d in RANKS), "independent exact primal/dual identity") + stats.update(components=1, rows=len(rows)) + stats["distinct_reduced_vectors"] = len(residuals) + return dict(stats) + + +def main(): + U.source_bindings() + expected=U.parse((HERE/"EXPECTED.json").read_bytes()) + data=build(U.word()) + need(data["graph"]==expected["graph"],"independent complete graph differs") + dual=U.duals() + need(U.digest(dual)==expected["duals_sha256"],"independent dual binding") + primal=U.primal_data() + need(U.digest(primal)==expected["primal_sha256"],"independent primal binding") + need(set(primal["assignment"])=={json.dumps(n) for n in data["domains"]},"independent primal domain") + for n,choices in data["domains"].items(): + f=frame(primal["assignment"][json.dumps(n)]) + need(f in choices,"independent primal choice") + data["given"][n]=f + profile=Counter(data["centres"]) + for (a,b),mult in data["edges"].items(): + left,right=data["given"][a],data["given"][b] + need(left & ~right==0,"independent primal containment, including cones") + d=dimension(right)-dimension(left) + if d and mult:profile[d]+=mult + need(dict(profile)=={1:2400,2:446,3:416,4:142,5:82,8:8},"independent complete primal bill") + need({str(r):n for r,n in sorted(profile.items())}==expected["profile"]==primal["profile"],"independent profile fields") + free_ends=sorted(n[1] for n in data["domains"] if n[0]=="E") + need(free_ends==expected["free_ends"] and len(free_ends)==78,"independent endpoint coverage") + forced=sorted(set(data["original_caps"])-set(free_ends)) + need(forced==expected["forced_ends"] and len(forced)==0,"independent forced ends") + intervals=Counter((dimension(data["lo"][("E",q)]),dimension(data["hi"][("E",q)]),len(data["domains"][("E",q)])) for q in free_ends) + need(intervals=={(4,9,374):32,(7,9,5):46},"independent complete unrestricted end intervals") + need(expected["endpoint_intervals"]==[{"lower_dimension":a,"upper_dimension":b,"choices":c,"count":n} for (a,b,c),n in sorted(intervals.items())],"independent endpoint interval receipt") + min_mass=5586+sum(dimension(data["lo"][("E",q)])-dimension(cap) for q,cap in data["original_caps"].items()) + max_mass=5586+sum(9-dimension(cap) for cap in data["original_caps"].values()) + need([min_mass,max_mass]==expected["all_assignment_local_mass_interval"]==[5540,5792],"independent all-assignment mass") + need([7232-max_mass,7232-min_mass]==expected["all_assignment_idle_mass_interval"]==[1440,1692],"independent nonnegative idle for all assignments") + changed=sorted(q for q,cap in data["original_caps"].items() if data["given"][("E",q)]!=cap) + need(changed==expected["attaining_changed_ends"]==[574,575,580,581],"independent attaining ends") + need(expected["gates"]==5413 and expected["free_gates"]==len(data["domains"])-78==2589,"independent gate coverage") + for r in range(1,73): + lo,hi=child(r,Q(1,2)) + need(lo*lo<=Q(r,73)<=hi*hi,"square-root oracle calibration") + need(child(37,1-Q(1,1<<100))[1]>=1,"dyadic carry") + lo,hi=map(Q,expected["a_bracket"]) + need(BASE_HI1,"independent full ceiling sign") + need(str(hi/(1+hi))==expected["kappa_cap"] and str(TARGET)==expected["target_a"],"independent planning fields") + print("PASS_K8_UNRESTRICTED_END_INDEPENDENT", "components="+str(stats["components"]), + "columns="+str(stats["columns"]),"root_calibrations=72","graph_and_duality_match=True") + + +if __name__=="__main__":main() diff --git a/research/selected-k8-unrestricted-ends/materialize.py b/research/selected-k8-unrestricted-ends/materialize.py new file mode 100644 index 0000000000..bbef20cbcb --- /dev/null +++ b/research/selected-k8-unrestricted-ends/materialize.py @@ -0,0 +1,40 @@ +"""Exact candidate parsing and native-word annotations; no solver is used. + +Gareth Davidson with OpenAI Codex assistance. Apache-2.0. +""" +from collections import Counter +from copy import deepcopy +import json + + +def primal(U, model): + data = U.primal_data() + raw = data["assignment"] + U.need(set(raw) == {json.dumps(n) for n in model.domain}, "complete primal node coverage") + assignment = {} + for node, domain in model.domain.items(): + f = tuple(raw[json.dumps(node)]) + U.need(f in domain, "primal frame outside complete domain") + assignment[node] = f + profile = model.profile(assignment) + U.need(profile == {int(r): n for r, n in data["profile"].items()}, "primal profile") + return assignment, profile + + +def native_word(word, model, assignment): + result = deepcopy(word) + for i in range(len(word["A"])): + result["A"][i][-1] = list(model.frame_of(("G", i), assignment)) + for i in range(len(word["B"])): + result["B"][i][-1] = list(model.frame_of(("G", model.nA+i), assignment)) + for i in range(len(word["early_cleanup"])): + result["early_cleanup"][i][1] = list(model.frame_of(("G", model.nA+model.nB+i), assignment)) + for q in model.original_caps: + result["helper_final"][str(q)] = list(model.frame_of(("E", q), assignment)) + profile = model.profile(assignment) + widths = Counter(len(model.frame_of(("E", q), assignment))-len(model.fixed_frames[("S", q)]) + for q in range(2*model.v, model.n)) + result["report"].update(local_profile={str(r): n for r, n in profile.items()}, + local_rank_mass=sum(r*n for r, n in profile.items()), + width_inventory={str(r): n for r, n in sorted(widths.items())}) + return result diff --git a/research/selected-k8-unrestricted-ends/model.py b/research/selected-k8-unrestricted-ends/model.py new file mode 100644 index 0000000000..8ce020620d --- /dev/null +++ b/research/selected-k8-unrestricted-ends/model.py @@ -0,0 +1,161 @@ +"""Unrestricted helper terminal frames, with complete frame domains and coupled cones. + +Extends navinor's unchanged frame model in references/frame_model.py. +Gareth Davidson with OpenAI Codex assistance. Apache-2.0. +""" +from collections import defaultdict +from fractions import Fraction as Q +from pathlib import Path +from types import ModuleType + +HERE = Path(__file__).resolve().parent +M = ModuleType("retained_frame_model") +exec(compile((HERE / "references/frame_model.py").read_bytes(), + str(HERE / "references/frame_model.py"), "exec", optimize=0), M.__dict__) + + +def require(ok, why): + if not ok: + raise ValueError(why) + + +def cone_supports(word, n, v): + """Separate support for every low-end helper; do not merge their end caps.""" + ident = lambda: [{k: Q(1)} for k in range(n)] + main = word["A"] + word["cut"] + word["B"] + raw = ident() + for event in main: + M.apply(event, raw) + dirt = [{} for _ in range(n)] + for y in range(v, 2 * v): + dirt[y] = {k: a for k, a in raw[y].items() if k >= 2 * v} + for event in word["precondition"]: + M.apply(event, dirt) + compensation = [["add", y, k, -a.numerator, a.denominator, []] + for y in range(v, 2 * v) for k, a in sorted(dirt[y].items())] + prefix = word["precondition"] + compensation + main + direct, inverse = ident(), ident() + for event in prefix: + M.apply(event, direct) + for event in reversed(prefix): + M.apply(M.invert(event), inverse) + return {int(q): sorted((set(inverse[int(q)]) | + {k for k in range(n) if int(q) in direct[k]}) - {int(q)}) + for q in word["helper_final"]} + +# Discovery extension: enumerate quotient spaces by adjoining generators, +# not by all subsets of their nonzero vectors. Exact domains, no sampling. +from functools import lru_cache +@lru_cache(None) +def quotient_spaces(k): + require(0 <= k <= 5, "quotient outside declared finite domain") + seen = {()}; queue = [()] + for F in queue: + for x in range(1, 1 << k): + G = M.basis(F + (x,)) + if G not in seen: + seen.add(G); queue.append(G) + return tuple(sorted(seen, key=lambda F: (len(F), F))) + +@lru_cache(None) +def complete_interval(lo, hi): + require(M.contained(lo, hi), "empty interval") + comp=[]; cur=lo + for x in hi: + enlarged=M.basis(cur+(x,)) + if len(enlarged)>len(cur): comp.append(x);cur=enlarged + out=[] + for F in quotient_spaces(len(comp)): + lifted=[] + for x in F: + y=0 + for i,v in enumerate(comp): + if x >> i & 1:y ^= v + lifted.append(y) + out.append(M.basis(lo+tuple(lifted))) + return sorted(out,key=lambda F:(len(F),F)) + +@lru_cache(None) +def span_bits(F): + values=[0] + for x in F:values += [y^x for y in values] + return sum(1<1-1e-8: + chosen_by_node[key[1]].append(key[2]) + for node,chosen in chosen_by_node.items(): + if len(chosen)==1:candidate[node]=chosen[0] + report['components'].append({'first':comp[0],'nodes':len(comp),'rows':len(rows),'columns':len(cols),'fractional_columns':fractional,'numeric_objective':obj}) + out['components'].append({'first':json.dumps(comp[0]),'nodes':len(comp),'duals':{json.dumps(rows[i]):{str(d):str(z) for d,z in sorted(vec.items())} for i,vec in sorted(q.items())}}) + if index%20==0 or fractional:print(index,len(comp),len(cols),'fractional',fractional,flush=True) + full=len(candidate)==len(model.domain) + report['complete_integral_candidate']=full + report['symbolic_component_objective']={str(d):str(total[d]) for d in RANKS} + if full: + profile=model.profile(candidate) + report['candidate_profile']=profile + report['changed_endpoints']=[n[1] for n in candidate if n[0]=='E' and candidate[n]!=model.original_caps[n[1]]] + report['changed_gate_frames']=sum(n[0]=='G' and candidate[n]!=model.given[n[1]] for n in candidate) + primal={'assignment':{json.dumps(n):list(fr) for n,fr in sorted(candidate.items())},'profile':profile} + (HERE/'PRIMAL.json.gz').write_bytes(gzip.compress(json.dumps(primal,sort_keys=True,separators=(',',':')).encode(),mtime=0)) + data=json.dumps(out,sort_keys=True,separators=(',',':')).encode() + (HERE/'DUALS.json.gz').write_bytes(gzip.compress(data,mtime=0)) + report['canonical_duals_sha256']=hashlib.sha256(data).hexdigest() + (HERE/'DISCOVERY.json').write_text(json.dumps(report,indent=2)+'\n') + print('NOMINATED_NOT_CERTIFIED',len(out['components']),full,report.get('candidate_profile'),report.get('changed_endpoints'),flush=True) + +if __name__=='__main__':main() diff --git a/research/selected-k8-unrestricted-ends/references/CEILING.md b/research/selected-k8-unrestricted-ends/references/CEILING.md new file mode 100644 index 0000000000..f5f742f819 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/references/CEILING.md @@ -0,0 +1,108 @@ +# Packing ceiling and target budget for the selected complex local word + +**Scoped obstruction and planning tool. No new κ; the selected record is unchanged.** + +The selected complex supplier (#1094) fixes a local word with this paid profile per call: +`{1:2412, 2:418, 3:432, 4:142, 5:82, 8:8}`, local mass 5,586. Everything else in the record is +idle-remainder packing on 896 live data families per nine-stage replica (2 × 4 pairs × 112 ports, +all 492 helpers hosted). + +Under PR1012's coverage identity, paid mass is exactly `72·W + 64·N`, so each call carries 1,646 units +of idle mass. Every child of rank `r` costs `(r/73)^(1−a) = r·r^(−a)·73^(a−1)`, which is non-increasing +per unit of mass in `r`. So **no** idle histogram beats putting all idle mass into (fractional) children +of the largest rank allowed by the outer halving guard, `R = 51` (73² > 2·51²). + +## Results (exact rational intervals, `verify.py`) + +| Quantity | Value | +|---|---| +| Ceiling for any hosting, owner packing or idle-remainder change of this word | **a < 0.001690054109089** | +| Implied κ bound (`κ < a/(1+a)` when the complex side binds) | **κ < 0.001687202646** | +| Maximum gain over the selected κ 0.001672660197076918 | **+0.869%** | +| Selected endpoint / relaxation at the endpoint | below the ceiling; actual moment ≥ relaxation | +| Previous record #1042 | same paid local profile plus an admissible idle histogram (derived idle `{1:2249, 2:1, 3:400, 7:3, 16:47, 48:4850}` matches its README); endpoint below the same ceiling | + +This updates the fixed-word ceilings computed for earlier words +([static44](../static44-packing-ceiling/README.md), PR525, PR643) to the selected hosted T16/T37 line. It +uses the coverage law instead of a dual certificate. At the level of this cost decomposition, #1042→#1094 keeps the local paid profile and changes the +idle contribution. This arithmetic check does not by itself establish identical circuits or attribute every +implementation change to packing. Less than 0.87% of packing headroom remains under the stated model. + +### What a local word must pay for the planning target a = 1/99 + +Rewrite `relax(a) ≤ 1` as `Σ n_r p_r(a) ≤ B(a)`. Here `p_r(a) = (r/73)^(1−a) − r(51/73)^(1−a)/51` is the +excess of a local rank-r child over ideal idle mass, and `B(a) = w − (72w+64)(51/73)^(1−a)/51` is the +budget per call. + +| a | Budget B | Selected word's excess spend | Ratio | +|---|---:|---:|---:| +| selected endpoint 0.0016755 | 0.42752 | 0.42330 | 0.990 | +| target 1/99 | 0.12753 | 2.59681 | **20.4** | + +At a = 1/99, the selected word's excess spend is 20.4 times the budget. **Even deleting all 2,412 rank-1 +children per call, with everything else fixed, cannot reach it.** The allowed rank-1 count is negative. +With 112 ports and this nine-stage template, a target-scale gain needs a local word whose fully priced +excess spend is about 95% lower. Otherwise the coverage law itself must change: more unpaid coordinates +per family, a smaller 64-per-call centre charge, or more families per call. Helper-inventory proposals +can be screened against these numbers before any network is built: `ceiling.ceiling(local, 73, 896, 9, 64)` +takes a per-call local profile. + +### Ideal lever budgets + +`levers.py` changes one premise at a time and reports the packing ceiling. These are favorable relaxations +that omit the costs of realizing each lever. + +| Lever | Ceiling × | κ cap | +|---|---:|---:| +| Centre path free (no rank-8 copies, no 64-per-call charge) | 2.80 | 0.00472 | +| Centre path shared by two calls | 1.90 | 0.00320 | +| Local mass as rank-16 children | 2.31 | 0.00389 | +| Local mass as rank-8 children | 1.62 | 0.00273 | +| Two unpaid coordinates per live family | 3.77 | 0.00634 | +| Centre free and rank-16 children | 6.51 | 0.01089 | + +## Scope and limits + +- The bound holds for one fixed paid local profile (in particular, for a fixed local word), 112 ports, the nine-stage four-pair + template, the coverage law and the outer halving guard. It allows fractional counts and every repacking, + without checking physical realizability. +- It does **not** bound other local words. Many open claims above the selected κ (for example #1148's + joint-entrance word and its descendants, all ≤ 0.0016759) change the local word, so they are outside it. + Changed port counts, templates, coverage laws, centre charges or outer recipes are also outside it. +- `κ < a/(1+a)` is the retained balanced reduction's planning ceiling. The actual seven-step recipe gives + slightly less. +- Four controls run: + - an idle-rank cap of 52 is rejected; + - a local mass beyond the coverage law is rejected; + - one extra rank-1 child lowers the ceiling; + - 25 sampled integer idle histograms all have exact moment above one at the ceiling. + +## Reproduce + +```sh +python3 -I -B research/complex-local-word-ceiling/verify.py # ~10 s, PASS_COMPLEX_LOCAL_WORD_CEILING +python3 scripts/research_package.py --package research/complex-local-word-ceiling +python3 -I -B research/complex-local-word-ceiling/levers.py # ~5 s, planning budgets +``` + +`verify.py --write` regenerates `RESULT.json`. The exact arithmetic in `ceiling.py` uses the standard +library only: atanh logarithm chains, Taylor exponentials with remainder, and outward rounding to 2⁻²⁵⁶. + +## Open next questions + +- **What is the ceiling of each pending local word?** The ceiling separates packing headroom from + word gains in the review queue. A first step is to run `ceiling()` on the per-call local profiles of + #1148/#1169/#1218, after subtracting their idle histograms. The blocker is that each claim's idle + histogram must be extracted from its package. +- **How does the target budget scale with the port count V?** `B(a)` grows linearly with families per call. + Whether a decoder's excess spend grows more slowly decides if wider words can help. A first step is to + fit `Σ n_r p_r` against V across the recorded complex words (R439–R560 lineage). The blocker is per-call + local profiles for different V on a comparable template. + +## Credit + +The coverage identity is PR1012's. The fixed-word packing-ceiling idea comes from the static44, PR525 and +PR643 lineage, and the catalogue mixture bound from Ali Romman's +[heterogeneous-owner-assembly](../heterogeneous-owner-assembly/README.md). The selected construction +credits are in its review. Prepared by Douglas Colkitt with substantial Claude (Anthropic) assistance. +Apache-2.0. diff --git a/research/selected-k8-unrestricted-ends/references/END-RECIPE.json b/research/selected-k8-unrestricted-ends/references/END-RECIPE.json new file mode 100644 index 0000000000..7af7b6341c --- /dev/null +++ b/research/selected-k8-unrestricted-ends/references/END-RECIPE.json @@ -0,0 +1,242 @@ +{ + "ends": [ + [ + 574, + [ + 256, + 128, + 96, + 16, + 8, + 4, + 2, + 1 + ], + [ + 256, + 128, + 96, + 17, + 9, + 5, + 3 + ] + ], + [ + 575, + [ + 256, + 128, + 96, + 16, + 8, + 4, + 2, + 1 + ], + [ + 256, + 128, + 96, + 17, + 9, + 5, + 3 + ] + ] + ], + "B_frames": [ + [ + 994, + [ + 260, + 130, + 96, + 20, + 10, + 1 + ], + [ + 261, + 131, + 96, + 20, + 10 + ] + ], + [ + 995, + [ + 258, + 132, + 96, + 20, + 10, + 1 + ], + [ + 259, + 133, + 96, + 20, + 10 + ] + ], + [ + 1026, + [ + 264, + 137, + 96, + 24, + 4, + 3 + ], + [ + 268, + 137, + 96, + 24, + 3 + ] + ], + [ + 1027, + [ + 265, + 136, + 96, + 24, + 4, + 3 + ], + [ + 265, + 140, + 96, + 24, + 3 + ] + ], + [ + 1106, + [ + 260, + 130, + 96, + 20, + 10, + 1 + ], + [ + 261, + 131, + 96, + 20, + 10 + ] + ], + [ + 1107, + [ + 258, + 132, + 96, + 20, + 10, + 1 + ], + [ + 259, + 133, + 96, + 20, + 10 + ] + ], + [ + 1138, + [ + 264, + 137, + 96, + 24, + 4, + 3 + ], + [ + 268, + 137, + 96, + 24, + 3 + ] + ], + [ + 1139, + [ + 265, + 136, + 96, + 24, + 4, + 3 + ], + [ + 265, + 140, + 96, + 24, + 3 + ] + ] + ], + "early_cleanup": [ + [ + 93, + 93, + [ + 256, + 128, + 96, + 16, + 8, + 4, + 2, + 1 + ], + [ + 256, + 128, + 96, + 17, + 9, + 5, + 3 + ] + ], + [ + 94, + 94, + [ + 256, + 128, + 96, + 16, + 8, + 4, + 2, + 1 + ], + [ + 256, + 128, + 96, + 17, + 9, + 5, + 3 + ] + ] + ] +} diff --git a/research/selected-k8-unrestricted-ends/references/END-WITNESS.md b/research/selected-k8-unrestricted-ends/references/END-WITNESS.md new file mode 100644 index 0000000000..306ec13362 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/references/END-WITNESS.md @@ -0,0 +1,98 @@ +# Conditional kappa from smaller ends on the k8 word + +This finite construction certifies + +**κ = 0.001672404744903063**, + +or `1672404744903063 / 10^18`. The conservative calculation gives +`0.001672404742051193`. It improves the pinned PR1031 construction +`0.001672167430672016` by exactly `237314231047 / 10^18`. The base selected +certificate records PR942's `0.001661960547713947`; that selection is unchanged. + +This is a distinct construction, pending review. The last overlap scan found +PR1082 claiming a larger `0.001672653061493085` using the preceding k8 terminal +interface. This package claims a new smaller-end interface with a complete +paid packing, without claiming the highest pending or accepted frontier. + +## What changes + +Alexander Schwartzman's PR1030 helpers 588/589 map to **574/575** in the k8 +word. Their final frames become the dimension-seven space +`span_GF(2){256,128,96,17,9,5,3}`. Eight B frames and two early tails change. +The scalar program, gate order, all entrances and the center interface are +preserved. All twelve literal edits and both endpoint hashes are frozen in +`data/END-RECIPE.json` and `construct.py`. + +The local profile changes from +`{1:2412,2:418,3:432,4:142,5:82,8:8}` to +`{1:2406,2:432,3:424,4:142,5:82,8:8}`. Width per call decreases **3730 -> 3728**; +local rank mass decreases **5586 -> 5584**. Keeping the previous owners fails +the improvement screen: every newly exposed residual is priced. The new +69,120-role map in `data/OWNERS.json.gz` pays those residuals, whole helpers, +copies, spectators, source windows, restores, frame and coefficient work, +physical routing, and every recursive child through the unchanged full invoice. + +The final global profile is +`{1:348779,2:62233,3:61410,4:20459,5:11808,7:7,8:1156,16:16,32:1,48:4864}`. +It has 144 complete invocations, rank mass 1,041,408 and deficit 5,120. The +prefix is **397 < 512** bits and the physical row coefficient is +**16469 < 20161**. The complex supplier binds; PR589 is cited unchanged and +its complete bad-residue bit profile is repriced. + +## Reproduce + +Base: `2921874911956718fcaaaf9396fe8267b3cfa9f0`. PR1031: +`e900534f0beda892c726723524203b97471fb9a3`. PR1030: +`d71857cd0ae7824e935aac17327e4ec27f66322b`. All retained source archives and +348 main files are SHA-256 pinned in `SOURCES.json`. No solver or GitHub fetch +is required for replay; Python 3.12+ with assertions enabled is sufficient. + +From the repository root, with a new output directory: + +```sh +python3 -I -B research/k8-rank7-composition/reproduce.py --work /tmp/k8-rank7-replay +python3 -I -B research/k8-rank7-composition/check_controls.py --replay /tmp/k8-rank7-replay +``` + +Expected markers: + +```text +PASS_K8_RANK7_COMPLETE_REPRODUCTION 0.001672404744903063 +PASS_K8_RANK7_SEMANTIC_CONTROLS 10 +``` + +The command explicitly reuses the frozen parent ancestry in `evidence/ANCESTRY.json` +and `sources/SLOT-NATIVE.tar.gz`. That ancestry was freshly built before +publication: all 21 k8 chain stages, five cold-end control batches, native +programs/wrappers/phases, and all 34 new-slot controls passed. The portable +command checks its receipt and source identities, freshly constructs the +new word and native code, checks every exact scalar column in both +orientations, all frames and wrapper cones, and freshly verifies all phases. +It then replays both the preceding and new T16 controller, source geometry, +full invoice, both exact moment engines and all 47 outer conditions. +It does not rerun the inherited scalar constructors during every replay. + +Both full admissions include 69 admission controls, 12 bit controls, 15 +controller mutations and six independent owner controls. Ten additional +controls reject incomplete tails, invalid read frames/end spaces, false +profiles/widths, duplicate or split helpers, bad slices, restoration of the +preceding larger ends on the new map, and the next outer grid point. + +## Search and mathematical scope + +The changed width inventory is outside PR942's fixed-U8 all-replica theorem. +Searches used seed 32 and stopped at explicit budgets: six greedy epochs, +80 restricted MILPs (three seconds each), two global MILPs (120 seconds +each), one global CP-SAT run (120 seconds), and 12 window searches (18 +seconds each). The global MILPs found no integer witness. The final map is +feasible; neither failed searches nor restricted solver optimality establish +a global packing optimum. Exact domains, completed attempts, accepted moves, +software versions and stopping rules are in `evidence/SEARCH.json.gz`. +Reproduction consumes frozen data and performs independent admission. + +The inherited all-size/compiler, common-label and mutable-source realization, +whole-call hosting, physical implementation, precision/tape, exact recovery, +analytic transfer and bit H1-H5 obligations remain. This is a finite conditional +certificate, not an unconditional theorem or a full Lean proof. Contributor +credit, inherited licenses and substantial AI assistance are recorded in +`NOTICE.md` and the preserved source notices. diff --git a/research/selected-k8-unrestricted-ends/references/FRAME-METHOD.md b/research/selected-k8-unrestricted-ends/references/FRAME-METHOD.md new file mode 100644 index 0000000000..e2ddf660ac --- /dev/null +++ b/research/selected-k8-unrestricted-ends/references/FRAME-METHOD.md @@ -0,0 +1,75 @@ +# Frame reassignment cannot raise the selected X4 complex supplier + +**Scoped negative result. No new κ.** Base `f567884aeb8851b6e794af1184119a3bfbe1e631`, where the selected κ = 0.001661634653669567 comes from #799 with #589 on #555 and the complex side binds. Complex-supplier sprint track, OS seed 28 (see `CLAIM.md`). + +## Claim + +Fix the scalar program of the selected complex word, PR799's X4 word (decompressed content `1e1d99ba…`), which serves all 72 complex calls. Keep its gate list and order, registers, coefficients, start and end frames (so every helper width), cut, centres, target levels, precondition, FULL cleanup and the set of early-cleanup (tail) gates. Let each of its 6,364 A, B and tail gate frames be any subspace of F₂⁹ allowed by the frame contract that `research/gauge44-frames-x/independent/audit_local.py` checks: + +- frames are nested along every register, from its start frame to its end frame; +- centres and targets sit at their centre frame and target level at the start of B; +- for each of the 126 low-end helpers, every register in its inverse-row or dirt-column cone ends B inside that helper's end frame. + +No such assignment admits the native complex saving + + b_next = 832200139425241163957/500000000000000000000000 = 0.001664400278850482327914, + +the next 10⁻²⁴ grid point above the selected endpoint `0.001664400278850482327913`. Every child rank is below 73, so no larger b is admitted either. The pinned outer engine (`outer.py`) requires κ < ε·q = (1−η)q/(1+q) with q = a(1−2η) (`compact_phase_layer`) and a < b (`complex_above_bit`), so κ < b/(1+b). Since b_next/(1+b_next) = 0.0016616346536695670758… lies below the next κ tick 0.001661634653669568, frame reassignment alone cannot raise the selected κ. + +## Proof outline + +1. **Domains.** Forward joins from fixed starts and start-of-B pins give a lower frame `lo`. Backward meets from fixed ends, pins and cone ceilings give an upper frame `hi`. By induction every legal frame lies in `[lo, hi]`. Here `dim(hi/lo) ≤ 3`: 5,163 gates are forced and 1,201 have 2, 5 or 16 choices (965, 206 and 30 gates). The verifier enumerates each interval and checks its size against the Gaussian-binomial count. +2. **Cost.** A strict climb of dimension d along a register is one paid child of rank d (the `audit_local.py` rule). Climbs telescope along each register, so rank mass is fixed. The native moment then depends on the assignment only through C_d = M_d − d·M₁ with M_d = d·(73/d)^b, and C₀ = C₁ = 0. +3. **LP.** Free gates linked along register chains form 140 components. Each component's local-polytope LP has a variable for every (gate, frame) and for every nested frame pair on each merged register edge: 9,483 rows and 12,019 columns in total. Every legal assignment is a 0/1 point. +4. **Exact duals.** Each dual entry is a linear form in C₂…C₉ with integer coefficients. The verifier rebuilds every row, column and cost from the word, then checks every reduced cost. 8,582 are identically zero, and 3,437 are strictly positive under outward rational bounds from both pinned engines (`moment.py`, Mercator series, and `base_two_moment.py`, atanh series). In every component the dual objective equals the selected assignment's cost as an exact coefficient identity. By weak duality the selected frames minimise the local moment. +5. **Global step.** 72 times the local profile plus the remainder {1:1, 3:1, 44:1, 48:2396} reproduces the pinned global profile. Both engines put the global moment strictly above 1 at b_next and strictly below 1 at the selected endpoint. Each call costs at least the selected word, so any reassignment, even a different one in each call, has moment above 1 at b_next. + +The model relaxes the centre equality at the start of B to a charged climb, and it omits native-chain conditions beyond `audit_local.py`. Both choices only enlarge the feasible set, so the bound also covers the stricter native contract. + +## Cross-check against the independent auditor + +`crosscheck.py` draws 12 random legal reassignments (40 frame changes each, seed 28), writes each into the word with the profile the model predicts, and runs the pinned `audit_local.py` unchanged. All 12 pass its exact two-orientation scalar replay and its frame, centre, target and cone checks with the predicted profile. All 12 are strictly costlier at b_next. The auditor refuses a frame below the forward join and a mismatched profile. Receipt: `data/CROSSCHECK.json`. + +## Reproduce + +Python 3.11 or newer, standard library only, assertions on, from the repository root: + +```sh +python3 -B research/complex-x4-frame-bound/verify.py --controls +``` + +Expected final line: `PASS_X4_FRAME_ASSIGNMENT_EXCLUSION controls=6/6`, in about 5 seconds. The six controls must each be rejected: a dropped component, an inflated dual, an omitted frame choice, the accepted endpoint in place of b_next, a legal but costlier baseline, and a changed word. `RESULT.json` is the receipt of this command. + +Optional commands: + +```sh +python3 -B research/complex-x4-frame-bound/crosscheck.py # about 1 minute +python3 -B research/complex-x4-frame-bound/verify.py --word /tmp/x4/jx/FULL-WORD.json.gz +``` + +The second form checks a freshly rebuilt word from `research/gauge44-frames-x/README.md`; the content hash must match. By default the verifier reads the retained replay archive `research/community-frontier799-audit/pr799-replay.tar.gz`, whose hash the maintainer's integration receipt records. + +`gen_duals.py` nominated the duals with HiGHS (highspy 1.15.1, SciPy 1.18.1, NumPy 2.5.4, Python 3.12.14). Two runs wrote byte-identical `data/DUALS.json.gz`. The generator is not part of the proof: `verify.py` imports no solver and trusts no floating-point value. + +Checked on Windows 11 with CPython 3.12.14 and 3.14.7. + +## What this leaves for the complex track + +Per call, 1,745 of the 2,548 rank-1 children, all 56 rank-5 children and the eight centre descents lie on register edges between forced frames. Any κ gain from this supplier needs a scalar change (read sets, gate order, tail membership), new start or end frames (entrances, low ends, widths), or a change to owners and hosting. Frame re-choice on X4 is closed at b_next. + +## Scope + +Not covered: scalar rewrites, gate reordering or read-set exchanges; moving gates into or out of the early cleanup; entrance promotions or any other start or end frame change; owners, hosting and the finite invoice; the bit supplier; other outer theorems. The exclusion holds at b_next for the fixed word. It does not replay the native construction chain. The inherited all-size compiler, common-label and mutable-source realization, whole-call hosting, precision and tape, and analytic hypotheses remain. This is a finite certificate, not a Lean proof. + +## Prior work + +- chafreaky's #557 (`research/frame-domain-ceiling`) introduced complete F₂ domains, this LP relaxation and symbolic exact duals, for the PR551 word. +- ntedvs's #776 (open) applies the method to #626's jp8 and ck words, with tail frames outside its scope. +- Rohansguliani's #815 (open) solves PR699's SW4 word and #626's words with floating-point LP and CP-SAT, with tail frames fixed, and rediscovers #741. +- JointXF reported in #799 that FrameCoal's optimiser reaches the X4 profile. The #799 review keeps that as a search report. This package corroborates it with an exact certificate. + +This package is a new implementation for the native gauge44 word format. Unlike the earlier packages, it frees the 163 early-cleanup frames and derives the low-end cone ceilings from the exact prefix map. + +The X4 word is Jeremy Kothe's #799 construction on chafreaky's #741 frames, BRoute's SW4 exchange, BlockInvert's promotions, the p6n and no-triangle layers and icekylinx's #645 gauge44 factory, with the lineage recorded in `research/gauge44-frames-x/README.md` and `CONTRIBUTORS.md`. + +Prepared for @navinor with substantial assistance from Claude Code. Apache-2.0. No independent human review. diff --git a/research/selected-k8-unrestricted-ends/references/SLOT-PINS.json b/research/selected-k8-unrestricted-ends/references/SLOT-PINS.json new file mode 100644 index 0000000000..2702c368f4 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/references/SLOT-PINS.json @@ -0,0 +1,47 @@ +{ + "base_sha256": "db2c7cfb3f8eee2b76c2e0154fc530520fb4d90cd9511a002cab527b16033b83", + "word_sha256": "c2b294300760e1fd6eeab8c22c4d13e4633dca40e52cac8da0d68163a76e3ca8", + "canonical_sha256": "4ddb29fb9bc6f27e0c0fbfcf19a2a93a3496ad900d0f6d89059d0305c9576c0c", + "program_sha256": { + "forward": "071ecdacc0bb3ac16046aad4119ed551a945cb0ed6c57002a548a3e2232503d8", + "backward": "f36c5831106f5637102c6bedeec76ed2b223c6671ce42fd0eceed9ef24725b23" + }, + "clifford_recipes_sha256": "d0768f2164d5f64a2fdbec422f1cfde4e400818792f1904ca541958377243731", + "slot_controls": [ + "C0_identity", + "donation_after", + "donation_after@236", + "donation_after@238", + "donation_after@434", + "donation_after@436", + "donation_after@439", + "donation_after@444", + "donation_after@446", + "drop_preread", + "drop_preread@236", + "drop_preread@238", + "drop_preread@434", + "drop_preread@436", + "drop_preread@439", + "drop_preread@444", + "drop_preread@446", + "drop_restore", + "drop_restore@236", + "drop_restore@238", + "drop_restore@434", + "drop_restore@436", + "drop_restore@439", + "drop_restore@444", + "drop_restore@446", + "recipe", + "restore_full", + "restore_full@236", + "restore_full@238", + "restore_full@434", + "restore_full@436", + "restore_full@439", + "restore_full@444", + "restore_full@446" + ], + "kappa_decimal": "0.00167166528321877" +} diff --git a/research/selected-k8-unrestricted-ends/references/WORD-LINEAGE.md b/research/selected-k8-unrestricted-ends/references/WORD-LINEAGE.md new file mode 100644 index 0000000000..b9d19db883 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/references/WORD-LINEAGE.md @@ -0,0 +1,101 @@ +# Which word is selected in the PR1042 replay? + +The retained package file `research/gauge44-slots-t16/evidence/local/FULL-WORD.json.gz` +is an **R492 predecessor**, not the selected R480 seven-slot word. Its canonical +contents match `base/cold44/FULL-WORD.json.gz` in the maintainer's selected replay. +The selected word is the archive member **`slots/local/FULL-WORD.json.gz`**. +Five archive members contain that same canonical word. This package provides an +executable inventory and rejects confusing the retained evidence, the pre-slot +R480 word, or a compressed-container digest with the selected word. + +No selected mathematical input was found to be wrong. The original README +already requires freshly built `--local` output, and the selected orchestrator +passes that output explicitly. This is a provenance reconciliation with concrete +rejection controls, not a correction of the accepted conditional bound. + +## Three distinctions checked + +| Object | Retained evidence | Selected archive word | +|---|---:|---:| +| Helper count | 492 | 480 | +| B operations | 1918 | 1846 | +| A operations | 3738 | 3451 | +| Cleanup operations | 28150 | 6796 | + +The selected decoded payload is already compact sorted JSON. Its payload and +canonical SHA-256 both equal the original slot pin +`c2b294300760e1fd6eeab8c22c4d13e4633dca40e52cac8da0d68163a76e3ca8`. +Its committed gzip container SHA-256 is instead +`49596aa4ed4fd36cd4582fd0e8ddeb09fd80370a7d8aea1ede52a135b536d289`. +Both are correct in their respective domains. The verifier accepts recompressed +and reformatted copies when every parsed word field remains identical. It keeps +exact raw hashes for the frozen source archive and its recorded artifact receipts. + +The selected word's own report retains the stage-local status +`EXACT_CLEAN_OWN_Y_EARLY_CENTER_WORD_NOT_ADMITTED`. The later composition receipt +is `PASS_COMPLETE_PR1042_COMPOSITION`. They describe different stages and are +not contradictory. The old PR799 wording in the assembly scope similarly +describes inherited lineage; the explicit selected pointers, T16 receipt and +source-bound profile identify the PR1042 composition. This note does not turn a +stage-local claim into full admission by renaming it. + +## Exact evidence + +The command checks all files listed in the pinned selected-source manifest, +all **458 regular unique archive members**, the **457 artifact digests** in the +producer receipt, all ten recorded construction stages and their source/log +digests, and the selected assembly's identical archived and retained bytes. +It inventories every **35 FULL-WORD member**, including duplicate stages, using +container, decompressed-payload and canonical digests separately. Five aliases +match the selected slot pin; the retained R492 file matches only the historical +`base/cold44` member. + +An additional arithmetic bridge checks the local profile +`{1:2412,2:418,3:432,4:142,5:82,8:8}`, its local rank mass 5586, and its helper-width +inventory. Multiplying that profile by 144 whole invocations and adding the +recorded T16 idle profile reproduces the independent receipt, T16 replay and +assembly profile exactly, with total rank mass **1041408**. The assembly retains +PR589 on the bit side and conditional kappa `1672188119205421/10^18`. + +The complete word inventory, equality classes and exact values are in +`EXPECTED.json`. Eight controls reject the R492 word, the pre-slot R480 word, +an omitted operation, changed idle profile, omitted whole call, false helper +count, wrong digest domain and duplicate JSON. The archive is read in memory; +no tar paths are extracted or executed. + +## Reproduce + +From the repository root, Python 3.10+ standard library: + +```sh +python -I -O -B research/selected1042-lineage-resolution98/verify.py +``` + +Expected: `PASS_SELECTED1042_LINEAGE selected_R=480 retained_R=492 words=35 aliases=5 controls=8`. +The default command writes nothing. `--write-certificate` writes only when no +certificate exists. Every check remains active under `-O`. + +## Scope and provenance + +Base `ba82555c64e1879e4b7decce28186f208fcb8262`, assigned seed98 without reroll. +The selected snapshot is frozen for reproducibility. Later selected frontiers +are outside this investigation. This command checks provenance consistency and +profile arithmetic; it **does not rerun the original native construction**, all +controls, moment engines or outer inequalities, authenticate historical +execution, or prove the full multiplication theorem. It does not prove that a +different word with the same profile is correct. Source hashes and the exact +canonical word pin prevent substituting such a word here. + +The selected construction, source manifests and replay are credited to Jeremy +Kothe, Rohan Arun, Hao Yan and the credited compiler/supplier lineage, with +Douglas Colkitt's maintainer orchestration. The gzip distinction follows the +repository's existing reproducibility policy and Maxime Fleury's earlier audit; +no new general hashing principle is claimed. Concurrent local analysis of the +mutable-leaver cores first noticed the retained R492 evidence path; this package +adds the complete archive reconciliation and profile binding, not that core +optimality result. Prepared for @woklerx with substantial OpenAI Codex assistance. +Apache-2.0; algorithmic crosschecks and AI review are not independent human review. + +Fresh PR1112 independently checks the selected finite invoice, guards and outer +slacks. This package does not repeat that audit; it identifies exact word +artifacts and verifies their provenance and profile linkage. diff --git a/research/selected-k8-unrestricted-ends/references/WORD.json.gz b/research/selected-k8-unrestricted-ends/references/WORD.json.gz new file mode 100644 index 0000000000..723decbca8 Binary files /dev/null and b/research/selected-k8-unrestricted-ends/references/WORD.json.gz differ diff --git a/research/selected-k8-unrestricted-ends/references/audit_local.py b/research/selected-k8-unrestricted-ends/references/audit_local.py new file mode 100644 index 0000000000..4744d8783c --- /dev/null +++ b/research/selected-k8-unrestricted-ends/references/audit_local.py @@ -0,0 +1,171 @@ +"""Independent exact scalar/frame audit of the changed forward supplier. + +This does not import a generator, builder, stored compensation, or price. +All claimed endpoint matrices are derived from the input word's gates. +Optional --main checks the transported boundary against the pinned parent. +Prepared for icekylinx with OpenAI GPT-6 Astra assistance. Apache-2.0. +""" +import argparse,gzip,json,hashlib,time +from pathlib import Path +from fractions import Fraction as F +from collections import Counter + +def require(x,label): + if not x:raise RuntimeError(label) + +def basis(vs): + piv={} + for a in vs: + while a: + bit=a.bit_length()-1 + if bit in piv:a^=piv[bit] + else: + piv[bit]=a;break + for k in sorted(piv): + for j in piv: + if j>k and piv[j]>>k&1:piv[j]^=piv[k] + return tuple(piv[k] for k in sorted(piv,reverse=True)) + +def contained(a,b):return basis(a+b)==b + +def registers(e):return e[1:3] if e[0]=='add' else e[1:2] + +def apply(e,rows,dual=False): + if e[0]=='add': + t,s=e[1:3];q=F(e[3],e[4]);require(t!=s,'self add') + if dual:t,s,q=s,t,-q + dst=rows[t] + for k,x in list(rows[s].items()): + a=dst.get(k,F(0))+q*x + if a:dst[k]=a + else:dst.pop(k,None) + elif e[0]=='scale': + t=e[1];q=F(e[2],e[3]);require(q!=0,'zero scale') + if dual:q=1/q + rows[t]={k:q*x for k,x in rows[t].items()} + else:raise RuntimeError('unknown scalar primitive') + +def invert(e): + r=list(e) + if r[0]=='add':r[3]=-r[3] + else:r[2],r[3]=r[3],r[2] + return r + +def check_parent_interface(word,main): + # Read only the retained boundary data. No builder or local checker is imported. + relative="research/community-k492-audit/pr622/replay/baseline558/complex-global/base/split-centres/CANONICAL-WORD.json.gz" + path=main/relative;raw=path.read_bytes() + require(hashlib.sha256(raw).hexdigest()=="66d3c3c70983224650643a0a05a21ac6c6959f84d0f4528650601016f5a76844",'parent canonical input pin') + parent=json.loads(gzip.decompress(raw)) + tau=lambda x:x^(43 if (x&43).bit_count()%2 else 0) + ports=parent['ports'];v=word['report']['v'] + require(len(ports)==len(set(ports))==v,'parent port count') + require(set(map(tau,word['ports']))==set(ports),'transported source/target ports') + moved={i:ports.index(tau(p)) for i,p in enumerate(word['ports'])} + centers=[moved.get(r,r) for r in word['centers']] + actual=[list(basis([tau(x) for x in frame])) for frame in word['center_frames']] + expected=[parent['frames'][f] for f in parent['center_frames']] + require(len(centers)==len(set(centers))==len(actual)==8,'eight distinct centre carriers') + require(actual==expected and all(len(f)==8 for f in actual),'ordered centre frame interface') + return dict(parent_path=relative,parent_file_sha256=hashlib.sha256(raw).hexdigest(), + transport_tau=43,ordered_frame_bases_match=True,all_ports_match=True, + transported_centers=centers,source_centers=[r for r in centers if r=2*v} + for e in w['precondition']:apply(e,dirt) + compensation=[['add',y,k,-a.numerator,a.denominator,[]] for y in range(v,2*v) for k,a in sorted(dirt[y].items())] + entering=set(map(int,w.get('start_extra',{})));lowends=set(map(int,w.get('helper_final',{}))) + coldends=lowends-entering + require(not any(e[2] in entering for e in compensation),'nonzero entrance response') + require(not any(r in entering|coldends for e in w['precondition']+compensation for r in registers(e)), 'pre-wrapper touch of residual helper') + require(all(e[-1]==[] for e in w['precondition']+compensation),'nonzero frame precondition') + early=w.get('early_cleanup',[]);earlyids={i for i,U in early} + require(len(earlyids)==len(early),'duplicate early cleanup gate') + tail=[w['cleanup'][i][:-1]+[U] for i,U in early] + cleanup=[e for i,e in enumerate(w['cleanup']) if i not in earlyids] + prefix=w['precondition']+compensation+main + program=prefix+tail+cleanup + for dual in (False,True): + actual=ident() + for e in program:apply(e,actual,dual) + expected=ident() + for t in range(v):expected[t if dual else v+t][v+t if dual else t]=F(-1 if dual else 1) + bad=[i for i in range(n) if actual[i]!=expected[i]] + require(not bad,'all-column endpoint failure '+str((dual,bad[:8]))) + print('endpoint', 'dual' if dual else 'forward','PASS',flush=True) + full=basis([1< 1 is a what-if for a changed coverage law only); + * the local word fixes its own paid child profile `local` (per call); + * every remaining unit of mass is an idle/remainder child of rank at most R, where the outer + recipe's halving guard m^2 > 2 R^2 bounds R (R = 51 for m = 73). + +Lemma. For a >= 0, a child of rank r costs (r/m)^(1-a) = r * c(r), with c(r) = r^(-a) m^(a-1) +non-increasing in r. Hence, with idle mass M fixed and idle ranks <= R, every idle histogram has +moment >= the relaxation that puts all of M into (possibly fractional) rank-R children: + + relax(a) = [ sum_local n_r (r/m)^(1-a) + (M/R) (R/m)^(1-a) ] / w (per call). + +The moment is increasing in a. So relax(a*) > 1 certifies that no hosting, owner packing or +idle-remainder change of the given local word, template and outer recipe certifies a saving +>= a*. Under the retained reduction kappa < a/(1+a) when the complex side binds, so +a*/(1+a*) also bounds kappa. This is a bound for the stated model, not for other local words, +templates, coverage laws or outer recipes. + +Exact rational intervals: ln k from atanh chains, exp by Taylor with Lagrange remainder, +outward rounding to 2^-PREC. Standard library only. Douglas Colkitt, with Claude (Anthropic) +assistance. +""" +from fractions import Fraction as Q +from functools import lru_cache +from math import isqrt + +PREC = 256 + + +def require(ok, why): + if not ok: + raise ValueError(why) + + +def down(x): + return Q((x.numerator << PREC) // x.denominator, 1 << PREC) + + +def up(x): + return -down(-x) + + +@lru_cache(None) +def atanh(t): + """Enclosure of atanh(t) for rational 0 < t <= 1/3.""" + require(0 < t <= Q(1, 3), 'atanh range') + s, p, k = Q(0), t, 0 + while True: + term = p / (2 * k + 1) + s += term + p *= t * t + k += 1 + tail = p / ((2 * k + 1) * (1 - t * t)) + if tail < Q(1, 1 << (PREC + 8)): + return down(s), up(s + tail) + + +@lru_cache(None) +def ln(k): + """Enclosure of ln k for an integer k >= 1: ln k = ln(k-1) + 2 atanh(1/(2k-1)).""" + require(isinstance(k, int) and k >= 1, 'ln domain') + if k == 1: + return Q(0), Q(0) + lo, hi = ln(k - 1) + a, b = atanh(Q(1, 2 * k - 1)) + return down(lo + 2 * a), up(hi + 2 * b) + + +def exp(lo, hi): + """Enclosure of exp([lo, hi]) for 0 <= lo <= hi <= 1/2.""" + require(0 <= lo <= hi <= Q(1, 2), 'exp range') + def series(y, upper): + s, t, k = Q(1), Q(1), 0 + while True: + k += 1 + t = t * y / k + s += t + if t * y < Q(1, 1 << (PREC + 8)): + return up(s + 2 * t * y / (k + 1)) if upper else down(s) + return series(lo, False), series(hi, True) + + +def child_cost(r, m, a): + """Enclosure of (r/m)^(1-a) = (r/m) exp(a ln(m/r)).""" + lm, um = ln(m) + lr, ur = ln(r) + e = exp(max(Q(0), a * (lm - ur)), a * (um - lr)) + return down(Q(r, m) * e[0]), up(Q(r, m) * e[1]) + + +def max_idle_rank(m): + """Largest R with m^2 > 2 R^2 (outer halving guard).""" + R = isqrt((m * m - 1) // 2) + while 2 * (R + 1) ** 2 < m * m: + R += 1 + while 2 * R * R >= m * m: + R -= 1 + return R + + +def model(local, m, families, stages, centre, R=None, unpaid=1): + """Per-call quantities. local: {rank: count per call (Fraction ok)}.""" + R = max_idle_rank(m) if R is None else R + require(2 * R * R < m * m, 'idle rank cap violates the halving guard') + require(all(0 < r < m for r in local) and all(n >= 0 for n in local.values()), 'local profile') + w = Q(families, stages) + require(1 <= unpaid < m, 'unpaid coordinates per family') + total = (m - unpaid) * w + centre + local_mass = sum(r * Q(n) for r, n in local.items()) + idle = total - local_mass + require(idle >= 0, 'local word pays more mass than the coverage law allows') + return dict(R=R, w=w, total_mass=total, local_mass=local_mass, idle_mass=idle, deficit=unpaid * w - centre) + + +def relax(local, m, families, stages, centre, a, R=None, unpaid=1): + """Enclosure of the per-call relaxation moment at saving a.""" + q = model(local, m, families, stages, centre, R, unpaid) + lo = hi = Q(0) + for r, n in local.items(): + c = child_cost(r, m, a) + lo, hi = lo + Q(n) * c[0], hi + Q(n) * c[1] + c = child_cost(q['R'], m, a) + k = q['idle_mass'] / q['R'] + lo, hi = lo + k * c[0], hi + k * c[1] + return down(lo / q['w']), up(hi / q['w']) + + +def ceiling(local, m, families, stages, centre, grid=Q(1, 10 ** 15), R=None, unpaid=1): + """Grid bracket [a_lo, a_hi]: relax(a_lo) < 1 < relax(a_hi), certified. a_hi is the ceiling.""" + lo, hi = Q(0), Q(1, 20) + require(relax(local, m, families, stages, centre, hi, R, unpaid)[0] > 1, 'search window too small') + require(relax(local, m, families, stages, centre, lo, R, unpaid)[1] < 1, 'relaxation has no positive saving') + while hi - lo > grid: + mid = Q(int((lo + hi) / 2 / grid)) * grid + if mid <= lo: + mid = lo + grid + v = relax(local, m, families, stages, centre, mid, R, unpaid) + if v[1] < 1: + lo = mid + elif v[0] > 1: + hi = mid + else: + raise ValueError('enclosure too wide to separate the grid point') + return lo, hi diff --git a/research/selected-k8-unrestricted-ends/references/construct.py b/research/selected-k8-unrestricted-ends/references/construct.py new file mode 100644 index 0000000000..5600f92cbb --- /dev/null +++ b/research/selected-k8-unrestricted-ends/references/construct.py @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# Prepared for 1337isnot1337 with substantial OpenAI Codex assistance. +"""Twelve literal frame edits; scalar program and every other field preserved.""" +import argparse,copy,gzip,hashlib,importlib.util,json +from collections import Counter +from pathlib import Path +BASE='c2b294300760e1fd6eeab8c22c4d13e4633dca40e52cac8da0d68163a76e3ca8' +TARGET='f64e0942edc5eb2d45b0a3b068ba942436f35ba9a077ff53d7e4424d1617b2cd' +HERE=Path(__file__).resolve().parent + +def build(path,promotion): + raw=gzip.decompress(path.read_bytes()) + if hashlib.sha256(raw).hexdigest()!=BASE:raise ValueError('source content pin') + w=json.loads(raw);base=copy.deepcopy(w);recipe=json.loads((HERE/'data/END-RECIPE.json').read_bytes()) + if [x[0] for x in recipe['ends']]!=[574,575]:raise ValueError('end sites') + for q,old,new in recipe['ends']: + if w['helper_final'][str(q)]!=old:raise ValueError('old end') + w['helper_final'][str(q)]=new + for i,old,new in recipe['B_frames']: + if w['B'][i][-1]!=old:raise ValueError('old B frame') + w['B'][i][-1]=new + for i,k,old,new in recipe['early_cleanup']: + if w['early_cleanup'][i]!=[k,old]:raise ValueError('old early tail') + w['early_cleanup'][i][1]=new + s=importlib.util.spec_from_file_location('credited_promotion',promotion);m=importlib.util.module_from_spec(s);s.loader.exec_module(m) + H=Counter({int(k):v for k,v in base['report']['local_profile'].items()});H.subtract(m.chain_profile(base));H.update(m.chain_profile(w));H=+H + w['report'].update(local_profile={str(k):v for k,v in sorted(H.items())},local_rank_mass=sum(k*v for k,v in H.items()),width_inventory={str(k):v for k,v in sorted(m.widths(w).items())}) + data=json.dumps(w,sort_keys=True,separators=(',',':')).encode() + if hashlib.sha256(data).hexdigest()!=TARGET:raise ValueError('constructed word pin') + for section in ('A','cut','B','precondition','cleanup'): + if [e[:-1] for e in w[section]]!=[e[:-1] for e in base[section]]:raise ValueError('scalar changed') + return data + +if __name__=='__main__': + ap=argparse.ArgumentParser();ap.add_argument('--input',type=Path,required=True);ap.add_argument('--promotion',type=Path,required=True);ap.add_argument('--output',type=Path,required=True);a=ap.parse_args() + if a.output.exists():raise ValueError('output exists') + data=build(a.input,a.promotion);a.output.write_bytes(gzip.compress(data,mtime=0));print('PASS_K8_RANK7_TWELVE_FRAME_CONSTRUCTION') diff --git a/research/selected-k8-unrestricted-ends/references/frame_model.py b/research/selected-k8-unrestricted-ends/references/frame_model.py new file mode 100644 index 0000000000..33cfb4f404 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/references/frame_model.py @@ -0,0 +1,434 @@ +"""Complete frame-assignment model of a fixed native complex word (standard library only). + +The frame contract is the one checked by research/gauge44-frames-x/independent/audit_local.py: + +* every register has a fixed start frame and a fixed end frame; +* an A, B or tail gate has one frame, shared by its registers, and frames are monotone + (nested) along every register's event sequence; +* centre registers equal their centre frame, and targets their target level, at the start of B; +* for every low-end helper q, every register k in q's inverse-row or dirt-column cone has its + end-of-B frame inside q's end frame; +* each strict climb of dimension d along a register pays one child of rank d, and the eight + centre descents are fixed. + +The scalar program (gate list, order, registers, coefficients, cut, precondition, cleanup) is +fixed. Only the frames of A, B and early-cleanup (tail) gates vary. A climb into a centre or +target pin at the start of B is admitted and charged; the contract requires it to be zero, so +this only enlarges the feasible set. +""" +import gzip +import json +from collections import defaultdict +from fractions import Fraction as F + +H = 9 +FULL = tuple(1 << i for i in range(H - 1, -1, -1)) + + +def basis(vs): + piv = {} + for a in vs: + while a: + bit = a.bit_length() - 1 + if bit in piv: + a ^= piv[bit] + else: + piv[bit] = a + break + for k in sorted(piv): + for j in piv: + if j > k and piv[j] >> k & 1: + piv[j] ^= piv[k] + return tuple(piv[k] for k in sorted(piv, reverse=True)) + + +def contained(a, b): + return basis(list(a) + list(b)) == tuple(b) + + +def join(frames): + return basis([x for f in frames for x in f]) + + +def meet(a, b): + """Zassenhaus intersection of two subspaces of F_2^H.""" + rows = [(u << H) | u for u in a] + [x << H for x in b] + return basis([r for r in basis(rows) if r >> H == 0]) + + +def interval(lo, hi): + """Every subspace F with lo <= F <= hi, by closure over the quotient hi/lo.""" + assert contained(lo, hi), (lo, hi) + comp, cur = [], list(lo) + for x in hi: + if len(basis(cur + [x])) > len(basis(cur)): + comp.append(x) + cur.append(x) + k = len(comp) + assert k <= 4, 'quotient dimension above 4 is not enumerated' + vectors = list(range(1, 1 << k)) + out = [] + for mask in range(1 << len(vectors)): + chosen = {vectors[i] for i in range(len(vectors)) if mask >> i & 1} + if all((a ^ b) in chosen for a in chosen for b in chosen if a != b): + lifted = [] + for a in chosen: + x = 0 + for i in range(k): + if a >> i & 1: + x ^= comp[i] + lifted.append(x) + out.append(basis(list(lo) + lifted)) + assert len(set(out)) == len(out) + return sorted(out, key=lambda f: (len(f), f)) + + +def registers(e): + return tuple(e[1:3]) if e[0] == 'add' else tuple(e[1:2]) + + +def apply(e, rows, dual=False): + if e[0] == 'add': + t, s = e[1:3] + q = F(e[3], e[4]) + if dual: + t, s, q = s, t, -q + dst = rows[t] + for k, x in list(rows[s].items()): + a = dst.get(k, F(0)) + q * x + if a: + dst[k] = a + else: + dst.pop(k, None) + elif e[0] == 'scale': + t = e[1] + q = F(e[2], e[3]) + if dual: + q = 1 / q + rows[t] = {k: q * x for k, x in rows[t].items()} + else: + raise RuntimeError('unknown scalar primitive') + + +def invert(e): + r = list(e) + if r[0] == 'add': + r[3] = -r[3] + else: + r[2], r[3] = r[3], r[2] + return r + + +def cone_ceilings(w, n, v, low_ends): + """End-of-B ceilings implied by the low-end cone conditions of audit_local.py.""" + ident = lambda: [{k: F(1)} for k in range(n)] + main = w['A'] + w['cut'] + w['B'] + raw = ident() + for e in main: + apply(e, raw) + dirt = [{} for _ in range(n)] + for y in range(v, 2 * v): + dirt[y] = {k: a for k, a in raw[y].items() if k >= 2 * v} + for e in w['precondition']: + apply(e, dirt) + compensation = [['add', y, k, -a.numerator, a.denominator, []] + for y in range(v, 2 * v) for k, a in sorted(dirt[y].items())] + prefix = w['precondition'] + compensation + main + p, pinv = ident(), ident() + for e in prefix: + apply(e, p) + for e in reversed(prefix): + apply(invert(e), pinv) + holders = defaultdict(set) + for k in range(n): + for j in p[k]: + holders[j].add(k) + ceil = {} + for q, U in low_ends.items(): + for k in set(pinv[q]) | holders[q]: + if k != q: + ceil[k] = meet(ceil.get(k, FULL), U) + return ceil + + +class Model: + """Event graph, complete domains and components of a native complex word.""" + + def __init__(self, w): + rep = w['report'] + self.v, self.R = v, R = rep['v'], rep['R'] + assert rep['h'] == H + self.n = n = 2 * v + R + end = [FULL] * v + [basis([x for x in range(1, 1 << H) if (x & p).bit_count() % 2 == 0]) + for p in w['ports']] + [FULL] * R + low = {int(q): basis(U) for q, U in w.get('helper_final', {}).items()} + for q, U in low.items(): + assert 2 * v <= q < n + end[q] = U + start = [(p,) for p in w['ports']] + [()] * (v + R) + for q, U in w.get('start_extra', {}).items(): + assert 2 * v <= int(q) < n + start[int(q)] = basis(U) + early = w.get('early_cleanup', []) + assert len({i for i, _ in early}) == len(early) + tail = [w['cleanup'][i][:-1] + [U] for i, U in early] + lev = {int(t): basis(U) for t, U in w.get('target_levels', {}).items()} + pins = {q: basis(U) for q, U in zip(w['centers'], w['center_frames'])} + assert len(pins) == 8 + for t in range(v): + assert v + t not in pins + pins[v + t] = lev.get(t, ()) + self.ceil = cone_ceilings(w, n, v, low) + # centre descents: fixed children, recorded separately (audit_local.py rule) + self.centre_children = [] + for q, U in zip(w['centers'], w['center_frames']): + U = basis(U) + served = {lev.get(e[1] - v, ()) for e in w['cut'] if e[2] == q} + for T in sorted(served, key=lambda x: -len(x)): + assert contained(T, U) + if T != U: + self.centre_children.append(len(U) - len(T)) + U = T + # nodes: ('S',q) start, ('G',i) gate, ('P',q) start-of-B pin, ('E',q) end + gates = [('A', e) for e in w['A']] + [('B', e) for e in w['B']] + [('T', e) for e in tail] + self.gates = gates + self.given = [basis(e[-1]) for _, e in gates] + self.regs = [registers(e) for _, e in gates] + for rs in self.regs: + assert len(set(rs)) == len(rs) and all(0 <= q < n for q in rs) + nA, nB = len(w['A']), len(w['B']) + self.nA, self.nB = nA, nB + fixed = {} + for q in range(n): + fixed[('S', q)] = start[q] + fixed[('E', q)] = end[q] + for q, U in pins.items(): + fixed[('P', q)] = U + chains = defaultdict(list) + for q in range(n): + chains[q].append(('S', q)) + boundary = {} # register -> index in its chain of the last pre-tail node + for i, rs in enumerate(self.regs): + if i == nA: + for q in pins: + chains[q].append(('P', q)) + if i == nA + nB: + for q in range(n): + boundary[q] = len(chains[q]) - 1 + for q in rs: + chains[q].append(('G', i)) + if len(gates) == nA: + for q in pins: + chains[q].append(('P', q)) + if len(gates) <= nA + nB: + for q in range(n): + boundary[q] = len(chains[q]) - 1 + for q in range(n): + chains[q].append(('E', q)) + self.chains = chains + self.fixed_frames = fixed + # forward joins and backward meets + order = [('S', q) for q in range(n)] + for i in range(len(gates)): + if i == nA: + order += [('P', q) for q in pins] + order.append(('G', i)) + if len(gates) == nA: + order += [('P', q) for q in pins] + order += [('E', q) for q in range(n)] + position = {node: k for k, node in enumerate(order)} + pred = defaultdict(list) + succ = defaultdict(list) + for q, ch in chains.items(): + for a, b in zip(ch, ch[1:]): + assert position[a] < position[b] + succ[a].append((q, b)) + pred[b].append((q, a)) + lo, hi = {}, {} + for node in order: + if node in fixed: + lo[node] = fixed[node] + for q, a in pred[node]: + assert contained(lo[a], fixed[node]), ('fixed frame below forward join', node) + else: + lo[node] = join(lo[a] for q, a in pred[node]) + ceil_at = defaultdict(list) # node -> ceilings applying to that node + for q, k in boundary.items(): + if q in self.ceil: + ceil_at[chains[q][k]].append(self.ceil[q]) + for node in reversed(order): + if node in fixed: + hi[node] = fixed[node] + else: + U = FULL + for q, b in succ[node]: + U = meet(U, hi[b]) + for C in ceil_at[node]: + U = meet(U, C) + hi[node] = U + assert contained(lo[node], hi[node]), ('empty domain', node) + for node, Cs in ceil_at.items(): + if node in fixed: + assert all(contained(fixed[node], C) for C in Cs), ('fixed frame above a cone ceiling', node) + self.lo, self.hi = lo, hi + self.domain = {} + for i in range(len(gates)): + node = ('G', i) + if lo[node] != hi[node]: + self.domain[node] = interval(lo[node], hi[node]) + assert self.given[i] in self.domain[node] + else: + assert self.given[i] == lo[node], ('given frame differs from forced frame', i) + # edges, merged by endpoint pair, with integer multiplicity + mult = defaultdict(int) + for q, ch in chains.items(): + for a, b in zip(ch, ch[1:]): + mult[(a, b)] += 1 + self.edges = dict(mult) + + def frame_of(self, node, assignment): + if node in self.fixed_frames: + return self.fixed_frames[node] + if node in self.domain: + return assignment[node] + return self.lo[node] + + def baseline(self): + return {('G', i): self.given[i] for i in range(len(self.gates)) if ('G', i) in self.domain} + + def profile(self, assignment): + """Paid children of an assignment (graph climbs plus fixed centre descents).""" + count = defaultdict(int) + for (a, b), m in self.edges.items(): + A, B = self.frame_of(a, assignment), self.frame_of(b, assignment) + if not contained(A, B): + raise ValueError(('non-monotone', a, b)) + d = len(B) - len(A) + if d: + count[d] += m + for d in self.centre_children: + count[d] += 1 + return dict(sorted(count.items())) + + def components(self): + parent = {node: node for node in self.domain} + + def find(x): + while parent[x] != x: + parent[x] = parent[parent[x]] + x = parent[x] + return x + for (a, b) in self.edges: + if a in self.domain and b in self.domain: + parent[find(a)] = find(b) + groups = defaultdict(list) + for node in self.domain: + groups[find(node)].append(node) + comps = [sorted(g, key=lambda x: x[1]) for g in groups.values()] + return sorted(comps, key=lambda c: c[0][1]) + + def component_problem(self, comp): + """Unary and pairwise rank-count potentials of one component. + + Costs are integer vectors c[0..H]; c[d] counts children of rank d. + Returns (labels, unary, pairs): unary[node][F] collects the edges from the node + to fixed or forced neighbours, and pairs[(a,b)][(F,G)] the merged edges between + two members (only nested pairs F <= G appear). Edges with no free endpoint + belong to no component; fixed_profile() counts them. + """ + members = set(comp) + labels = {node: self.domain[node] for node in comp} + zero = lambda: [0] * (H + 1) + unary = {node: {Fr: zero() for Fr in labels[node]} for node in comp} + pairs = {} + for (a, b), m in self.edges.items(): + ina, inb = a in members, b in members + if not (ina or inb): + continue + if ina and inb: + table = {} + for Fa in labels[a]: + for Fb in labels[b]: + if contained(Fa, Fb): + c = zero() + d = len(Fb) - len(Fa) + if d: + c[d] += m + table[(Fa, Fb)] = c + pairs[(a, b)] = table + elif ina: + Fb = self.frame_of(b, None) + for Fa in labels[a]: + assert contained(Fa, Fb) + d = len(Fb) - len(Fa) + if d: + unary[a][Fa][d] += m + else: + Fa = self.frame_of(a, None) + for Fb in labels[b]: + assert contained(Fa, Fb) + d = len(Fb) - len(Fa) + if d: + unary[b][Fb][d] += m + return labels, unary, pairs + + def fixed_profile(self): + """Children on edges between two fixed or forced nodes, plus centre descents.""" + count = defaultdict(int) + for (a, b), m in self.edges.items(): + if a in self.domain or b in self.domain: + continue + A, B = self.frame_of(a, None), self.frame_of(b, None) + assert contained(A, B) + d = len(B) - len(A) + if d: + count[d] += m + for d in self.centre_children: + count[d] += 1 + return count + + +def lp(labels, unary, pairs): + """Local-polytope LP of one component: min c.z, A z = rhs, z >= 0. + + Rows: ('N', node) normalisation (rhs 1); ('M', a, b, side, frame) marginal of the + merged edge (a, b) at endpoint side 0 (a) or 1 (b) (rhs 0). + Columns: ('x', node, frame) and ('y', a, b, frame_a, frame_b) with F_a <= F_b. + Every literal legal assignment gives a 0/1 feasible point. + """ + rows = [('N', node) for node in sorted(labels)] + for (a, b) in sorted(pairs): + rows += [('M', a, b, 0, Fa) for Fa in labels[a]] + rows += [('M', a, b, 1, Fb) for Fb in labels[b]] + index = {r: i for i, r in enumerate(rows)} + rhs = [1 if r[0] == 'N' else 0 for r in rows] + touching = defaultdict(list) + for (a, b) in sorted(pairs): + touching[a].append((a, b, 0)) + touching[b].append((a, b, 1)) + cols = [] + for node in sorted(labels): + for Fr in labels[node]: + entries = [(index[('N', node)], 1)] + entries += [(index[('M', a, b, side, Fr)], -1) for a, b, side in touching[node]] + cols.append((('x', node, Fr), unary[node][Fr], entries)) + for (a, b) in sorted(pairs): + for (Fa, Fb), c in sorted(pairs[(a, b)].items()): + cols.append((('y', a, b, Fa, Fb), c, + [(index[('M', a, b, 0, Fa)], 1), (index[('M', a, b, 1, Fb)], 1)])) + return rows, rhs, cols + + +def assignment_cost(labels, unary, pairs, assignment): + c = [0] * (H + 1) + for node in labels: + for d, x in enumerate(unary[node][assignment[node]]): + c[d] += x + for (a, b), table in pairs.items(): + for d, x in enumerate(table[(assignment[a], assignment[b])]): + c[d] += x + return c + + +def load_word(raw_gz): + return json.loads(gzip.decompress(raw_gz)) diff --git a/research/selected-k8-unrestricted-ends/references/gen_duals.py b/research/selected-k8-unrestricted-ends/references/gen_duals.py new file mode 100644 index 0000000000..bd85022a44 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/references/gen_duals.py @@ -0,0 +1,149 @@ +"""Nominate symbolic exact duals for every component (solver side; not part of the proof). + +Needs numpy, scipy and highspy. HiGHS solves each component's LP at the excluded +exponent; its optimal basis is then inverted for each rank coordinate C_2..C_9 +separately, so every dual entry is a rational linear form in those charges. The +rational values are checked exactly here and again, independently of any solver, +by verify.py. Output: data/DUALS.json.gz (deterministic). +""" +import argparse +import gzip +import json +import sys +from fractions import Fraction as F +from pathlib import Path + +import highspy +import numpy as np +import scipy.sparse as sp +import scipy.sparse.linalg as spla + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import model as M # noqa: E402 +import verify as V # noqa: E402 + +RANKS = range(2, M.H + 1) + + +def numeric_charges(b): + """C_d / (b * 73^b) as floats; only the solver uses these.""" + x = float(b) + return [0.0, 0.0] + [(d ** (1 - x) - d) / x for d in RANKS] + + +def solve(rows, rhs, cols, gamma): + nr, nc = len(rows), len(cols) + start, index, value = [0], [], [] + cost = [] + for _, c, entries in cols: + cost.append(sum(c[d] * gamma[d] for d in range(len(c)))) + for i, a in sorted(entries): + index.append(i) + value.append(float(a)) + start.append(len(index)) + lp = highspy.HighsLp() + lp.num_col_, lp.num_row_ = nc, nr + lp.col_cost_ = np.array(cost) + lp.col_lower_ = np.zeros(nc) + lp.col_upper_ = np.full(nc, highspy.kHighsInf) + lp.row_lower_ = np.array(rhs, dtype=float) + lp.row_upper_ = np.array(rhs, dtype=float) + lp.a_matrix_.format_ = highspy.MatrixFormat.kColwise + lp.a_matrix_.start_ = np.array(start, dtype=np.int32) + lp.a_matrix_.index_ = np.array(index, dtype=np.int32) + lp.a_matrix_.value_ = np.array(value) + h = highspy.Highs() + h.setOptionValue('output_flag', False) + h.setOptionValue('presolve', 'off') + h.setOptionValue('solver', 'simplex') + h.passModel(lp) + h.run() + assert h.getModelStatus() == highspy.HighsModelStatus.kOptimal, h.modelStatusToString(h.getModelStatus()) + basis = h.getBasis() + sol = h.getSolution() + return h.getInfo().objective_function_value, basis, list(sol.col_value) + + +def symbolic_duals(rows, cols, basis): + basic_cols = [j for j in range(len(cols)) if basis.col_status[j] == highspy.HighsBasisStatus.kBasic] + active_rows = [i for i in range(len(rows)) if basis.row_status[i] != highspy.HighsBasisStatus.kBasic] + assert len(basic_cols) == len(active_rows), (len(basic_cols), len(active_rows)) + rpos = {i: k for k, i in enumerate(active_rows)} + data, ri, ci = [], [], [] + for kc, j in enumerate(basic_cols): + for i, a in cols[j][2]: + if i in rpos: + # transpose: row = basic column, column = active row + ri.append(kc) + ci.append(rpos[i]) + data.append(float(a)) + At = sp.csc_matrix((data, (ri, ci)), shape=(len(basic_cols), len(active_rows))) + lu = spla.splu(At) + q = {} + for d in RANKS: + rhs_d = np.array([float(cols[j][1][d]) for j in basic_cols]) + sol = lu.solve(rhs_d) + for k, i in enumerate(active_rows): + x = F(float(sol[k])).limit_denominator(1 << 20) + if x: + q.setdefault(i, {})[d] = x + # exact check on the basic columns: A_B^T q == c_B coordinate-wise + for j in basic_cols: + key, c, entries = cols[j] + for d in RANKS: + s = sum((a * q.get(i, {}).get(d, 0) for i, a in entries), F(0)) + assert s == c[d], ('rationalised dual is not exact on a basic column', key, d, s, c[d]) + return q + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output', type=Path, default=HERE / 'data' / 'DUALS.json.gz') + args = parser.parse_args() + word, src = V.load_selected_word(V.REPO) + model = M.Model(word) + b = V.excluded_exponent(V.REPO) + gamma = numeric_charges(b) + comps = model.components() + out = {'excluded_b': f'{b.numerator}/{b.denominator}', 'word_content_sha256': src['content_sha256'], + 'components': []} + base_total = [0] * (M.H + 1) + for n, comp in enumerate(comps): + labels, unary, pairs = model.component_problem(comp) + rows, rhs, cols = M.lp(labels, unary, pairs) + base = M.assignment_cost(labels, unary, pairs, {node: model.baseline()[node] for node in comp}) + base_num = sum(base[d] * gamma[d] for d in range(len(base))) + obj, basis, x = solve(rows, rhs, cols, gamma) + gap = base_num - obj + if gap > 1e-7: + frac = [cols[j][0] for j in range(len(cols)) if 1e-9 < x[j] < 1 - 1e-9] + print('component', n, 'LP below baseline by', gap, 'fractional columns', len(frac), flush=True) + q = symbolic_duals(rows, cols, basis) + dual_obj = [0] * (M.H + 1) + for i, vec in q.items(): + if rhs[i]: + for d, x_ in vec.items(): + dual_obj[d] += x_ * rhs[i] + neg = 0 + for key, c, entries in cols: + r = sum((c[d] - sum((a * q.get(i, {}).get(d, 0) for i, a in entries), F(0))) * gamma[d] for d in RANKS) + if r < -1e-9: + neg += 1 + same = all(dual_obj[d] == base[d] for d in RANKS) + print(f'component {n}: nodes={len(comp)} rows={len(rows)} cols={len(cols)} ' + f'lp={obj:.9f} base={base_num:.9f} identity={same} negative_reduced={neg}', flush=True) + for d in RANKS: + base_total[d] += base[d] + out['components'].append({ + 'first': json.dumps(comp[0]), 'nodes': len(comp), + 'duals': {json.dumps(rows[i]): {str(d): f'{x_.numerator}/{x_.denominator}' for d, x_ in sorted(vec.items())} + for i, vec in sorted(q.items())}}) + args.output.parent.mkdir(parents=True, exist_ok=True) + payload = json.dumps(out, sort_keys=True, separators=(',', ':')).encode() + args.output.write_bytes(gzip.compress(payload, mtime=0)) + print('wrote', args.output, len(payload), 'bytes; components', len(comps)) + + +if __name__ == '__main__': + main() diff --git a/research/selected-k8-unrestricted-ends/test_package.py b/research/selected-k8-unrestricted-ends/test_package.py new file mode 100644 index 0000000000..ac1b191661 --- /dev/null +++ b/research/selected-k8-unrestricted-ends/test_package.py @@ -0,0 +1,227 @@ +#!/usr/bin/env python3 +"""Native fixtures, endpoint/idle-accounting controls and external corruptions. + +Adapts Gareth Davidson PR1995 (73e323159d65c974debb180189694fd59144da5f). +Gareth Davidson with OpenAI Codex assistance. Apache-2.0. +""" +from contextlib import redirect_stdout +from collections import Counter +import copy +from fractions import Fraction as Q +import gzip +from hashlib import sha256 +import importlib.util +import io +import json +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile + +HERE = Path(__file__).resolve().parent + + +def module(name, path): + spec = importlib.util.spec_from_file_location(name, path) + result = importlib.util.module_from_spec(spec) + spec.loader.exec_module(result) + return result + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +def fails(action, text): + try: + action() + except (ValueError, RuntimeError, AssertionError) as error: + need(text in str(error), "wrong failure: "+str(error)) + else: + raise ValueError("control did not reject: "+text) + + +def inventory(path): + return {str(f.relative_to(path)): sha256(f.read_bytes()).hexdigest() + for f in path.rglob("*") if f.is_file()} + + +def main(): + V = module("tested_k8_primary", HERE / "verify.py") + I = module("tested_k8_independent", HERE / "independent.py") + U = V.U + U.source_bindings() + M, C, auditor = V.local("model"), U.retained("ceiling.py"), U.retained("audit_local.py") + P = V.local("materialize") + word = U.word() + model = M.Model(word) + duals = U.duals() + expected = U.parse((HERE/"EXPECTED.json").read_bytes()) + cap = Q(expected["a_bracket"][1]) + assignment, profile = P.primal(U, model) + bounds = {"cap": V.charges(C, cap), "target": V.charges(C, V.TARGET)} + controls = [] + with tempfile.TemporaryDirectory(prefix="k8-frame-controls-") as directory: + root = Path(directory) + # The existing all-column auditor checks scalar endpoints in both + # orientations, exact frame bills and the low-end cones independently. + native_profiles = {} + credited = model.baseline() + recipe = U.parse((HERE/"references/END-RECIPE.json").read_bytes()) + for q, old, new in recipe["ends"]: + need(list(model.original_caps[q]) == old, "credited old endpoint") + credited[("E",q)] = M.M.basis(new) + for i, old, new in recipe["B_frames"]: + need(word["B"][i][-1] == old, "credited old B frame") + credited[("G",model.nA+i)] = M.M.basis(new) + for i, k, old, new in recipe["early_cleanup"]: + need(word["early_cleanup"][i] == [k,old], "credited old early tail") + credited[("G",model.nA+model.nB+i)] = M.M.basis(new) + for label, chosen in (("baseline", model.baseline()), ("credited-two-ends", credited), + ("four-end-optimum", assignment)): + fixture = P.native_word(word,model,chosen) + for section in ("A","cut","B","precondition","cleanup"): + need([e[:-1] for e in fixture[section]] == [e[:-1] for e in word[section]], + "native scalar chronology unchanged") + chosen_profile = model.profile(chosen) + path, receipt = root/(label+".json.gz"), root/(label+"-audit.json") + path.write_bytes(gzip.compress(U.canonical(fixture), mtime=0)) + with redirect_stdout(io.StringIO()): + auditor.run(path, receipt) + checked = json.loads(receipt.read_text()) + need(checked["status"] == "PASS_INDEPENDENT_EXACT_FORWARD_AND_DUAL_ENDPOINT_FRAMES_ENTRANCES_CONES", + "legacy native auditor") + need(checked["checked_columns"] == 704 and checked["local_profile"] == fixture["report"]["local_profile"], + "all-column native fixture coverage") + native_profiles[label] = chosen_profile + need(len({tuple(sorted(p.items())) for p in native_profiles.values()})==3, + "three distinct native profiles") + controls.append("three-704-column-both-orientation-native-audits") + + # A reduced local mass is exposed idle work, not free removed work. + correct=C.relax(profile,73,896,9,64,V.TARGET) + fake_upper=(sum((n*C.child_cost(r,73,V.TARGET)[1] for r,n in profile.items()),Q(0)) + +Q(1646,51)*C.child_cost(51,73,V.TARGET)[1])/Q(896,9) + need(correct[0]>1 and fake_upper<1,"missing four idle ranks creates a false target pass") + controls.append("omitted-idle-mass-false-positive") + + # Both directions beyond the old cap are in the new quantified class. + broken=copy.deepcopy(model) + endpoint=("E",574) + rotated=next(f for f in broken.domain[endpoint] + if len(f)==8 and not M.M.contained(f,model.original_caps[574])) + broken.domain[endpoint].remove(rotated) + fails(lambda:V.check_duals(M,broken,duals,assignment,profile,bounds),"complete frame interval") + controls.append("omitted-feasible-rotated-end") + + broken=copy.deepcopy(model) + broken.domain[("E",273)].remove(M.M.FULL) + fails(lambda:V.check_duals(M,broken,duals,assignment,profile,bounds),"complete frame interval") + controls.append("omitted-feasible-full-end") + + # The retained vector-subset enumerator is an independent finite oracle + # through dimension four. For dimension five, unique valid spaces plus + # the Gaussian count certify coverage, separately matched by bitsets. + retained_model=U.retained("frame_model.py") + for k in range(5): + hi=retained_model.basis([1< 2) + broken.domain[node].pop() + fails(lambda: V.check_duals(M, broken, duals, assignment, profile, bounds), "complete frame interval") + controls.append("omitted-feasible-frame-choice") + + broken = copy.deepcopy(model) + broken.centre_children = [] + fails(lambda: V.check_duals(M, broken, duals, assignment, profile, bounds), "full fixed and variable cost coverage") + controls.append("omitted-centre-work") + + broken = copy.deepcopy(model) + edge = next(e for e in broken.edges if e[0] in broken.domain and e[1] in broken.domain) + del broken.edges[edge] + fails(lambda: V.check_duals(M, broken, duals, assignment, profile, bounds), "dual row domain") + controls.append("omitted-common-gate-edge") + + old = I.isqrt + I.isqrt = lambda n: old(n)+3 + I.child.cache_clear() + fails(I.main, "square-root oracle calibration") + I.isqrt = old + I.child.cache_clear() + controls.append("invalid-square-root-oracle") + + target = root/"relocated" + shutil.copytree(HERE, target, ignore=shutil.ignore_patterns("__pycache__", "*.pyc")) + def run(script="verify.py", error=None): + result = subprocess.run([sys.executable, "-I", "-O", "-B", str(target/script)], + cwd=directory, text=True, capture_output=True, timeout=300) + if error is None: + need(result.returncode == 0 and "PASS_" in result.stdout, "relocated replay: "+result.stderr) + else: + need(result.returncode != 0 and error in result.stderr, "wrong corruption rejection: "+result.stderr) + before = inventory(target) + for f in target.rglob("*"): + if f.is_file(): + f.chmod(0o444) + run() + run("independent.py") + need(inventory(target) == before, "read-only package changed") + controls.append("both-optimized-read-only-relocated-checkers") + for f in target.rglob("*"): + if f.is_file(): + f.chmod(0o644) + + def mutate(label, file, change, error): + path = target/file + raw = path.read_bytes() + path.write_bytes(change(raw)) + try: + run(error=error) + controls.append(label) + finally: + path.write_bytes(raw) + def edit(raw, change): + data = json.loads(raw) + change(data) + return U.canonical(data) + def change_dual(raw, change): + return gzip.compress(edit(gzip.decompress(raw), change), mtime=0) + mutate("omitted-dual-component", "DUALS.json.gz", + lambda raw: change_dual(raw, lambda x: x["components"].pop()), "component coverage") + def overstate(x): + record = x["components"][0]["duals"] + key = next(k for k in record if json.loads(k)[0] == "N") + record[key]["1"] = str(Q(record[key].get("1", "0"))+1) + mutate("overstated-dual-objective", "DUALS.json.gz", + lambda raw: change_dual(raw, overstate), "negative or uncertified reduced cost") + mutate("omitted-primal-node", "PRIMAL.json.gz", + lambda raw: change_dual(raw, lambda x: x["assignment"].pop(next(iter(x["assignment"])))), + "complete primal node coverage") + mutate("false-idle-mass", "EXPECTED.json", + lambda raw: edit(raw, lambda x: x.update(idle_mass=1646)), "receipt mismatch") + mutate("false-gate-coverage", "EXPECTED.json", + lambda raw: edit(raw, lambda x: x.update(free_gates=2588)), "receipt mismatch") + mutate("missing-source-inventory", "SOURCES.json", + lambda raw: edit(raw, lambda x: x["files"].pop()), "source inventory") + mutate("retained-model-drift", "references/frame_model.py", lambda raw: raw+b"\n", "retained source SHA256") + mutate("selected-word-drift", "references/WORD.json.gz", lambda raw: raw+b"\n", "retained source SHA256") + mutate("duplicate-receipt-key", "EXPECTED.json", lambda raw: b'{"x":0,"x":1}', "duplicate JSON key") + mutate("nonfinite-receipt", "EXPECTED.json", lambda raw: b'{"x":NaN}', "noninteger/nonfinite JSON number") + need(inventory(target) == before, "corruptions not restored") + print("PASS_K8_UNRESTRICTED_END_CONTROLS", "checks="+str(len(controls))) + print(json.dumps(controls)) + print("native_profiles="+json.dumps(native_profiles, sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/research/selected-k8-unrestricted-ends/verify.py b/research/selected-k8-unrestricted-ends/verify.py new file mode 100644 index 0000000000..982f03713d --- /dev/null +++ b/research/selected-k8-unrestricted-ends/verify.py @@ -0,0 +1,184 @@ +#!/usr/bin/env python3 +"""Unrestricted terminal endpoint/frame bound, with variable-mass excess prices. + +Adapts Gareth Davidson PR1995, mathematical commit 73e323159d65c974debb180189694fd59144da5f. +Gareth Davidson with OpenAI Codex assistance. Apache-2.0. +""" +import argparse +from collections import Counter +from fractions import Fraction as Q +import importlib.util +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +spec = importlib.util.spec_from_file_location("k8_common", HERE / "common.py") +U = importlib.util.module_from_spec(spec) +spec.loader.exec_module(U) +need = U.need +RANKS = range(1, 10) +BASE_LO = Q(1690054109088, 10**15) +BASE_HI = Q(1690054109089, 10**15) +TARGET = Q(21, 20) * BASE_HI + + +def span_mask(frame): + values = {0} + for vector in frame: + values |= {x ^ vector for x in values} + return sum(1 << x for x in values) + + +def graph_receipt(model): + nodes = [[list(n), span_mask(model.lo[n]), span_mask(model.hi[n])] for n in sorted(model.lo)] + domains = [[list(n), sorted(span_mask(f) for f in model.domain[n])] for n in sorted(model.domain)] + edges = [[list(a), list(b), k] for (a, b), k in sorted(model.edges.items())] + cones = [[q, support] for q, support in sorted(model.cones.items())] + return {"nodes_sha256": U.digest(nodes), "domains_sha256": U.digest(domains), + "edges_sha256": U.digest(edges), "cones_sha256": U.digest(cones), + "node_count": len(nodes), "edge_count": len(edges), "cone_helpers": len(cones), "cone_edges": len(model.cone_edges)} + + +def subspace_count(k): + total = 0 + for d in range(k+1): + top = bottom = 1 + for j in range(d): + top *= (1 << (k-j)) - 1 + bottom *= (1 << (d-j)) - 1 + total += top // bottom + return total + + +def charges(C, a): + costs = {d: C.child_cost(d, 73, a) for d in RANKS} + idle = C.child_cost(51, 73, a) + # Local mass varies. Reprice every released unit as idle, not as saved work. + return {d: (73*(costs[d][0]-Q(d,51)*idle[1]), + 73*(costs[d][1]-Q(d,51)*idle[0])) for d in RANKS} + + +def lower(vec, bounds): + return sum((value * bounds[d][0 if value > 0 else 1] + for d, value in vec.items() if value), Q(0)) + + +def check_duals(M, model, data, assignment, profile, all_bounds): + comps = model.components() + need(len(data["components"]) == len(comps), "component coverage") + stats = Counter() + total = Counter({d:n for d,n in model.fixed_profile().items() if n}) + distinct_reduced = set() + for comp, record in zip(comps, data["components"]): + need(record["first"] == json.dumps(comp[0]) and record["nodes"] == len(comp), "component identity") + labels, unary, pairs = model.component_problem(comp) + for node in comp: + domain = labels[node] + k = len(model.hi[node])-len(model.lo[node]) + need(len(domain) == len(set(domain)) == subspace_count(k), "complete frame interval") + need(all(M.M.contained(model.lo[node], f) and M.M.contained(f, model.hi[node]) for f in domain), + "frame outside interval") + rows, rhs, cols = M.lp(labels, unary, pairs) + keys = [json.dumps(row) for row in rows] + need(set(record["duals"]) <= set(keys), "dual row domain") + dual = [] + for key in keys: + vec = {int(d): Q(v) for d, v in record["duals"].get(key, {}).items()} + need(all(d in RANKS for d in vec), "dual rank coordinate") + dual.append(vec) + for _, cost, entries in cols: + residual = {d: Q(cost[d]) for d in RANKS} + for row, multiplier in entries: + for d, value in dual[row].items(): + residual[d] -= multiplier*value + if any(residual.values()): + for bounds in all_bounds.values(): + need(lower(residual, bounds) > 0, "negative or uncertified reduced cost") + stats["positive"] += 1 + else: + stats["zero"] += 1 + distinct_reduced.add(tuple(str(residual[d]) for d in RANKS)) + objective = {d: sum((rhs[i]*v.get(d, 0) for i, v in enumerate(dual)), Q(0)) for d in RANKS} + baseline = M.assignment_cost(labels, unary, pairs, {n: assignment[n] for n in comp}) + need(all(objective[d] == baseline[d] for d in RANKS), "dual/primal coefficient identity") + total.update({d: baseline[d] for d in range(1, 10) if baseline[d]}) + stats.update(rows=len(rows), columns=len(cols), components=1) + need(dict(total) == profile, "full fixed and variable cost coverage") + stats["distinct_reduced_vectors"] = len(distinct_reduced) + return dict(stats) + + +def local(name): + spec=importlib.util.spec_from_file_location("endpoint_"+name,HERE/(name+".py")) + result=importlib.util.module_from_spec(spec) + spec.loader.exec_module(result) + return result + + +def run(): + U.source_bindings() + word=U.word() + M,C,P=local("model"),U.retained("ceiling.py"),local("materialize") + model=M.Model(word) + need(model.profile(model.baseline())==U.PROFILE,"baseline profile") + assignment,profile=P.primal(U,model) + need(profile=={1:2400,2:446,3:416,4:142,5:82,8:8},"optimal profile binding") + lo,hi=C.ceiling(profile,73,896,9,64) + need(BASE_HI1,"ceiling bracket sign") + bills[str(a)]=[str(left-1),str(right-1)] + free_ends=[n for n in model.domain if n[0]=="E"] + need(len(model.original_caps)==78 and len(free_ends)==78,"all endpoint coverage") + endpoint_intervals=Counter((len(model.lo[n]),len(model.hi[n]),len(model.domain[n])) for n in free_ends) + need(endpoint_intervals=={(4,9,374):32,(7,9,5):46},"complete unrestricted endpoint domains") + min_mass=5586+sum(len(model.lo[("E",q)])-len(cap) for q,cap in model.original_caps.items()) + max_mass=5586+sum(9-len(cap) for cap in model.original_caps.values()) + need((min_mass,max_mass)==(5540,5792) and 7232-max_mass>=0,"all endpoint choices have nonnegative idle mass") + changed_ends=[q for q,cap in sorted(model.original_caps.items()) + if model.frame_of(("E",q),assignment)!=cap] + need(changed_ends==[574,575,580,581],"attaining contracted ends") + return {"schema":"selected-k8-unrestricted-end-bound-v1", + "status":"PASS_SELECTED_K8_UNRESTRICTED_END_BOUND","word_sha256":U.WORD_SHA, + "duals_sha256":U.digest(data),"primal_sha256":U.digest(U.primal_data()), + "profile":{str(r):n for r,n in profile.items()},"local_mass":5582,"idle_mass":1650, + "gates":len(model.gates),"free_gates":len(model.domain)-len(free_ends), + "restricted_ends":78,"free_ends":[n[1] for n in free_ends], + "forced_ends":sorted(set(model.original_caps)-{n[1] for n in free_ends}), + "endpoint_intervals":[{"lower_dimension":a,"upper_dimension":b,"choices":c,"count":n} + for (a,b,c),n in sorted(endpoint_intervals.items())], + "all_assignment_local_mass_interval":[min_mass,max_mass], + "all_assignment_idle_mass_interval":[7232-max_mass,7232-min_mass], + "attaining_changed_ends":changed_ends, + "component_sizes":{str(k):v for k,v in sorted(Counter(map(len,model.components())).items())}, + "domain_sizes":{str(k):v for k,v in sorted(Counter(map(len,model.domain.values())).items())}, + "graph":graph_receipt(model),"duality":stats, + "a_bracket":[str(lo),str(hi)],"kappa_cap":str(hi/(1+hi)),"target_a":str(TARGET), + "ceiling_ratio_upper":str(hi/BASE_LO),"bills":bills, + "scope":"fixed scalar word and entrances; arbitrary terminal subspaces of formerly restricted helpers and all gate frames; full idle charge; no global supplier or new kappa"} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--write-expected", action="store_true") + args = parser.parse_args() + receipt = run() + path = HERE / "EXPECTED.json" + if args.write_expected: + path.write_text(json.dumps(receipt, indent=2, sort_keys=True)+"\n") + else: + need(U.parse(path.read_bytes()) == receipt, "receipt mismatch") + print(receipt["status"], "components="+str(receipt["duality"]["components"]), + "columns="+str(receipt["duality"]["columns"]), "receipt_sha256="+U.digest(receipt)) + + +if __name__ == "__main__": + main()