diff --git a/research/repeated-native-code-separation/MOMENTS.json b/research/repeated-native-code-separation/MOMENTS.json new file mode 100644 index 0000000000..0c8ed33fe2 --- /dev/null +++ b/research/repeated-native-code-separation/MOMENTS.json @@ -0,0 +1,75 @@ +{ + "schema_version": 1, + "prime": 65521, + "operator_scale": 56, + "address_bits": 17, + "input_owner": 0, + "input_address": 1, + "rows": [ + [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [1376, 128, 128, 128, 136, 136, 96, 0, 0, 0, 0, 0, 136, 128, 136, 136, 0, 0, 0, 0, 0, 0, 0, 0, 0, 216, 65513, 65513, 65513, 65513, 65513, 160, 128, 72, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 56, 56, 64, 48, 48, 32, 32, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 32, 32, 16, 16, 8, 8, 8, 0, 0, 0, 72, 40, 112, 65393, 128, 136, 136, 136, 0, 200, 176, 168, 176, 176, 256, 48, 65473, 32, 32, 32, 200, 200, 200, 224, 224, 0, 65489, 65489, 65489, 65489, 65489, 65489, 0, 0], + [10752, 1024, 1024, 1024, 1088, 1088, 768, 0, 0, 0, 0, 0, 1088, 1024, 1088, 1088, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1728, 65457, 65457, 65457, 65457, 65457, 1280, 1024, 576, 576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 576, 448, 448, 512, 384, 384, 256, 256, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 384, 256, 256, 128, 128, 64, 64, 64, 0, 0, 0, 576, 320, 896, 64497, 1024, 1088, 1088, 1088, 0, 1600, 1408, 1344, 1408, 1408, 2048, 384, 65137, 256, 256, 256, 1600, 1600, 1600, 1792, 1792, 0, 65265, 65265, 65265, 65265, 65265, 65265, 0, 0], + [10280, 6844, 65133, 7132, 572, 572, 54268, 37265, 20800, 49809, 48273, 48273, 14716, 59949, 58253, 58253, 55121, 11744, 11008, 11008, 52977, 52977, 17920, 17920, 18080, 58136, 11808, 4672, 8160, 60817, 60817, 4521, 33227, 27501, 27501, 128, 3232, 3232, 61489, 59185, 59185, 9184, 9184, 12384, 30656, 22432, 3328, 3328, 47949, 64158, 64158, 27757, 43934, 43934, 61039, 61039, 32143, 6144, 57553, 59281, 59281, 4864, 2336, 2336, 576, 576, 1568, 36126, 52751, 52751, 719, 719, 33088, 34464, 34464, 2688, 0, 0, 36429, 50543, 4203, 8806, 48331, 17722, 17722, 7132, 61329, 48555, 10987, 7467, 35243, 35243, 45643, 31183, 26786, 17519, 29167, 29167, 64828, 63260, 18059, 46827, 46827, 63409, 23249, 30001, 30001, 16049, 22545, 22545, 4000, 4000], + [4602, 21671, 16600, 28790, 28711, 28711, 12639, 12243, 65295, 34786, 27298, 27298, 43845, 6710, 1462, 1462, 17619, 38430, 43998, 43998, 15763, 15763, 53726, 53726, 6317, 60614, 2447, 128, 53120, 58210, 58210, 12807, 12213, 60779, 60779, 32753, 39936, 39936, 26289, 62754, 62754, 14735, 14735, 50959, 10492, 11757, 60480, 60480, 24856, 43488, 43488, 6699, 16115, 16115, 64684, 64684, 25840, 49152, 62114, 13681, 13681, 43968, 15360, 15360, 12288, 12288, 25664, 63140, 30508, 30508, 22117, 22117, 55563, 64139, 64139, 35456, 0, 0, 23177, 56157, 62092, 39917, 47078, 32113, 32113, 59205, 45474, 33333, 53467, 53708, 61640, 61640, 20228, 29394, 41616, 30373, 15555, 15555, 32347, 12763, 8761, 17348, 17348, 58865, 59336, 59031, 59031, 9736, 3735, 3735, 19392, 19392], + [61611, 13322, 8267, 6058, 61774, 61774, 40340, 11195, 24746, 29390, 35817, 35817, 1348, 34686, 23661, 23661, 29634, 13980, 27317, 27317, 59239, 59239, 26503, 26503, 27042, 34493, 26109, 31040, 57033, 60516, 60516, 14694, 30233, 131, 131, 4624, 38406, 38406, 17911, 48793, 48793, 10699, 10699, 11633, 21791, 58425, 9739, 9739, 57710, 29905, 29905, 10291, 40665, 40665, 21305, 21305, 42235, 15341, 3351, 59316, 59316, 22504, 28192, 28192, 43409, 43409, 49143, 36661, 4250, 4250, 8980, 8980, 57245, 19282, 19282, 49755, 41726, 14383, 60991, 57314, 26894, 56455, 16059, 37669, 37669, 43838, 4116, 16117, 61105, 26502, 17594, 17594, 9855, 178, 32302, 29802, 55578, 55578, 57222, 2764, 10629, 21192, 21192, 12934, 42775, 16988, 16988, 21773, 59437, 59437, 19798, 19798], + [39234, 3218, 56471, 21910, 5450, 5450, 35262, 5123, 56194, 34961, 16353, 16353, 62118, 17113, 26902, 26902, 33679, 24074, 26328, 26328, 53384, 53384, 10038, 10038, 59649, 61502, 2155, 55398, 18640, 59731, 59731, 11263, 5968, 21816, 21816, 41725, 65101, 65101, 23744, 54058, 54058, 18276, 18276, 5778, 6125, 33456, 25363, 25363, 15769, 59919, 59919, 41955, 36006, 36006, 62440, 62440, 59570, 54117, 1435, 42817, 42817, 25439, 32192, 32192, 7719, 7719, 23188, 63438, 52480, 52480, 8036, 8036, 16297, 31224, 31224, 38737, 58747, 25256, 16090, 15548, 52778, 58186, 45087, 24397, 24397, 25831, 44540, 1521, 36206, 21165, 22232, 22232, 39063, 50496, 50319, 42936, 25806, 25806, 5418, 59829, 30312, 16594, 16594, 62991, 58826, 28253, 28253, 54749, 52377, 52377, 58675, 58675], + [43763, 57324, 63467, 53913, 27896, 27896, 13605, 34488, 44230, 36328, 53239, 53239, 58543, 39655, 26942, 26942, 38568, 61095, 35863, 35863, 62142, 62142, 30234, 30234, 58294, 39621, 2206, 8653, 2611, 1693, 1693, 62176, 34619, 37981, 37981, 40491, 40619, 40619, 36070, 50363, 50363, 2870, 2870, 51712, 38823, 54592, 3118, 3118, 64514, 7610, 7610, 49067, 24020, 24020, 39108, 39108, 32432, 47810, 50609, 25036, 25036, 9366, 6484, 6484, 1127, 1127, 11325, 1761, 11677, 11677, 4847, 4847, 22986, 44051, 44051, 6735, 58668, 33189, 37608, 35759, 54425, 36942, 8222, 15413, 15413, 25857, 63203, 39727, 2365, 64921, 24100, 24100, 53212, 22428, 878, 51749, 33036, 33036, 31528, 25434, 37381, 7388, 7388, 33599, 21461, 37038, 37038, 48823, 10687, 10687, 42855, 42855], + [1964, 17843, 300, 10051, 39100, 39100, 5566, 52244, 62773, 8122, 35433, 35433, 61287, 27161, 38315, 38315, 59913, 17950, 22363, 22363, 2468, 2468, 2829, 2829, 52466, 61981, 11449, 42337, 18442, 32819, 32819, 56077, 48936, 52969, 52969, 27058, 52292, 52292, 2394, 20733, 20733, 47236, 47236, 61100, 21946, 44747, 24683, 24683, 6377, 32423, 32423, 40801, 32217, 32217, 29695, 29695, 35809, 21149, 37649, 43115, 43115, 64485, 33225, 33225, 36578, 36578, 37021, 5411, 30414, 30414, 7422, 7422, 9593, 31163, 31163, 42436, 45315, 9140, 42029, 17374, 14036, 6107, 65286, 54286, 54286, 63155, 23160, 61214, 64830, 47443, 14080, 14080, 41944, 36512, 28220, 62902, 31774, 31774, 62319, 3142, 37325, 22554, 22554, 8280, 37862, 20931, 20931, 13282, 19336, 19336, 50883, 50883], + [15043, 58314, 61284, 37370, 39585, 39585, 54627, 64278, 664, 26055, 5498, 5498, 3069, 28130, 17508, 17508, 54291, 53928, 18598, 18598, 62394, 62394, 27664, 27664, 64385, 29409, 10925, 24359, 7142, 7146, 7146, 5767, 19472, 48593, 48593, 63539, 48022, 48022, 5384, 20984, 20984, 53190, 53190, 18140, 54659, 50832, 28947, 28947, 43552, 46710, 46710, 53801, 4914, 4914, 64488, 64488, 3932, 32723, 45414, 49073, 49073, 1735, 9627, 9627, 23882, 23882, 11818, 44643, 61268, 61268, 60578, 60578, 45218, 32405, 32405, 56522, 62847, 49824, 24555, 24020, 35571, 40093, 7598, 32086, 32086, 35612, 4277, 8017, 2549, 29818, 39255, 39255, 45098, 47018, 52825, 41595, 14052, 14052, 63154, 8977, 42457, 29758, 29758, 32579, 50051, 11863, 11863, 38219, 17833, 17833, 63410, 63410], + [14649, 16030, 35226, 36963, 10285, 10285, 27029, 55381, 59942, 9205, 34845, 34845, 11346, 8038, 17181, 17181, 13096, 34227, 15985, 15985, 11711, 11711, 61236, 61236, 47849, 59525, 39945, 36719, 48817, 46248, 46248, 50187, 22318, 26328, 26328, 39631, 25641, 25641, 18993, 48508, 48508, 42957, 42957, 44199, 41259, 7908, 52128, 52128, 31552, 13319, 13319, 64281, 8672, 8672, 4714, 4714, 49473, 15277, 14045, 28283, 28283, 39593, 8070, 8070, 42548, 42548, 42989, 5664, 63572, 63572, 256, 256, 17419, 46523, 46523, 49481, 39503, 34052, 4838, 9993, 29874, 23074, 51116, 13350, 13350, 869, 25350, 23405, 31494, 19631, 7979, 7979, 61693, 16827, 52855, 43813, 52467, 52467, 61413, 47289, 60693, 5570, 5570, 26258, 22825, 36196, 36196, 34640, 25591, 25591, 51525, 51525], + [36108, 16524, 35421, 30870, 4338, 4338, 35742, 5415, 29615, 57630, 32391, 32391, 28788, 1749, 28099, 28099, 13122, 14139, 47461, 47461, 6061, 6061, 39162, 39162, 45929, 11422, 59940, 39152, 55301, 23929, 23929, 54208, 9947, 50307, 50307, 60285, 2147, 2147, 51370, 62629, 62629, 15767, 15767, 42138, 64435, 63075, 33590, 33590, 19179, 43169, 43169, 64476, 15122, 15122, 31176, 31176, 4424, 33265, 57537, 65184, 65184, 45027, 3963, 3963, 54434, 54434, 109, 3627, 37453, 37453, 2566, 2566, 25356, 39435, 39435, 21634, 13699, 39008, 32374, 57598, 34542, 53370, 659, 39360, 39360, 3958, 16397, 22640, 20098, 40454, 33581, 33581, 30850, 9112, 17025, 23971, 59000, 59000, 64205, 11232, 30397, 11330, 11330, 7001, 4195, 545, 545, 6143, 49335, 49335, 22830, 22830], + [54558, 11729, 55000, 2402, 8044, 8044, 52696, 2366, 20811, 5111, 62413, 62413, 35439, 62315, 39432, 39432, 25484, 53342, 49065, 49065, 53764, 53764, 57161, 57161, 15753, 24899, 41172, 9091, 15693, 33743, 33743, 13490, 30584, 1308, 1308, 54499, 14342, 14342, 52042, 62833, 62833, 47652, 47652, 14885, 61803, 137, 59768, 59768, 19005, 44282, 44282, 39831, 13929, 13929, 51749, 51749, 6197, 47384, 30337, 13471, 13471, 60916, 16401, 16401, 22317, 22317, 56834, 38502, 34892, 34892, 46135, 46135, 53524, 63613, 63613, 12925, 6018, 11344, 511, 42585, 62116, 64914, 15610, 40888, 40888, 41021, 24588, 63787, 52292, 17936, 18012, 18012, 19248, 3230, 14845, 18290, 61790, 61790, 27326, 38516, 15080, 49501, 49501, 63733, 60947, 46417, 46417, 2473, 50405, 50405, 18549, 18549], + [5214, 34081, 55947, 47019, 8822, 8822, 37774, 27159, 56153, 18567, 1793, 1793, 12403, 18892, 31076, 31076, 13630, 41539, 28157, 28157, 4646, 4646, 18277, 18277, 11041, 32361, 36953, 9289, 63237, 56568, 56568, 2786, 63837, 14569, 14569, 50118, 3460, 3460, 8398, 1410, 1410, 5960, 5960, 4628, 13739, 56700, 38723, 38723, 34602, 50449, 50449, 772, 64779, 64779, 9430, 9430, 45159, 23641, 3875, 60381, 60381, 55380, 63343, 63343, 48164, 48164, 19889, 26199, 26195, 26195, 54573, 54573, 57736, 50320, 50320, 63252, 9712, 7318, 8193, 38420, 4655, 62860, 8824, 53115, 53115, 51054, 12501, 13654, 22929, 16937, 31128, 31128, 64087, 37784, 56, 5438, 61578, 61578, 57469, 30802, 58227, 60667, 60667, 33472, 29787, 37663, 37663, 60746, 25652, 25652, 59877, 59877], + [14490, 47439, 24574, 28182, 51894, 51894, 6497, 62262, 38006, 33767, 7856, 7856, 20169, 16058, 57255, 57255, 54036, 13877, 39932, 39932, 43080, 43080, 11546, 11546, 50858, 3524, 31370, 58424, 42222, 13724, 13724, 46761, 25290, 32174, 32174, 29268, 61614, 61614, 27126, 21136, 21136, 40018, 40018, 1224, 24462, 54929, 32066, 32066, 57754, 22412, 22412, 4352, 50933, 50933, 60444, 60444, 35084, 4458, 11875, 31629, 31629, 45559, 39992, 39992, 36697, 36697, 42429, 61578, 5537, 5537, 52955, 52955, 6539, 11942, 11942, 11384, 64242, 14251, 54888, 19353, 22041, 27246, 54770, 52549, 52549, 41603, 42796, 45140, 63661, 1497, 51142, 51142, 48628, 51616, 19422, 56354, 63122, 63122, 33929, 3483, 30182, 16752, 16752, 26167, 46425, 37168, 37168, 18713, 49329, 49329, 63649, 63649], + [34202, 48961, 2142, 6685, 25146, 25146, 25010, 17221, 43302, 11982, 17022, 17022, 2591, 64049, 43558, 43558, 22425, 20336, 59251, 59251, 11880, 11880, 16889, 16889, 58817, 30254, 43031, 16304, 65393, 22370, 22370, 45763, 62645, 6380, 6380, 63013, 25708, 25708, 16933, 11438, 11438, 44391, 44391, 8506, 33052, 60260, 52865, 52865, 45648, 35019, 35019, 4275, 19668, 19668, 22415, 22415, 18125, 44233, 17597, 15965, 15965, 51735, 8677, 8677, 34038, 34038, 23992, 31123, 54410, 54410, 38784, 38784, 22827, 17074, 17074, 23587, 20764, 19132, 2803, 23234, 56018, 6724, 46171, 37685, 37685, 13496, 53529, 12167, 53986, 44500, 47470, 47470, 45106, 16632, 6908, 33049, 21108, 21108, 58023, 8209, 42958, 42069, 42069, 37455, 34084, 51224, 51224, 33467, 38985, 38985, 27107, 27107], + [52495, 22393, 28711, 62229, 36223, 36223, 23937, 56485, 22704, 43635, 17877, 17877, 38895, 5827, 29900, 29900, 24250, 41742, 4380, 4380, 61645, 61645, 61479, 61479, 43478, 16643, 32578, 12397, 3542, 11800, 11800, 49468, 49714, 6985, 6985, 5362, 31007, 31007, 41017, 40170, 40170, 49120, 49120, 575, 40191, 47581, 5156, 5156, 48450, 29339, 29339, 64688, 48338, 48338, 34354, 34354, 42187, 24434, 11264, 35512, 35512, 45425, 22283, 22283, 45461, 45461, 5268, 16008, 25449, 25449, 43752, 43752, 9444, 14837, 14837, 62327, 18782, 62919, 7772, 34668, 14532, 38325, 45254, 26910, 26910, 5782, 40832, 6384, 37934, 29965, 40526, 40526, 35728, 2051, 36337, 6497, 65105, 65105, 48557, 8740, 52588, 55303, 55303, 15036, 20388, 57871, 57871, 14049, 5106, 5106, 55205, 55205], + [54484, 28459, 16768, 14035, 8934, 8934, 8550, 28388, 41054, 45367, 46743, 46743, 20443, 10930, 16141, 16141, 34365, 1077, 39735, 39735, 5088, 5088, 34696, 34696, 52298, 36577, 55315, 6555, 20577, 14856, 14856, 13686, 45973, 23411, 23411, 37999, 56738, 56738, 20113, 13099, 13099, 25325, 25325, 8505, 12731, 13819, 9687, 9687, 57457, 20613, 20613, 57214, 61907, 61907, 65357, 65357, 372, 11583, 61798, 325, 325, 28288, 36058, 36058, 35545, 35545, 45770, 10124, 58459, 58459, 21186, 21186, 54726, 18069, 18069, 5152, 65490, 19910, 7328, 36521, 59915, 15167, 15074, 20038, 20038, 64262, 63989, 612, 60091, 45501, 34775, 34775, 16829, 26877, 49226, 7472, 10768, 10768, 27311, 12460, 40028, 1850, 1850, 47235, 31997, 15439, 15439, 44430, 59143, 59143, 61998, 61998], + [48714, 64749, 33302, 18762, 44192, 44192, 15995, 50957, 5117, 14805, 43395, 43395, 60733, 44000, 28444, 28444, 57461, 30850, 45795, 45795, 11896, 11896, 4112, 4112, 12830, 65054, 20655, 23851, 22519, 58370, 58370, 5395, 41005, 20725, 20725, 14048, 20238, 20238, 7909, 36664, 36664, 57033, 57033, 40241, 33757, 54118, 40390, 40390, 36595, 14431, 14431, 22539, 14939, 14939, 47121, 47121, 56448, 65206, 5232, 61265, 61265, 29619, 15654, 15654, 32133, 32133, 46592, 41765, 63069, 63069, 1098, 1098, 30349, 63217, 63217, 37720, 62896, 48474, 23935, 29157, 48286, 40061, 50614, 24359, 24359, 51308, 56005, 62417, 14867, 44011, 52717, 52717, 1381, 59511, 4147, 32750, 56796, 56796, 49456, 25954, 44919, 17809, 17809, 2015, 18926, 8302, 8302, 19254, 9541, 9541, 59040, 59040], + [65205, 18609, 18696, 34022, 59093, 59093, 20607, 52555, 10504, 53165, 32298, 32298, 54282, 4964, 37022, 37022, 903, 41317, 37190, 37190, 53908, 53908, 25638, 25638, 36464, 43399, 45441, 11551, 15428, 56853, 56853, 64850, 27398, 17358, 17358, 54295, 4257, 4257, 27142, 26194, 26194, 45987, 45987, 34663, 9335, 39282, 32861, 32861, 4347, 42728, 42728, 45874, 53021, 53021, 54318, 54318, 26530, 38966, 2009, 9090, 9090, 35055, 44022, 44022, 12258, 12258, 56665, 36924, 24809, 24809, 34397, 34397, 8331, 3237, 3237, 51597, 34228, 40757, 9412, 55830, 40451, 58659, 42539, 19829, 19829, 46853, 41379, 36004, 50175, 58432, 32727, 32727, 42062, 7197, 23134, 15052, 12997, 12997, 59932, 9899, 27581, 22166, 22166, 8459, 41561, 56985, 56985, 50151, 56427, 56427, 26667, 26667], + [15839, 10763, 33177, 57940, 48214, 48214, 9785, 29664, 10643, 14812, 28992, 28992, 46037, 44246, 41958, 41958, 47850, 53208, 28360, 28360, 3956, 3956, 40875, 40875, 18736, 3244, 658, 10666, 64781, 5850, 5850, 44096, 5545, 32976, 32976, 61354, 9763, 9763, 18410, 7706, 7706, 4666, 4666, 61923, 59251, 24597, 48354, 48354, 52607, 13491, 13491, 63333, 28774, 28774, 57594, 57594, 30671, 34432, 32948, 5593, 5593, 49521, 44822, 44822, 8689, 8689, 45846, 7848, 31044, 31044, 47353, 47353, 6863, 20028, 20028, 8223, 41222, 60793, 54915, 63583, 41321, 54219, 30149, 30585, 30585, 53088, 8402, 57839, 56994, 25572, 58766, 58766, 27330, 8517, 60523, 39152, 33989, 33989, 51638, 32399, 61835, 42625, 42625, 48048, 41651, 40357, 40357, 25990, 44034, 44034, 16171, 16171], + [27926, 24179, 44190, 35603, 58939, 58939, 52672, 55663, 16994, 27778, 37257, 37257, 17005, 38207, 25455, 25455, 43250, 19095, 25033, 25033, 59124, 59124, 42912, 42912, 24278, 21893, 39103, 5642, 7414, 6606, 6606, 53164, 18772, 22377, 22377, 5421, 7731, 7731, 48744, 11134, 11134, 62047, 62047, 63807, 61907, 2054, 35362, 35362, 57840, 31779, 31779, 44392, 12307, 12307, 46182, 46182, 31123, 16639, 58571, 25330, 25330, 56013, 35901, 35901, 36866, 36866, 26675, 51943, 56307, 56307, 65010, 65010, 7536, 33889, 33889, 32255, 60762, 40155, 3054, 48452, 41248, 177, 46712, 32254, 32254, 51690, 23025, 34419, 42126, 39703, 52689, 52689, 35102, 29455, 23993, 51475, 2661, 2661, 45367, 55488, 34828, 36864, 36864, 30492, 1574, 23584, 23584, 2105, 21107, 21107, 30659, 30659], + [56600, 20272, 59304, 51549, 19335, 19335, 34149, 63534, 25671, 47969, 41745, 41745, 51693, 13665, 33057, 33057, 22120, 11684, 56305, 56305, 22955, 22955, 33224, 33224, 36002, 28496, 16562, 7587, 28201, 51295, 51295, 6823, 39763, 51839, 51839, 3180, 24305, 24305, 35902, 27030, 27030, 53136, 53136, 26897, 23774, 24036, 31603, 31603, 43060, 50671, 50671, 17521, 26906, 26906, 21630, 21630, 11596, 1810, 48945, 36395, 36395, 34097, 58767, 58767, 28591, 28591, 11567, 6580, 53764, 53764, 34417, 34417, 4865, 55807, 55807, 1701, 64690, 27272, 24527, 30359, 23219, 15261, 43330, 61187, 61187, 23446, 56637, 56340, 46599, 13161, 6093, 6093, 5641, 39342, 57028, 19100, 31308, 31308, 18530, 46604, 55828, 56967, 56967, 46839, 19282, 397, 397, 50951, 57133, 57133, 56181, 56181], + [61177, 47267, 48816, 8339, 60137, 60137, 37171, 33383, 34366, 20333, 41636, 41636, 32076, 61365, 12876, 12876, 46872, 45320, 10962, 10962, 15952, 15952, 51673, 51673, 47135, 26097, 62939, 17710, 26860, 6156, 6156, 5417, 37127, 10935, 10935, 62340, 31660, 31660, 35166, 21306, 21306, 13836, 13836, 9802, 44129, 34391, 48655, 48655, 23445, 16452, 16452, 32592, 34108, 34108, 34313, 34313, 9230, 45372, 47138, 46326, 46326, 49673, 27455, 27455, 1809, 1809, 43652, 19485, 15898, 15898, 23147, 23147, 45464, 13753, 13753, 43509, 40484, 23393, 58879, 12598, 46107, 42580, 62140, 49161, 49161, 8468, 34490, 339, 810, 45702, 64151, 64151, 3222, 51007, 46745, 2875, 13729, 13729, 39107, 64200, 28256, 13604, 13604, 33282, 47760, 51465, 51465, 63724, 31982, 31982, 21221, 21221], + [24362, 40531, 58131, 61704, 15603, 15603, 63647, 57803, 939, 24694, 41406, 41406, 48946, 23946, 44107, 44107, 27512, 59338, 51696, 51696, 54343, 54343, 44743, 44743, 36936, 49246, 19016, 44598, 18613, 1045, 1045, 36265, 15877, 37788, 37788, 42797, 18576, 18576, 10158, 33735, 33735, 50800, 50800, 11993, 16150, 27671, 50756, 50756, 47496, 11233, 11233, 65494, 59725, 59725, 59946, 59946, 59554, 53756, 47850, 24104, 24104, 31589, 31550, 31550, 2004, 2004, 48664, 44995, 44620, 44620, 29479, 29479, 62557, 65213, 65213, 27417, 36038, 44831, 25754, 19562, 48911, 12633, 61485, 15897, 15897, 63233, 62730, 1406, 44547, 29530, 53269, 53269, 39788, 61094, 41693, 31588, 64333, 64333, 50090, 59538, 39432, 36625, 36625, 39631, 41978, 50203, 50203, 41917, 43425, 43425, 47171, 47171], + [65497, 53292, 44270, 18013, 60789, 60789, 45317, 36908, 35441, 2936, 59033, 59033, 34772, 11385, 62637, 62637, 36002, 11443, 49872, 49872, 33811, 33811, 5130, 5130, 20083, 54340, 11076, 14723, 8591, 1728, 1728, 56285, 25271, 24859, 24859, 25656, 17960, 17960, 60544, 34498, 34498, 31369, 31369, 33509, 42803, 3584, 29373, 29373, 8953, 40569, 40569, 11643, 19588, 19588, 10477, 10477, 54783, 12940, 3499, 55596, 55596, 28556, 58723, 58723, 53013, 53013, 58748, 4667, 17933, 17933, 45845, 45845, 62012, 19133, 19133, 58740, 55713, 6450, 60150, 17644, 31719, 14668, 4743, 29320, 29320, 19753, 28740, 9071, 64749, 8824, 13748, 13748, 33558, 45952, 13543, 30923, 39221, 39221, 25237, 8986, 33490, 62825, 62825, 12114, 36173, 46347, 46347, 65456, 50844, 50844, 1838, 1838], + [4650, 60272, 53508, 34527, 28446, 28446, 59348, 11554, 31144, 38094, 33322, 33322, 36564, 38631, 46890, 46890, 43843, 9430, 38949, 38949, 35544, 35544, 46689, 46689, 13772, 14685, 9528, 59557, 11256, 12693, 12693, 56864, 44826, 35941, 35941, 47162, 16527, 16527, 47971, 35084, 35084, 62639, 62639, 14659, 38198, 41537, 55276, 55276, 46107, 38065, 38065, 63759, 37972, 37972, 6729, 6729, 57303, 57243, 6211, 22572, 22572, 56013, 22535, 22535, 20763, 20763, 21048, 6486, 47343, 47343, 33759, 33759, 22252, 32474, 32474, 39962, 46346, 13114, 26469, 53731, 61983, 8609, 29117, 1692, 1692, 49657, 61864, 48480, 8065, 32800, 48786, 48786, 30800, 5536, 28646, 6671, 58373, 58373, 45687, 4980, 33142, 25732, 25732, 60565, 1838, 10690, 10690, 34553, 61158, 61158, 44256, 44256], + [1929, 24407, 7702, 63224, 35617, 35617, 50861, 53068, 1253, 22706, 61507, 61507, 57338, 25125, 59425, 59425, 18582, 7132, 58583, 58583, 21353, 21353, 52263, 52263, 65183, 9100, 44623, 61051, 40260, 39449, 39449, 65457, 38005, 6529, 6529, 45371, 57183, 57183, 33491, 54481, 54481, 18831, 18831, 3723, 31165, 53257, 16181, 16181, 17977, 34843, 34843, 28064, 789, 789, 21560, 21560, 9628, 14632, 52191, 51552, 51552, 41018, 62864, 62864, 28330, 28330, 53977, 17013, 20561, 20561, 41178, 41178, 10583, 58906, 58906, 53347, 50639, 21036, 2048, 49002, 23673, 62307, 45892, 11665, 11665, 43140, 9200, 1275, 53509, 7090, 40377, 40377, 11193, 669, 23275, 64330, 16504, 16504, 56549, 53892, 53852, 39927, 39927, 20305, 40273, 30858, 30858, 30435, 10253, 10253, 49798, 49798], + [22981, 26973, 55118, 35504, 45483, 45483, 41818, 33308, 13675, 11923, 11085, 11085, 35010, 25967, 3466, 3466, 11465, 60955, 23645, 23645, 25889, 25889, 28736, 28736, 38998, 32965, 54718, 3939, 12409, 48393, 48393, 60820, 10497, 42648, 42648, 27436, 44686, 44686, 32647, 47003, 47003, 57735, 57735, 57188, 52576, 64519, 15013, 15013, 13517, 28030, 28030, 12221, 40431, 40431, 35667, 35667, 7590, 8707, 62891, 8731, 8731, 32224, 52643, 52643, 35569, 35569, 32678, 3459, 36082, 36082, 65123, 65123, 46814, 45149, 45149, 60777, 25761, 19212, 13633, 38923, 32645, 13990, 34481, 51506, 51506, 56944, 61634, 29554, 34247, 26865, 7340, 7340, 57045, 37081, 24813, 22528, 57720, 57720, 45196, 45503, 9391, 60021, 60021, 65516, 43873, 64247, 64247, 5999, 27689, 27689, 63755, 63755], + [49985, 2197, 10926, 28440, 6768, 6768, 21369, 18541, 60550, 19387, 3435, 3435, 12152, 34086, 46286, 46286, 11865, 63818, 43054, 43054, 43072, 43072, 42307, 42307, 46961, 25974, 16283, 37676, 16211, 8118, 8118, 22396, 56508, 36660, 36660, 21263, 13876, 13876, 1222, 29618, 29618, 61015, 61015, 51492, 32605, 27667, 38632, 38632, 45599, 64079, 64079, 42275, 42243, 42243, 61258, 61258, 11508, 46340, 11758, 34476, 34476, 25753, 7434, 7434, 63282, 63282, 6477, 10194, 38984, 38984, 64344, 64344, 3702, 35914, 35914, 53964, 46900, 18829, 46818, 794, 16068, 2629, 63729, 19614, 19614, 6093, 18716, 46428, 16206, 12871, 23394, 23394, 56305, 21080, 363, 28108, 28277, 28277, 14058, 16573, 60193, 64353, 64353, 13445, 51549, 63285, 63285, 33782, 62129, 62129, 54544, 54544], + [59307, 31962, 63460, 16332, 61883, 61883, 18041, 44928, 12850, 52118, 39072, 39072, 35049, 4059, 37219, 37219, 6476, 12905, 57064, 57064, 24077, 24077, 54002, 54002, 35834, 17376, 20449, 26100, 2076, 19369, 19369, 28479, 16787, 61985, 61985, 13723, 49213, 49213, 41650, 25671, 25671, 64616, 64616, 30936, 27106, 27918, 34936, 34936, 22814, 23530, 23530, 24363, 14604, 14604, 55548, 55548, 23584, 43463, 30036, 9769, 9769, 48327, 2926, 2926, 26042, 26042, 27579, 62783, 10507, 10507, 1006, 1006, 55291, 53626, 53626, 62207, 7430, 50084, 34747, 21426, 23549, 33566, 63009, 62701, 62701, 4701, 46419, 15997, 2580, 36847, 54610, 54610, 28464, 18322, 31581, 52594, 19321, 19321, 53375, 61300, 18076, 12942, 12942, 63284, 42095, 53736, 53736, 49001, 35175, 35175, 4206, 4206], + [37572, 54317, 35768, 33960, 22757, 22757, 50633, 38473, 28759, 22141, 5212, 5212, 15901, 21179, 18822, 18822, 31242, 12691, 61298, 61298, 53777, 53777, 46081, 46081, 65245, 21645, 26683, 36859, 8264, 41949, 41949, 58024, 61403, 3335, 3335, 39831, 52451, 52451, 39759, 24417, 24417, 36666, 36666, 34261, 6829, 36584, 44576, 44576, 23380, 52406, 52406, 47665, 41249, 41249, 63786, 63786, 49185, 28457, 44745, 33642, 33642, 12764, 39675, 39675, 3195, 3195, 42485, 27240, 1488, 1488, 15117, 15117, 31537, 676, 676, 7319, 37217, 31149, 55176, 47690, 60147, 64804, 3965, 5229, 5229, 41505, 27526, 14774, 5446, 37342, 31317, 31317, 61350, 41867, 21679, 14358, 46935, 46935, 21596, 59260, 61510, 17230, 17230, 47002, 1687, 17676, 17676, 21799, 24939, 24939, 56616, 56616], + [42433, 59026, 11525, 23263, 45774, 45774, 19807, 60894, 62436, 22540, 38053, 38053, 39563, 50761, 55237, 55237, 53856, 39330, 30752, 30752, 57879, 57879, 8581, 8581, 39265, 25410, 28028, 55673, 720, 28256, 28256, 29505, 18178, 16142, 16142, 43566, 35827, 35827, 63449, 41228, 41228, 52425, 52425, 51985, 33660, 27729, 14695, 14695, 18747, 33910, 33910, 48255, 41779, 41779, 56774, 56774, 60583, 30591, 53098, 172, 172, 8237, 61507, 61507, 62926, 62926, 32946, 60500, 2927, 2927, 54592, 54592, 7509, 18845, 18845, 24477, 54792, 64519, 26173, 6751, 38671, 57349, 24797, 40048, 40048, 36718, 42198, 41276, 43825, 56305, 3480, 3480, 57114, 19028, 50845, 53941, 33157, 33157, 65480, 3604, 21875, 17547, 17547, 8187, 17204, 44793, 44793, 8926, 49191, 49191, 3647, 3647], + [31540, 23893, 8386, 6755, 60468, 60468, 9276, 48762, 4463, 29085, 17, 17, 43978, 10504, 16187, 16187, 58261, 2195, 43849, 43849, 21603, 21603, 5091, 5091, 56075, 29208, 59702, 41672, 33081, 48024, 48024, 62980, 37731, 18400, 18400, 44950, 61164, 61164, 50040, 55949, 55949, 31161, 31161, 43695, 45909, 951, 37869, 37869, 43966, 27120, 27120, 13054, 53928, 53928, 19534, 19534, 52856, 21976, 8017, 56213, 56213, 55847, 39519, 39519, 21768, 21768, 59903, 21089, 34962, 34962, 59342, 59342, 51846, 656, 656, 12471, 28966, 51045, 10073, 5442, 64898, 50678, 1509, 18533, 18533, 55214, 6998, 39255, 62016, 65242, 61628, 61628, 48653, 57445, 65445, 57619, 52815, 52815, 56746, 6000, 26833, 42124, 42124, 14190, 57475, 492, 492, 24742, 62861, 62861, 5797, 5797], + [10642, 10406, 56847, 48322, 18389, 18389, 58727, 23440, 1818, 57226, 25673, 25673, 48634, 59487, 24048, 24048, 18111, 23691, 12467, 12467, 2555, 2555, 13371, 13371, 55333, 25696, 40666, 64315, 8629, 39183, 39183, 64017, 38430, 41632, 41632, 16120, 36026, 36026, 63742, 25633, 25633, 58447, 58447, 57399, 23991, 4060, 28638, 28638, 33183, 31079, 31079, 58790, 54960, 54960, 32570, 32570, 9337, 7172, 40215, 54683, 54683, 11387, 31383, 31383, 38886, 38886, 15870, 50369, 30079, 30079, 15196, 15196, 32580, 2411, 2411, 53912, 4820, 51938, 301, 34187, 44372, 15096, 12811, 58028, 58028, 26444, 24743, 3008, 32050, 49917, 22585, 22585, 30647, 42296, 58585, 46351, 47109, 47109, 1934, 8460, 35034, 29318, 29318, 8275, 12937, 19292, 19292, 32223, 45253, 45253, 62738, 62738], + [27911, 60981, 49555, 26167, 27889, 27889, 30860, 41976, 38912, 28823, 1062, 1062, 8635, 33523, 51501, 51501, 43048, 60258, 22165, 22165, 25477, 25477, 55591, 55591, 63087, 63373, 17572, 9967, 63268, 52921, 52921, 26641, 12889, 12068, 12068, 47566, 46357, 46357, 24744, 52624, 52624, 61063, 61063, 58585, 57223, 19866, 61197, 61197, 26933, 26150, 26150, 63622, 29803, 29803, 26532, 26532, 52877, 6912, 58904, 24226, 24226, 31799, 25797, 25797, 4559, 4559, 38933, 22059, 39702, 39702, 48968, 48968, 8871, 28153, 28153, 45696, 18064, 34142, 24159, 22452, 59660, 64235, 59500, 12537, 12537, 2515, 5621, 17575, 20860, 13387, 55995, 55995, 46645, 17887, 60699, 46417, 40000, 40000, 5410, 6533, 60631, 46897, 46897, 62413, 55256, 22429, 22429, 2112, 15984, 15984, 45846, 45846], + [35181, 26708, 20170, 9748, 49, 49, 61912, 1741, 58019, 14850, 27987, 27987, 53481, 22193, 63729, 63729, 54798, 56410, 22377, 22377, 36712, 36712, 2196, 2196, 36904, 14607, 17544, 33826, 9203, 11747, 11747, 51400, 48143, 37571, 37571, 24358, 9920, 9920, 33386, 6600, 6600, 44317, 44317, 20510, 46928, 37263, 16907, 16907, 16282, 57138, 57138, 11706, 21136, 21136, 48964, 48964, 55484, 52149, 17144, 48781, 48781, 3615, 12828, 12828, 41781, 41781, 1712, 57051, 57287, 57287, 44060, 44060, 49720, 65149, 65149, 36635, 2254, 17074, 8157, 17457, 38756, 32024, 35313, 36466, 36466, 1006, 52727, 41178, 11921, 34777, 54682, 54682, 45347, 19634, 64365, 47441, 10394, 10394, 62998, 9779, 17299, 38301, 38301, 52702, 3122, 5242, 5242, 16177, 49073, 49073, 47152, 47152], + [8023, 696, 49627, 48017, 10157, 10157, 36752, 15238, 18368, 31476, 37054, 37054, 31234, 33575, 43479, 43479, 65344, 9947, 18177, 18177, 50990, 50990, 40369, 40369, 43897, 57165, 13785, 45790, 24301, 42143, 42143, 55201, 48369, 22465, 22465, 60740, 65410, 65410, 28434, 12721, 12721, 52122, 52122, 3508, 35475, 13252, 13946, 13946, 14790, 18982, 18982, 29969, 6109, 6109, 42741, 42741, 4366, 20312, 35502, 50498, 50498, 22446, 53697, 53697, 52424, 52424, 24411, 20845, 2571, 2571, 51230, 51230, 63548, 23187, 23187, 6425, 15233, 15021, 8546, 46480, 56797, 55839, 39108, 53239, 53239, 27213, 38921, 32389, 50393, 45746, 23532, 23532, 45923, 9383, 49236, 8428, 22794, 22794, 46081, 3719, 34219, 26735, 26735, 14547, 4007, 13969, 13969, 54260, 18146, 18146, 1376, 1376], + [13032, 60340, 44590, 12475, 10564, 10564, 25351, 17759, 12290, 23048, 48948, 48948, 13942, 23253, 53064, 53064, 38311, 34684, 37985, 37985, 1140, 1140, 17132, 17132, 23343, 41154, 14106, 49108, 14784, 60073, 60073, 9360, 51122, 50452, 50452, 40219, 36604, 36604, 7776, 7299, 7299, 7913, 7913, 45596, 15618, 22436, 39449, 39449, 33979, 59531, 59531, 57879, 38576, 38576, 21214, 21214, 53930, 35628, 46117, 16137, 16137, 39268, 14493, 14493, 35116, 35116, 56494, 29002, 61940, 61940, 24044, 24044, 42553, 20534, 20534, 35919, 41960, 64314, 12181, 27666, 60962, 52130, 432, 32684, 32684, 2296, 25397, 57560, 11839, 57149, 63170, 63170, 44863, 40979, 8225, 6372, 64861, 64861, 5178, 56052, 47057, 61240, 61240, 61713, 24207, 31294, 31294, 6270, 64852, 64852, 51628, 51628], + [23815, 13193, 19910, 369, 15522, 15522, 38051, 6877, 55006, 35121, 65347, 65347, 33884, 21876, 29812, 29812, 59516, 16506, 19370, 19370, 2462, 2462, 6086, 6086, 38819, 36762, 63447, 61824, 27553, 49910, 49910, 15490, 37569, 61334, 61334, 2137, 8678, 8678, 6860, 40611, 40611, 34520, 34520, 46895, 31849, 27646, 24982, 24982, 37759, 11770, 11770, 14409, 25407, 25407, 38512, 38512, 26428, 52382, 52746, 14661, 14661, 36654, 61155, 61155, 43129, 43129, 36353, 15999, 33865, 33865, 61249, 61249, 8384, 41664, 41664, 33931, 42222, 35406, 29709, 40488, 27443, 42408, 2076, 6328, 6328, 64675, 15045, 39734, 9916, 35470, 13632, 13632, 30242, 50688, 14241, 11059, 59237, 59237, 56832, 28331, 29674, 54724, 54724, 44741, 7466, 2280, 2280, 35539, 11553, 11553, 2166, 2166], + [53922, 56293, 16181, 59231, 46335, 46335, 692, 65391, 7074, 45393, 18467, 18467, 43190, 33854, 29791, 29791, 48359, 24082, 1901, 1901, 31903, 31903, 4750, 4750, 11582, 19317, 63707, 59541, 33797, 38245, 38245, 57013, 1415, 60274, 60274, 19414, 53772, 53772, 36900, 55735, 55735, 61140, 61140, 55533, 36737, 36859, 61716, 61716, 14270, 35083, 35083, 13569, 60945, 60945, 20941, 20941, 17093, 26801, 5091, 54791, 54791, 40084, 14828, 14828, 40457, 40457, 31209, 35985, 56897, 56897, 14987, 14987, 29683, 16654, 16654, 58449, 13443, 1436, 25203, 37704, 20338, 46061, 13983, 61986, 61986, 17063, 20077, 48955, 45797, 33151, 44866, 44866, 2863, 40475, 29784, 4930, 9152, 9152, 62304, 32686, 37321, 6731, 6731, 30125, 64590, 61838, 61838, 20370, 47971, 47971, 35583, 35583], + [54367, 34765, 46919, 46752, 16497, 16497, 65394, 49847, 49321, 3115, 55304, 55304, 9217, 26512, 30104, 30104, 4046, 58551, 64263, 64263, 41890, 41890, 32412, 32412, 59795, 25156, 7697, 39558, 41344, 29084, 29084, 5206, 58602, 47923, 47923, 56433, 58265, 58265, 7410, 41436, 41436, 32617, 32617, 629, 27379, 10190, 17993, 17993, 27315, 43582, 43582, 1177, 50222, 50222, 31849, 31849, 44634, 45756, 22446, 26411, 26411, 6384, 21032, 21032, 58867, 58867, 44775, 61950, 44101, 44101, 11954, 11954, 23478, 42507, 42507, 16688, 18173, 46642, 21667, 44064, 21874, 51190, 42439, 58023, 58023, 40706, 18994, 827, 49279, 38988, 44566, 44566, 10275, 50970, 54261, 36907, 60694, 60694, 33596, 5182, 65230, 63694, 63694, 18030, 10652, 39842, 39842, 51310, 51814, 51814, 18284, 18284], + [34430, 38699, 4746, 735, 48403, 48403, 625, 33434, 1670, 16520, 34213, 34213, 51574, 18328, 3893, 3893, 42593, 27904, 12652, 12652, 50986, 50986, 37655, 37655, 5661, 54059, 16554, 47508, 55831, 16709, 16709, 11481, 55023, 24874, 24874, 12471, 33340, 33340, 15883, 53546, 53546, 49954, 49954, 38214, 39348, 8933, 40988, 40988, 14145, 30255, 30255, 64697, 13782, 13782, 46198, 46198, 29950, 6494, 45715, 50769, 50769, 1608, 45624, 45624, 5173, 5173, 53808, 17051, 23783, 23783, 17606, 17606, 7404, 48223, 48223, 16265, 15226, 34028, 10848, 57781, 36706, 27203, 35667, 43311, 43311, 12658, 56833, 42833, 55516, 51947, 60132, 60132, 37486, 15225, 8085, 42130, 63279, 63279, 13497, 21117, 18836, 39963, 39963, 56685, 55273, 3492, 3492, 53142, 32795, 32795, 3459, 3459], + [8013, 64198, 10709, 45003, 7149, 7149, 13270, 38446, 20443, 54854, 31728, 31728, 7942, 45051, 16192, 16192, 13909, 11896, 47642, 47642, 31418, 31418, 47380, 47380, 61282, 54340, 16534, 55242, 53666, 53130, 53130, 8482, 4189, 16450, 16450, 32669, 51075, 51075, 11821, 32434, 32434, 52445, 52445, 5027, 51553, 62007, 32949, 32949, 35155, 27783, 27783, 45505, 1488, 1488, 38371, 38371, 839, 41358, 8373, 23592, 23592, 46063, 15451, 15451, 21033, 21033, 29390, 20668, 42121, 42121, 49001, 49001, 17586, 7781, 7781, 8423, 60042, 16153, 19160, 31995, 4044, 7978, 61729, 18583, 18583, 41078, 39679, 10842, 42716, 60931, 62693, 62693, 51137, 43892, 36461, 38968, 22459, 22459, 49067, 28001, 58203, 36232, 36232, 63469, 43902, 45317, 45317, 50368, 18656, 18656, 63060, 63060], + [19087, 43281, 45232, 9028, 61649, 61649, 52510, 56392, 49280, 14771, 39679, 39679, 58348, 59489, 44882, 44882, 41943, 36256, 8092, 8092, 18355, 18355, 43786, 43786, 21218, 39188, 54009, 49355, 44382, 54835, 54835, 46331, 17492, 60680, 60680, 42491, 8214, 8214, 2617, 228, 228, 31017, 31017, 36141, 53815, 60809, 35648, 35648, 51571, 39300, 39300, 63287, 5254, 5254, 15541, 15541, 21392, 46761, 27173, 16691, 16691, 30458, 10978, 10978, 26899, 26899, 41283, 1590, 17401, 17401, 58502, 58502, 62013, 3965, 3965, 25922, 58731, 43426, 39834, 45995, 10841, 7170, 49292, 8406, 8406, 11917, 25633, 64025, 36641, 12535, 20156, 20156, 27191, 7888, 59674, 37370, 53444, 53444, 18188, 29205, 3917, 52882, 52882, 37772, 55269, 53931, 53931, 32957, 27663, 27663, 49943, 49943], + [54960, 30331, 52167, 33242, 50512, 50512, 6956, 43473, 32680, 56822, 3826, 3826, 59507, 28535, 35290, 35290, 17943, 56795, 49453, 49453, 64963, 64963, 8114, 8114, 3994, 17301, 61939, 45783, 5588, 42139, 42139, 60780, 19117, 30126, 30126, 61229, 63414, 63414, 35089, 3996, 3996, 30166, 30166, 27214, 21078, 26558, 22662, 22662, 21386, 61919, 61919, 22023, 7910, 7910, 57488, 57488, 40292, 48777, 12212, 31252, 31252, 29036, 9708, 9708, 43160, 43160, 44601, 49110, 29241, 29241, 25391, 25391, 14523, 9870, 9870, 25922, 40161, 40597, 50008, 55403, 3823, 5159, 49351, 24047, 24047, 41327, 59471, 31986, 48821, 4668, 27941, 27941, 9674, 45163, 19889, 34720, 23927, 23927, 1363, 39625, 3099, 3114, 3114, 12147, 56277, 18000, 18000, 62013, 40615, 40615, 29157, 29157], + [27115, 51274, 24429, 36668, 55263, 55263, 5599, 48251, 14715, 32444, 11584, 11584, 19398, 59288, 12897, 12897, 34119, 39573, 38313, 38313, 7854, 7854, 41781, 41781, 36380, 4086, 49577, 5330, 28505, 36872, 36872, 46511, 10260, 38705, 38705, 19656, 27739, 27739, 39827, 62323, 62323, 43702, 43702, 39304, 27559, 52339, 9797, 9797, 53407, 25648, 25648, 24153, 2307, 2307, 53407, 53407, 34796, 12295, 36464, 21591, 21591, 28243, 6397, 6397, 64977, 64977, 58745, 48896, 375, 375, 30712, 30712, 19834, 53196, 53196, 18026, 23665, 6328, 52818, 23027, 58382, 44600, 5637, 19312, 19312, 4234, 14353, 42762, 43363, 39112, 64372, 64372, 41674, 50754, 47097, 45849, 6105, 6105, 7848, 61910, 47017, 54020, 54020, 52230, 24642, 14313, 14313, 23094, 325, 325, 3502, 3502], + [13109, 18382, 28582, 39952, 40984, 40984, 42045, 34472, 3800, 9769, 54229, 54229, 51184, 36518, 1264, 1264, 46086, 12778, 58366, 58366, 17148, 17148, 45701, 45701, 2094, 14627, 828, 37472, 30094, 45838, 45838, 17347, 54993, 40036, 40036, 22016, 24159, 24159, 41492, 9753, 9753, 36097, 36097, 2752, 23818, 54349, 53535, 53535, 28852, 31330, 31330, 11411, 30076, 30076, 11018, 11018, 4216, 34690, 64092, 27811, 27811, 32217, 45614, 45614, 12168, 12168, 27585, 5992, 20283, 20283, 59235, 59235, 20591, 50346, 50346, 23246, 28377, 45641, 64727, 39021, 34243, 59156, 16389, 43547, 43547, 36759, 40547, 58070, 162, 32629, 59957, 59957, 63483, 64076, 26700, 32806, 5680, 5680, 7597, 23311, 65462, 7152, 7152, 51736, 45028, 43941, 43941, 58250, 43103, 43103, 48146, 48146], + [17122, 555, 19050, 2649, 9144, 9144, 3155, 61384, 32461, 51198, 39419, 39419, 23530, 1735, 9304, 9304, 35374, 17202, 36139, 36139, 17630, 17630, 24843, 24843, 59690, 35750, 55956, 21210, 26690, 37768, 37768, 14635, 53395, 12591, 12591, 41999, 6989, 6989, 45224, 22950, 22950, 2271, 2271, 52766, 3746, 39032, 1668, 1668, 40454, 6372, 6372, 4435, 53665, 53665, 41312, 41312, 41910, 35943, 8702, 48226, 48226, 49836, 21575, 21575, 40665, 40665, 10066, 50138, 37776, 37776, 43855, 43855, 31112, 16964, 16964, 9116, 56175, 37052, 17363, 46334, 57837, 10220, 38653, 16409, 16409, 60763, 46384, 33765, 62098, 27452, 23684, 23684, 2333, 1206, 47114, 33592, 44425, 44425, 19052, 32255, 33157, 13462, 13462, 32809, 64701, 364, 364, 60266, 14244, 14244, 52353, 52353], + [20224, 14062, 57342, 33618, 51376, 51376, 12897, 1953, 3887, 17377, 45532, 45532, 51861, 49412, 11745, 11745, 37180, 38532, 62755, 62755, 44679, 44679, 49955, 49955, 59672, 56142, 8040, 35830, 45252, 61020, 61020, 23047, 45905, 65092, 65092, 46695, 7705, 7705, 59263, 4639, 4639, 1304, 1304, 11694, 1451, 7709, 32116, 32116, 16526, 36303, 36303, 53770, 43100, 43100, 51543, 51543, 59013, 44238, 65115, 31323, 31323, 19586, 37518, 37518, 53855, 53855, 22195, 2008, 6361, 6361, 59130, 59130, 22656, 42329, 42329, 65326, 47874, 47862, 51530, 62504, 40340, 51266, 3922, 19676, 19676, 4364, 48972, 61645, 35932, 16603, 257, 257, 61435, 13877, 32111, 6955, 6543, 6543, 24049, 11946, 36727, 59600, 59600, 13212, 42507, 41761, 41761, 13144, 53049, 53049, 394, 394], + [27793, 48491, 59070, 63840, 18735, 18735, 30911, 10182, 44050, 53658, 55964, 55964, 40534, 33314, 57029, 57029, 45705, 32554, 38021, 38021, 44299, 44299, 54073, 54073, 57214, 11376, 38421, 16187, 45463, 19403, 19403, 24163, 46189, 23470, 23470, 64074, 32757, 32757, 51316, 51939, 51939, 4465, 4465, 60294, 50536, 25444, 13667, 13667, 63259, 39022, 39022, 32988, 20479, 20479, 11192, 11192, 12803, 56079, 63553, 7847, 7847, 53953, 46955, 46955, 9878, 9878, 63162, 11060, 53493, 53493, 14198, 14198, 7591, 54010, 54010, 53701, 51575, 52379, 16990, 56698, 60300, 20200, 30407, 60907, 60907, 23117, 28127, 24431, 51662, 48628, 13604, 13604, 23142, 30415, 31758, 19563, 6035, 6035, 51047, 8433, 4014, 2707, 2707, 58481, 43912, 47720, 47720, 42863, 63678, 63678, 43069, 43069], + [14034, 25473, 25127, 23978, 39258, 39258, 37926, 38913, 33777, 60484, 37312, 37312, 54254, 40122, 32448, 32448, 52020, 14808, 60774, 60774, 31980, 31980, 15284, 15284, 55666, 52598, 34967, 50223, 19935, 7303, 7303, 37567, 46817, 54176, 54176, 42610, 33942, 33942, 53019, 32378, 32378, 51506, 51506, 44822, 45431, 42039, 58780, 58780, 4902, 51837, 51837, 39436, 55165, 55165, 12135, 12135, 45262, 40605, 27569, 13793, 13793, 28071, 14406, 14406, 43651, 43651, 36563, 42665, 14395, 14395, 9548, 9548, 27830, 16493, 16493, 13708, 40179, 37586, 14387, 39119, 45278, 22978, 3490, 47039, 47039, 34636, 42307, 15593, 7331, 32027, 710, 710, 4129, 39374, 47578, 33645, 28148, 28148, 30974, 16675, 34056, 27009, 27009, 41884, 23082, 26868, 26868, 7448, 37606, 37606, 23960, 23960], + [23291, 43267, 48370, 63004, 12151, 12151, 42158, 13184, 15048, 42204, 26646, 26646, 54180, 21839, 39599, 39599, 54456, 25383, 11161, 11161, 63781, 63781, 6044, 6044, 25102, 13423, 56808, 5632, 41756, 54342, 54342, 21339, 48795, 45643, 45643, 49315, 31744, 31744, 35622, 63929, 63929, 5163, 5163, 18168, 13609, 59334, 22572, 22572, 52655, 52034, 52034, 44990, 29243, 29243, 37325, 37325, 13615, 27192, 48851, 48432, 48432, 28042, 34497, 34497, 54451, 54451, 33728, 41492, 14931, 14931, 56281, 56281, 4547, 36294, 36294, 43800, 48940, 33002, 11095, 43982, 46374, 51954, 23220, 22453, 22453, 34322, 34424, 31482, 32805, 34517, 56861, 56861, 23525, 21114, 12383, 15795, 43152, 43152, 59816, 25238, 18142, 40252, 40252, 34380, 20409, 18858, 18858, 22850, 33456, 33456, 30475, 30475], + [57796, 36790, 56205, 28650, 17233, 17233, 14600, 2334, 15891, 52858, 1696, 1696, 151, 55759, 28717, 28717, 62461, 10514, 61864, 61864, 19385, 19385, 37834, 37834, 31979, 16404, 32941, 51997, 20981, 46833, 46833, 22254, 26608, 60850, 60850, 65353, 1862, 1862, 14266, 8433, 8433, 26311, 26311, 44833, 13008, 28505, 20127, 20127, 32257, 10309, 10309, 38384, 42655, 42655, 19681, 19681, 26956, 12070, 34664, 33999, 33999, 53377, 56850, 56850, 50099, 50099, 11806, 60798, 1634, 1634, 11513, 11513, 2833, 38220, 38220, 58433, 42668, 27322, 4049, 27519, 31036, 42922, 24194, 23439, 23439, 29806, 22873, 5932, 62866, 10948, 670, 670, 54495, 59775, 42076, 60059, 41864, 41864, 56363, 24818, 35346, 5503, 5503, 57336, 19585, 65375, 65375, 41495, 41217, 41217, 10203, 10203], + [22805, 3160, 23006, 46018, 47922, 47922, 49107, 9098, 50707, 57399, 57817, 57817, 35336, 13287, 40325, 40325, 37611, 39040, 41387, 41387, 48375, 48375, 50036, 50036, 4903, 8137, 40831, 3259, 46321, 38375, 38375, 43628, 11938, 14022, 14022, 8243, 13637, 13637, 42027, 18457, 18457, 20858, 20858, 38402, 47790, 23098, 15512, 15512, 11767, 39471, 39471, 57942, 46519, 46519, 39563, 39563, 36773, 9859, 11515, 48570, 48570, 40946, 12809, 12809, 53714, 53714, 28111, 12850, 40955, 40955, 32735, 32735, 29407, 4061, 4061, 13006, 49471, 7196, 21058, 50479, 153, 6476, 49787, 1686, 1686, 5184, 32616, 42772, 47851, 41093, 18015, 18015, 24025, 13629, 13118, 64445, 63376, 63376, 59465, 58330, 28600, 63654, 63654, 22438, 47464, 3595, 3595, 37751, 34842, 34842, 54113, 54113], + [63533, 43503, 42812, 25524, 56485, 56485, 37689, 27357, 53265, 13842, 64711, 64711, 50633, 9967, 27757, 27757, 57300, 31495, 7227, 7227, 16826, 16826, 9518, 9518, 12093, 26593, 6493, 14448, 49667, 52121, 52121, 64718, 65433, 61867, 61867, 64156, 40050, 40050, 7426, 43920, 43920, 31918, 31918, 58171, 4123, 19783, 59414, 59414, 15302, 38890, 38890, 64017, 33485, 33485, 13562, 13562, 37462, 21758, 64844, 59194, 59194, 18447, 33517, 33517, 35993, 35993, 61587, 52516, 22265, 22265, 8560, 8560, 41012, 7656, 7656, 13826, 42071, 26860, 13456, 32406, 24657, 63810, 15129, 61755, 61755, 41763, 5559, 13900, 62085, 44951, 59026, 59026, 1930, 45933, 46505, 29053, 20098, 20098, 7453, 57441, 63472, 58990, 58990, 55725, 56840, 14015, 14015, 17398, 32393, 32393, 15241, 15241], + [37760, 39658, 53031, 62744, 19751, 19751, 45347, 36455, 55717, 21601, 52883, 52883, 9750, 57405, 17182, 17182, 52731, 25337, 34673, 34673, 7114, 7114, 8963, 8963, 11573, 31893, 7922, 424, 40601, 52917, 52917, 27101, 40878, 56686, 56686, 25792, 18933, 18933, 24569, 42957, 42957, 2767, 2767, 19842, 3999, 62061, 42536, 42536, 1552, 14215, 14215, 59660, 26116, 26116, 34796, 34796, 24350, 39408, 54297, 31475, 31475, 8676, 24124, 24124, 46343, 46343, 56938, 55710, 21905, 21905, 18239, 18239, 58290, 37363, 37363, 6693, 40913, 46911, 58064, 2550, 50266, 39051, 34805, 26660, 26660, 40250, 26282, 30967, 13729, 37831, 42210, 42210, 10323, 21994, 4533, 45430, 42151, 42151, 7668, 19618, 36871, 2689, 2689, 41006, 4927, 19718, 19718, 16928, 62867, 62867, 29982, 29982], + [47256, 49433, 17890, 1505, 57798, 57798, 2591, 60524, 60061, 1917, 41308, 41308, 14254, 56084, 9248, 9248, 3027, 48404, 41262, 41262, 51385, 51385, 16451, 16451, 25278, 40543, 36525, 44607, 53449, 59540, 59540, 17350, 17998, 10120, 10120, 460, 41548, 41548, 31524, 12603, 12603, 46252, 46252, 32033, 17251, 2698, 1245, 1245, 11113, 12233, 12233, 27919, 43260, 43260, 1732, 1732, 27929, 36184, 22838, 64019, 64019, 55782, 14370, 14370, 50913, 50913, 58572, 60180, 65477, 65477, 10009, 10009, 64511, 56403, 56403, 16092, 12164, 21723, 40349, 29625, 38374, 49570, 203, 18639, 18639, 32285, 41967, 14356, 19737, 53559, 28032, 28032, 36110, 5899, 7306, 2616, 9295, 9295, 43089, 48461, 60246, 49236, 49236, 17180, 61848, 12454, 12454, 37386, 6423, 6423, 33837, 33837], + [14426, 45181, 39896, 22722, 26831, 26831, 9783, 15914, 57336, 5609, 41495, 41495, 22437, 19574, 25184, 25184, 46521, 10966, 51712, 51712, 30584, 30584, 18311, 18311, 63940, 58556, 17378, 36032, 39791, 63340, 63340, 51746, 49236, 49508, 49508, 4750, 20814, 20814, 57490, 21563, 21563, 63180, 63180, 28583, 30561, 48432, 12894, 12894, 15346, 60496, 60496, 31987, 59581, 59581, 5172, 5172, 62941, 54577, 16220, 37360, 37360, 65304, 24129, 24129, 65056, 65056, 17590, 53685, 32786, 32786, 38825, 38825, 45879, 58121, 58121, 14057, 37032, 5881, 2023, 44504, 37093, 13823, 18397, 16472, 16472, 1415, 25196, 44801, 42171, 44697, 59565, 59565, 24491, 63532, 61074, 35990, 59422, 59422, 18338, 58634, 17927, 11542, 11542, 37504, 50352, 3298, 3298, 5996, 49040, 49040, 30689, 30689], + [16878, 16027, 61198, 4827, 28998, 28998, 14488, 25022, 3492, 21696, 56343, 56343, 26161, 64662, 23960, 23960, 61745, 42263, 15139, 15139, 38953, 38953, 39959, 39959, 55815, 34027, 38429, 45368, 16126, 2508, 2508, 28507, 56957, 7235, 7235, 65262, 6864, 6864, 56245, 47344, 47344, 48599, 48599, 22304, 55933, 61348, 22121, 22121, 35083, 54992, 54992, 46863, 23581, 23581, 49826, 49826, 1164, 26981, 23079, 9942, 9942, 48086, 61529, 61529, 46602, 46602, 37808, 53356, 58763, 58763, 50632, 50632, 3485, 61701, 61701, 56032, 1054, 52879, 4536, 32399, 4225, 5993, 48065, 12315, 12315, 37269, 8144, 35370, 44026, 18544, 15254, 15254, 62798, 38286, 12741, 63790, 62998, 62998, 56041, 60426, 39625, 24915, 24915, 48084, 18198, 21092, 21092, 19366, 25612, 25612, 4656, 4656], + [40036, 40730, 16223, 61423, 54291, 54291, 60366, 12055, 50389, 56246, 55528, 55528, 53996, 20841, 519, 519, 29153, 59070, 9143, 9143, 4045, 4045, 28826, 28826, 58780, 939, 23091, 63866, 38643, 8782, 8782, 833, 10349, 17558, 17558, 19801, 59962, 59962, 52375, 38530, 38530, 25061, 25061, 49139, 14580, 58209, 41361, 41361, 33656, 3814, 3814, 8345, 6613, 6613, 41949, 41949, 12706, 19790, 53850, 30673, 30673, 62261, 11977, 11977, 11296, 11296, 26122, 57717, 203, 203, 6422, 6422, 64770, 24152, 24152, 55334, 20933, 4984, 56368, 45621, 18116, 60528, 11121, 43127, 43127, 59213, 4105, 5749, 13100, 4477, 13344, 13344, 954, 25702, 25800, 63470, 49607, 49607, 48776, 23622, 39994, 38873, 38873, 60184, 41504, 27690, 27690, 10388, 31766, 31766, 63726, 63726], + [31159, 34200, 29646, 63615, 2111, 2111, 64695, 51256, 1825, 63598, 26337, 26337, 3489, 31849, 23947, 23947, 26650, 4427, 30329, 30329, 37946, 37946, 62890, 62890, 56946, 28837, 63493, 18203, 1508, 33254, 33254, 5268, 5390, 19403, 19403, 53320, 46620, 46620, 39960, 7601, 7601, 38858, 38858, 36281, 57231, 49570, 15677, 15677, 43602, 48783, 48783, 33673, 40694, 40694, 1003, 1003, 38802, 28802, 21436, 22094, 22094, 55502, 54086, 54086, 34693, 34693, 44263, 29664, 16778, 16778, 57156, 57156, 58187, 15852, 15852, 22946, 5782, 27575, 41511, 54338, 20673, 26889, 43325, 45116, 45116, 46227, 9356, 50672, 54752, 41510, 50815, 50815, 23737, 8894, 50789, 2324, 6940, 6940, 46511, 14616, 42484, 34961, 34961, 11512, 27279, 10918, 10918, 36262, 62835, 62835, 27069, 27069], + [32172, 2114, 9892, 5031, 8037, 8037, 55633, 61116, 60962, 45487, 40984, 40984, 61280, 54154, 37155, 37155, 38598, 18397, 58463, 58463, 12498, 12498, 40034, 40034, 53082, 3557, 49068, 56160, 24753, 26104, 26104, 5264, 13695, 11759, 11759, 19877, 61381, 61381, 36511, 23577, 23577, 9181, 9181, 31538, 19266, 32304, 2991, 2991, 773, 24420, 24420, 38563, 61533, 61533, 28678, 28678, 55890, 21504, 20266, 48803, 48803, 48165, 1361, 1361, 53813, 53813, 53847, 59138, 4346, 4346, 38194, 38194, 20323, 48847, 48847, 37873, 57806, 30211, 64069, 4474, 53682, 26755, 1344, 31712, 31712, 56256, 25127, 42999, 40858, 57207, 51305, 51305, 1592, 5560, 34828, 26653, 19626, 19626, 60558, 54227, 4398, 52276, 52276, 11094, 55480, 51370, 51370, 60917, 45075, 45075, 64020, 64020] + ] +} diff --git a/research/repeated-native-code-separation/PROOF.md b/research/repeated-native-code-separation/PROOF.md new file mode 100644 index 0000000000..5f27472b12 --- /dev/null +++ b/research/repeated-native-code-separation/PROOF.md @@ -0,0 +1,211 @@ +# Repeated native codes through reduced degree 32 + +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. + +## Result and scope + +Use the 112 signed normalizers and the matrix A in the pinned +[coded caller](https://github.com/CrocSwap/integer-mult-bounds/tree/1ec1119972c9aefe42525172d07b332fcff81cb4/research/coded-native-caller). +There is one common binary coordinate e. There are two private blocks of +eight coordinates each. A stage uses its original nine-coordinate map on +the common coordinate and its private block, and fixes the other block. + +Let C_s(f) have owner blocks + + C_s(f)[i,j] = A[i,j] (K_s,i^-1 K_s,j)^(tensor f), + +and put P_s(f) = (I - C_s(f))/14. The predecessor proves that A = I - 14 P +for an orthogonal rank-eight owner projection P. The signed K are real +orthogonal matrices, so each P_s(f) is an orthogonal projection. + +Consider a polynomial in P_0 and P_1 with scalar coefficients that do not +depend on f. Use P_s^2 = P_s to reduce each word. Suppose its nonconstant +part is nonzero and every reduced word has length at most 32. + +**Theorem.** The resulting operator B_f has a native owner path with nonzero +coefficient whose binary map moves e. Consequently, for some finite constant +r that depends on B but not on f, an exact scalar/monomial decoder for +Q_f^-1 B_f Q_f needs + + g >= max(0, 2 f - 3 r) + +scalar ADDs. Here Q_f is the tensor power of the central one-column +Gaussian. COPY, CLEAR, SCALE, arbitrary monomial address maps, independent +input owners and owned scratch are allowed. The linear schedule must not +depend on the input values. + +**Corollary.** The theorem applies to every nonempty reduced product of +C_0(f) and C_1(f) with at most 32 alternating power blocks and with arbitrary +nonzero integer exponents. It also applies to its inverse. Adjacent powers +of the same stage must first be combined. A pair C_s C_s^-1 is the identity +and is not excluded. + +This is a source-specific, certificate-assisted theorem. It is not an +all-length result, a statement about three stages, a paid-Gaussian lower +bound, or a lower bound for a new caller with retained correlated inputs. +It does not supply a cheaper native circuit or a new kappa bound. + +## 1. A finite witness for all polynomial coefficients + +Only this section uses a finite calculation. Work at f = 1, on 112 owner +fields with 2^17 address entries each. Let v be the unit vector at owner 0 +and address e. Let E project onto all 112 entries at address e. + +For each length n = 1,...,32, there are two alternating projection words, +one for each starting stage. There are 64 words in total. For each such +word w, define + + z_w = (I - E) w(P_0, P_1) v. + +The calculation proves that these 64 vectors are linearly independent. +This is stronger than checking a finite list of candidate coefficients. +Every nonzero linear combination of these words moves some component of +v away from address e. The constant word has zero projection under I-E. + +Here is the complete small certificate for that large vector calculation. +Let w_n be either alternating word of length n, and let + + t_n = E w_n v, m_n = . + +The operator that swaps the two private blocks exchanges P_0 and P_1. It +fixes v and every vector in the image of E. Therefore t_n and m_n do not +depend on the starting stage. The first component of t_n is m_n. + +Each P_s is self-adjoint. For words a and b, form the concatenation of +reverse(a) and b, and replace every run of equal stage labels by one label. +Let its length be d(a,b). Then the Gram matrix is + + G[a,b] = m_d(a,b) - . + +Thus 65 vectors t_0,...,t_64, each with 112 entries, determine all 4,096 +Gram entries. The stored moments use the integer operators 56 P_s and the +prime modulus 65,521. Divide moment n by 56^n modulo that prime before +forming G. The denominator is invertible. + +The exact certificate is + + det(G) = 52006 mod 65521. + +This nonzero residue proves that the rational Gram determinant is nonzero. +It follows that the 64 rational vectors are independent over the rationals, +the reals and the complex numbers. The finite certificate therefore proves +the assertion for every choice of polynomial coefficients in the stated +degree range. + +## 2. Two exact implementations + +The source supplies a 112-by-8 integer mode matrix U. Its entries are 0, +1 and -1. The source checks prove, entry by entry, + + U^T U = 56 I, U U^T = 4 (I - A) = 56 P. + +The C++ replay first applies each owner's signed K map, then applies +U U^T, then applies each inverse signed K. It uses integer additions and +modular reductions. All intermediate sums fit in signed 32-bit integers: +each mode has 56 nonzero entries, and each residue is at most 65,520. + +The separate dense replay does not use U. It constructs 28 P = 2(I-A) +from CODE.json. It reconstructs each native permutation with literal row +dot products and applies the source's sign at the output address. It then +uses the dense owner matrix. After n steps its moment is multiplied by +2^n to match the saved 56 P normalization. + +The dense implementation uses binary64 for its matrix products. This is +exact arithmetic in this calculation: the factors are integers, the +coefficients are 0, 1, -1 or 2, and every partial sum has absolute value +below 2^24. Binary64 represents all these products and sums exactly. The +code checks the sum bound before the replay and checks integral outputs +before each modular reduction. It does not use a floating-point rank test. + +Both implementations reproduce all 7,280 stored entries. Modular Gaussian +elimination and a separate fraction-free integer Bareiss calculation give +the same determinant residue. These are separate implementations, not an +independent human review or a proof-kernel check. + +## 3. From the finite witness to a moving native path + +Fix an allowed polynomial B. Expand its owner blocks as finite sums of +signed native maps. A map is a binary linear permutation with a linear +sign character. Group equal maps and add their coefficients. This gives + + B_f[i,j] = sum_M b_M M^(tensor f). + +The coefficients b_M do not depend on f. The owner coefficients are used +once; they are not tensor powered. Products of the one-column maps do +tensor correctly. + +Section 1 gives (I-E) B_1 v != 0. Therefore at least one owner block with +input owner 0 has a term M_0 with b_M0 != 0 whose binary part sends e to +a vector different from e. This implication does not infer a tensor +identity from a one-column sample. The sample witnesses a nonzero +coefficient in a finite native-map expansion whose all-f tensor meaning +is already fixed by the source. + +## 4. Isolate that path at arbitrary tensor width + +Put N_M = Q^-1 M Q for one column. If the binary part of M moves e, +the predecessor's four-point formula gives exactly four nonzero entries +in each row and column of N_M. The two binary vectors e and M e are +independent. The signs of M do not remove any of those four entries. + +All distinct native maps in the chosen block are nonproportional. In fact, +every native map fixes the zero address with sign +1, so proportional +maps would have proportionality constant 1 and would be equal. Conjugation +by Q preserves this property. + +For every competing map M != M_0, there is a linear functional on +one-column matrix entries which vanishes on N_M and is nonzero on N_M0. +The functional needs at most two matrix entries: choose two coordinates +which distinguish their entry ratios, or one entry which is zero in the +competitor and nonzero in N_M0. + +Use one separate tensor column for each of these functionals. If there +are r competitors, their tensor product kills every competing term and +leaves a nonzero scalar multiple of + + N_M0^(tensor (f-r)). + +It has 4^(f-r) nonzero entries per row when f >= r. Expanding the r +functionals uses at most 2^r restrictions of rows and columns of the full +decoder. A linear scalar/monomial word with g ADDs has row support at +most 2^g, including arbitrary owned workspace. The sum of these +restrictions has row support at most 2^(g+r). Hence + + 4^(f-r) <= 2^(g+r), + +which gives g >= 2f-3r. For f < r the nonnegative lower bound is enough. +The constant r can be large. No small numerical ADD bound for a specific +repeated caller is claimed. + +This contraction argument extends the path-isolation method in +[PR #5408](https://github.com/CrocSwap/integer-mult-bounds/pull/5408) and its +[pinned proof](https://github.com/aliromman/integer-mult-bounds/blob/256126eeb1607c0bf52996c3d90490f2b786b94a/research/fresh-stage-code-separation/PROOF.md). +Its fresh-stage path uniqueness is not assumed here. The Gram witness +supplies a surviving moving path even when the two stages repeat. + +## 5. Arbitrary integer powers + +Since C_s = I - 14 P_s and P_s is a projection, + + C_s^a = I + ((-13)^a - 1) P_s + +for every integer a. The coefficient of P_s is nonzero whenever a != 0. +Expand a reduced alternating product with m power blocks. Its unique +degree-m word has coefficient equal to the product of those m nonzero +coefficients. Terms which omit a factor have reduced degree less than m. +Thus the nonconstant reduced polynomial is nonzero. If m <= 32, the +theorem applies. Reversal and negation of the exponents prove the claim +for the inverse decoder as well. + +## Decision and open boundary + +The experiment changed the fresh-stage premise. For these exact source +codes, short reuse does not give the required scalar terminal decoder. +Increasing the degree bound alone is not a new construction direction. + +A route outside this result must change a stated premise, for example the +normalizers, the number of stages, the shared coordinate space, the paid +decoder interface, or the requirement to decode arbitrary terminal inputs. +Such a route still needs its actual source, complete cost and target bill, +restoration, compiler, precision and outer calculation. No such bill is +supplied by this obstruction, and the selected kappa remains unchanged. diff --git a/research/repeated-native-code-separation/README.md b/research/repeated-native-code-separation/README.md new file mode 100644 index 0000000000..1e92a8091f --- /dev/null +++ b/research/repeated-native-code-separation/README.md @@ -0,0 +1,113 @@ +# Repeated native code separation through degree 32 + +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. + +Reusing the same two native stages does not give a short scalar decoder +for the pinned center-free code. All 64 nonconstant reduced projection +words of degree at most 32 are independent after projection away from +the central address. The exact Gram determinant is 52006 modulo 65521. + +This gives an all-width terminal obstruction for every reduced product +of the two codes with at most 32 alternating power blocks and arbitrary +nonzero integer exponents. It permits repeated stages, unlike the +fresh-stage theorem in [PR #5408](https://github.com/CrocSwap/integer-mult-bounds/pull/5408). +For each such product, the required scalar ADD count grows at least as +2f minus a product-dependent constant. The constant is not asserted to +be small. + +Read [PROOF.md](PROOF.md), [RESULT.json](RESULT.json), +[MOMENTS.json](MOMENTS.json) and [SOURCES.json](SOURCES.json). +This is a scoped negative result. It gives no cheaper circuit, no new +complete kappa bound, and no selected-frontier change. + +## Reproduce + +The registered replay uses Python 3.12 and NumPy 2.5.4. From the repository +root, with that dependency installed, run: + +```sh +python3.12 -B scripts/research_package.py --package research/repeated-native-code-separation +``` + +Expected scientific marker: + +```text +PASS_REPEATED_NATIVE_CODE_DEGREE32_NO_NEW_KAPPA +``` + +The full replay reconstructs all 7,280 moment entries from the dense +112-owner matrix, checks the source bytes and mode identities, and checks +the determinant by two exact algorithms. The registered optimized pass +checks the saved certificate and controls; it does not repeat the dense +replay. The dense binary64 products are exact integer calculations below +2^24, as proved and checked in the package. Rank is computed modulo a +prime, not with a numerical tolerance. + +The separate C++17 replay uses the eight-mode factorization and integer +arithmetic. It needs a C++17 compiler. Use fresh output paths: + +```sh +python3.12 -B research/repeated-native-code-separation/verify.py --native-input /tmp/repeated-native-source.txt +c++ -O3 -std=c++17 research/repeated-native-code-separation/native_replay.cpp -o /tmp/repeated-native-replay +/tmp/repeated-native-replay /tmp/repeated-native-source.txt 65521 65 > /tmp/repeated-native-moments.txt +python3.12 -B research/repeated-native-code-separation/verify.py --check-native /tmp/repeated-native-moments.txt +``` + +Both implementations reproduce every moment entry. Duplicate-word, +identical-stage, invalid-residue, degree-limit, inverse-cancellation and +nonzero-power controls are included. This is not independent human or +proof-kernel acceptance. No native supplier, full controller, compiler, +outer, selected cold, Lean or Docker replay is claimed. + +## Exact scope and decision + +The source is canonical main 1ec1119972c9aefe42525172d07b332fcff81cb4. +There is one shared binary axis and two private blocks of eight axes. +The normalizers are exactly those in the source. The polynomial +coefficients are scalar and do not depend on the tensor width. Adjacent +inverse powers can cancel before the reduced word is formed. + +The proof allows arbitrary input owners, scalar mixing and owned scratch +in the decoder. It excludes only a fixed finite scalar/monomial decoder +for this terminal contract. It does not exclude paid Gaussian decoders, +new normalizers, three or more stages, longer reduced words, a different +shared space or a caller which uses retained correlated inputs. + +The complete obligation ledger is unchanged: the producer and its coded +outputs are predecessor results; the proposed short-reuse decoder is +excluded in this class; a changed decoder and its complete paid bill, +restoration, compiler and outer closure remain unknown. Unknown costs +are not set to zero. This result ends this construction attempt. Merely +raising the degree limit is not a proposed follow-up campaign. + +## Open next questions + +- Can a changed normalizer assignment admit a short repeated code word + whose terminal is monomial? First supply the literal signed maps and + source endpoint. The present certificate is specific to the saved maps. +- Can an actual caller use its retained inputs to remove the code without + a standalone terminal decoder? First give the independent-input + endpoint and every paid operation. The arbitrary-terminal-input + hypothesis would change, so this result does not settle that question. + +The structured questions and overlap scope are in [TASK.json](TASK.json). + +## Credit + +Dillon's [PR #4933](https://github.com/CrocSwap/integer-mult-bounds/pull/4933) +supplies the physical common-query code, signed normalizers and caller. +Dugongue's [PR #4929](https://github.com/CrocSwap/integer-mult-bounds/pull/4929) +supplies the center-free code and its spectrum. Cinna Davis's +[PR #5065](https://github.com/CrocSwap/integer-mult-bounds/pull/5065) +supplies the two-stage terminal predecessor. Ali Romman's +[PR #5408](https://github.com/CrocSwap/integer-mult-bounds/pull/5408) +supplies the fresh-stage separation theorem and path-contraction method. +The present result replaces fresh-stage uniqueness by a finite exact +Gram witness for repeated native codes. + +Retain Cinna Davis's cache, helper-basis and controller work; Cao Yifan's +native word; zxv's Clifford and compiler work; Jacob Alan Sussman's +mixed-target recursion; and the cumulative source lineage. The exact +[source notice](../coded-native-caller/NOTICE), +[origins](../coded-native-caller/ORIGINS.json) and +[license](../coded-native-caller/LICENSE) are declared package inputs. diff --git a/research/repeated-native-code-separation/RESULT.json b/research/repeated-native-code-separation/RESULT.json new file mode 100644 index 0000000000..c8d358568d --- /dev/null +++ b/research/repeated-native-code-separation/RESULT.json @@ -0,0 +1,11 @@ +{ + "status": "PASS_REPEATED_NATIVE_CODE_DEGREE32_NO_NEW_KAPPA", + "prime": 65521, + "degree": 32, + "independent_words": 64, + "determinant_mod_prime": 52006, + "moment_entries": 7280, + "rejection_and_boundary_controls": 6, + "moment_sha256": "d0020e0665191a9cd700d5f2dc2f4500a2cbb7d43ac38f1b089dbd344937315d", + "selected_kappa_unchanged": "0.0030217758" +} diff --git a/research/repeated-native-code-separation/SOURCES.json b/research/repeated-native-code-separation/SOURCES.json new file mode 100644 index 0000000000..eb3c6318b9 --- /dev/null +++ b/research/repeated-native-code-separation/SOURCES.json @@ -0,0 +1,48 @@ +{ + "schema_version": 1, + "base_commit": "1ec1119972c9aefe42525172d07b332fcff81cb4", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "b288ae44032fd84dd5564243422836cbcd29835e", + "sha256": "f9ed52bb642cd1e1486cf2743557ac5fa23cf1514a3277d786a644e39a565038" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "f126dd2e2dad2b669e75d1d0d0bd05c600725602", + "sha256": "f7a48bfa2659b88378282a8eee7d9fe52cdf505594124c4d1686b58510fffd72" + }, + { + "path": "research/coded-native-caller/CODE.json", + "usage": "input", + "git_blob": "03170f4a31f7a8a3db7228f1cd5a6fdcb32720ae", + "sha256": "8be7f3f073b7981ec91c6af43edff0ac8a89f4824ef6026ae758c287dd6c03d0" + }, + { + "path": "research/coded-native-caller/LICENSE", + "usage": "input", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + { + "path": "research/coded-native-caller/NORMALIZERS.json", + "usage": "input", + "git_blob": "bca92c222c395d3d75c047fbb678f3cd0947c60f", + "sha256": "ae8aad06aa5d1811d725895b3ab5a4f4daa9dcdd88294aa0d5f723e78bb1e0da" + }, + { + "path": "research/coded-native-caller/NOTICE", + "usage": "input", + "git_blob": "985b6b1bc76dacd54a9cbe9897f3b659ae93c3a4", + "sha256": "317b1c5e040bab50ebfc3d0cdb3a47fc30e2f872a00895f563d7931749b1cc7b" + }, + { + "path": "research/coded-native-caller/ORIGINS.json", + "usage": "input", + "git_blob": "e18a033d4de1d997f55e84d1535fc6cde20424c4", + "sha256": "10cf47173ca238c32adb923daae7c1137c2e9c86c7066301d68fc74442b3f4d7" + } + ] +} diff --git a/research/repeated-native-code-separation/TASK.json b/research/repeated-native-code-separation/TASK.json new file mode 100644 index 0000000000..4d389863ed --- /dev/null +++ b/research/repeated-native-code-separation/TASK.json @@ -0,0 +1,111 @@ +{ + "schema_version": 1, + "task_id": "joint-query-controller", + "priority_revision": 7, + "base_commit": "1ec1119972c9aefe42525172d07b332fcff81cb4", + "original_card": { + "id": "joint-query-controller", + "question": "Can the installed QQ16 caller win a complete matched protocol bill, or can a changed demand eliminate actual paid work?", + "starting_points": [ + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "research/qq16-caller-install/README.md" + ], + "methods": [ + "Derive the matched whole-caller physical bill for installed and baseline protocols.", + "Change the actual demanded observations and prove a cheaper legal producer/consumer contract." + ], + "acceptance_gate": "Name the changed premise of the fixed F0/B1 observation obstruction. Show exactly which query is recovered, legal native reads and restoration, and a full favorable budget including cover maps, helpers and endpoints. Local inverse identities alone do not close the global controller. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read #4166 COST.md and ADMISSION.json. An actual caller connection is now proposed. Its native-component profile loses; parent park/restore versus external-call costs remain unresolved. Retain the producer and recovery lineage rather than rebuild it.", + "scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately." + }, + "first_experiment": "At the actual installed cut, compare matched complete parent park/restore and external input/return protocols at the same bank/packet geometry, including every later root call and service cost. Alternatively pin both bridge observations and derive a genuinely smaller source-compatible demand. Stop if the complete necessary inequality fails or an essential cost is unknown; no larger decoder scan from a local tape-action saving.", + "bottleneck_link": "The native local words exist; retained query information and its physical access are the missing link to a composed recursive interface.", + "allowed_variations": [ + "One paid query, one changed first pair, or one precisely specified affine helper state.", + "A counterexample or lower bound for that exact proposed repair.", + "One unresolved obligation of a newer local decoder, with exact source heads and a distinct claim/domain." + ], + "scope_change_triggers": [ + "Retaining the fixed first pair and ordinary schedule while allowing only homogeneous selected-only control, already excluded by the witness.", + "Treating cover-map counts as zero-cost physical address operations.", + "Recreating the pending complete local decoder or early-record/output-bank coalescing already under investigation without a distinct audit or changed premise.", + "Treating a completed-output defect inequality as a producer-interior, dirty-range or physical-cost certificate.", + "Recreating completed-output recovery or caller wiring already supplied by #4166 without new independent coverage.", + "Dropping retained later root calls or claiming native-profile dominance from the isolated publication saving." + ], + "overlap_terms": [ + "QQ16", + "joint-query", + "changing-chart controller", + "selected observation", + "1969", + "2540", + "early record", + "output-bank retention", + "complete native decoder", + "2965", + "producer defect", + "dirty-helper range", + "F17 consumer", + "4166", + "qq16-caller-install" + ], + "existing_checks": [ + { + "scope": "PR #4166: author-checked installed producer/service/return/bridge connection; native-component comparison loses.", + "evidence": "research/qq16-caller-install/README.md", + "remaining": "Complete matched physical protocol bill, or changed source-compatible demand/circuit; no affordable supplier yet.", + "status": "author-checked", + "source_commit": "0b082d22a0e9a442d264ab0633e35ef26c790630", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "changed", + "actual_scope": "Repeated two-stage native codes: exact reduced polynomial separation through degree 32 and an all-width scalar terminal obstruction.", + "scope_change_reason": "The user requested a new structural route. Repeated stages fall outside the fresh-stage theorem of PR5408. This task uses the physical codes of PR4933, not the historical QQ16 demand.", + "bottleneck_link": "The center-free producer leaves a code in the negative-query outputs. A short repeated-stage identity could remove its terminal decoder; this result excludes that repair for two pinned stages through reduced degree 32.", + "budget_minutes": 90, + "stop_rule": "Stop the short-reuse construction if exact native projection vectors remain independent through degree 32. Do not extend the degree bound without a changed construction and bill.", + "outcome": "negative-result", + "evidence": "PROOF.md; MOMENTS.json; RESULT.json; two native replay implementations agree on all 7280 entries.", + "author": "Ali Romman", + "ai_assistance": "Substantial OpenAI Codex assistance. No independent human or proof-kernel review is claimed.", + "open_questions": [ + { + "question": "Can a changed normalizer assignment admit a short repeated code with a monomial terminal?", + "why_it_matters": "The normalizer maps are fixed in this certificate. A new assignment could change the tested algebra.", + "first_step": "Supply literal signed maps and replay the actual source endpoint before testing the repeated code.", + "blocked_by": "A source-compatible assignment and its full paid bill are not supplied." + }, + { + "question": "Can a caller use retained correlated inputs instead of a standalone terminal decoder?", + "why_it_matters": "The decoder lower bound permits arbitrary independent terminal inputs. A changed caller may have more information.", + "first_step": "State the full independent-input endpoint and charge every Gaussian, read, restoration and output conversion.", + "blocked_by": "No complete favorable caller or compiler and outer closure is supplied." + } + ], + "canonical_claim": "https://github.com/CrocSwap/integer-mult-bounds/discussions/4930#discussioncomment-19156644", + "overlap": { + "cache_fetched_at": "2026-10-24T00:07:05Z", + "open_prs": 358, + "discussion_records": 4696, + "complete_remote_pagination": true, + "local_note_coverage": "Sparse and incomplete", + "related_repeated_uncoded_screen": "https://github.com/CrocSwap/integer-mult-bounds/discussions/4611#discussioncomment-19156205", + "not_reserved": [ + "coupled-helper closure", + "paid cache", + "three-factor geometry", + "border grading" + ] + } +} diff --git a/research/repeated-native-code-separation/VALIDATION.md b/research/repeated-native-code-separation/VALIDATION.md new file mode 100644 index 0000000000..2704bf3fe1 --- /dev/null +++ b/research/repeated-native-code-separation/VALIDATION.md @@ -0,0 +1,37 @@ +# Validation record + +Prepared for Ali Romman with substantial OpenAI Codex assistance. + +The source base is 1ec1119972c9aefe42525172d07b332fcff81cb4. The scientific +receipt is RESULT.json. The selected conditional kappa stays 0.0030217758. + +The registered Python 3.12.14 replay passed with NumPy 2.5.4. It recomputed +all 7,280 moment entries from the dense owner matrix. The optimized +certificate pass also passed. Both determinant algorithms gave 52006 +modulo 65521, and all six boundary and rejection controls passed. + +```sh +python3.12 -B scripts/research_package.py --package research/repeated-native-code-separation +``` + +The separate C++17 program was compiled with Apple clang, -O3, -Wall and +-Wextra. Compilation gave no warnings. Its integer eight-mode replay +reproduced all 7,280 entries from a fresh source export. The optimized +native-output comparison passed. The exact commands are in README.md. + +```text +PASS_REPEATED_NATIVE_CODE_DEGREE32_NO_NEW_KAPPA +mode=native-replay +64 independent words; determinant 52006 modulo 65521; 7280 moment entries +``` + +The initial experimental three-factor block had 1,334 surviving signed +native maps. That screen motivated the stronger Gram calculation; it is +not a separate theorem or a complete caller invoice. + +The mathematical checks use two implementations and exact arithmetic. +They are not independent human acceptance or proof-kernel verification. +No selected cold replay, full supplier/controller/native admission, +compiler/outer replay, Lean or Docker build was run. The source history +is shallow; no full-history ancestry check is claimed. Hosted CI status +must be read from the pull request and is separate from this local record. diff --git a/research/repeated-native-code-separation/VERIFY.json b/research/repeated-native-code-separation/VERIFY.json new file mode 100644 index 0000000000..52845d6a52 --- /dev/null +++ b/research/repeated-native-code-separation/VERIFY.json @@ -0,0 +1,37 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [ + "numpy==2.5.4" + ], + "inputs": [ + "research/coded-native-caller/CODE.json", + "research/coded-native-caller/LICENSE", + "research/coded-native-caller/NORMALIZERS.json", + "research/coded-native-caller/NOTICE", + "research/coded-native-caller/ORIGINS.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 600, + "checks": "Replay all native moment entries from the dense source matrix; verify exact Gram independence and boundary controls." + }, + { + "argv": [ + "{python}", + "-O", + "-B", + "{package}/verify.py", + "--certificate-only" + ], + "timeout_seconds": 120, + "checks": "Check the pinned certificate, both determinant algorithms and rejection controls under optimized Python; no dense replay." + } + ] +} diff --git a/research/repeated-native-code-separation/dense_replay.py b/research/repeated-native-code-separation/dense_replay.py new file mode 100644 index 0000000000..9a50d032e8 --- /dev/null +++ b/research/repeated-native-code-separation/dense_replay.py @@ -0,0 +1,66 @@ +"""Replay the native moments from the dense owner matrix. + +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +This implementation does not use the eight-mode native replay. +""" + +from fractions import Fraction +import json +from pathlib import Path + +import numpy as np + +PRIME = 65521 +VOLUME = 1 << 17 + + +def replay(source: Path, count: int) -> list[list[int]]: + code = json.loads((source / "CODE.json").read_text())["A"] + ports = json.loads((source / "NORMALIZERS.json").read_text())["ports"] + # The dense operator is 28 P. The saved operator is 56 P. + matrix = np.array( + [[2 * (i == j) - int(2 * Fraction(code[i][j])) for j in range(112)] + for i in range(112)], dtype=np.float64 + ) + if max(sum(abs(x) for x in row) for row in matrix) * (PRIME - 1) >= 2**24: + raise ValueError("The exact binary64 sum bound does not apply") + maps, signs = [], [] + for port in ports: + rows = port["G_rows"] + ys = [sum(((row & x).bit_count() % 2) << j for j, row in enumerate(rows)) + for x in range(512)] + maps.append(np.array(ys, dtype=np.int32)) + signs.append(np.array( + [(-1) ** ((port["Z_mask"] & y).bit_count()) for y in ys], dtype=np.int32 + )) + addresses = np.arange(VOLUME, dtype=np.int32) + state = np.zeros((112, VOLUME), dtype=np.int32) + state[0, 1] = 1 + records = [] + for n in range(count): + records.append((state[:, 1].astype(np.int64) * pow(2, n, PRIME) % PRIME).tolist()) + if n + 1 == count: + break + stage = 1 - (n % 2) + shift = 1 + 8 * stage + mask = 1 | (255 << shift) + local = (addresses & 1) | (((addresses >> shift) & 255) << 1) + remote = addresses & ~mask + middle = np.empty_like(state) + for owner in range(112): + y0 = maps[owner][local] + y = remote | (y0 & 1) | ((y0 >> 1) << shift) + middle[owner, y] = signs[owner][local] * state[owner] + # All operands and all partial sums are integers below 2**24 in + # absolute value. Binary64 computes each product and sum exactly. + for start in range(0, VOLUME, 4096): + stop = start + 4096 + output = matrix @ middle[:, start:stop].astype(np.float64) + if not np.array_equal(output, np.rint(output)): + raise ValueError("The dense result is not integral") + middle[:, start:stop] = output.astype(np.int64) % PRIME + for owner in range(112): + y0 = maps[owner][local] + y = remote | (y0 & 1) | ((y0 >> 1) << shift) + state[owner] = (signs[owner][local] * middle[owner, y]) % PRIME + return records diff --git a/research/repeated-native-code-separation/native_replay.cpp b/research/repeated-native-code-separation/native_replay.cpp new file mode 100644 index 0000000000..3b2168d9ae --- /dev/null +++ b/research/repeated-native-code-separation/native_replay.cpp @@ -0,0 +1,75 @@ +// Exact modular moments of two repeated native projections. +// Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +#include +#include +#include +#include +#include +#include + +constexpr int owners = 112; +constexpr int modes = 8; +constexpr int volume = 1 << 17; +int prime; +int coeff[modes][owners]; +int mapped[owners][512]; +int sign_at[owners][512]; + +int reduce(int x) { + x %= prime; + return x < 0 ? x + prime : x; +} + +void project(std::vector& state, int stage) { + std::vector tmp(modes * volume, 0); + int shift = 1 + 8 * stage; + int mask = 1 | (255 << shift); + for (int owner = 0; owner < owners; ++owner) { + const int* src = state.data() + owner * volume; + for (int x = 0; x < volume; ++x) { + int local = (x & 1) | (((x >> shift) & 255) << 1); + int y0 = mapped[owner][local]; + int y = (x & ~mask) | (y0 & 1) | ((y0 >> 1) << shift); + int v = sign_at[owner][local] * src[x]; + for (int a = 0; a < modes; ++a) + tmp[a * volume + y] += coeff[a][owner] * v; + } + } + for (int& v : tmp) v = reduce(v); + for (int owner = 0; owner < owners; ++owner) { + int* dst = state.data() + owner * volume; + for (int x = 0; x < volume; ++x) { + int local = (x & 1) | (((x >> shift) & 255) << 1); + int y0 = mapped[owner][local]; + int y = (x & ~mask) | (y0 & 1) | ((y0 >> 1) << shift); + int v = 0; + for (int a = 0; a < modes; ++a) + v += coeff[a][owner] * tmp[a * volume + y]; + dst[x] = reduce(sign_at[owner][local] * v); + } + } +} + +int main(int argc, char** argv) { + if (argc != 4) throw std::runtime_error("Use source.txt prime count"); + prime = std::stoi(argv[2]); + int count = std::stoi(argv[3]); + if (prime <= 2 || prime > 65521 || count < 1 || count > 1000) + throw std::runtime_error("Invalid prime or count"); + std::ifstream src(argv[1]); + for (auto& row : coeff) for (int& x : row) src >> x; + for (int i = 0; i < owners; ++i) + for (int x = 0; x < 512; ++x) src >> mapped[i][x] >> sign_at[i][x]; + if (!src) throw std::runtime_error("Invalid source file"); + std::vector state(owners * volume, 0); + state[1] = 1; + for (int n = 0; n < count; ++n) { + std::cout << n; + for (int owner = 0; owner < owners; ++owner) + std::cout << ' ' << state[owner * volume + 1]; + std::cout << '\n' << std::flush; + if (n + 1 < count) { + project(state, 1 - (n % 2)); + } + } +} diff --git a/research/repeated-native-code-separation/verify.py b/research/repeated-native-code-separation/verify.py new file mode 100644 index 0000000000..04fbbe7286 --- /dev/null +++ b/research/repeated-native-code-separation/verify.py @@ -0,0 +1,224 @@ +"""Check repeated native code separation through reduced degree 32. + +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +""" + +import argparse +from fractions import Fraction +import hashlib +import json +import os +from pathlib import Path + +# Set the thread limits before the optional numerical library is loaded. +for name in ("OPENBLAS_NUM_THREADS", "VECLIB_MAXIMUM_THREADS", "OMP_NUM_THREADS"): + os.environ[name] = "1" + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +SOURCE = ROOT / "research/coded-native-caller" +PRIME = 65521 +DEGREE = 32 + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def source_checks(): + manifest = json.loads((HERE / "SOURCES.json").read_text()) + for item in manifest["files"]: + if item["usage"] == "input": + raw = (ROOT / item["path"]).read_bytes() + need(hashlib.sha256(raw).hexdigest() == item["sha256"], "Source hash: " + item["path"]) + data = json.loads((SOURCE / "NORMALIZERS.json").read_text()) + code = [[Fraction(x) for x in row] for row in json.loads((SOURCE / "CODE.json").read_text())["A"]] + modes = data["mode_columns"] + ports = data["ports"] + need(len(code) == len(ports) == 112 and all(len(row) == 112 for row in code), "Owner dimensions") + need(len(modes) == 8 and all(len(row) == 112 for row in modes), "Mode dimensions") + need(all(x in (-1, 0, 1) for row in modes for x in row), "Mode entries") + for i in range(112): + for j in range(112): + need(sum(row[i] * row[j] for row in modes) == 4 * ((i == j) - code[i][j]), "Mode factorization") + for a in range(8): + for b in range(8): + need(sum(x * y for x, y in zip(modes[a], modes[b])) == 56 * (a == b), "Orthogonal modes") + tables = [] + for i, port in enumerate(ports): + rows = port["G_rows"] + need(port["port"] == i and len(rows) == 9, "Normalizer order") + need(all(type(x) is int and 0 <= x < 512 for x in rows), "Binary row domain") + need(all(((a & b).bit_count() % 2) == (j == k) + for j, a in enumerate(rows) for k, b in enumerate(rows)), "Orthogonal normalizer") + need(port["K_word"] == [["P", rows], ["D", [0] * 9, + [2 * ((port["Z_mask"] >> j) & 1) for j in range(9)]]], "Literal signed normalizer") + table = [] + for x in range(512): + y = sum(((row & x).bit_count() % 2) << j for j, row in enumerate(rows)) + table.append((y, (-1) ** ((port["Z_mask"] & y).bit_count()))) + need(table[0] == (0, 1) and table[1][0] == port["q"], "Normalizer central vector") + need(len({y for y, sign in table}) == 512, "Normalizer permutation") + tables.append(table) + return modes, tables + + +def reduce_word(word): + out = [] + for stage in word: + if not out or out[-1] != stage: + out.append(stage) + return tuple(out) + + +def gram(rows, degree=DEGREE): + need(1 <= degree <= DEGREE, "The certificate covers degrees 1 through 32") + normalized = [[x * pow(pow(56, n, PRIME), -1, PRIME) % PRIME for x in row] + for n, row in enumerate(rows)] + words = [tuple((start + j) % 2 for j in range(n)) + for n in range(1, degree + 1) for start in (0, 1)] + matrix = [] + for a in words: + row = [] + for b in words: + length = len(reduce_word(a[::-1] + b)) + outside = sum(x * y for x, y in zip(normalized[len(a)], normalized[len(b)])) + row.append((normalized[length][0] - outside) % PRIME) + matrix.append(row) + return matrix + + +def determinant_mod(matrix): + a = [row[:] for row in matrix] + result = 1 + for i in range(len(a)): + pivot = next((j for j in range(i, len(a)) if a[j][i] % PRIME), None) + if pivot is None: + return 0 + if pivot != i: + a[i], a[pivot] = a[pivot], a[i] + result = -result + value = a[i][i] % PRIME + result = result * value % PRIME + inverse = pow(value, -1, PRIME) + for j in range(i + 1, len(a)): + coefficient = a[j][i] * inverse % PRIME + for k in range(i, len(a)): + a[j][k] = (a[j][k] - coefficient * a[i][k]) % PRIME + return result % PRIME + + +def determinant_bareiss(matrix): + """Use integer elimination without modular inverses.""" + a = [row[:] for row in matrix] + sign, previous = 1, 1 + for k in range(len(a) - 1): + pivot = next((i for i in range(k, len(a)) if a[i][k]), None) + if pivot is None: + return 0 + if pivot != k: + a[k], a[pivot] = a[pivot], a[k] + sign = -sign + for i in range(k + 1, len(a)): + for j in range(k + 1, len(a)): + numerator = a[k][k] * a[i][j] - a[i][k] * a[k][j] + need(numerator % previous == 0, "Exact Bareiss division") + a[i][j] = numerator // previous + previous = a[k][k] + for i in range(k + 1, len(a)): + a[i][k] = 0 + return sign * a[-1][-1] + + +def rejection(action): + try: + action() + except ValueError: + return 1 + raise ValueError("A negative control was accepted") + + +def check_rows(rows): + need(len(rows) == 65 and all(len(row) == 112 for row in rows), "65 complete moments") + need(all(type(x) is int and 0 <= x < PRIME for row in rows for x in row), "Moment residues") + need(rows[0] == [1] + [0] * 111, "Initial basis vector") + + +def controls(rows, matrix): + count = 0 + duplicate = [row[:] for row in matrix] + duplicate[1] = duplicate[0][:] + need(determinant_mod(duplicate) == 0, "Duplicate word is dependent") + count += 1 + # Two identical projections give the same two length-one vectors. + one = gram(rows, 1)[0][0] + need(determinant_mod([[one, one], [one, one]]) == 0, "Repeated identical stage boundary") + count += 1 + bad = [row[:] for row in rows] + bad[0][0] = True + count += rejection(lambda: check_rows(bad)) + count += rejection(lambda: gram(rows, 33)) + # An adjacent inverse pair is the empty reduced code word and is legal. + for eigenvalue in (1, -13): + need(Fraction(eigenvalue) * Fraction(eigenvalue + 12, 13) == 1, "Inverse cancellation control") + for exponent in range(-5, 6): + need((Fraction(-13) ** exponent - 1 == 0) == (exponent == 0), "Nonzero syllable coefficient") + count += 2 + return count + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("--certificate-only", action="store_true") + parser.add_argument("--native-input", type=Path) + parser.add_argument("--check-native", type=Path) + args = parser.parse_args() + modes, tables = source_checks() + need(all(PRIME % d for d in range(2, 256)), "Prime modulus") + if args.native_input: + with args.native_input.open("x", encoding="utf-8") as stream: + for row in modes: + stream.write(" ".join(map(str, row)) + "\n") + for table in tables: + for y, sign in table: + stream.write(f"{y} {sign}\n") + print("PASS_NATIVE_INPUT_EXPORT") + return + receipt = json.loads((HERE / "RESULT.json").read_text()) + raw = (HERE / "MOMENTS.json").read_bytes() + need(hashlib.sha256(raw).hexdigest() == receipt["moment_sha256"], "Moment bytes") + moments = json.loads(raw) + header = {key: value for key, value in moments.items() if key != "rows"} + need(header == {"schema_version": 1, "prime": PRIME, "operator_scale": 56, + "address_bits": 17, "input_owner": 0, "input_address": 1}, "Moment header") + rows = moments["rows"] + check_rows(rows) + if args.check_native: + lines = [list(map(int, line.split())) for line in args.check_native.read_text().splitlines()] + need([row[0] for row in lines] == list(range(65)), "Native moment indices") + need([row[1:] for row in lines] == rows, "All native moments") + elif not args.certificate_only: + from dense_replay import replay + need(replay(SOURCE, 65) == rows, "All dense replay moments") + matrix = gram(rows) + determinant = determinant_mod(matrix) + need(determinant == determinant_bareiss(matrix) % PRIME == 52006, "Independent Gram determinants") + need(determinant != 0, "Independent nonconstant words") + count = controls(rows, matrix) + expected = { + "status": "PASS_REPEATED_NATIVE_CODE_DEGREE32_NO_NEW_KAPPA", + "prime": PRIME, "degree": DEGREE, "independent_words": 64, + "determinant_mod_prime": determinant, "moment_entries": 65 * 112, + "rejection_and_boundary_controls": count, + "moment_sha256": hashlib.sha256(raw).hexdigest(), + "selected_kappa_unchanged": "0.0030217758", + } + need(receipt == expected, "Exact result receipt") + print(expected["status"]) + print("mode=" + ("native-replay" if args.check_native else "certificate-only" if args.certificate_only else "dense-replay")) + print("64 independent words; determinant 52006 modulo 65521; 7280 moment entries") + + +if __name__ == "__main__": + main()