diff --git a/research/p104-accumulated-block-composition/COMPATIBILITY.json b/research/p104-accumulated-block-composition/COMPATIBILITY.json new file mode 100644 index 0000000000..bfa3f36879 --- /dev/null +++ b/research/p104-accumulated-block-composition/COMPATIBILITY.json @@ -0,0 +1,10424 @@ +{ + "R22_matrices": [ + { + "edit": 0, + "matrix": [ + [ + "2", + "2", + "-2", + "1", + "1", + "1", + "1", + "-2", + "0" + ], + [ + "-2", + "-2", + "-2", + "1", + "-1", + "-1", + "1", + "-2", + "0" + ], + [ + "2", + "-2", + "-2", + "1", + "-1", + "1", + "-1", + "2", + "0" + ], + [ + "2", + "-2", + "-2", + "-1", + "1", + "-1", + "1", + "2", + "0" + ], + [ + "0", + "0", + "-2", + "1", + "0", + "1", + "0", + "-2", + "2" + ], + [ + "0", + "1", + "1", + "0", + "0", + "-1/2", + "0", + "-1", + "-1" + ], + [ + "0", + "0", + "1", + "0", + "0", + "-1/2", + "0", + "0", + "0" + ], + [ + "0", + "0", + "0", + "-1/2", + "1/2", + "0", + "0", + "0", + "0" + ], + [ + "2", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0" + ] + ], + "roles": [ + 41, + 42, + 106, + 400, + 401, + 403, + 405, + 410, + 741 + ] + }, + { + "edit": 1, + "matrix": [], + "roles": [] + }, + { + "edit": 2, + "matrix": [], + "roles": [] + }, + { + "edit": 3, + "matrix": [], + "roles": [] + }, + { + "edit": 4, + "matrix": [ + [ + "1", + "0" + ], + [ + "1", + "1" + ] + ], + "roles": [ + 65, + 240 + ] + }, + { + "edit": 5, + "matrix": [], + "roles": [] + }, + { + "edit": 6, + "matrix": [], + "roles": [] + }, + { + "edit": 7, + "matrix": [], + "roles": [] + } + ], + "all_owned_events_sha256": "4682e7c28098b13f34d56d184990152627224b82b28d1ecf2e6a787ffcaa7c18", + "copied_values": [ + [ + [ + "COPY", + 791, + 173, + "1" + ], + [ + [ + 1, + "1/2" + ], + [ + 4, + "1/2" + ], + [ + 5, + "1/2" + ], + [ + 7, + "-1/2" + ], + [ + 10, + "-1/2" + ], + [ + 11, + "-1/2" + ], + [ + 12, + "-1/2" + ], + [ + 13, + "-1/2" + ], + [ + 18, + "-1/2" + ], + [ + 19, + "-1/2" + ], + [ + 24, + "-1/2" + ], + [ + 26, + "1/2" + ], + [ + 29, + "1/2" + ], + [ + 30, + "1/2" + ], + [ + 32, + "-1/2" + ], + [ + 36, + "-1/2" + ], + [ + 37, + "-1/2" + ], + [ + 38, + "-1/2" + ], + [ + 43, + "-1/2" + ], + [ + 45, + "-1/2" + ], + [ + 49, + "-1/2" + ], + [ + 50, + "-1/2" + ], + [ + 51, + "1/2" + ], + [ + 56, + "-1/2" + ], + [ + 57, + "-1/2" + ], + [ + 58, + "1/2" + ], + [ + 62, + "-1/2" + ], + [ + 63, + "-1/2" + ], + [ + 64, + "1/2" + ], + [ + 65, + "1/2" + ], + [ + 67, + "1/2" + ], + [ + 72, + "-1/2" + ], + [ + 73, + "1/2" + ], + [ + 74, + "1/2" + ], + [ + 79, + "-1/2" + ], + [ + 81, + "-1/2" + ], + [ + 82, + "1/2" + ], + [ + 86, + "1/2" + ], + [ + 88, + "1/2" + ], + [ + 89, + "1/2" + ], + [ + 92, + "-1/2" + ], + [ + 94, + "-1/2" + ], + [ + 95, + "1/2" + ], + [ + 98, + "-1/2" + ], + [ + 101, + "-1/2" + ], + [ + 102, + "-1/2" + ], + [ + 103, + "-1/2" + ], + [ + 104, + "1/2" + ], + [ + 108, + "-1/2" + ], + [ + 109, + "-1/2" + ], + [ + 110, + "1/2" + ], + [ + 111, + "1/2" + ], + [ + 173, + "1" + ], + [ + 224, + "1/2" + ], + [ + 226, + "1/2" + ], + [ + 227, + "-1/2" + ], + [ + 233, + "-1/2" + ], + [ + 235, + "-1/2" + ], + [ + 237, + "-1/2" + ], + [ + 239, + "-1/2" + ], + [ + 241, + "-1/2" + ], + [ + 243, + "-1/2" + ], + [ + 249, + "-1/2" + ], + [ + 251, + "-1/2" + ], + [ + 253, + "-1/2" + ], + [ + 255, + "-1/2" + ], + [ + 256, + "-1" + ], + [ + 257, + "-1/2" + ], + [ + 262, + "1/2" + ], + [ + 265, + "-1" + ], + [ + 266, + "-1/2" + ], + [ + 269, + "-1/2" + ], + [ + 276, + "-1/2" + ], + [ + 283, + "-1/2" + ], + [ + 286, + "-1/2" + ], + [ + 287, + "1" + ], + [ + 292, + "-1/2" + ], + [ + 299, + "-1/2" + ], + [ + 302, + "-1/2" + ], + [ + 303, + "1" + ], + [ + 308, + "-1/2" + ], + [ + 315, + "-1/2" + ], + [ + 318, + "-1/2" + ], + [ + 319, + "1" + ], + [ + 324, + "-1/2" + ], + [ + 331, + "-1/2" + ], + [ + 334, + "-1/2" + ], + [ + 335, + "1" + ], + [ + 336, + "1/2" + ], + [ + 347, + "1/2" + ], + [ + 351, + "1/2" + ], + [ + 352, + "1/2" + ], + [ + 363, + "1/2" + ], + [ + 367, + "1/2" + ], + [ + 368, + "1/2" + ], + [ + 379, + "1/2" + ], + [ + 383, + "1/2" + ], + [ + 384, + "1/2" + ], + [ + 395, + "1/2" + ], + [ + 399, + "1/2" + ], + [ + 416, + "-1/2" + ], + [ + 418, + "1/2" + ], + [ + 419, + "-1/2" + ], + [ + 422, + "1/2" + ], + [ + 425, + "-1/2" + ], + [ + 426, + "-1/2" + ], + [ + 427, + "1/2" + ], + [ + 431, + "1/2" + ], + [ + 434, + "1/2" + ], + [ + 435, + "-1/2" + ], + [ + 438, + "1/2" + ], + [ + 441, + "-1/2" + ], + [ + 442, + "-1/2" + ], + [ + 443, + "1/2" + ], + [ + 447, + "1/2" + ] + ] + ], + [ + [ + "COPY", + 770, + 791, + "1" + ], + [ + [ + 1, + "1/2" + ], + [ + 4, + "1/2" + ], + [ + 5, + "1/2" + ], + [ + 7, + "-1/2" + ], + [ + 10, + "-1/2" + ], + [ + 11, + "-1/2" + ], + [ + 12, + "-1/2" + ], + [ + 13, + "-1/2" + ], + [ + 18, + "-1/2" + ], + [ + 19, + "-1/2" + ], + [ + 24, + "-1/2" + ], + [ + 26, + "1/2" + ], + [ + 29, + "1/2" + ], + [ + 30, + "1/2" + ], + [ + 32, + "-1/2" + ], + [ + 36, + "-1/2" + ], + [ + 37, + "-1/2" + ], + [ + 38, + "-1/2" + ], + [ + 43, + "-1/2" + ], + [ + 45, + "-1/2" + ], + [ + 49, + "-1/2" + ], + [ + 50, + "-1/2" + ], + [ + 51, + "1/2" + ], + [ + 56, + "-1/2" + ], + [ + 57, + "-1/2" + ], + [ + 58, + "1/2" + ], + [ + 62, + "-1/2" + ], + [ + 63, + "-1/2" + ], + [ + 64, + "1/2" + ], + [ + 65, + "1/2" + ], + [ + 67, + "1/2" + ], + [ + 72, + "-1/2" + ], + [ + 73, + "1/2" + ], + [ + 74, + "1/2" + ], + [ + 79, + "-1/2" + ], + [ + 81, + "-1/2" + ], + [ + 82, + "1/2" + ], + [ + 86, + "1/2" + ], + [ + 88, + "1/2" + ], + [ + 89, + "1/2" + ], + [ + 92, + "-1/2" + ], + [ + 94, + "-1/2" + ], + [ + 95, + "1/2" + ], + [ + 98, + "-1/2" + ], + [ + 101, + "-1/2" + ], + [ + 102, + "-1/2" + ], + [ + 103, + "-1/2" + ], + [ + 104, + "1/2" + ], + [ + 108, + "-1/2" + ], + [ + 109, + "-1/2" + ], + [ + 110, + "1/2" + ], + [ + 111, + "1/2" + ], + [ + 173, + "1" + ], + [ + 224, + "1/2" + ], + [ + 226, + "1/2" + ], + [ + 227, + "-1/2" + ], + [ + 233, + "-1/2" + ], + [ + 235, + "-1/2" + ], + [ + 237, + "-1/2" + ], + [ + 239, + "-1/2" + ], + [ + 241, + "-1/2" + ], + [ + 243, + "-1/2" + ], + [ + 249, + "-1/2" + ], + [ + 251, + "-1/2" + ], + [ + 253, + "-1/2" + ], + [ + 255, + "-1/2" + ], + [ + 256, + "-1" + ], + [ + 257, + "-1/2" + ], + [ + 262, + "1/2" + ], + [ + 265, + "-1" + ], + [ + 266, + "-1/2" + ], + [ + 269, + "-1/2" + ], + [ + 276, + "-1/2" + ], + [ + 283, + "-1/2" + ], + [ + 286, + "-1/2" + ], + [ + 287, + "1" + ], + [ + 292, + "-1/2" + ], + [ + 299, + "-1/2" + ], + [ + 302, + "-1/2" + ], + [ + 303, + "1" + ], + [ + 308, + "-1/2" + ], + [ + 315, + "-1/2" + ], + [ + 318, + "-1/2" + ], + [ + 319, + "1" + ], + [ + 324, + "-1/2" + ], + [ + 331, + "-1/2" + ], + [ + 334, + "-1/2" + ], + [ + 335, + "1" + ], + [ + 336, + "1/2" + ], + [ + 347, + "1/2" + ], + [ + 351, + "1/2" + ], + [ + 352, + "1/2" + ], + [ + 363, + "1/2" + ], + [ + 367, + "1/2" + ], + [ + 368, + "1/2" + ], + [ + 379, + "1/2" + ], + [ + 383, + "1/2" + ], + [ + 384, + "1/2" + ], + [ + 395, + "1/2" + ], + [ + 399, + "1/2" + ], + [ + 416, + "-1/2" + ], + [ + 418, + "1/2" + ], + [ + 419, + "-1/2" + ], + [ + 422, + "1/2" + ], + [ + 425, + "-1/2" + ], + [ + 426, + "-1/2" + ], + [ + 427, + "1/2" + ], + [ + 431, + "1/2" + ], + [ + 434, + "1/2" + ], + [ + 435, + "-1/2" + ], + [ + 438, + "1/2" + ], + [ + 441, + "-1/2" + ], + [ + 442, + "-1/2" + ], + [ + 443, + "1/2" + ], + [ + 447, + "1/2" + ] + ] + ], + [ + [ + "COPY", + 771, + 151, + "1" + ], + [ + [ + 2, + "-1/2" + ], + [ + 4, + "-1/2" + ], + [ + 6, + "1/2" + ], + [ + 7, + "-1/2" + ], + [ + 9, + "-1/2" + ], + [ + 11, + "-1/2" + ], + [ + 13, + "1/2" + ], + [ + 15, + "1/2" + ], + [ + 17, + "-1/2" + ], + [ + 19, + "-1/2" + ], + [ + 20, + "-1/2" + ], + [ + 23, + "-1/2" + ], + [ + 27, + "-1/2" + ], + [ + 29, + "-1/2" + ], + [ + 33, + "-1/2" + ], + [ + 35, + "-1/2" + ], + [ + 36, + "1/2" + ], + [ + 38, + "-1/2" + ], + [ + 40, + "-1/2" + ], + [ + 41, + "1/2" + ], + [ + 43, + "1/2" + ], + [ + 44, + "1/2" + ], + [ + 47, + "1/2" + ], + [ + 48, + "-1/2" + ], + [ + 50, + "-1/2" + ], + [ + 52, + "1/2" + ], + [ + 55, + "-1/2" + ], + [ + 58, + "-1/2" + ], + [ + 60, + "-1/2" + ], + [ + 62, + "-1/2" + ], + [ + 65, + "-1/2" + ], + [ + 68, + "1/2" + ], + [ + 71, + "-1/2" + ], + [ + 73, + "1/2" + ], + [ + 75, + "1/2" + ], + [ + 77, + "-1/2" + ], + [ + 81, + "-1/2" + ], + [ + 83, + "1/2" + ], + [ + 85, + "-1/2" + ], + [ + 86, + "-1/2" + ], + [ + 87, + "-1/2" + ], + [ + 89, + "-1/2" + ], + [ + 91, + "-1/2" + ], + [ + 94, + "-1/2" + ], + [ + 96, + "1/2" + ], + [ + 99, + "1/2" + ], + [ + 101, + "1/2" + ], + [ + 103, + "-1/2" + ], + [ + 105, + "1/2" + ], + [ + 107, + "-1/2" + ], + [ + 109, + "-1/2" + ], + [ + 110, + "-1/2" + ], + [ + 151, + "1" + ], + [ + 224, + "1/2" + ], + [ + 229, + "-1/2" + ], + [ + 230, + "-1/2" + ], + [ + 234, + "1/2" + ], + [ + 235, + "-1/2" + ], + [ + 237, + "-1/2" + ], + [ + 238, + "-1/2" + ], + [ + 242, + "-1/2" + ], + [ + 243, + "-1/2" + ], + [ + 246, + "-1/2" + ], + [ + 250, + "1/2" + ], + [ + 251, + "-1" + ], + [ + 255, + "-1/2" + ], + [ + 256, + "-1/2" + ], + [ + 258, + "-1/2" + ], + [ + 262, + "-1/2" + ], + [ + 266, + "1/2" + ], + [ + 267, + "-1" + ], + [ + 271, + "-1/2" + ], + [ + 283, + "-1" + ], + [ + 299, + "-1" + ], + [ + 303, + "-1" + ], + [ + 304, + "-1/2" + ], + [ + 312, + "1/2" + ], + [ + 315, + "-1/2" + ], + [ + 324, + "-1/2" + ], + [ + 331, + "-1/2" + ], + [ + 334, + "-1/2" + ], + [ + 340, + "1/2" + ], + [ + 347, + "-1/2" + ], + [ + 350, + "1/2" + ], + [ + 351, + "-1" + ], + [ + 352, + "1/2" + ], + [ + 363, + "-1/2" + ], + [ + 367, + "-1/2" + ], + [ + 399, + "-1" + ], + [ + 400, + "1/2" + ], + [ + 401, + "1/2" + ], + [ + 402, + "-1/2" + ], + [ + 403, + "1/2" + ], + [ + 409, + "1/2" + ], + [ + 413, + "1/2" + ], + [ + 414, + "1/2" + ], + [ + 415, + "-1/2" + ], + [ + 416, + "1/2" + ], + [ + 417, + "1/2" + ], + [ + 418, + "-1/2" + ], + [ + 419, + "1/2" + ], + [ + 421, + "1/2" + ], + [ + 425, + "1/2" + ], + [ + 429, + "1/2" + ], + [ + 430, + "1/2" + ], + [ + 431, + "-1/2" + ], + [ + 437, + "1/2" + ], + [ + 443, + "-1/2" + ], + [ + 446, + "1/2" + ], + [ + 447, + "-1" + ], + [ + 706, + "-2" + ] + ] + ], + [ + [ + "COPY", + 772, + 146, + "1" + ], + [ + [ + 0, + "-1/2" + ], + [ + 5, + "-1/2" + ], + [ + 7, + "-1/2" + ], + [ + 8, + "1/2" + ], + [ + 9, + "-1/2" + ], + [ + 10, + "-1/2" + ], + [ + 15, + "-1/2" + ], + [ + 16, + "1/2" + ], + [ + 17, + "-1/2" + ], + [ + 18, + "-1/2" + ], + [ + 20, + "1/2" + ], + [ + 22, + "-1/2" + ], + [ + 25, + "-1/2" + ], + [ + 30, + "-1/2" + ], + [ + 31, + "-1/2" + ], + [ + 32, + "-1/2" + ], + [ + 33, + "-1/2" + ], + [ + 37, + "1/2" + ], + [ + 40, + "-1/2" + ], + [ + 42, + "1/2" + ], + [ + 43, + "1/2" + ], + [ + 47, + "-1/2" + ], + [ + 48, + "-1/2" + ], + [ + 49, + "-1/2" + ], + [ + 51, + "-1/2" + ], + [ + 52, + "-1/2" + ], + [ + 54, + "-1/2" + ], + [ + 60, + "1/2" + ], + [ + 63, + "-1/2" + ], + [ + 65, + "1/2" + ], + [ + 66, + "1/2" + ], + [ + 67, + "-1/2" + ], + [ + 68, + "-1/2" + ], + [ + 70, + "-1/2" + ], + [ + 73, + "-1/2" + ], + [ + 77, + "-1/2" + ], + [ + 79, + "-1/2" + ], + [ + 84, + "1/2" + ], + [ + 85, + "-1/2" + ], + [ + 87, + "-1/2" + ], + [ + 88, + "-1/2" + ], + [ + 89, + "-1/2" + ], + [ + 90, + "-1/2" + ], + [ + 92, + "-1/2" + ], + [ + 97, + "1/2" + ], + [ + 98, + "-1/2" + ], + [ + 99, + "-1/2" + ], + [ + 100, + "-1/2" + ], + [ + 101, + "-1/2" + ], + [ + 106, + "1/2" + ], + [ + 109, + "1/2" + ], + [ + 111, + "-1/2" + ], + [ + 146, + "1" + ], + [ + 226, + "1/2" + ], + [ + 227, + "-1/2" + ], + [ + 229, + "-1/2" + ], + [ + 233, + "-1/2" + ], + [ + 237, + "-1/2" + ], + [ + 238, + "-1/2" + ], + [ + 239, + "1/2" + ], + [ + 240, + "-1/2" + ], + [ + 241, + "-1/2" + ], + [ + 243, + "-1/2" + ], + [ + 245, + "-1/2" + ], + [ + 249, + "-1/2" + ], + [ + 253, + "-1/2" + ], + [ + 254, + "-1/2" + ], + [ + 255, + "1/2" + ], + [ + 257, + "-1/2" + ], + [ + 261, + "-1/2" + ], + [ + 262, + "-1/2" + ], + [ + 266, + "1/2" + ], + [ + 267, + "-1/2" + ], + [ + 269, + "-1/2" + ], + [ + 270, + "-1/2" + ], + [ + 272, + "-1/2" + ], + [ + 280, + "1/2" + ], + [ + 283, + "-1/2" + ], + [ + 288, + "-1/2" + ], + [ + 296, + "1/2" + ], + [ + 299, + "-1/2" + ], + [ + 303, + "1" + ], + [ + 304, + "-1/2" + ], + [ + 308, + "-1/2" + ], + [ + 312, + "1/2" + ], + [ + 318, + "-1/2" + ], + [ + 319, + "1" + ], + [ + 320, + "-1" + ], + [ + 352, + "-1/2" + ], + [ + 356, + "1/2" + ], + [ + 366, + "1/2" + ], + [ + 367, + "-1/2" + ], + [ + 368, + "-1/2" + ], + [ + 379, + "1/2" + ], + [ + 383, + "-1/2" + ], + [ + 384, + "-1/2" + ], + [ + 395, + "1/2" + ], + [ + 399, + "1/2" + ], + [ + 400, + "-1/2" + ], + [ + 411, + "1/2" + ], + [ + 414, + "-1/2" + ], + [ + 415, + "1" + ], + [ + 418, + "-1/2" + ], + [ + 419, + "1/2" + ], + [ + 421, + "-1/2" + ], + [ + 422, + "-1/2" + ], + [ + 425, + "1/2" + ], + [ + 426, + "1/2" + ], + [ + 430, + "-1/2" + ], + [ + 431, + "1/2" + ], + [ + 434, + "-1/2" + ], + [ + 435, + "1/2" + ], + [ + 437, + "-1/2" + ], + [ + 438, + "-1/2" + ], + [ + 441, + "1/2" + ], + [ + 442, + "1/2" + ], + [ + 446, + "-1/2" + ], + [ + 447, + "1/2" + ], + [ + 731, + "2" + ] + ] + ], + [ + [ + "COPY", + 773, + 133, + "1" + ], + [ + [ + 2, + "-1/2" + ], + [ + 5, + "-1/2" + ], + [ + 8, + "-1/2" + ], + [ + 11, + "1/2" + ], + [ + 12, + "-1/2" + ], + [ + 15, + "-1/2" + ], + [ + 16, + "-1/2" + ], + [ + 19, + "1/2" + ], + [ + 20, + "-1/2" + ], + [ + 23, + "1/2" + ], + [ + 24, + "1/2" + ], + [ + 25, + "1/2" + ], + [ + 26, + "1/2" + ], + [ + 28, + "1/2" + ], + [ + 29, + "1/2" + ], + [ + 31, + "1/2" + ], + [ + 32, + "1/2" + ], + [ + 33, + "1/2" + ], + [ + 36, + "-1/2" + ], + [ + 40, + "-1/2" + ], + [ + 41, + "-1/2" + ], + [ + 44, + "1/2" + ], + [ + 46, + "1/2" + ], + [ + 48, + "-1/2" + ], + [ + 49, + "-1/2" + ], + [ + 53, + "1/2" + ], + [ + 54, + "-1/2" + ], + [ + 58, + "-1/2" + ], + [ + 59, + "-1/2" + ], + [ + 63, + "-1/2" + ], + [ + 64, + "-1/2" + ], + [ + 69, + "1/2" + ], + [ + 70, + "-1/2" + ], + [ + 74, + "1/2" + ], + [ + 75, + "1/2" + ], + [ + 77, + "1/2" + ], + [ + 78, + "-1/2" + ], + [ + 79, + "1/2" + ], + [ + 80, + "-1/2" + ], + [ + 82, + "-1/2" + ], + [ + 83, + "-1/2" + ], + [ + 88, + "1/2" + ], + [ + 91, + "1/2" + ], + [ + 94, + "-1/2" + ], + [ + 97, + "1/2" + ], + [ + 99, + "1/2" + ], + [ + 102, + "1/2" + ], + [ + 103, + "-1/2" + ], + [ + 106, + "1/2" + ], + [ + 107, + "-1/2" + ], + [ + 108, + "-1/2" + ], + [ + 111, + "-1/2" + ], + [ + 133, + "1" + ], + [ + 240, + "-1/2" + ], + [ + 243, + "-1/2" + ], + [ + 246, + "1/2" + ], + [ + 249, + "-1/2" + ], + [ + 250, + "-1/2" + ], + [ + 251, + "1/2" + ], + [ + 255, + "1/2" + ], + [ + 256, + "-1/2" + ], + [ + 257, + "1/2" + ], + [ + 258, + "-1/2" + ], + [ + 261, + "1/2" + ], + [ + 267, + "-1/2" + ], + [ + 269, + "1/2" + ], + [ + 270, + "1/2" + ], + [ + 271, + "-1/2" + ], + [ + 287, + "1" + ], + [ + 288, + "-1/2" + ], + [ + 292, + "1/2" + ], + [ + 296, + "1/2" + ], + [ + 302, + "1/2" + ], + [ + 304, + "-1/2" + ], + [ + 308, + "1/2" + ], + [ + 312, + "1/2" + ], + [ + 318, + "1/2" + ], + [ + 335, + "1" + ], + [ + 336, + "-1/2" + ], + [ + 340, + "1/2" + ], + [ + 350, + "1/2" + ], + [ + 351, + "-1/2" + ], + [ + 367, + "1" + ], + [ + 383, + "1" + ], + [ + 384, + "-1/2" + ], + [ + 388, + "1/2" + ], + [ + 398, + "1/2" + ], + [ + 399, + "-1/2" + ], + [ + 400, + "-1/2" + ], + [ + 402, + "1/2" + ], + [ + 403, + "-1/2" + ], + [ + 406, + "1/2" + ], + [ + 409, + "-1/2" + ], + [ + 410, + "-1/2" + ], + [ + 411, + "1/2" + ], + [ + 415, + "1/2" + ], + [ + 417, + "1/2" + ], + [ + 419, + "-1/2" + ], + [ + 421, + "1/2" + ], + [ + 427, + "-1/2" + ], + [ + 429, + "1/2" + ], + [ + 430, + "1/2" + ], + [ + 431, + "-1/2" + ], + [ + 433, + "1/2" + ], + [ + 435, + "-1" + ], + [ + 438, + "-1/2" + ], + [ + 442, + "1/2" + ], + [ + 443, + "-1" + ], + [ + 445, + "1/2" + ], + [ + 767, + "2" + ] + ] + ], + [ + [ + "COPY", + 781, + 256, + "1" + ], + [ + [ + 1, + "-1" + ], + [ + 2, + "-1" + ], + [ + 4, + "-1" + ], + [ + 5, + "-1" + ], + [ + 6, + "1" + ], + [ + 9, + "-1" + ], + [ + 13, + "1" + ], + [ + 16, + "-1" + ], + [ + 18, + "1" + ], + [ + 19, + "1" + ], + [ + 20, + "-1" + ], + [ + 21, + "-1" + ], + [ + 24, + "1" + ], + [ + 25, + "1" + ], + [ + 28, + "1" + ], + [ + 32, + "1" + ], + [ + 35, + "-1" + ], + [ + 36, + "1" + ], + [ + 37, + "1" + ], + [ + 39, + "-1" + ], + [ + 40, + "-1" + ], + [ + 43, + "1" + ], + [ + 44, + "1" + ], + [ + 45, + "1" + ], + [ + 46, + "1" + ], + [ + 47, + "1" + ], + [ + 48, + "-1" + ], + [ + 51, + "-1" + ], + [ + 54, + "-1" + ], + [ + 55, + "-1" + ], + [ + 58, + "-1" + ], + [ + 61, + "1" + ], + [ + 64, + "-1" + ], + [ + 65, + "-1" + ], + [ + 68, + "1" + ], + [ + 69, + "1" + ], + [ + 72, + "1" + ], + [ + 75, + "1" + ], + [ + 78, + "-1" + ], + [ + 79, + "1" + ], + [ + 82, + "-1" + ], + [ + 85, + "-1" + ], + [ + 86, + "-1" + ], + [ + 89, + "-1" + ], + [ + 93, + "1" + ], + [ + 94, + "-1" + ], + [ + 96, + "1" + ], + [ + 97, + "1" + ], + [ + 98, + "1" + ], + [ + 99, + "1" + ], + [ + 101, + "1" + ], + [ + 102, + "1" + ], + [ + 104, + "-1" + ], + [ + 107, + "-1" + ], + [ + 110, + "-1" + ], + [ + 111, + "-1" + ], + [ + 257, + "1" + ], + [ + 258, + "-1" + ], + [ + 261, + "1" + ], + [ + 262, + "-1" + ], + [ + 265, + "1" + ], + [ + 266, + "1" + ], + [ + 267, + "-2" + ], + [ + 269, + "1" + ], + [ + 270, + "1" + ], + [ + 271, + "-2" + ], + [ + 288, + "-1" + ], + [ + 292, + "1" + ], + [ + 296, + "1" + ], + [ + 302, + "1" + ], + [ + 303, + "-2" + ], + [ + 304, + "-1" + ], + [ + 308, + "1" + ], + [ + 312, + "1" + ], + [ + 318, + "1" + ], + [ + 319, + "-2" + ], + [ + 336, + "-1" + ], + [ + 340, + "1" + ], + [ + 350, + "1" + ], + [ + 351, + "-3" + ], + [ + 384, + "-1" + ], + [ + 388, + "1" + ], + [ + 398, + "1" + ], + [ + 399, + "-3" + ], + [ + 416, + "1" + ], + [ + 417, + "1" + ], + [ + 418, + "-1" + ], + [ + 421, + "1" + ], + [ + 422, + "-1" + ], + [ + 425, + "1" + ], + [ + 426, + "1" + ], + [ + 427, + "-2" + ], + [ + 429, + "1" + ], + [ + 430, + "1" + ], + [ + 431, + "-2" + ], + [ + 433, + "1" + ], + [ + 434, + "-1" + ], + [ + 437, + "1" + ], + [ + 438, + "-1" + ], + [ + 441, + "1" + ], + [ + 442, + "1" + ], + [ + 443, + "-2" + ], + [ + 445, + "1" + ], + [ + 446, + "1" + ], + [ + 447, + "-2" + ] + ] + ], + [ + [ + "COPY", + 785, + 781, + "1" + ], + [ + [ + 1, + "-1" + ], + [ + 2, + "-1" + ], + [ + 4, + "-1" + ], + [ + 5, + "-1" + ], + [ + 6, + "1" + ], + [ + 9, + "-1" + ], + [ + 13, + "1" + ], + [ + 16, + "-1" + ], + [ + 18, + "1" + ], + [ + 19, + "1" + ], + [ + 20, + "-1" + ], + [ + 21, + "-1" + ], + [ + 24, + "1" + ], + [ + 25, + "1" + ], + [ + 28, + "1" + ], + [ + 32, + "1" + ], + [ + 35, + "-1" + ], + [ + 36, + "1" + ], + [ + 37, + "1" + ], + [ + 39, + "-1" + ], + [ + 40, + "-1" + ], + [ + 43, + "1" + ], + [ + 44, + "1" + ], + [ + 45, + "1" + ], + [ + 46, + "1" + ], + [ + 47, + "1" + ], + [ + 48, + "-1" + ], + [ + 51, + "-1" + ], + [ + 54, + "-1" + ], + [ + 55, + "-1" + ], + [ + 58, + "-1" + ], + [ + 61, + "1" + ], + [ + 64, + "-1" + ], + [ + 65, + "-1" + ], + [ + 68, + "1" + ], + [ + 69, + "1" + ], + [ + 72, + "1" + ], + [ + 75, + "1" + ], + [ + 78, + "-1" + ], + [ + 79, + "1" + ], + [ + 82, + "-1" + ], + [ + 85, + "-1" + ], + [ + 86, + "-1" + ], + [ + 89, + "-1" + ], + [ + 93, + "1" + ], + [ + 94, + "-1" + ], + [ + 96, + "1" + ], + [ + 97, + "1" + ], + [ + 98, + "1" + ], + [ + 99, + "1" + ], + [ + 101, + "1" + ], + [ + 102, + "1" + ], + [ + 104, + "-1" + ], + [ + 107, + "-1" + ], + [ + 110, + "-1" + ], + [ + 111, + "-1" + ], + [ + 257, + "1" + ], + [ + 258, + "-1" + ], + [ + 261, + "1" + ], + [ + 262, + "-1" + ], + [ + 265, + "1" + ], + [ + 266, + "1" + ], + [ + 267, + "-2" + ], + [ + 269, + "1" + ], + [ + 270, + "1" + ], + [ + 271, + "-2" + ], + [ + 288, + "-1" + ], + [ + 292, + "1" + ], + [ + 296, + "1" + ], + [ + 302, + "1" + ], + [ + 303, + "-2" + ], + [ + 304, + "-1" + ], + [ + 308, + "1" + ], + [ + 312, + "1" + ], + [ + 318, + "1" + ], + [ + 319, + "-2" + ], + [ + 336, + "-1" + ], + [ + 340, + "1" + ], + [ + 350, + "1" + ], + [ + 351, + "-3" + ], + [ + 384, + "-1" + ], + [ + 388, + "1" + ], + [ + 398, + "1" + ], + [ + 399, + "-3" + ], + [ + 416, + "1" + ], + [ + 417, + "1" + ], + [ + 418, + "-1" + ], + [ + 421, + "1" + ], + [ + 422, + "-1" + ], + [ + 425, + "1" + ], + [ + 426, + "1" + ], + [ + 427, + "-2" + ], + [ + 429, + "1" + ], + [ + 430, + "1" + ], + [ + 431, + "-2" + ], + [ + 433, + "1" + ], + [ + 434, + "-1" + ], + [ + 437, + "1" + ], + [ + 438, + "-1" + ], + [ + 441, + "1" + ], + [ + 442, + "1" + ], + [ + 443, + "-2" + ], + [ + 445, + "1" + ], + [ + 446, + "1" + ], + [ + 447, + "-2" + ] + ] + ], + [ + [ + "COPY", + 774, + 785, + "1" + ], + [ + [ + 1, + "-1" + ], + [ + 2, + "-1" + ], + [ + 4, + "-1" + ], + [ + 5, + "-1" + ], + [ + 6, + "1" + ], + [ + 9, + "-1" + ], + [ + 13, + "1" + ], + [ + 16, + "-1" + ], + [ + 18, + "1" + ], + [ + 19, + "1" + ], + [ + 20, + "-1" + ], + [ + 21, + "-1" + ], + [ + 24, + "1" + ], + [ + 25, + "1" + ], + [ + 28, + "1" + ], + [ + 32, + "1" + ], + [ + 35, + "-1" + ], + [ + 36, + "1" + ], + [ + 37, + "1" + ], + [ + 39, + "-1" + ], + [ + 40, + "-1" + ], + [ + 43, + "1" + ], + [ + 44, + "1" + ], + [ + 45, + "1" + ], + [ + 46, + "1" + ], + [ + 47, + "1" + ], + [ + 48, + "-1" + ], + [ + 51, + "-1" + ], + [ + 54, + "-1" + ], + [ + 55, + "-1" + ], + [ + 58, + "-1" + ], + [ + 61, + "1" + ], + [ + 64, + "-1" + ], + [ + 65, + "-1" + ], + [ + 68, + "1" + ], + [ + 69, + "1" + ], + [ + 72, + "1" + ], + [ + 75, + "1" + ], + [ + 78, + "-1" + ], + [ + 79, + "1" + ], + [ + 82, + "-1" + ], + [ + 85, + "-1" + ], + [ + 86, + "-1" + ], + [ + 89, + "-1" + ], + [ + 93, + "1" + ], + [ + 94, + "-1" + ], + [ + 96, + "1" + ], + [ + 97, + "1" + ], + [ + 98, + "1" + ], + [ + 99, + "1" + ], + [ + 101, + "1" + ], + [ + 102, + "1" + ], + [ + 104, + "-1" + ], + [ + 107, + "-1" + ], + [ + 110, + "-1" + ], + [ + 111, + "-1" + ], + [ + 257, + "1" + ], + [ + 258, + "-1" + ], + [ + 261, + "1" + ], + [ + 262, + "-1" + ], + [ + 265, + "1" + ], + [ + 266, + "1" + ], + [ + 267, + "-2" + ], + [ + 269, + "1" + ], + [ + 270, + "1" + ], + [ + 271, + "-2" + ], + [ + 288, + "-1" + ], + [ + 292, + "1" + ], + [ + 296, + "1" + ], + [ + 302, + "1" + ], + [ + 303, + "-2" + ], + [ + 304, + "-1" + ], + [ + 308, + "1" + ], + [ + 312, + "1" + ], + [ + 318, + "1" + ], + [ + 319, + "-2" + ], + [ + 336, + "-1" + ], + [ + 340, + "1" + ], + [ + 350, + "1" + ], + [ + 351, + "-3" + ], + [ + 384, + "-1" + ], + [ + 388, + "1" + ], + [ + 398, + "1" + ], + [ + 399, + "-3" + ], + [ + 416, + "1" + ], + [ + 417, + "1" + ], + [ + 418, + "-1" + ], + [ + 421, + "1" + ], + [ + 422, + "-1" + ], + [ + 425, + "1" + ], + [ + 426, + "1" + ], + [ + 427, + "-2" + ], + [ + 429, + "1" + ], + [ + 430, + "1" + ], + [ + 431, + "-2" + ], + [ + 433, + "1" + ], + [ + 434, + "-1" + ], + [ + 437, + "1" + ], + [ + 438, + "-1" + ], + [ + 441, + "1" + ], + [ + 442, + "1" + ], + [ + 443, + "-2" + ], + [ + 445, + "1" + ], + [ + 446, + "1" + ], + [ + 447, + "-2" + ] + ] + ], + [ + [ + "COPY", + 786, + 774, + "1" + ], + [ + [ + 1, + "-1/4" + ], + [ + 2, + "-1/4" + ], + [ + 4, + "-1/4" + ], + [ + 5, + "-1/4" + ], + [ + 6, + "1/4" + ], + [ + 9, + "-1/4" + ], + [ + 13, + "1/4" + ], + [ + 16, + "-1/4" + ], + [ + 18, + "1/4" + ], + [ + 19, + "1/4" + ], + [ + 20, + "-1/4" + ], + [ + 21, + "-1/4" + ], + [ + 24, + "1/4" + ], + [ + 25, + "1/4" + ], + [ + 28, + "1/4" + ], + [ + 32, + "1/4" + ], + [ + 35, + "-1/4" + ], + [ + 36, + "1/4" + ], + [ + 37, + "1/4" + ], + [ + 39, + "-1/4" + ], + [ + 40, + "-1/4" + ], + [ + 43, + "1/4" + ], + [ + 44, + "1/4" + ], + [ + 45, + "1/4" + ], + [ + 46, + "1/4" + ], + [ + 47, + "1/4" + ], + [ + 48, + "-1/4" + ], + [ + 51, + "-1/4" + ], + [ + 54, + "-1/4" + ], + [ + 55, + "-1/4" + ], + [ + 58, + "-1/4" + ], + [ + 61, + "1/4" + ], + [ + 64, + "-1/4" + ], + [ + 65, + "-1/4" + ], + [ + 68, + "1/4" + ], + [ + 69, + "1/4" + ], + [ + 72, + "1/4" + ], + [ + 75, + "1/4" + ], + [ + 78, + "-1/4" + ], + [ + 79, + "1/4" + ], + [ + 82, + "-1/4" + ], + [ + 85, + "-1/4" + ], + [ + 86, + "-1/4" + ], + [ + 89, + "-1/4" + ], + [ + 93, + "1/4" + ], + [ + 94, + "-1/4" + ], + [ + 96, + "1/4" + ], + [ + 97, + "1/4" + ], + [ + 98, + "1/4" + ], + [ + 99, + "1/4" + ], + [ + 101, + "1/4" + ], + [ + 102, + "1/4" + ], + [ + 104, + "-1/4" + ], + [ + 107, + "-1/4" + ], + [ + 110, + "-1/4" + ], + [ + 111, + "-1/4" + ], + [ + 257, + "1/4" + ], + [ + 258, + "-1/4" + ], + [ + 261, + "1/4" + ], + [ + 262, + "-1/4" + ], + [ + 265, + "1/4" + ], + [ + 266, + "1/4" + ], + [ + 267, + "-1/2" + ], + [ + 269, + "1/4" + ], + [ + 270, + "1/4" + ], + [ + 271, + "-1/2" + ], + [ + 288, + "-1/4" + ], + [ + 292, + "1/4" + ], + [ + 296, + "1/4" + ], + [ + 302, + "1/4" + ], + [ + 303, + "-1/2" + ], + [ + 304, + "-1/4" + ], + [ + 308, + "1/4" + ], + [ + 312, + "1/4" + ], + [ + 318, + "1/4" + ], + [ + 319, + "-1/2" + ], + [ + 336, + "-1/4" + ], + [ + 340, + "1/4" + ], + [ + 350, + "1/4" + ], + [ + 351, + "-3/4" + ], + [ + 384, + "-1/4" + ], + [ + 388, + "1/4" + ], + [ + 398, + "1/4" + ], + [ + 399, + "-3/4" + ], + [ + 416, + "1/4" + ], + [ + 417, + "1/4" + ], + [ + 418, + "-1/4" + ], + [ + 421, + "1/4" + ], + [ + 422, + "-1/4" + ], + [ + 425, + "1/4" + ], + [ + 426, + "1/4" + ], + [ + 427, + "-1/2" + ], + [ + 429, + "1/4" + ], + [ + 430, + "1/4" + ], + [ + 431, + "-1/2" + ], + [ + 433, + "1/4" + ], + [ + 434, + "-1/4" + ], + [ + 437, + "1/4" + ], + [ + 438, + "-1/4" + ], + [ + 441, + "1/4" + ], + [ + 442, + "1/4" + ], + [ + 443, + "-1/2" + ], + [ + 445, + "1/4" + ], + [ + 446, + "1/4" + ], + [ + 447, + "-1/2" + ] + ] + ], + [ + [ + "COPY", + 780, + 92, + "1" + ], + [ + [ + 0, + "1" + ], + [ + 2, + "1" + ], + [ + 7, + "1" + ], + [ + 9, + "1" + ], + [ + 10, + "1" + ], + [ + 11, + "1" + ], + [ + 12, + "1" + ], + [ + 17, + "1" + ], + [ + 18, + "1" + ], + [ + 19, + "1" + ], + [ + 22, + "1" + ], + [ + 23, + "1" + ], + [ + 24, + "1" + ], + [ + 25, + "1" + ], + [ + 27, + "1" + ], + [ + 31, + "1" + ], + [ + 32, + "1" + ], + [ + 33, + "1" + ], + [ + 34, + "1" + ], + [ + 35, + "1" + ], + [ + 38, + "1" + ], + [ + 39, + "1" + ], + [ + 40, + "1" + ], + [ + 45, + "1" + ], + [ + 48, + "1" + ], + [ + 49, + "1" + ], + [ + 50, + "1" + ], + [ + 54, + "1" + ], + [ + 55, + "1" + ], + [ + 56, + "1" + ], + [ + 57, + "1" + ], + [ + 61, + "1" + ], + [ + 62, + "1" + ], + [ + 63, + "1" + ], + [ + 70, + "1" + ], + [ + 71, + "1" + ], + [ + 72, + "1" + ], + [ + 77, + "1" + ], + [ + 79, + "1" + ], + [ + 81, + "1" + ], + [ + 85, + "1" + ], + [ + 87, + "1" + ], + [ + 89, + "1" + ], + [ + 90, + "1" + ], + [ + 91, + "1" + ], + [ + 92, + "1" + ], + [ + 94, + "1" + ], + [ + 98, + "1" + ], + [ + 100, + "1" + ], + [ + 101, + "1" + ], + [ + 102, + "1" + ], + [ + 103, + "1" + ], + [ + 107, + "1" + ], + [ + 108, + "1" + ], + [ + 109, + "1" + ], + [ + 226, + "-1" + ], + [ + 227, + "2" + ], + [ + 229, + "1" + ], + [ + 230, + "1" + ], + [ + 233, + "1" + ], + [ + 234, + "-1" + ], + [ + 235, + "2" + ], + [ + 237, + "1" + ], + [ + 238, + "1" + ], + [ + 240, + "1" + ], + [ + 241, + "1" + ], + [ + 242, + "1" + ], + [ + 243, + "2" + ], + [ + 245, + "1" + ], + [ + 246, + "1" + ], + [ + 249, + "1" + ], + [ + 250, + "-1" + ], + [ + 251, + "2" + ], + [ + 253, + "1" + ], + [ + 254, + "1" + ], + [ + 256, + "2" + ], + [ + 257, + "1" + ], + [ + 258, + "1" + ], + [ + 261, + "1" + ], + [ + 262, + "1" + ], + [ + 265, + "1" + ], + [ + 266, + "-1" + ], + [ + 267, + "2" + ], + [ + 269, + "1" + ], + [ + 270, + "1" + ], + [ + 272, + "1" + ], + [ + 276, + "1" + ], + [ + 280, + "-1" + ], + [ + 283, + "2" + ], + [ + 286, + "1" + ], + [ + 287, + "-2" + ], + [ + 288, + "1" + ], + [ + 292, + "1" + ], + [ + 296, + "-1" + ], + [ + 299, + "2" + ], + [ + 302, + "1" + ], + [ + 303, + "-2" + ], + [ + 304, + "1" + ], + [ + 308, + "1" + ], + [ + 312, + "-1" + ], + [ + 315, + "2" + ], + [ + 318, + "1" + ], + [ + 319, + "-2" + ], + [ + 320, + "1" + ], + [ + 324, + "1" + ], + [ + 331, + "2" + ], + [ + 334, + "1" + ], + [ + 335, + "-1" + ] + ] + ], + [ + [ + "COPY", + 783, + 780, + "1" + ], + [ + [ + 0, + "1" + ], + [ + 2, + "1" + ], + [ + 7, + "1" + ], + [ + 9, + "1" + ], + [ + 10, + "1" + ], + [ + 11, + "1" + ], + [ + 12, + "1" + ], + [ + 17, + "1" + ], + [ + 18, + "1" + ], + [ + 19, + "1" + ], + [ + 22, + "1" + ], + [ + 23, + "1" + ], + [ + 24, + "1" + ], + [ + 25, + "1" + ], + [ + 27, + "1" + ], + [ + 31, + "1" + ], + [ + 32, + "1" + ], + [ + 33, + "1" + ], + [ + 34, + "1" + ], + [ + 35, + "1" + ], + [ + 38, + "1" + ], + [ + 39, + "1" + ], + [ + 40, + "1" + ], + [ + 45, + "1" + ], + [ + 48, + "1" + ], + [ + 49, + "1" + ], + [ + 50, + "1" + ], + [ + 54, + "1" + ], + [ + 55, + "1" + ], + [ + 56, + "1" + ], + [ + 57, + "1" + ], + [ + 61, + "1" + ], + [ + 62, + "1" + ], + [ + 63, + "1" + ], + [ + 70, + "1" + ], + [ + 71, + "1" + ], + [ + 72, + "1" + ], + [ + 77, + "1" + ], + [ + 79, + "1" + ], + [ + 81, + "1" + ], + [ + 85, + "1" + ], + [ + 87, + "1" + ], + [ + 89, + "1" + ], + [ + 90, + "1" + ], + [ + 91, + "1" + ], + [ + 92, + "1" + ], + [ + 94, + "1" + ], + [ + 98, + "1" + ], + [ + 100, + "1" + ], + [ + 101, + "1" + ], + [ + 102, + "1" + ], + [ + 103, + "1" + ], + [ + 107, + "1" + ], + [ + 108, + "1" + ], + [ + 109, + "1" + ], + [ + 226, + "-1" + ], + [ + 227, + "2" + ], + [ + 229, + "1" + ], + [ + 230, + "1" + ], + [ + 233, + "1" + ], + [ + 234, + "-1" + ], + [ + 235, + "2" + ], + [ + 237, + "1" + ], + [ + 238, + "1" + ], + [ + 240, + "1" + ], + [ + 241, + "1" + ], + [ + 242, + "1" + ], + [ + 243, + "2" + ], + [ + 245, + "1" + ], + [ + 246, + "1" + ], + [ + 249, + "1" + ], + [ + 250, + "-1" + ], + [ + 251, + "2" + ], + [ + 253, + "1" + ], + [ + 254, + "1" + ], + [ + 256, + "2" + ], + [ + 257, + "1" + ], + [ + 258, + "1" + ], + [ + 261, + "1" + ], + [ + 262, + "1" + ], + [ + 265, + "1" + ], + [ + 266, + "-1" + ], + [ + 267, + "2" + ], + [ + 269, + "1" + ], + [ + 270, + "1" + ], + [ + 272, + "1" + ], + [ + 276, + "1" + ], + [ + 280, + "-1" + ], + [ + 283, + "2" + ], + [ + 286, + "1" + ], + [ + 287, + "-2" + ], + [ + 288, + "1" + ], + [ + 292, + "1" + ], + [ + 296, + "-1" + ], + [ + 299, + "2" + ], + [ + 302, + "1" + ], + [ + 303, + "-2" + ], + [ + 304, + "1" + ], + [ + 308, + "1" + ], + [ + 312, + "-1" + ], + [ + 315, + "2" + ], + [ + 318, + "1" + ], + [ + 319, + "-2" + ], + [ + 320, + "1" + ], + [ + 324, + "1" + ], + [ + 331, + "2" + ], + [ + 334, + "1" + ], + [ + 335, + "-1" + ] + ] + ], + [ + [ + "COPY", + 775, + 783, + "1" + ], + [ + [ + 0, + "1" + ], + [ + 2, + "1" + ], + [ + 7, + "1" + ], + [ + 9, + "1" + ], + [ + 10, + "1" + ], + [ + 11, + "1" + ], + [ + 12, + "1" + ], + [ + 17, + "1" + ], + [ + 18, + "1" + ], + [ + 19, + "1" + ], + [ + 22, + "1" + ], + [ + 23, + "1" + ], + [ + 24, + "1" + ], + [ + 25, + "1" + ], + [ + 27, + "1" + ], + [ + 31, + "1" + ], + [ + 32, + "1" + ], + [ + 33, + "1" + ], + [ + 34, + "1" + ], + [ + 35, + "1" + ], + [ + 38, + "1" + ], + [ + 39, + "1" + ], + [ + 40, + "1" + ], + [ + 45, + "1" + ], + [ + 48, + "1" + ], + [ + 49, + "1" + ], + [ + 50, + "1" + ], + [ + 54, + "1" + ], + [ + 55, + "1" + ], + [ + 56, + "1" + ], + [ + 57, + "1" + ], + [ + 61, + "1" + ], + [ + 62, + "1" + ], + [ + 63, + "1" + ], + [ + 70, + "1" + ], + [ + 71, + "1" + ], + [ + 72, + "1" + ], + [ + 77, + "1" + ], + [ + 79, + "1" + ], + [ + 81, + "1" + ], + [ + 85, + "1" + ], + [ + 87, + "1" + ], + [ + 89, + "1" + ], + [ + 90, + "1" + ], + [ + 91, + "1" + ], + [ + 92, + "1" + ], + [ + 94, + "1" + ], + [ + 98, + "1" + ], + [ + 100, + "1" + ], + [ + 101, + "1" + ], + [ + 102, + "1" + ], + [ + 103, + "1" + ], + [ + 107, + "1" + ], + [ + 108, + "1" + ], + [ + 109, + "1" + ], + [ + 226, + "-1" + ], + [ + 227, + "2" + ], + [ + 229, + "1" + ], + [ + 230, + "1" + ], + [ + 233, + "1" + ], + [ + 234, + "-1" + ], + [ + 235, + "2" + ], + [ + 237, + "1" + ], + [ + 238, + "1" + ], + [ + 240, + "1" + ], + [ + 241, + "1" + ], + [ + 242, + "1" + ], + [ + 243, + "2" + ], + [ + 245, + "1" + ], + [ + 246, + "1" + ], + [ + 249, + "1" + ], + [ + 250, + "-1" + ], + [ + 251, + "2" + ], + [ + 253, + "1" + ], + [ + 254, + "1" + ], + [ + 256, + "2" + ], + [ + 257, + "1" + ], + [ + 258, + "1" + ], + [ + 261, + "1" + ], + [ + 262, + "1" + ], + [ + 265, + "1" + ], + [ + 266, + "-1" + ], + [ + 267, + "2" + ], + [ + 269, + "1" + ], + [ + 270, + "1" + ], + [ + 272, + "1" + ], + [ + 276, + "1" + ], + [ + 280, + "-1" + ], + [ + 283, + "2" + ], + [ + 286, + "1" + ], + [ + 287, + "-2" + ], + [ + 288, + "1" + ], + [ + 292, + "1" + ], + [ + 296, + "-1" + ], + [ + 299, + "2" + ], + [ + 302, + "1" + ], + [ + 303, + "-2" + ], + [ + 304, + "1" + ], + [ + 308, + "1" + ], + [ + 312, + "-1" + ], + [ + 315, + "2" + ], + [ + 318, + "1" + ], + [ + 319, + "-2" + ], + [ + 320, + "1" + ], + [ + 324, + "1" + ], + [ + 331, + "2" + ], + [ + 334, + "1" + ], + [ + 335, + "-1" + ] + ] + ], + [ + [ + "COPY", + 784, + 775, + "1" + ], + [ + [ + 0, + "1/4" + ], + [ + 2, + "1/4" + ], + [ + 7, + "1/4" + ], + [ + 9, + "1/4" + ], + [ + 10, + "1/4" + ], + [ + 11, + "1/4" + ], + [ + 12, + "1/4" + ], + [ + 17, + "1/4" + ], + [ + 18, + "1/4" + ], + [ + 19, + "1/4" + ], + [ + 22, + "1/4" + ], + [ + 23, + "1/4" + ], + [ + 24, + "1/4" + ], + [ + 25, + "1/4" + ], + [ + 27, + "1/4" + ], + [ + 31, + "1/4" + ], + [ + 32, + "1/4" + ], + [ + 33, + "1/4" + ], + [ + 34, + "1/4" + ], + [ + 35, + "1/4" + ], + [ + 38, + "1/4" + ], + [ + 39, + "1/4" + ], + [ + 40, + "1/4" + ], + [ + 45, + "1/4" + ], + [ + 48, + "1/4" + ], + [ + 49, + "1/4" + ], + [ + 50, + "1/4" + ], + [ + 54, + "1/4" + ], + [ + 55, + "1/4" + ], + [ + 56, + "1/4" + ], + [ + 57, + "1/4" + ], + [ + 61, + "1/4" + ], + [ + 62, + "1/4" + ], + [ + 63, + "1/4" + ], + [ + 70, + "1/4" + ], + [ + 71, + "1/4" + ], + [ + 72, + "1/4" + ], + [ + 77, + "1/4" + ], + [ + 79, + "1/4" + ], + [ + 81, + "1/4" + ], + [ + 85, + "1/4" + ], + [ + 87, + "1/4" + ], + [ + 89, + "1/4" + ], + [ + 90, + "1/4" + ], + [ + 91, + "1/4" + ], + [ + 92, + "1/4" + ], + [ + 94, + "1/4" + ], + [ + 98, + "1/4" + ], + [ + 100, + "1/4" + ], + [ + 101, + "1/4" + ], + [ + 102, + "1/4" + ], + [ + 103, + "1/4" + ], + [ + 107, + "1/4" + ], + [ + 108, + "1/4" + ], + [ + 109, + "1/4" + ], + [ + 226, + "-1/4" + ], + [ + 227, + "1/2" + ], + [ + 229, + "1/4" + ], + [ + 230, + "1/4" + ], + [ + 233, + "1/4" + ], + [ + 234, + "-1/4" + ], + [ + 235, + "1/2" + ], + [ + 237, + "1/4" + ], + [ + 238, + "1/4" + ], + [ + 240, + "1/4" + ], + [ + 241, + "1/4" + ], + [ + 242, + "1/4" + ], + [ + 243, + "1/2" + ], + [ + 245, + "1/4" + ], + [ + 246, + "1/4" + ], + [ + 249, + "1/4" + ], + [ + 250, + "-1/4" + ], + [ + 251, + "1/2" + ], + [ + 253, + "1/4" + ], + [ + 254, + "1/4" + ], + [ + 256, + "1/2" + ], + [ + 257, + "1/4" + ], + [ + 258, + "1/4" + ], + [ + 261, + "1/4" + ], + [ + 262, + "1/4" + ], + [ + 265, + "1/4" + ], + [ + 266, + "-1/4" + ], + [ + 267, + "1/2" + ], + [ + 269, + "1/4" + ], + [ + 270, + "1/4" + ], + [ + 272, + "1/4" + ], + [ + 276, + "1/4" + ], + [ + 280, + "-1/4" + ], + [ + 283, + "1/2" + ], + [ + 286, + "1/4" + ], + [ + 287, + "-1/2" + ], + [ + 288, + "1/4" + ], + [ + 292, + "1/4" + ], + [ + 296, + "-1/4" + ], + [ + 299, + "1/2" + ], + [ + 302, + "1/4" + ], + [ + 303, + "-1/2" + ], + [ + 304, + "1/4" + ], + [ + 308, + "1/4" + ], + [ + 312, + "-1/4" + ], + [ + 315, + "1/2" + ], + [ + 318, + "1/4" + ], + [ + 319, + "-1/2" + ], + [ + 320, + "1/4" + ], + [ + 324, + "1/4" + ], + [ + 331, + "1/2" + ], + [ + 334, + "1/4" + ], + [ + 335, + "-1/4" + ] + ] + ], + [ + [ + "COPY", + 782, + 9, + "1" + ], + [ + [ + 2, + "1" + ], + [ + 3, + "1" + ], + [ + 8, + "1" + ], + [ + 9, + "-1" + ], + [ + 12, + "1" + ], + [ + 13, + "1" + ], + [ + 16, + "1" + ], + [ + 17, + "-1" + ], + [ + 20, + "1" + ], + [ + 21, + "1" + ], + [ + 22, + "-1" + ], + [ + 23, + "-1" + ], + [ + 25, + "-1" + ], + [ + 26, + "-1" + ], + [ + 29, + "-1" + ], + [ + 30, + "-1" + ], + [ + 31, + "-1" + ], + [ + 33, + "-1" + ], + [ + 34, + "-1" + ], + [ + 36, + "1" + ], + [ + 37, + "1" + ], + [ + 38, + "1" + ], + [ + 43, + "1" + ], + [ + 44, + "-1" + ], + [ + 46, + "-1" + ], + [ + 47, + "-1" + ], + [ + 49, + "1" + ], + [ + 50, + "1" + ], + [ + 51, + "-1" + ], + [ + 56, + "1" + ], + [ + 59, + "1" + ], + [ + 60, + "1" + ], + [ + 61, + "1" + ], + [ + 66, + "1" + ], + [ + 67, + "-1" + ], + [ + 72, + "1" + ], + [ + 73, + "-1" + ], + [ + 74, + "-1" + ], + [ + 77, + "-1" + ], + [ + 78, + "1" + ], + [ + 79, + "-1" + ], + [ + 80, + "1" + ], + [ + 83, + "1" + ], + [ + 84, + "1" + ], + [ + 88, + "-1" + ], + [ + 89, + "-1" + ], + [ + 94, + "1" + ], + [ + 95, + "-1" + ], + [ + 99, + "-1" + ], + [ + 100, + "-1" + ], + [ + 103, + "1" + ], + [ + 104, + "-1" + ], + [ + 108, + "1" + ], + [ + 109, + "1" + ], + [ + 110, + "-1" + ], + [ + 111, + "-1" + ], + [ + 256, + "2" + ], + [ + 257, + "-1" + ], + [ + 258, + "1" + ], + [ + 261, + "-1" + ], + [ + 262, + "-1" + ], + [ + 265, + "1" + ], + [ + 266, + "1" + ], + [ + 269, + "-1" + ], + [ + 270, + "-1" + ], + [ + 272, + "-1" + ], + [ + 276, + "1" + ], + [ + 280, + "1" + ], + [ + 286, + "1" + ], + [ + 287, + "-2" + ], + [ + 320, + "-1" + ], + [ + 324, + "1" + ], + [ + 334, + "1" + ], + [ + 335, + "-3" + ], + [ + 352, + "-1" + ], + [ + 356, + "1" + ], + [ + 366, + "1" + ], + [ + 367, + "-3" + ], + [ + 368, + "-1" + ], + [ + 372, + "1" + ], + [ + 382, + "1" + ], + [ + 383, + "-3" + ], + [ + 416, + "1" + ], + [ + 417, + "-1" + ], + [ + 418, + "-1" + ], + [ + 419, + "2" + ], + [ + 421, + "-1" + ], + [ + 422, + "-1" + ], + [ + 425, + "1" + ], + [ + 426, + "1" + ], + [ + 429, + "-1" + ], + [ + 430, + "-1" + ], + [ + 433, + "-1" + ], + [ + 434, + "-1" + ], + [ + 435, + "2" + ], + [ + 437, + "-1" + ], + [ + 438, + "-1" + ], + [ + 441, + "1" + ], + [ + 442, + "1" + ], + [ + 445, + "-1" + ], + [ + 446, + "-1" + ] + ] + ], + [ + [ + "COPY", + 787, + 782, + "1" + ], + [ + [ + 2, + "1" + ], + [ + 3, + "1" + ], + [ + 8, + "1" + ], + [ + 9, + "-1" + ], + [ + 12, + "1" + ], + [ + 13, + "1" + ], + [ + 16, + "1" + ], + [ + 17, + "-1" + ], + [ + 20, + "1" + ], + [ + 21, + "1" + ], + [ + 22, + "-1" + ], + [ + 23, + "-1" + ], + [ + 25, + "-1" + ], + [ + 26, + "-1" + ], + [ + 29, + "-1" + ], + [ + 30, + "-1" + ], + [ + 31, + "-1" + ], + [ + 33, + "-1" + ], + [ + 34, + "-1" + ], + [ + 36, + "1" + ], + [ + 37, + "1" + ], + [ + 38, + "1" + ], + [ + 43, + "1" + ], + [ + 44, + "-1" + ], + [ + 46, + "-1" + ], + [ + 47, + "-1" + ], + [ + 49, + "1" + ], + [ + 50, + "1" + ], + [ + 51, + "-1" + ], + [ + 56, + "1" + ], + [ + 59, + "1" + ], + [ + 60, + "1" + ], + [ + 61, + "1" + ], + [ + 66, + "1" + ], + [ + 67, + "-1" + ], + [ + 72, + "1" + ], + [ + 73, + "-1" + ], + [ + 74, + "-1" + ], + [ + 77, + "-1" + ], + [ + 78, + "1" + ], + [ + 79, + "-1" + ], + [ + 80, + "1" + ], + [ + 83, + "1" + ], + [ + 84, + "1" + ], + [ + 88, + "-1" + ], + [ + 89, + "-1" + ], + [ + 94, + "1" + ], + [ + 95, + "-1" + ], + [ + 99, + "-1" + ], + [ + 100, + "-1" + ], + [ + 103, + "1" + ], + [ + 104, + "-1" + ], + [ + 108, + "1" + ], + [ + 109, + "1" + ], + [ + 110, + "-1" + ], + [ + 111, + "-1" + ], + [ + 256, + "2" + ], + [ + 257, + "-1" + ], + [ + 258, + "1" + ], + [ + 261, + "-1" + ], + [ + 262, + "-1" + ], + [ + 265, + "1" + ], + [ + 266, + "1" + ], + [ + 269, + "-1" + ], + [ + 270, + "-1" + ], + [ + 272, + "-1" + ], + [ + 276, + "1" + ], + [ + 280, + "1" + ], + [ + 286, + "1" + ], + [ + 287, + "-2" + ], + [ + 320, + "-1" + ], + [ + 324, + "1" + ], + [ + 334, + "1" + ], + [ + 335, + "-3" + ], + [ + 352, + "-1" + ], + [ + 356, + "1" + ], + [ + 366, + "1" + ], + [ + 367, + "-3" + ], + [ + 368, + "-1" + ], + [ + 372, + "1" + ], + [ + 382, + "1" + ], + [ + 383, + "-3" + ], + [ + 416, + "1" + ], + [ + 417, + "-1" + ], + [ + 418, + "-1" + ], + [ + 419, + "2" + ], + [ + 421, + "-1" + ], + [ + 422, + "-1" + ], + [ + 425, + "1" + ], + [ + 426, + "1" + ], + [ + 429, + "-1" + ], + [ + 430, + "-1" + ], + [ + 433, + "-1" + ], + [ + 434, + "-1" + ], + [ + 435, + "2" + ], + [ + 437, + "-1" + ], + [ + 438, + "-1" + ], + [ + 441, + "1" + ], + [ + 442, + "1" + ], + [ + 445, + "-1" + ], + [ + 446, + "-1" + ] + ] + ], + [ + [ + "COPY", + 776, + 787, + "1" + ], + [ + [ + 2, + "1" + ], + [ + 3, + "1" + ], + [ + 8, + "1" + ], + [ + 9, + "-1" + ], + [ + 12, + "1" + ], + [ + 13, + "1" + ], + [ + 16, + "1" + ], + [ + 17, + "-1" + ], + [ + 20, + "1" + ], + [ + 21, + "1" + ], + [ + 22, + "-1" + ], + [ + 23, + "-1" + ], + [ + 25, + "-1" + ], + [ + 26, + "-1" + ], + [ + 29, + "-1" + ], + [ + 30, + "-1" + ], + [ + 31, + "-1" + ], + [ + 33, + "-1" + ], + [ + 34, + "-1" + ], + [ + 36, + "1" + ], + [ + 37, + "1" + ], + [ + 38, + "1" + ], + [ + 43, + "1" + ], + [ + 44, + "-1" + ], + [ + 46, + "-1" + ], + [ + 47, + "-1" + ], + [ + 49, + "1" + ], + [ + 50, + "1" + ], + [ + 51, + "-1" + ], + [ + 56, + "1" + ], + [ + 59, + "1" + ], + [ + 60, + "1" + ], + [ + 61, + "1" + ], + [ + 66, + "1" + ], + [ + 67, + "-1" + ], + [ + 72, + "1" + ], + [ + 73, + "-1" + ], + [ + 74, + "-1" + ], + [ + 77, + "-1" + ], + [ + 78, + "1" + ], + [ + 79, + "-1" + ], + [ + 80, + "1" + ], + [ + 83, + "1" + ], + [ + 84, + "1" + ], + [ + 88, + "-1" + ], + [ + 89, + "-1" + ], + [ + 94, + "1" + ], + [ + 95, + "-1" + ], + [ + 99, + "-1" + ], + [ + 100, + "-1" + ], + [ + 103, + "1" + ], + [ + 104, + "-1" + ], + [ + 108, + "1" + ], + [ + 109, + "1" + ], + [ + 110, + "-1" + ], + [ + 111, + "-1" + ], + [ + 256, + "2" + ], + [ + 257, + "-1" + ], + [ + 258, + "1" + ], + [ + 261, + "-1" + ], + [ + 262, + "-1" + ], + [ + 265, + "1" + ], + [ + 266, + "1" + ], + [ + 269, + "-1" + ], + [ + 270, + "-1" + ], + [ + 272, + "-1" + ], + [ + 276, + "1" + ], + [ + 280, + "1" + ], + [ + 286, + "1" + ], + [ + 287, + "-2" + ], + [ + 320, + "-1" + ], + [ + 324, + "1" + ], + [ + 334, + "1" + ], + [ + 335, + "-3" + ], + [ + 352, + "-1" + ], + [ + 356, + "1" + ], + [ + 366, + "1" + ], + [ + 367, + "-3" + ], + [ + 368, + "-1" + ], + [ + 372, + "1" + ], + [ + 382, + "1" + ], + [ + 383, + "-3" + ], + [ + 416, + "1" + ], + [ + 417, + "-1" + ], + [ + 418, + "-1" + ], + [ + 419, + "2" + ], + [ + 421, + "-1" + ], + [ + 422, + "-1" + ], + [ + 425, + "1" + ], + [ + 426, + "1" + ], + [ + 429, + "-1" + ], + [ + 430, + "-1" + ], + [ + 433, + "-1" + ], + [ + 434, + "-1" + ], + [ + 435, + "2" + ], + [ + 437, + "-1" + ], + [ + 438, + "-1" + ], + [ + 441, + "1" + ], + [ + 442, + "1" + ], + [ + 445, + "-1" + ], + [ + 446, + "-1" + ] + ] + ], + [ + [ + "COPY", + 788, + 776, + "1" + ], + [ + [ + 2, + "1/4" + ], + [ + 3, + "1/4" + ], + [ + 8, + "1/4" + ], + [ + 9, + "-1/4" + ], + [ + 12, + "1/4" + ], + [ + 13, + "1/4" + ], + [ + 16, + "1/4" + ], + [ + 17, + "-1/4" + ], + [ + 20, + "1/4" + ], + [ + 21, + "1/4" + ], + [ + 22, + "-1/4" + ], + [ + 23, + "-1/4" + ], + [ + 25, + "-1/4" + ], + [ + 26, + "-1/4" + ], + [ + 29, + "-1/4" + ], + [ + 30, + "-1/4" + ], + [ + 31, + "-1/4" + ], + [ + 33, + "-1/4" + ], + [ + 34, + "-1/4" + ], + [ + 36, + "1/4" + ], + [ + 37, + "1/4" + ], + [ + 38, + "1/4" + ], + [ + 43, + "1/4" + ], + [ + 44, + "-1/4" + ], + [ + 46, + "-1/4" + ], + [ + 47, + "-1/4" + ], + [ + 49, + "1/4" + ], + [ + 50, + "1/4" + ], + [ + 51, + "-1/4" + ], + [ + 56, + "1/4" + ], + [ + 59, + "1/4" + ], + [ + 60, + "1/4" + ], + [ + 61, + "1/4" + ], + [ + 66, + "1/4" + ], + [ + 67, + "-1/4" + ], + [ + 72, + "1/4" + ], + [ + 73, + "-1/4" + ], + [ + 74, + "-1/4" + ], + [ + 77, + "-1/4" + ], + [ + 78, + "1/4" + ], + [ + 79, + "-1/4" + ], + [ + 80, + "1/4" + ], + [ + 83, + "1/4" + ], + [ + 84, + "1/4" + ], + [ + 88, + "-1/4" + ], + [ + 89, + "-1/4" + ], + [ + 94, + "1/4" + ], + [ + 95, + "-1/4" + ], + [ + 99, + "-1/4" + ], + [ + 100, + "-1/4" + ], + [ + 103, + "1/4" + ], + [ + 104, + "-1/4" + ], + [ + 108, + "1/4" + ], + [ + 109, + "1/4" + ], + [ + 110, + "-1/4" + ], + [ + 111, + "-1/4" + ], + [ + 256, + "1/2" + ], + [ + 257, + "-1/4" + ], + [ + 258, + "1/4" + ], + [ + 261, + "-1/4" + ], + [ + 262, + "-1/4" + ], + [ + 265, + "1/4" + ], + [ + 266, + "1/4" + ], + [ + 269, + "-1/4" + ], + [ + 270, + "-1/4" + ], + [ + 272, + "-1/4" + ], + [ + 276, + "1/4" + ], + [ + 280, + "1/4" + ], + [ + 286, + "1/4" + ], + [ + 287, + "-1/2" + ], + [ + 320, + "-1/4" + ], + [ + 324, + "1/4" + ], + [ + 334, + "1/4" + ], + [ + 335, + "-3/4" + ], + [ + 352, + "-1/4" + ], + [ + 356, + "1/4" + ], + [ + 366, + "1/4" + ], + [ + 367, + "-3/4" + ], + [ + 368, + "-1/4" + ], + [ + 372, + "1/4" + ], + [ + 382, + "1/4" + ], + [ + 383, + "-3/4" + ], + [ + 416, + "1/4" + ], + [ + 417, + "-1/4" + ], + [ + 418, + "-1/4" + ], + [ + 419, + "1/2" + ], + [ + 421, + "-1/4" + ], + [ + 422, + "-1/4" + ], + [ + 425, + "1/4" + ], + [ + 426, + "1/4" + ], + [ + 429, + "-1/4" + ], + [ + 430, + "-1/4" + ], + [ + 433, + "-1/4" + ], + [ + 434, + "-1/4" + ], + [ + 435, + "1/2" + ], + [ + 437, + "-1/4" + ], + [ + 438, + "-1/4" + ], + [ + 441, + "1/4" + ], + [ + 442, + "1/4" + ], + [ + 445, + "-1/4" + ], + [ + 446, + "-1/4" + ] + ] + ], + [ + [ + "COPY", + 779, + 240, + "1" + ], + [ + [ + 4, + "-1" + ], + [ + 5, + "1" + ], + [ + 10, + "1" + ], + [ + 11, + "-1" + ], + [ + 15, + "1" + ], + [ + 18, + "1" + ], + [ + 19, + "-1" + ], + [ + 20, + "-1" + ], + [ + 21, + "1" + ], + [ + 22, + "1" + ], + [ + 23, + "-1" + ], + [ + 29, + "-1" + ], + [ + 30, + "1" + ], + [ + 33, + "-1" + ], + [ + 34, + "1" + ], + [ + 36, + "1" + ], + [ + 37, + "-1" + ], + [ + 39, + "-1" + ], + [ + 40, + "1" + ], + [ + 41, + "1" + ], + [ + 42, + "-1" + ], + [ + 46, + "-1" + ], + [ + 47, + "1" + ], + [ + 49, + "1" + ], + [ + 50, + "-1" + ], + [ + 52, + "1" + ], + [ + 53, + "-1" + ], + [ + 54, + "1" + ], + [ + 55, + "-1" + ], + [ + 59, + "1" + ], + [ + 60, + "-1" + ], + [ + 62, + "-1" + ], + [ + 63, + "1" + ], + [ + 64, + "1" + ], + [ + 65, + "-1" + ], + [ + 68, + "1" + ], + [ + 69, + "-1" + ], + [ + 70, + "1" + ], + [ + 71, + "-1" + ], + [ + 73, + "1" + ], + [ + 74, + "-1" + ], + [ + 83, + "1" + ], + [ + 84, + "-1" + ], + [ + 90, + "1" + ], + [ + 91, + "-1" + ], + [ + 96, + "1" + ], + [ + 97, + "-1" + ], + [ + 101, + "1" + ], + [ + 102, + "-1" + ], + [ + 105, + "1" + ], + [ + 106, + "-1" + ], + [ + 108, + "1" + ], + [ + 109, + "-1" + ], + [ + 110, + "-1" + ], + [ + 111, + "1" + ], + [ + 240, + "1" + ], + [ + 241, + "1" + ], + [ + 242, + "-1" + ], + [ + 245, + "1" + ], + [ + 246, + "-1" + ], + [ + 249, + "1" + ], + [ + 250, + "1" + ], + [ + 251, + "-2" + ], + [ + 253, + "1" + ], + [ + 254, + "1" + ], + [ + 255, + "-2" + ], + [ + 288, + "1" + ], + [ + 292, + "-1" + ], + [ + 296, + "-1" + ], + [ + 302, + "-1" + ], + [ + 303, + "-2" + ], + [ + 320, + "1" + ], + [ + 324, + "-1" + ], + [ + 334, + "-1" + ], + [ + 335, + "-1" + ], + [ + 352, + "1" + ], + [ + 356, + "-1" + ], + [ + 366, + "-1" + ], + [ + 367, + "-1" + ], + [ + 384, + "1" + ], + [ + 388, + "-1" + ], + [ + 398, + "-1" + ], + [ + 399, + "-1" + ], + [ + 400, + "1" + ], + [ + 401, + "1" + ], + [ + 402, + "-1" + ], + [ + 406, + "-1" + ], + [ + 409, + "1" + ], + [ + 410, + "1" + ], + [ + 411, + "-2" + ], + [ + 413, + "1" + ], + [ + 414, + "1" + ], + [ + 415, + "-2" + ], + [ + 433, + "-1" + ], + [ + 434, + "1" + ], + [ + 437, + "1" + ], + [ + 438, + "1" + ], + [ + 441, + "-1" + ], + [ + 442, + "-1" + ], + [ + 445, + "-1" + ], + [ + 446, + "1" + ], + [ + 447, + "-2" + ] + ] + ], + [ + [ + "COPY", + 789, + 779, + "1" + ], + [ + [ + 4, + "-1" + ], + [ + 5, + "1" + ], + [ + 10, + "1" + ], + [ + 11, + "-1" + ], + [ + 15, + "1" + ], + [ + 18, + "1" + ], + [ + 19, + "-1" + ], + [ + 20, + "-1" + ], + [ + 21, + "1" + ], + [ + 22, + "1" + ], + [ + 23, + "-1" + ], + [ + 29, + "-1" + ], + [ + 30, + "1" + ], + [ + 33, + "-1" + ], + [ + 34, + "1" + ], + [ + 36, + "1" + ], + [ + 37, + "-1" + ], + [ + 39, + "-1" + ], + [ + 40, + "1" + ], + [ + 41, + "1" + ], + [ + 42, + "-1" + ], + [ + 46, + "-1" + ], + [ + 47, + "1" + ], + [ + 49, + "1" + ], + [ + 50, + "-1" + ], + [ + 52, + "1" + ], + [ + 53, + "-1" + ], + [ + 54, + "1" + ], + [ + 55, + "-1" + ], + [ + 59, + "1" + ], + [ + 60, + "-1" + ], + [ + 62, + "-1" + ], + [ + 63, + "1" + ], + [ + 64, + "1" + ], + [ + 65, + "-1" + ], + [ + 68, + "1" + ], + [ + 69, + "-1" + ], + [ + 70, + "1" + ], + [ + 71, + "-1" + ], + [ + 73, + "1" + ], + [ + 74, + "-1" + ], + [ + 83, + "1" + ], + [ + 84, + "-1" + ], + [ + 90, + "1" + ], + [ + 91, + "-1" + ], + [ + 96, + "1" + ], + [ + 97, + "-1" + ], + [ + 101, + "1" + ], + [ + 102, + "-1" + ], + [ + 105, + "1" + ], + [ + 106, + "-1" + ], + [ + 108, + "1" + ], + [ + 109, + "-1" + ], + [ + 110, + "-1" + ], + [ + 111, + "1" + ], + [ + 240, + "1" + ], + [ + 241, + "1" + ], + [ + 242, + "-1" + ], + [ + 245, + "1" + ], + [ + 246, + "-1" + ], + [ + 249, + "1" + ], + [ + 250, + "1" + ], + [ + 251, + "-2" + ], + [ + 253, + "1" + ], + [ + 254, + "1" + ], + [ + 255, + "-2" + ], + [ + 288, + "1" + ], + [ + 292, + "-1" + ], + [ + 296, + "-1" + ], + [ + 302, + "-1" + ], + [ + 303, + "-2" + ], + [ + 320, + "1" + ], + [ + 324, + "-1" + ], + [ + 334, + "-1" + ], + [ + 335, + "-1" + ], + [ + 352, + "1" + ], + [ + 356, + "-1" + ], + [ + 366, + "-1" + ], + [ + 367, + "-1" + ], + [ + 384, + "1" + ], + [ + 388, + "-1" + ], + [ + 398, + "-1" + ], + [ + 399, + "-1" + ], + [ + 400, + "1" + ], + [ + 401, + "1" + ], + [ + 402, + "-1" + ], + [ + 406, + "-1" + ], + [ + 409, + "1" + ], + [ + 410, + "1" + ], + [ + 411, + "-2" + ], + [ + 413, + "1" + ], + [ + 414, + "1" + ], + [ + 415, + "-2" + ], + [ + 433, + "-1" + ], + [ + 434, + "1" + ], + [ + 437, + "1" + ], + [ + 438, + "1" + ], + [ + 441, + "-1" + ], + [ + 442, + "-1" + ], + [ + 445, + "-1" + ], + [ + 446, + "1" + ], + [ + 447, + "-2" + ] + ] + ], + [ + [ + "COPY", + 777, + 789, + "1" + ], + [ + [ + 4, + "-1" + ], + [ + 5, + "1" + ], + [ + 10, + "1" + ], + [ + 11, + "-1" + ], + [ + 15, + "1" + ], + [ + 18, + "1" + ], + [ + 19, + "-1" + ], + [ + 20, + "-1" + ], + [ + 21, + "1" + ], + [ + 22, + "1" + ], + [ + 23, + "-1" + ], + [ + 29, + "-1" + ], + [ + 30, + "1" + ], + [ + 33, + "-1" + ], + [ + 34, + "1" + ], + [ + 36, + "1" + ], + [ + 37, + "-1" + ], + [ + 39, + "-1" + ], + [ + 40, + "1" + ], + [ + 41, + "1" + ], + [ + 42, + "-1" + ], + [ + 46, + "-1" + ], + [ + 47, + "1" + ], + [ + 49, + "1" + ], + [ + 50, + "-1" + ], + [ + 52, + "1" + ], + [ + 53, + "-1" + ], + [ + 54, + "1" + ], + [ + 55, + "-1" + ], + [ + 59, + "1" + ], + [ + 60, + "-1" + ], + [ + 62, + "-1" + ], + [ + 63, + "1" + ], + [ + 64, + "1" + ], + [ + 65, + "-1" + ], + [ + 68, + "1" + ], + [ + 69, + "-1" + ], + [ + 70, + "1" + ], + [ + 71, + "-1" + ], + [ + 73, + "1" + ], + [ + 74, + "-1" + ], + [ + 83, + "1" + ], + [ + 84, + "-1" + ], + [ + 90, + "1" + ], + [ + 91, + "-1" + ], + [ + 96, + "1" + ], + [ + 97, + "-1" + ], + [ + 101, + "1" + ], + [ + 102, + "-1" + ], + [ + 105, + "1" + ], + [ + 106, + "-1" + ], + [ + 108, + "1" + ], + [ + 109, + "-1" + ], + [ + 110, + "-1" + ], + [ + 111, + "1" + ], + [ + 240, + "1" + ], + [ + 241, + "1" + ], + [ + 242, + "-1" + ], + [ + 245, + "1" + ], + [ + 246, + "-1" + ], + [ + 249, + "1" + ], + [ + 250, + "1" + ], + [ + 251, + "-2" + ], + [ + 253, + "1" + ], + [ + 254, + "1" + ], + [ + 255, + "-2" + ], + [ + 288, + "1" + ], + [ + 292, + "-1" + ], + [ + 296, + "-1" + ], + [ + 302, + "-1" + ], + [ + 303, + "-2" + ], + [ + 320, + "1" + ], + [ + 324, + "-1" + ], + [ + 334, + "-1" + ], + [ + 335, + "-1" + ], + [ + 352, + "1" + ], + [ + 356, + "-1" + ], + [ + 366, + "-1" + ], + [ + 367, + "-1" + ], + [ + 384, + "1" + ], + [ + 388, + "-1" + ], + [ + 398, + "-1" + ], + [ + 399, + "-1" + ], + [ + 400, + "1" + ], + [ + 401, + "1" + ], + [ + 402, + "-1" + ], + [ + 406, + "-1" + ], + [ + 409, + "1" + ], + [ + 410, + "1" + ], + [ + 411, + "-2" + ], + [ + 413, + "1" + ], + [ + 414, + "1" + ], + [ + 415, + "-2" + ], + [ + 433, + "-1" + ], + [ + 434, + "1" + ], + [ + 437, + "1" + ], + [ + 438, + "1" + ], + [ + 441, + "-1" + ], + [ + 442, + "-1" + ], + [ + 445, + "-1" + ], + [ + 446, + "1" + ], + [ + 447, + "-2" + ] + ] + ], + [ + [ + "COPY", + 790, + 777, + "1" + ], + [ + [ + 4, + "1/4" + ], + [ + 5, + "-1/4" + ], + [ + 10, + "-1/4" + ], + [ + 11, + "1/4" + ], + [ + 15, + "-1/4" + ], + [ + 18, + "-1/4" + ], + [ + 19, + "1/4" + ], + [ + 20, + "1/4" + ], + [ + 21, + "-1/4" + ], + [ + 22, + "-1/4" + ], + [ + 23, + "1/4" + ], + [ + 29, + "1/4" + ], + [ + 30, + "-1/4" + ], + [ + 33, + "1/4" + ], + [ + 34, + "-1/4" + ], + [ + 36, + "-1/4" + ], + [ + 37, + "1/4" + ], + [ + 39, + "1/4" + ], + [ + 40, + "-1/4" + ], + [ + 41, + "-1/4" + ], + [ + 42, + "1/4" + ], + [ + 46, + "1/4" + ], + [ + 47, + "-1/4" + ], + [ + 49, + "-1/4" + ], + [ + 50, + "1/4" + ], + [ + 52, + "-1/4" + ], + [ + 53, + "1/4" + ], + [ + 54, + "-1/4" + ], + [ + 55, + "1/4" + ], + [ + 59, + "-1/4" + ], + [ + 60, + "1/4" + ], + [ + 62, + "1/4" + ], + [ + 63, + "-1/4" + ], + [ + 64, + "-1/4" + ], + [ + 65, + "1/4" + ], + [ + 68, + "-1/4" + ], + [ + 69, + "1/4" + ], + [ + 70, + "-1/4" + ], + [ + 71, + "1/4" + ], + [ + 73, + "-1/4" + ], + [ + 74, + "1/4" + ], + [ + 83, + "-1/4" + ], + [ + 84, + "1/4" + ], + [ + 90, + "-1/4" + ], + [ + 91, + "1/4" + ], + [ + 96, + "-1/4" + ], + [ + 97, + "1/4" + ], + [ + 101, + "-1/4" + ], + [ + 102, + "1/4" + ], + [ + 105, + "-1/4" + ], + [ + 106, + "1/4" + ], + [ + 108, + "-1/4" + ], + [ + 109, + "1/4" + ], + [ + 110, + "1/4" + ], + [ + 111, + "-1/4" + ], + [ + 240, + "-1/4" + ], + [ + 241, + "-1/4" + ], + [ + 242, + "1/4" + ], + [ + 245, + "-1/4" + ], + [ + 246, + "1/4" + ], + [ + 249, + "-1/4" + ], + [ + 250, + "-1/4" + ], + [ + 251, + "1/2" + ], + [ + 253, + "-1/4" + ], + [ + 254, + "-1/4" + ], + [ + 255, + "1/2" + ], + [ + 288, + "-1/4" + ], + [ + 292, + "1/4" + ], + [ + 296, + "1/4" + ], + [ + 302, + "1/4" + ], + [ + 303, + "1/2" + ], + [ + 320, + "-1/4" + ], + [ + 324, + "1/4" + ], + [ + 334, + "1/4" + ], + [ + 335, + "1/4" + ], + [ + 352, + "-1/4" + ], + [ + 356, + "1/4" + ], + [ + 366, + "1/4" + ], + [ + 367, + "1/4" + ], + [ + 384, + "-1/4" + ], + [ + 388, + "1/4" + ], + [ + 398, + "1/4" + ], + [ + 399, + "1/4" + ], + [ + 400, + "-1/4" + ], + [ + 401, + "-1/4" + ], + [ + 402, + "1/4" + ], + [ + 406, + "1/4" + ], + [ + 409, + "-1/4" + ], + [ + 410, + "-1/4" + ], + [ + 411, + "1/2" + ], + [ + 413, + "-1/4" + ], + [ + 414, + "-1/4" + ], + [ + 415, + "1/2" + ], + [ + 433, + "1/4" + ], + [ + 434, + "-1/4" + ], + [ + 437, + "-1/4" + ], + [ + 438, + "-1/4" + ], + [ + 441, + "1/4" + ], + [ + 442, + "1/4" + ], + [ + 445, + "1/4" + ], + [ + 446, + "-1/4" + ], + [ + 447, + "1/2" + ] + ] + ], + [ + [ + "COPY", + 778, + 572, + "1" + ], + [ + [ + 0, + "1/2" + ], + [ + 5, + "1/2" + ], + [ + 7, + "1/2" + ], + [ + 8, + "-1/2" + ], + [ + 9, + "1/2" + ], + [ + 10, + "1/2" + ], + [ + 15, + "1/2" + ], + [ + 16, + "-1/2" + ], + [ + 17, + "1/2" + ], + [ + 18, + "1/2" + ], + [ + 20, + "-1/2" + ], + [ + 22, + "1/2" + ], + [ + 25, + "1/2" + ], + [ + 30, + "1/2" + ], + [ + 31, + "1/2" + ], + [ + 32, + "1/2" + ], + [ + 33, + "1/2" + ], + [ + 37, + "-1/2" + ], + [ + 40, + "1/2" + ], + [ + 42, + "-1/2" + ], + [ + 43, + "-1/2" + ], + [ + 47, + "1/2" + ], + [ + 48, + "1/2" + ], + [ + 49, + "1/2" + ], + [ + 51, + "1/2" + ], + [ + 52, + "1/2" + ], + [ + 54, + "1/2" + ], + [ + 60, + "-1/2" + ], + [ + 63, + "1/2" + ], + [ + 65, + "-1/2" + ], + [ + 66, + "-1/2" + ], + [ + 67, + "1/2" + ], + [ + 68, + "1/2" + ], + [ + 70, + "1/2" + ], + [ + 73, + "1/2" + ], + [ + 77, + "1/2" + ], + [ + 79, + "1/2" + ], + [ + 84, + "-1/2" + ], + [ + 85, + "1/2" + ], + [ + 87, + "1/2" + ], + [ + 88, + "1/2" + ], + [ + 89, + "1/2" + ], + [ + 90, + "1/2" + ], + [ + 92, + "1/2" + ], + [ + 97, + "-1/2" + ], + [ + 98, + "1/2" + ], + [ + 99, + "1/2" + ], + [ + 100, + "1/2" + ], + [ + 101, + "1/2" + ], + [ + 106, + "-1/2" + ], + [ + 109, + "-1/2" + ], + [ + 111, + "1/2" + ], + [ + 146, + "-1" + ], + [ + 226, + "-1/2" + ], + [ + 227, + "1/2" + ], + [ + 229, + "1/2" + ], + [ + 233, + "1/2" + ], + [ + 237, + "1/2" + ], + [ + 238, + "1/2" + ], + [ + 239, + "-1/2" + ], + [ + 240, + "1/2" + ], + [ + 241, + "1/2" + ], + [ + 243, + "1/2" + ], + [ + 245, + "1/2" + ], + [ + 249, + "1/2" + ], + [ + 253, + "1/2" + ], + [ + 254, + "1/2" + ], + [ + 255, + "-1/2" + ], + [ + 257, + "1/2" + ], + [ + 261, + "1/2" + ], + [ + 262, + "1/2" + ], + [ + 266, + "-1/2" + ], + [ + 267, + "1/2" + ], + [ + 269, + "1/2" + ], + [ + 270, + "1/2" + ], + [ + 272, + "1/2" + ], + [ + 280, + "-1/2" + ], + [ + 283, + "1/2" + ], + [ + 288, + "1/2" + ], + [ + 296, + "-1/2" + ], + [ + 299, + "1/2" + ], + [ + 303, + "-1" + ], + [ + 304, + "1/2" + ], + [ + 308, + "1/2" + ], + [ + 312, + "-1/2" + ], + [ + 318, + "1/2" + ], + [ + 319, + "-1" + ], + [ + 320, + "1" + ], + [ + 352, + "1/2" + ], + [ + 356, + "-1/2" + ], + [ + 366, + "-1/2" + ], + [ + 367, + "1/2" + ], + [ + 368, + "1/2" + ], + [ + 379, + "-1/2" + ], + [ + 383, + "1/2" + ], + [ + 384, + "1/2" + ], + [ + 395, + "-1/2" + ], + [ + 399, + "-1/2" + ], + [ + 400, + "1/2" + ], + [ + 411, + "-1/2" + ], + [ + 414, + "1/2" + ], + [ + 415, + "-1" + ], + [ + 418, + "1/2" + ], + [ + 419, + "-1/2" + ], + [ + 421, + "1/2" + ], + [ + 422, + "1/2" + ], + [ + 425, + "-1/2" + ], + [ + 426, + "-1/2" + ], + [ + 430, + "1/2" + ], + [ + 431, + "-1/2" + ], + [ + 434, + "1/2" + ], + [ + 435, + "-1/2" + ], + [ + 437, + "1/2" + ], + [ + 438, + "1/2" + ], + [ + 441, + "-1/2" + ], + [ + 442, + "-1/2" + ], + [ + 446, + "1/2" + ], + [ + 447, + "-1/2" + ], + [ + 572, + "1/2" + ] + ] + ], + [ + [ + "COPY", + 778, + 572, + "1" + ], + [ + [ + 0, + "1/2" + ], + [ + 2, + "-1/2" + ], + [ + 7, + "1/2" + ], + [ + 8, + "-1" + ], + [ + 9, + "1/2" + ], + [ + 10, + "1/2" + ], + [ + 11, + "1/2" + ], + [ + 12, + "-1/2" + ], + [ + 16, + "-1" + ], + [ + 17, + "1/2" + ], + [ + 18, + "1/2" + ], + [ + 19, + "1/2" + ], + [ + 20, + "-1" + ], + [ + 22, + "1/2" + ], + [ + 23, + "1/2" + ], + [ + 24, + "1/2" + ], + [ + 25, + "1" + ], + [ + 26, + "1/2" + ], + [ + 28, + "1/2" + ], + [ + 29, + "1/2" + ], + [ + 30, + "1/2" + ], + [ + 31, + "1" + ], + [ + 32, + "1" + ], + [ + 33, + "1" + ], + [ + 36, + "-1/2" + ], + [ + 37, + "-1/2" + ], + [ + 41, + "-1/2" + ], + [ + 42, + "-1/2" + ], + [ + 43, + "-1/2" + ], + [ + 44, + "1/2" + ], + [ + 46, + "1/2" + ], + [ + 47, + "1/2" + ], + [ + 51, + "1/2" + ], + [ + 52, + "1/2" + ], + [ + 53, + "1/2" + ], + [ + 58, + "-1/2" + ], + [ + 59, + "-1/2" + ], + [ + 60, + "-1/2" + ], + [ + 64, + "-1/2" + ], + [ + 65, + "-1/2" + ], + [ + 66, + "-1/2" + ], + [ + 67, + "1/2" + ], + [ + 68, + "1/2" + ], + [ + 69, + "1/2" + ], + [ + 73, + "1/2" + ], + [ + 74, + "1/2" + ], + [ + 75, + "1/2" + ], + [ + 77, + "1" + ], + [ + 78, + "-1/2" + ], + [ + 79, + "1" + ], + [ + 80, + "-1/2" + ], + [ + 82, + "-1/2" + ], + [ + 83, + "-1/2" + ], + [ + 84, + "-1/2" + ], + [ + 85, + "1/2" + ], + [ + 87, + "1/2" + ], + [ + 88, + "1" + ], + [ + 89, + "1/2" + ], + [ + 90, + "1/2" + ], + [ + 91, + "1/2" + ], + [ + 92, + "1/2" + ], + [ + 94, + "-1/2" + ], + [ + 98, + "1/2" + ], + [ + 99, + "1" + ], + [ + 100, + "1/2" + ], + [ + 101, + "1/2" + ], + [ + 102, + "1/2" + ], + [ + 103, + "-1/2" + ], + [ + 107, + "-1/2" + ], + [ + 108, + "-1/2" + ], + [ + 109, + "-1/2" + ], + [ + 133, + "1" + ], + [ + 146, + "-1" + ], + [ + 226, + "-1/2" + ], + [ + 227, + "1/2" + ], + [ + 229, + "1/2" + ], + [ + 233, + "1/2" + ], + [ + 237, + "1/2" + ], + [ + 238, + "1/2" + ], + [ + 239, + "-1/2" + ], + [ + 241, + "1/2" + ], + [ + 245, + "1/2" + ], + [ + 246, + "1/2" + ], + [ + 250, + "-1/2" + ], + [ + 251, + "1/2" + ], + [ + 253, + "1/2" + ], + [ + 254, + "1/2" + ], + [ + 256, + "-1/2" + ], + [ + 257, + "1" + ], + [ + 258, + "-1/2" + ], + [ + 261, + "1" + ], + [ + 262, + "1/2" + ], + [ + 266, + "-1/2" + ], + [ + 269, + "1" + ], + [ + 270, + "1" + ], + [ + 271, + "-1/2" + ], + [ + 272, + "1/2" + ], + [ + 280, + "-1/2" + ], + [ + 283, + "1/2" + ], + [ + 287, + "1" + ], + [ + 292, + "1/2" + ], + [ + 299, + "1/2" + ], + [ + 302, + "1/2" + ], + [ + 303, + "-1" + ], + [ + 308, + "1" + ], + [ + 318, + "1" + ], + [ + 319, + "-1" + ], + [ + 320, + "1" + ], + [ + 335, + "1" + ], + [ + 336, + "-1/2" + ], + [ + 340, + "1/2" + ], + [ + 350, + "1/2" + ], + [ + 351, + "-1/2" + ], + [ + 352, + "1/2" + ], + [ + 356, + "-1/2" + ], + [ + 366, + "-1/2" + ], + [ + 367, + "3/2" + ], + [ + 368, + "1/2" + ], + [ + 379, + "-1/2" + ], + [ + 383, + "3/2" + ], + [ + 388, + "1/2" + ], + [ + 395, + "-1/2" + ], + [ + 398, + "1/2" + ], + [ + 399, + "-1" + ], + [ + 402, + "1/2" + ], + [ + 403, + "-1/2" + ], + [ + 406, + "1/2" + ], + [ + 409, + "-1/2" + ], + [ + 410, + "-1/2" + ], + [ + 414, + "1/2" + ], + [ + 415, + "-1/2" + ], + [ + 417, + "1/2" + ], + [ + 418, + "1/2" + ], + [ + 419, + "-1" + ], + [ + 421, + "1" + ], + [ + 422, + "1/2" + ], + [ + 425, + "-1/2" + ], + [ + 426, + "-1/2" + ], + [ + 427, + "-1/2" + ], + [ + 429, + "1/2" + ], + [ + 430, + "1" + ], + [ + 431, + "-1" + ], + [ + 433, + "1/2" + ], + [ + 434, + "1/2" + ], + [ + 435, + "-3/2" + ], + [ + 437, + "1/2" + ], + [ + 441, + "-1/2" + ], + [ + 443, + "-1" + ], + [ + 445, + "1/2" + ], + [ + 446, + "1/2" + ], + [ + 447, + "-1/2" + ], + [ + 572, + "1" + ], + [ + 709, + "-2" + ] + ] + ] + ], + "wrong_scalar_coefficient_rejected": true +} diff --git a/research/p104-accumulated-block-composition/CONSTRUCT-EDITS.json b/research/p104-accumulated-block-composition/CONSTRUCT-EDITS.json new file mode 100644 index 0000000000..05928cd231 --- /dev/null +++ b/research/p104-accumulated-block-composition/CONSTRUCT-EDITS.json @@ -0,0 +1,22 @@ +[ + [ + "from sources import need", + "from sources import need, load" + ], + [ + "HERE/'source/R22-EDITS.json'", + "HERE/'vendor/blocks/source/R22-EDITS.json'" + ], + [ + "word['owned_fields'] == source['owned_fields'] == 25", + "word['owned_fields'] == source['owned_fields'] == 28" + ], + [ + "from second_block import extend", + "extend = load(HERE/'vendor/blocks/second_block.py', 'composed_second_block').extend" + ], + [ + " return word, dict(R22=witness, second_block=second)", + " word['schema'] = 'p104-accumulated-block-composition/1'\n return word, dict(R22=witness, second_block=second)" + ] +] diff --git a/research/p104-accumulated-block-composition/HUNKS.json b/research/p104-accumulated-block-composition/HUNKS.json new file mode 100644 index 0000000000..d775fddb5b --- /dev/null +++ b/research/p104-accumulated-block-composition/HUNKS.json @@ -0,0 +1,490 @@ +{ + "R22": [ + { + "new_length": 109, + "new_sha256": "95524ed650a1d02ee91bb7cc3f2c2397013e3ac7eb14f30af1dff69a4ba4e817", + "old_length": 104, + "old_sha256": "07fafff4aa8ab73e21f94d16d5ead03436a1b7082724d4701e6ae57ed2708db8", + "source_index": 12294 + }, + { + "new_length": 0, + "new_sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "old_length": 1, + "old_sha256": "3b73f9dda1c5192e0119160f176c0726576179355f9212784384e1dffbba0ff1", + "source_index": 12891 + }, + { + "new_length": 0, + "new_sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "old_length": 1, + "old_sha256": "1e108b07bf83bcf8767f9c38aa7138a2bee915fda7102269ef848687dba4df23", + "source_index": 12904 + }, + { + "new_length": 0, + "new_sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "old_length": 1, + "old_sha256": "4057536a6573a8c742d64c13cf51c72880a268e79e647b4ed51ec893623da843", + "source_index": 12917 + }, + { + "new_length": 2, + "new_sha256": "dec7ae33bd16a7689d63603e99e1a6905ce8189ad8a0c90a51861e538149c6b8", + "old_length": 1, + "old_sha256": "f8b8cb5204d77ca92dd94b5aead7d152fb3f06c8dc32bc610a0e965c336cf9a5", + "source_index": 12929 + }, + { + "new_length": 1, + "new_sha256": "6a08793621bbb1365ce443626351a2f1c822f44d04b91d1f5610a542fef9311c", + "old_length": 2, + "old_sha256": "b52f1d67a86fe5b83eaf06dc62784c16345f8ff67eb548edbbb06352b877608d", + "source_index": 20923 + }, + { + "new_length": 0, + "new_sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "old_length": 1, + "old_sha256": "b2ee2d4096c2aa7d2c3b6afa1a598d8c03607a022a4a6f2a80f5de4be9a07d41", + "source_index": 20968 + }, + { + "new_length": 1, + "new_sha256": "ec9e9b74527a2f12f2b98335911b826d23454a63f2b5899d2108ac2750fea71d", + "old_length": 1, + "old_sha256": "7d52c5525a5f9b4c63d53acee91b7c969ff3deb3a8a563e0421477afccaddbb4", + "source_index": 22287 + } + ], + "role92": { + "accumulation": { + "after": 1091, + "before": 267, + "owned_role": 798, + "role": 92, + "uses": [ + 12856, + 12858, + 12860, + 12862, + 12864, + 12866 + ] + }, + "anchor": 1091, + "changed_nodes": [ + 742, + 753, + 754, + 755, + 761, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 1637, + 2008 + ], + "removed_queries": 2, + "result_sha256": "a06445539ad73fe16deae66fef8c52ffc39f5f14c765eab3dc3d98e0e2d8074c", + "source_sha256": "99d30f1ad0861259378630443a0c430f147f6156a5443d1d1cb72a420a7e05c3" + }, + "second_block": { + "basis": [ + 11, + 21, + 38, + 448 + ], + "changed_scalar_source_indices": [ + 9932, + 9933, + 9934, + 9935, + 9936, + 9938, + 9940, + 9941, + 9943, + 9945, + 9947, + 9948, + 9949, + 9950, + 9952, + 9953, + 9954, + 9955, + 9956, + 9957, + 9958, + 9959, + 9960, + 9961, + 9962, + 9963, + 9964, + 9965, + 9966, + 9967, + 9968, + 9969, + 9970, + 9971, + 9972, + 9973, + 9974, + 9975, + 9976, + 9977, + 9978, + 9979, + 9980, + 9981, + 9982, + 9983, + 9984, + 9985, + 9986, + 9987, + 9988, + 9989, + 9990, + 9991, + 9992, + 9993, + 9994, + 9995, + 9996, + 9997, + 9998, + 9999, + 10000, + 10001, + 10002, + 10003, + 10004, + 10005, + 10006, + 10007, + 10008, + 10009, + 10010, + 10011, + 10012, + 10013, + 10014, + 10015, + 10016, + 10017, + 10018, + 10019, + 10020, + 10021, + 10022, + 10023, + 10024, + 10025, + 10026, + 10027, + 12842, + 12843, + 12844, + 12845, + 12846, + 12847, + 12848, + 12849, + 12850, + 12851, + 12852, + 12853 + ], + "native_changes": [ + { + "old": [ + "MOVE", + 57, + 266, + 267, + false + ], + "replacement": [ + "MOVE", + 57, + 266, + 1092, + false + ], + "source_index": 9930 + }, + { + "old": [ + "MOVE", + 92, + 265, + 267, + false + ], + "replacement": [ + "MOVE", + 92, + 265, + 1092, + false + ], + "source_index": 9931 + }, + { + "old": [ + "MOVE", + 224, + 260, + 267, + false + ], + "replacement": [ + "MOVE", + 224, + 260, + 1092, + false + ], + "source_index": 9937 + }, + { + "old": [ + "MOVE", + 225, + 262, + 267, + false + ], + "replacement": [ + "MOVE", + 225, + 262, + 1092, + false + ], + "source_index": 9939 + }, + { + "old": [ + "MOVE", + 81, + 264, + 267, + false + ], + "replacement": [ + "MOVE", + 81, + 264, + 1092, + false + ], + "source_index": 9942 + }, + { + "old": [ + "MOVE", + 227, + 261, + 267, + false + ], + "replacement": [ + "MOVE", + 227, + 261, + 1092, + false + ], + "source_index": 9944 + }, + { + "old": [ + "MOVE", + 229, + 259, + 267, + false + ], + "replacement": [ + "MOVE", + 229, + 259, + 1092, + false + ], + "source_index": 9946 + }, + { + "old": [ + "MOVE", + 234, + 263, + 267, + false + ], + "replacement": [ + "MOVE", + 234, + 263, + 1092, + false + ], + "source_index": 9951 + }, + { + "inserted": [ + "MOVE", + 92, + 1092, + 267, + false + ], + "source_index": 12855 + }, + { + "old": [ + "MOVE", + 57, + 267, + 127, + false + ], + "replacement": [ + "MOVE", + 57, + 1092, + 127, + false + ], + "source_index": 12866 + }, + { + "old": [ + "MOVE", + 81, + 267, + 127, + false + ], + "replacement": [ + "MOVE", + 81, + 1092, + 127, + false + ], + "source_index": 12887 + }, + { + "old": [ + "MOVE", + 224, + 267, + 127, + false + ], + "replacement": [ + "MOVE", + 224, + 1092, + 127, + false + ], + "source_index": 12899 + }, + { + "old": [ + "MOVE", + 227, + 267, + 127, + false + ], + "replacement": [ + "MOVE", + 227, + 1092, + 127, + false + ], + "source_index": 18119 + }, + { + "old": [ + "MOVE", + 229, + 267, + 127, + false + ], + "replacement": [ + "MOVE", + 229, + 1092, + 127, + false + ], + "source_index": 18120 + }, + { + "old": [ + "MOVE", + 742, + 267, + 127, + false + ], + "replacement": [ + "MOVE", + 742, + 1092, + 127, + false + ], + "source_index": 18441 + }, + { + "old": [ + "MOVE", + 234, + 267, + 127, + false + ], + "replacement": [ + "MOVE", + 234, + 1092, + 127, + false + ], + "source_index": 18442 + } + ], + "new_frame": 1092, + "roles": [ + 57, + 81, + 92, + 224, + 225, + 227, + 229, + 234, + 742 + ], + "scalar_transfer_sha256": "8dcb0c589c2e8f1fb8862a55f911f206b597ffe3d8002732ee4dca58bed15286", + "source_head": "4b30391e633ba0c7c674f03586ae97d443e9bc9c" + } +} diff --git a/research/p104-accumulated-block-composition/INTEGRITY-CONTROLS.json b/research/p104-accumulated-block-composition/INTEGRITY-CONTROLS.json new file mode 100644 index 0000000000..c47130a219 --- /dev/null +++ b/research/p104-accumulated-block-composition/INTEGRITY-CONTROLS.json @@ -0,0 +1,22 @@ +{ + "authenticator_sha256": "5a9383a0bc0dd3a056786e24a6e7be7931bce00b0542918b1f1ad097431dbf25", + "controls": { + "changed_source_bytes": "Exact source SHA256: vendor/accumulated/construct.py", + "duplicate_retained_repository_pin": "One retained repository pin for each runtime origin", + "duplicate_runtime_pin": "Unique vendored source", + "extra_source_payload": "Complete vendored payload inventory", + "missing_repository_origin": "One retained repository pin for each runtime origin", + "missing_source": "Regular vendored source", + "source_path_escape": "Relative vendored source path", + "source_symlink": "No source symlink", + "wrong_git_blob_with_correct_sha256": "Exact source Git blob: vendor/accumulated/construct.py", + "wrong_original_source_mapping": "Exact retained source bytes and original provenance", + "wrong_retained_ancestor": "Exact retained source ancestor" + }, + "positive_authentication": { + "files": 33, + "source_manifest_sha256": "ac35efbe8a77537fd182d976a92e81955d3ae30988a8049624387c6d36a80903" + }, + "scope": "Source-byte/inventory checks only; no local/native/caller/pricing replay.", + "status": "PASS_SOURCE_AUTHENTICATION_CONTROLS" +} diff --git a/research/p104-accumulated-block-composition/LOCAL-EDITS.json b/research/p104-accumulated-block-composition/LOCAL-EDITS.json new file mode 100644 index 0000000000..79933b5eb8 --- /dev/null +++ b/research/p104-accumulated-block-composition/LOCAL-EDITS.json @@ -0,0 +1,6 @@ +[ + [ + "8 <= owned <= 28", + "8 <= owned <= 29" + ] +] diff --git a/research/p104-accumulated-block-composition/NOTICE b/research/p104-accumulated-block-composition/NOTICE new file mode 100644 index 0000000000..bd91106cde --- /dev/null +++ b/research/p104-accumulated-block-composition/NOTICE @@ -0,0 +1,6 @@ +Composition of accumulated native updates and two released P104 blocks. +New integration, compatibility checks and complete price: Mason Hale with substantial OpenAI Codex assistance, including separate agent checks. Apache-2.0. No independent human acceptance is claimed. + +The accumulation and retained-source lineage is credited verbatim in vendor/accumulated/NOTICE. The block constructions and composition lineage are credited verbatim in vendor/blocks/NOTICE. These notices and every retained source byte are unchanged. Ali Romman supplied PR5802 and PR5795; Joel Pulikkan/GamingPuzzled supplied the R22 mechanism; Ali Romman supplied the second block PR5796 and the provisional role92 plan. All native/helper/controller/compiler/BIT/analytic credit remains in the retained notices. + +Dugongue (@Dugongue), PR5806 at 20e7289b63d240715aa96006571ae38a46291d97, supplied a concurrent informal proof of the same three-accumulation/two-block baseline join. The fourth role92 realization is additional to that shared composition. diff --git a/research/p104-accumulated-block-composition/PRICING-EDITS.json b/research/p104-accumulated-block-composition/PRICING-EDITS.json new file mode 100644 index 0000000000..aa5d4c294e --- /dev/null +++ b/research/p104-accumulated-block-composition/PRICING-EDITS.json @@ -0,0 +1,22 @@ +[ + [ + "Q('.00312336057'), Q('.003123360575')", + "Q('.00312418633064'), Q('.00312418633564')" + ], + [ + "PREVIOUS = Q('.00312265044')", + "PREVIOUS = Q('.00312336057')" + ], + [ + "sum(paid.values()) == 66870", + "sum(paid.values()) == 66888" + ], + [ + "'kappa_decimal':'0.00312336057','previous_pr5786':PREVIOUS", + "'kappa_decimal':'0.00312418633064','previous_pr5802':PREVIOUS" + ], + [ + "lo,hi,grid = 0,10**12,10**14", + "lo,hi,grid = 0,10**15,10**17" + ] +] diff --git a/research/p104-accumulated-block-composition/PROOF.md b/research/p104-accumulated-block-composition/PROOF.md new file mode 100644 index 0000000000..71a8c020a5 --- /dev/null +++ b/research/p104-accumulated-block-composition/PROOF.md @@ -0,0 +1,219 @@ +# Compatibility and complete price of the accumulated-block composition + +This proof concerns a fixed composition of PR5802 and PR5795, including +PR5796 through PR5795, followed by the separately released role92 accumulation. +It introduces no elementary accumulation or block-reframing identity. The full final-word replay checks exact scalar/transpose compatibility, role92 mutation controls, all 2919 distinct native maps with absolute phase, 1124 helper normalizers, 208 main adapters, the complete physical caller and the interval-price/compiler/outer calculation. Every +multiplication-exponent conclusion retains the five assumptions in Section 6. + +## 1. Exact sources and the two-block intermediate + +Let W be PR5802's word at +`9bab1ca917ec4d1a4e60f4eb8c81d7ef92908a62`. Its three accumulation steps are +already present. Block plans and the constructor are PR5795 at +`206cb717c0c07737d61637b93f7502ca48850348`, containing R22 edits from PR5739 +at `b93d749a0a895d260e87887170af5162bda461a4` and the second-block plan from +PR5796 at `4b30391e633ba0c7c674f03586ae97d443e9bc9c`. + +The block constructor is applied to W with its exact owned-label assertion +adapted from 25 to 28. This acknowledges W's existing buffers; the block stage +adds none. All eight R22 old runs match uniquely and their intervals are +disjoint. Endpoint joins are checked against their old charts. Existing chart +1090 is reused only after verifying its exact basis `[265,194,164,75]`. + +The second block matches the released 90-operation and 12-operation scalar +runs on roles 57,81,92,224,225,227,229,234,742. Their 102 operations move from +chart 267 to new chart 1092, basis `[11,21,38,448]`; helper 742 starts and helper +225 ends there. Existing chart 1091 has basis `[11,21,51,469]` and is retained. +The constructor records 16 required native-edge changes, preserving earlier +edges in query chains and every unrelated query's order. + +Call this intermediate V. It has 25,982 events and canonical JSON SHA256 +`99d30f1ad0861259378630443a0c430f147f6156a5443d1d1cb72a420a7e05c3`. +The role92 step below is applied to V, not directly to the earlier source. + +## 2. Block compatibility and retained COPY values + +Decoded field values distinguish the logical state from its native encoding. +In a common frame, ADD and SCALE induce the stated rational linear maps. +A legal MOVE from encodings J_A to J_B must implement exactly J_B J_A^-1, +including absolute phase. Scalar matrix equality alone does not prove this +native obligation. + +For each R22 replacement, the old and new rational transfer matrices agree +on the union of scalar operands. The largest is 9-by-9; the other nonempty +scalar matrix is 2-by-2; the remaining edits contain only native moves. No +replaced run contains COPY, INIT or CLEAR. Therefore, under the native-map +obligation, each replacement preserves the complete decoded state at its exit +for arbitrary entry values. Induction over the disjoint runs preserves the +state at every outside observation and lifetime boundary. + +The second block preserves all scalar operands, coefficients and order. It +changes common frames, their required native connections and the two stated +helper boundaries. Its decoded scalar transfer is identical once those native +maps are established. The entire ordered INIT/COPY/CLEAR subsequence equals +that in W. All 23 source COPY operations retain their exact decoded payloads, +including the thirteen retained native copies. No arbitrary public helper +input is treated as a free zero. Exact forward replay on V covers all 798 coordinates and 636,804 coefficients. +The separate reverse-chronological transpose check is run on the final word below. + +## 3. Realizing the released role92 plan after composition + +The [released plan](https://github.com/CrocSwap/integer-mult-bounds/discussions/5645#discussioncomment-19205168) +was discovery evidence on exact PR5786, canonical word SHA256 +`45e3f8efd004f2a6d2c02a2ac2ebe3dd9ce04c887641ec9ab31e47f8c7f41e1b`. +Its event and chart-node indices cannot be copied blindly to V. The remapping +matches the actual scalar observations by operands and coefficients. Old node +824 splits into nodes 824 and 1637, and old node 2002 becomes 2008; all other +selected nodes keep their indices. Both pieces of node 824 are included. The +resulting changed-node set is + +```text +742,753,754,755,761,823,824,825,826,827,828,829,830,1637,2008. +``` + +The six source observations move from indices +`12850,12852,12854,12856,12858,12860` to +`12856,12858,12860,12862,12864,12866` in V. They add, with coefficient +1, +the current values of roles `63,61,103,18,45,108` to destination 92. These are +values at their actual observation times, not assumed unchanged initial inputs. + +The declared nodes are assigned anchor chart 1091. Let A be chart 267, +with basis `[1,4,10,16,34,64,128,256]`, and B be chart 1091. Exact subspace +checks give B⊂A, with dimensions 4 and 8 respectively. The literal constructor +verifies all common scalar frames and nested directions after this chart +change. It also checks that between the first and last selected additions: +no ADD/COPY reads destination 92, and every operation writing that destination +is one of the six declared additions. A MOVE, SCALE, INIT, CLEAR or undeclared +write of that destination would fail the same contract. + +Introduce owned role 798, initialized to zero in A. Replace the six additions +by additions to that buffer at the same observation times. After the last, +pay its rank-four native MOVE A→B, add it to role 92 in B, and CLEAR it in B. +The buffer contains the exact sum of the six observed values. Until delivery, +role 92 differs by the pending sum, but that difference is unobservable because +of the checked read barrier. Every other decoded value agrees by induction. +Delivery restores role 92 before any later read. The new buffer's erasure is +explicitly charged under the retained owned-erasure assumption. + +The final overlay includes frame changes inside the intermediate block region; +its validity is not inferred from the intermediate's old physical maps. +Every new map and phase must be replayed. All 83 old lifecycle opcodes, roles and coefficients remain; their charts may refit, +and a separately computed trace confirms all 23 COPY payloads. The final word +has 25,984 events, 770 arbitrary public inputs, 29 owned labels, 31 lifetimes +and peak 13 live owned fields. It fits the unchanged 26,000-event and 1,000-slot +caps. The one explicit local checker capacity adaptation is `owned <= 28` to +`owned <= 29`; scalar allowance is recomputed as 225038. All other checks are +retained. Forward and separate dense transpose checks cover 799 coordinates +and 638,401 coefficients. Nine controls reject missing sum components/query, +delivery or CLEAR, an unallocated buffer, wrong sign, stale helper boundary, +an undeclared pending write and an early destination read. + +The final canonical word SHA256 is +`a06445539ad73fe16deae66fef8c52ffc39f5f14c765eab3dc3d98e0e2d8074c`. +The literal plan is ROLE92-PLAN.json. HUNKS.json binds both intermediate and final canonical hashes. These hashes include the package schema strings; the earlier scratch receipts used predecessor schema names. + +## 4. Local signs and complete caller invoice + +Write H_r(t)=r^t. The final local profiles are + +| Kind | Exact profile | +|---|---| +| Paid | 2226H1 +456H2 +498H3 +99H4 +162H5 +9H6 +6H7 | +| Helpers | 18H1 +7H2 +4H3 +107H4 +14H5 +9H7 +18H8 +385H9 | + +For the block stage alone, direct recount relative to W gives + +\[ +\Delta P_B=2H_1+2H_4-2H_5,\qquad +\Delta T_B=-2H_1+2H_4+2H_5-2H_8. +\] + +Thus its signed gain is `g(t)=-4+4·5^t−2·8^t`. It is not positive on all +`00 for `0.9966≤t<1`, including the working exponent. + +For the role92 overlay, the independently recounted changes relative to V are + +\[ +\Delta P_R=-5H_1-H_4+5H_5,\qquad +\Delta T_R=-4H_1+4H_5. +\] + +Its gain is `H1+H4−H5`, strictly positive for `0 2^26*N^5 avoiding all fixed denominators and rank witnesses" + }, + "outer": { + "functional_checks": { + "actual_new_BIT_stock_sublinear": "348599999999253/350000000000000", + "fixed_halo_explicit_metadata_branch": "26950000000001/350000000000", + "new_BIT_row_stock_sublinear_in_active_group": "1395799999997009/1400000000000000", + "new_semantic_group_guard": "3/1400000000000" + }, + "margins": { + "boundary_algebraic_matrix": "765425651706253267391763/245000000000000000000000000", + "fused_gaussian": "765425651705159802175289/245000000000000000000000000", + "global_coordinate_router": "273366304181/87500000000000", + "group_bit_router": "382712825940079901087457/122500000000000000000000000", + "group_scans": "699999999999/700000000000", + "main_transform": "765425651531253267391763/245000000000000000000000000", + "microbox_face_corrections": "26950000000001/350000000000", + "polynomial_products": "1399999999999/1400000000000", + "sparse_union_movement": "100296675651706253267391763/245000000000000000000000000" + }, + "parameters": { + "a": "273366304181/87500000000000", + "b": "546732608487/175000000000000", + "beta": "1399999999997/1400000000000", + "bit_saving": "17/5000", + "cap_xi": "222796675651531253267391763/245000000000000000000000000", + "complex_uniform_saving": "136683152153/43750000000000", + "d": "1/1400000000000", + "epsilon": "1399999999999/1400000000000", + "kappa": "39052329133/12500000000000", + "lambda_": "49843790683343/50000000000000", + "lambda_prime": "174453267391763/175000000000000", + "layout": "1/1400000000000", + "q": "546732608237/175000000000000", + "r0": "1/14000000000000", + "stop": "1/1400000000000", + "tested_saving": "78104658391/25000000000000" + }, + "strict_checks": { + "actual_bit_above_effective": "24133695819/87500000000000", + "actual_logarithmic_gamma_guard": "1/1400000000000", + "actual_logarithmic_group_guard": "22203324348731246732608237/122500000000000000000000000", + "alpha_logarithm_absorption": "1/14000000000000", + "boundary_algebraic_matrix_above_kappa": "699453267391763/245000000000000000000000000", + "cap_above_band": "100296675651531253267391763/245000000000000000000000000", + "cap_below_cell": "22203324348293746732608237/245000000000000000000000000", + "cap_below_phase_cell_power": "267203324348468746732608237/245000000000000000000000000", + "complex_above_effective": "1/1400000000000", + "complex_below_one_over_32": "4922017391513/175000000000000", + "complex_endpoint": "1/700000000000", + "epsilon_below_one": "1/1400000000000", + "epsilon_positive": "1399999999999/1400000000000", + "fine_prime_halo_umbrella": "7/2", + "fused_gaussian_above_kappa": "698359802175289/245000000000000000000000000", + "gaussian_above_main": "86953267391763/122500000000000000000000000", + "global_coordinate_router_above_kappa": "1/350000000000", + "global_gamma_power_slack": "9/14000000000000", + "group_below_dimension": "1/700000000000", + "group_bit_router_above_kappa": "436679901087457/122500000000000000000000000", + "group_gauge_power_slack": "22203324348722496732608237/122500000000000000000000000", + "group_key_fits_record": "1/700000000000", + "group_positive": "1399999999997/1400000000000", + "group_scans_above_kappa": "10903329211993/10937500000000", + "halo_covers_generic_inverse_radius": "5", + "improvement_over_user_baseline": "696607955720418148631/500000000000000000000000", + "lambda_above_internal": "1/2800000000000", + "lambda_above_sigma": "3/2800000000000", + "lambda_above_tau": "1/2800000000000", + "lambda_prime_above_lambda": "1/2800000000000", + "lambda_prime_above_leaf": "349453267391513/245000000000000000000000000", + "leaf_saving_above_effective": "174453267391513/245000000000000000000000000", + "main_transform_above_kappa": "524453267391763/245000000000000000000000000", + "membership_arithmetic_fits_record": "1/1400000000000", + "microbox_face_corrections_above_kappa": "6737226633696319/87500000000000", + "microbox_halo_volume": "110600000000003/1400000000000", + "new_complex_uniform_saving_above_b": "1/1400000000000", + "new_semantic_guard_with_C1_one": "1/1400000000000", + "polynomial_products_above_kappa": "174453267392013/175000000000000", + "positive_layout_slack": "1/1400000000000", + "q_below_effective": "1/1400000000000", + "q_below_internal": "1/1400000000000", + "q_below_leaf": "349453267391513/245000000000000000000000000", + "q_positive": "546732608237/175000000000000", + "short_record_fallback": "174453267391513/175000000000000", + "source_axis_superpolynomial": "1/1400000000000", + "sparse_union_movement_above_kappa": "99531250000699453267391763/245000000000000000000000000", + "stop_below_one": "1399999999999/1400000000000", + "stop_positive": "1/1400000000000", + "strassen_integer_power_gap": "1951441519231", + "support_router_span": "3/1400000000000", + "theta_positive_polynomial_power": "2", + "union_header_fits_record": "3/1400000000000", + "union_tag_work_per_visit_fits_record": "3/1400000000000" + } + }, + "paid": { + "1": 41628, + "16": 416, + "2": 8208, + "24": 416, + "3": 8964, + "32": 416, + "4": 1782, + "40": 416, + "48": 416, + "5": 2916, + "56": 416, + "6": 162, + "64": 416, + "7": 108, + "72": 208 + }, + "paid_calls": 66888, + "previous_pr5802": "312336057/100000000000", + "productive_fields": 13444, + "query_shears": 15, + "rank_mass_surplus": 760, + "raw_ceiling": { + "derivative_upper": "-368004547164861935742362936408609606941810029632377908485755891/1569275433846670190958947355801916604025588861116008628224", + "interval": [ + "0", + "17/5000" + ] + }, + "raw_headroom": [ + "299687/50000000000000000", + "959/160000000000000" + ], + "raw_root_interval": [ + "156209316831687/50000000000000000", + "2499349069307/800000000000000" + ], + "relative_gain_percent": "41288032/1561680285", + "strictification": { + "alpha": { + "lower": "0.999999999998991159042549078461", + "upper": "0.999999999998991159042549078462" + }, + "cutoff": 16, + "delta": { + "lower": "0.951912788985453393366376508390", + "upper": "0.951912788985453393366376508391" + }, + "floor": 17, + "gamma": { + "lower": "0.975585774172635067187356074439", + "upper": "0.975585774172635067187356074440" + }, + "normalized_paid_upper": "1048576000976562501/1048576001073741824", + "power": 1024, + "reserve": "1/1000000000000", + "tail_block": 128, + "tail_decay": "125/128", + "tail_offset": "1/7", + "tested": "78104658391/25000000000000" + }, + "targets": { + "1": 324, + "145": 208, + "17": 416, + "2": 126, + "25": 416, + "3": 72, + "33": 416, + "4": 1926, + "41": 416, + "49": 416, + "5": 252, + "57": 416, + "65": 416, + "7": 162, + "73": 208, + "8": 324, + "9": 6930 + }, + "whole_idle_jobs": 3120 + }, + "delta": { + "helpers": { + "1": -6, + "4": 2, + "5": 6, + "8": -2 + }, + "paid": { + "1": -3, + "4": 1, + "5": 3 + } + }, + "fixed_contract_grid_optimum": { + "accepted_margin": [ + "25799237784018095798006296795183910842206069778194909403381/12259964326927110866866776217202473468949912977468817408000000000000", + "3302302436354316262144805989783540587802431539234948370961353/1569275433846670190958947355801916604025588861116008628224000000000000" + ], + "cap": "17/5000", + "derivative_upper": "-736009094327164435617549354859802318584324493733667377004241150850439699091/3138550867693340381917894711603833208051177722232017256448000000000000", + "grid": "1/100000000000000", + "largest_published_grid": "39052329133/12500000000000", + "largest_tested_grid": "78104658391/25000000000000", + "next_tested_grid": "62483726713/20000000000000", + "rejected_margin": [ + "-195871060919199761433772328589248798766437569834401224579047/627710173538668076383578942320766641610235544446403451289600000000000", + "-244838826148999701792215410736560998458019814094501546915829/784637716923335095479473677900958302012794430558004314112000000000000" + ], + "reserve": "1/1000000000000", + "scope": "Maximum on the 1e-14 grid for this exact profile, fixed reserve and tested gap. Different compiler parameters, words and BIT caps remain outside this claim.", + "tested_gap": "1/200000000000" + }, + "instructions": 25984, + "intermediate_local": { + "endpoint_coefficients": 636804, + "helpers": { + "1": 22, + "2": 7, + "3": 4, + "4": 107, + "5": 10, + "7": 9, + "8": 18, + "9": 385 + }, + "owned_fields": 28, + "owned_lifetimes": 30, + "paid": { + "1": 2231, + "2": 456, + "3": 498, + "4": 100, + "5": 157, + "6": 9, + "7": 6 + }, + "paid_rank_mass": 5918, + "peak_owned_fields": 13, + "public_inputs": 770, + "real_scalar_allowance": 225026 + }, + "limits": [ + "Five inherited framework assumptions remain.", + "The large uniform word and rounded multiplier are not materialized.", + "Author-side and agent checks are not independent human or kernel acceptance.", + "The selected frontier is unchanged." + ], + "local": { + "endpoint_coefficients": 638401, + "helpers": { + "1": 18, + "2": 7, + "3": 4, + "4": 107, + "5": 14, + "7": 9, + "8": 18, + "9": 385 + }, + "owned_fields": 29, + "owned_lifetimes": 31, + "paid": { + "1": 2226, + "2": 456, + "3": 498, + "4": 99, + "5": 162, + "6": 9, + "7": 6 + }, + "paid_rank_mass": 5934, + "peak_owned_fields": 13, + "public_inputs": 770, + "real_scalar_allowance": 225038 + }, + "native": { + "distinct_maps": 2919, + "helper_normalizers": 1124, + "helpers": { + "1": 18, + "2": 7, + "3": 4, + "4": 107, + "5": 14, + "7": 9, + "8": 18, + "9": 385 + }, + "main_adapters": 208, + "proof": "Every signed Pauli image and exact global phase; frame induction at every positive tensor width", + "recipe_payload_sha256": "02ed1876119efe8e114384d9e5abf23b9f2ba9579034bbc5cd1b7f8edb6d6809", + "wrong_phase_rejected": true + }, + "negative_controls": { + "accumulation_clear_before_delivery": "Common scalar chart", + "accumulation_omit_buffer_clear": "All public and owned exits", + "accumulation_omit_owned_storage": "Role index", + "accumulation_omit_paid_sum_query": "Common scalar chart", + "accumulation_omit_sum_component": "All public and owned rows", + "accumulation_omit_sum_delivery": "All public and owned rows", + "accumulation_read_before_delivery": "Destination is not read before the sum is delivered", + "accumulation_retain_old_target_credit": "All public and owned exits", + "accumulation_wrong_delivery_sign": "All public and owned rows", + "block_omit_R22_input_endpoint": "Scalar destination and coefficient", + "block_omit_copy_clear": "All public and owned exits", + "block_omit_paid_R22_query": "Common scalar chart", + "block_omit_paid_copy_query": "Common scalar chart", + "block_omit_second_block_input": "Scalar destination and coefficient", + "block_omit_second_block_output": "All public and owned exits", + "block_omit_second_block_query": "Scalar destination and coefficient", + "block_retain_old_R22_target": "All public and owned exits", + "block_wrong_copy_value": "All public and owned rows", + "caller_missing_central_translation": "Rejected by the complete Laurent endpoint", + "invent_productive_credit": "Every productive helper has a native target", + "omit_paid_query_from_invoice": "Complete field and call counts", + "role92_early_destination_read": "Destination is not read before the sum is delivered", + "role92_old_helper_boundary": "Scalar destination and coefficient", + "role92_omit_clear": "All public and owned exits", + "role92_omit_component": "All public and owned rows", + "role92_omit_delivery": "All public and owned rows", + "role92_omit_query": "Common scalar chart", + "role92_unallocated_storage": "Role index", + "role92_undeclared_update": "Only the declared pending additions", + "role92_wrong_delivery_sign": "All public and owned rows" + }, + "physical_caller": { + "central_square_columns": 53248, + "full_calls": 18, + "main_targets": { + "145": 208, + "17": 416, + "25": 416, + "33": 416, + "41": 416, + "49": 416, + "57": 416, + "65": 416, + "73": 208 + }, + "new_paid_jobs": 0, + "physical_contacts": 7488, + "ports": 104, + "route_payload_sha256": "7f4f0ca768ffbc4f93dcff575592c4c67411f46b4289e45b73f715a2ad47b142", + "tensor_rule": "Factorwise native maps; scalar signs stay outside the tensor power.", + "whole_idle_jobs": { + "16": 416, + "24": 416, + "32": 416, + "40": 416, + "48": 416, + "56": 416, + "64": 416, + "72": 208 + }, + "wrapper_sites": [ + 1, + 3, + 5, + 7, + 9, + 11, + 13, + 15, + 17, + 19, + 21, + 23, + 25, + 27, + 29, + 31 + ] + }, + "role92_compatibility": { + "copied_values_sha256": "f70e3fc94282e11e6b2a6629b25cd29394ef1d77d512a8f3b777df927856b228", + "delta_helpers": { + "1": -4, + "5": 4 + }, + "delta_paid": { + "1": -5, + "4": -1, + "5": 5 + }, + "gain_proof": "Strict subadditivity: 1^t+4^t>5^t for every 0=1-x; monotonicity; exact Fraction arithmetic.", + "scope": "This charged gain is certified only for .9966<=t<1, not all 0= 2M+1. + # Hence the positive remaining tail is bounded by a geometric series. + need(n > 1 and terms > 0, 'Positive logarithm input and finite series') + z = Q(n-1,n+1) + low = 2*sum((z**(2*j+1)/Q(2*j+1) for j in range(terms)),Q(0)) + tail = 2*z**(2*terms+1)/(Q(2*terms+1)*(1-z*z)) + return low, low+tail + + +def difference(after,before): + c=Counter(after);c.subtract(before) + return {r:n for r,n in c.items() if n} + + +def check(paid=COMPOSED_P,targets=COMPOSED_T): + dp=difference(paid,PARENT_P);dt=difference(targets,PARENT_T) + need(dp=={1:-3,4:1,5:3}, 'Exact paid block change') + need(dt=={1:-6,4:2,5:6,8:-2}, 'Exact productive block change') + signed=Counter(dt);signed.subtract(dp) + signed={r:n for r,n in signed.items() if n} + need(signed=={1:-3,4:1,5:3,8:-2}, 'Complete signed gain after all costs') + need(sum(r*n for r,n in signed.items())==0, 'Gain equals zero at exponent one') + epsilon=Q(17,5000) + l4,h4=log_interval(4);l5,h5=log_interval(5);l8,h8=log_interval(8) + # For .9966<=t<=1, 4^t<=4,5^t<=5 and 8^t>=8*exp(-epsilon*log8). + # exp(-x)>=1-x; replacing log8 by its upper bound lowers that factor. + factor=1-epsilon*h8 + need(factor>0 and l8>0, 'Both lower product factors positive') + derivative_upper=4*h4+15*h5-16*factor*l8 + need(derivative_upper<0, 'Strictly negative derivative over whole interval') + # Integrating g'(s)<=derivative_upper from t to1 gives + # g(t)>=(-derivative_upper)*(1-t)>0 for every t<1 in the interval. + claim=Q('.00312418633064') + full_gain_lower=18*(-derivative_upper)*claim + need(full_gain_lower>0,'Strict complete gain at published exponent') + return {'status':'PASS_EXACT_BLOCK_GAIN_INTERVAL', + 'local_delta_paid':dp,'local_delta_targets':dt,'local_signed_gain':signed, + 'full_forward_calls':18,'unchanged_other_caller_costs_required':True, + 'exponent_interval':[1-epsilon,Q(1)],'strict_at_right_endpoint':False, + 'gain_at_right_endpoint':Q(0),'log4_interval':[l4,h4],'log5_interval':[l5,h5], + 'log8_interval':[l8,h8],'lower_exp_factor':factor, + 'derivative_upper':derivative_upper, + 'uniform_gain_lower_formula':'(-derivative_upper)*(1-t)', + 'complete_gain_lower_at_claim':full_gain_lower,'claim':claim, + 'method':'Positive atanh series with explicit geometric tail; exp(-x)>=1-x; monotonicity; exact Fraction arithmetic.', + 'scope':'This charged gain is certified only for .9966<=t<1, not all 00 and n>0 for r,n in out.items()), 'Positive integral histogram') + return out + + +def source_binding(package): + from hashlib import sha1,sha256 + from pathlib import PurePosixPath + raw=(package/'SOURCES.json').read_bytes() + sources=json.loads(raw) + retained_commit='b83ff89de649be3bd2dc2d885da254bae00c8836' + need(sources['retained_commit']==retained_commit,'Exact retained source ancestor') + rows=sources['vendored'] + names=set() + for row in rows: + name=row['local_path'];parts=PurePosixPath(name).parts + need(len(parts)>=3 and parts[0]=='vendor' and parts[1] in HEADS + and '..' not in parts and '\\' not in name and ':' not in name, + 'Safe exact source name') + need(name not in names,'Unique runtime origin') + matching=[r for r in sources['files'] if r.get('local_path')==name] + need(len(matching)==1,'One retained source pin') + retained=matching[0] + need(retained['origin']==row and retained['path']=='research/p104-accumulated-block-composition/'+name + and retained['pin']=='head:'+retained_commit+':'+retained['path'] + and retained['sha256']==row['sha256'] and retained['git_blob']==row['git_blob'],'Exact retained source and origin mapping') + names.add(name) + need(row['pin']=='head:'+HEADS[parts[1]]+':'+row['path'],'Exact predecessor head') + path=package + for part in parts: + path=path/part + need(not path.is_symlink(),'No source symlink') + data=path.read_bytes() + need(sha256(data).hexdigest()==row['sha256'],'Source SHA256') + need(sha1(b'blob '+str(len(data)).encode()+b'\0'+data).hexdigest()==row['git_blob'],'Source Git blob') + actual={p.relative_to(package).as_posix() for p in (package/'vendor').rglob('*') if p.is_file() or p.is_symlink()} + need(actual==names,'Complete source inventory') + return {'files':len(names),'source_manifest_sha256':sha256(raw).hexdigest()} + + +def check_receipt(result,word,old): + from hashlib import sha256 + need(result['status']=='PASS_P104_ACCUMULATED_BLOCK_COMPOSITION','Successful complete receipt') + need(result['source_commits']==HEADS,'Actual exact predecessor heads') + digest=sha256(json.dumps(word,sort_keys=True,separators=(',',':')).encode()).hexdigest() + need(result['canonical_word_sha256']==digest,'Actual emitted word bound to result') + need(result['source_local']==old['local'],'Actual source local receipt') + need(profile(old['local']['paid'])==PARENT_P and profile(old['local']['helpers'])==PARENT_T,'Authenticated source histograms') + need(word['public']==770 and word['owned_fields']==29 and len(word['program'])==25984,'Actual final event and label counts') + need(result['instructions']==len(word['program']),'Receipt instruction count') + widths=[len(x) for x in word['frames']] + paid=Counter();live=set();lifetimes=peak=scalar=0;maps=set() + for event in word['program']: + op,r=event[:2] + need(type(r) is int and 0<=r<799,'Actual event role range') + if op=='MOVE': + _,r,a,b,owned=event + need((r in live)==owned,'Actual owned move status') + rank=abs(widths[a]-widths[b]);need(rank>0,'Positive paid rank') + paid[rank]+=1;maps.add((a,b)) + elif op=='INIT': + need(r>=770 and r not in live,'Owned lifetime starts once') + live.add(r);lifetimes+=1;peak=max(peak,len(live));scalar+=2 + elif op=='CLEAR': + need(r in live,'Owned lifetime ends once') + live.remove(r);scalar+=2 + else: + need(op in ('SCALE','ADD','COPY'),'Known scalar operation') + q=Q(event[-2]);n,d=abs(q.numerator),q.denominator + need(q and d&(d-1)==0 and abs(q)+1<2**16,'Actual scalar growth and dyadic bounds') + if op=='SCALE': + scalar+=2*(abs(n.bit_length()-d.bit_length())+int(q<0)) + else: + scalar+=2*(2+n.bit_length()+n.bit_count()+d.bit_length()-1) + need(not live and lifetimes==31 and peak==13,'Actual31 owned lifetimes and peak13') + main=set(word['live'])|{r+112 for r in word['live']} + need(len(main)==208,'Actual208 main roles') + helpers=Counter() + for r in range(770): + if r not in main: + a,b=word['initial'][r],word['final'][r] + helpers[widths[b]-widths[a]]+=1;maps.add((a,b)) + need(dict(paid)==COMPOSED_P and dict(helpers)==COMPOSED_T,'Fresh paid and productive invoice from word') + local=result['local'];native=result['native'];price=result['complete_cost'] + need(profile(local['paid'])==dict(paid) and profile(local['helpers'])==dict(helpers),'Actual local invoice receipt') + mass=sum(r*n for r,n in paid.items()) + need(mass==5934==local['paid_rank_mass'],'New5934 paid rank mass') + need(scalar==225038==local['real_scalar_allowance'],'All extra real scalars charged') + need((local['public_inputs'],local['owned_fields'],local['owned_lifetimes'],local['peak_owned_fields'],local['endpoint_coefficients'])==(770,29,31,13,799**2),'Actual final local envelope') + need(result['separate_columns']['columns']==799 and result['separate_columns']['coefficients']==799**2,'Complete reverse receipt dimensions') + need(native['distinct_maps']==len(maps) and native['helper_normalizers']==2*sum(helpers.values()) and native['main_adapters']==208,'Actual native map and normalizer census') + need(profile(native['helpers'])==dict(helpers) and native['wrong_phase_rejected'] is True,'Native receipt matches productive invoice') + P=Counter({r:18*n for r,n in paid.items()});T=Counter({r:18*n for r,n in helpers.items()}) + P[1]+=15*104;T[145]+=208 + main_targets=Counter({145:208});idles=Counter() + for length in (7,8): + for j in range(1,length+1): + P[8*(j+1)]+=208;idles[8*(j+1)]+=208 + T[1+8*(j+1)]+=208;main_targets[1+8*(j+1)]+=208 + need(profile(price['paid'])==dict(P) and profile(price['targets'])==dict(T),'Independently rebuilt complete caller bill') + physical=result['physical_caller'] + need(profile(physical['main_targets'])==dict(main_targets) and profile(physical['whole_idle_jobs'])==dict(idles),'Physical caller inventory agrees') + need(physical['ports']==104 and physical['full_calls']==18 and physical['physical_contacts']==7488 and physical['central_square_columns']==53248 and physical['new_paid_jobs']==0,'Complete physical receipt coverage') + need((sum(P.values()),sum(T.values()),sum(r*n for r,n in T.items())-sum(r*n for r,n in P.items()))==(66888,13444,760),'Complete counts and rank surplus') + need((price['paid_calls'],price['productive_fields'],price['rank_mass_surplus'],price['full_forward_calls'],price['query_shears'],price['whole_idle_jobs'])==(66888,13444,760,18,15,3120),'Complete invoice receipt census') + routes=(sum(paid.values())+2*sum(helpers.values())+208+4*104+4*lifetimes)*1000 + n=price['nonrecursive'] + need(routes==5328000==n['local_routes'] and n['local_scalar']==scalar and scalar+routes<10**7,'Complete ordinary local allowance') + need(n['local_paid_rank_mass']==mass and n['peak_owned_fields']==peak,'New owned and rank-mass precision envelope') + need(n['raw_scalar_upper']==184647552 and n['raw_budget']==10**9 and n['raw_scalar_upper']0 and Q(grid['rejected_margin'][1])<0 and Q(grid['derivative_upper'])<0,'Strict fixed-contract ceiling signs') + return {'canonical_word_sha256':digest,'paid_calls':sum(P.values()),'productive_fields':sum(T.values()),'paid_rank_mass':mass,'native_distinct_maps':len(maps),'real_scalar_allowance':scalar,'local_routes':routes,'owned_fields':29,'owned_lifetimes':lifetimes,'peak_owned_fields':peak,'kappa':k,'tested':tested} + + +def main(): + from copy import deepcopy + import gzip + from hashlib import sha256 + parser=argparse.ArgumentParser(description='Independently recount the actual word, authenticate sources, bind its complete receipt, and prove the total moment gain. Full endpoint/native checks remain in verify.py.') + parser.add_argument('--package',type=Path,default=Path(__file__).resolve().parent) + parser.add_argument('--out',type=Path) + args=parser.parse_args();package=args.package.resolve() + binding=source_binding(package) + raw=(package/'RESULT.json').read_bytes();result=json.loads(raw) + word=json.loads(gzip.decompress((package/'WORD.json.gz').read_bytes())) + old=json.loads((package/'vendor/accumulated/RESULT.json').read_bytes()) + need(result['source_authentication']==binding,'Actual authenticated source receipt') + receipt=check_receipt(result,word,old) + gain=check(profile(result['local']['paid']),profile(result['local']['helpers'])) + controls={} + for label in ['omit_paid_call','old_rank_mass','wrong_source_head','missing_lifetime']: + bad=deepcopy(result) + if label=='omit_paid_call':bad['complete_cost']['paid']['1']-=1 + elif label=='old_rank_mass':bad['complete_cost']['nonrecursive']['local_paid_rank_mass']=5918 + elif label=='wrong_source_head':bad['source_commits']['blocks']='0'*40 + else:bad['local']['owned_lifetimes']=30 + try:check_receipt(bad,word,old) + except ValueError as error:controls[label]=str(error) + else:raise ValueError('Invalid receipt mutation accepted: '+label) + payload={'status':'PASS_INDEPENDENT_TOTAL_GAIN_AND_INVOICE','source_heads':HEADS,'source_authentication':binding,'result_sha256':sha256(raw).hexdigest(),'recount':receipt,'gain_certificate':gain,'negative_controls':controls,'scope':'Independent source/word/invoice/growth-envelope check and exact interval-wide gain proof. The full registered verify.py separately checks scalar endpoints, native phase identities, physical geometry and exact root/compiler arithmetic.'} + text=json.dumps(encode(payload),indent=2)+'\n' + if args.out:args.out.write_text(text) + else: + retained=json.loads((package/'TOTAL-GAIN.json').read_bytes()) + need(json.dumps(retained,sort_keys=True)==json.dumps(encode(payload),sort_keys=True), 'Complete retained independent receipt') + print(payload['status']) + + +if __name__=='__main__':main() diff --git a/research/p104-accumulated-block-composition/construct.py b/research/p104-accumulated-block-composition/construct.py new file mode 100644 index 0000000000..4b2241e910 --- /dev/null +++ b/research/p104-accumulated-block-composition/construct.py @@ -0,0 +1,50 @@ +"""Compose Joel Pulikkan's exact R22 block with the released native copies. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +The two source constructions retain their authorship and notices. +""" +from copy import deepcopy +from hashlib import sha256 +import json +from pathlib import Path +from sources import need, load + +HERE = Path(__file__).resolve().parent + + +def digest(value): + return sha256(json.dumps(value, sort_keys=True, separators=(',', ':')).encode()).hexdigest() + + +def construct(source): + edits = json.loads((HERE/'vendor/blocks/source/R22-EDITS.json').read_bytes()) + word = deepcopy(source) + need(len(word['frames']) == 1092 and len(edits['frames']) == 1, + 'Exact source chart inventories') + need(word['frames'][1090] == edits['frames'][0], 'Existing chart has the exact R22 basis') + for kind in ('initial', 'final'): + for label, (old, new) in edits[kind].items(): + need(word[kind][int(label)] == old and new == 1090, 'Exact helper endpoint join') + word[kind][int(label)] = new + program, spots = word['program'], [] + for index, (old, new) in enumerate(edits['program']): + hits = [i for i in range(len(program)-len(old)+1) if program[i:i+len(old)] == old] + need(len(hits) == 1, 'One exact R22 source run: '+str(index)) + spots.append((hits[0], old, new)) + spots.sort() + need(len(spots) == 8, 'All eight source edits') + for (i, old, _), (j, _, _) in zip(spots, spots[1:]): + need(i+len(old) <= j, 'Disjoint source runs') + for i, old, new in reversed(spots): + program[i:i+len(old)] = deepcopy(new) + preserve = lambda w: [e for e in w['program'] if e[0] in ('INIT', 'COPY', 'CLEAR')] + need(preserve(word) == preserve(source), 'Every owned lifetime and COPY event is retained in order') + need(word['owned_fields'] == source['owned_fields'] == 28, 'No extra owned label') + word['schema'] = 'p104-copy-block-composition/1' + witness = [dict(source_index=i, old_length=len(old), new_length=len(new), + old_sha256=digest(old), new_sha256=digest(new)) for i, old, new in spots] + extend = load(HERE/'vendor/blocks/second_block.py', 'composed_second_block').extend + word, second = extend(word) + need(preserve(word) == preserve(source), 'Both blocks retain every owned lifetime and COPY event') + word['schema'] = 'p104-accumulated-block-composition/1' + return word, dict(R22=witness, second_block=second) diff --git a/research/p104-accumulated-block-composition/integrity_check.py b/research/p104-accumulated-block-composition/integrity_check.py new file mode 100644 index 0000000000..153e749ba5 --- /dev/null +++ b/research/p104-accumulated-block-composition/integrity_check.py @@ -0,0 +1,135 @@ +"""Light, isolated controls for complete predecessor-byte authentication. + +Run with --package PATH, or place beside sources.py and SOURCES.json. +No scientific replay, predecessor import, network, or package mutation occurs. +Mason Hale with substantial OpenAI Codex assistance. Apache-2.0. +""" +import argparse +from copy import deepcopy +from hashlib import sha256 +import json +from pathlib import Path +import shutil +import sys +import tempfile +import types + +sys.dont_write_bytecode = True + + +def run(package): + package = Path(package).resolve() + code = (package/'sources.py').read_bytes() + module = types.ModuleType('isolated_integrity_sources') + module.__file__ = str(package/'sources.py') + exec(compile(code, str(package/'sources.py'), 'exec'), module.__dict__) + clean = module.authenticate(package) + original = json.loads((package/'SOURCES.json').read_bytes()) + # Use a small runtime Python source for each corruption, preserving all other bytes. + row = next(r for r in original['vendored'] if r['local_path'].endswith('/construct.py')) + relative = row['local_path'] + results = {} + with tempfile.TemporaryDirectory(prefix='p104-integrity-controls-') as name: + root = Path(name) + shutil.copytree(package/'vendor', root/'vendor') + shutil.copy2(package/'SOURCES.json', root/'SOURCES.json') + # copy2/copytree retain a sealed input's read-only mode. Mutations are + # confined to these private temporary fixtures, never the input package. + for fixture in root.rglob('*'): + fixture.chmod(0o700 if fixture.is_dir() else 0o600) + baseline = module.authenticate(root) + module.need(baseline == clean, 'Positive exported authentication') + target = root/relative + raw = target.read_bytes() + + def save_pins(value): + (root/'SOURCES.json').write_text(json.dumps(value)) + + def rejects(label): + try: + module.authenticate(root) + except ValueError as error: + results[label] = str(error) + else: + raise ValueError('Corruption was accepted: '+label) + + target.write_bytes(raw+b'\n# changed source byte\n') + rejects('changed_source_bytes') + target.write_bytes(raw) + target.unlink() + rejects('missing_source') + target.write_bytes(raw) + extra = root/'vendor/unlisted-input.txt' + extra.write_text('unlisted') + rejects('extra_source_payload') + extra.unlink() + backing = root/'symlink-backing.py' + backing.write_bytes(raw) + target.unlink() + target.symlink_to(backing) + rejects('source_symlink') + target.unlink() + target.write_bytes(raw) + pins = deepcopy(original) + pins['vendored'].append(deepcopy(row)) + save_pins(pins) + rejects('duplicate_runtime_pin') + pins = deepcopy(original) + selected = next(r for r in pins['vendored'] if r['local_path'] == relative) + selected['local_path'] = 'vendor/../escape.py' + save_pins(pins) + rejects('source_path_escape') + pins = deepcopy(original) + pins['files'] = [r for r in pins['files'] if r.get('local_path') != relative] + save_pins(pins) + rejects('missing_repository_origin') + pins = deepcopy(original) + for group in ('vendored','files'): + for r in pins[group]: + if r.get('local_path') == relative: + r['git_blob'] = '0'*40 + if 'origin' in r: + r['origin']['git_blob'] = '0'*40 + save_pins(pins) + rejects('wrong_git_blob_with_correct_sha256') + pins = deepcopy(original) + pins['retained_commit'] = '0'*40 + save_pins(pins) + rejects('wrong_retained_ancestor') + pins = deepcopy(original) + selected = next(r for r in pins['files'] if r.get('local_path') == relative) + selected['origin']['path'] += '-wrong' + save_pins(pins) + rejects('wrong_original_source_mapping') + pins = deepcopy(original) + selected = next(r for r in pins['files'] if r.get('local_path') == relative) + pins['files'].append(deepcopy(selected)) + save_pins(pins) + rejects('duplicate_retained_repository_pin') + shutil.copy2(package/'SOURCES.json', root/'SOURCES.json') + module.need(module.authenticate(root) == clean, 'Restored copied payload') + module.need(module.authenticate(package) == clean, 'Original payload preserved') + return {'status':'PASS_SOURCE_AUTHENTICATION_CONTROLS', + 'authenticator_sha256':sha256(code).hexdigest(), + 'positive_authentication':clean, 'controls':results, + 'scope':'Source-byte/inventory checks only; no local/native/caller/pricing replay.'} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--package',type=Path,default=Path(__file__).resolve().parent) + parser.add_argument('--output',type=Path) + args = parser.parse_args() + result = run(args.package) + encoded = json.dumps(result,sort_keys=True,indent=2)+'\n' + if args.output: + args.output.write_text(encoded) + else: + retained = json.loads((args.package/'INTEGRITY-CONTROLS.json').read_bytes()) + if retained != result: + raise ValueError('Complete retained integrity receipt differs') + print(result['status']) + + +if __name__ == '__main__': + main() diff --git a/research/p104-accumulated-block-composition/local.py b/research/p104-accumulated-block-composition/local.py new file mode 100644 index 0000000000..b7be846b10 --- /dev/null +++ b/research/p104-accumulated-block-composition/local.py @@ -0,0 +1,208 @@ +"""Check the complete P104 word with an independent helper inventory. + +Adapted from Ali Romman's PR5544/5545. David Arias supplied the word; +Cinna Davis supplied private reuse; Gareth Davidson supplied composition. +Prepared by Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as Q +from functools import lru_cache +from hashlib import sha256 +from pathlib import Path +import gzip +import importlib.util +import json +import sys + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] + +def need(ok, why): + if not ok: + raise ValueError(why) + +def read(path): + raw = path.read_bytes() + return json.loads(gzip.decompress(raw) if path.suffix == '.gz' else raw) + +def load(path, name): + spec = importlib.util.spec_from_file_location(name, path) + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + +def add(dst, src, q): + for k, v in tuple(src.items()): + value = dst.get(k, 0) + q*v + if value: + dst[k] = value + else: + dst.pop(k, None) + +def span(basis): + out = {0} + for v in basis: + need(type(v) is int and 0 < v < 512 and v not in out, 'Independent binary basis') + out |= {x ^ v for x in tuple(out)} + return frozenset(out) + +def replay(w): + public = w['public'] + owned = w.get('owned_fields', 8) + need(type(owned) is int and 8 <= owned <= 29, 'Owned inventory bound') + need(type(public) is int and 767 <= public <= 770, 'Public inventory bound') + need(len(w['initial']) == len(w['final']) == public, 'Public boundary size') + need(len(w['program']) < 26000, 'Fixed operation bound') + frames = [span(x) for x in w['frames']] + rows = [{r:Q(1)} for r in range(public+owned)] + current = list(w['initial']) + [None]*owned + paid, scalar, live_owned, peak = Counter(), 0, set(), 0 + lifetimes = 0 + for e in w['program']: + op, r = e[:2] + need(0 <= r < public+owned, 'Role index') + if op == 'MOVE': + _, r, a, b, private = e + need(current[r] == a and (r in live_owned) == private, 'Transport source and ownership') + need(frames[b] < frames[a] if private else frames[a] < frames[b], 'Nested chronological transport') + paid[abs(len(w['frames'][b])-len(w['frames'][a]))] += 1 + current[r] = b + elif op == 'INIT': + need(r >= public and r not in live_owned, 'Owned initialization') + live_owned.add(r) + lifetimes += 1 + peak = max(peak, len(live_owned)) + rows[r] = {} + current[r] = e[2] + scalar += 2 + elif op == 'CLEAR': + need(r in live_owned and current[r] == e[2], 'Owned erasure at declared frame') + rows[r] = {} + current[r] = None + live_owned.remove(r) + scalar += 2 + else: + q, f = Q(e[-2]), e[-1] + need(q and current[r] == f, 'Scalar destination and coefficient') + n, d = abs(q.numerator), q.denominator + need(d & (d-1) == 0, 'Dyadic scalar coefficient') + need(abs(q)+1 < 2**16, 'Fixed scalar growth bound') + if op == 'SCALE': + need(n & (n-1) == 0, 'Dyadic unit SCALE') + rows[r] = {k:q*x for k,x in rows[r].items()} + scalar += 2*(abs(n.bit_length()-d.bit_length()) + int(q < 0)) + else: + s = e[2] + need(s != r and 0 <= s < public+owned and current[s] == f, 'Common scalar chart') + if op == 'COPY': + need(r in live_owned and not rows[r], 'COPY into cleared owned field') + rows[r] = {k:q*x for k,x in rows[s].items()} + else: + need(op == 'ADD', 'Scalar opcode') + add(rows[r], rows[s], q) + scalar += 2*(3+n.bit_length()-1+n.bit_count()+d.bit_length()-1) + need(not live_owned and 0 < peak <= 13 and current[:public] == w['final'], 'All public and owned exits') + live = set(w['live']) + for r,row in enumerate(rows): + expected = {r:Q(1)} if r < public else {} + if r-112 in live: + expected[r-112] = Q(1) + need(row == expected, 'All public and owned rows') + main = live | {r+112 for r in live} + helpers = Counter(len(w['frames'][w['final'][r]])-len(w['frames'][w['initial'][r]]) for r in range(public) if r not in main) + need(len(live) == len(w['ports']) == 104 and len(main) == 208 and min(helpers) > 0, 'Independent productive inputs') + return {'paid':dict(paid), 'helpers':dict(helpers), 'public_inputs':public, 'owned_fields':owned, 'owned_lifetimes':lifetimes, + 'peak_owned_fields':peak, 'real_scalar_allowance':scalar, 'endpoint_coefficients':(public+owned)*(public+owned), + 'paid_rank_mass':sum(r*count for r,count in paid.items())} + +def reverse_columns(w): + """Check the transpose with dense dyadic rows and the reverse chronology.""" + public = w['public'] + n = public+w.get('owned_fields', 8) + rows = [[int(i == j) for j in range(n)] for i in range(n)] + exponents = [0]*n + for e in reversed(w['program']): + op,r = e[:2] + if op == 'MOVE': + continue + if op in ('INIT','CLEAR'): + rows[r] = [0]*n + exponents[r] = 0 + continue + q = Q(e[-2]) + qe = q.denominator.bit_length()-1 + if op == 'SCALE': + rows[r] = [q.numerator*x for x in rows[r]] + exponents[r] += qe + else: + s = e[2] + level = max(exponents[s], exponents[r]+qe) + a, b = 1 << (level-exponents[s]), q.numerator << (level-exponents[r]-qe) + rows[s] = [a*x+b*y for x,y in zip(rows[s],rows[r])] + exponents[s] = level + if op == 'COPY': + rows[r] = [0]*n + exponents[r] = 0 + r = s + while exponents[r] and not any(x & 1 for x in rows[r]): + rows[r] = [x//2 for x in rows[r]] + exponents[r] -= 1 + for r,row in enumerate(rows): + expected = [0]*n + if r < public: + expected[r] = 1 << exponents[r] + if r in w['live']: + expected[r+112] = 1 << exponents[r] + need(row == expected, 'Independent dense transpose columns') + return {'columns':n, 'coefficients':n*n, 'arithmetic':'Dense integer rows with binary denominators; reverse chronology'} + +def native(w): + n = w['public'] + C = load(ROOT/'research/p104-native-channel/vendor/clifford_exact.py', 'p104_productive_clifford') + V = load(ROOT/'research/p104-native-channel/vendor/native_verify.py', 'p104_productive_gaussian') + @lru_cache(None) + def chart(i): + return C.canonical_frame(9, tuple(w['frames'][i])) + recipes = {} + def check(a,b): + if (a,b) not in recipes: + recipe,_ = C.lower_child(chart(a).adjoint().then(chart(b))) + expected = V.adjoint(V.frame(w['frames'][a],9)) + V.frame(w['frames'][b],9) + V.equal(V.recipe(recipe),expected,'Native chart change and exact global phase') + need(recipe['rank'] == abs(len(w['frames'][a])-len(w['frames'][b])), 'Native boundary rank') + recipes[a,b] = recipe + return recipes[a,b] + for e in w['program']: + if e[0] == 'MOVE': + check(e[2],e[3]) + main = set(w['live']) | {r+112 for r in w['live']} + helper_profile = Counter() + for r in range(n): + if r not in main: + helper_profile[check(w['initial'][r],w['final'][r])['rank']] += 1 + adapters = [] + for r,q in zip(w['live'],w['ports']): + need(w['frames'][w['initial'][r]] == [q], 'Literal central port') + need(span(w['frames'][w['final'][r+112]]) == frozenset(x for x in range(512) if not (x&q).bit_count()%2), 'Literal output hyperplane') + tests = [ + (C.cgate(9,q,1).adjoint().then(chart(w['initial'][r])), V.adjoint((('C',q,1),))+V.frame(w['frames'][w['initial'][r]],9)), + (chart(w['final'][r+112]).adjoint().then(C.cgate(9,q,-1).then(C.fourier(9))), V.adjoint(V.frame(w['frames'][w['final'][r+112]],9))+(('C',q,-1),)+V.fourier(9))] + for actual,expected in tests: + recipe,_ = C.lower_child(actual) + need(recipe['rank'] == 0, 'Free intrinsic main adapter') + V.equal(V.recipe(recipe),expected,'Main endpoint phase') + adapters.append(recipe) + bad = json.loads(json.dumps(next(iter(recipes.values())))) + bad['left']['phase'] = (bad['left']['phase']+1)%4 + a,b = next(iter(recipes)) + try: + V.equal(V.recipe(bad),V.adjoint(V.frame(w['frames'][a],9))+V.frame(w['frames'][b],9),'Wrong phase control') + except ValueError: + pass + else: + raise ValueError('Wrong native phase accepted') + payload = [[a,b,recipes[a,b]] for a,b in sorted(recipes)] + adapters + return {'distinct_maps':len(recipes),'main_adapters':len(adapters),'helper_normalizers':2*sum(helper_profile.values()), + 'helpers':dict(helper_profile),'recipe_payload_sha256':sha256(json.dumps(payload,sort_keys=True,separators=(',',':')).encode()).hexdigest(), + 'wrong_phase_rejected':True, 'proof':'Every signed Pauli image and exact global phase; frame induction at every positive tensor width'} diff --git a/research/p104-accumulated-block-composition/pricing.py b/research/p104-accumulated-block-composition/pricing.py new file mode 100644 index 0000000000..ba6b337d49 --- /dev/null +++ b/research/p104-accumulated-block-composition/pricing.py @@ -0,0 +1,184 @@ +"""Complete mixed-target price, compiler and outer transfer. + +The interval and compiler bounds follow zxv and Cao Yifan. The productive +recursion is by Jacob Alan Sussman. The controller is by Cinna Davis. +Adapted from Ali Romman's PR5544/5545 for the two coupled contact changes. +Successor choices were prepared for thu-nmrc with OpenAI Codex assistance. +Helper-subspace targets were added by Ali Romman with OpenAI Codex assistance. +The source commuting-contact construction is by Pierre-Loic Doulcet (hexapode) in PR5565. +The source coupled-frame change is by Ali Romman with OpenAI Codex in PR5601. +Five fixed boundary relations are from Ali Romman's PR5602. +The shared and delayed relays are from flyingviper's PR5605 and PR5612. The preparation is from +Scratch-net's PR5606. Their costs and target debit are included. +Ali Romman's complete caller/price proof and all predecessor credit are retained. +The paid A2 change is from zxv PR5643. The three helper relations are from +Ali Romman PR5644. The four-gate change is by Ali Romman with Codex assistance. +The four interior basis changes are by Ali Romman with Codex assistance. +Paid intermediate meetings: Ali Romman with substantial OpenAI Codex assistance. +Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as Q +import local as L + +KAPPA, TESTED = Q('.00312418633064'), Q('.00312418633564') +PREVIOUS = Q('.00312336057') + + +def encode(x): + if isinstance(x,Q): + return str(x) + if isinstance(x,dict): + return {str(k):encode(v) for k,v in x.items()} + if isinstance(x,(list,tuple)): + return [encode(v) for v in x] + return x + + +def assemble(local, native, word, physical): + paid, targets = Counter(), Counter() + counts = Counter() + L.need(local['helpers'] == native['helpers'], 'Every productive helper has a native target') + for e in word['physical_events']: + counts[e[0]] += 1 + if e[0] == 'LOCAL': + L.need(e[3] is False, 'Every source invocation is forward') + paid.update(local['paid']) + targets.update(local['helpers']) + elif e[0] == 'QUERY_SHEAR': + paid[1] += 104 + elif e[0] == 'IDLE': + paid[8*len(e[2])] += 208 + main = Counter() + idle = Counter({8*len(e[2]):0 for e in word['physical_events'] if e[0] == 'IDLE'}) + for e in word['physical_events']: + if e[0] == 'IDLE': + idle[8*len(e[2])] += 208 + L.need(idle == physical['whole_idle_jobs'], 'Every whole idle has a native Gaussian and full rank') + for term in word['diagonal']: + main[1+8*sum(term[1:])] += 104 + L.need(main == physical['main_targets'], 'Every main target has its full native phase') + targets.update(main) + L.need(counts['LOCAL'] == 18 and counts['QUERY_SHEAR'] == counts['IDLE'] == 15, 'Complete call census') + # Recount by the two path lengths, without using emitted main diagonals. + second_t = Counter({r:18*n for r,n in local['helpers'].items()}) + second_p = Counter({r:18*n for r,n in local['paid'].items()}) + second_t[145] += 208 + second_p[1] += 15*104 + for length in (7,8): + for j in range(1,length+1): + second_t[1+8*(j+1)] += 208 + second_p[8*(j+1)] += 208 + L.need((targets,paid) == (second_t,second_p), 'Independent full invoice') + L.need(max(targets) == 145 and max(paid) == 72, 'Maximum recursive ranks') + L.need(sum(targets.values()) == 13444 and sum(paid.values()) == 66888, 'Complete field and call counts') + L.need(sum(r*n for r,n in targets.items())-sum(r*n for r,n in paid.items()) == 760, 'Complete rank surplus') + return targets,paid,counts + + +def run(local,native,word,physical): + T,P,counts = assemble(local,native,word,physical) + E = L.load(L.ROOT/'research/higher-moment-strictification/verify.py','p104_productive_intervals') + other = L.load(L.ROOT/'research/kappa-rebuild/architecture/mixed_target_probe.py','p104_productive_second_intervals') + def margin(k): + a,b = E.moment(T,1-k), E.moment(P,1-k) + return a[0]-b[1],a[1]-b[0] + lo,hi,grid = 0,10**15,10**17 + while hi-lo > 1: + m=(lo+hi)//2 + if margin(Q(m,grid))[0] > 0: + lo=m + else: + hi=m + lower,upper = Q(lo,grid),Q(hi,grid) + signed = Counter(T) + signed.subtract(P) + cap = Q('.0034') + derivative_upper = Q(0) + for rank, count in signed.items(): + logarithm = E.log_bounds(rank) + low = E.mul(E.power(rank, 1-cap), logarithm)[0] + high = rank*logarithm[1] + derivative_upper -= count*(low if count >= 0 else high) + L.need(derivative_upper < 0, 'Unique raw crossing below the retained BIT cap') + L.need(margin(lower)[0] > 0 and margin(upper)[1] < 0, 'Strict rational crossing enclosure') + L.need(PREVIOUS < KAPPA < TESTED < lower and margin(PREVIOUS)[0] > 0, 'Changed complete bill improves the source claim') + t,u,v,c,b = 1-TESTED,Q(1,7),1024,16,17 + target,paid = E.moment(T,t),E.moment(P,t) + tl,th = other.moment(T,TESTED) + pl,ph = other.moment(P,TESTED) + L.need(tl > ph and max(tl,target[0]) <= min(th,target[1]) and max(pl,paid[0]) <= min(ph,paid[1]), 'Two exact moment engines') + alpha = E.divide(paid,target) + gamma = E.divide(E.moment(P,t+u),E.mul(E.power(c,u),target)) + delta = E.divide((Q(sum(T.values())*b),)*2,E.mul(E.power(c,TESTED),target)) + reserve,decay = Q(1,10**12),Q(125,128) + L.need(alpha[1] < 1-reserve and gamma[1] < decay and delta[1] < decay, 'All three charged tail ratios') + L.need(decay**128 < Q(1,16), 'Both tail decay blocks') + normalized = 1/(1+v*reserve)+Q(4,2**32) + L.need(normalized < 1 and c**64 < b**63, 'Full completion, splitting and rounding charges') + theta,power = Q(63,64),1024 + eta = E.scale(E.power(145,-v*TESTED),t) + L.need(2*(c**v)**64 <= (145**v)**63 and eta[0] > theta**power, 'Shifted exits and complement capacity') + L.need(E.power(145,v*TESTED)[1] < 2**power, 'Compiler initial range') + gap = (TESTED-KAPPA)/7 + L.need(gap.numerator == 1, 'Exact compiler integer grid') + step = gap.denominator + def wins(j): + return (step*j+1)**power < 2**j + left,right=1,2 + while not wins(right): + left,right=right,2*right + while right-left > 1: + m=(left+right)//2 + if wins(m): + right=m + else: + left=m + H=step*right + L.need(H > 8*v and wins(right) and not wins(right-1), 'Finite uniform threshold with predecessor rejection') + local_routes = (sum(local['paid'].values())+native['helper_normalizers']+native['main_adapters']+4*104+4*local['owned_lifetimes'])*1000 + L.need(local['real_scalar_allowance']+local_routes < 10**7, 'Every local scalar, route and owned operation is funded') + boundary = sum(len(word['boundaries'][side+'_program']) for side in ('left','right')) + raw = 18*10**7 + 15*1664 + 32*104*(len(word['physical_events'])+boundary) + raw += 32*104*(26+1000) + L.need(raw < 10**9, 'Complete nonrecursive raw bound') + bit = L.read(L.ROOT/'research/query-thinned-controllers/RESULT.json')['ordinary_BIT'] + atom = Q(bit['atom']) + ordinary=(1-atom)*Q(bit['after_cover'])+atom*Q('.0000384599') + admitted=Q(bit['admitted']) + L.need(atom > ordinary > admitted > TESTED and atom < 1-ordinary, 'Retained BIT admission and stock') + outer_module=L.load(L.ROOT/'research/pr4359-p7-padding/dependencies/compiler-refill/endpoint.py','p104_productive_outer') + params={'kappa':KAPPA,'tested_saving':TESTED,'complex_uniform_saving':KAPPA+6*gap, + 'b':KAPPA+5*gap,'a':KAPPA+4*gap,'q':KAPPA+3*gap,'bit_saving':admitted, + 'epsilon':1-gap,'beta':1-3*gap,'r0':gap/10,'stop':gap,'layout':gap,'d':gap} + outer=outer_module.ledger(params) + outer['functional_checks']['actual_new_BIT_stock_sublinear']=params['beta']*(1-atom) + L.need(len(outer['strict_checks']) == 54 and len(outer['functional_checks']) == 4, 'Complete outer predicate inventory') + L.need(all(x > 0 for key in ('strict_checks','functional_checks') for x in outer[key].values()), 'All outer inequalities strict') + wrong_cutoff = E.divide((Q(sum(T.values())*21),)*2,E.mul(E.power(20,TESTED),target)) + L.need(wrong_cutoff[0] > 1, 'Old cutoff fails with this helper inventory') + old_completion = E.divide((Q(sum(T.values())*18),)*2,E.mul(E.power(17,TESTED),target)) + L.need(old_completion[0] > Q(39,40), 'PR5718 completion-tail bound fails with the new target count') + old_offset = E.divide(E.moment(P,t+Q(1,5)),E.mul(E.power(16,Q(1,5)),target)) + L.need(old_offset[0] > decay, 'The old tail offset fails at the new cutoff') + bad=outer_module.ledger(dict(params,bit_saving=Q('.0027'))) + L.need(any(x <= 0 for x in bad['strict_checks'].values()), 'Insufficient BIT contract rejected') + return encode({'kappa':KAPPA,'kappa_decimal':'0.00312418633064','previous_pr5802':PREVIOUS,'gain':KAPPA-PREVIOUS, + 'relative_gain_percent':100*(KAPPA/PREVIOUS-1),'raw_root_interval':[lower,upper], + 'raw_headroom':[lower-KAPPA,upper-KAPPA], + 'raw_ceiling':{'interval':[Q(0),cap],'derivative_upper':derivative_upper},'margin_at_previous':E.display(margin(PREVIOUS)), + 'targets':T,'paid':P,'productive_fields':sum(T.values()),'paid_calls':sum(P.values()), + 'rank_mass_surplus':760,'full_forward_calls':18,'query_shears':15,'whole_idle_jobs':3120, + 'strictification':{'tested':TESTED,'power':v,'cutoff':c,'floor':b,'tail_offset':u,'reserve':reserve,'tail_decay':decay,'tail_block':128, + 'alpha':E.display(alpha),'gamma':E.display(gamma),'delta':E.display(delta),'normalized_paid_upper':normalized}, + 'compiler':{'theta':theta,'logarithm_power':power,'eta':E.display(eta),'gap':gap,'H':H,'N':'2^'+str(H), + 'integer_test_exponent':right,'uniform_saving':params['complex_uniform_saving'],'word_materialized':False}, + 'nonrecursive':{'local_scalar':local['real_scalar_allowance'],'local_routes':local_routes, + 'raw_scalar_upper':raw,'raw_budget':10**9,'peak_owned_fields':local['peak_owned_fields'], + 'fixed_scalar_growth_bound':'At most 2^(16*26000) before native factors; a declared constant, not an attained norm.', + 'local_paid_rank_mass':local['paid_rank_mass'], + 'tensor_native_growth_bound':'Each rank-r Gaussian has row l1 norm at most 2^(rf); use local_paid_rank_mass for the whole word.'}, + 'ordinary_BIT':bit,'outer':outer, + 'negative_controls':{'source_completion':'Rejected at cutoff17, floor18 and decay39/40', + 'source_offset':'Rejected at cutoff16 with tail offset1/5', + 'old_cutoff':'Rejected by completion-tail ratio greater than one','old_BIT':'Rejected by outer inequalities'}}) diff --git a/research/p104-accumulated-block-composition/sources.py b/research/p104-accumulated-block-composition/sources.py new file mode 100644 index 0000000000..666eaf2c6f --- /dev/null +++ b/research/p104-accumulated-block-composition/sources.py @@ -0,0 +1,73 @@ +"""Authenticate verbatim predecessor inputs before loading any predecessor code. + +Mason Hale with substantial OpenAI Codex assistance. Apache-2.0. +Source authors and their complete notices are retained under vendor/. +""" +from contextlib import contextmanager +from hashlib import sha1, sha256 +import importlib.util +import json +from pathlib import Path, PurePosixPath +import sys + +HERE = Path(__file__).resolve().parent +RETAINED_COMMIT = 'b83ff89de649be3bd2dc2d885da254bae00c8836' +PACKAGE = 'research/p104-accumulated-block-composition/' +ORIGINS = {'accumulated': '9bab1ca917ec4d1a4e60f4eb8c81d7ef92908a62', + 'blocks': '206cb717c0c07737d61637b93f7502ca48850348'} + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +def load(path, name): + spec = importlib.util.spec_from_file_location(name, path) + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + + +def authenticate(directory=HERE): + pins = json.loads((directory/'SOURCES.json').read_bytes()) + need(pins['retained_commit'] == RETAINED_COMMIT, 'Exact retained source ancestor') + names = set() + for row in pins['vendored']: + name = row['local_path'] + parts = PurePosixPath(name).parts + need(parts and parts[0] == 'vendor' and '..' not in parts + and not name.startswith('/') and '\\' not in name and ':' not in name, + 'Relative vendored source path') + need(len(parts) >= 3 and parts[1] in ORIGINS + and row['pin'] == 'head:'+ORIGINS[parts[1]]+':'+row['path'], + 'Exact original source head') + need(name not in names, 'Unique vendored source') + names.add(name) + path = directory + for part in parts: + path = path/part + need(not path.is_symlink(), 'No source symlink') + need(path.is_file(), 'Regular vendored source') + raw = path.read_bytes() + need(sha256(raw).hexdigest() == row['sha256'], 'Exact source SHA256: '+name) + need(sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest() == row['git_blob'], + 'Exact source Git blob: '+name) + retained = [r for r in pins['files'] if r.get('local_path') == name] + need(len(retained) == 1, 'One retained repository pin for each runtime origin') + target = retained[0] + need(target['origin'] == row and target['path'] == PACKAGE+name + and target['pin'] == 'head:'+RETAINED_COMMIT+':'+target['path'] + and target['sha256'] == row['sha256'] and target['git_blob'] == row['git_blob'], + 'Exact retained source bytes and original provenance') + actual = {p.relative_to(directory).as_posix() + for p in (directory/'vendor').rglob('*') if p.is_file() or p.is_symlink()} + need(actual == names, 'Complete vendored payload inventory') + return {'files': len(names), 'source_manifest_sha256': sha256((directory/'SOURCES.json').read_bytes()).hexdigest()} + + +@contextmanager +def sources(): + authenticate() + yield HERE/'vendor/accumulated', HERE/'vendor/blocks' diff --git a/research/p104-accumulated-block-composition/vendor/accumulated/DISCOVERY.md b/research/p104-accumulated-block-composition/vendor/accumulated/DISCOVERY.md new file mode 100644 index 0000000000..7ea3bc96f1 --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/accumulated/DISCOVERY.md @@ -0,0 +1,62 @@ +# Discovery scope + +The source was exact PR5786. Canonical main was +`de5ec2e7a6074068452f45b1a191b5c72832df4a`, priority revision 8. +The initial public overlap refresh covered 345 open PRs and 5175 Discussion +records with complete remote pagination. The sparse local inventory was +incomplete. Published and unpublished work can differ; a search is not a +certificate of novelty. A final full cached refresh stopped at an approval +timeout. A direct read then checked the 20 most recently updated PRs and +20 most recently updated Discussions. This later read was not a complete +remote snapshot. + +The first tests extended the lifetime of an unchanged decoded value across +native MOVE operations. The fixed source had no repeated native output value +up to a nonzero scalar. A modular causal-span screen found no query output +in the span of earlier values in its destination frame. These are discovery +observations about that word, not universal exclusions. + +The positive change uses the dual operation: collect several additions to an +unread destination, then convert their sum once. A finite graph-cut search +compared retained source copies with destination accumulation. Native costs +used the complete paid moment; helper boundary changes replaced their old +credits. The chosen construction needs no new source copy. + +The discovery program used Python 3.12, PyMaxflow 1.3.2 and rounded integer +power costs. Those costs proposed candidates; they did not certify the final +price. The final plan has exact node IDs, event indices, coefficients and +source/output hashes. Its replay uses only the standard library and no optimizer. + +Four provisional steps passed exact scalar replay. The largest touched role 92 +and the contact region reserved in Discussion5125. PR5796 subsequently made +that block public. This contribution excludes the provisional role 92 step and +leaves its composition to the separate investigation. The search was rerun +with that region fixed. The accepted three steps use destinations 146,173,151. +The verifier also freezes the original R22 contact region. It compares 1704 +protected events, their public boundary frames and all 23 exact COPY values. + +Additional finite screens used the 1092 source frames,1313 subspaces derived +from neighboring sums and intersections, scalar-rescaling groups, both choices +of one moving helper endpoint,567 sampled linear transvections, and 1022 common +hyperplane-intersection or line-sum transformations. They did not add an +accepted gain. These discovery screens were not exhaustive over native charts, +scalar schedules, target contracts or multiple-frame plans. Their scratch +optimizers are not needed to reproduce this contribution, and no negative +theorem or global optimum is claimed from them. + +The source-bound first command was `python3 -B scripts/research_selected_baseline.py`. +The selected record was read directly and its main revision was checked. The +binding command stopped on omitted selected-source files in the sparse checkout; +it is not reported as a pass. No selected scientific replay was claimed. +The new package has its own complete authenticated source export and registered +verification. That export needs neither the omitted checkout files nor Git. + +Credit PR5786, PR5774, PR5751, flyingviper's PR5718, Joel Pulikkan's R22 work, +the separate PR5795/5796 constructions, and all retained P104/native/controller/ +compiler/BIT sources. The later transposed-supplier scope in +[Discussion5125](https://github.com/CrocSwap/integer-mult-bounds/discussions/5125#discussioncomment-19154639) +uses the same source/destination duality. That broader search is concurrent +work and remains separate from these three fixed forward-supplier steps. +The accumulation identity is elementary linearity. The +contribution is its legal placement, changed complete invoice and conditional +kappa result. Ali Romman with substantial OpenAI Codex assistance. No subagents. diff --git a/research/p104-accumulated-block-composition/vendor/accumulated/LOCAL-EDITS.json b/research/p104-accumulated-block-composition/vendor/accumulated/LOCAL-EDITS.json new file mode 100644 index 0000000000..4b5b03915a --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/accumulated/LOCAL-EDITS.json @@ -0,0 +1,6 @@ +[ + [ + "8 <= owned <= 25", + "8 <= owned <= 28" + ] +] diff --git a/research/p104-accumulated-block-composition/vendor/accumulated/NOTICE b/research/p104-accumulated-block-composition/vendor/accumulated/NOTICE new file mode 100644 index 0000000000..a5a020a120 --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/accumulated/NOTICE @@ -0,0 +1,79 @@ +Accumulated native updates +New work: Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +No subagents. The same assistant made the construction and the author checks. + +Concurrent scope: Discussion5125 now tests retained copies in the transposed +supplier. That route uses the same source/destination duality. This package +claims the three fixed forward-supplier groups and their complete result, +not the elementary accumulation identity or the broader transposed search. + +Exact source: PR5786 at 6b936acd68a7e0f9062037900f0fe9bc4b6fdd25. +The complete predecessor notice follows unchanged. + +Asynchronous helper hubs +New work: Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. + +Retained native copies from PR5774 at 7d6ec0cdef31d0c37b7d2563e709979caa0d5eae. +All prior credit follows unchanged. + +Paid intermediate meetings and collective helper splits. +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +No subagents. All checks are author-side calculations. + +The complete PR5718 notice follows unchanged. + +Four paid interior public-basis changes. +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +No subagents. + +The following exact notice is retained from PR5660. + +New helper-subspace construction, proof and replay: +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +The same assistant performed the construction and author-side checks. + +Retained contributions: +flyingviper: PR5605 shared relay, PR5612 delayed relay, and the PR5608/PR5613 +relay/split compositions. +Scratch-net: PR5606 prepared-helper identities and target debit. +Pierre-Loic Doulcet (hexapode): PR5565 commuting-contact construction, used as the exact source. +Ali Romman: PR5602 fixed boundary relations, PR5601 three-contact frame +change, PR5580 contact step, +and PR5544/5545 complete P104 caller. +Joel Pulikkan (GamingPuzzled): PR5569 priced helper handoff. +DreamingOfClouds: PR5561 free helper endpoints and PR5568 search tools. +thu-nmrc: PR5551 contact improvements. +Gareth Davidson (bitplane): PR2305 source composition. +David Arias: PR2152 coalesced P104 word. +Cinna Davis: PR2219 private reuse and the controller lineage. +Jacob Alan Sussman: productive mixed-target recursion. +zxv and Cao Yifan: exact intervals, compiler and native/pricing lineage. +GamingPuzzled: PR5472 successor handoff, a predecessor to the split concept. +The retained source notices preserve earlier geometry, BIT and analytic credit. + +The elementary rank-one basis identity is not claimed as a new general +linear-algebra theorem. The contribution is its explicit independent-target +use on this P104 word and the complete conditional kappa improvement. + +New contribution: Ali Romman, with substantial OpenAI Codex assistance. +The four-gate source-version rewrite composes zxv PR5643 and Ali Romman PR5644. +The A2 method retains Chris R/Clear1nsight PR3998 and ToikY PR4019 credit. +The compensated triangle method retains Cinna Davis PR4692 credit. +No subagents were used for this contribution. Apache-2.0. + +Concurrent PR5650 by zxv publishes the PR5643/PR5644 composition. PR5651 by +Ali Romman corroborates it. This package credits that released composition +and contributes the further four-gate placement. + +New work: distributed scalar updates on an unobserved public field interval, the exact witness and complete conditional price. Prepared for Ali Romman with substantial OpenAI Codex assistance. No subagents. Apache-2.0. The source archive retains all predecessor notices. + +Two-boundary main-assisted helper split and early cleanup: flyingviper with substantial +OpenAI Codex assistance, including independent AI review agents. Apache-2.0. + +Retained native-copy construction +Prepared by Ali Romman with substantial OpenAI Codex assistance. No subagents. +The paid-meeting source is PR5751 by Ali Romman with OpenAI Codex assistance. +The dimension-four span [265,194,164,75] is from Joel Pulikkan / GamingPuzzled +PR5739, with Claude Opus 5.5 assistance. The R22 block edits are not included. +The retained-copy mechanism, exact constructor, source-specific verification, +new price and proof are the contribution of this package. Apache-2.0. diff --git a/research/p104-accumulated-block-composition/vendor/accumulated/PLAN.json b/research/p104-accumulated-block-composition/vendor/accumulated/PLAN.json new file mode 100644 index 0000000000..93f7502888 --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/accumulated/PLAN.json @@ -0,0 +1,63 @@ +{ + "source_canonical_sha256": "45e3f8efd004f2a6d2c02a2ac2ebe3dd9ce04c887641ec9ab31e47f8c7f41e1b", + "steps": [ + { + "anchor": 529, + "changed_nodes": [ + 744, + 1738, + 1979, + 3777 + ], + "source_sha256": "45e3f8efd004f2a6d2c02a2ac2ebe3dd9ce04c887641ec9ab31e47f8c7f41e1b", + "output_sha256": "a446550b286117c570892ed44217bd233c0448dc5340765c1e2dba62bcae18ed", + "accumulation": { + "role": 146, + "before": 531, + "after": 529, + "uses": [ + 13104, + 13110 + ] + } + }, + { + "anchor": 549, + "changed_nodes": [ + 1854, + 1969 + ], + "source_sha256": "a446550b286117c570892ed44217bd233c0448dc5340765c1e2dba62bcae18ed", + "output_sha256": "bf83457a5d8bbe329352a50b84f18a55bf4d777bd1289361418caa0610cf66a1", + "accumulation": { + "role": 173, + "before": 559, + "after": 549, + "uses": [ + 13478, + 13484 + ] + } + }, + { + "anchor": 541, + "changed_nodes": [ + 745, + 1793, + 1975, + 3799 + ], + "source_sha256": "bf83457a5d8bbe329352a50b84f18a55bf4d777bd1289361418caa0610cf66a1", + "output_sha256": "98244efb78720279811e81770dfaef02a304df1a368a72905c09db124f7ab7ca", + "accumulation": { + "role": 151, + "before": 543, + "after": 541, + "uses": [ + 13290, + 13296 + ] + } + } + ] +} diff --git a/research/p104-accumulated-block-composition/vendor/accumulated/PRICING-EDITS.json b/research/p104-accumulated-block-composition/vendor/accumulated/PRICING-EDITS.json new file mode 100644 index 0000000000..8b41f919da --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/accumulated/PRICING-EDITS.json @@ -0,0 +1,22 @@ +[ + [ + "KAPPA, TESTED = Q('.00312265044'), Q('.003122650445')", + "KAPPA, TESTED = Q('.00312336057'), Q('.003123360575')" + ], + [ + "PREVIOUS = Q('.00312192127')", + "PREVIOUS = Q('.00312265044')" + ], + [ + "sum(paid.values()) == 66906", + "sum(paid.values()) == 66870" + ], + [ + "previous_pr5774", + "previous_pr5786" + ], + [ + "'0.00312265044'", + "'0.00312336057'" + ] +] diff --git a/research/p104-accumulated-block-composition/vendor/accumulated/PROOF.md b/research/p104-accumulated-block-composition/vendor/accumulated/PROOF.md new file mode 100644 index 0000000000..d61b423844 --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/accumulated/PROOF.md @@ -0,0 +1,153 @@ +# Pending sums with one native conversion + +## Exact source + +The source is PR5786 at `6b936acd68a7e0f9062037900f0fe9bc4b6fdd25`. +Its complete 19-file export is retained. The source loader authenticates each +byte before import. PLAN.json binds the source word and each intermediate +word by canonical SHA256. Canonical JSON has sorted keys and compact separators. + +Every public input is arbitrary. The decoded endpoint is + +```text +T = I + sum e_(r+112) e_r^T, over the 104 live ports r. +``` + +All helper outputs are independent targets. Owned input columns are erased +by INIT and are zero at exit, under the retained owned-erasure assumption. +No public helper is treated as a free zero. + +## Accumulation identity + +Consider additions `d += q_i*s_i` between two reads of destination d. +There is no other write, SCALE, MOVE, INIT or CLEAR of d inside the chosen +interval. No operation reads d inside that interval. A fixed chart change +places d in frame B and each source s_i in frame A, where B is a strict +subspace of A. + +Initialize an owned buffer h to zero in A. Replace the selected additions +by `h += q_i*s_i`, in their original order and at their original times. +After the last addition, execute + +```text +MOVE h from A to B, as a paid owned native query +ADD d += h in B +CLEAR h in B +``` + +Before delivery, h has decoded value `sum q_i*s_i`, with each source read at +its actual time. The value of d can differ from its original intermediate +value, but no operation can observe that difference. All other decoded values +remain equal by induction. Delivery restores d's complete value before its +next read. Thus the changed block has the same arbitrary-input endpoint. + +The constructor checks this read barrier in the literal source. It does not +infer a barrier from a net matrix identity or a source label. Each scalar +operation uses its actual common frame. The native query has rank +`dim(A)-dim(B)` and preserves the decoded value. Its exact map and absolute +phase are checked by the retained Clifford compiler and a separate interpreter. + +## Three fixed blocks + +A chart node is a field interval between MOVE, INIT or CLEAR operations. +The fixed plan changes selected chart nodes. Main input and output frames +stay fixed. The source event indices below belong to the input of that step. + +| Step | Destination | Sum frame | Destination frame | Source additions | Query rank | +|---|---:|---:|---:|---|---:| +| 1 | 146 | 531 | 529 | 13104,13110 | 1 | +| 2 | 173 | 559 | 549 | 13478,13484 | 1 | +| 3 | 151 | 543 | 541 | 13290,13296 | 1 | + +Every sum frame has dimension 8; every destination frame has dimension 7. +The additions retain their source operands and coefficients. The three new +buffers have explicit INIT, their two ADDs, MOVE, delivery and CLEAR. +Changing the other chart nodes makes five source queries identities, so those +queries are removed. Every other public query remains forward and nested; +every other owned query remains reverse and nested. + +The final word has 770 public inputs and 28 owned labels. Its 30 owned lifetimes +have peak13 simultaneous live fields. All798 input columns are checked in a +forward replay and a separate dense transpose replay, for 636804 coefficients. +The local operation count stays below 26000, and all 798 labels fit the retained +1000-slot allowance. The source scalar-growth bound remains applicable. + +## Strict gain throughout the concave interval + +Write H_r=r^t, with 0 2^26*N^5 avoiding all fixed denominators and rank witnesses" + }, + "outer": { + "functional_checks": { + "actual_new_BIT_stock_sublinear": "348599999999253/350000000000000", + "fixed_halo_explicit_metadata_branch": "26950000000001/350000000000", + "new_BIT_row_stock_sublinear_in_active_group": "1395799999997009/1400000000000000", + "new_semantic_group_guard": "3/1400000000000" + }, + "margins": { + "boundary_algebraic_matrix": "6121786722795627295199/1960000000000000000000000", + "fused_gaussian": "6121786722786881885597/1960000000000000000000000", + "global_coordinate_router": "2186352401/700000000000", + "group_bit_router": "3060893362093440942797/980000000000000000000000", + "group_scans": "699999999999/700000000000", + "main_transform": "6121786721395627295199/1960000000000000000000000", + "microbox_face_corrections": "26950000000001/350000000000", + "polynomial_products": "1399999999999/1400000000000", + "sparse_union_movement": "802371786722795627295199/1960000000000000000000000" + }, + "parameters": { + "a": "2186352401/700000000000", + "b": "4372704803/1400000000000", + "beta": "1399999999997/1400000000000", + "bit_saving": "17/5000", + "cap_xi": "1782371786721395627295199/1960000000000000000000000", + "complex_uniform_saving": "1093176201/350000000000", + "d": "1/1400000000000", + "epsilon": "1399999999999/1400000000000", + "kappa": "312336057/100000000000", + "lambda_": "398750655771/400000000000", + "lambda_prime": "1395627295199/1400000000000", + "layout": "1/1400000000000", + "q": "4372704801/1400000000000", + "r0": "1/14000000000000", + "stop": "1/1400000000000", + "tested_saving": "124934423/40000000000" + }, + "strict_checks": { + "actual_bit_above_effective": "193647599/700000000000", + "actual_logarithmic_gamma_guard": "1/1400000000000", + "actual_logarithmic_group_guard": "177628213280704372704801/980000000000000000000000", + "alpha_logarithm_absorption": "1/14000000000000", + "boundary_algebraic_matrix_above_kappa": "5595627295199/1960000000000000000000000", + "cap_above_band": "802371786721395627295199/1960000000000000000000000", + "cap_below_cell": "177628213277204372704801/1960000000000000000000000", + "cap_below_phase_cell_power": "2137628213278604372704801/1960000000000000000000000", + "complex_above_effective": "1/1400000000000", + "complex_below_one_over_32": "39377295197/1400000000000", + "complex_endpoint": "1/700000000000", + "epsilon_below_one": "1/1400000000000", + "epsilon_positive": "1399999999999/1400000000000", + "fine_prime_halo_umbrella": "7/2", + "fused_gaussian_above_kappa": "5586881885597/1960000000000000000000000", + "gaussian_above_main": "695627295199/980000000000000000000000", + "global_coordinate_router_above_kappa": "1/350000000000", + "global_gamma_power_slack": "9/14000000000000", + "group_below_dimension": "1/700000000000", + "group_bit_router_above_kappa": "3493440942797/980000000000000000000000", + "group_gauge_power_slack": "177628213280634372704801/980000000000000000000000", + "group_key_fits_record": "1/700000000000", + "group_positive": "1399999999997/1400000000000", + "group_scans_above_kappa": "1744534119/1750000000", + "halo_covers_generic_inverse_radius": "5", + "improvement_over_user_baseline": "696195075400418148631/500000000000000000000000", + "lambda_above_internal": "1/2800000000000", + "lambda_above_sigma": "3/2800000000000", + "lambda_above_tau": "1/2800000000000", + "lambda_prime_above_lambda": "1/2800000000000", + "lambda_prime_above_leaf": "2795627295197/1960000000000000000000000", + "leaf_saving_above_effective": "1395627295197/1960000000000000000000000", + "main_transform_above_kappa": "4195627295199/1960000000000000000000000", + "membership_arithmetic_fits_record": "1/1400000000000", + "microbox_face_corrections_above_kappa": "53897813647603/700000000000", + "microbox_halo_volume": "110600000000003/1400000000000", + "new_complex_uniform_saving_above_b": "1/1400000000000", + "new_semantic_guard_with_C1_one": "1/1400000000000", + "polynomial_products_above_kappa": "1395627295201/1400000000000", + "positive_layout_slack": "1/1400000000000", + "q_below_effective": "1/1400000000000", + "q_below_internal": "1/1400000000000", + "q_below_leaf": "2795627295197/1960000000000000000000000", + "q_positive": "4372704801/1400000000000", + "short_record_fallback": "1395627295197/1400000000000", + "source_axis_superpolynomial": "1/1400000000000", + "sparse_union_movement_above_kappa": "796250000005595627295199/1960000000000000000000000", + "stop_below_one": "1399999999999/1400000000000", + "stop_positive": "1/1400000000000", + "strassen_integer_power_gap": "1951441519231", + "support_router_span": "3/1400000000000", + "theta_positive_polynomial_power": "2", + "union_header_fits_record": "3/1400000000000", + "union_tag_work_per_visit_fits_record": "3/1400000000000" + } + }, + "paid": { + "1": 41682, + "16": 416, + "2": 8208, + "24": 416, + "3": 8964, + "32": 416, + "4": 1764, + "40": 416, + "48": 416, + "5": 2862, + "56": 416, + "6": 162, + "64": 416, + "7": 108, + "72": 208 + }, + "paid_calls": 66870, + "previous_pr5786": "78066261/25000000000", + "productive_fields": 13444, + "query_shears": 15, + "rank_mass_surplus": 760, + "raw_ceiling": { + "derivative_upper": "-184049954355094452654275285861246729644813882312465970315962697/784637716923335095479473677900958302012794430558004314112", + "interval": [ + "0", + "17/5000" + ] + }, + "raw_headroom": [ + "2973/100000000000000", + "1487/50000000000000" + ], + "raw_root_interval": [ + "312336059973/100000000000000", + "156168029987/50000000000000" + ], + "relative_gain_percent": "591775/26022087", + "strictification": { + "alpha": { + "lower": "0.999999999974854134142554548546", + "upper": "0.999999999974854134142554548547" + }, + "cutoff": 16, + "delta": { + "lower": "0.953059573991605256712659621267", + "upper": "0.953059573991605256712659621268" + }, + "floor": 17, + "gamma": { + "lower": "0.975709550495475392633513517828", + "upper": "0.975709550495475392633513517829" + }, + "normalized_paid_upper": "1048576000976562501/1048576001073741824", + "power": 1024, + "reserve": "1/1000000000000", + "tail_block": 128, + "tail_decay": "125/128", + "tail_offset": "1/7", + "tested": "124934423/40000000000" + }, + "targets": { + "1": 432, + "145": 208, + "17": 416, + "2": 126, + "25": 416, + "3": 72, + "33": 416, + "4": 1890, + "41": 416, + "49": 416, + "5": 144, + "57": 416, + "65": 416, + "7": 162, + "73": 208, + "8": 360, + "9": 6930 + }, + "whole_idle_jobs": 3120 + }, + "concavity": { + "ascending_prefix_margins": [ + 1, + 2, + 1, + 0, + 1, + 2, + 1, + 0 + ], + "delta_paid": { + "1": -6, + "2": 4, + "6": 2, + "7": -2 + }, + "delta_targets": { + "1": -2, + "2": 2, + "7": 2, + "8": -2 + }, + "identity": "2*((2*H1-H2)+(2*H7-H6-H8))", + "negative_ranks": [ + 0, + 0, + 2, + 2, + 6, + 6, + 8, + 8 + ], + "positive_ranks": [ + 1, + 1, + 1, + 1, + 7, + 7, + 7, + 7 + ], + "scope": "Strict gain for every 0= 2, 'Ordered distinct update events') + need(all(type(index) is int and 0 <= index < len(source['program']) for index in uses), + 'Actual update indices') + spaces = [span(basis) for basis in word['frames']] + need(spaces[after] < spaces[before], 'Strict reverse accumulated query') + first, last = uses[0], uses[-1] + selected = set(uses) + for index in range(first, last+1): + event = source['program'][index] + op, destination = event[:2] + need(not (op in ('ADD', 'COPY') and event[2] == role), + 'Destination is not read before the sum is delivered') + if destination == role: + need(index in selected and op == 'ADD', 'Only the declared pending additions') + if index in selected: + need(op == 'ADD' and destination == role, 'Declared update destination') + need(frame(records[index][1]) == after + and frame(records[index][2]) == before, 'Actual sum and destination frames') + + slot = word['public']+word['owned_fields'] + program, removed = [], 0 + for index, (original, record) in enumerate(zip(source['program'], records)): + if index == first: + program.append(['INIT', slot, before]) + event = list(original) + op, destination = event[:2] + old, new, source_node = record + if op == 'MOVE': + a, b = frame(old), frame(new) + event[2:4] = [a, b] + if a == b: + event = None + removed += 1 + else: + need(spaces[b] < spaces[a] if event[4] else spaces[a] < spaces[b], + 'Every retained query is nested in its declared direction') + elif op == 'INIT': + event[2] = frame(new) + elif op == 'CLEAR': + event[2] = frame(old) + else: + event[-1] = frame(new) + if index in selected: + event[1], event[-1] = slot, before + if source_node is not None: + need(frame(source_node) == event[-1], 'Actual common scalar frame') + if event is not None: + program.append(event) + if index == last: + program.extend([ + ['MOVE', slot, before, after, True], + ['ADD', role, slot, '1', after], + ['CLEAR', slot, after], + ]) + + word['program'] = program + word['initial'] = [frame(node) for node in initial] + word['final'] = [frame(node) for node in final] + word['owned_fields'] += 1 + word['schema'] = 'p104-accumulated-native-updates/1' + main = set(word['live']) | {role+112 for role in word['live']} + need(all(word[side][role] == source[side][role] + for side in ('initial', 'final') for role in main), 'Fixed main endpoints') + return word, { + 'anchor': anchor, 'changed_nodes': sorted(changed), + 'accumulation': dict(group, owned_role=slot), + 'removed_queries': removed, + } diff --git a/research/p104-accumulated-block-composition/vendor/accumulated/inputs/pr5786-source.tar b/research/p104-accumulated-block-composition/vendor/accumulated/inputs/pr5786-source.tar new file mode 100644 index 0000000000..450c1490f3 Binary files /dev/null and b/research/p104-accumulated-block-composition/vendor/accumulated/inputs/pr5786-source.tar differ diff --git a/research/p104-accumulated-block-composition/vendor/accumulated/local.py b/research/p104-accumulated-block-composition/vendor/accumulated/local.py new file mode 100644 index 0000000000..02b424071b --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/accumulated/local.py @@ -0,0 +1,208 @@ +"""Check the complete P104 word with an independent helper inventory. + +Adapted from Ali Romman's PR5544/5545. David Arias supplied the word; +Cinna Davis supplied private reuse; Gareth Davidson supplied composition. +Prepared by Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as Q +from functools import lru_cache +from hashlib import sha256 +from pathlib import Path +import gzip +import importlib.util +import json +import sys + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] + +def need(ok, why): + if not ok: + raise ValueError(why) + +def read(path): + raw = path.read_bytes() + return json.loads(gzip.decompress(raw) if path.suffix == '.gz' else raw) + +def load(path, name): + spec = importlib.util.spec_from_file_location(name, path) + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + +def add(dst, src, q): + for k, v in tuple(src.items()): + value = dst.get(k, 0) + q*v + if value: + dst[k] = value + else: + dst.pop(k, None) + +def span(basis): + out = {0} + for v in basis: + need(type(v) is int and 0 < v < 512 and v not in out, 'Independent binary basis') + out |= {x ^ v for x in tuple(out)} + return frozenset(out) + +def replay(w): + public = w['public'] + owned = w.get('owned_fields', 8) + need(type(owned) is int and 8 <= owned <= 28, 'Owned inventory bound') + need(type(public) is int and 767 <= public <= 770, 'Public inventory bound') + need(len(w['initial']) == len(w['final']) == public, 'Public boundary size') + need(len(w['program']) < 26000, 'Fixed operation bound') + frames = [span(x) for x in w['frames']] + rows = [{r:Q(1)} for r in range(public+owned)] + current = list(w['initial']) + [None]*owned + paid, scalar, live_owned, peak = Counter(), 0, set(), 0 + lifetimes = 0 + for e in w['program']: + op, r = e[:2] + need(0 <= r < public+owned, 'Role index') + if op == 'MOVE': + _, r, a, b, private = e + need(current[r] == a and (r in live_owned) == private, 'Transport source and ownership') + need(frames[b] < frames[a] if private else frames[a] < frames[b], 'Nested chronological transport') + paid[abs(len(w['frames'][b])-len(w['frames'][a]))] += 1 + current[r] = b + elif op == 'INIT': + need(r >= public and r not in live_owned, 'Owned initialization') + live_owned.add(r) + lifetimes += 1 + peak = max(peak, len(live_owned)) + rows[r] = {} + current[r] = e[2] + scalar += 2 + elif op == 'CLEAR': + need(r in live_owned and current[r] == e[2], 'Owned erasure at declared frame') + rows[r] = {} + current[r] = None + live_owned.remove(r) + scalar += 2 + else: + q, f = Q(e[-2]), e[-1] + need(q and current[r] == f, 'Scalar destination and coefficient') + n, d = abs(q.numerator), q.denominator + need(d & (d-1) == 0, 'Dyadic scalar coefficient') + need(abs(q)+1 < 2**16, 'Fixed scalar growth bound') + if op == 'SCALE': + need(n & (n-1) == 0, 'Dyadic unit SCALE') + rows[r] = {k:q*x for k,x in rows[r].items()} + scalar += 2*(abs(n.bit_length()-d.bit_length()) + int(q < 0)) + else: + s = e[2] + need(s != r and 0 <= s < public+owned and current[s] == f, 'Common scalar chart') + if op == 'COPY': + need(r in live_owned and not rows[r], 'COPY into cleared owned field') + rows[r] = {k:q*x for k,x in rows[s].items()} + else: + need(op == 'ADD', 'Scalar opcode') + add(rows[r], rows[s], q) + scalar += 2*(3+n.bit_length()-1+n.bit_count()+d.bit_length()-1) + need(not live_owned and 0 < peak <= 13 and current[:public] == w['final'], 'All public and owned exits') + live = set(w['live']) + for r,row in enumerate(rows): + expected = {r:Q(1)} if r < public else {} + if r-112 in live: + expected[r-112] = Q(1) + need(row == expected, 'All public and owned rows') + main = live | {r+112 for r in live} + helpers = Counter(len(w['frames'][w['final'][r]])-len(w['frames'][w['initial'][r]]) for r in range(public) if r not in main) + need(len(live) == len(w['ports']) == 104 and len(main) == 208 and min(helpers) > 0, 'Independent productive inputs') + return {'paid':dict(paid), 'helpers':dict(helpers), 'public_inputs':public, 'owned_fields':owned, 'owned_lifetimes':lifetimes, + 'peak_owned_fields':peak, 'real_scalar_allowance':scalar, 'endpoint_coefficients':(public+owned)*(public+owned), + 'paid_rank_mass':sum(r*count for r,count in paid.items())} + +def reverse_columns(w): + """Check the transpose with dense dyadic rows and the reverse chronology.""" + public = w['public'] + n = public+w.get('owned_fields', 8) + rows = [[int(i == j) for j in range(n)] for i in range(n)] + exponents = [0]*n + for e in reversed(w['program']): + op,r = e[:2] + if op == 'MOVE': + continue + if op in ('INIT','CLEAR'): + rows[r] = [0]*n + exponents[r] = 0 + continue + q = Q(e[-2]) + qe = q.denominator.bit_length()-1 + if op == 'SCALE': + rows[r] = [q.numerator*x for x in rows[r]] + exponents[r] += qe + else: + s = e[2] + level = max(exponents[s], exponents[r]+qe) + a, b = 1 << (level-exponents[s]), q.numerator << (level-exponents[r]-qe) + rows[s] = [a*x+b*y for x,y in zip(rows[s],rows[r])] + exponents[s] = level + if op == 'COPY': + rows[r] = [0]*n + exponents[r] = 0 + r = s + while exponents[r] and not any(x & 1 for x in rows[r]): + rows[r] = [x//2 for x in rows[r]] + exponents[r] -= 1 + for r,row in enumerate(rows): + expected = [0]*n + if r < public: + expected[r] = 1 << exponents[r] + if r in w['live']: + expected[r+112] = 1 << exponents[r] + need(row == expected, 'Independent dense transpose columns') + return {'columns':n, 'coefficients':n*n, 'arithmetic':'Dense integer rows with binary denominators; reverse chronology'} + +def native(w): + n = w['public'] + C = load(ROOT/'research/p104-native-channel/vendor/clifford_exact.py', 'p104_productive_clifford') + V = load(ROOT/'research/p104-native-channel/vendor/native_verify.py', 'p104_productive_gaussian') + @lru_cache(None) + def chart(i): + return C.canonical_frame(9, tuple(w['frames'][i])) + recipes = {} + def check(a,b): + if (a,b) not in recipes: + recipe,_ = C.lower_child(chart(a).adjoint().then(chart(b))) + expected = V.adjoint(V.frame(w['frames'][a],9)) + V.frame(w['frames'][b],9) + V.equal(V.recipe(recipe),expected,'Native chart change and exact global phase') + need(recipe['rank'] == abs(len(w['frames'][a])-len(w['frames'][b])), 'Native boundary rank') + recipes[a,b] = recipe + return recipes[a,b] + for e in w['program']: + if e[0] == 'MOVE': + check(e[2],e[3]) + main = set(w['live']) | {r+112 for r in w['live']} + helper_profile = Counter() + for r in range(n): + if r not in main: + helper_profile[check(w['initial'][r],w['final'][r])['rank']] += 1 + adapters = [] + for r,q in zip(w['live'],w['ports']): + need(w['frames'][w['initial'][r]] == [q], 'Literal central port') + need(span(w['frames'][w['final'][r+112]]) == frozenset(x for x in range(512) if not (x&q).bit_count()%2), 'Literal output hyperplane') + tests = [ + (C.cgate(9,q,1).adjoint().then(chart(w['initial'][r])), V.adjoint((('C',q,1),))+V.frame(w['frames'][w['initial'][r]],9)), + (chart(w['final'][r+112]).adjoint().then(C.cgate(9,q,-1).then(C.fourier(9))), V.adjoint(V.frame(w['frames'][w['final'][r+112]],9))+(('C',q,-1),)+V.fourier(9))] + for actual,expected in tests: + recipe,_ = C.lower_child(actual) + need(recipe['rank'] == 0, 'Free intrinsic main adapter') + V.equal(V.recipe(recipe),expected,'Main endpoint phase') + adapters.append(recipe) + bad = json.loads(json.dumps(next(iter(recipes.values())))) + bad['left']['phase'] = (bad['left']['phase']+1)%4 + a,b = next(iter(recipes)) + try: + V.equal(V.recipe(bad),V.adjoint(V.frame(w['frames'][a],9))+V.frame(w['frames'][b],9),'Wrong phase control') + except ValueError: + pass + else: + raise ValueError('Wrong native phase accepted') + payload = [[a,b,recipes[a,b]] for a,b in sorted(recipes)] + adapters + return {'distinct_maps':len(recipes),'main_adapters':len(adapters),'helper_normalizers':2*sum(helper_profile.values()), + 'helpers':dict(helper_profile),'recipe_payload_sha256':sha256(json.dumps(payload,sort_keys=True,separators=(',',':')).encode()).hexdigest(), + 'wrong_phase_rejected':True, 'proof':'Every signed Pauli image and exact global phase; frame induction at every positive tensor width'} diff --git a/research/p104-accumulated-block-composition/vendor/accumulated/pricing.py b/research/p104-accumulated-block-composition/vendor/accumulated/pricing.py new file mode 100644 index 0000000000..56cf0e9e63 --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/accumulated/pricing.py @@ -0,0 +1,184 @@ +"""Complete mixed-target price, compiler and outer transfer. + +The interval and compiler bounds follow zxv and Cao Yifan. The productive +recursion is by Jacob Alan Sussman. The controller is by Cinna Davis. +Adapted from Ali Romman's PR5544/5545 for the two coupled contact changes. +Successor choices were prepared for thu-nmrc with OpenAI Codex assistance. +Helper-subspace targets were added by Ali Romman with OpenAI Codex assistance. +The source commuting-contact construction is by Pierre-Loic Doulcet (hexapode) in PR5565. +The source coupled-frame change is by Ali Romman with OpenAI Codex in PR5601. +Five fixed boundary relations are from Ali Romman's PR5602. +The shared and delayed relays are from flyingviper's PR5605 and PR5612. The preparation is from +Scratch-net's PR5606. Their costs and target debit are included. +Ali Romman's complete caller/price proof and all predecessor credit are retained. +The paid A2 change is from zxv PR5643. The three helper relations are from +Ali Romman PR5644. The four-gate change is by Ali Romman with Codex assistance. +The four interior basis changes are by Ali Romman with Codex assistance. +Paid intermediate meetings: Ali Romman with substantial OpenAI Codex assistance. +Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as Q +import local as L + +KAPPA, TESTED = Q('.00312336057'), Q('.003123360575') +PREVIOUS = Q('.00312265044') + + +def encode(x): + if isinstance(x,Q): + return str(x) + if isinstance(x,dict): + return {str(k):encode(v) for k,v in x.items()} + if isinstance(x,(list,tuple)): + return [encode(v) for v in x] + return x + + +def assemble(local, native, word, physical): + paid, targets = Counter(), Counter() + counts = Counter() + L.need(local['helpers'] == native['helpers'], 'Every productive helper has a native target') + for e in word['physical_events']: + counts[e[0]] += 1 + if e[0] == 'LOCAL': + L.need(e[3] is False, 'Every source invocation is forward') + paid.update(local['paid']) + targets.update(local['helpers']) + elif e[0] == 'QUERY_SHEAR': + paid[1] += 104 + elif e[0] == 'IDLE': + paid[8*len(e[2])] += 208 + main = Counter() + idle = Counter({8*len(e[2]):0 for e in word['physical_events'] if e[0] == 'IDLE'}) + for e in word['physical_events']: + if e[0] == 'IDLE': + idle[8*len(e[2])] += 208 + L.need(idle == physical['whole_idle_jobs'], 'Every whole idle has a native Gaussian and full rank') + for term in word['diagonal']: + main[1+8*sum(term[1:])] += 104 + L.need(main == physical['main_targets'], 'Every main target has its full native phase') + targets.update(main) + L.need(counts['LOCAL'] == 18 and counts['QUERY_SHEAR'] == counts['IDLE'] == 15, 'Complete call census') + # Recount by the two path lengths, without using emitted main diagonals. + second_t = Counter({r:18*n for r,n in local['helpers'].items()}) + second_p = Counter({r:18*n for r,n in local['paid'].items()}) + second_t[145] += 208 + second_p[1] += 15*104 + for length in (7,8): + for j in range(1,length+1): + second_t[1+8*(j+1)] += 208 + second_p[8*(j+1)] += 208 + L.need((targets,paid) == (second_t,second_p), 'Independent full invoice') + L.need(max(targets) == 145 and max(paid) == 72, 'Maximum recursive ranks') + L.need(sum(targets.values()) == 13444 and sum(paid.values()) == 66870, 'Complete field and call counts') + L.need(sum(r*n for r,n in targets.items())-sum(r*n for r,n in paid.items()) == 760, 'Complete rank surplus') + return targets,paid,counts + + +def run(local,native,word,physical): + T,P,counts = assemble(local,native,word,physical) + E = L.load(L.ROOT/'research/higher-moment-strictification/verify.py','p104_productive_intervals') + other = L.load(L.ROOT/'research/kappa-rebuild/architecture/mixed_target_probe.py','p104_productive_second_intervals') + def margin(k): + a,b = E.moment(T,1-k), E.moment(P,1-k) + return a[0]-b[1],a[1]-b[0] + lo,hi,grid = 0,10**12,10**14 + while hi-lo > 1: + m=(lo+hi)//2 + if margin(Q(m,grid))[0] > 0: + lo=m + else: + hi=m + lower,upper = Q(lo,grid),Q(hi,grid) + signed = Counter(T) + signed.subtract(P) + cap = Q('.0034') + derivative_upper = Q(0) + for rank, count in signed.items(): + logarithm = E.log_bounds(rank) + low = E.mul(E.power(rank, 1-cap), logarithm)[0] + high = rank*logarithm[1] + derivative_upper -= count*(low if count >= 0 else high) + L.need(derivative_upper < 0, 'Unique raw crossing below the retained BIT cap') + L.need(margin(lower)[0] > 0 and margin(upper)[1] < 0, 'Strict rational crossing enclosure') + L.need(PREVIOUS < KAPPA < TESTED < lower and margin(PREVIOUS)[0] > 0, 'Changed complete bill improves the source claim') + t,u,v,c,b = 1-TESTED,Q(1,7),1024,16,17 + target,paid = E.moment(T,t),E.moment(P,t) + tl,th = other.moment(T,TESTED) + pl,ph = other.moment(P,TESTED) + L.need(tl > ph and max(tl,target[0]) <= min(th,target[1]) and max(pl,paid[0]) <= min(ph,paid[1]), 'Two exact moment engines') + alpha = E.divide(paid,target) + gamma = E.divide(E.moment(P,t+u),E.mul(E.power(c,u),target)) + delta = E.divide((Q(sum(T.values())*b),)*2,E.mul(E.power(c,TESTED),target)) + reserve,decay = Q(1,10**12),Q(125,128) + L.need(alpha[1] < 1-reserve and gamma[1] < decay and delta[1] < decay, 'All three charged tail ratios') + L.need(decay**128 < Q(1,16), 'Both tail decay blocks') + normalized = 1/(1+v*reserve)+Q(4,2**32) + L.need(normalized < 1 and c**64 < b**63, 'Full completion, splitting and rounding charges') + theta,power = Q(63,64),1024 + eta = E.scale(E.power(145,-v*TESTED),t) + L.need(2*(c**v)**64 <= (145**v)**63 and eta[0] > theta**power, 'Shifted exits and complement capacity') + L.need(E.power(145,v*TESTED)[1] < 2**power, 'Compiler initial range') + gap = (TESTED-KAPPA)/7 + L.need(gap.numerator == 1, 'Exact compiler integer grid') + step = gap.denominator + def wins(j): + return (step*j+1)**power < 2**j + left,right=1,2 + while not wins(right): + left,right=right,2*right + while right-left > 1: + m=(left+right)//2 + if wins(m): + right=m + else: + left=m + H=step*right + L.need(H > 8*v and wins(right) and not wins(right-1), 'Finite uniform threshold with predecessor rejection') + local_routes = (sum(local['paid'].values())+native['helper_normalizers']+native['main_adapters']+4*104+4*local['owned_lifetimes'])*1000 + L.need(local['real_scalar_allowance']+local_routes < 10**7, 'Every local scalar, route and owned operation is funded') + boundary = sum(len(word['boundaries'][side+'_program']) for side in ('left','right')) + raw = 18*10**7 + 15*1664 + 32*104*(len(word['physical_events'])+boundary) + raw += 32*104*(26+1000) + L.need(raw < 10**9, 'Complete nonrecursive raw bound') + bit = L.read(L.ROOT/'research/query-thinned-controllers/RESULT.json')['ordinary_BIT'] + atom = Q(bit['atom']) + ordinary=(1-atom)*Q(bit['after_cover'])+atom*Q('.0000384599') + admitted=Q(bit['admitted']) + L.need(atom > ordinary > admitted > TESTED and atom < 1-ordinary, 'Retained BIT admission and stock') + outer_module=L.load(L.ROOT/'research/pr4359-p7-padding/dependencies/compiler-refill/endpoint.py','p104_productive_outer') + params={'kappa':KAPPA,'tested_saving':TESTED,'complex_uniform_saving':KAPPA+6*gap, + 'b':KAPPA+5*gap,'a':KAPPA+4*gap,'q':KAPPA+3*gap,'bit_saving':admitted, + 'epsilon':1-gap,'beta':1-3*gap,'r0':gap/10,'stop':gap,'layout':gap,'d':gap} + outer=outer_module.ledger(params) + outer['functional_checks']['actual_new_BIT_stock_sublinear']=params['beta']*(1-atom) + L.need(len(outer['strict_checks']) == 54 and len(outer['functional_checks']) == 4, 'Complete outer predicate inventory') + L.need(all(x > 0 for key in ('strict_checks','functional_checks') for x in outer[key].values()), 'All outer inequalities strict') + wrong_cutoff = E.divide((Q(sum(T.values())*21),)*2,E.mul(E.power(20,TESTED),target)) + L.need(wrong_cutoff[0] > 1, 'Old cutoff fails with this helper inventory') + old_completion = E.divide((Q(sum(T.values())*18),)*2,E.mul(E.power(17,TESTED),target)) + L.need(old_completion[0] > Q(39,40), 'PR5718 completion-tail bound fails with the new target count') + old_offset = E.divide(E.moment(P,t+Q(1,5)),E.mul(E.power(16,Q(1,5)),target)) + L.need(old_offset[0] > decay, 'The old tail offset fails at the new cutoff') + bad=outer_module.ledger(dict(params,bit_saving=Q('.0027'))) + L.need(any(x <= 0 for x in bad['strict_checks'].values()), 'Insufficient BIT contract rejected') + return encode({'kappa':KAPPA,'kappa_decimal':'0.00312336057','previous_pr5786':PREVIOUS,'gain':KAPPA-PREVIOUS, + 'relative_gain_percent':100*(KAPPA/PREVIOUS-1),'raw_root_interval':[lower,upper], + 'raw_headroom':[lower-KAPPA,upper-KAPPA], + 'raw_ceiling':{'interval':[Q(0),cap],'derivative_upper':derivative_upper},'margin_at_previous':E.display(margin(PREVIOUS)), + 'targets':T,'paid':P,'productive_fields':sum(T.values()),'paid_calls':sum(P.values()), + 'rank_mass_surplus':760,'full_forward_calls':18,'query_shears':15,'whole_idle_jobs':3120, + 'strictification':{'tested':TESTED,'power':v,'cutoff':c,'floor':b,'tail_offset':u,'reserve':reserve,'tail_decay':decay,'tail_block':128, + 'alpha':E.display(alpha),'gamma':E.display(gamma),'delta':E.display(delta),'normalized_paid_upper':normalized}, + 'compiler':{'theta':theta,'logarithm_power':power,'eta':E.display(eta),'gap':gap,'H':H,'N':'2^'+str(H), + 'integer_test_exponent':right,'uniform_saving':params['complex_uniform_saving'],'word_materialized':False}, + 'nonrecursive':{'local_scalar':local['real_scalar_allowance'],'local_routes':local_routes, + 'raw_scalar_upper':raw,'raw_budget':10**9,'peak_owned_fields':local['peak_owned_fields'], + 'fixed_scalar_growth_bound':'At most 2^(16*26000) before native factors; a declared constant, not an attained norm.', + 'local_paid_rank_mass':local['paid_rank_mass'], + 'tensor_native_growth_bound':'Each rank-r Gaussian has row l1 norm at most 2^(rf); use local_paid_rank_mass for the whole word.'}, + 'ordinary_BIT':bit,'outer':outer, + 'negative_controls':{'source_completion':'Rejected at cutoff17, floor18 and decay39/40', + 'source_offset':'Rejected at cutoff16 with tail offset1/5', + 'old_cutoff':'Rejected by completion-tail ratio greater than one','old_BIT':'Rejected by outer inequalities'}}) diff --git a/research/p104-accumulated-block-composition/vendor/accumulated/sources.py b/research/p104-accumulated-block-composition/vendor/accumulated/sources.py new file mode 100644 index 0000000000..ec9637a0d9 --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/accumulated/sources.py @@ -0,0 +1,74 @@ +"""Authenticate the retained PR5786 export before any source import. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +PR5786 source interface: Ali Romman with substantial OpenAI Codex assistance. +Rebound to PR5786 by Ali Romman with substantial OpenAI Codex assistance. +The archive checks follow the repository exporter and flyingviper's PR5613. +""" +from contextlib import contextmanager +from hashlib import sha1, sha256 +from pathlib import Path, PurePosixPath +import importlib.util +import io +import json +import sys +import tarfile +import tempfile + +HERE = Path(__file__).resolve().parent + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +def load(path, name): + spec = importlib.util.spec_from_file_location(name, path) + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + + +@contextmanager +def sources(): + pins = json.loads((HERE/'SOURCES.json').read_bytes()) + for row in pins['direct_sources']: + payload = (HERE/row['local_path']).read_bytes() + need(sha256(payload).hexdigest() == row['sha256'], 'Exact direct source SHA256') + need(sha1(b'blob '+str(len(payload)).encode()+b'\0'+payload).hexdigest() == row['git_blob'], + 'Exact direct source Git blob') + pin = pins['source_export'] + raw = (HERE/pin['local_path']).read_bytes() + need(sha256(raw).hexdigest() == pin['sha256'], 'Exact predecessor archive SHA256') + need(sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest() == pin['git_blob'], + 'Exact retained archive Git blob') + with tempfile.TemporaryDirectory(prefix='p104-paid-main-source-') as directory: + root, names = Path(directory), set() + with tarfile.open(fileobj=io.BytesIO(raw), mode='r:') as bundle: + for member in bundle.getmembers(): + path = PurePosixPath(member.name) + need(member.isfile() and not path.is_absolute() and '..' not in path.parts + and '\\' not in member.name and ':' not in member.name, + 'Regular relative source path') + need(member.name not in names, 'Unique source path') + names.add(member.name) + target = root.joinpath(*path.parts) + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(bundle.extractfile(member).read()) + manifest = json.loads((root/'.research-export.json').read_bytes()) + need(manifest['commit'] == pin['commit'] and manifest['package'] == pin['package'] + and len(manifest['files']) == pin['files'], 'Exact source commit and inventory') + need(names == {'.research-export.json'} | {r['path'] for r in manifest['files']}, + 'No missing or additional source payload') + origins = {row['path']: row for row in pins['archived_files']} + for row in manifest['files']: + origin = origins[row['path']] + need(origin['pin'] == 'head:'+pin['commit']+':'+row['path'] + and origin['sha256'] == row['sha256'], + 'Export payload has an exact source pin') + payload = (root/row['path']).read_bytes() + need(len(payload) == row['size'] and sha256(payload).hexdigest() == row['sha256'], + 'Authenticated payload: '+row['path']) + yield root/pin['package'], root diff --git a/research/p104-accumulated-block-composition/vendor/accumulated/verify.py b/research/p104-accumulated-block-composition/vendor/accumulated/verify.py new file mode 100644 index 0000000000..18a1ab8f74 --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/accumulated/verify.py @@ -0,0 +1,241 @@ +"""Check accumulated updates and the complete conditional price. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +NOTICE retains all predecessor credit. +""" +import argparse +from collections import Counter +from contextlib import ExitStack +from copy import deepcopy +from fractions import Fraction as Q +from hashlib import sha256 +import gzip +import json +from pathlib import Path +import sys +import tempfile + +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +from sources import sources, load, need +import construct + + +def digest(word): + return sha256(json.dumps(word, sort_keys=True, separators=(',', ':')).encode()).hexdigest() + + +def declared_copy(source, target, edits): + text = source.read_text(encoding='utf-8') + for before, after in json.loads(edits.read_bytes()): + need(text.count(before) == 1, 'Unique declared source edit') + text = text.replace(before, after) + need(text == target.read_text(encoding='utf-8'), 'Only declared source edits: '+target.name) + + +def reject(action): + try: + action() + except ValueError as error: + return str(error) + raise ValueError('Invalid construction accepted') + + +def delta(before, after): + change = Counter(after) + change.subtract(before) + return {rank: count for rank, count in change.items() if count} + + +def concavity(before, after): + paid = delta(before['paid'], after['paid']) + targets = delta(before['helpers'], after['helpers']) + need(paid == {1: -6, 2: 4, 6: 2, 7: -2}, 'Exact local paid change') + need(targets == {1: -2, 2: 2, 7: 2, 8: -2}, 'Exact helper change') + signed = Counter(targets) + signed.subtract(paid) + signed = {r: c for r, c in signed.items() if c} + need(signed == {1: 4, 2: -2, 6: -2, 7: 4, 8: -2}, 'Two strict concavity gaps') + positive = [1, 1, 1, 1, 7, 7, 7, 7] + negative = [0, 0, 2, 2, 6, 6, 8, 8] + margins = [sum(positive[:j])-sum(negative[:j]) for j in range(1, 9)] + need(sum(positive) == sum(negative) == 32 and min(margins) >= 0 + and max(margins) > 0, 'Independent padded majorization check') + need(after['paid_rank_mass'] == before['paid_rank_mass'], 'Unchanged paid rank mass') + return {'delta_paid': paid, 'delta_targets': targets, 'signed_gain': signed, + 'positive_ranks': positive, 'negative_ranks': negative, + 'ascending_prefix_margins': margins, + 'identity': '2*((2*H1-H2)+(2*H7-H6-H8))', + 'scope': 'Strict gain for every 0 2^26*N^5 avoiding all fixed denominators and rank witnesses" + }, + "outer": { + "functional_checks": { + "actual_new_BIT_stock_sublinear": "348599999999253/350000000000000", + "fixed_halo_explicit_metadata_branch": "26950000000001/350000000000", + "new_BIT_row_stock_sublinear_in_active_group": "1395799999997009/1400000000000000", + "new_semantic_group_guard": "3/1400000000000" + }, + "margins": { + "boundary_algebraic_matrix": "3060437919892413972914861/980000000000000000000000000", + "fused_gaussian": "3060437919888041918744583/980000000000000000000000000", + "global_coordinate_router": "2186027085639/700000000000000", + "group_bit_router": "3060437920588041918743083/980000000000000000000000000", + "group_scans": "699999999999/700000000000", + "main_transform": "3060437919192413972914861/980000000000000000000000000", + "microbox_face_corrections": "26950000000001/350000000000", + "polynomial_products": "1399999999999/1400000000000", + "sparse_union_movement": "401185437919892413972914861/980000000000000000000000000" + }, + "parameters": { + "a": "2186027085639/700000000000000", + "b": "2186027086139/700000000000000", + "beta": "1399999999997/1400000000000", + "bit_saving": "17/5000", + "cap_xi": "891185437919192413972914861/980000000000000000000000000", + "complex_uniform_saving": "2186027086639/700000000000000", + "d": "1/1400000000000", + "epsilon": "1399999999999/1400000000000", + "kappa": "312289583377/100000000000000", + "lambda_": "99687710416373/100000000000000", + "lambda_prime": "697813972914861/700000000000000", + "layout": "1/1400000000000", + "q": "2186027085139/700000000000000", + "r0": "1/14000000000000", + "stop": "1/1400000000000", + "tested_saving": "312289583877/100000000000000" + }, + "strict_checks": { + "actual_bit_above_effective": "193972914361/700000000000000", + "actual_logarithmic_gamma_guard": "1/1400000000000", + "actual_logarithmic_group_guard": "88814562081857586027085139/490000000000000000000000000", + "alpha_logarithm_absorption": "1/14000000000000", + "boundary_algebraic_matrix_above_kappa": "2797813972914861/980000000000000000000000000", + "cap_above_band": "401185437919192413972914861/980000000000000000000000000", + "cap_below_cell": "88814562080107586027085139/980000000000000000000000000", + "cap_below_phase_cell_power": "1068814562080807586027085139/980000000000000000000000000", + "complex_above_effective": "1/1400000000000", + "complex_below_one_over_32": "19688972913861/700000000000000", + "complex_endpoint": "1/700000000000", + "epsilon_below_one": "1/1400000000000", + "epsilon_positive": "1399999999999/1400000000000", + "fine_prime_halo_umbrella": "7/2", + "fused_gaussian_above_kappa": "2793441918744583/980000000000000000000000000", + "gaussian_above_main": "347813972914861/490000000000000000000000000", + "global_coordinate_router_above_kappa": "1/350000000000", + "global_gamma_power_slack": "9/14000000000000", + "group_below_dimension": "1/700000000000", + "group_bit_router_above_kappa": "3493441918743083/980000000000000000000000000", + "group_gauge_power_slack": "88814562081822586027085139/490000000000000000000000000", + "group_key_fits_record": "1/700000000000", + "group_positive": "1399999999997/1400000000000", + "group_scans_above_kappa": "697813972915361/700000000000000", + "halo_covers_generic_inverse_radius": "5", + "improvement_over_user_baseline": "695962707285418148631/500000000000000000000000", + "lambda_above_internal": "1/2800000000000", + "lambda_above_sigma": "3/2800000000000", + "lambda_above_tau": "1/2800000000000", + "lambda_prime_above_lambda": "1/2800000000000", + "lambda_prime_above_leaf": "1397813972913861/980000000000000000000000000", + "leaf_saving_above_effective": "697813972913861/980000000000000000000000000", + "main_transform_above_kappa": "2097813972914861/980000000000000000000000000", + "membership_arithmetic_fits_record": "1/1400000000000", + "microbox_face_corrections_above_kappa": "53897813972918361/700000000000000", + "microbox_halo_volume": "110600000000003/1400000000000", + "new_complex_uniform_saving_above_b": "1/1400000000000", + "new_semantic_guard_with_C1_one": "1/1400000000000", + "polynomial_products_above_kappa": "697813972915861/700000000000000", + "positive_layout_slack": "1/1400000000000", + "q_below_effective": "1/1400000000000", + "q_below_internal": "1/1400000000000", + "q_below_leaf": "1397813972913861/980000000000000000000000000", + "q_positive": "2186027085139/700000000000000", + "short_record_fallback": "697813972913861/700000000000000", + "source_axis_superpolynomial": "1/1400000000000", + "sparse_union_movement_above_kappa": "398125000002797813972914861/980000000000000000000000000", + "stop_below_one": "1399999999999/1400000000000", + "stop_positive": "1/1400000000000", + "strassen_integer_power_gap": "1951441519231", + "support_router_span": "3/1400000000000", + "theta_positive_polynomial_power": "2", + "union_header_fits_record": "3/1400000000000", + "union_tag_work_per_visit_fits_record": "3/1400000000000" + } + }, + "paid": { + "1": 41826, + "16": 416, + "2": 8136, + "24": 416, + "3": 8964, + "32": 416, + "4": 1800, + "40": 416, + "48": 416, + "5": 2826, + "56": 416, + "6": 126, + "64": 416, + "7": 144, + "72": 208 + }, + "paid_calls": 66942, + "previous_pr5786": "78066261/25000000000", + "productive_fields": 13444, + "query_shears": 15, + "rank_mass_surplus": 760, + "raw_ceiling": { + "derivative_upper": "-736326727887036550899906945108199168313980781105248689549538091/3138550867693340381917894711603833208051177722232017256448", + "interval": [ + "0", + "17/5000" + ] + }, + "raw_headroom": [ + "299/50000000000000", + "599/100000000000000" + ], + "raw_root_interval": [ + "12491583359/4000000000000", + "39036197997/12500000000000" + ], + "relative_gain_percent": "24539377/3122650440", + "strictification": { + "alpha": { + "lower": "0.999999999998999448926125827795", + "upper": "0.999999999998999448926125827796" + }, + "cutoff": 16, + "delta": { + "lower": "0.953058648967453908262482127906", + "upper": "0.953058648967453908262482127907" + }, + "floor": 17, + "gamma": { + "lower": "0.975674725092814328686215830022", + "upper": "0.975674725092814328686215830023" + }, + "normalized_paid_upper": "1048576000976562501/1048576001073741824", + "power": 1024, + "reserve": "1/1000000000000", + "tail_block": 128, + "tail_decay": "125/128", + "tail_offset": "1/7", + "tested": "312289583877/100000000000000" + }, + "targets": { + "1": 432, + "145": 208, + "17": 416, + "2": 90, + "25": 416, + "3": 72, + "33": 416, + "4": 1926, + "41": 416, + "49": 416, + "5": 180, + "57": 416, + "65": 416, + "7": 126, + "73": 208, + "8": 360, + "9": 6930 + }, + "whole_idle_jobs": 3120 + }, + "delta": { + "paid": { + "1": 2, + "4": 2, + "5": -2 + }, + "targets": { + "1": -2, + "4": 2, + "5": 2, + "8": -2 + } + }, + "fixed_contract_grid_optimum": { + "accepted_margin": [ + "10279605771440686187010491858134281322330850975616152400267/78463771692333509547947367790095830201279443055800431411200000000000", + "205592115428813723740209837162685626446671380434823015689987/1569275433846670190958947355801916604025588861116008628224000000000000" + ], + "cap": "17/5000", + "derivative_upper": "-368163363942239358572386384911715142113789598010819813436313769419973819361/1569275433846670190958947355801916604025588861116008628224000000000000", + "grid": "1/100000000000000", + "largest_published_grid": "312289583377/100000000000000", + "largest_tested_grid": "312289583877/100000000000000", + "next_tested_grid": "156144791939/50000000000000", + "rejected_margin": [ + "-358797203217612551430642127181895118833985159382146619381767/156927543384667019095894735580191660402558886111600862822400000000000", + "-7175944064352251028612842543637902376679594478077932452265351/3138550867693340381917894711603833208051177722232017256448000000000000" + ], + "reserve": "1/1000000000000", + "scope": "Maximum on the 1e-14 grid for this exact profile, fixed reserve and tested gap. Different compiler parameters, words and BIT caps remain outside this claim.", + "tested_gap": "1/200000000000" + }, + "instructions": 25975, + "limits": [ + "Five inherited framework assumptions remain.", + "Independent scientific acceptance is pending.", + "The large uniform word and rounded multiplier are not materialized.", + "The selected frontier is unchanged." + ], + "local": { + "endpoint_coefficients": 632025, + "helpers": { + "1": 24, + "2": 5, + "3": 4, + "4": 107, + "5": 10, + "7": 7, + "8": 20, + "9": 385 + }, + "owned_fields": 25, + "owned_lifetimes": 27, + "paid": { + "1": 2237, + "2": 452, + "3": 498, + "4": 100, + "5": 157, + "6": 7, + "7": 8 + }, + "paid_rank_mass": 5918, + "peak_owned_fields": 13, + "public_inputs": 770, + "real_scalar_allowance": 224990 + }, + "native": { + "distinct_maps": 2926, + "helper_normalizers": 1124, + "helpers": { + "1": 24, + "2": 5, + "3": 4, + "4": 107, + "5": 10, + "7": 7, + "8": 20, + "9": 385 + }, + "main_adapters": 208, + "proof": "Every signed Pauli image and exact global phase; frame induction at every positive tensor width", + "recipe_payload_sha256": "f36bcdfd8970dcde8eacc9a6a7e1044d3395085ddd6cf279d4cc99f2dc3fc878", + "wrong_phase_rejected": true + }, + "negative_controls": { + "missing_central_translation": "Rejected by the complete Laurent endpoint", + "omit_R22_input_endpoint": "Scalar destination and coefficient", + "omit_copy_clear": "All public and owned exits", + "omit_paid_R22_query": "Common scalar chart", + "omit_paid_copy_query": "Common scalar chart", + "omit_query_from_invoice": "Complete field and call counts", + "omit_second_block_input": "Scalar destination and coefficient", + "omit_second_block_output": "All public and owned exits", + "omit_second_block_query": "Scalar destination and coefficient", + "retain_obsolete_helper_credit": "Every productive helper has a native target", + "retain_old_R22_target": "All public and owned exits", + "wrong_copy_value": "All public and owned rows" + }, + "physical_caller": { + "central_square_columns": 53248, + "full_calls": 18, + "main_targets": { + "145": 208, + "17": 416, + "25": 416, + "33": 416, + "41": 416, + "49": 416, + "57": 416, + "65": 416, + "73": 208 + }, + "new_paid_jobs": 0, + "physical_contacts": 7488, + "ports": 104, + "route_payload_sha256": "7f4f0ca768ffbc4f93dcff575592c4c67411f46b4289e45b73f715a2ad47b142", + "tensor_rule": "Factorwise native maps; scalar signs stay outside the tensor power.", + "whole_idle_jobs": { + "16": 416, + "24": 416, + "32": 416, + "40": 416, + "48": 416, + "56": 416, + "64": 416, + "72": 208 + }, + "wrapper_sites": [ + 1, + 3, + 5, + 7, + 9, + 11, + 13, + 15, + 17, + 19, + 21, + 23, + 25, + 27, + 29, + 31 + ] + }, + "separate_columns": { + "arithmetic": "Dense integer rows with binary denominators; reverse chronology", + "coefficients": 632025, + "columns": 795 + }, + "source_commit": "6b936acd68a7e0f9062037900f0fe9bc4b6fdd25", + "source_local": { + "endpoint_coefficients": 632025, + "helpers": { + "1": 26, + "2": 5, + "3": 4, + "4": 105, + "5": 8, + "7": 7, + "8": 22, + "9": 385 + }, + "owned_fields": 25, + "owned_lifetimes": 27, + "paid": { + "1": 2235, + "2": 452, + "3": 498, + "4": 98, + "5": 159, + "6": 7, + "7": 8 + }, + "paid_rank_mass": 5918, + "peak_owned_fields": 13, + "public_inputs": 770, + "real_scalar_allowance": 224990 + }, + "status": "PASS_P104_COMPOSED_BLOCKS_KAPPA_00312289583377" +} diff --git a/research/p104-accumulated-block-composition/vendor/blocks/compatibility.py b/research/p104-accumulated-block-composition/vendor/blocks/compatibility.py new file mode 100644 index 0000000000..7ddb372017 --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/blocks/compatibility.py @@ -0,0 +1,86 @@ +"""Check every R22 scalar transfer and preservation of retained copy values. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +The R22 edit list and retained-copy construction keep their original credit. +""" +import argparse +from copy import deepcopy +from fractions import Fraction as Q +import gzip +import json +from pathlib import Path +import sys +import tempfile + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +sys.dont_write_bytecode = True +from sources import sources, need +from construct import construct, digest + + +def matrix(events, fields): + rows = {r: [Q(x == r) for x in fields] for r in fields} + for event in events: + if event[0] == 'ADD': + _, dst, src, value, frame = event + rows[dst] = [x+Q(value)*y for x, y in zip(rows[dst], rows[src])] + elif event[0] == 'SCALE': + _, dst, value, frame = event + rows[dst] = [Q(value)*x for x in rows[dst]] + else: + need(event[0] == 'MOVE', 'No COPY or lifetime boundary inside an edit') + return [[str(x) for x in rows[r]] for r in fields] + + +def run(): + with sources() as (parent, root): + source = json.loads(gzip.decompress((parent/'WORD.json.gz').read_bytes())) + word, spots = construct(source) + retained = json.loads(gzip.decompress((HERE/'WORD.json.gz').read_bytes())) + need(word == retained, 'Exact composed word') + need(spots == json.loads((HERE/'HUNKS.json').read_bytes()), 'Exact literal edit positions') + edits = json.loads((HERE/'source/R22-EDITS.json').read_bytes()) + witnesses = [] + for i, (old, new) in enumerate(edits['program']): + fields = sorted({r for e in old+new if e[0] in ('ADD', 'SCALE') + for r in (e[1:3] if e[0] == 'ADD' else [e[1]])}) + a, b = matrix(old, fields), matrix(new, fields) + need(a == b, 'Same exact scalar transfer for source edit '+str(i)) + witnesses.append(dict(edit=i, fields=fields, matrix=a)) + bad = deepcopy(edits['program'][0][1]) + first = next(e for e in bad if e[0] == 'ADD') + first[3] = str(Q(first[3])+1) + need(matrix(bad, witnesses[0]['fields']) != witnesses[0]['matrix'], + 'Reject one wrong scalar coefficient in the first edit') + old_events = [e for e in source['program'] if e[0] in ('INIT', 'COPY', 'CLEAR')] + new_events = [e for e in word['program'] if e[0] in ('INIT', 'COPY', 'CLEAR')] + need(old_events == new_events, 'Every copied source and lifetime event remains in order') + copies = [e for e in old_events if e[0] == 'COPY' and source['public']+9 <= e[1] < source['public']+22] + need(len(copies) == 13, 'All thirteen retained native copies') + return dict(status='PASS_R22_SCALAR_TRANSFERS_AND_ALL_13_COPY_VALUES', + word_sha256=digest(word), edits=witnesses, retained_copies=copies, + all_copy_events=[e for e in old_events if e[0] == 'COPY'], + second_block_scalar_transfer_sha256=spots['second_block']['scalar_transfer_sha256'], + second_block_contacts=len(spots['second_block']['changed_scalar_source_indices']), + proof='Disjoint equal R22 scalar transfers and no internal COPY preserve all external COPY values. The second block changes only scalar frames and preserves every scalar coefficient and order. Native frames and phases are checked by the complete verifier.', + wrong_scalar_coefficient_rejected=True) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--write', action='store_true') + args = parser.parse_args() + with tempfile.TemporaryDirectory(prefix='copy-block-compatibility-') as cache: + sys.pycache_prefix = cache + result = run() + path = HERE/'COMPATIBILITY.json' + if args.write: + path.write_text(json.dumps(result, sort_keys=True, indent=2)+'\n') + else: + need(json.loads(path.read_bytes()) == result, 'Exact compatibility certificate') + print(result['status']) + + +if __name__ == '__main__': + main() diff --git a/research/p104-accumulated-block-composition/vendor/blocks/construct.py b/research/p104-accumulated-block-composition/vendor/blocks/construct.py new file mode 100644 index 0000000000..bf2cc660ad --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/blocks/construct.py @@ -0,0 +1,49 @@ +"""Compose Joel Pulikkan's exact R22 block with the released native copies. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +The two source constructions retain their authorship and notices. +""" +from copy import deepcopy +from hashlib import sha256 +import json +from pathlib import Path +from sources import need + +HERE = Path(__file__).resolve().parent + + +def digest(value): + return sha256(json.dumps(value, sort_keys=True, separators=(',', ':')).encode()).hexdigest() + + +def construct(source): + edits = json.loads((HERE/'source/R22-EDITS.json').read_bytes()) + word = deepcopy(source) + need(len(word['frames']) == 1092 and len(edits['frames']) == 1, + 'Exact source chart inventories') + need(word['frames'][1090] == edits['frames'][0], 'Existing chart has the exact R22 basis') + for kind in ('initial', 'final'): + for label, (old, new) in edits[kind].items(): + need(word[kind][int(label)] == old and new == 1090, 'Exact helper endpoint join') + word[kind][int(label)] = new + program, spots = word['program'], [] + for index, (old, new) in enumerate(edits['program']): + hits = [i for i in range(len(program)-len(old)+1) if program[i:i+len(old)] == old] + need(len(hits) == 1, 'One exact R22 source run: '+str(index)) + spots.append((hits[0], old, new)) + spots.sort() + need(len(spots) == 8, 'All eight source edits') + for (i, old, _), (j, _, _) in zip(spots, spots[1:]): + need(i+len(old) <= j, 'Disjoint source runs') + for i, old, new in reversed(spots): + program[i:i+len(old)] = deepcopy(new) + preserve = lambda w: [e for e in w['program'] if e[0] in ('INIT', 'COPY', 'CLEAR')] + need(preserve(word) == preserve(source), 'Every owned lifetime and COPY event is retained in order') + need(word['owned_fields'] == source['owned_fields'] == 25, 'No extra owned label') + word['schema'] = 'p104-copy-block-composition/1' + witness = [dict(source_index=i, old_length=len(old), new_length=len(new), + old_sha256=digest(old), new_sha256=digest(new)) for i, old, new in spots] + from second_block import extend + word, second = extend(word) + need(preserve(word) == preserve(source), 'Both blocks retain every owned lifetime and COPY event') + return word, dict(R22=witness, second_block=second) diff --git a/research/p104-accumulated-block-composition/vendor/blocks/second_block.py b/research/p104-accumulated-block-composition/vendor/blocks/second_block.py new file mode 100644 index 0000000000..822bbd2cff --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/blocks/second_block.py @@ -0,0 +1,122 @@ +"""Bind the released second block while preserving unrelated native paths. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +The second block and Joel Pulikkan's R22 mechanism retain their source credit. +""" +from copy import deepcopy +from hashlib import sha256 +import gzip +import json +from pathlib import Path +from sources import need + +HERE = Path(__file__).resolve().parent + + +def encoded(value): + return json.dumps(value, separators=(',', ':')) + + +def extend(source): + plan = json.loads((HERE/'source/SECOND-PLAN.json').read_bytes()) + old = json.loads(gzip.decompress((HERE/'source/SECOND-OLD-WORD.json.gz').read_bytes())) + published = json.loads(gzip.decompress((HERE/'source/SECOND-WORD.json.gz').read_bytes())) + old_scalar = [e for e in old['program'] if e[0] != 'MOVE'] + published_scalar = [e for e in published['program'] if e[0] != 'MOVE'] + need([e[:-1] for e in old_scalar] == [e[:-1] for e in published_scalar], + 'The published block preserves all scalar coefficients and order') + need(published['frames'] == old['frames'] + [plan['basis']], 'Exact released block chart') + word = deepcopy(source) + need(plan['basis'] not in word['frames'], 'The second chart has no exact existing copy') + chart = len(word['frames']) + word['frames'].append(plan['basis']) + scalar = [(i, e) for i, e in enumerate(word['program']) if e[0] != 'MOVE'] + keys = [encoded(e) for _, e in scalar] + changed = [] + roles = set() + for run in plan['runs']: + block = old_scalar[run['first_scalar']:run['first_scalar']+run['length']] + need(sha256(encoded(block).encode()).hexdigest() == run['old_sha256'], 'Exact released scalar block') + block_keys = [encoded(e) for e in block] + hits = [i for i in range(len(keys)-len(block)+1) if keys[i:i+len(block)] == block_keys] + need(len(hits) == 1, 'One literal second-block scalar run') + for j in range(hits[0], hits[0]+len(block)): + i, event = scalar[j] + need(i not in changed and event[0] in ('ADD', 'SCALE') and event[-1] == plan['old_frame'], + 'Disjoint scalar operation on the declared old chart') + changed.append(i) + roles.update(event[1:3] if event[0] == 'ADD' else event[1:2]) + event[-1] = chart + need(len(changed) == 102 and sorted(roles) == plan['roles'], 'All and only released contacts') + for kind, role in [('initial', plan['initial_helper']), ('final', plan['final_helper'])]: + need(word[kind][role] == plan['old_frame'], 'Exact second-block helper endpoint') + word[kind][role] = chart + + # Change the last old native edge before a changed contact or final boundary. + # Earlier edges in a query chain retain their destination and their order. + following = {r: ('final', a, b) for r, (a, b) in enumerate(zip(source['final'], word['final']))} + destinations = {} + for i in reversed(range(len(source['program']))): + before, after = source['program'][i], word['program'][i] + op, role = before[:2] + if op == 'MOVE': + next_use = following.get(role) + if next_use and next_use[0] in ('scalar', 'final') and before[3] == next_use[1]: + destinations[i] = next_use[2] + following[role] = ('move', before[2], before[2]) + else: + operands = before[1:3] if op in ('ADD', 'COPY') else before[1:2] + for r in operands: + following[r] = ('barrier' if op == 'INIT' else 'scalar', before[-1], after[-1]) + current = word['initial'] + [None]*word['owned_fields'] + active, program, native_changes = set(), [], [] + + def move(role, frame, where): + need(current[role] is not None, 'Only a live field can move') + if current[role] != frame: + event = ['MOVE', role, current[role], frame, role in active] + program.append(event) + native_changes.append(dict(source_index=where, inserted=event)) + current[role] = frame + + for i, event in enumerate(word['program']): + op, role = event[:2] + if op == 'MOVE': + need(event[4] == (role in active), 'Original owned-query flag') + frame = destinations.get(i, event[3]) + replacement = ['MOVE', role, current[role], frame, role in active] + need(current[role] is not None, 'Original query has a live source') + if current[role] != frame: + program.append(replacement) + if replacement != event or current[role] == frame: + native_changes.append(dict(source_index=i, old=event, + replacement=None if current[role] == frame else replacement)) + current[role] = frame + elif op == 'INIT': + need(role not in active, 'New owned lifetime') + active.add(role) + current[role] = event[-1] + program.append(event) + else: + move(role, event[-1], i) + if op in ('ADD', 'COPY'): + move(event[2], event[-1], i) + program.append(event) + if op == 'CLEAR': + need(role in active, 'Owned lifetime closes') + active.remove(role) + current[role] = None + for role, frame in enumerate(word['final']): + move(role, frame, len(source['program'])) + need(not active, 'All owned lifetimes close') + word['program'] = program + unchanged = lambda w: [e for e in w['program'] if e[0] == 'MOVE' and e[1] not in roles] + need(unchanged(word) == unchanged(source), 'Every unrelated native query stays in order') + before = [e[:-1] for e in source['program'] if e[0] != 'MOVE'] + after = [e[:-1] for e in word['program'] if e[0] != 'MOVE'] + need(before == after, 'Every scalar coefficient, order and copy value is unchanged') + word['schema'] = 'p104-copy-block-composition/2' + return word, dict(source_head='4b30391e633ba0c7c674f03586ae97d443e9bc9c', + changed_scalar_source_indices=changed, roles=sorted(roles), basis=plan['basis'], + new_frame=chart, native_changes=native_changes, + scalar_transfer_sha256=sha256(encoded(before).encode()).hexdigest()) diff --git a/research/p104-accumulated-block-composition/vendor/blocks/source/R22-EDITS.json b/research/p104-accumulated-block-composition/vendor/blocks/source/R22-EDITS.json new file mode 100644 index 0000000000..54f7b233d7 --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/blocks/source/R22-EDITS.json @@ -0,0 +1 @@ +{"frames":[[265,194,164,75]],"initial":{"741":[477,1090]},"final":{"405":[477,1090]},"program":[[[["MOVE",42,476,477,false],["MOVE",41,475,477,false],["ADD",42,41,"1",477],["ADD",41,42,"-1",477],["ADD",42,41,"1",477],["SCALE",41,"-1",477],["SCALE",41,"-2",477],["MOVE",400,470,477,false],["ADD",400,41,"-1",477],["MOVE",401,472,477,false],["ADD",401,41,"-1",477],["SCALE",42,"-2",477],["MOVE",106,474,477,false],["ADD",106,42,"1/2",477],["MOVE",403,471,477,false],["ADD",403,42,"-1",477],["MOVE",405,469,477,false],["ADD",405,106,"1",477],["ADD",106,405,"-1",477],["ADD",405,106,"1",477],["SCALE",106,"-1",477],["ADD",41,405,"-2",477],["ADD",405,42,"-1",477],["ADD",405,403,"-1/2",477],["ADD",741,403,"1/2",477],["ADD",741,42,"1",477],["ADD",41,741,"2",477],["MOVE",410,473,477,false],["ADD",410,400,"1",477],["ADD",400,410,"-1",477],["ADD",410,400,"1",477],["SCALE",400,"-1",477],["SCALE",400,"-2",477],["ADD",403,401,"1",477],["ADD",401,403,"-1",477],["ADD",403,401,"1",477],["SCALE",401,"-1",477],["ADD",42,401,"1",477],["ADD",741,401,"1/2",477],["ADD",41,403,"1",477],["ADD",400,403,"1",477],["ADD",410,403,"-2",477],["ADD",410,741,"1",477],["ADD",741,410,"-1",477],["ADD",410,741,"1",477],["SCALE",741,"-1",477],["SCALE",741,"-1/2",477],["ADD",41,741,"-1",477],["ADD",400,741,"-1",477],["ADD",403,741,"-1",477],["ADD",42,410,"-1",477],["ADD",106,410,"-1",477],["ADD",401,410,"-1",477],["ADD",741,410,"1",477],["ADD",403,410,"1",477],["ADD",401,410,"-1",477],["SCALE",410,"2",477],["ADD",403,741,"1",477],["ADD",106,741,"1",477],["ADD",42,741,"-1",477],["ADD",410,741,"1",477],["ADD",741,410,"-1",477],["ADD",410,741,"1",477],["SCALE",741,"-1",477],["ADD",410,403,"-1/2",477],["ADD",741,403,"-1",477],["ADD",401,403,"1",477],["ADD",400,403,"1/2",477],["ADD",106,403,"-1/2",477],["ADD",42,403,"1/2",477],["ADD",41,403,"-1/2",477],["SCALE",403,"-1/2",477],["ADD",741,401,"1",477],["ADD",403,401,"1/2",477],["ADD",400,401,"-1/2",477],["ADD",106,401,"1/2",477],["ADD",42,401,"1/2",477],["ADD",41,401,"1/2",477],["SCALE",401,"-2",477],["ADD",106,400,"1",477],["ADD",42,400,"1",477],["ADD",41,400,"-1",477],["SCALE",400,"2",477],["ADD",401,400,"1",477],["ADD",400,401,"-1",477],["ADD",401,400,"1",477],["SCALE",400,"-1",477],["ADD",403,106,"1/2",477],["ADD",401,106,"-1",477],["ADD",41,106,"1",477],["SCALE",106,"-2",477],["ADD",403,42,"1/2",477],["ADD",401,42,"-1",477],["ADD",41,42,"1",477],["SCALE",42,"-2",477],["ADD",400,42,"1",477],["ADD",42,400,"-1",477],["ADD",400,42,"1",477],["SCALE",42,"-1",477],["ADD",403,41,"-1/2",477],["ADD",401,41,"1",477],["ADD",400,41,"1",477],["ADD",106,41,"1",477],["ADD",42,41,"1",477]],[["MOVE",42,476,1090,false],["MOVE",41,475,1090,false],["ADD",42,41,"1",1090],["ADD",41,42,"-1",1090],["ADD",42,41,"1",1090],["SCALE",41,"-1",1090],["SCALE",41,"-2",1090],["MOVE",400,470,1090,false],["ADD",400,41,"-1",1090],["MOVE",401,472,1090,false],["ADD",401,41,"-1",1090],["SCALE",42,"-2",1090],["MOVE",106,474,1090,false],["ADD",106,42,"1/2",1090],["MOVE",403,471,1090,false],["ADD",403,42,"-1",1090],["MOVE",405,469,1090,false],["ADD",405,106,"1",1090],["ADD",106,405,"-1",1090],["ADD",405,106,"1",1090],["SCALE",106,"-1",1090],["ADD",41,405,"-2",1090],["ADD",405,42,"-1",1090],["ADD",405,403,"-1/2",1090],["ADD",741,403,"1/2",1090],["ADD",741,42,"1",1090],["ADD",41,741,"2",1090],["MOVE",410,473,1090,false],["ADD",410,400,"1",1090],["ADD",400,410,"-1",1090],["ADD",410,400,"1",1090],["SCALE",400,"-1",1090],["SCALE",400,"-2",1090],["ADD",403,401,"1",1090],["ADD",401,403,"-1",1090],["ADD",403,401,"1",1090],["SCALE",401,"-1",1090],["ADD",42,401,"1",1090],["ADD",741,401,"1/2",1090],["ADD",41,403,"1",1090],["ADD",400,403,"1",1090],["ADD",410,403,"-2",1090],["ADD",410,741,"1",1090],["ADD",741,410,"-1",1090],["ADD",410,741,"1",1090],["SCALE",741,"-1",1090],["SCALE",741,"-1/2",1090],["ADD",41,741,"-1",1090],["ADD",400,741,"-1",1090],["ADD",403,741,"-1",1090],["ADD",42,410,"-1",1090],["ADD",106,410,"-1",1090],["ADD",401,410,"-1",1090],["ADD",741,410,"1",1090],["ADD",403,410,"1",1090],["ADD",401,410,"-1",1090],["SCALE",410,"2",1090],["ADD",403,741,"1",1090],["ADD",106,741,"1",1090],["ADD",42,741,"-1",1090],["ADD",410,741,"1",1090],["ADD",741,410,"-1",1090],["ADD",410,741,"1",1090],["SCALE",741,"-1",1090],["ADD",410,403,"-1/2",1090],["ADD",741,403,"-1",1090],["ADD",401,403,"1",1090],["ADD",400,403,"1/2",1090],["ADD",106,403,"-1/2",1090],["ADD",42,403,"1/2",1090],["ADD",41,403,"-1/2",1090],["SCALE",403,"-1/2",1090],["ADD",741,401,"1",1090],["ADD",403,401,"1/2",1090],["ADD",400,401,"-1/2",1090],["ADD",106,401,"1/2",1090],["ADD",42,401,"1/2",1090],["ADD",41,401,"1/2",1090],["SCALE",401,"-2",1090],["ADD",106,400,"1",1090],["ADD",42,400,"1",1090],["ADD",41,400,"-1",1090],["SCALE",400,"2",1090],["ADD",401,400,"1",1090],["ADD",400,401,"-1",1090],["ADD",401,400,"1",1090],["SCALE",400,"-1",1090],["ADD",41,106,"1",1090],["ADD",403,42,"1/2",1090],["MOVE",403,1090,127,false],["MOVE",106,1090,127,false],["ADD",403,106,"1/2",127],["ADD",401,42,"-1",1090],["MOVE",401,1090,127,false],["ADD",401,106,"-1",127],["SCALE",106,"-2",127],["ADD",41,42,"1",1090],["SCALE",42,"-2",1090],["ADD",400,42,"1",1090],["ADD",42,400,"-1",1090],["ADD",400,42,"1",1090],["MOVE",42,1090,127,false],["SCALE",42,"-1",127],["ADD",400,41,"1",1090],["MOVE",41,1090,127,false],["ADD",403,41,"-1/2",127],["ADD",401,41,"1",127],["ADD",106,41,"1",127],["ADD",42,41,"1",127]]],[[["MOVE",41,477,127,false]],[]],[[["MOVE",42,477,127,false]],[]],[[["MOVE",106,477,127,false]],[]],[[["ADD",240,65,"1",477]],[["ADD",240,65,"1",477],["MOVE",400,1090,477,false]]],[[["MOVE",401,477,127,false],["MOVE",410,477,127,false]],[["MOVE",410,1090,127,false]]],[[["MOVE",403,477,127,false]],[]],[[["MOVE",741,477,127,false]],[["MOVE",741,1090,127,false]]]]} \ No newline at end of file diff --git a/research/p104-accumulated-block-composition/vendor/blocks/source/SECOND-OLD-WORD.json.gz b/research/p104-accumulated-block-composition/vendor/blocks/source/SECOND-OLD-WORD.json.gz new file mode 100644 index 0000000000..156ff6d627 Binary files /dev/null and b/research/p104-accumulated-block-composition/vendor/blocks/source/SECOND-OLD-WORD.json.gz differ diff --git a/research/p104-accumulated-block-composition/vendor/blocks/source/SECOND-PLAN.json b/research/p104-accumulated-block-composition/vendor/blocks/source/SECOND-PLAN.json new file mode 100644 index 0000000000..47fa8c4053 --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/blocks/source/SECOND-PLAN.json @@ -0,0 +1,34 @@ +{ + "basis": [ + 11, + 21, + 38, + 448 + ], + "old_frame": 267, + "roles": [ + 57, + 81, + 92, + 224, + 225, + 227, + 229, + 234, + 742 + ], + "initial_helper": 742, + "final_helper": 225, + "runs": [ + { + "first_scalar": 9858, + "length": 90, + "old_sha256": "2c4d8332eed5d21830748b694d88a830f98f50773e7faddfb65b654800d0e296" + }, + { + "first_scalar": 11957, + "length": 12, + "old_sha256": "bcb7d071dbe4b830053892decd7c8b6aef5a26b06a06e010148882871cf07ee2" + } + ] +} diff --git a/research/p104-accumulated-block-composition/vendor/blocks/source/SECOND-PROOF.md b/research/p104-accumulated-block-composition/vendor/blocks/source/SECOND-PROOF.md new file mode 100644 index 0000000000..d8daa51f7d --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/blocks/source/SECOND-PROOF.md @@ -0,0 +1,91 @@ +# Proof and full cost + +## Exact local change + +Let C(F) be the retained native chart map for binary subspace F. A MOVE from F +to G implements `C(G) C(F)^-1`. The source checker factors each map into its +recursive calls and ordinary operations. It checks the signed Pauli action +and the exact global phase. The frame induction then applies at every positive +tensor width. A scalar instruction acts on registers in one common chart. +Changing that chart preserves its abstract scalar action. + +The constructor uses the two exact runs in PLAN.json. It keeps their scalar +instructions unchanged and assigns the rank-four chart. It rebuilds all MOVE +instructions from the complete scalar sequence. The only changed public +boundary charts belong to helpers 742 and 225. The source contract permits +these free helper endpoints and charges their resulting target transforms. +No main endpoint changes. No helper input is assumed to be zero. + +`verify.py` checks every scalar coefficient on all 767 public inputs and nine +owned coordinates. It separately checks every transpose column in reverse +chronological order. The native replay checks all maps and phases, every main +adapter and every helper normalizer. Thus this check includes the boundary +cost, not just the interior rank-four operations. + +The local paid profile is: + +```text +rank: 1 2 3 4 5 6 7 +count: 2221 454 492 94 173 6 15 +``` + +The local productive helper profile is: + +```text +rank: 1 2 4 5 7 8 9 +count: 23 5 93 8 6 36 388 +``` + +Compared with the frozen source, the paid delta is `H1+H4-H5` and the helper +delta is `-H1+H4+H5-H8`. Paid rank mass stays 5,987. The scalar allowance stays +224,138. There are eleven owned lifetimes and at most two live owned fields. + +## Physical caller and complete price + +The unchanged productive controller makes eighteen full local calls. It also +pays fifteen thin queries, each of cost `104 H1`, and fifteen whole idles. +The idle ranks are `8L`: two instances of each L from two through eight and +one instance of L=9. Each instance costs 208 such jobs. + +Its main productive targets are `208 H145` and the fifteen idles with rank +increased by one. The full target profile is this main profile plus eighteen +copies of the local helper profile. The full paid profile is eighteen copies +of the local paid profile plus all thin queries and all whole idles. +The physical replay checks each contact and each central-square column. +The full profiles appear literally in RESULT.json. They contain 13,390 targets +and 66,870 paid calls, with rank-mass surplus 760. + +For a saving k, set `t=1-k`. The raw condition compares the complete moments +`sum(T[r] r^t)` and `sum(P[r] r^t)`. Both exact rational interval engines give +a positive margin at the tested saving `0.003113259895`. They put the raw zero +in `(0.00311325991155, 0.00311325991156)`. The retained derivative bound is +negative throughout `[0,0.0034]`, which gives the fixed-profile ceiling. +The old complete source profile has a strictly negative upper margin at the +new claimed kappa. This proves a new profile gain, not extra decimal places +from the old profile. + +The completion proof uses cutoff 16, floor 17, tail offset 1/7, decay 125/128, +power 1024 and reserve 1e-12. It bounds the whole tail, productive stock and +normalized paid cost. The compiler checks all 54 strict inequalities and +four functional conditions. It includes ordinary scalar operations, +COPY/CLEAR, restoration, native adapters, thin queries, idles and routes. +The inherited BIT saving is 0.0034. The complex cost binds the resulting +conditional multiplication saving `0.00311325989`. + +`PRICING-EDITS.json` declares all edits to the archived PR #5751 pricing code: +the claim and tested value, previous claim, full paid-call count, result label +and attribution. The verifier requires those exact edits. It does not weaken +any mathematical price predicate. + +## Failure controls and limits + +The replay rejects an old helper entry, an old block chart, a missing native +MOVE, a wrong scalar coefficient, an unpaid query, an extra target credit, +a damaged source byte and a missing central translation. The native checker +also rejects the wrong global phase. Explicit exceptions preserve these checks +under Python `-O`. + +The finite receipts and inherited frame induction remain conditional on the +five framework assumptions listed in README.md. They do not materialize a +uniform word or rounded multiplier. These are author checks. Independent +review and any selected-frontier admission are separate obligations. diff --git a/research/p104-accumulated-block-composition/vendor/blocks/source/SECOND-WORD.json.gz b/research/p104-accumulated-block-composition/vendor/blocks/source/SECOND-WORD.json.gz new file mode 100644 index 0000000000..b2e351e1ab Binary files /dev/null and b/research/p104-accumulated-block-composition/vendor/blocks/source/SECOND-WORD.json.gz differ diff --git a/research/p104-accumulated-block-composition/vendor/blocks/verify.py b/research/p104-accumulated-block-composition/vendor/blocks/verify.py new file mode 100644 index 0000000000..c6ae871982 --- /dev/null +++ b/research/p104-accumulated-block-composition/vendor/blocks/verify.py @@ -0,0 +1,182 @@ +"""Replay the complete retained-copy and R22 composition. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +All source construction, native, caller and compiler credit remains in NOTICE. +""" +import argparse +from collections import Counter +from contextlib import ExitStack +from copy import deepcopy +from fractions import Fraction as Q +import gzip +import json +from pathlib import Path +import sys +import tempfile + +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +from sources import sources, load, need +from construct import construct, digest + + +def declared_price(parent): + text = (parent/'pricing.py').read_text() + for before, after in json.loads((HERE/'PRICING-EDITS.json').read_bytes()): + need(text.count(before) == 1, 'One declared price edit') + text = text.replace(before, after) + need(text == (HERE/'pricing.py').read_text(), 'Only declared price changes') + + +def reject(action): + try: + action() + except ValueError as error: + return str(error) + raise ValueError('Invalid composition accepted') + + +def delta(before, after): + values = Counter(after) + values.subtract(before) + return {r: n for r, n in values.items() if n} + + +def controls(source, word, L): + out = {} + bad = deepcopy(word) + bad['initial'][741] = source['initial'][741] + out['omit_R22_input_endpoint'] = reject(lambda: L.replay(bad)) + bad = deepcopy(word) + bad['final'][405] = source['final'][405] + out['retain_old_R22_target'] = reject(lambda: L.replay(bad)) + move = next(i for i, e in enumerate(word['program']) + if e[0] == 'MOVE' and e[1] == 41 and e[3] == 1090) + bad = deepcopy(word) + del bad['program'][move] + out['omit_paid_R22_query'] = reject(lambda: L.replay(bad)) + first_cache = word['public'] + 9 + move = next(i for i, e in enumerate(word['program']) if e[0] == 'MOVE' and e[1] >= first_cache) + copy = next(i for i, e in enumerate(word['program']) if e[0] == 'COPY' and e[1] >= first_cache) + clear = next(i for i, e in enumerate(word['program']) if e[0] == 'CLEAR' and e[1] >= first_cache) + bad = deepcopy(word) + del bad['program'][move] + out['omit_paid_copy_query'] = reject(lambda: L.replay(bad)) + bad = deepcopy(word) + bad['program'][copy][-2] = '2' + out['wrong_copy_value'] = reject(lambda: L.replay(bad)) + bad = deepcopy(word) + del bad['program'][clear] + out['omit_copy_clear'] = reject(lambda: L.replay(bad)) + bad = deepcopy(word) + bad['initial'][742] = source['initial'][742] + out['omit_second_block_input'] = reject(lambda: L.replay(bad)) + bad = deepcopy(word) + bad['final'][225] = source['final'][225] + out['omit_second_block_output'] = reject(lambda: L.replay(bad)) + bad = deepcopy(word) + move = next(i for i, e in enumerate(bad['program']) if e[0] == 'MOVE' and e[3] == 1092) + del bad['program'][move] + out['omit_second_block_query'] = reject(lambda: L.replay(bad)) + return out + + +def fixed_grid(price, L): + E = L.load(L.ROOT/'research/higher-moment-strictification/verify.py', 'composed_grid_intervals') + targets = {int(k): v for k, v in price['targets'].items()} + paid = {int(k): v for k, v in price['paid'].items()} + reserve, step, gap, cap = Q(1, 10**12), Q(1, 10**14), Q(5, 10**12), Q('.0034') + claim, tested = Q(price['kappa']), Q(price['strictification']['tested']) + need((tested/step).denominator == 1 and tested-claim == gap, 'Fixed published/tested grid') + def margin(c): + t, p = E.moment(targets, 1-c), E.moment(paid, 1-c) + return ((1-reserve)*t[0]-p[1], (1-reserve)*t[1]-p[0]) + positive, negative = margin(tested), margin(tested+step) + need(positive[0] > 0 and negative[1] < 0, 'The next tested grid point fails the fixed reserve') + derivative_upper = Q(0) + for rank in set(targets) | set(paid): + count = (1-reserve)*targets.get(rank, 0)-paid.get(rank, 0) + logarithm = E.log_bounds(rank) + low = E.mul(E.power(rank, 1-cap), logarithm)[0] + high = rank*logarithm[1] + derivative_upper -= count*(low if count >= 0 else high) + need(derivative_upper < 0, 'Fixed-reserve margin decreases on the entire retained BIT interval') + return dict(grid=step, tested_gap=gap, reserve=reserve, cap=cap, + largest_published_grid=claim, largest_tested_grid=tested, next_tested_grid=tested+step, + accepted_margin=positive, rejected_margin=negative, derivative_upper=derivative_upper, + scope='Maximum on the 1e-14 grid for this exact profile, fixed reserve and tested gap. Different compiler parameters, words and BIT caps remain outside this claim.') + + +def run(): + with ExitStack() as stack: + parent, _ = stack.enter_context(sources()) + cursor = parent + for depth in range(7): + cursor, root = stack.enter_context(load(cursor/'sources.py', 'copy_block_source_'+str(depth)).sources()) + declared_price(parent) + L = load(parent/'local.py', 'local') + L.ROOT = root + source, old = L.read(parent/'WORD.json.gz'), L.read(parent/'RESULT.json') + need(digest(source) == old['canonical_word_sha256'], 'Exact published retained-copy word') + baseline = L.replay(source) + need(json.loads(json.dumps(baseline)) == old['local'], 'Exact source local receipt') + word, witness = construct(source) + local = L.replay(word) + transpose = L.reverse_columns(word) + need((local['public_inputs'], local['owned_fields'], local['owned_lifetimes'], local['peak_owned_fields']) + == (770, 25, 27, 13), 'Complete arbitrary-input and storage inventory') + need(local['real_scalar_allowance'] == baseline['real_scalar_allowance'], 'No extra scalar allowance') + change = dict(paid=delta(baseline['paid'], local['paid']), targets=delta(baseline['helpers'], local['helpers'])) + need(change == {'paid': {1: 2, 4: 2, 5: -2}, 'targets': {1: -2, 4: 2, 5: 2, 8: -2}}, + 'Exact changed paid and target profiles') + negative = controls(source, word, L) + print('PASS composition, all795 scalar inputs, transpose and owned lifetimes', flush=True) + native = L.native(word) + C = load(root/'research/p104-productive-controller/caller.py', 'copy_block_caller') + caller = C.construct() + need(caller == L.read(root/'research/p104-productive-controller/CONTROLLER.json'), 'Exact source physical caller') + physical = C.physical(caller, word) + print('PASS every native phase and complete physical caller', flush=True) + P = load(HERE/'pricing.py', 'copy_block_price') + price = P.run(local, native, caller, physical) + grid = fixed_grid(price, L) + need(price['previous_pr5786'] == old['complete_cost']['kappa'], 'Exact predecessor claim') + negative.update(C.controls(caller)) + bad = deepcopy(local) + bad['paid'][1] -= 1 + negative['omit_query_from_invoice'] = reject(lambda: P.assemble(bad, native, caller, physical)) + bad = deepcopy(local) + bad['helpers'][8] += 1 + negative['retain_obsolete_helper_credit'] = reject(lambda: P.assemble(bad, native, caller, physical)) + result = dict(status='PASS_P104_COMPOSED_BLOCKS_KAPPA_00312289583377', + source_commit='6b936acd68a7e0f9062037900f0fe9bc4b6fdd25', + canonical_word_sha256=digest(word), instructions=len(word['program']), + source_local=baseline, local=local, delta=change, separate_columns=transpose, + native=native, physical_caller=physical, complete_cost=price, negative_controls=negative, + fixed_contract_grid_optimum=grid, + limits=['Five inherited framework assumptions remain.', 'Independent scientific acceptance is pending.', + 'The large uniform word and rounded multiplier are not materialized.', 'The selected frontier is unchanged.']) + return P.encode(result), witness, word + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--write', action='store_true') + args = parser.parse_args() + with tempfile.TemporaryDirectory(prefix='copy-block-bytecode-') as cache: + sys.pycache_prefix = cache + result, witness, word = run() + for name, value in (('RESULT.json', result), ('HUNKS.json', witness), ('WORD.json.gz', word)): + path = HERE/name + if args.write: + raw = (json.dumps(value, sort_keys=True, indent=2)+'\n').encode() + path.write_bytes(gzip.compress(raw, mtime=0) if name.endswith('.gz') else raw) + else: + raw = path.read_bytes() + need(json.loads(gzip.decompress(raw) if name.endswith('.gz') else raw) == value, 'Exact retained output: '+name) + print(result['status']) + + +if __name__ == '__main__': + main() diff --git a/research/p104-accumulated-block-composition/verify.py b/research/p104-accumulated-block-composition/verify.py new file mode 100644 index 0000000000..d362af2b1b --- /dev/null +++ b/research/p104-accumulated-block-composition/verify.py @@ -0,0 +1,246 @@ +"""Replay the exact accumulated-update/two-block composition and full price. + +Mason Hale with substantial OpenAI Codex assistance. Apache-2.0. +Ali Romman's source replayers, Joel Pulikkan's block edits, and the complete +native/controller/compiler lineage remain credited in NOTICE and vendor/. +""" +import argparse +from collections import Counter +from contextlib import ExitStack +from copy import deepcopy +from fractions import Fraction as Q +import gzip +import json +from pathlib import Path +import sys +import tempfile + +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +from sources import sources, load, need, authenticate +import construct + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(',', ':')) + + +def declared_copy(source, target, changes): + text = source.read_text(encoding='utf-8') + for before, after in json.loads(changes.read_bytes()): + need(text.count(before) == 1, 'One exact declared source adaptation') + text = text.replace(before, after) + need(text == target.read_text(encoding='utf-8'), 'Only declared source edits: '+target.name) + + +def reject(action): + try: + action() + except ValueError as error: + return str(error) + raise ValueError('Invalid composed construction accepted') + + +def difference(old, new): + result = Counter(new) + result.subtract(old) + return {r: c for r, c in result.items() if c} + + +def checker(path, name, constructor): + """Bind each unchanged checker to its explicitly named constructor.""" + previous = sys.modules.get('construct') + try: + sys.modules['construct'] = constructor + return load(path, name) + finally: + if previous is None: + sys.modules.pop('construct', None) + else: + sys.modules['construct'] = previous + + +def transfer_certificate(blocks, source, word, A): + B = checker(blocks/'compatibility.py', 'block_scalar_matrices', construct) + edits = json.loads((blocks/'source/R22-EDITS.json').read_bytes()) + matrices = [] + for i, (old, new) in enumerate(edits['program']): + roles = sorted({r for e in old+new if e[0] in ('ADD', 'SCALE') + for r in (e[1:3] if e[0] == 'ADD' else [e[1]])}) + left, right = B.matrix(old, roles), B.matrix(new, roles) + need(left == right, 'R22 scalar transfer '+str(i)) + matrices.append(dict(edit=i, roles=roles, matrix=left)) + mutation = deepcopy(edits['program'][0][1]) + next(e for e in mutation if e[0] == 'ADD')[3] = '123456' + need(B.matrix(mutation, matrices[0]['roles']) != matrices[0]['matrix'], + 'Wrong R22 coefficient changes the transfer') + owned = lambda w: [e for e in w['program'] if e[0] in ('INIT', 'COPY', 'CLEAR')] + need(owned(source) == owned(word), 'All 30 owned lifetimes and 23 COPY events preserved') + before, after = A.copy_values(source), A.copy_values(word) + need(before == after and len(after) == 23, 'All exact COPY values preserved') + return dict(R22_matrices=matrices, copied_values=after, + all_owned_events_sha256=construct.digest(owned(word)), + wrong_scalar_coefficient_rejected=True) + + +def block_gain(price, L): + """A range proof, distinct from searching the actual full-profile root.""" + E = L.load(L.ROOT/'research/higher-moment-strictification/verify.py', 'block_gain_intervals') + cap = Q('.0034') + derivative_upper = 20*E.log_bounds(5)[1] - 2*E.power(8, 1-cap)[0]*E.log_bounds(8)[0] + need(derivative_upper < 0, 'Block gain derivative strictly negative') + need(-4+4*5-2*8 == 0, 'Zero block gain at exponent one') + need(Q(0) < Q(price['kappa']) < cap, 'Actual exponent is in certified interval') + return dict(signed_gain_per_local={1: -4, 5: 4, 8: -2}, + derivative_upper=derivative_upper, exponent_interval=[1-cap, 1], + scope='Strict gain for 1-.0034 <= t < 1; not a claim for every 0