diff --git a/research/p104-no-relay-cover-audit/CERTIFICATE.json b/research/p104-no-relay-cover-audit/CERTIFICATE.json new file mode 100644 index 0000000000..5825c6e938 --- /dev/null +++ b/research/p104-no-relay-cover-audit/CERTIFICATE.json @@ -0,0 +1,3509 @@ +{ + "schema_version": 1, + "optimum": 4580, + "extra_packing": [ + [ + 2, + 3 + ], + [ + 2, + 6 + ], + [ + 2, + 15 + ], + [ + 4, + 1 + ], + [ + 4, + 3 + ], + [ + 4, + 6 + ], + [ + 4, + 41 + ], + [ + 4, + 46 + ], + [ + 5, + 1 + ], + [ + 5, + 3 + ], + [ + 5, + 6 + ], + [ + 5, + 73 + ], + [ + 8, + 3 + ], + [ + 8, + 6 + ], + [ + 8, + 42 + ], + [ + 8, + 83 + ], + [ + 11, + 6 + ], + [ + 11, + 7 + ], + [ + 11, + 41 + ], + [ + 11, + 87 + ], + [ + 13, + 3 + ], + [ + 13, + 14 + ], + [ + 15, + 7 + ], + [ + 15, + 12 + ], + [ + 15, + 74 + ], + [ + 15, + 83 + ], + [ + 17, + 41 + ], + [ + 17, + 71 + ], + [ + 18, + 34 + ], + [ + 18, + 83 + ], + [ + 20, + 7 + ], + [ + 20, + 12 + ], + [ + 20, + 14 + ], + [ + 20, + 53 + ], + [ + 20, + 54 + ], + [ + 23, + 14 + ], + [ + 23, + 45 + ], + [ + 23, + 46 + ], + [ + 23, + 54 + ], + [ + 25, + 32 + ], + [ + 25, + 81 + ], + [ + 26, + 17 + ], + [ + 26, + 18 + ], + [ + 26, + 28 + ], + [ + 26, + 32 + ], + [ + 26, + 48 + ], + [ + 26, + 61 + ], + [ + 26, + 63 + ], + [ + 26, + 78 + ], + [ + 26, + 80 + ], + [ + 26, + 91 + ], + [ + 26, + 98 + ], + [ + 27, + 45 + ], + [ + 27, + 50 + ], + [ + 27, + 59 + ], + [ + 27, + 65 + ], + [ + 27, + 76 + ], + [ + 28, + 46 + ], + [ + 30, + 14 + ], + [ + 30, + 78 + ], + [ + 31, + 13 + ], + [ + 31, + 23 + ], + [ + 31, + 30 + ], + [ + 31, + 32 + ], + [ + 31, + 39 + ], + [ + 31, + 50 + ], + [ + 31, + 71 + ], + [ + 31, + 89 + ], + [ + 31, + 94 + ], + [ + 32, + 14 + ], + [ + 33, + 5 + ], + [ + 33, + 25 + ], + [ + 33, + 34 + ], + [ + 33, + 37 + ], + [ + 33, + 56 + ], + [ + 33, + 61 + ], + [ + 33, + 63 + ], + [ + 33, + 68 + ], + [ + 33, + 91 + ], + [ + 33, + 96 + ], + [ + 34, + 6 + ], + [ + 37, + 5 + ], + [ + 37, + 41 + ], + [ + 39, + 6 + ], + [ + 40, + 1 + ], + [ + 40, + 5 + ], + [ + 40, + 41 + ], + [ + 40, + 46 + ], + [ + 42, + 6 + ], + [ + 42, + 41 + ], + [ + 42, + 46 + ], + [ + 45, + 1 + ], + [ + 45, + 6 + ], + [ + 48, + 12 + ], + [ + 48, + 13 + ], + [ + 48, + 41 + ], + [ + 48, + 46 + ], + [ + 50, + 81 + ], + [ + 51, + 12 + ], + [ + 51, + 96 + ], + [ + 53, + 10 + ], + [ + 55, + 15 + ], + [ + 55, + 42 + ], + [ + 55, + 51 + ], + [ + 55, + 71 + ], + [ + 55, + 78 + ], + [ + 55, + 102 + ], + [ + 56, + 41 + ], + [ + 56, + 102 + ], + [ + 58, + 10 + ], + [ + 58, + 12 + ], + [ + 59, + 51 + ], + [ + 59, + 74 + ], + [ + 61, + 12 + ], + [ + 61, + 68 + ], + [ + 62, + 11 + ], + [ + 62, + 39 + ], + [ + 62, + 53 + ], + [ + 62, + 56 + ], + [ + 62, + 61 + ], + [ + 62, + 63 + ], + [ + 62, + 78 + ], + [ + 62, + 91 + ], + [ + 63, + 18 + ], + [ + 63, + 54 + ], + [ + 65, + 7 + ], + [ + 65, + 94 + ], + [ + 66, + 8 + ], + [ + 66, + 28 + ], + [ + 66, + 50 + ], + [ + 66, + 51 + ], + [ + 66, + 59 + ], + [ + 66, + 65 + ], + [ + 66, + 68 + ], + [ + 66, + 73 + ], + [ + 66, + 89 + ], + [ + 67, + 20 + ], + [ + 67, + 50 + ], + [ + 67, + 51 + ], + [ + 67, + 56 + ], + [ + 67, + 65 + ], + [ + 67, + 68 + ], + [ + 67, + 71 + ], + [ + 67, + 84 + ], + [ + 67, + 96 + ], + [ + 68, + 83 + ], + [ + 70, + 7 + ], + [ + 70, + 14 + ], + [ + 70, + 54 + ], + [ + 71, + 7 + ], + [ + 73, + 40 + ], + [ + 73, + 46 + ], + [ + 73, + 74 + ], + [ + 76, + 7 + ], + [ + 76, + 14 + ], + [ + 76, + 81 + ], + [ + 76, + 83 + ], + [ + 78, + 46 + ], + [ + 80, + 1 + ], + [ + 80, + 3 + ], + [ + 80, + 8 + ], + [ + 80, + 46 + ], + [ + 82, + 1 + ], + [ + 82, + 74 + ], + [ + 82, + 81 + ], + [ + 82, + 83 + ], + [ + 84, + 1 + ], + [ + 84, + 3 + ], + [ + 84, + 81 + ], + [ + 84, + 83 + ], + [ + 87, + 14 + ], + [ + 87, + 58 + ], + [ + 87, + 83 + ], + [ + 89, + 3 + ], + [ + 89, + 56 + ], + [ + 90, + 4 + ], + [ + 90, + 28 + ], + [ + 90, + 30 + ], + [ + 90, + 34 + ], + [ + 90, + 87 + ], + [ + 90, + 91 + ], + [ + 91, + 3 + ], + [ + 93, + 32 + ], + [ + 93, + 40 + ], + [ + 93, + 70 + ], + [ + 93, + 71 + ], + [ + 93, + 94 + ], + [ + 93, + 98 + ], + [ + 94, + 54 + ], + [ + 96, + 1 + ], + [ + 96, + 59 + ], + [ + 97, + 2 + ], + [ + 97, + 25 + ], + [ + 97, + 28 + ], + [ + 97, + 34 + ], + [ + 97, + 63 + ], + [ + 97, + 65 + ], + [ + 97, + 91 + ], + [ + 97, + 98 + ], + [ + 97, + 100 + ], + [ + 98, + 1 + ], + [ + 100, + 1 + ], + [ + 100, + 46 + ], + [ + 100, + 54 + ], + [ + 100, + 74 + ], + [ + 102, + 74 + ], + [ + 102, + 89 + ], + [ + 103, + 18 + ], + [ + 103, + 58 + ], + [ + 103, + 59 + ], + [ + 103, + 82 + ], + [ + 103, + 98 + ] + ], + "extra_cover": [ + { + "sources": [ + 96 + ], + "targets": [ + 0, + 2, + 33, + 44, + 55, + 71, + 79, + 97, + 98 + ] + }, + { + "sources": [ + 96 + ], + "targets": [ + 0, + 2, + 44, + 51, + 55, + 71, + 79, + 97, + 98 + ] + }, + { + "sources": [ + 96 + ], + "targets": [ + 0, + 2, + 67, + 71, + 79, + 90 + ] + }, + { + "sources": [ + 91 + ], + "targets": [ + 0, + 4, + 9, + 17, + 33 + ] + }, + { + "sources": [ + 91 + ], + "targets": [ + 0, + 4, + 9, + 17, + 90 + ] + }, + { + "sources": [ + 91 + ], + "targets": [ + 0, + 4, + 9, + 17, + 97 + ] + }, + { + "sources": [ + 34 + ], + "targets": [ + 0, + 5, + 27, + 33, + 43, + 50 + ] + }, + { + "sources": [ + 34 + ], + "targets": [ + 0, + 5, + 27, + 43, + 50, + 90 + ] + }, + { + "sources": [ + 34 + ], + "targets": [ + 0, + 5, + 27, + 43, + 50, + 97 + ] + }, + { + "sources": [ + 0, + 1, + 6, + 12, + 20, + 24, + 29, + 96, + 100 + ], + "targets": [ + 2 + ] + }, + { + "sources": [ + 0, + 1, + 12, + 15, + 20, + 24, + 29, + 96, + 100 + ], + "targets": [ + 2 + ] + }, + { + "sources": [ + 0, + 3, + 7, + 20, + 29, + 96 + ], + "targets": [ + 2 + ] + }, + { + "sources": [ + 0, + 1, + 53, + 69, + 91 + ], + "targets": [ + 4 + ] + }, + { + "sources": [ + 0, + 3, + 53, + 69, + 91 + ], + "targets": [ + 4 + ] + }, + { + "sources": [ + 0, + 6, + 53, + 69, + 91 + ], + "targets": [ + 4 + ] + }, + { + "sources": [ + 41, + 53, + 69, + 91 + ], + "targets": [ + 4 + ] + }, + { + "sources": [ + 46, + 48, + 53, + 64, + 69, + 87, + 91 + ], + "targets": [ + 4 + ] + }, + { + "sources": [ + 91 + ], + "targets": [ + 4, + 9, + 17, + 26, + 78, + 85, + 89 + ] + }, + { + "sources": [ + 91 + ], + "targets": [ + 4, + 9, + 17, + 62 + ] + }, + { + "sources": [ + 0, + 1, + 34, + 60, + 76, + 81 + ], + "targets": [ + 5 + ] + }, + { + "sources": [ + 0, + 3, + 34, + 60, + 76, + 81 + ], + "targets": [ + 5 + ] + }, + { + "sources": [ + 0, + 6, + 34, + 60, + 76, + 81 + ], + "targets": [ + 5 + ] + }, + { + "sources": [ + 34, + 37, + 57, + 60, + 73, + 76, + 81, + 83 + ], + "targets": [ + 5 + ] + }, + { + "sources": [ + 34 + ], + "targets": [ + 5, + 10, + 18, + 27, + 39, + 43, + 50, + 66 + ] + }, + { + "sources": [ + 3, + 7, + 37, + 57, + 68, + 88 + ], + "targets": [ + 8 + ] + }, + { + "sources": [ + 6, + 12, + 37, + 57, + 68 + ], + "targets": [ + 8 + ] + }, + { + "sources": [ + 12, + 37, + 42, + 52, + 57, + 68, + 73 + ], + "targets": [ + 8 + ] + }, + { + "sources": [ + 37, + 52, + 57, + 68, + 73, + 83 + ], + "targets": [ + 8 + ] + }, + { + "sources": [ + 68 + ], + "targets": [ + 8, + 10, + 16, + 18, + 39, + 55, + 61 + ] + }, + { + "sources": [ + 68 + ], + "targets": [ + 8, + 10, + 16, + 18, + 39, + 66 + ] + }, + { + "sources": [ + 68 + ], + "targets": [ + 8, + 10, + 33, + 39, + 55 + ] + }, + { + "sources": [ + 68 + ], + "targets": [ + 8, + 10, + 39, + 67, + 88, + 90 + ] + }, + { + "sources": [ + 56 + ], + "targets": [ + 9, + 11, + 17, + 19, + 62, + 65 + ] + }, + { + "sources": [ + 56 + ], + "targets": [ + 9, + 11, + 17, + 19, + 65, + 89, + 90 + ] + }, + { + "sources": [ + 3, + 7, + 56, + 72, + 84 + ], + "targets": [ + 11 + ] + }, + { + "sources": [ + 3, + 53, + 56, + 69, + 72, + 84, + 87 + ], + "targets": [ + 11 + ] + }, + { + "sources": [ + 6, + 12, + 38, + 56, + 72, + 84 + ], + "targets": [ + 11 + ] + }, + { + "sources": [ + 38, + 41, + 56, + 72, + 84 + ], + "targets": [ + 11 + ] + }, + { + "sources": [ + 56 + ], + "targets": [ + 11, + 19, + 33, + 38, + 55, + 65 + ] + }, + { + "sources": [ + 56 + ], + "targets": [ + 11, + 19, + 65, + 67, + 90 + ] + }, + { + "sources": [ + 3, + 4, + 5, + 6, + 7, + 12, + 21, + 23, + 30, + 95, + 101 + ], + "targets": [ + 13 + ] + }, + { + "sources": [ + 5, + 6, + 7, + 12, + 14, + 21, + 23, + 30, + 95, + 101 + ], + "targets": [ + 13 + ] + }, + { + "sources": [ + 30 + ], + "targets": [ + 13, + 21, + 31, + 32, + 33, + 34, + 35, + 55, + 67, + 92 + ] + }, + { + "sources": [ + 30 + ], + "targets": [ + 13, + 21, + 32, + 33, + 34, + 35, + 55, + 67, + 90, + 91, + 92 + ] + }, + { + "sources": [ + 7, + 21, + 51, + 52, + 73 + ], + "targets": [ + 15 + ] + }, + { + "sources": [ + 12, + 21, + 51, + 52, + 73 + ], + "targets": [ + 15 + ] + }, + { + "sources": [ + 14, + 42, + 43, + 51, + 52, + 73, + 74, + 82 + ], + "targets": [ + 15 + ] + }, + { + "sources": [ + 51, + 52, + 73, + 83 + ], + "targets": [ + 15 + ] + }, + { + "sources": [ + 51 + ], + "targets": [ + 15, + 16, + 18, + 21, + 55 + ] + }, + { + "sources": [ + 51 + ], + "targets": [ + 15, + 16, + 18, + 21, + 67 + ] + }, + { + "sources": [ + 51 + ], + "targets": [ + 15, + 16, + 18, + 31, + 59, + 60, + 61, + 103 + ] + }, + { + "sources": [ + 51 + ], + "targets": [ + 15, + 16, + 18, + 66 + ] + }, + { + "sources": [ + 41, + 53 + ], + "targets": [ + 17 + ] + }, + { + "sources": [ + 71 + ], + "targets": [ + 17, + 19, + 20, + 62, + 63, + 64, + 65 + ] + }, + { + "sources": [ + 53 + ], + "targets": [ + 17, + 62 + ] + }, + { + "sources": [ + 73, + 83 + ], + "targets": [ + 18 + ] + }, + { + "sources": [ + 73 + ], + "targets": [ + 18, + 66 + ] + }, + { + "sources": [ + 7, + 21, + 40, + 71, + 85 + ], + "targets": [ + 20 + ] + }, + { + "sources": [ + 12, + 21, + 40, + 71, + 85 + ], + "targets": [ + 20 + ] + }, + { + "sources": [ + 14, + 21, + 40, + 71, + 85 + ], + "targets": [ + 20 + ] + }, + { + "sources": [ + 40, + 41, + 53, + 71, + 72, + 84, + 85 + ], + "targets": [ + 20 + ] + }, + { + "sources": [ + 40, + 41, + 54, + 71, + 85 + ], + "targets": [ + 20 + ] + }, + { + "sources": [ + 71 + ], + "targets": [ + 20, + 21, + 31, + 63, + 64 + ] + }, + { + "sources": [ + 71 + ], + "targets": [ + 20, + 21, + 55, + 63, + 64 + ] + }, + { + "sources": [ + 71 + ], + "targets": [ + 20, + 21, + 63, + 64, + 67 + ] + }, + { + "sources": [ + 71 + ], + "targets": [ + 20, + 62, + 63, + 64, + 93 + ] + }, + { + "sources": [ + 32 + ], + "targets": [ + 22, + 23, + 28, + 29, + 31, + 103 + ] + }, + { + "sources": [ + 32 + ], + "targets": [ + 22, + 23, + 28, + 29, + 93 + ] + }, + { + "sources": [ + 102 + ], + "targets": [ + 22, + 31, + 55, + 58, + 60, + 61 + ] + }, + { + "sources": [ + 102 + ], + "targets": [ + 22, + 31, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 93, + 103 + ] + }, + { + "sources": [ + 94 + ], + "targets": [ + 22, + 31, + 66, + 68, + 69, + 70, + 103 + ] + }, + { + "sources": [ + 94 + ], + "targets": [ + 22, + 66, + 68, + 69, + 70, + 93 + ] + }, + { + "sources": [ + 13, + 32, + 44, + 45, + 79, + 80, + 81 + ], + "targets": [ + 23 + ] + }, + { + "sources": [ + 14, + 22, + 32, + 74, + 79, + 80 + ], + "targets": [ + 23 + ] + }, + { + "sources": [ + 22, + 32, + 54, + 79, + 80 + ], + "targets": [ + 23 + ] + }, + { + "sources": [ + 32, + 46, + 79, + 80, + 81 + ], + "targets": [ + 23 + ] + }, + { + "sources": [ + 32 + ], + "targets": [ + 23, + 24, + 25, + 27, + 28, + 29, + 30 + ] + }, + { + "sources": [ + 32 + ], + "targets": [ + 23, + 26, + 27, + 28, + 29 + ] + }, + { + "sources": [ + 50 + ], + "targets": [ + 24, + 25, + 30, + 67, + 71, + 76, + 77 + ] + }, + { + "sources": [ + 50 + ], + "targets": [ + 24, + 27, + 30, + 75, + 76 + ] + }, + { + "sources": [ + 50 + ], + "targets": [ + 24, + 30, + 31, + 76, + 103 + ] + }, + { + "sources": [ + 50 + ], + "targets": [ + 24, + 30, + 66, + 75, + 76 + ] + }, + { + "sources": [ + 45, + 81 + ], + "targets": [ + 25 + ] + }, + { + "sources": [ + 45 + ], + "targets": [ + 25, + 27 + ] + }, + { + "sources": [ + 65 + ], + "targets": [ + 25, + 27, + 77, + 84 + ] + }, + { + "sources": [ + 65 + ], + "targets": [ + 25, + 66, + 77, + 84, + 88 + ] + }, + { + "sources": [ + 65 + ], + "targets": [ + 25, + 67, + 71, + 77, + 79, + 84, + 90 + ] + }, + { + "sources": [ + 65 + ], + "targets": [ + 25, + 71, + 77, + 79, + 84, + 97, + 98 + ] + }, + { + "sources": [ + 25 + ], + "targets": [ + 26, + 27, + 33, + 39, + 43, + 45, + 50, + 52, + 56, + 62, + 99 + ] + }, + { + "sources": [ + 25 + ], + "targets": [ + 26, + 27, + 43, + 45, + 50, + 52, + 56, + 62, + 97, + 99 + ] + }, + { + "sources": [ + 17 + ], + "targets": [ + 26, + 27, + 47, + 50, + 52, + 53, + 56, + 57, + 59, + 62, + 93, + 103 + ] + }, + { + "sources": [ + 18 + ], + "targets": [ + 26, + 27, + 72, + 73, + 75, + 78 + ] + }, + { + "sources": [ + 28 + ], + "targets": [ + 26, + 27, + 72, + 78, + 80, + 85, + 89 + ] + }, + { + "sources": [ + 98 + ], + "targets": [ + 26, + 27, + 99, + 100, + 101, + 102 + ] + }, + { + "sources": [ + 80 + ], + "targets": [ + 26, + 28 + ] + }, + { + "sources": [ + 78 + ], + "targets": [ + 26, + 28, + 29, + 48, + 49, + 51 + ] + }, + { + "sources": [ + 61 + ], + "targets": [ + 26, + 28, + 42, + 44, + 49, + 51, + 97, + 98 + ] + }, + { + "sources": [ + 63 + ], + "targets": [ + 26, + 40, + 47, + 95, + 96 + ] + }, + { + "sources": [ + 48 + ], + "targets": [ + 26, + 78 + ] + }, + { + "sources": [ + 76 + ], + "targets": [ + 27, + 50 + ] + }, + { + "sources": [ + 59 + ], + "targets": [ + 27, + 75, + 82, + 86, + 90, + 91 + ] + }, + { + "sources": [ + 46, + 80 + ], + "targets": [ + 28 + ] + }, + { + "sources": [ + 78 + ], + "targets": [ + 28, + 29, + 30, + 31, + 48, + 49, + 51 + ] + }, + { + "sources": [ + 13, + 14 + ], + "targets": [ + 30 + ] + }, + { + "sources": [ + 13 + ], + "targets": [ + 30, + 31 + ] + }, + { + "sources": [ + 23 + ], + "targets": [ + 31, + 32 + ] + }, + { + "sources": [ + 39 + ], + "targets": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 55, + 94 + ] + }, + { + "sources": [ + 89 + ], + "targets": [ + 31, + 32, + 67, + 87, + 88, + 92, + 103 + ] + }, + { + "sources": [ + 14, + 23 + ], + "targets": [ + 32 + ] + }, + { + "sources": [ + 89 + ], + "targets": [ + 32, + 66, + 67, + 86, + 87, + 88, + 90, + 91, + 92 + ] + }, + { + "sources": [ + 89 + ], + "targets": [ + 32, + 67, + 86, + 87, + 88, + 90, + 91, + 92, + 102, + 103 + ] + }, + { + "sources": [ + 5 + ], + "targets": [ + 33, + 34 + ] + }, + { + "sources": [ + 63 + ], + "targets": [ + 33, + 34, + 36, + 40, + 94, + 95, + 96 + ] + }, + { + "sources": [ + 61 + ], + "targets": [ + 33, + 38, + 42, + 44, + 55, + 97, + 98 + ] + }, + { + "sources": [ + 37 + ], + "targets": [ + 33, + 39 + ] + }, + { + "sources": [ + 5, + 6 + ], + "targets": [ + 34 + ] + }, + { + "sources": [ + 39 + ], + "targets": [ + 36, + 37, + 38, + 62, + 93, + 94 + ] + }, + { + "sources": [ + 5, + 6, + 12, + 14, + 23, + 38, + 39, + 70, + 86, + 101 + ], + "targets": [ + 37 + ] + }, + { + "sources": [ + 38, + 39, + 41, + 54, + 70, + 86 + ], + "targets": [ + 37 + ] + }, + { + "sources": [ + 61 + ], + "targets": [ + 38, + 42, + 44, + 62, + 97, + 98 + ] + }, + { + "sources": [ + 6, + 37 + ], + "targets": [ + 39 + ] + }, + { + "sources": [ + 1, + 2, + 63, + 92 + ], + "targets": [ + 40 + ] + }, + { + "sources": [ + 2, + 5, + 6, + 63, + 70, + 86, + 92 + ], + "targets": [ + 40 + ] + }, + { + "sources": [ + 2, + 41, + 47, + 54, + 63, + 92 + ], + "targets": [ + 40 + ] + }, + { + "sources": [ + 2, + 46, + 47, + 63, + 92 + ], + "targets": [ + 40 + ] + }, + { + "sources": [ + 63 + ], + "targets": [ + 40, + 47, + 62, + 93, + 95, + 96 + ] + }, + { + "sources": [ + 63 + ], + "targets": [ + 40, + 95, + 96, + 97 + ] + }, + { + "sources": [ + 1, + 6, + 12, + 24, + 38, + 61, + 100 + ], + "targets": [ + 42 + ] + }, + { + "sources": [ + 1, + 15, + 24, + 46, + 61, + 77, + 80, + 100 + ], + "targets": [ + 42 + ] + }, + { + "sources": [ + 1, + 24, + 38, + 41, + 61, + 100 + ], + "targets": [ + 42 + ] + }, + { + "sources": [ + 1, + 11, + 16, + 25, + 41, + 46, + 60, + 76, + 81, + 99 + ], + "targets": [ + 45 + ] + }, + { + "sources": [ + 6, + 11, + 16, + 25, + 37, + 41, + 46, + 60, + 76, + 81, + 99 + ], + "targets": [ + 45 + ] + }, + { + "sources": [ + 78 + ], + "targets": [ + 47, + 48, + 49, + 51, + 62, + 93 + ] + }, + { + "sources": [ + 12, + 15, + 77, + 78 + ], + "targets": [ + 48 + ] + }, + { + "sources": [ + 13, + 14, + 15, + 77, + 78, + 79, + 80 + ], + "targets": [ + 48 + ] + }, + { + "sources": [ + 15, + 41, + 47, + 54, + 77, + 78 + ], + "targets": [ + 48 + ] + }, + { + "sources": [ + 15, + 46, + 47, + 77, + 78 + ], + "targets": [ + 48 + ] + }, + { + "sources": [ + 78 + ], + "targets": [ + 48, + 49, + 51, + 55 + ] + }, + { + "sources": [ + 76, + 81 + ], + "targets": [ + 50 + ] + }, + { + "sources": [ + 12, + 15 + ], + "targets": [ + 51 + ] + }, + { + "sources": [ + 15 + ], + "targets": [ + 51, + 55 + ] + }, + { + "sources": [ + 10, + 11, + 16, + 17, + 41, + 46, + 47, + 54, + 74, + 76, + 81, + 82 + ], + "targets": [ + 53 + ] + }, + { + "sources": [ + 42 + ], + "targets": [ + 55, + 61 + ] + }, + { + "sources": [ + 11, + 41 + ], + "targets": [ + 56 + ] + }, + { + "sources": [ + 11 + ], + "targets": [ + 56, + 62 + ] + }, + { + "sources": [ + 10, + 11, + 14, + 22, + 41, + 42, + 43, + 54, + 74, + 82, + 102 + ], + "targets": [ + 58 + ] + }, + { + "sources": [ + 12, + 14, + 22, + 42, + 43, + 102 + ], + "targets": [ + 58 + ] + }, + { + "sources": [ + 74, + 82 + ], + "targets": [ + 59 + ] + }, + { + "sources": [ + 82 + ], + "targets": [ + 59, + 103 + ] + }, + { + "sources": [ + 12, + 42 + ], + "targets": [ + 61 + ] + }, + { + "sources": [ + 40, + 54 + ], + "targets": [ + 63 + ] + }, + { + "sources": [ + 94 + ], + "targets": [ + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70 + ] + }, + { + "sources": [ + 18 + ], + "targets": [ + 63, + 66, + 68, + 69, + 72, + 73, + 75, + 78, + 93 + ] + }, + { + "sources": [ + 40 + ], + "targets": [ + 63, + 93 + ] + }, + { + "sources": [ + 7, + 84 + ], + "targets": [ + 65 + ] + }, + { + "sources": [ + 84 + ], + "targets": [ + 65, + 67 + ] + }, + { + "sources": [ + 8 + ], + "targets": [ + 66, + 68 + ] + }, + { + "sources": [ + 18 + ], + "targets": [ + 66, + 68, + 69, + 72, + 73, + 75, + 78, + 103 + ] + }, + { + "sources": [ + 28 + ], + "targets": [ + 66, + 68, + 72, + 78, + 80, + 85, + 89 + ] + }, + { + "sources": [ + 59 + ], + "targets": [ + 66, + 75, + 82, + 86, + 90, + 91 + ] + }, + { + "sources": [ + 20 + ], + "targets": [ + 67, + 71 + ] + }, + { + "sources": [ + 8, + 83 + ], + "targets": [ + 68 + ] + }, + { + "sources": [ + 7, + 8, + 9, + 40, + 83, + 84, + 85, + 94 + ], + "targets": [ + 70 + ] + }, + { + "sources": [ + 8, + 9, + 14, + 22, + 74, + 83, + 94 + ], + "targets": [ + 70 + ] + }, + { + "sources": [ + 8, + 9, + 22, + 54, + 83, + 94 + ], + "targets": [ + 70 + ] + }, + { + "sources": [ + 7, + 20 + ], + "targets": [ + 71 + ] + }, + { + "sources": [ + 8, + 9, + 18, + 19, + 40, + 48, + 54, + 75, + 83 + ], + "targets": [ + 73 + ] + }, + { + "sources": [ + 8, + 9, + 18, + 19, + 48, + 74, + 75, + 83 + ], + "targets": [ + 73 + ] + }, + { + "sources": [ + 18, + 19, + 46, + 48, + 75, + 81 + ], + "targets": [ + 73 + ] + }, + { + "sources": [ + 59 + ], + "targets": [ + 75, + 82, + 86, + 90, + 91, + 103 + ] + }, + { + "sources": [ + 7, + 13, + 20, + 44, + 45, + 49, + 50 + ], + "targets": [ + 76 + ] + }, + { + "sources": [ + 13, + 14, + 44, + 50, + 74 + ], + "targets": [ + 76 + ] + }, + { + "sources": [ + 13, + 44, + 45, + 49, + 50, + 81 + ], + "targets": [ + 76 + ] + }, + { + "sources": [ + 13, + 44, + 50, + 75, + 83 + ], + "targets": [ + 76 + ] + }, + { + "sources": [ + 46, + 48 + ], + "targets": [ + 78 + ] + }, + { + "sources": [ + 1, + 28, + 64, + 87, + 99 + ], + "targets": [ + 80 + ] + }, + { + "sources": [ + 3, + 28, + 64, + 87 + ], + "targets": [ + 80 + ] + }, + { + "sources": [ + 8, + 19, + 28, + 48, + 64, + 83, + 87 + ], + "targets": [ + 80 + ] + }, + { + "sources": [ + 19, + 28, + 46, + 48, + 64, + 81, + 87 + ], + "targets": [ + 80 + ] + }, + { + "sources": [ + 28 + ], + "targets": [ + 80, + 85, + 89, + 90 + ] + }, + { + "sources": [ + 28 + ], + "targets": [ + 80, + 85, + 89, + 97, + 99 + ] + }, + { + "sources": [ + 1, + 2, + 3, + 4, + 35, + 36, + 58, + 59 + ], + "targets": [ + 82 + ] + }, + { + "sources": [ + 3, + 4, + 35, + 36, + 58, + 59, + 74 + ], + "targets": [ + 82 + ] + }, + { + "sources": [ + 3, + 4, + 35, + 36, + 58, + 59, + 81 + ], + "targets": [ + 82 + ] + }, + { + "sources": [ + 3, + 4, + 36, + 59, + 75, + 83 + ], + "targets": [ + 82 + ] + }, + { + "sources": [ + 59 + ], + "targets": [ + 82, + 86, + 90, + 91, + 96, + 97, + 101, + 102 + ] + }, + { + "sources": [ + 1, + 20, + 29, + 45, + 49, + 65, + 100 + ], + "targets": [ + 84 + ] + }, + { + "sources": [ + 3, + 7, + 20, + 29, + 45, + 49, + 65 + ], + "targets": [ + 84 + ] + }, + { + "sources": [ + 45, + 49, + 65, + 81 + ], + "targets": [ + 84 + ] + }, + { + "sources": [ + 45, + 49, + 65, + 83, + 88 + ], + "targets": [ + 84 + ] + }, + { + "sources": [ + 3, + 4, + 7, + 23, + 36, + 58, + 74, + 88, + 89, + 95 + ], + "targets": [ + 87 + ] + }, + { + "sources": [ + 3, + 4, + 7, + 23, + 36, + 83, + 88, + 89, + 95 + ], + "targets": [ + 87 + ] + }, + { + "sources": [ + 7, + 14, + 23, + 74, + 88, + 89, + 95 + ], + "targets": [ + 87 + ] + }, + { + "sources": [ + 3, + 87 + ], + "targets": [ + 89 + ] + }, + { + "sources": [ + 87 + ], + "targets": [ + 89, + 90 + ] + }, + { + "sources": [ + 4 + ], + "targets": [ + 90, + 91 + ] + }, + { + "sources": [ + 3, + 4 + ], + "targets": [ + 91 + ] + }, + { + "sources": [ + 70 + ], + "targets": [ + 93, + 94 + ] + }, + { + "sources": [ + 98 + ], + "targets": [ + 93, + 94, + 95, + 96, + 100, + 101, + 102 + ] + }, + { + "sources": [ + 54, + 70 + ], + "targets": [ + 94 + ] + }, + { + "sources": [ + 98 + ], + "targets": [ + 95, + 96, + 97, + 100, + 101, + 102 + ] + }, + { + "sources": [ + 1, + 2 + ], + "targets": [ + 96 + ] + }, + { + "sources": [ + 2 + ], + "targets": [ + 96, + 97 + ] + }, + { + "sources": [ + 100 + ], + "targets": [ + 97, + 98 + ] + }, + { + "sources": [ + 1, + 100 + ], + "targets": [ + 98 + ] + }, + { + "sources": [ + 1, + 2, + 35, + 58, + 92, + 98 + ], + "targets": [ + 100 + ] + }, + { + "sources": [ + 2, + 35, + 54, + 58, + 70, + 92, + 98 + ], + "targets": [ + 100 + ] + }, + { + "sources": [ + 35, + 46, + 58, + 81, + 98, + 99 + ], + "targets": [ + 100 + ] + }, + { + "sources": [ + 35, + 58, + 74, + 98 + ], + "targets": [ + 100 + ] + }, + { + "sources": [ + 98 + ], + "targets": [ + 100, + 101, + 102, + 103 + ] + }, + { + "sources": [ + 58, + 74 + ], + "targets": [ + 102 + ] + }, + { + "sources": [ + 58 + ], + "targets": [ + 102, + 103 + ] + } + ] +} diff --git a/research/p104-no-relay-cover-audit/README.md b/research/p104-no-relay-cover-audit/README.md new file mode 100644 index 0000000000..53d08ad013 --- /dev/null +++ b/research/p104-no-relay-cover-audit/README.md @@ -0,0 +1,233 @@ +# P104 no-relay correction: exact access-cover minimum 4,580 + +The frozen P104 source/target frame paths require **at least 4,580 monotone +carrier lifetimes without relays** to supply `C = I - G/2`, under the explicit +model below. This strengthens Philippe Van Velzen's **4,480** lower bound and +independently validates its weighted-cover calculation. + +The access-cover relaxation has minimum **exactly 4,580**: a 0/1 dual marks +4,580 required correction entries, and a matching primal uses 4,580 admissible +rectangles to cover all 4,992 entries. Each carrier covers at most one marked +entry. See [CERTIFICATE.json](CERTIFICATE.json) and [RESULT.json](RESULT.json). + +This is a finite certificate and written scoped proof. **The upper certificate +is a support cover, not a scheduled 4,580-carrier circuit.** It ignores scalar +coefficient compatibility, availability within each read/write phase and dirty +restoration. No supplier, paid recursive profile, simultaneous-stock bound or +new κ is claimed. Evidence is author-checked, with two separately implemented +certificate replays; no independent human review or proof assistant is claimed. +The claim is in [Discussion #2245](https://github.com/CrocSwap/integer-mult-bounds/discussions/2245#discussioncomment-18942790). + +## Delta and predecessors + +Philippe Van Velzen's [correction screen](https://github.com/philippeVV/integer-mult-bounds/tree/7dfc7a176d7de4e7eabaf553a0b187c1bd647546/research/p104-correction-screen), +at `7dfc7a176d7de4e7eabaf553a0b187c1bd647546`, introduced the no-relay +frame-chain screen. Its 4,480 floor is the ceiling of `24831791/5544`. The +statement that one carrier covers at most 12 entries alone gives only +`ceil(4992/12)=416`; the stronger result uses nonuniform weights. We reproduce +its fraction and per-entry capacities, give the explicit program-to-cover +implication, and strengthen it with matching primal/dual certificates. This +refines its relaxation; it does not claim the predecessor's bound was false. + +[PR #2353](https://github.com/CrocSwap/integer-mult-bounds/pull/2353), head +`2704eadf6b5205d4b965e9c6fc6dce28b89783cf`, independently audits the **208** +monotone-relay floor and explicitly excludes this no-relay calculation. +Its freely retimed relay theorem and this frozen-clock no-relay theorem have +different hypotheses. PRs #2251/#2345/#2358 concern pooled correction dimensions. +This account's PR #2172 prices cut-2429 nested exchanges and PR #2190 concerns +a fixed room's capture order. None supplies this access-cover optimum. + +## Model and chronological premise + +Keep the **unchanged order** of all 4,058 events in PR #1972's word, retained +by [PR #1991](https://github.com/CrocSwap/integer-mult-bounds/pull/1991). +There are 104 independent sources `X_s` and 104 targets `Y_t`. Frames are +subspaces of `F2^9`; equality and inclusion are independent of basis choice. +The correction network inserts operations between original events and may +not retime the original X/Y paths. + +A carrier lifetime starts with source-independent contents, possibly arbitrary +dirty data. It may read original sources, perform input-independent rational +scalar linear operations on itself, and add its contents to targets, always +in an equal frame. It may follow any nested increasing frame chain, including +jumps and arbitrary intermediate frames. Transport preserves logical scalar +coefficients. Reinitializing a physical register starts a new lifetime. +There are no helper-to-helper value transfers, target reads, retained-channel +helper reads, source writes, source-dependent initialization, descending +transports or cross-frame source access. Targets receive additive writes only. +Dirty restoration is relaxed, which can only favor a proposed construction. + +The exact frame replay checks that every X starts in a line and ends in the +full nine-dimensional frame, every Y starts at zero and ends at dimension +eight, the original word never writes X or reads Y, and: + +``` +last source transport: cut 1533 +first target transport: cut 2526 +``` + +A cut counts completed original events. A carrier reading a full-frame source +cannot later enter a target frame monotonically. A source-dependent carrier +cannot write at the zero frame: all source labels are nonzero and its initial +source projection is zero. Thus every useful source read precedes every useful +target write. Direct source-dependent X-to-Y writes are also unavailable on +the frozen clock. + +The separation hypothesis matters. A checked two-dimensional boundary example +reads `x0` and writes `y0` in ``, climbs to ``, then reads `x1` and +writes `y1`. One carrier produces triangular support +`{(y0,x0),(y1,x0),(y1,x1)}`. Its two diagonal entries cannot share a rectangle +in the separated-read/write model. This is not a P104 counterexample; it +shows why arbitrary retiming cannot silently be imported from the relay model. + +## Carrier envelope and complete enumeration + +Let `S(V)` be the source indices whose retained path visits frame V, and +`T(W)` the target indices whose path visits nonzero frame W. The source +contact frames of a carrier form a chain ending at V; its target contact +frames form a chain starting at W, with `V <= W`. Its matrix contribution +therefore has support inside + +``` +B x A, where A = union S(U) along a source chain ending at V, + B = union T(Z) along a target chain starting at W, V <= W. +``` + +Granting all contacts at each visited frame is a favorable relaxation. +Intermediate frames without original contacts can be removed. Coefficients +need not be constant on a rectangle: only support containment is used. +Repeated writes, self-rescaling and cancellations cannot create source +dependence outside this envelope. + +The primary checker computes all maximal source unions by + +``` +A(V) = maximal({S(V)} union {S(V) union a : U < V, a in A(U)}), +``` + +and target unions by the reversed recurrence. Dimension gives an acyclic +ordering. Induction covers every contact chain. Dropping contained unions is +safe because extension uses union; dropping contained rectangles preserves +nonnegative dual constraints and set-cover minimization. + +The reconstruction gives 221 source frames, 220 nonzero target frames, 550 +maximal source-chain unions, 549 maximal target-chain unions and 5,724 nested +frame pairs. Its 5,804 rectangles reduce to **4,638 maximal rectangles**. +The separate `independent.py` uses explicit sets and complete recursive chains, +without prefix dominance pruning or primary-checker imports. It generates +**6,942** rectangles and checks the same primal/dual on that larger family. + +The doubled E8 coordinates and the fixture's 16 removed lines reconstruct C +in sorted port order. Its support has 48 entries per row, hence **4,992**. +The checker also binds this to the frozen frame labels: `C[t,s] != 0` iff +the initial source label lies in Y_t's endpoint. Every rectangle lies in +this support, and their union equals it. Native operator realization remains +inherited; the present checker does not re-prove it. + +## Primal/dual proof + +**4,368** entries occur only in singleton maximal rectangles. They contribute +one dual unit and one necessary cover each. The other **624** entries have +270 nonsingleton maximal rectangles. Their incidence graph splits into +24 three-entry and 24 twenty-three-entry components, with at most 14 choices +per component. + +The certificate lists **212 additional marked entries** and **212 additional +rectangles**. Each replay checks directly that all 4,580 marked entries are +distinct support entries, every admissible rectangle contains at most one, +and the 4,580 selected rectangles cover all 4,992 required entries. + +Every nonzero coefficient of C must have a nonzero contribution from at least +one carrier. Cancellation elsewhere cannot create a nonzero sum from zeros. +Each carrier covers at most one marked entry, proving the **4,580 lifetime +lower bound**. The matching cover proves the relaxation's upper bound. +The fractional cover optimum is also 4,580: its primal and 0/1 dual agree. +No solver or search-status report is trusted for acceptance. + +`generate.py` deterministically proposes the certificate using exhaustive +subset cover and a separate maximum-independent-set search in each component. +The component optimum distribution is `{2:25, 4:4, 6:5, 8:12, 10:2}`. +The replays check the resulting inequalities without rerunning optimization. + +## Reproduce and validation scope + +Python 3.12, standard library only, from the repository root: + +```sh +python3 -I -B research/p104-no-relay-cover-audit/verify.py +python3 -I -O -B research/p104-no-relay-cover-audit/independent.py +python3 scripts/research_package.py --package research/p104-no-relay-cover-audit --check-only +python3 scripts/research_package.py --package research/p104-no-relay-cover-audit +``` + +Expected primary success line: + +``` +PASS_P104_NO_RELAY_COVER_AUDIT pairs=4992 covers=4638 optimum=4580 previous_floor=4480 controls=12 +``` + +The second replay reports `all_chain_rectangles=6942`, `primal=4580`, +`dual=4580` and two additional controls. Both default replays write nothing, +survive `-O`, and work in a Git-free export with the two pinned inputs. +The repository metadata check additionally needs Git provenance. +The registered hook also runs `test_verify.py`: five public-CLI tests cover +a read-only export, source/certificate/receipt corruption, deterministic +regeneration and refusing to overwrite an occupied output path. + +Optional deterministic regeneration uses a fresh output path: + +```sh +python3 -I -B research/p104-no-relay-cover-audit/generate.py --out /tmp/p104-cover-new.json +``` + +The output is byte-identical to `CERTIFICATE.json` in the recorded environment. +The primary `--out NEW.json` writes a fresh receipt exclusively; the ordinary +replay instead compares the recomputed receipt to `RESULT.json`. + +Twelve primary controls cover transport rank, X overwrite, puncture drift, +duplicate/out-of-support/over-capacity dual entries, omitted/inadmissible +primal rectangles, wrong optimum, exhaustive tiny-poset comparison, +interleaved timing, and relay/source-preload boundaries. The second replay +independently checks a missing cover and overweight dual. Exact scientific +input hashes are authenticated before replay. + +Unrun obligations: native phase recipes, all 280 scalar endpoint columns, +chronological coefficient realization, restoration, relay-enabled networks, +retained private descents, global owners/hosting, productive coverage pricing, +precision, all-size/compiler admission, selected cold replay and a complete +multiplication theorem. Neither 4,580 nor 212 is asserted to be a paid child count. + +## Open next questions + +The support relaxation is solved: reweighting it cannot beat 4,580. If a sharper +no-relay model is useful, test actual contact times or coefficient compatibility +on one twenty-three-entry component, starting from its minimum cover. This can +raise a necessary count, but the no-relay route was already unfavorable, so it +should not displace central relay or changed-interface work. + +For a useful construction, allow explicitly priced relays or retained descending +values and derive a replacement envelope. Start with one target's acquisition, +dirty restoration and complete local bill; check the active Discussion #2245 +handoffs first. This certificate does not impose 4,580 on those networks. +Structured questions and blockers are in [TASK.json](TASK.json). + +## Credit and provenance + +Philippe Van Velzen / `philippeVV` supplied the no-relay chain model, per-entry +capacity method and 4,480 floor at the exact fork head above. kumagi / #2353 +supplied the separate relay audit and its explicit scope boundary. Rohan Arun / +#1972 supplies the frozen scalar/frame word at +`fd82d172f46933fd253c2c6de4bd5eaff5429cfd`; Chafik Boukhalfa / #1991 supplies +the native realization and retained inputs. Adam Gall / #1940, Josie Elliston / +#1071, Ali Romman / #1125 and the retained geometry/compiler lineage remain +credited. Gonzalo Mier / #2173, Gareth Davidson / #2251 and AAAmirinu / +#2345/#2358 own the separate pooled-space/prefix results. + +Base: canonical main `0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2`, priority +revision 4. [SOURCES.json](SOURCES.json) pins scientific inputs and catalogue +provenance. No predecessor executable is imported or modified. +[TASK.json](TASK.json) records assignment, scope refinement and overlap. + +Prepared for commdata2338 (@commdata2338), with substantial OpenAI Codex assistance. +OpenAI Codex performed the derivation, implementation, checking and writing. +New work is Apache-2.0; existing source notices remain unchanged. diff --git a/research/p104-no-relay-cover-audit/RESULT.json b/research/p104-no-relay-cover-audit/RESULT.json new file mode 100644 index 0000000000..f465c13f1d --- /dev/null +++ b/research/p104-no-relay-cover-audit/RESULT.json @@ -0,0 +1,70 @@ +{ + "controls": [ + "transport_rank", + "source_overwrite", + "puncture", + "duplicate_packing_pair", + "unsupported_pair", + "packing_capacity", + "missing_cover", + "illegal_cover", + "wrong_optimum", + "exhaustive_tiny_poset", + "interleaved_read_write_boundary", + "relay_or_preloaded_source_boundary" + ], + "enumeration": { + "cover_size_histogram": { + "1": 4368, + "2": 48, + "4": 14, + "5": 50, + "6": 68, + "7": 54, + "8": 12, + "9": 8, + "10": 8, + "11": 6, + "12": 2 + }, + "maximal_rectangles": 4638, + "nested_frame_pairs": 5724, + "raw_rectangles": 5804, + "source_chain_unions": 550, + "source_frames": 221, + "target_chain_unions": 549, + "target_frames": 220 + }, + "predecessor_fractional_certificate": { + "edge_capacity_histogram": { + "1": 4368, + "2": 72, + "4": 14, + "5": 34, + "6": 74, + "7": 187, + "8": 77, + "9": 38, + "10": 42, + "11": 63, + "12": 23 + }, + "fraction": "24831791/5544", + "rounded_floor": 4480 + }, + "primal_dual": { + "correction_pairs": 4992, + "exact_cover_minimum": 4580, + "extra_cover_rectangles": 212, + "extra_packing_pairs": 212, + "forced_singletons": 4368 + }, + "schema_version": 1, + "scope": "Exact frozen-path access-cover relaxation; necessary no-relay carrier-lifetime bound, not an attaining physical circuit or supplier.", + "status": "PASS_P104_NO_RELAY_COVER_AUDIT", + "timing": { + "events": 4058, + "first_target_transport_cut": 2526, + "last_source_transport_cut": 1533 + } +} diff --git a/research/p104-no-relay-cover-audit/SOURCES.json b/research/p104-no-relay-cover-audit/SOURCES.json new file mode 100644 index 0000000000..e35af54e6e --- /dev/null +++ b/research/p104-no-relay-cover-audit/SOURCES.json @@ -0,0 +1,64 @@ +{ + "schema_version": 1, + "base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "e8870e5917057d59b730eb14721a778639eca050", + "sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7" + }, + { + "path": "research/p104-native-channel/inputs/LOWRANK-WITNESS.json", + "usage": "input", + "git_blob": "86beaf424e9f0f800ae3a62797d94ec9386b7706", + "sha256": "0f541bef7f19fdeffd67157684e9f03d785f42c89973632f508fc1a0452b580e" + }, + { + "path": "research/p104-native-channel/inputs/P104-FIXTURE.json", + "usage": "input", + "git_blob": "2e16f99b295bb386fd13bd8fbd57b42ef54143a9", + "sha256": "516c06f6ec3cb84be588c546108de897650288576dd5fbf5fe44b9c5546ad8a4" + } + ], + "reference_sources": [ + { + "head": "7dfc7a176d7de4e7eabaf553a0b187c1bd647546", + "path": "research/p104-correction-screen/README.md", + "git_blob": "111e33de64f064570611ed65b5750196e3251126", + "sha256": "0ece89eea65a1ba39367d1e59b756ef98d7f32abc367e02bdff6a63b582737e1", + "usage": "attribution and audited prior claim; not imported or needed by replay" + }, + { + "head": "7dfc7a176d7de4e7eabaf553a0b187c1bd647546", + "path": "research/p104-correction-screen/verify.py", + "git_blob": "472eeb65b81ba7377750594b43ce5231749b8f4e", + "sha256": "a6719987753f02ad068de7ca290d7f5b281a481849e5767c18a5a5761be563e5", + "usage": "attribution and audited prior claim; not imported or needed by replay" + }, + { + "head": "7dfc7a176d7de4e7eabaf553a0b187c1bd647546", + "path": "research/p104-correction-screen/RESULTS.json", + "git_blob": "b28165dfdc125cfb821b8438c16216f3e3830581", + "sha256": "102db268fc3e7426219c1cb897618de33171147fa675eebe3b80f6a0217de626", + "usage": "attribution and audited prior claim; not imported or needed by replay" + }, + { + "head": "2704eadf6b5205d4b965e9c6fc6dce28b89783cf", + "path": "research/p104-monotone-relay-floor-audit/README.md", + "git_blob": "a8da976c83eda0c8c5ec7bc2f0f5068edb167c03", + "sha256": "1994370aa479f01b44a55c5f8afadec5e918dc60efac08cd29adbfc5098357e3", + "usage": "attribution and audited prior claim; not imported or needed by replay" + } + ], + "input_origins": { + "LOWRANK-WITNESS.json": "PR1972 fd82d172f46933fd253c2c6de4bd5eaff5429cfd through PR1991", + "P104-FIXTURE.json": "Josie Elliston PR1071 through Adam Gall PR1940 and Rohan Arun PR1972; retained by PR1991" + } +} diff --git a/research/p104-no-relay-cover-audit/TASK.json b/research/p104-no-relay-cover-audit/TASK.json new file mode 100644 index 0000000000..035a49166d --- /dev/null +++ b/research/p104-no-relay-cover-audit/TASK.json @@ -0,0 +1,176 @@ +{ + "schema_version": 1, + "task_id": "independent-moment", + "priority_revision": 4, + "base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "original_card": { + "id": "independent-moment", + "question": "Does one changed supplier or assembly claim lack a source-bound independent check of a specific new implication?", + "starting_points": [ + "certificates/selected-result.json" + ], + "methods": [ + "Reconstruct the rank ledger from original operations rather than trusting its aggregate.", + "Implement certified moment inequalities through a different exact enclosure method." + ], + "acceptance_gate": "Demonstrate independence, source binding, positive cases and semantic failure controls. Name the existing checks and the missing coverage. More digits or another equivalent evaluation of an unchanged root is not by itself new verification coverage.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Record the selected certificate and complex_profile rather than taking a PR headline as input.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "first_experiment": "List the existing independent checks for the exact selected or candidate sources. Pick a new changed input, missing binding or distinct failure mode; stop with a handoff if the proposed arithmetic check is already covered.", + "bottleneck_link": "Independent pricing prevents unsupported frontier claims and can reveal genuine accounting slack.", + "allowed_variations": [ + "Reconstruct either a source ledger or a numeric enclosure with a different method." + ], + "scope_change_triggers": [ + "Importing the primary function and calling its output independent verification." + ], + "overlap_terms": [ + "independent moment", + "rank histogram", + "exact enclosure" + ] + }, + "scope_status": "refined", + "actual_scope": "Independently audit and sharpen the frozen P104 no-relay carrier access-cover bound, including its program-level hypotheses and a matching exact primal/dual certificate.", + "scope_change_reason": "Keep the chosen independent operation-ledger method and target the no-relay cover implication explicitly left unchecked by PR2353. The central P104 support accounting is different from another aggregate moment calculation.", + "bottleneck_link": "P104 completion requires a fully charged correction. This gives an independently checked necessary no-relay lifetime bound and separates it from relay-enabled constructions and paid recursive tariffs.", + "budget_minutes": 60, + "stop_rule": "Stop after a complete source-bound primal/dual proof or an exact missing-hypothesis counterexample; no physical supplier implementation or unbounded search.", + "outcome": "completed", + "evidence": "Exact cover optimum 4580: 4368 forced singleton entries plus 212 additional dual entries and 212 primal rectangles, covering 4992 correction entries. Primary maximal-chain DP and separate full-chain set replay agree. The predecessor fraction 24831791/5544 is reproduced. Twelve primary control groups and two separate certificate controls pass.", + "author": "commdata2338", + "ai_assistance": "Prepared for commdata2338 with substantial OpenAI Codex assistance in derivation, implementation, checking and writing. No independent human review or formal proof assistant is claimed.", + "open_questions": [ + { + "question": "Does chronological or scalar-coefficient compatibility raise the relaxed cover minimum on one 23-entry component?", + "why_it_matters": "It separates support coverage from an actual no-relay correction, though that route already fails the prior favorable screen.", + "first_step": "Extract one minimum component cover from the generator and attach original contact intervals and coefficient equations.", + "blocked_by": "No chronological or coefficient realization is supplied; prioritize central relay work if this refinement has no decision value." + }, + { + "question": "Which explicitly priced relay or retained-descending-value interface can achieve a useful correction?", + "why_it_matters": "Those changes can escape the no-relay envelope; the 4580 floor does not apply to them.", + "first_step": "Check current Discussion2245 claims, then complete one target acquisition and arbitrary-dirty restoration schedule with a full local bill.", + "blocked_by": "Source acquisition, complete physical pricing, hosting and all-size admission remain separate obligations." + } + ], + "selection": { + "nonce": "85db2a599d6e675795633f64d02d7e4c", + "track": "independent-verification", + "task_id": "independent-moment", + "scope_key": "c6f2494b197df3bc3591", + "refined_scope_key": "P104/frozen-frame/no-relay/weighted-cover-program-bound", + "passed_over": [ + { + "task_id": "formal-interface-lemma", + "scope_key": "636f26dec98e26b296e8", + "reason": "The specific unverified source-bound cover implication offers a bounded central audit without a proof-assistant installation." + } + ] + }, + "predecessors": [ + { + "author": "Philippe Van Velzen / philippeVV", + "head": "7dfc7a176d7de4e7eabaf553a0b187c1bd647546", + "url": "https://github.com/philippeVV/integer-mult-bounds/tree/7dfc7a176d7de4e7eabaf553a0b187c1bd647546/research/p104-correction-screen", + "role": "No-relay frame-chain screen and 4480 weighted-cover floor; not executable dependency." + }, + { + "author": "kumagi", + "pr": 2353, + "head": "2704eadf6b5205d4b965e9c6fc6dce28b89783cf", + "role": "Independent 208 relay-floor audit; expressly excludes no-relay calculation." + }, + { + "author": "Rohan Arun", + "pr": 1972, + "head": "fd82d172f46933fd253c2c6de4bd5eaff5429cfd", + "role": "Frozen scalar/frame channel retained in the scientific inputs." + }, + { + "author": "Chafik Boukhalfa", + "pr": 1991, + "head": "6e222517e182e98499239bc9a4009f540e1c5520", + "role": "Native realization and retained source input paths on main." + } + ], + "overlap": { + "queries": [ + "--task independent-moment", + "p104-correction-screen / no-relay / no relay / 4480 / fractional carrier" + ], + "open_prs": { + "fetched_at": "2026-10-15T06:28:56.749233+00:00", + "records": 570, + "complete_pagination": true + }, + "discussions": { + "fetched_at": "2026-10-15T06:31:18.032505+00:00", + "records": 1082, + "complete_pagination": true + }, + "nearest": "Discussion2245/comment18939575; PR2353; PR2251/2345/2358 concern pooled dimensions. This account's PR2172/2190 concern a priced cut and fixed-room scheduling.", + "limitations": "Cached anonymous metadata coverage, including drafts, is not a novelty guarantee; arbitrary code diffs and closed PRs outside local notes are not searched.", + "final": { + "checked_utc": "2026-10-15T07:03:40Z", + "open_prs": { + "fetched_at": "2026-10-15T06:55:23.240869+00:00", + "records": 583, + "complete_pagination": true + }, + "discussions": { + "fetched_at": "2026-10-15T06:57:32.010338+00:00", + "records": 1111, + "complete_pagination": true + }, + "pr_files": { + "fetched_at": "2026-10-15T06:33:04.255876+00:00", + "records": 572, + "complete_pagination": true + }, + "queries": [ + "p104-no-relay-cover-audit / no-relay / no relay / 4580", + "--path research/p104-no-relay* --path research/p104-correction-screen/*" + ], + "finding": "Own claim and predecessor found; no matching indexed PR paths. Adjacent active Y0 acquisition and retained-private-code relay questions change the no-relay premise; PR2367 audits a different prefix rank certificate. Offline coverage may miss newer work." + } + }, + "claim_thread": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2245#discussioncomment-18942790", + "budget_and_limits": "60-minute session; bounded exact enumeration, standard library, no new supplier or exponent. No paid budget is inferred from a carrier count.", + "unrun_obligations": [ + "native phase replay", + "all 280 scalar endpoint columns", + "chronological coefficient realization", + "dirty restoration", + "relay-enabled or retained-helper networks", + "global hosting/owners and productive coverage pricing", + "precision and all-size/compiler admission", + "selected cold replay", + "full multiplication theorem" + ], + "refresh_checkpoint": { + "utc": "2026-10-15T07:02:34Z", + "canonical_main": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "priority_revision": 4, + "changes": "No changes since the scientific base, including guidance, selected record and P104 input files. Continue unchanged." + }, + "validation": { + "python": "CPython 3.12.3", + "registered_replay": "PASS_REGISTERED_RESEARCH_PACKAGE research/p104-no-relay-cover-audit outcome=completed", + "elapsed_seconds": 9.963, + "primary_controls": 12, + "separate_certificate_controls": 2, + "public_cli_tests": 5, + "optimized_git_free_read_only_export": "passed; all bytes unchanged", + "deterministic_regeneration": "byte-identical certificate", + "full_selected_cold_replay": "not run; unrelated supplier unchanged" + } +} diff --git a/research/p104-no-relay-cover-audit/VERIFY.json b/research/p104-no-relay-cover-audit/VERIFY.json new file mode 100644 index 0000000000..5c3606b71b --- /dev/null +++ b/research/p104-no-relay-cover-audit/VERIFY.json @@ -0,0 +1,42 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/p104-native-channel/inputs/LOWRANK-WITNESS.json", + "research/p104-native-channel/inputs/P104-FIXTURE.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Both live source pins, full frame chronology, root/frame binding, complete maximal rectangle DP, matching primal/dual, old weighted bound and 12 semantic controls." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/independent.py" + ], + "timeout_seconds": 120, + "checks": "Separate set-based complete contact-chain enumeration, exact primal/dual certificate and two rejecting controls; no primary checker imports." + }, + { + "argv": [ + "{python}", + "-B", + "{package}/test_verify.py" + ], + "timeout_seconds": 180, + "checks": "Five public-CLI tests: optimized read-only Git-free export; source, certificate and receipt corruption; deterministic generation and exclusive output protection." + } + ] +} diff --git a/research/p104-no-relay-cover-audit/generate.py b/research/p104-no-relay-cover-audit/generate.py new file mode 100644 index 0000000000..4e4c345b74 --- /dev/null +++ b/research/p104-no-relay-cover-audit/generate.py @@ -0,0 +1,108 @@ +#!/usr/bin/env python3 +"""Deterministically reconstruct the certificate; not trusted for acceptance. + +Standard library only. Writes exclusively to the required --out path. +The checker independently verifies the resulting primal/dual inequalities. +""" +import argparse +from collections import defaultdict +from functools import lru_cache +import importlib.util +from itertools import combinations +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +spec = importlib.util.spec_from_file_location("cover_verifier", HERE / "verify.py") +v = importlib.util.module_from_spec(spec) +spec.loader.exec_module(v) + + +def build(support, covers): + nontrivial = [c for c in covers if c.bit_count() > 1] + incidence = defaultdict(set) + for i, c in enumerate(nontrivial): + for e in v.bits(c): + incidence[e].add(i) + unseen = set(incidence) + packing, chosen = [], [] + component_stats = [] + while unseen: + first = min(unseen) + unseen.remove(first) + stack, edges, ids = [first], {first}, set() + while stack: + e = stack.pop() + for i in incidence[e] - ids: + ids.add(i) + for f in v.bits(nontrivial[i]): + if f not in edges: + edges.add(f) + unseen.discard(f) + stack.append(f) + es, ii = sorted(edges), sorted(ids) + options = [nontrivial[i] for i in ii] + whole = sum(1 << e for e in es) + found = None + # At most 14 alternatives in the pinned instance: complete subsets. + v.require(len(options) <= 14, "generator's bounded domain exceeded") + for k in range(1, len(options)+1): + for subset in combinations(range(len(options)), k): + union = 0 + for j in subset: + union |= options[j] + if union == whole: + found = subset + break + if found is not None: + break + v.require(found is not None, "uncovered component") + # A separate maximum independent-set search supplies a 0/1 dual. + local = {e: j for j, e in enumerate(es)} + conflict = [0] * len(es) + for option in options: + mask = sum(1 << local[e] for e in v.bits(option)) + for e in v.bits(option): + conflict[local[e]] |= mask + + @lru_cache(None) + def independent(mask): + if not mask: + return () + j = max(v.bits(mask), key=lambda x: (mask & conflict[x]).bit_count()) + yes = (j,) + independent(mask & ~conflict[j]) + no = independent(mask & ~(1 << j)) + return min((yes, no), key=lambda a: (-len(a), tuple(sorted(a)))) + + packed = sorted(es[j] for j in independent((1 << len(es))-1)) + v.require(len(packed) == len(found), "nonintegral cover component") + packing.extend([[e // v.N, e % v.N] for e in packed]) + for j in found: + entries = list(v.bits(options[j])) + chosen.append({"sources": sorted({e % v.N for e in entries}), + "targets": sorted({e // v.N for e in entries})}) + component_stats.append([len(es), len(options), len(found)]) + result = {"schema_version": 1, + "optimum": sum(c.bit_count() == 1 for c in covers) + len(packing), + "extra_packing": sorted(packing), + "extra_cover": sorted(chosen, key=lambda x: (x["targets"], x["sources"]))} + v.verify_certificate(result, support, covers) + return result, component_stats + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--out", type=Path, required=True) + args = parser.parse_args() + word, fixture = v.authenticate() + support = v.correction(fixture) + paths, _ = v.trace(word) + covers, _ = v.cover_family(paths, support) + certificate, components = build(support, covers) + with args.out.open("x") as f: + f.write(json.dumps(certificate, indent=2) + "\n") + print(f"GENERATED_P104_COVER optimum={certificate['optimum']} components={len(components)} max_edges={max(x[0] for x in components)} max_options={max(x[1] for x in components)}") + + +if __name__ == "__main__": + main() diff --git a/research/p104-no-relay-cover-audit/independent.py b/research/p104-no-relay-cover-audit/independent.py new file mode 100644 index 0000000000..21985a1faf --- /dev/null +++ b/research/p104-no-relay-cover-audit/independent.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python3 +"""Second certificate replay: explicit sets and complete recursive chains. + +Does not import verify.py, generate.py or any predecessor executable. This +checks the cover certificate by a different representation and enumeration, +not the scalar/native channel or all of the primary parser's frame contracts. +Prepared for commdata2338 with substantial OpenAI Codex assistance. Apache-2.0. +""" +from collections import defaultdict +from hashlib import sha256 +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parent.parent + + +def need(ok, message): + if not ok: + raise SystemExit("FAIL_INDEPENDENT: " + message) + + +def subspace(generators): + result = {0} + for g in generators: + result.update([x ^ g for x in tuple(result)]) + return frozenset(result) + + +def all_chains(start, larger, port_sets): + answers = set() + visited = set() + + def walk(frame, ports): + key = (frame, ports) + if key in visited: + return + visited.add(key) + answers.add(ports) + for nxt in port_sets: + if (frame < nxt if larger else nxt < frame): + walk(nxt, ports | port_sets[nxt]) + + walk(start, port_sets[start]) + return answers + + +def main(): + pins = json.loads((HERE / "SOURCES.json").read_text()) + word_path = "research/p104-native-channel/inputs/LOWRANK-WITNESS.json" + pin = next(p for p in pins["files"] if p["path"] == word_path) + raw = (ROOT / word_path).read_bytes() + need(sha256(raw).hexdigest() == pin["sha256"], "word source pin") + word = json.loads(raw) + paths = {r: [subspace(f)] for r, f in word["initial_frames"].items() + if r.startswith(("X", "Y"))} + for event in word["program"]: + if event[0] == "transport" and event[1] in paths: + need(paths[event[1]][-1] == subspace(event[2]), "data transport entry") + frame = subspace(event[3]) + need(paths[event[1]][-1] < frame, "data path is not monotone") + paths[event[1]].append(frame) + source_nodes, target_nodes = defaultdict(set), defaultdict(set) + labels = [] + for i in range(104): + labels.append(next(x for x in paths[f"X{i}"][0] if x)) + for f in paths[f"X{i}"]: + source_nodes[f].add(i) + for f in paths[f"Y{i}"]: + if len(f) > 1: + target_nodes[f].add(i) + source_nodes = {f: frozenset(p) for f, p in source_nodes.items()} + target_nodes = {f: frozenset(p) for f, p in target_nodes.items()} + sc = {f: all_chains(f, False, source_nodes) for f in source_nodes} + tc = {f: all_chains(f, True, target_nodes) for f in target_nodes} + rectangles = set() + for f, aa in sc.items(): + for g, bb in tc.items(): + if f <= g: + rectangles.update(frozenset((t, s) for s in a for t in b) + for a in aa for b in bb) + support = {(t, s) for t in range(104) for s in range(104) + if labels[s] in paths[f"Y{t}"][-1]} + need(set().union(*rectangles) == support, "support coverage") + nonsingle = set().union(*(r for r in rectangles if len(r) > 1)) + forced = support - nonsingle + certificate = json.loads((HERE / "CERTIFICATE.json").read_text()) + extra = [tuple(p) for p in certificate["extra_packing"]] + need(len(set(extra)) == len(extra) and not set(extra) & forced, "dual duplicate") + packing = forced | set(extra) + need(packing <= support, "dual outside support") + need(all(len(r & packing) <= 1 for r in rectangles), "dual capacity") + chosen = [frozenset((t, s) for s in x["sources"] for t in x["targets"]) + for x in certificate["extra_cover"]] + need(len(set(chosen)) == len(chosen), "primal duplicate") + need(all(r in rectangles for r in chosen), "primal rectangle unavailable") + need(forced | set().union(*chosen) == support, "primal coverage") + need(len(packing) == len(forced) + len(chosen) == certificate["optimum"] == 4580, + "primal/dual objective") + # Drop-one primal and add-one dual controls on the reconstructed family. + need(forced | set().union(*chosen[:-1]) != support, "missing cover control") + r = next(r for r in rectangles if len(r) > 1 and r & packing) + bad = packing | {next(e for e in r if e not in packing)} + need(any(len(r & bad) > 1 for r in rectangles), "dual capacity control") + print(f"PASS_INDEPENDENT_P104_COVER pairs={len(support)} all_chain_rectangles={len(rectangles)} forced={len(forced)} primal=4580 dual=4580 controls=2") + + +if __name__ == "__main__": + main() diff --git a/research/p104-no-relay-cover-audit/test_verify.py b/research/p104-no-relay-cover-audit/test_verify.py new file mode 100644 index 0000000000..2d1b4d2037 --- /dev/null +++ b/research/p104-no-relay-cover-audit/test_verify.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 +"""Public-CLI source-export, corruption, and output-safety checks.""" +from contextlib import contextmanager +from hashlib import sha256 +import json +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile +import unittest + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parent.parent +PACKAGE = "research/p104-no-relay-cover-audit" + + +def hashes(root): + return {str(p.relative_to(root)): sha256(p.read_bytes()).hexdigest() + for p in root.rglob("*") if p.is_file()} + + +@contextmanager +def export(): + with tempfile.TemporaryDirectory(prefix="p104-cover-") as tmp: + root = Path(tmp) + shutil.copytree(HERE, root / PACKAGE, ignore=shutil.ignore_patterns("__pycache__")) + manifest = json.loads((HERE / "VERIFY.json").read_text()) + for name in manifest["inputs"]: + dst = root / name + dst.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(ROOT / name, dst) + try: + yield root + finally: + for p in root.rglob("*"): + p.chmod(0o755 if p.is_dir() else 0o644) + root.chmod(0o755) + + +def run(root, script, *args): + return subprocess.run([sys.executable, "-I", "-O", "-B", + str(root / PACKAGE / script), *args], + cwd=root, text=True, capture_output=True, timeout=120) + + +class ReplayTests(unittest.TestCase): + def test_readonly_git_free_export(self): + with export() as root: + before = hashes(root) + for p in root.rglob("*"): + p.chmod(0o555 if p.is_dir() else 0o444) + root.chmod(0o555) + for script in ("verify.py", "independent.py"): + result = run(root, script) + self.assertEqual(result.returncode, 0, result.stdout + result.stderr) + self.assertEqual(hashes(root), before) + + def test_source_corruption_rejected(self): + with export() as root: + path = root / "research/p104-native-channel/inputs/LOWRANK-WITNESS.json" + path.write_bytes(path.read_bytes() + b" ") + for script, message in (("verify.py", "source drift"), + ("independent.py", "word source pin")): + result = run(root, script) + self.assertNotEqual(result.returncode, 0) + self.assertIn(message, result.stdout + result.stderr) + + def test_certificate_corruption_rejected(self): + with export() as root: + path = root / PACKAGE / "CERTIFICATE.json" + data = json.loads(path.read_text()) + data["extra_packing"].append(data["extra_packing"][0]) + path.write_text(json.dumps(data)) + for script, message in (("verify.py", "duplicate pair"), + ("independent.py", "dual duplicate")): + result = run(root, script) + self.assertNotEqual(result.returncode, 0) + self.assertIn(message, result.stdout + result.stderr) + + def test_result_corruption_rejected(self): + with export() as root: + path = root / PACKAGE / "RESULT.json" + data = json.loads(path.read_text()) + data["primal_dual"]["exact_cover_minimum"] -= 1 + path.write_text(json.dumps(data)) + result = run(root, "verify.py") + self.assertNotEqual(result.returncode, 0) + self.assertIn("result drift", result.stdout + result.stderr) + + def test_generator_and_exclusive_output(self): + with export() as root: + output = root / "generated.json" + result = run(root, "generate.py", "--out", str(output)) + self.assertEqual(result.returncode, 0, result.stdout + result.stderr) + self.assertEqual(output.read_bytes(), (HERE / "CERTIFICATE.json").read_bytes()) + before = output.read_bytes() + result = run(root, "verify.py", "--out", str(output)) + self.assertNotEqual(result.returncode, 0) + self.assertIn("File exists", result.stdout + result.stderr) + self.assertEqual(output.read_bytes(), before) + + +if __name__ == "__main__": + unittest.main() diff --git a/research/p104-no-relay-cover-audit/verify.py b/research/p104-no-relay-cover-audit/verify.py new file mode 100644 index 0000000000..5634d1e69d --- /dev/null +++ b/research/p104-no-relay-cover-audit/verify.py @@ -0,0 +1,390 @@ +#!/usr/bin/env python3 +"""Exact primal/dual certificate for the P104 no-relay access relaxation. + +Prepared for commdata2338, with substantial OpenAI Codex assistance. +Apache-2.0. No predecessor executable or third-party module is imported. +Default replay is read-only; all acceptance checks survive python -O. +""" +import argparse +from collections import Counter, defaultdict +from copy import deepcopy +from fractions import Fraction +from hashlib import sha256 +from itertools import combinations, product +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parent.parent +WORD = "research/p104-native-channel/inputs/LOWRANK-WITNESS.json" +FIXTURE = "research/p104-native-channel/inputs/P104-FIXTURE.json" +N = 104 + + +class Invalid(ValueError): + pass + + +def require(condition, message): + if not condition: + raise Invalid(message) + + +def bits(mask): + while mask: + low = mask & -mask + yield low.bit_length() - 1 + mask -= low + + +def space(generators): + """512-bit membership vector, independent of binary basis convention.""" + members = {0} + for v in generators: + require(type(v) is int and 0 <= v < 512, "invalid frame generator") + members |= {x ^ v for x in tuple(members)} + return sum(1 << x for x in members) + + +def includes(large, small): + return large & small == small + + +def dimension(frame): + size = frame.bit_count() + require(size > 0 and size & (size - 1) == 0, "invalid subspace size") + return size.bit_length() - 1 + + +def authenticate(): + pins = json.loads((HERE / "SOURCES.json").read_text()) + data = {} + for pin in pins["files"]: + if pin["usage"] == "input": + raw = (ROOT / pin["path"]).read_bytes() + require(sha256(raw).hexdigest() == pin["sha256"], "source drift") + data[pin["path"]] = json.loads(raw) + require(set(data) == {WORD, FIXTURE}, "input inventory drift") + return data[WORD], data[FIXTURE] + + +def correction(fixture): + roots = set() + for i, j in combinations(range(8), 2): + for sign in (-1, 1): + r = [0] * 8 + r[i], r[j] = 2, 2 * sign + roots.add(tuple(r)) + for signs in product((-1, 1), repeat=7): + if signs.count(-1) % 2 == 0: + roots.add((1, *signs)) + section = fixture["section4_explicit_P104"] + removed = {tuple(r) for r in section["F0"] + section["C"]} + require(len(roots) == 120 and len(removed) == 16 and removed <= roots, + "P104 puncture drift") + ports = sorted(roots - removed) + twice_c = [[2 * (t == s) - sum(x*y for x, y in zip(rt, rs)) // 4 + for s, rs in enumerate(ports)] for t, rt in enumerate(ports)] + require(all(sum(x*y for x, y in zip(rt, rs)) % 4 == 0 + for rt in ports for rs in ports), "nonintegral Gram entry") + require(all(sum(x != 0 for x in row) == 48 for row in twice_c), + "correction row support drift") + support = sum(1 << (N*t+s) for t, row in enumerate(twice_c) + for s, x in enumerate(row) if x) + return support + + +def trace(word): + """All event frames/directions; source/target paths, not native operators.""" + current = {r: space(f) for r, f in word["initial_frames"].items()} + paths = {r: [(0, current[r])] for r in current if r.startswith(("X", "Y"))} + require(len(paths) == 2*N, "data register inventory drift") + source_cuts, target_cuts = [], [] + for cut, event in enumerate(word["program"], 1): + op = event[0] + if op == "transport": + _, reg, before, after, rank = event + a, b = space(before), space(after) + require(current[reg] == a, "transport entry drift") + require(a != b and (includes(a, b) or includes(b, a)), "nonnested transport") + require(abs(dimension(a)-dimension(b)) == rank, "transport rank drift") + if reg in paths: + require(includes(b, a), "descending data path") + paths[reg].append((cut, b)) + (source_cuts if reg.startswith("X") else target_cuts).append(cut) + current[reg] = b + elif op == "add": + _, dst, src, coefficient, frame = event + require(not dst.startswith("X"), "source value overwritten") + require(not src.startswith("Y"), "target value read") + require(current[dst] == current[src] == space(frame), "ADD frame drift") + Fraction(coefficient) + elif op == "zero": + _, reg, frame = event + require(reg == "C" and reg not in current, "private allocation drift") + current[reg] = space(frame) + elif op == "copy": + _, dst, src, frame = event + require(dst == "C" and not src.startswith("Y"), "private COPY direction drift") + require(current[dst] == current[src] == space(frame), "COPY frame drift") + elif op == "erase": + _, reg, frame = event + require(reg == "C" and current[reg] == space(frame), "private erase drift") + del current[reg] + else: + raise Invalid("unknown event") + require(current == {r: space(f) for r, f in word["final_frames"].items()}, + "final frame drift") + require(max(source_cuts) < min(target_cuts), "source/target time separation fails") + for i in range(N): + xp, yp = paths[f"X{i}"], paths[f"Y{i}"] + require(dimension(xp[0][1]) == 1 and dimension(xp[-1][1]) == 9, + "source endpoint drift") + require(yp[0][1] == 1 and dimension(yp[-1][1]) == 8, + "target endpoint drift") + return paths, {"events": len(word["program"]), + "last_source_transport_cut": max(source_cuts), + "first_target_transport_cut": min(target_cuts)} + + +def maximal_masks(items): + """Drop subsets: every omitted option is covered by a retained option.""" + out = [] + for x in sorted(set(items), key=lambda x: (-x.bit_count(), x)): + if not any(includes(y, x) for y in out): + out.append(x) + return tuple(sorted(out)) + + +def chain_unions(nodes, upwards): + """Antichain DP: all maximal port unions on nested contact chains. + + For sources, chains end at f and extend from a proper subspace. + For targets, chains start at f and extend to a proper superspace. + Sorting by dimension makes either recurrence acyclic. + """ + result = {} + for f in sorted(nodes, key=lambda x: (dimension(x), x), reverse=upwards): + candidates = [nodes[f]] + for u, unions in result.items(): + if (includes(u, f) if upwards else includes(f, u)): + candidates.extend(nodes[f] | x for x in unions) + result[f] = maximal_masks(candidates) + return result + + +def rectangle(source_mask, target_mask): + return sum(source_mask << (N*t) for t in bits(target_mask)) + + +def cover_family(paths, support): + source_nodes, target_nodes = defaultdict(int), defaultdict(int) + for i in range(N): + for _, f in paths[f"X{i}"]: + source_nodes[f] |= 1 << i + for _, f in paths[f"Y{i}"]: + if f != 1: + target_nodes[f] |= 1 << i + src = chain_unions(source_nodes, False) + tgt = chain_unions(target_nodes, True) + raw = set() + nested_count = 0 + for f, sources in src.items(): + for g, targets in tgt.items(): + if includes(g, f): + nested_count += 1 + raw.update(rectangle(a, b) for a in sources for b in targets) + require(all(includes(support, c) for c in raw), "carrier covers forbidden correction pair") + covers = maximal_masks(raw) + union = 0 + for c in covers: + union |= c + require(union == support, "cover family misses correction support") + # Separate root/frame binding, not just agreement with the cover search. + for t in range(N): + terminal = paths[f"Y{t}"][-1][1] + for s in range(N): + label = next(v for v in bits(paths[f"X{s}"][0][1]) if v) + require(bool(support & (1 << (N*t+s))) == bool(terminal & (1 << label)), + "root order / frame label mismatch") + stats = {"source_frames": len(src), "target_frames": len(tgt), + "source_chain_unions": sum(map(len, src.values())), + "target_chain_unions": sum(map(len, tgt.values())), + "nested_frame_pairs": nested_count, "raw_rectangles": len(raw), + "maximal_rectangles": len(covers), + "cover_size_histogram": dict(sorted(Counter(c.bit_count() for c in covers).items()))} + return covers, stats + + +def edge_mask(entries): + require(type(entries) is list, "edge list type") + mask = 0 + for pair in entries: + require(type(pair) is list and len(pair) == 2 + and all(type(x) is int and 0 <= x < N for x in pair), "invalid pair") + t, s = pair + b = 1 << (N*t+s) + require(not mask & b, "duplicate pair") + mask |= b + return mask + + +def verify_certificate(certificate, support, covers): + require(certificate["schema_version"] == 1, "certificate schema drift") + singles = {c for c in covers if c.bit_count() == 1} + singleton_mask = sum(singles) + pack_extra = edge_mask(certificate["extra_packing"]) + require(not pack_extra & singleton_mask, "packing overlaps automatic singletons") + packed = pack_extra | singleton_mask + require(includes(support, packed), "packing outside correction support") + require(all((packed & c).bit_count() <= 1 for c in covers), "packing capacity violated") + chosen = [] + family = set(covers) + for item in certificate["extra_cover"]: + a = edge_mask([[0, s] for s in item["sources"]]) + b = edge_mask([[0, t] for t in item["targets"]]) + c = rectangle(a, b) + require(c in family and c.bit_count() > 1, "cover is not a maximal admissible rectangle") + chosen.append(c) + require(len(set(chosen)) == len(chosen), "duplicate cover rectangle") + covered = singleton_mask + for c in chosen: + covered |= c + require(covered == support, "primal cover incomplete") + lower = packed.bit_count() + upper = len(singles) + len(chosen) + require(lower == upper == certificate["optimum"], "primal/dual mismatch") + require(type(certificate["optimum"]) is int, "optimum must be an integer") + return {"correction_pairs": support.bit_count(), "forced_singletons": len(singles), + "extra_packing_pairs": pack_extra.bit_count(), "extra_cover_rectangles": len(chosen), + "exact_cover_minimum": lower} + + +def predecessor_fraction(covers): + caps = {} + for c in covers: + for e in bits(c): + caps[e] = max(caps.get(e, 0), c.bit_count()) + total = sum((Fraction(1, k) for k in caps.values()), Fraction()) + require(all(sum((Fraction(1, caps[e]) for e in bits(c)), Fraction()) <= 1 + for c in covers), "predecessor cover dual invalid") + return {"fraction": str(total), "rounded_floor": -(-total.numerator // total.denominator), + "edge_capacity_histogram": dict(sorted(Counter(caps.values()).items()))} + + +def reject(call, message): + try: + call() + except Invalid as exc: + require(str(exc) == message, "unexpected control failure: " + str(exc)) + else: + raise Invalid("control was accepted: " + message) + + +def controls(word, fixture, certificate, support, covers): + bad = deepcopy(word) + next(e for e in bad["program"] if e[0] == "transport")[4] += 1 + reject(lambda: trace(bad), "transport rank drift") + bad = deepcopy(word) + event = next(e for e in bad["program"] if e[0] == "add") + event[1] = "X0" + reject(lambda: trace(bad), "source value overwritten") + bad = deepcopy(fixture) + bad["section4_explicit_P104"]["C"].pop() + reject(lambda: correction(bad), "P104 puncture drift") + bad = deepcopy(certificate) + bad["extra_packing"].append(bad["extra_packing"][0]) + reject(lambda: verify_certificate(bad, support, covers), "duplicate pair") + bad = deepcopy(certificate) + bad["extra_packing"].append([0, 0]) + reject(lambda: verify_certificate(bad, support, covers), "packing outside correction support") + bad = deepcopy(certificate) + packed = edge_mask(bad["extra_packing"]) + c = next(c for c in covers if c.bit_count() > 1 and c & packed) + extra = next(e for e in bits(c) if not packed & (1 << e)) + bad["extra_packing"].append([extra // N, extra % N]) + reject(lambda: verify_certificate(bad, support, covers), "packing capacity violated") + bad = deepcopy(certificate) + bad["extra_cover"].pop() + reject(lambda: verify_certificate(bad, support, covers), "primal cover incomplete") + bad = deepcopy(certificate) + bad["extra_cover"][0] = {"sources": [0], "targets": [0]} + reject(lambda: verify_certificate(bad, support, covers), + "cover is not a maximal admissible rectangle") + bad = deepcopy(certificate) + bad["optimum"] -= 1 + reject(lambda: verify_certificate(bad, support, covers), "primal/dual mismatch") + # Independent exhaustive tiny-poset oracle for the chain-antichain DP. + nodes = {space([1]): 1, space([2]): 2, space([1, 2]): 4, + space([4]): 8, space([1, 2, 4]): 16} + for upwards in (False, True): + actual = chain_unions(nodes, upwards) + for start in nodes: + all_unions = set() + def visit(frame, acc): + all_unions.add(acc) + for nxt in nodes: + if nxt != frame and (includes(nxt, frame) if upwards else includes(frame, nxt)): + visit(nxt, acc | nodes[nxt]) + visit(start, nodes[start]) + require(actual[start] == maximal_masks(all_unions), "tiny chain oracle mismatch") + # The source/target separation premise is material: with interleaving, + # one carrier can read x0 and write y0 at <1>, then climb to <1,2>, + # read x1 and write y1. The resulting support is triangular; neither + # separated rectangle can cover the two diagonal entries together. + left, full = space([1]), space([1, 2]) + src = chain_unions({left: 1, full: 2}, False) + tgt = chain_unions({left: 1, full: 2}, True) + tiny = [rectangle(a, b) for f, aa in src.items() for g, bb in tgt.items() + if includes(g, f) for a in aa for b in bb] + diagonal = (1 << 0) | (1 << (N+1)) + require(all((c & diagonal).bit_count() <= 1 for c in tiny), "interleaving boundary drift") + carrier = [1, 0] + y0 = carrier[:] + carrier[1] += 1 + require(y0 == [1, 0] and carrier == [1, 1], "interleaving counterexample drift") + # Relay or source-dependent initialization likewise invalidates the + # direct-source-chain envelope: incomparable input lines may be merged. + incomparable = chain_unions({space([1]): 1, space([2]): 2}, False) + require(all(x != 3 for vv in incomparable.values() for x in vv), "line separation drift") + require([a+b for a, b in zip([1, 0], [0, 1])] == [1, 1], "relay fixture drift") + return ["transport_rank", "source_overwrite", "puncture", "duplicate_packing_pair", + "unsupported_pair", "packing_capacity", "missing_cover", "illegal_cover", + "wrong_optimum", "exhaustive_tiny_poset", "interleaved_read_write_boundary", + "relay_or_preloaded_source_boundary"] + + +def calculate(): + word, fixture = authenticate() + support = correction(fixture) + paths, timing = trace(word) + covers, enumeration = cover_family(paths, support) + certificate = json.loads((HERE / "CERTIFICATE.json").read_text()) + result = verify_certificate(certificate, support, covers) + old = predecessor_fraction(covers) + checks = controls(word, fixture, certificate, support, covers) + return {"schema_version": 1, "status": "PASS_P104_NO_RELAY_COVER_AUDIT", + "timing": timing, "enumeration": enumeration, "primal_dual": result, + "predecessor_fractional_certificate": old, "controls": checks, + "scope": "Exact frozen-path access-cover relaxation; necessary no-relay carrier-lifetime bound, not an attaining physical circuit or supplier."} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--out", type=Path, help="write a fresh checked result exclusively") + args = parser.parse_args() + result = calculate() + payload = json.dumps(result, sort_keys=True, indent=2) + "\n" + if args.out: + with args.out.open("x") as f: + f.write(payload) + else: + require(json.loads(payload) == json.loads((HERE / "RESULT.json").read_text()), "result drift") + print("PASS_P104_NO_RELAY_COVER_AUDIT pairs=4992 covers=4638 optimum=4580 previous_floor=4480 controls=12") + + +if __name__ == "__main__": + try: + main() + except (Invalid, OSError, KeyError, TypeError, ValueError) as exc: + raise SystemExit("FAIL: " + str(exc)) from exc