diff --git a/.github/workflows/pr128-bit-screen.yml b/.github/workflows/pr128-bit-screen.yml new file mode 100644 index 0000000000..e84a51828c --- /dev/null +++ b/.github/workflows/pr128-bit-screen.yml @@ -0,0 +1,44 @@ +name: PR128 restricted bit groups - rational-H negative control +on: + push: + branches: + - research/pr128-zero-frame-sharing-screen + pull_request: + paths: + - 'research/pr128-zero-frame-sharing-screen/**' + - '.github/workflows/pr128-bit-screen.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + exact-screen: + name: Rational-H counterexample and screened moment (Python ${{ matrix.python-version }}) + runs-on: ubuntu-24.04 + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.13', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 + with: + python-version: ${{ matrix.python-version }} + - name: Run exact hypothesis screen (not a physical certificate) + run: | + python3 research/pr128-zero-frame-sharing-screen/verify_screen.py > /tmp/bit-screen.json + python3 -m json.tool /tmp/bit-screen.json > /dev/null + python3 - <<'PY' + import json + r=json.load(open('/tmp/bit-screen.json')) + assert r['rational_H_orthogonal_pairs']==0 + assert r['rational_H_nonorthogonal_pairs']==17514 + assert r['legal_bit_supplier_certified'] is False + assert r['status'].startswith('PASS F2 geometry and formal moment; FAIL PR129') + print('PASS negative control: the hypothesized +10.83% bit result is NOT legal') + PY + cat /tmp/bit-screen.json + - name: Check tracked artifacts unchanged + run: git diff --exit-code diff --git a/research/pr128-zero-frame-sharing-screen/README.md b/research/pr128-zero-frame-sharing-screen/README.md new file mode 100644 index 0000000000..e3c22cbd92 --- /dev/null +++ b/research/pr128-zero-frame-sharing-screen/README.md @@ -0,0 +1,92 @@ +# Restricted PR128 bit groups: exact negative control (NOT a new κ) + +**Status: disproved candidate.** The restricted h=23 partition **does not +implement valid completed-core bit sharing** under the rational +`H = 9I - J` projector geometry of PR #129. The apparent 10.83% increase +in stopped-bit saving is **only a hypothetical arithmetic screen** of an +unrealizable child histogram; it is not a verified algorithm, bit supplier, +or multiplication exponent. + +## Source and reproducibility + +- Based on [PR #128](https://github.com/CrocSwap/integer-mult-bounds/pull/128), + commit `530588a019b4a74f09180680c9e3961bf649ec89`. +- Compared against [PR #129](https://github.com/CrocSwap/integer-mult-bounds/pull/129), + commit `992a442c10d243eee69bbd20f32ba6fa98fb430e`. +- `pr128-bit-profile.json` pins PR128's existing bit-word histogram, + exterior histogram, source and blob SHA. +- `restricted-groups.json` retains the 87 signed PR128 complex groups, + deletes triples containing coordinate 23 and reindexes the 1,771 + surviving triples. +- Run `python3 research/pr128-zero-frame-sharing-screen/verify_screen.py` + on standard Python without `-O`. Standard library only. + +This is a **negative experiment**, not a physical witness. + +## What passes + +The restricted partition has 83 groups of 21 and four groups of 7; +every h=23 triple appears exactly once. Each triple indicator has norm +one mod 2, and each distinct within-group pair has overlap zero mod 2. +This makes the binary Gram matrix the identity and produces 36,799 +successful ordered Gram tests. The h=23 quadratic phase tests on 277 +weight-0, weight-1 and weight-2 inputs per group are also exact: +24,099 checks pass. The orthogonal complements have nondegenerate binary +forms; their Gauss sums are -2 for the 83 rank-two complements and +-256i for the four rank-16 complements. + +A hypothetical paid rank-mass screen would remove the 17,597 zero-start +roles' old exteriors and insert a rank-46/368 complement for each shared +role and each of the 87 groups. This yields formal W=49,249,558 and the +same rank deficit of 1,344,189. The approximate stopped bit moment +suggests a 10.8253% gain over PR128's bit supplier **if this grouping +were legally implementable**. It is not. + +## Decisive failure: incompatible rational geometry + +PR #129 uses the rational inner product `H=9I-J`, not the standard +binary dot product. For any two triple incidence vectors T,U, its +Gram entry is + + T^T H U = 9*(|T intersect U| - 1). + +The group construction for PR128's **complex** operation requires binary +intersection parity zero. After restriction to 23 coordinates, distinct +triples in each group intersect in **zero or two** points. Those intersections +yield rational Gram entries -9 or +9, respectively, **never zero**. + +The exhaustive witness has: +- 15,012 within-group unordered pairs meeting in zero points; +- 2,502 within-group unordered pairs meeting in two points; +- **0 / 17,514 pairs are rational-H-orthogonal.** + +For example, `T={0,6,12}` and `U={0,6,18}` are in the first +group, with intersection size 2 and `T^T H U=9`. + +Consequently their rational projectors do **not** annihilate one another. +The identity `D_A D_B = D_(A+B)` used by completed-core sharing +requires `AB=BA=0` and cannot be invoked for these blocks. +**The 87-group allocation, its W, and its improved bit moment cannot +be certified as a legal bit supplier.** + +PR #129 already constructs a different valid rational-H-orthogonal +161-group sunflower partition, each group having eleven triples. +Future physical work must start from that valid geometry (or independently +prove another valid operator composition), not from this restricted +F2-only complex partition. + +## Record and remaining work + +PR #129 claims a conditional coupled exponent +`κ=0.000129186205798`. Beating it by 3% would require +`κ >= 0.00013306179197194`, with improvements to **both** limiting +suppliers and a new exact coupled certificate. + +No new `κ` is claimed by this repository branch. The experiment is +preserved as a corruption/negative control to prevent rational-vs-binary +orthogonality mistakes. + +The source construction is by an664 / PR128 contributors, with +original partition credits to Zhang and Ge. The PR129 rational bit +construction and its contributors are credited. This negative audit +was prepared with OpenAI assistance. Retained upstream licenses apply. diff --git a/research/pr128-zero-frame-sharing-screen/pr128-bit-profile.json b/research/pr128-zero-frame-sharing-screen/pr128-bit-profile.json new file mode 100644 index 0000000000..3068ed2bf2 --- /dev/null +++ b/research/pr128-zero-frame-sharing-screen/pr128-bit-profile.json @@ -0,0 +1,88 @@ +{ + "source": { + "repository": "an664/integer-mult-bounds", + "ref": "530588a019b4a74f09180680c9e3961bf649ec89", + "path": "research/completed-core-sharing/inputs/research/round8-network-opposite-profile.json", + "github_blob_sha": "ea5b8aa53d7acba929ba4c74014a8a0f83271400", + "attribution": "Zhihao Chen and original PR128/PR104 bit-network contributors" + }, + "m": 529, + "v": 1771, + "R": 28866, + "N": 3136441, + "W": 108516254, + "deficit": 1344189, + "hist": { + "1": 235438511, + "2": 236428500, + "3": 51022510, + "4": 43669318, + "5": 22488158, + "6": 8072218, + "7": 3715558, + "8": 6694380, + "9": 1919764, + "10": 1059058, + "11": 1423884, + "12": 2064986, + "13": 995302, + "14": 347116, + "15": 2387308, + "16": 1441594, + "17": 4547928, + "18": 2266880, + "19": 7484246, + "20": 8847916, + "21": 1466388, + "22": 127512, + "484": 6272882, + "506": 62328574, + "507": 7084, + "508": 49588, + "509": 159390, + "510": 449834, + "511": 3542, + "512": 276276, + "513": 17710, + "514": 1083852, + "515": 127512, + "516": 403788, + "517": 99176, + "518": 1144066, + "519": 315238, + "520": 378994, + "521": 106260, + "522": 1583274, + "523": 626934, + "524": 2854852, + "525": 13711082, + "526": 4629394, + "527": 5653032, + "528": 6233920 + }, + "exterior_hist": { + "506": 62328574, + "507": 7084, + "508": 49588, + "509": 159390, + "510": 449834, + "511": 3542, + "512": 276276, + "513": 17710, + "514": 1083852, + "515": 127512, + "516": 403788, + "517": 99176, + "518": 1144066, + "519": 315238, + "520": 378994, + "521": 106260, + "522": 1583274, + "523": 626934, + "524": 2854852, + "525": 13711082, + "526": 4629394, + "527": 5653032, + "528": 6233920 + } +} diff --git a/research/pr128-zero-frame-sharing-screen/restricted-groups.json b/research/pr128-zero-frame-sharing-screen/restricted-groups.json new file mode 100644 index 0000000000..56d299359d --- /dev/null +++ b/research/pr128-zero-frame-sharing-screen/restricted-groups.json @@ -0,0 +1,1953 @@ +{ + "origin": "PR128 completed-core sharing (an664), pinned commit 530588a019b4a74f09180680c9e3961bf649ec89", + "h": 23, + "source_geometry_blob_sha": "51aea7dd4404c6eae89aebca4969d81695e3adc9", + "method": "Restrict each signed PR128 h=24 orthogonal triple group to triples not containing coordinate 23; reindex lexicographically in h=23.", + "groups": [ + [ + 100, + 106, + 181, + 1161, + 330, + 332, + 427, + 1302, + 533, + 537, + 613, + 1389, + 716, + 722, + 779, + 1462, + 880, + 888, + 926, + 1522, + 1026 + ], + [ + 101, + 107, + 191, + 1171, + 325, + 333, + 393, + 1268, + 534, + 538, + 619, + 1395, + 717, + 723, + 786, + 1469, + 881, + 1027, + 1031, + 1058, + 1573 + ], + [ + 102, + 108, + 200, + 1180, + 326, + 334, + 403, + 1278, + 529, + 539, + 585, + 1361, + 718, + 882, + 884, + 935, + 1531, + 1028, + 1032, + 1066, + 1581 + ], + [ + 103, + 109, + 208, + 1188, + 327, + 335, + 412, + 1287, + 530, + 713, + 719, + 752, + 1435, + 883, + 885, + 941, + 1537, + 1029, + 1033, + 1073, + 1588 + ], + [ + 104, + 110, + 215, + 1195, + 328, + 531, + 535, + 598, + 1374, + 714, + 720, + 762, + 1445, + 878, + 886, + 907, + 1503, + 1030, + 1034, + 1079, + 1594 + ], + [ + 105, + 329, + 331, + 421, + 1296, + 532, + 536, + 606, + 1382, + 715, + 721, + 771, + 1454, + 879, + 887, + 917, + 1513, + 1025, + 1035, + 1045, + 1560 + ], + [ + 115, + 122, + 182, + 1267, + 344, + 347, + 428, + 1394, + 546, + 551, + 614, + 1468, + 728, + 735, + 780, + 1529, + 891, + 961, + 966, + 1050, + 1170 + ], + [ + 116, + 123, + 192, + 1277, + 339, + 348, + 394, + 1360, + 547, + 552, + 620, + 1474, + 729, + 892, + 895, + 929, + 1580, + 962, + 967, + 1059, + 1179 + ], + [ + 117, + 124, + 201, + 1286, + 340, + 349, + 404, + 1370, + 542, + 730, + 731, + 787, + 1536, + 893, + 896, + 936, + 1587, + 963, + 968, + 1067, + 1187 + ], + [ + 118, + 125, + 209, + 1294, + 341, + 543, + 548, + 590, + 1444, + 725, + 732, + 753, + 1502, + 894, + 897, + 942, + 1593, + 964, + 969, + 1074, + 1194 + ], + [ + 119, + 342, + 345, + 415, + 1381, + 544, + 549, + 599, + 1453, + 726, + 733, + 763, + 1512, + 889, + 898, + 908, + 1559, + 965, + 970, + 1080, + 1200 + ], + [ + 120, + 121, + 216, + 1301, + 343, + 346, + 422, + 1388, + 545, + 550, + 607, + 1461, + 727, + 734, + 772, + 1521, + 890, + 899, + 918, + 1569, + 960 + ], + [ + 129, + 137, + 183, + 1359, + 357, + 361, + 429, + 1473, + 558, + 564, + 615, + 1535, + 739, + 826, + 830, + 922, + 1178, + 976, + 982, + 1051, + 1276 + ], + [ + 130, + 138, + 193, + 1369, + 352, + 362, + 395, + 1439, + 559, + 740, + 742, + 782, + 1586, + 827, + 831, + 930, + 1186, + 977, + 983, + 1060, + 1285 + ], + [ + 131, + 139, + 202, + 1378, + 353, + 554, + 560, + 581, + 1501, + 741, + 743, + 788, + 1592, + 828, + 832, + 937, + 1193, + 978, + 984, + 1068, + 1293 + ], + [ + 132, + 354, + 358, + 408, + 1452, + 555, + 561, + 591, + 1511, + 736, + 744, + 754, + 1558, + 829, + 833, + 943, + 1199, + 979, + 985, + 1075, + 1300 + ], + [ + 133, + 135, + 211, + 1387, + 355, + 359, + 416, + 1460, + 556, + 562, + 600, + 1520, + 737, + 745, + 764, + 1568, + 824, + 834, + 909, + 1165, + 980 + ], + [ + 134, + 136, + 217, + 1393, + 356, + 360, + 423, + 1467, + 557, + 563, + 608, + 1528, + 738, + 746, + 773, + 1577, + 825, + 975, + 981, + 1041, + 1266 + ], + [ + 142, + 151, + 184, + 1438, + 369, + 374, + 430, + 1540, + 569, + 674, + 677, + 776, + 1185, + 841, + 846, + 923, + 1284, + 990, + 997, + 1052, + 1368 + ], + [ + 143, + 152, + 194, + 1448, + 364, + 570, + 571, + 616, + 1591, + 675, + 678, + 783, + 1192, + 842, + 847, + 931, + 1292, + 991, + 998, + 1061, + 1377 + ], + [ + 144, + 365, + 370, + 400, + 1510, + 565, + 572, + 582, + 1557, + 676, + 679, + 789, + 1198, + 843, + 848, + 938, + 1299, + 992, + 999, + 1069, + 1385 + ], + [ + 145, + 148, + 205, + 1459, + 366, + 371, + 409, + 1519, + 566, + 573, + 592, + 1567, + 671, + 680, + 755, + 1164, + 844, + 849, + 944, + 1305, + 993 + ], + [ + 146, + 149, + 212, + 1466, + 367, + 372, + 417, + 1527, + 567, + 574, + 601, + 1576, + 672, + 681, + 765, + 1174, + 839, + 994, + 995, + 1076, + 1392 + ], + [ + 147, + 150, + 218, + 1472, + 368, + 373, + 424, + 1534, + 568, + 575, + 609, + 1584, + 673, + 840, + 845, + 914, + 1275, + 989, + 996, + 1042, + 1358 + ], + [ + 154, + 164, + 185, + 1505, + 380, + 504, + 506, + 611, + 1191, + 689, + 693, + 777, + 1291, + 855, + 861, + 924, + 1376, + 1003, + 1011, + 1053, + 1447 + ], + [ + 155, + 375, + 381, + 391, + 1556, + 505, + 507, + 617, + 1197, + 690, + 694, + 784, + 1298, + 856, + 862, + 932, + 1384, + 1004, + 1012, + 1062, + 1456 + ], + [ + 156, + 160, + 198, + 1518, + 376, + 382, + 401, + 1566, + 500, + 508, + 583, + 1163, + 691, + 695, + 790, + 1304, + 857, + 863, + 939, + 1391, + 1005 + ], + [ + 157, + 161, + 206, + 1526, + 377, + 383, + 410, + 1575, + 501, + 509, + 593, + 1173, + 686, + 696, + 756, + 1270, + 858, + 1006, + 1008, + 1071, + 1465 + ], + [ + 158, + 162, + 213, + 1533, + 378, + 384, + 418, + 1583, + 502, + 510, + 602, + 1182, + 687, + 853, + 859, + 905, + 1357, + 1007, + 1009, + 1077, + 1471 + ], + [ + 159, + 163, + 219, + 1539, + 379, + 385, + 425, + 1590, + 503, + 688, + 692, + 769, + 1283, + 854, + 860, + 915, + 1367, + 1002, + 1010, + 1043, + 1437 + ], + [ + 165, + 315, + 316, + 426, + 1196, + 519, + 522, + 612, + 1297, + 703, + 708, + 778, + 1383, + 868, + 875, + 925, + 1455, + 1015, + 1024, + 1054, + 1514 + ], + [ + 166, + 171, + 190, + 1565, + 310, + 317, + 392, + 1162, + 520, + 523, + 618, + 1303, + 704, + 709, + 785, + 1390, + 869, + 876, + 933, + 1463, + 1016 + ], + [ + 167, + 172, + 199, + 1574, + 311, + 318, + 402, + 1172, + 515, + 524, + 584, + 1269, + 705, + 710, + 791, + 1396, + 870, + 1017, + 1020, + 1065, + 1525 + ], + [ + 168, + 173, + 207, + 1582, + 312, + 319, + 411, + 1181, + 516, + 525, + 594, + 1279, + 700, + 871, + 872, + 940, + 1470, + 1018, + 1021, + 1072, + 1532 + ], + [ + 169, + 174, + 214, + 1589, + 313, + 320, + 419, + 1189, + 517, + 701, + 706, + 761, + 1366, + 866, + 873, + 906, + 1436, + 1019, + 1022, + 1078, + 1538 + ], + [ + 170, + 175, + 220, + 1595, + 314, + 518, + 521, + 605, + 1290, + 702, + 707, + 770, + 1375, + 867, + 874, + 916, + 1446, + 1014, + 1023, + 1044, + 1504 + ], + [ + 84, + 89, + 180, + 1040, + 278, + 281, + 398, + 912, + 451, + 452, + 595, + 766, + 1151, + 1246, + 1249, + 1312, + 1547, + 1326, + 1327, + 1404, + 1482 + ], + [ + 85, + 88, + 188, + 1048, + 279, + 280, + 405, + 919, + 449, + 454, + 580, + 751, + 1152, + 1155, + 1207, + 1602, + 1247, + 1248, + 1313, + 1548, + 1324 + ], + [ + 86, + 87, + 195, + 1055, + 277, + 282, + 390, + 904, + 450, + 453, + 588, + 759, + 1153, + 1154, + 1208, + 1603, + 1245, + 1325, + 1328, + 1403, + 1481 + ], + [ + 295, + 299, + 399, + 1049, + 30, + 32, + 177, + 577, + 641, + 642, + 774, + 927, + 1257, + 1115, + 1117, + 1202, + 1398, + 1417, + 1418, + 1484, + 1550 + ], + [ + 294, + 296, + 387, + 1037, + 33, + 34, + 203, + 603, + 639, + 643, + 760, + 913, + 1256, + 1258, + 1307, + 1597, + 1118, + 1119, + 1210, + 1406, + 1415 + ], + [ + 297, + 298, + 413, + 1063, + 31, + 35, + 189, + 589, + 638, + 640, + 748, + 901, + 1259, + 1260, + 1315, + 1605, + 1116, + 1414, + 1416, + 1476, + 1542 + ], + [ + 486, + 489, + 597, + 1057, + 260, + 262, + 397, + 758, + 67, + 71, + 179, + 903, + 1349, + 1234, + 1236, + 1311, + 1480, + 1140, + 1144, + 1204, + 1544 + ], + [ + 485, + 487, + 587, + 1047, + 259, + 263, + 389, + 750, + 69, + 72, + 197, + 921, + 1348, + 1350, + 1402, + 1601, + 1233, + 1237, + 1309, + 1478, + 1142 + ], + [ + 484, + 488, + 579, + 1039, + 261, + 264, + 407, + 768, + 68, + 70, + 187, + 911, + 1347, + 1351, + 1400, + 1599, + 1235, + 1141, + 1143, + 1206, + 1546 + ], + [ + 658, + 660, + 775, + 1064, + 469, + 471, + 596, + 920, + 10, + 11, + 176, + 386, + 1428, + 1338, + 1340, + 1405, + 1549, + 1101, + 1102, + 1201, + 1306 + ], + [ + 657, + 659, + 767, + 1056, + 467, + 468, + 576, + 900, + 13, + 15, + 204, + 414, + 1427, + 1429, + 1483, + 1604, + 1336, + 1337, + 1397, + 1541, + 1104 + ], + [ + 655, + 656, + 747, + 1036, + 470, + 472, + 604, + 928, + 12, + 14, + 196, + 406, + 1425, + 1426, + 1475, + 1596, + 1339, + 1103, + 1105, + 1209, + 1314 + ], + [ + 812, + 813, + 934, + 1070, + 49, + 52, + 178, + 749, + 241, + 242, + 396, + 586, + 1495, + 1128, + 1131, + 1203, + 1477, + 1221, + 1222, + 1310, + 1401 + ], + [ + 808, + 811, + 902, + 1038, + 50, + 51, + 186, + 757, + 244, + 245, + 420, + 610, + 1491, + 1494, + 1543, + 1598, + 1129, + 1130, + 1205, + 1479, + 1224 + ], + [ + 809, + 810, + 910, + 1046, + 53, + 54, + 210, + 781, + 240, + 243, + 388, + 578, + 1492, + 1493, + 1545, + 1600, + 1132, + 1220, + 1223, + 1308, + 1399 + ], + [ + 90, + 284, + 287, + 437, + 951, + 457, + 458, + 628, + 799, + 1145, + 1150, + 1160, + 1555, + 1240, + 1243, + 1273, + 1508, + 1320, + 1321, + 1371, + 1449 + ], + [ + 91, + 94, + 227, + 1087, + 285, + 286, + 438, + 952, + 455, + 1146, + 1149, + 1168, + 1563, + 1241, + 1242, + 1280, + 1515, + 1318, + 1323, + 1356, + 1434 + ], + [ + 92, + 93, + 228, + 1088, + 283, + 456, + 459, + 627, + 798, + 1147, + 1148, + 1175, + 1570, + 1239, + 1244, + 1265, + 1500, + 1319, + 1322, + 1364, + 1442 + ], + [ + 301, + 36, + 38, + 222, + 622, + 647, + 648, + 801, + 954, + 1251, + 1255, + 1274, + 1564, + 1109, + 1111, + 1157, + 1353, + 1411, + 1412, + 1457, + 1523 + ], + [ + 300, + 302, + 432, + 1082, + 39, + 40, + 230, + 630, + 645, + 1250, + 1252, + 1262, + 1552, + 1112, + 1113, + 1183, + 1379, + 1409, + 1413, + 1443, + 1509 + ], + [ + 303, + 304, + 440, + 1090, + 37, + 644, + 646, + 793, + 946, + 1253, + 1254, + 1288, + 1578, + 1110, + 1114, + 1169, + 1365, + 1408, + 1410, + 1431, + 1497 + ], + [ + 492, + 266, + 268, + 436, + 797, + 73, + 77, + 224, + 948, + 1343, + 1346, + 1373, + 1572, + 1228, + 1230, + 1272, + 1441, + 1134, + 1138, + 1159, + 1499 + ], + [ + 491, + 493, + 626, + 1086, + 265, + 269, + 434, + 795, + 75, + 1342, + 1344, + 1363, + 1562, + 1227, + 1231, + 1264, + 1433, + 1136, + 1139, + 1177, + 1517 + ], + [ + 490, + 494, + 624, + 1084, + 267, + 74, + 76, + 226, + 950, + 1341, + 1345, + 1355, + 1554, + 1229, + 1232, + 1282, + 1451, + 1135, + 1137, + 1167, + 1507 + ], + [ + 664, + 475, + 477, + 629, + 953, + 16, + 17, + 221, + 431, + 1422, + 1424, + 1458, + 1579, + 1332, + 1334, + 1372, + 1516, + 1095, + 1096, + 1156, + 1261 + ], + [ + 663, + 665, + 800, + 1089, + 473, + 474, + 621, + 945, + 19, + 1421, + 1423, + 1450, + 1571, + 1330, + 1331, + 1352, + 1496, + 1098, + 1100, + 1184, + 1289 + ], + [ + 661, + 662, + 792, + 1081, + 476, + 18, + 20, + 229, + 439, + 1419, + 1420, + 1430, + 1551, + 1333, + 1335, + 1380, + 1524, + 1097, + 1099, + 1176, + 1281 + ], + [ + 818, + 55, + 58, + 223, + 794, + 247, + 248, + 435, + 625, + 1489, + 1490, + 1530, + 1585, + 1122, + 1125, + 1158, + 1432, + 1215, + 1216, + 1271, + 1362 + ], + [ + 814, + 817, + 947, + 1083, + 56, + 57, + 225, + 796, + 250, + 1485, + 1488, + 1498, + 1553, + 1123, + 1124, + 1166, + 1440, + 1218, + 1219, + 1295, + 1386 + ], + [ + 815, + 816, + 949, + 1085, + 59, + 246, + 249, + 433, + 623, + 1486, + 1487, + 1506, + 1561, + 1126, + 1127, + 1190, + 1464, + 1214, + 1217, + 1263, + 1354 + ], + [ + 79, + 82, + 113, + 973, + 273, + 274, + 336, + 850, + 443, + 448, + 499, + 670, + 1637, + 1640, + 1647, + 1757, + 1669, + 1670, + 1684, + 1748, + 1689 + ], + [ + 80, + 81, + 126, + 986, + 271, + 276, + 309, + 823, + 444, + 447, + 513, + 684, + 1638, + 1639, + 1648, + 1758, + 1667, + 1690, + 1693, + 1711, + 1732 + ], + [ + 289, + 293, + 324, + 974, + 24, + 26, + 96, + 496, + 635, + 636, + 711, + 864, + 1673, + 1618, + 1620, + 1642, + 1706, + 1719, + 1720, + 1735, + 1750 + ], + [ + 288, + 290, + 306, + 956, + 27, + 28, + 140, + 540, + 633, + 637, + 685, + 838, + 1672, + 1674, + 1678, + 1752, + 1621, + 1622, + 1650, + 1714, + 1717 + ], + [ + 291, + 292, + 350, + 1000, + 25, + 29, + 114, + 514, + 632, + 634, + 667, + 820, + 1675, + 1676, + 1686, + 1760, + 1619, + 1716, + 1718, + 1727, + 1742 + ], + [ + 480, + 483, + 528, + 988, + 254, + 256, + 322, + 683, + 61, + 65, + 98, + 822, + 1702, + 1662, + 1664, + 1682, + 1731, + 1631, + 1635, + 1644, + 1744 + ], + [ + 479, + 481, + 512, + 972, + 253, + 257, + 308, + 669, + 63, + 66, + 128, + 852, + 1701, + 1703, + 1710, + 1756, + 1661, + 1665, + 1680, + 1729, + 1633 + ], + [ + 478, + 482, + 498, + 958, + 255, + 258, + 338, + 699, + 62, + 64, + 112, + 836, + 1700, + 1704, + 1708, + 1754, + 1663, + 1632, + 1634, + 1646, + 1746 + ], + [ + 652, + 654, + 712, + 1001, + 463, + 465, + 527, + 851, + 4, + 5, + 95, + 305, + 1724, + 1697, + 1699, + 1713, + 1749, + 1610, + 1611, + 1641, + 1677 + ], + [ + 651, + 653, + 698, + 987, + 461, + 462, + 495, + 819, + 7, + 9, + 141, + 351, + 1723, + 1725, + 1734, + 1759, + 1695, + 1696, + 1705, + 1741, + 1613 + ], + [ + 649, + 650, + 666, + 955, + 464, + 466, + 541, + 865, + 6, + 8, + 127, + 337, + 1721, + 1722, + 1726, + 1751, + 1698, + 1612, + 1614, + 1649, + 1685 + ], + [ + 806, + 807, + 877, + 1013, + 43, + 46, + 97, + 668, + 235, + 236, + 321, + 511, + 1740, + 1625, + 1628, + 1643, + 1728, + 1655, + 1656, + 1681, + 1709 + ], + [ + 802, + 805, + 821, + 957, + 44, + 45, + 111, + 682, + 238, + 239, + 363, + 553, + 1736, + 1739, + 1743, + 1753, + 1626, + 1627, + 1645, + 1730, + 1658 + ], + [ + 803, + 804, + 835, + 971, + 47, + 48, + 153, + 724, + 234, + 237, + 307, + 497, + 1737, + 1738, + 1745, + 1755, + 1629, + 1654, + 1657, + 1679, + 1707 + ], + [ + 2, + 3, + 60, + 270, + 1093, + 1094, + 1133, + 1238, + 445, + 446, + 526, + 697, + 1608, + 1609, + 1630, + 1666, + 1763, + 1691, + 1692, + 1712, + 1733 + ], + [ + 231, + 232, + 251, + 441, + 1211, + 1212, + 1225, + 1316, + 78, + 83, + 99, + 959, + 1651, + 1652, + 1659, + 1687, + 1767, + 1768, + 1769, + 1770, + 1636 + ], + [ + 21, + 23, + 42, + 442, + 1106, + 1108, + 1121, + 1317, + 272, + 275, + 323, + 837, + 1615, + 1617, + 1624, + 1688, + 1764, + 1668, + 1671, + 1683, + 1747 + ], + [ + 0, + 233, + 1091, + 1213, + 1606, + 1653, + 1761 + ], + [ + 22, + 460, + 1107, + 1329, + 1616, + 1694, + 1765 + ], + [ + 1, + 252, + 1092, + 1226, + 1607, + 1660, + 1762 + ], + [ + 41, + 631, + 1120, + 1407, + 1623, + 1715, + 1766 + ] + ] +} diff --git a/research/pr128-zero-frame-sharing-screen/verify_screen.py b/research/pr128-zero-frame-sharing-screen/verify_screen.py new file mode 100644 index 0000000000..c7ff34b7c3 --- /dev/null +++ b/research/pr128-zero-frame-sharing-screen/verify_screen.py @@ -0,0 +1,281 @@ +#!/usr/bin/env python3 +"""Independent exact geometric and arithmetic screen for PR128 h=23 sharing. + +This DOES NOT certify a legal bit-core sharing implementation or a new kappa. +The signed physical schedule, local Gaussian normalization, scalar charges +and coupled recurrence proof remain obligations. Standard library only. +""" +import json +import os +import sys +from collections import Counter +from fractions import Fraction as Q +from itertools import combinations +from math import factorial +from pathlib import Path + +if sys.flags.optimize or os.environ.get("PYTHONOPTIMIZE"): + raise RuntimeError("assertions must not be disabled") +HERE = Path(__file__).resolve().parent + + +def require(ok, why): + if not ok: + raise AssertionError(why) + + +def parity(x): + return x.bit_count() & 1 + + +def gf_basis(vectors, width): + piv = {} + for v in vectors: + x = v + while x: + j = x.bit_length()-1 + if j in piv: + x ^= piv[j] + else: + piv[j] = x + break + return piv + + +def nullspace(vectors, width): + # Reduced echelon form of the rows of the orthogonality constraints. + piv = gf_basis(vectors, width) + # Descending pivots prevent a later XOR from reintroducing an + # already-eliminated (higher) pivot column. + for j in sorted(piv, reverse=True): + for k in piv: + if j != k and (piv[k] >> j) & 1: + piv[k] ^= piv[j] + free = [j for j in range(width) if j not in piv] + result = [] + for j in free: + x = 1 << j + for k, row in piv.items(): + if (row >> j) & 1: + x ^= 1 << k + result.append(x) + require(all(parity(x & row) == 0 for x in result for row in vectors), + "nullspace mistake") + return result + + +def quadratic_signature(B): + # Exact four-phase Gauss sum: real=cnt[0]-cnt[2], + # imaginary=cnt[1]-cnt[3]. Enumerate Gray-coded basis vectors. + counts = [0, 0, 0, 0] + x = 0 + for k in range(1 << len(B)): + if k: + j = (k & -k).bit_length()-1 + x ^= B[j] + counts[x.bit_count() % 4] += 1 + return (counts[0]-counts[2], counts[1]-counts[3]) + + +def ln_interval(x, terms=48): + # Normalize 1 <= u < 2; artanh has a rational nonnegative tail bound. + require(x >= 1, "log argument below one") + power = 0 + u = x + while u >= 2: + power += 1 + u /= 2 + + def unit(z): + y = (z-1)/(z+1) + termsum = 2*sum((y**(2*j+1)/Q(2*j+1) + for j in range(terms)), Q(0)) + rem = 2*y**(2*terms+1)/(Q(2*terms+1)*(1-y*y)) + return (termsum, termsum+rem) + + a,b = unit(u) + c,d = unit(Q(2)) + return (a+power*c, b+power*d) + + +def exp_interval(lo, hi, degree=12): + require(0 <= lo <= hi < 1, "bad exponential argument") + low = sum((lo**k/Q(factorial(k)) for k in range(degree+1)), Q(0)) + upper = sum((hi**k/Q(factorial(k)) for k in range(degree+1)), Q(0)) + upper += hi**(degree+1)/Q(factorial(degree+1))/(1-hi/Q(degree+2)) + return low, upper + + +def moment_interval(hist, m, W, saving): + low = high = Q(0) + for r, count in sorted(hist.items()): + if not count: + continue + require(0 < r < m and count > 0, "invalid recursive child") + lglo, lghi = ln_interval(Q(m, r)) + elo, ehi = exp_interval(saving*lglo, saving*lghi) + factor = Q(r*count, m*W) + low += factor*elo + high += factor*ehi + return low, high + + +def main(): + p = json.loads((HERE/"pr128-bit-profile.json").read_text()) + z = json.loads((HERE/"restricted-groups.json").read_text()) + h,m,v,R,N,W,deficit = (p[k] for k in + ("h","m","v","R","N","W","deficit")) if "h" in p else ( + 23,p["m"],p["v"],p["R"],p["N"],p["W"],p["deficit"]) + require((h,m,v,R,N,W,deficit)== + (23,529,1771,28866,3136441,108516254,1344189), + "pinned PR128 dimensions changed") + require(z["h"]==h and len(z["groups"])==87, "group dimensions") + masks = [sum(1<=n for k,n in ext.items()), "exterior multiplicity") + count_zero = ext[m-h] + require(count_zero%(2*v)==0, "zero-frame role count nonintegral") + roles_zero=count_zero//(2*v) + require(roles_zero==17597, "unexpected zero-start-role count") + + # Remove exactly the old terminal exteriors of the zero-frame roles. + # Each candidate shared role instead has one final group complement + # per stage. Other local and full-frame children remain unchanged. + H[m-h]-=count_zero + if not H[m-h]: + del H[m-h] + for group in groups: + H[h*(h-len(group))] += 2*roles_zero + newW = 2*N+2*v*(R-roles_zero)+2*len(groups)*roles_zero + new_mass = sum(k*n for k,n in H.items()) + require(newW==49249558, "unexpected candidate allocation") + require(new_mass==m*newW-deficit, "rank mass/deficit mismatch") + require(all(00 for rank,n in H.items()), "invalid child") + # The next tests certify the ARITHMETIC MOMENT of an assumed + # paid child histogram; they do not show that histogram can be + # realized by the physical bit-core word. + lower=Q(1380218257,10**13) + next_point=lower+Q(1,10**13) + low,high=moment_interval(H,m,newW,lower) + nextlow,nexthi=moment_interval(H,m,newW,next_point) + require(high<1, "candidate moment fails to contract") + require(nextlow>1, "next moment grid point was not rejected") + old_saving=Q(384599,10**10) + stopped=(1-Q(1,1000))*lower+Q(1,1000)*old_saving + pr128_bit=Q("0.0001244501335381315811393") + require(stopped*100>pr128_bit*110, + "less than 10 percent conditional arithmetic saving") + complex_pr128=Q("0.0001231305483517511358") + overall_baseline=Q("0.00012310001053253") + target=overall_baseline*Q(103,100) + require(complex_pr128