diff --git a/research/centre-kernel-feedback/CORRECTION.json b/research/centre-kernel-feedback/CORRECTION.json new file mode 100644 index 0000000000..ff30ca9068 --- /dev/null +++ b/research/centre-kernel-feedback/CORRECTION.json @@ -0,0 +1,548 @@ +{ + "40": {"0": "-14"}, + "120": {"1": "-14"}, + "122": {"2": "-14"}, + "160": {"1": "1", "2": "1"}, + "161": {"2": "2"}, + "162": {"2": "-2"}, + "163": {"1": "1", "2": "1"}, + "164": {"1": "1"}, + "165": {"2": "-1"}, + "166": {"2": "1"}, + "167": {"1": "-1"}, + "168": {"1": "-4"}, + "170": {"1": "4"}, + "172": {"1": "2"}, + "174": {"1": "-2"}, + "192": {"1": "2", "2": "-3"}, + "194": {"2": "-3"}, + "195": {"1": "2"}, + "197": {"1": "2", "2": "-3"}, + "199": {"1": "-2", "2": "3"}, + "224": {"0": "-1"}, + "225": {"0": "-7"}, + "226": {"0": "4"}, + "229": {"0": "2"}, + "230": {"0": "7"}, + "231": {"0": "-1"}, + "240": {"0": "-2"}, + "243": {"0": "-2"}, + "245": {"0": "-2"}, + "246": {"0": "-6"}, + "264": {"3": "-14"}, + "272": {"1": "-5"}, + "273": {"0": "-2"}, + "274": {"0": "2"}, + "275": {"1": "-1"}, + "276": {"1": "-1"}, + "277": {"1": "2"}, + "279": {"1": "-1"}, + "312": {"2": "-8"}, + "313": {"1": "-2", "2": "-3"}, + "314": {"1": "-2", "2": "2"}, + "315": {"2": "3"}, + "316": {"2": "1"}, + "318": {"2": "3"}, + "319": {"2": "-2"}, + "368": {"3": "-5"}, + "369": {"0": "-2", "10": "2", "4": "-3", "5": "-2", "6": "-1", "9": "2"}, + "370": {"10": "-2", "3": "-5", "4": "1", "5": "2", "6": "-1", "9": "-2"}, + "371": {"0": "-2"}, + "372": {"3": "-2", "4": "1", "6": "1"}, + "373": {"0": "-2", "3": "-1"}, + "374": {"3": "-2"}, + "375": {"0": "2", "3": "1", "4": "-1", "6": "-1"}, + "377": {"2": "2"}, + "378": {"2": "-2"}, + "379": {"2": "-2"}, + "402": {"3": "-2"}, + "403": {"3": "2"}, + "404": {"3": "1"}, + "405": {"3": "-1"}, + "406": {"3": "-1"}, + "407": {"3": "3"}, + "408": {"1": "-5", "2": "-1"}, + "409": {"1": "-6", "2": "7"}, + "410": {"1": "3", "2": "3"}, + "411": {"1": "4", "2": "1"}, + "412": {"1": "2", "2": "-1"}, + "413": {"1": "9", "2": "3"}, + "414": {"1": "-6", "2": "7"}, + "415": {"1": "1", "2": "3"}, + "416": {"4": "-14"}, + "417": {"5": "14"}, + "418": {"5": "-14"}, + "419": {"6": "-14"}, + "420": {"7": "-14"}, + "421": {"8": "-14"}, + "422": {"9": "-14"}, + "423": {"10": "-14"}, + "424": {"2": "-2"}, + "425": {"2": "-3/4"}, + "426": {"2": "1/2"}, + "427": {"2": "3/4"}, + "428": {"2": "1/4"}, + "430": {"2": "3/4"}, + "431": {"2": "-1/2"}, + "432": {"4": "-7", "5": "-6", "6": "-3"}, + "433": {"10": "-2", "4": "2", "5": "-2", "7": "-2", "8": "-1", "9": "-1"}, + "434": {"10": "-2", "4": "1", "6": "-1", "7": "-2", "8": "-1", "9": "-1"}, + "436": {"4": "4", "5": "-2", "8": "1", "9": "1"}, + "437": {"4": "3", "5": "10", "6": "1"}, + "438": {"4": "2"}, + "439": {"10": "-4", "4": "1", "6": "-3", "7": "-4", "8": "-1", "9": "-1"}, + "448": {"1": "-2", "4": "-4", "5": "-6", "6": "-2"}, + "449": {"1": "-4", "4": "-2", "5": "-2"}, + "450": {"1": "-1"}, + "451": {"1": "-1"}, + "452": {"1": "3"}, + "453": {"1": "-3"}, + "454": {"1": "-6", "4": "2", "5": "2"}, + "455": {"5": "2", "6": "2"}, + "480": {"10": "-5", "4": "1", "6": "1", "7": "-1", "8": "-5", "9": "1"}, + "481": {"10": "-3", "7": "-1"}, + "482": {"3": "-3", "5": "1", "6": "1", "7": "1", "8": "-3"}, + "483": {"10": "-2", "3": "3", "4": "1", "5": "-1", "7": "-1", "9": "-1"}, + "484": {"10": "1", "3": "-3", "4": "1", "5": "-3", "6": "-2", "7": "2", "9": "1"}, + "485": {"10": "3", "3": "-1", "5": "3", "6": "3", "7": "4", "8": "1", "9": "-2"}, + "486": {"3": "-4"}, + "487": {"10": "2", "3": "4", "4": "-1", "5": "4", "6": "3", "8": "-3", "9": "-1"}, + "488": {"2": "-2", "8": "2", "9": "6"}, + "489": {"0": "-4", "3": "2"}, + "490": {"0": "2", "3": "2", "8": "-2", "9": "-6"}, + "491": {"0": "2", "2": "2"}, + "492": {"0": "-1", "3": "1"}, + "493": {"0": "-3", "3": "-1"}, + "494": {"0": "11", "3": "1"}, + "495": {"0": "1", "3": "3"}, + "497": {"11": "-14"}, + "512": {"10": "-5", "4": "-9", "5": "9", "6": "-4", "7": "6", "8": "1", "9": "4"}, + "513": {"10": "-2", "4": "2", "5": "-1", "6": "-1", "7": "1", "8": "2", "9": "-1"}, + "514": {"5": "-7", "6": "-1", "7": "1", "8": "-5", "9": "4"}, + "515": {"10": "-1", "4": "1", "5": "5", "6": "-2", "7": "-2", "8": "-2", "9": "-1"}, + "516": {"10": "2", "4": "2", "6": "-4", "8": "2", "9": "4"}, + "517": {"10": "-3", "4": "3", "5": "-4", "6": "-1", "7": "1", "8": "-1", "9": "1"}, + "518": {"10": "-1", "4": "-3", "5": "4", "6": "1", "7": "3", "8": "-4", "9": "-4"}, + "519": {"10": "-2", "4": "-6", "5": "4", "6": "4", "7": "4", "8": "-3", "9": "-3"}, + "536": {"1": "-5/4", "2": "-1/4"}, + "537": {"1": "-3/2", "2": "7/4"}, + "538": {"1": "3/4", "2": "3/4"}, + "539": {"1": "1", "2": "1/4"}, + "540": {"1": "1/2", "2": "-1/4"}, + "541": {"1": "9/4", "2": "3/4"}, + "542": {"1": "-3/2", "2": "7/4"}, + "543": {"1": "1/4", "2": "3/4"}, + "544": {"10": "-8", "4": "-2", "5": "-3", "6": "7", "7": "-9", "8": "-3", "9": "-12"}, + "545": {"10": "3", "7": "-3", "9": "4"}, + "546": {"10": "3", "4": "1", "5": "2", "6": "3", "7": "-1", "8": "-4", "9": "-2"}, + "547": {"10": "-2", "4": "1", "5": "5", "6": "-10", "7": "1", "8": "1"}, + "548": {"10": "-4", "4": "5", "5": "2", "6": "1", "7": "-2", "8": "-6"}, + "549": {"10": "-5", "4": "3", "5": "3", "7": "-6", "8": "-5", "9": "4"}, + "550": {"10": "-5", "4": "2", "5": "-5", "6": "-1", "7": "2", "8": "1", "9": "-6"}, + "551": {"10": "2", "4": "-2", "5": "6", "6": "2", "7": "-8", "8": "-8", "9": "-6"}, + "552": {"11": "3"}, + "553": {"11": "3"}, + "554": {"2": "1"}, + "555": {"2": "1"}, + "556": {"11": "1", "2": "1"}, + "557": {"11": "3", "2": "-1"}, + "558": {"11": "2"}, + "559": {"11": "2"}, + "563": {"12": "-14"}, + "576": {"1": "-1/2", "13": "-14"}, + "577": {"1": "-1"}, + "578": {"1": "-1/4"}, + "579": {"1": "-1/4"}, + "580": {"1": "1/4"}, + "581": {"1": "-1/4"}, + "582": {"1": "-1"}, + "583": {"1": "1/2"}, + "592": {"13": "-25"}, + "593": {"13": "9"}, + "594": {"13": "-1"}, + "595": {"13": "1"}, + "596": {"13": "1"}, + "597": {"13": "-1"}, + "598": {"13": "-3"}, + "599": {"13": "-7"}, + "608": {"14": "-14"}, + "609": {"15": "-14"}, + "616": {"16": "-14"}, + "617": {"17": "-14"}, + "625": {"14": "-11", "15": "-1"}, + "626": {"14": "-4", "15": "-2", "4": "1", "6": "-1"}, + "627": {"14": "-1", "15": "7", "4": "-1", "6": "1"}, + "628": {"15": "-2"}, + "629": {"14": "1", "15": "-7"}, + "630": {"14": "-2", "15": "2", "4": "1", "6": "-1"}, + "631": {"14": "-1", "15": "1", "4": "1", "6": "-1"}, + "632": {"14": "-18", "15": "8", "3": "-2"}, + "633": {"14": "2", "15": "-8", "3": "-2"}, + "634": {"14": "2", "15": "2"}, + "635": {"15": "-4", "3": "2"}, + "636": {"15": "-2", "3": "6"}, + "637": {"15": "-2", "3": "-8"}, + "638": {"3": "-2"}, + "639": {"3": "-4"}, + "656": {"4": "2", "5": "-5", "6": "1", "7": "-3", "8": "-2", "9": "1"}, + "657": {"10": "1", "4": "-6", "5": "-10", "6": "-2", "7": "-1", "8": "-3", "9": "-1"}, + "658": {"10": "-3", "4": "6", "5": "1", "6": "-3", "7": "-4", "8": "2", "9": "-3"}, + "659": {"10": "-2", "7": "2", "8": "-1", "9": "-3"}, + "660": {"10": "6", "4": "1", "5": "2", "6": "1", "7": "6", "8": "-3", "9": "1"}, + "661": {"10": "-1", "4": "3", "5": "1", "6": "-4", "7": "4", "9": "3"}, + "662": {"10": "-3", "4": "1", "6": "-3", "7": "-9", "8": "-5", "9": "-5"}, + "663": {"4": "-1", "5": "5", "6": "6", "7": "1", "8": "2", "9": "-5"}, + "664": {"10": "1", "2": "1", "5": "5", "6": "-1", "7": "2", "8": "-1", "9": "2"}, + "665": {"10": "1", "2": "-5", "5": "9", "6": "-1", "7": "2", "8": "1", "9": "4"}, + "666": {"2": "1", "5": "-1", "6": "1", "7": "-1", "8": "2", "9": "3"}, + "667": {"2": "1", "5": "5", "6": "-1", "7": "1", "9": "-1"}, + "668": {"10": "1", "6": "-4", "7": "1", "8": "-1", "9": "3"}, + "669": {"10": "1", "5": "2", "6": "-2", "7": "-1", "8": "-1", "9": "1"}, + "670": {"5": "2", "6": "-2", "7": "2", "8": "2"}, + "671": {"2": "-4", "5": "2", "6": "2", "7": "2", "9": "-2"}, + "672": {"10": "-3/4", "5": "-1/4", "6": "3/4", "7": "-3/2", "9": "-5/4"}, + "673": {"10": "1/2", "7": "-1", "9": "1"}, + "674": {"10": "1/2", "5": "-1/2", "6": "1", "8": "-1/2", "9": "-1/2"}, + "675": {"10": "-1/4", "5": "3/4", "6": "-3/4", "7": "-1/2", "8": "1/2", "9": "-1/4"}, + "676": {"10": "-5/4", "5": "1/4", "6": "-1/4", "7": "-1/2", "8": "-1", "9": "1/4"}, + "677": {"10": "-1/2", "6": "-1/2", "7": "-1", "8": "-1"}, + "678": {"10": "-1/2", "7": "1/2", "9": "-3/2"}, + "679": {"10": "1/4", "5": "1/4", "6": "1/4", "7": "-1/2", "8": "-3/2", "9": "-3/4"}, + "688": {"10": "-4", "4": "-7", "5": "16", "6": "-1", "7": "-2", "8": "-3", "9": "3"}, + "689": {"10": "4", "4": "1", "5": "-3", "7": "-7", "9": "-3"}, + "690": {"4": "2", "5": "1", "6": "-1", "7": "-1", "8": "3", "9": "2"}, + "692": {"10": "-2", "4": "4", "5": "2", "8": "1", "9": "1"}, + "693": {"4": "-2", "5": "3", "6": "-1", "7": "1", "9": "-1"}, + "694": {"4": "3", "5": "-5", "6": "-2", "7": "-1", "8": "3"}, + "695": {"10": "-2", "4": "-3", "5": "-4", "6": "1", "8": "2", "9": "-2"}, + "696": {"16": "-9", "17": "3"}, + "697": {"16": "3", "17": "7", "2": "2"}, + "698": {"16": "-4", "17": "4", "2": "-3"}, + "699": {"2": "-3"}, + "700": {"17": "-2", "2": "1"}, + "701": {"16": "-4", "17": "2", "2": "3"}, + "702": {"16": "-5", "17": "1"}, + "703": {"16": "1", "17": "3", "2": "2"}, + "704": {"14": "4"}, + "705": {"1": "4", "10": "-3", "12": "-1", "2": "4", "5": "4", "6": "2", "7": "-1", "8": "-2"}, + "706": {"1": "-1", "10": "-3", "12": "-1", "14": "4", "2": "2", "4": "-4", "5": "1", "6": "-1", "7": "-2", "8": "-4", "9": "-1"}, + "707": {"1": "1", "2": "2", "4": "-2", "5": "-1", "6": "-3", "7": "-3", "8": "6", "9": "-3"}, + "708": {"1": "-1", "10": "3", "12": "-1", "2": "-1", "5": "1", "6": "3", "7": "4", "8": "-2", "9": "-3"}, + "709": {"1": "1", "2": "1", "5": "3", "6": "3", "7": "5", "9": "3"}, + "710": {"1": "2", "2": "3"}, + "711": {"1": "2", "10": "-1", "12": "1", "14": "4", "2": "1", "5": "2", "7": "-1"}, + "712": {"3": "-2"}, + "713": {"11": "-2"}, + "714": {"11": "-2", "2": "1"}, + "715": {"2": "-1"}, + "716": {"2": "-1"}, + "717": {"11": "2", "2": "1"}, + "718": {"11": "2", "2": "4"}, + "720": {"18": "-14"}, + "721": {"18": "-14"}, + "722": {"18": "14"}, + "723": {"18": "-14"}, + "736": {"1": "-4", "12": "1"}, + "737": {"1": "-3", "12": "-1"}, + "738": {"1": "-2", "10": "1", "12": "-2", "18": "2", "4": "-7", "5": "-3", "6": "2", "8": "2", "9": "1"}, + "739": {"1": "-5", "10": "-5", "18": "2", "4": "-1", "5": "5", "7": "-2", "8": "-2", "9": "1"}, + "740": {"1": "1", "12": "-5", "4": "-1", "5": "-2", "6": "-3", "7": "-4", "8": "3", "9": "1"}, + "741": {"1": "-4", "10": "-2", "12": "-1", "4": "-1", "5": "4", "6": "-1", "7": "4", "8": "-1", "9": "-1"}, + "742": {"1": "-5", "10": "3", "12": "-4", "18": "-2", "5": "-3", "6": "-3", "7": "-4", "8": "3", "9": "2"}, + "743": {"10": "-1", "18": "2", "4": "-6", "5": "3", "6": "1", "7": "-2", "8": "1", "9": "2"}, + "744": {"0": "-24", "12": "-6", "3": "-10"}, + "745": {"0": "-10", "3": "-18"}, + "746": {"0": "-5", "3": "-7"}, + "747": {"0": "-1", "12": "-6", "3": "-1"}, + "748": {"0": "-4", "12": "-3", "3": "-7"}, + "749": {"0": "-4", "12": "1", "3": "5"}, + "750": {"0": "1", "12": "-1", "3": "-4"}, + "751": {"0": "7", "12": "-5", "3": "8"}, + "760": {"3": "-1/2"}, + "761": {"3": "-1/2"}, + "763": {"3": "1/2"}, + "764": {"3": "3/2"}, + "765": {"3": "-2"}, + "766": {"3": "-1/2"}, + "767": {"3": "-1"}, + "768": {"10": "-1", "11": "-6", "12": "-2", "14": "-1", "15": "-5", "4": "1", "5": "1", "6": "6", "7": "8", "8": "1"}, + "769": {"10": "3", "11": "-9", "14": "-9", "15": "-5", "4": "-6", "5": "2", "7": "3", "8": "3", "9": "3"}, + "770": {"10": "-2", "11": "-8", "14": "-4", "15": "-5", "4": "-5", "5": "-1", "6": "4", "7": "-3", "8": "5"}, + "771": {"11": "-7", "14": "4", "15": "-3", "4": "2", "5": "-6", "6": "6", "8": "-3", "9": "-1"}, + "772": {"10": "1", "11": "-6", "14": "1", "15": "-4", "4": "-5", "5": "1", "6": "-2", "7": "-4", "9": "-1"}, + "773": {"10": "3", "11": "5", "14": "-1", "15": "-6", "4": "4", "5": "6", "7": "-3"}, + "774": {"11": "4", "12": "-2", "14": "6", "15": "-6", "4": "5", "5": "-7", "6": "2", "7": "7", "8": "-2", "9": "-1"}, + "775": {"10": "-4", "11": "1", "14": "4", "15": "-2", "4": "4", "6": "-8", "8": "4"}, + "776": {"17": "-4", "2": "-1", "3": "-2"}, + "777": {"17": "-4", "2": "-1"}, + "778": {"17": "-4", "2": "1", "3": "-1"}, + "779": {"17": "-6", "2": "1", "3": "3"}, + "780": {"17": "2", "3": "-1"}, + "781": {"3": "-1"}, + "782": {"17": "-2", "3": "-2"}, + "783": {"17": "-4", "3": "-2"}, + "784": {"5": "-5/4", "6": "1/4", "7": "-1/4", "8": "-1/4", "9": "1/2"}, + "785": {"10": "1/2", "5": "-2", "6": "-1"}, + "786": {"10": "-1/4", "5": "3/4", "6": "-5/4", "7": "-1/2", "8": "5/4", "9": "-1/2"}, + "787": {"10": "-3/4", "5": "-1/2", "7": "1/4", "8": "-1/2", "9": "-1/2"}, + "788": {"10": "1", "5": "1", "7": "1", "8": "-1/4", "9": "1/4"}, + "789": {"10": "-1/2", "5": "-1/4", "6": "-3/4", "7": "3/4", "8": "1", "9": "1/4"}, + "790": {"10": "-1/4", "5": "-1/2", "6": "-1", "7": "-3/4", "8": "-5/4", "9": "-3/4"}, + "791": {"10": "1/4", "5": "3/4", "6": "7/4", "7": "1/2", "8": "1", "9": "-1/4"}, + "792": {"10": "1/4", "5": "5/4", "6": "-1/4", "7": "1/2", "8": "-1/4", "9": "1/2"}, + "793": {"10": "1/4", "5": "9/4", "6": "-1/4", "7": "1/2", "8": "1/4", "9": "1"}, + "794": {"5": "-1/4", "6": "1/4", "7": "-1/4", "8": "1/2", "9": "3/4"}, + "795": {"5": "5/4", "6": "-1/4", "7": "1/4", "9": "-1/4"}, + "796": {"10": "1/4", "6": "-1", "7": "1/4", "8": "-1/4", "9": "3/4"}, + "797": {"10": "1/4", "5": "1/2", "6": "-1/2", "7": "-1/4", "8": "-1/4", "9": "1/4"}, + "798": {"5": "1/2", "6": "-1/2", "7": "1/2", "8": "1/2"}, + "799": {"5": "1/2", "6": "1/2", "7": "1/2", "9": "-1/2"}, + "800": {"1": "-4", "18": "-16", "2": "2"}, + "801": {"10": "-2", "12": "-2", "18": "2", "4": "-4", "5": "1", "6": "-3", "7": "-7", "8": "4", "9": "7"}, + "802": {"10": "2", "12": "-2", "2": "2", "4": "-8", "5": "1", "6": "1", "7": "1", "8": "-2", "9": "-5"}, + "803": {"1": "-4", "10": "-2", "18": "-2", "4": "6", "5": "-6", "6": "8", "7": "-4", "8": "8", "9": "4"}, + "804": {"1": "4", "10": "-3", "18": "-4", "4": "-5", "5": "8", "6": "1", "7": "-1", "8": "7", "9": "3"}, + "805": {"1": "2", "10": "1", "18": "-2", "4": "1", "5": "3", "6": "6", "7": "8", "8": "7", "9": "8"}, + "806": {"10": "9", "18": "-12", "4": "3", "5": "7", "6": "-4", "7": "-4", "8": "13", "9": "8"}, + "807": {"1": "-6", "10": "7", "18": "-6", "4": "1", "5": "-2", "6": "-3", "7": "-5", "8": "1", "9": "-3"}, + "809": {"2": "-2"}, + "810": {"2": "1"}, + "811": {"2": "-1"}, + "813": {"2": "2"}, + "814": {"2": "1"}, + "815": {"2": "-1"}, + "832": {"12": "2", "13": "4", "18": "2", "3": "-2"}, + "833": {"12": "-2", "13": "4", "14": "-5", "15": "4", "18": "-6"}, + "834": {"13": "-2", "14": "-3", "18": "-4"}, + "835": {"12": "2", "14": "2", "15": "-4", "3": "2"}, + "836": {"13": "-4", "14": "-4", "15": "1", "18": "6"}, + "837": {"14": "1", "15": "-1", "18": "-2"}, + "838": {"13": "8", "14": "-1", "15": "-1", "18": "-4"}, + "839": {"13": "-2", "15": "1"}, + "840": {"1": "-3", "3": "-1"}, + "841": {"1": "-1", "16": "-2", "17": "2", "3": "1"}, + "842": {"16": "-2", "17": "2", "3": "1"}, + "843": {"3": "1"}, + "844": {"1": "-3", "16": "1"}, + "845": {"1": "1", "16": "-1", "17": "2"}, + "846": {"16": "1", "17": "-2"}, + "847": {"16": "-1", "17": "4"}, + "848": {"1": "-1", "19": "-14"}, + "849": {"1": "-3/4"}, + "850": {"1": "-1/2", "12": "-1/4"}, + "851": {"1": "-5/4", "12": "-1/4"}, + "852": {"1": "1/4", "12": "-5/4"}, + "853": {"1": "-1", "12": "-1/4"}, + "854": {"1": "-5/4", "12": "-1"}, + "856": {"0": "-6", "3": "-5/2"}, + "857": {"0": "-5/2", "3": "-9/2"}, + "858": {"0": "-5/4", "3": "-7/4"}, + "859": {"0": "-1/4", "3": "-1/4"}, + "860": {"0": "-1", "3": "-7/4"}, + "861": {"0": "-1", "3": "5/4"}, + "862": {"0": "1/4", "3": "-1"}, + "863": {"0": "7/4", "3": "2"}, + "864": {"13": "1", "19": "-2"}, + "865": {"13": "-3"}, + "866": {"13": "-5", "19": "-2"}, + "867": {"13": "1"}, + "868": {"19": "2"}, + "870": {"19": "-2"}, + "872": {"0": "5", "1": "-6", "16": "-7", "17": "-14", "19": "-10", "2": "1", "3": "-2"}, + "873": {"0": "1", "1": "-1", "16": "2", "17": "2", "19": "-7", "3": "2"}, + "874": {"0": "6", "1": "-3", "16": "3", "17": "2", "19": "1", "2": "-4"}, + "875": {"19": "-2", "2": "1"}, + "876": {"0": "4", "1": "2", "16": "4", "19": "-2", "2": "2"}, + "877": {"1": "-7", "16": "-7", "17": "-2", "19": "1", "2": "3"}, + "878": {"0": "5", "1": "-1", "16": "2", "17": "4", "19": "3", "2": "-1"}, + "879": {"0": "-1", "1": "-2", "16": "-5", "17": "-4", "19": "-14", "3": "2"}, + "880": {"10": "-1/4", "11": "-3/2", "14": "-1/4", "15": "-5/4", "5": "3/4", "6": "5/4", "7": "2", "8": "1/4"}, + "881": {"10": "3/4", "11": "-9/4", "14": "-9/4", "15": "-5/4", "4": "-5/4", "5": "5/4", "6": "-1/2", "7": "1/2", "8": "1", "9": "3/4"}, + "882": {"10": "-1/2", "11": "-5/4", "14": "-1", "15": "-5/4", "4": "-1", "5": "1/2", "6": "1/2", "7": "-1", "8": "3/2"}, + "883": {"11": "-1/2", "14": "1", "15": "-3/4", "4": "1/4", "5": "-1", "6": "5/4", "8": "-3/4", "9": "-1/4"}, + "884": {"10": "1/4", "11": "-5/4", "14": "1/4", "15": "-1", "4": "-3/2", "5": "1/2", "6": "-1", "7": "-3/4", "8": "-1/4", "9": "-1/4"}, + "885": {"10": "3/4", "11": "1/2", "14": "-1/4", "15": "-3/2", "4": "3/4", "5": "2", "6": "-1/4", "7": "-3/4"}, + "886": {"11": "1/2", "14": "3/2", "15": "-3/2", "4": "1/2", "5": "-1/4", "6": "-1/4", "7": "7/4", "8": "-1/2", "9": "-1/4"}, + "887": {"10": "-1", "11": "-1/4", "14": "1", "15": "-1/2", "4": "5/4", "5": "-1/4", "6": "-3/2", "7": "-1/4", "8": "5/4"}, + "888": {"17": "-1", "3": "-1/2"}, + "889": {"17": "-1"}, + "890": {"17": "-1", "3": "-1/4"}, + "891": {"17": "-3/2", "3": "3/4"}, + "892": {"17": "1/2", "3": "-1/4"}, + "893": {"3": "-1/4"}, + "894": {"17": "-1/2", "3": "-1/2"}, + "895": {"17": "-1", "3": "-1/2"}, + "896": {"16": "-18", "17": "-10"}, + "897": {"16": "-1", "17": "3"}, + "898": {"16": "4", "17": "2"}, + "899": {"16": "-1", "17": "5", "19": "-4"}, + "900": {"16": "3", "17": "1", "19": "-7"}, + "901": {"16": "-2", "19": "-1"}, + "902": {"16": "1", "17": "1", "19": "11"}, + "903": {"19": "7"}, + "904": {"1": "-1", "16": "-1", "17": "1", "4": "-1", "6": "-1"}, + "905": {"1": "-1", "18": "2", "4": "-1", "6": "-1"}, + "906": {"1": "-1", "18": "2", "4": "1", "6": "1"}, + "907": {"1": "-1", "16": "-1", "17": "1", "4": "-1", "6": "-1"}, + "909": {"16": "-1", "17": "1", "18": "2"}, + "910": {"16": "1", "17": "-1", "18": "6"}, + "912": {"12": "-2"}, + "913": {"10": "2", "12": "-2", "14": "-4", "15": "-4", "19": "-4", "4": "-2", "5": "2", "9": "2"}, + "914": {"10": "-2", "12": "2", "14": "-5", "15": "-4", "19": "-5", "4": "2", "5": "-2", "9": "-2"}, + "915": {"12": "-2", "14": "1", "19": "1"}, + "916": {"12": "-1", "14": "2", "15": "2", "19": "2"}, + "917": {"11": "-4", "12": "-1", "15": "6"}, + "918": {"12": "3", "14": "-1", "15": "4", "19": "-1"}, + "919": {"11": "-2", "12": "-1", "14": "3", "15": "2", "19": "3"}, + "921": {"1": "1", "14": "-3", "19": "-3"}, + "922": {"1": "1", "14": "1", "15": "-4", "19": "1"}, + "924": {"1": "2", "15": "2"}, + "925": {"1": "1", "14": "3", "19": "3"}, + "926": {"1": "-1", "14": "1", "19": "1"}, + "927": {"1": "6", "15": "2"}, + "928": {"20": "-14"}, + "944": {"10": "1", "12": "1", "13": "3", "14": "-9", "18": "-10", "4": "-8", "5": "-6", "7": "-5", "8": "1", "9": "7"}, + "945": {"13": "1", "14": "-6", "15": "-1", "18": "-6"}, + "946": {"10": "-2", "12": "-2", "13": "4", "15": "-2", "18": "-16", "4": "-5", "5": "-3", "7": "1", "8": "5"}, + "947": {"10": "-1", "12": "1", "13": "-6", "14": "1", "15": "-3", "4": "-7", "5": "1", "7": "-2", "9": "3"}, + "948": {"10": "1", "12": "-1", "13": "-3", "14": "-6", "15": "1", "18": "-4", "4": "-2", "5": "2", "7": "-5", "8": "3", "9": "1"}, + "949": {"10": "4", "13": "1", "14": "1", "18": "-8", "4": "-2", "5": "4", "8": "2", "9": "2"}, + "950": {"14": "-5", "15": "1", "18": "2", "4": "1", "5": "-3", "7": "-1", "8": "1"}, + "951": {"10": "-1", "12": "-1", "15": "-4", "18": "10", "4": "-5", "5": "-3", "7": "-2", "8": "-2", "9": "5"}, + "952": {"0": "3", "17": "-3", "3": "-3"}, + "955": {"0": "3", "17": "-3", "3": "-3"}, + "956": {"0": "2", "16": "3", "17": "-4", "3": "-1"}, + "957": {"0": "1", "16": "-1", "17": "-3"}, + "958": {"0": "-1", "16": "1", "17": "-5"}, + "959": {"0": "2", "16": "1", "17": "-2", "3": "-3"}, + "968": {"1": "-5/4", "16": "-1/2", "17": "-5/4", "2": "1/4"}, + "969": {"16": "-1/2"}, + "970": {"1": "-1/2", "17": "1/4", "2": "-1"}, + "971": {"1": "1/4", "2": "1/4"}, + "972": {"1": "1/2", "16": "1/4", "17": "1/4", "2": "1/2"}, + "973": {"1": "-7/4", "16": "-9/4", "17": "-1/2", "2": "3/4"}, + "974": {"1": "-1/4", "16": "5/4", "17": "1/4", "2": "-1/4"}, + "975": {"1": "-1/2", "16": "-3/4", "17": "-1"}, + "976": {"12": "-1", "13": "-8", "20": "-25", "3": "-4"}, + "977": {"12": "1", "13": "2", "19": "-3", "20": "-3"}, + "978": {"12": "-1", "19": "-7", "20": "2", "3": "-6"}, + "979": {"12": "-1", "19": "6", "20": "2"}, + "980": {"13": "2", "19": "-2", "20": "-1", "3": "-4"}, + "981": {"19": "-1", "20": "1"}, + "982": {"19": "7", "3": "-4"}, + "983": {"19": "-2", "3": "2"}, + "986": {"0": "-4", "16": "-5", "17": "-10", "3": "-4"}, + "987": {"0": "-4", "16": "1", "17": "-4"}, + "988": {"0": "3", "17": "-2", "3": "-1"}, + "989": {"0": "1", "3": "-7"}, + "990": {"0": "-3", "16": "-1", "3": "-7"}, + "991": {"0": "1", "16": "-1", "3": "1"}, + "1008": {"0": "-1", "11": "-4", "12": "-2", "14": "-9", "15": "3"}, + "1009": {"11": "7", "12": "2", "14": "-9", "15": "-1", "16": "-1", "17": "-1"}, + "1010": {"11": "3", "12": "4", "14": "-9", "15": "1", "16": "-1", "17": "-1", "18": "-2"}, + "1011": {"0": "-1", "11": "-6", "12": "4", "14": "3", "15": "5", "18": "-2"}, + "1012": {"11": "5", "14": "-3", "15": "1", "16": "-1", "17": "-1"}, + "1013": {"0": "1", "12": "-4", "14": "1", "15": "-3", "17": "2"}, + "1014": {"0": "-1", "14": "1", "15": "3", "17": "2", "18": "2"}, + "1015": {"11": "9", "14": "-1", "15": "1", "16": "1", "17": "1", "18": "2"}, + "1016": {"16": "-20", "17": "-1", "3": "-2"}, + "1017": {"0": "-2", "16": "-9", "17": "7", "18": "-2", "20": "-1", "3": "-3"}, + "1018": {"17": "-5", "18": "6", "20": "3", "3": "2"}, + "1019": {"0": "-2", "16": "-5", "17": "-9", "3": "-1"}, + "1020": {"11": "1", "16": "-2", "17": "1", "18": "2", "20": "1", "3": "-1"}, + "1021": {"11": "-5", "16": "3", "17": "1"}, + "1022": {"11": "-1", "16": "10", "17": "1", "3": "1"}, + "1023": {"11": "-1", "16": "-3", "17": "1", "18": "6", "20": "3"}, + "1024": {"12": "1/4", "14": "-9/4", "18": "-5/2"}, + "1025": {"14": "-3/2", "15": "-1/4", "18": "-3/2"}, + "1026": {"12": "-1/2", "15": "-1/2", "18": "-4", "4": "-1/2", "5": "1/2"}, + "1027": {"12": "1/4", "14": "1/4", "15": "-3/4", "4": "-1/2", "5": "1/2"}, + "1028": {"12": "-1/4", "14": "-3/2", "15": "1/4", "18": "-1", "4": "-1/2", "5": "1/2"}, + "1029": {"14": "1/4", "18": "-2", "4": "-1/2", "5": "1/2"}, + "1030": {"14": "-5/4", "15": "1/4", "18": "1/2"}, + "1031": {"12": "-1/4", "15": "-1", "18": "5/2"}, + "1040": {"11": "-1", "14": "-6", "15": "-1", "18": "-18", "19": "-6", "20": "-9"}, + "1041": {"0": "1", "11": "-1", "14": "5", "18": "-6", "19": "5", "20": "-1", "3": "-2"}, + "1042": {"0": "-6", "14": "-1", "15": "3", "18": "4", "19": "-1", "3": "-8"}, + "1043": {"0": "-1", "11": "-2", "18": "8", "20": "4", "3": "4"}, + "1044": {"0": "5", "1": "-5", "11": "4", "14": "3", "15": "1", "16": "-1", "18": "-6", "19": "3", "2": "-1", "20": "-1", "3": "-1"}, + "1045": {"0": "4", "1": "1", "11": "-2", "14": "2", "16": "-1", "18": "2", "19": "2", "2": "1", "20": "1", "3": "-5"}, + "1046": {"0": "3", "1": "-1", "11": "-1", "15": "-1", "16": "-3", "2": "-1", "3": "-3"}, + "1047": {"0": "6", "1": "-1", "11": "-1", "14": "-1", "16": "-1", "19": "-1", "2": "-1", "3": "-7"}, + "1048": {"0": "-6", "16": "-4", "3": "2"}, + "1049": {"14": "-5", "15": "-2", "19": "-5"}, + "1050": {"0": "5", "12": "-3", "14": "-9", "16": "-1", "17": "8", "19": "-9", "3": "6"}, + "1051": {"0": "1", "12": "5", "15": "8", "16": "-3", "17": "4"}, + "1052": {"0": "5", "12": "-2", "14": "1", "15": "3", "16": "2", "17": "6", "19": "1", "3": "5"}, + "1053": {"0": "-1", "12": "-2", "15": "-3", "16": "2", "17": "-2", "3": "3"}, + "1054": {"0": "4", "12": "-3", "14": "6", "15": "-1", "16": "-1", "17": "2", "19": "6", "3": "3"}, + "1055": {"0": "-8", "12": "-3", "14": "3", "15": "-5", "16": "-3", "17": "2", "19": "3", "3": "-3"}, + "1056": {"10": "-1", "12": "-5", "18": "-4", "20": "-4", "4": "-18", "5": "3", "6": "-3", "7": "-2", "8": "-1", "9": "-4"}, + "1057": {"12": "1", "15": "-1", "18": "-10", "20": "-3", "4": "-4", "5": "-11", "6": "5", "7": "1", "8": "-3", "9": "2"}, + "1058": {"12": "5", "18": "-10", "20": "-7", "4": "-3", "5": "10", "6": "-1", "8": "5", "9": "-3"}, + "1059": {"10": "1", "12": "3", "15": "-1", "18": "4", "20": "-2", "4": "1", "5": "-4", "6": "-3", "7": "-1", "8": "-1", "9": "-1"}, + "1060": {"10": "-2", "12": "-1", "18": "8", "20": "9", "4": "-5", "5": "-4", "6": "-3", "7": "4", "8": "-2"}, + "1061": {"10": "1", "12": "-5", "15": "1", "18": "6", "20": "4", "4": "-1", "5": "8", "6": "5", "7": "-1", "8": "-2", "9": "-6"}, + "1062": {"10": "3", "12": "-5", "18": "6", "20": "2", "4": "-2", "5": "9", "6": "1", "7": "-8", "8": "-4", "9": "3"}, + "1063": {"10": "4", "12": "1", "15": "-1", "20": "1", "5": "1", "6": "-5", "7": "1", "9": "1"}, + "1064": {"4": "-1", "6": "-1"}, + "1066": {"4": "-1", "6": "-1"}, + "1068": {"4": "-1", "6": "-1"}, + "1070": {"4": "1", "6": "1"}, + "1072": {"11": "-1", "14": "-9/4", "15": "3/4"}, + "1073": {"11": "5/4", "14": "-9/4", "15": "-1/4"}, + "1074": {"11": "3/4", "14": "-9/4", "15": "1/4", "18": "-1/2"}, + "1075": {"11": "-1", "14": "3/4", "15": "5/4", "18": "-1/2"}, + "1076": {"11": "7/4", "14": "-3/4", "15": "1/4"}, + "1077": {"14": "1/4", "15": "-3/4"}, + "1078": {"11": "-1/2", "14": "1/4", "15": "3/4", "18": "1/2"}, + "1079": {"11": "9/4", "14": "-1/4", "15": "1/4", "18": "1/2"}, + "1080": {"16": "-5", "17": "-1/4"}, + "1081": {"16": "-7/4", "17": "3/2"}, + "1082": {"17": "-5/4"}, + "1083": {"16": "-3/4", "17": "-5/2"}, + "1084": {"16": "-1/2"}, + "1085": {"16": "3/4", "17": "1/4"}, + "1086": {"16": "5/2", "17": "1/2"}, + "1087": {"16": "-3/4", "17": "1/4"}, + "1089": {"18": "2", "20": "-2"}, + "1090": {"18": "-14", "20": "-6"}, + "1091": {"18": "12"}, + "1092": {"18": "-8", "20": "-4"}, + "1093": {"18": "2", "20": "4"}, + "1094": {"18": "6", "20": "-4"}, + "1095": {"18": "4", "20": "4"}, + "1097": {"16": "-1"}, + "1098": {"0": "-7", "16": "-4", "17": "-13", "3": "-5"}, + "1099": {"0": "11", "16": "-1", "17": "9", "3": "11"}, + "1100": {"0": "-3", "16": "-2", "17": "-5", "3": "2"}, + "1101": {"0": "-5", "16": "1", "17": "3"}, + "1102": {"0": "6", "17": "-2", "3": "-1"}, + "1103": {"16": "5", "17": "-2", "3": "-3"}, + "1104": {"10": "-1/4", "4": "-9/2", "5": "3/4", "6": "-3/4", "7": "-1/2", "8": "-1/4", "9": "-1"}, + "1105": {"4": "-1", "5": "-11/4", "6": "5/4", "7": "1/4", "8": "-3/4", "9": "1/2"}, + "1106": {"4": "-3/4", "5": "5/2", "6": "-1/4", "8": "5/4", "9": "-3/4"}, + "1107": {"10": "1/4", "4": "1/4", "5": "-1", "6": "-3/4", "7": "-1/4", "8": "-1/4", "9": "-1/4"}, + "1108": {"10": "-1/2", "4": "-5/4", "5": "-1", "6": "-3/4", "7": "1", "8": "-1/2"}, + "1109": {"10": "1/4", "4": "-1/4", "5": "2", "6": "5/4", "7": "-1/4", "8": "-1/2", "9": "-3/2"}, + "1110": {"10": "3/4", "4": "-1/2", "5": "9/4", "6": "1/4", "7": "-2", "8": "-1", "9": "3/4"}, + "1111": {"10": "1", "5": "1/4", "6": "-5/4", "7": "1/4", "9": "1/4"}, + "1112": {"4": "-1/4", "6": "-1/4"}, + "1114": {"4": "-1/4", "6": "-1/4"}, + "1116": {"4": "-1/4", "6": "-1/4"}, + "1118": {"4": "1/4", "6": "1/4"}, + "1120": {"12": "-3"}, + "1121": {"12": "5"}, + "1122": {"12": "2", "18": "-2", "20": "-1"}, + "1123": {"12": "2", "18": "-2", "20": "-1"}, + "1124": {"12": "-1", "18": "2", "20": "1"}, + "1125": {"12": "1", "18": "-2", "20": "-1"}, + "1126": {"12": "-2"}, + "1136": {"12": "8"}, + "1137": {"12": "5"}, + "1138": {"12": "-4"}, + "1139": {"12": "-1"}, + "1141": {"12": "1"}, + "1142": {"12": "6"}, + "1143": {"12": "1"} +} diff --git a/research/centre-kernel-feedback/README.md b/research/centre-kernel-feedback/README.md new file mode 100644 index 0000000000..adf1c61917 --- /dev/null +++ b/research/centre-kernel-feedback/README.md @@ -0,0 +1,245 @@ +# Transporting the terminal-Y kernel through centre feedback + +**Research interface and exact finite certificate; no new κ or native supplier.** +PR2799's 149-dimensional terminal-Y kernel survives changes to the centre +operators, but its basis must change. Exactly **128** of its directions stay +valid without any operator-dependent correction. The other **21** require +feedback corrections at **546** chronological centre sites in the selected +144-call schedule. + +This package supplies the exact correction matrix, a causal transport proof, +and a source-preserving repair program with a complete bill in an explicit +rational field-bank model. It addresses the operator-sensitivity obligation +behind the proposed quotient; it does not establish a consumer accepting that +quotient. The accepted κ remains `0.001672660197076918`. + +## Model and result + +The source is the selected PR1094 480-helper word, with 14,336 ordinary owners, +144 calls, 1,152 rank-eight centre events, 144 bridges and 16 signed terminal +exchanges. Keep every scalar instruction, shared owner, private clear, bridge +and continuation. As in PR2622/2799, frame, idle and address actions are +**projected to identity**. Retain arbitrary equal ordinary input dirt in the +compared executions; their initial difference is zero. + +In this projection, replace the identity action at centre site `j` by any linear +operator `H_j` on a common vector space `V`. Add an error `e_j` immediately +**after** that action, following PR2799's insertion convention. Compare two +executions with the same `H_j` and initial data. This defines an error-response +map; the modified no-error program is not asserted to implement the selected +supplier. + +Let `R` be the original final ordinary response, `R_Y` its final-Y restriction, +and `K` the strictly lower triangular map from identity-centre insertion errors +to the values immediately **before** later centre events. All 1,152 rows of `K` +are independently reconstructed here. The fixed scalar readout is +`Y = {i : i mod 224 >= 112}`. + +Write `Δ = diag(H_j-I)` and understand scalar matrices as acting on copies of +`V`. Then the complete deformed response is + +```text +R_H = R (I - Δ K)^(-1), +ker(P_Y R_H) = (I - Δ K) ker(R_Y). +``` + +These identities hold even when the `H_j` do not commute or are singular. +For finite-dimensional `V`, the kernel dimension is always `149 dim(V)`. +This is an application of the standard causal feedback identity, not a claim +that the abstract identity itself is new. + +Let `B` be PR2799's retained 149-column kernel basis: 128 coordinate directions +and 21 other directions. The exact new computation gives: + +| Object | Rank / coverage | +|---|---:| +| `K B` on the 128 coordinate directions | zero | +| `K B` on the 21 other directions, forward-site rows | 21; 394 nonzero rows; 1,461 terms | +| `K B` on the 21 other directions, backward-site rows | 21; 152 nonzero rows; 452 terms | +| Total correction matrix | 546 nonzero rows; 1,913 rational coefficients | +| Final-Y derivative on the 21 other directions, forward `t`, backward `t^-1`, at `t=1` | rank 21 | + +Thus **the parameter-independent kernel is exactly the 128 coordinate +directions**, already present in PR2799 and all lying in the final forward +stage. The additional 21 directions are valid with the transported errors +`e = Bz - ΔKBz`. A nonzero derivative of a fixed basis vector does **not** imply +that the deformed kernel loses dimension. The distinction is central here. + +[CORRECTION.json](CORRECTION.json) gives every nonzero row of `KB` for the +21 noncoordinate parameters. A key is chronological error index `8*c+k`, not +the call's time field; parameter columns are numbered 0 through 20 in PR2799's +basis order. [RESULT.json](RESULT.json) records exact minors, coefficient +digests, the witness and both invoices. + +## Proof of transport and of the fixed-kernel statement + +At site `j`, let `f_j` denote its effective insertion into the original +identity-centre program. All earlier effective errors determine its input +difference `(Kf)_j`. Applying the changed centre and then adding `e_j` gives + +```text +f_j = e_j + (H_j-I)(Kf)_j. +``` + +No insertion affects an earlier centre input. Therefore `ΔK` is strictly lower +triangular, `(ΔK)^1152=0`, and `I-ΔK` has the finite inverse +`I+ΔK+...+(ΔK)^1151`. Substituting `f=(I-ΔK)^(-1)e` into the original final +response proves both identities. The argument uses only linearity and +chronology, so it applies to noncommuting vector operators and singular +assignments elsewhere in the program. It also proves equality of the whole +ordinary difference trajectory after each corrected centre with the original +trajectory for `f=Bz`. + +For the fixed-kernel claim, specialize to forward centres `tI` and backward +centres `t^-1 I`. If `e` is valid for every such nonzero `t`, at `t=1` it belongs +to the already certified 149-dimensional kernel. Its derivative must vanish. +The replay computes that derivative exactly in `Q[ε]/(ε²)`, with forward +`1+ε` and backward `1-ε`, and a nonzero 21-by-21 prime-field minor proves +injectivity on the 21 noncoordinate directions. Hence their coefficients must +vanish. Conversely, `KB=0` on the 128 coordinate directions, so transport leaves +them unchanged for **every** collection of `H_j`. The same necessity holds if +`t` is restricted to the complex unit circle: set `t=exp(iθ)` and the derivative +at zero is `i` times the checked derivative. This is not a native frame/cover +rank theorem. + +For example, PR2799's `-4 e8 + e40` cancels at `t=1`. Its reciprocal derivative +changes **903** final Y owners, including owner 560 by `-1` and owner 561 by +`-1/2`. The literal verifier checks every derivative coefficient. The transported +combination cancels again; the 903 values do not contradict PR2799. + +## One explicit repair, with source access and cleanup + +Assume the 21 arbitrary vector parameters `Z_k` are available at entry and stay +read-only. Assume a single invertible operator `H`, using `H` at forward sites +and `H^-1` at backward sites. These are interface assumptions, not facts about +the actual caller. Allocate 42 initially zero work fields: + +```text +U+_k = (H-I) Z_k, U-_k = (H^-1-I) Z_k. +``` + +For each field, the literal preparation is `W += Z; W = H^(±1) W; W -= Z`. +At site `j`, add its original kernel row in `Z`, then subtract its correction +row in `U+` or `U-`. Reverse the preparations after the last injection. All 42 +fields return to zero and every `Z` is unchanged at every prefix. + +There are 50 original kernel terms and 1,913 correction terms. To avoid treating +a weighted addition as a unit native operation, `repair.py` expands each +nonunit coefficient `q` using one additional zero scratch field: + +```text +S += source; S *= q; destination += S; S *= 1/q; S -= source. +``` + +The scratch returns to zero after every such term and at every centre boundary. +All denominators are nonzero exact rationals. These scales are not claimed to +be a paid BIT or physical stream implementation. + +| Complete generated repair | Count | +|---|---:| +| Calls to `H` | 42 | +| Calls to `H^-1` | 42 | +| Signed unit additions, including source loads and cleanup | 4,969 | +| Rational scalings | 2,838 | +| Total operations | 7,891 | +| Initially zero work fields, restored to zero | 43 | +| Read-only parameter fields | 21 | + +The 1,152 injection targets in the formal replay represent successive arbitrary +dirty centre slots; they are not 1,152 extra retained work fields. The word +adds the required error to each slot. Its operations are checked over the free +Laurent module `Q[H,H^-1]`, so the check covers every invertible linear `H`, not +just numerical samples. + +The abstract cost recurrence for this module is + +```text +C_repair = 42 C(H) + 42 C(H^-1) + 4969 C(signed ADD) + 2838 C(rational SCALE). +``` + +This includes all accesses in the displayed bank program and its restoration. +Availability of the 21 parameters and 43 clean fields, physical retention, +movement, frames, hosting, precision, and the eventual complementary X output +are **additional unresolved caller obligations**. Clean fields are a stated +input contract; their creation from arbitrary dirty workspace is not free. +No unchanged supplier tariff is applied to this new interface. + +A narrower optimality fact explains why this direct repair is not a free +21-call saving. In a one-pass linear batch that queries only `H(sum a_k Z_k)` +or `H^-1(sum a_k Z_k)` with fixed rational coefficients and combines their +outputs linearly, the coefficients of `H` and `H^-1` have ranks 21 and 21. +Each query contributes a rank-at-most-one coefficient matrix. Comparing the +independent Laurent powers forces at least **42 queries before cleanup**. +Preparation attains that count. This excludes only that direct batch model; +it is not a lower bound for adaptive queries, reuse of existing caller outputs, +a known special operator, or recursive children. The 84-call restored program +is not claimed optimal. It supplies no changed paid profile or κ. + +## Reproduce and verification scope + +Scientific base: `28f54620ff770dd051d5df35882bd84303d13c6f`, priority revision 5. +Rebased onto refreshed main `d9b24831174325cad2e04e34da2068d7acb02938`; +guidance, selected inputs and the replay runner are unchanged. +Dependencies and source Git blobs/SHA256 values are in [SOURCES.json](SOURCES.json). +Only the selected replay archive is an external execution input. Compressed +predecessor receipts decompress to their byte-exact original JSON and are never +executed. No predecessor code is imported. + +With standard-library CPython 3.12: + +```sh +python3.12 -B scripts/research_package.py --package research/centre-kernel-feedback +``` + +Expected final marker: + +```text +PASS_REGISTERED_RESEARCH_PACKAGE research/centre-kernel-feedback outcome=completed +``` + +The primary forward replay reproduces **every** original local and global +response coefficient, checks strict causality and all kernel vectors, and +certifies both correction ranks and the derivative rank. Rational elimination +and separate modular minors supply matching exact evidence. The separately +written literal interpreter executes all **2,835,792** scalar instructions, +checks every chronological correction coefficient and private exit, and tests +1,152 repairs using noncommuting invertible 2-by-2 operators; wrong signs fail +at 435 sites. A complete rational literal derivative witness is also retained. +The general operator statement is the proof above, not a finite-test inference. + +Controls include primitive assignment oracles, permutation-sum determinant +oracles, omitted cleanup, a wrong oracle direction, optimized Git-free replay, +source/reference corruption, a changed correction coefficient, bool/integer +receipt substitution and occupied-output refusal. Normal replay is read-only; +`verify.py --out ABSENT_DIRECTORY` writes fresh receipts. No whole-repository +replay, native cover/compiler replay, full supplier admission, all-size theorem, +formal proof-assistant run or independent human review is claimed. + +## Credit + +Credit **Arham Tahir / PR2799** at +`3401bcfce70ad5b692cd4d89e92955229f56c819` for the terminal kernels and reverse +response, and **ywz65 / PR2622** at +`4ffb893a08e8868057a30a065642d0b5f647f742` for the complete response and quotient +handoff. PR2763's independently checked source histories are a different +obligation. Retain **Sagar Thakrar / PR2199**, **Adam Gall / PR1918**, +**commdata2338 / PR2048**, **Aaron Wang / PR2391**, and the Rohan Arun, +Jeremy Kothe, Hao Yan, icekylinx, DreamingOfClouds and Douglas Colkitt selected +construction/compiler lineage. PR2391's native counterexample is a reason to +keep this projection boundary explicit. + +New proof instantiation, code and checking by **Tekalign (@tekuuu), with +substantial OpenAI Codex assistance**. The two checking implementations have +the same AI-assisted author; no independent human/subagent review is claimed. +Apache-2.0. [TASK.json](TASK.json) records the seed, three candidates, scope +refinement, bounded coverage and coordination. + +## Open next questions + +The next useful tasks are concrete caller obligations, not another subset +census. Can a caller accept the 128 terminal directions while consuming or +restoring X within budget? Can it supply existing `HZ`/`H^-1 Z` values that +avoid this direct repair's additional calls? Can one compensated direction be +lifted through the actual native cover and bridge actions? For each question, +TASK.json records a feasible first step and the missing contract. This round +stops at the verified interface and does not launch supplier expansion. diff --git a/research/centre-kernel-feedback/RESULT.json b/research/centre-kernel-feedback/RESULT.json new file mode 100644 index 0000000000..1d5792408e --- /dev/null +++ b/research/centre-kernel-feedback/RESULT.json @@ -0,0 +1,366 @@ +{ + "Y_rank": 1003, + "baseline_response_sha256": "b5237756bf1216f7afa6a0570b8df58ce070d8c32583022b1e5aaca7fdf9f941", + "call_orientations": [ + "forward", + "forward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "backward", + "backward", + "forward", + "forward", + "forward", + "forward" + ], + "causal_feedback_sha256": "ff079feb73b01d475b380d979afe2b20182c2c897022fb41728d24a7b4109d54", + "direct_repair_invoice": { + "build_and_uncompute_unit_adds": 168, + "clean_work_fields": 42, + "correction_weighted_adds": 1913, + "forward_oracle_calls": 42, + "injection_weighted_adds": 1963, + "inverse_oracle_calls": 42, + "original_kernel_weighted_adds": 50 + }, + "error_sites": 1152, + "expanded_repair_invoice": { + "clean_work_fields": 43, + "formal_dirty_injection_targets": 1152, + "oracle_H": 42, + "oracle_H_inverse": 42, + "rational_scales": 2838, + "signed_unit_adds": 4969, + "source_fields": 21, + "source_written_at_any_prefix": false, + "total_instructions": 7891 + }, + "feedback_sha256": "428d6acb9d2ac910e4c64cef7285aff062a6b663291cc70a973dce359aa7497c", + "feedback_sites": 546, + "feedback_terms": 1913, + "kernel_dimension": 149, + "kernel_sha256": "0b630ad35578ee0f9b70fd28bdc27e5e88695401c0c13a4bc5a138e320a031a2", + "local_scalar_instructions": { + "backward": 19693, + "forward": 19693 + }, + "noncoordinate_directions": 21, + "orientation_feedback": { + "backward": { + "columns": [ + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148 + ], + "determinant_mod_2147483647": 623295701, + "rank": 21, + "rows": [ + 40, + 120, + 122, + 264, + 416, + 417, + 419, + 420, + 421, + 422, + 423, + 497, + 563, + 576, + 608, + 609, + 616, + 617, + 720, + 848, + 928 + ], + "sites": 152, + "terms": 452 + }, + "forward": { + "columns": [ + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148 + ], + "determinant_mod_2147483647": 2078457884, + "rank": 21, + "rows": [ + 160, + 161, + 224, + 368, + 369, + 370, + 432, + 433, + 434, + 436, + 480, + 552, + 592, + 625, + 626, + 696, + 697, + 705, + 738, + 864, + 976 + ], + "sites": 394, + "terms": 1461 + } + }, + "reciprocal_tangent": { + "columns": [ + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148 + ], + "determinant_mod_2147483647": 43218, + "rank": 21, + "rows": [ + 394, + 395, + 420, + 422, + 423, + 424, + 427, + 434, + 560, + 784, + 785, + 2181, + 2353, + 3472, + 3988, + 3989, + 3990, + 4368, + 5720, + 5722, + 5936 + ] + }, + "reciprocal_tangent_sha256": "77f30be46f8c88b83535395d4a9054e0d3e6747a866ee9f411325b65f385c472", + "scope": "Common-frame scalar projection with arbitrary linear centre operators; no native routing, supplier or kappa claim.", + "status": "PASS_CENTRE_KERNEL_FEEDBACK", + "terminal_coordinate_directions": 128, + "witness_basis": { + "40": "1", + "8": "-4" + }, + "witness_tangent_Y_first16": { + "560": "-1", + "561": "-1/2", + "564": "-2", + "565": "-1", + "566": "-1", + "567": "1/2", + "570": "2", + "571": "1", + "572": "5/2", + "573": "5/2", + "574": "1/2", + "575": "3/2", + "576": "3", + "577": "-3", + "578": "-1", + "579": "-2" + }, + "witness_tangent_Y_nonzero": 795, + "witness_tangent_Y_sha256": "2f0a309b2ee41706b6eb17df12bab08a2e19b61e46faa22bebe71fb28f1b3df2" +} diff --git a/research/centre-kernel-feedback/SOURCES.json b/research/centre-kernel-feedback/SOURCES.json new file mode 100644 index 0000000000..736048e83f --- /dev/null +++ b/research/centre-kernel-feedback/SOURCES.json @@ -0,0 +1,62 @@ +{ + "schema_version": 1, + "base_commit": "28f54620ff770dd051d5df35882bd84303d13c6f", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "889b95d936746df124872133ae1e7cc339adcb92", + "sha256": "7d185cd8c2af35988d638d969748ad7b670f902606444dbfc748e4402c340df6" + }, + { + "path": "research/community-frontier1094-audit/selected-replay.tar.gz", + "usage": "input", + "git_blob": "c24daf067f9c543421d89ca2eeaa4eb78a57fb6f", + "sha256": "f1da80610bf33c58527f18ad63b4350d0b864e1d4486141ee17ac9bed4d529d6" + } + ], + "archive_members": { + "global": { + "path": "candidate/strict/global/hosted/GLOBAL-TEMPLATE.json.gz", + "sha256": "2acf02b418078e37090495c601fe550448751d4f35912757b13a1f778efc7760" + }, + "program": { + "path": "candidate/strict/global/base/providers/gauge44/LOCAL-PROGRAMS.json.gz", + "sha256": "241fde27d4e43f5a9cb6b128f9f76c5131a53d09f0371676163f914d0b0fef3a" + }, + "word": { + "path": "candidate/strict/global/base/providers/gauge44/CANONICAL-WORD.json.gz", + "sha256": "16bc0ebb04b4be6c0ade74badc6a0c0cdba4215eda86e4ff9f13abf8ecebd219" + } + }, + "references": [ + { + "local": "pr2799-result.json.gz", + "commit": "3401bcfce70ad5b692cd4d89e92955229f56c819", + "path": "research/selected-centre-stream-readouts/RESULT.json", + "author": "Arham Tahir, with OpenAI Codex assistance", + "license": "Apache-2.0", + "sha256": "ab317746a30a0436e6ae998d2332dcbd0b32e1c868dd5cd6cda33ba0cce475ab", + "git_blob": "076b3e1bdc366585dba014555b44f2c8335ed74b", + "usage": "Pinned comparison data, never executed.", + "encoding": "gzip; pins authenticate uncompressed predecessor bytes" + }, + { + "local": "pr2622-result.json.gz", + "commit": "4ffb893a08e8868057a30a065642d0b5f647f742", + "path": "research/selected-centre-endpoint-error/RESULT.json", + "author": "ywz65, with Codex assistance", + "license": "Apache-2.0", + "sha256": "8296ec7719605fbb03de3908ccce8bd12d4b02c2df38f982d3ffa9b21f9b92b7", + "git_blob": "d5032684fbea4a378537c1aa1abadcf403d3d810", + "usage": "Pinned comparison data, never executed.", + "encoding": "gzip; pins authenticate uncompressed predecessor bytes" + } + ] +} diff --git a/research/centre-kernel-feedback/TASK.json b/research/centre-kernel-feedback/TASK.json new file mode 100644 index 0000000000..e59fc36c0a --- /dev/null +++ b/research/centre-kernel-feedback/TASK.json @@ -0,0 +1,145 @@ +{ + "schema_version": 1, + "task_id": "centre-path-sharing", + "priority_revision": 5, + "base_commit": "28f54620ff770dd051d5df35882bd84303d13c6f", + "original_card": { + "id": "centre-path-sharing", + "question": "Can the 64-per-call centre path (eight rank-8 COPY/ERASE totals through the private temporary) be shared across calls or shrunk?", + "starting_points": [ + "docs/research/research-family-status.md", + "research/complex-local-word-ceiling/README.md", + "research/split-centres-global/proofs/PR386-BIT-GEOMETRY.txt", + "certificates/selected-result.json" + ], + "methods": [ + "Derive a fully charged favorable relaxation for sharing one centre path across k calls, including restoration, hosting and precision.", + "Prove a lower bound on copied information per call for the selected decoder contract." + ], + "acceptance_gate": "Show the changed centre charge and copy profile per call with every added restoration or hosting cost charged, and its ceiling via ceiling.ceiling(centre=...). 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", + "research/complex-local-word-ceiling/verify.py" + ], + "expected": "PASS_COMPLEX_LOCAL_WORD_CEILING", + "inspect": "Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.", + "scope": "Positive control and planning budget only; this is not a new construction or full cold replay." + }, + "first_experiment": "Write the per-call centre charge and copy children for sharing across k = 2 calls, charge the sharing overhead, and screen it; stop this route if even the ideal sharing gains under 10%. Ideal budgets: free 2.80x, shared by two 1.90x (levers.py).", + "bottleneck_link": "The centre path consumes 64 of about 99.6 unpaid coordinates per call, i.e. about 64% of the raw deficit.", + "allowed_variations": [ + "One sharing pattern across a fixed number of calls.", + "One reduced copied-total contract for the existing decoder.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "scope_change_triggers": [ + "Removing copies without a replacement contract for the decoder's copied totals.", + "Continuing a partial cost improvement while leaving the same unpriced consumer, restoration or central-readout obligation unresolved; refresh the family expansion decision first. Local product-retiming evidence has a narrow scope and is not a ban on changed graphs or contracts." + ], + "overlap_terms": [ + "centre path", + "copied totals", + "private temporary", + "shared centre", + "batching" + ] + }, + "scope_status": "changed", + "actual_scope": "Independent forward verification of the selected terminal-Y kernel, its exact causal transport through arbitrary linear centre operators, and one completely priced abstract repair.", + "scope_change_reason": "Seed75 assigns independent verification. PR2799 supplies a new terminal quotient but no operator-sensitive consumer. Test the first-order survival obligation rather than repeat its readout rank census. The evidence-driven refinement distinguishes a rotating kernel from rank loss and supplies a complete transported kernel.", + "bottleneck_link": "A nontrivial terminal quotient could change centre work only if later queries and the eventual complementary output are correctly handled; this contribution gives the exact feedback repair and its cost in one explicit model.", + "budget_minutes": 60, + "assignment_seed": 75, + "track": "independent verification or formalization", + "stop_rule": "Complete the 149-direction feedback and reciprocal-tangent test; implement one repair and price source access and cleanup. No native or supplier expansion when the direct repair already costs at least 42 oracle evaluations before cleanup for the 21 extra directions. Reserve final 25 percent for verification and handoff.", + "outcome": "completed", + "evidence": "RESULT.json and CORRECTION.json; all baseline response coefficients; exact feedback matrices and prime-field minors; literal full schedule; free-Laurent repair word; mutation and export controls.", + "author": "Tekalign (@tekuuu), with substantial OpenAI Codex assistance", + "ai_assistance": "Substantial OpenAI Codex assistance in derivation, implementation, verification and writing. No subagents, independent human review or proof-assistant execution this round.", + "claim": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2791#discussioncomment-18960203", + "candidates": [ + "Selected terminal quotient: test operator-sensitive feedback and a complete causal repair; chosen because PR2799 has no such check.", + "PR2742/2805 native transported-shear absorption into a full consumer; not chosen because the positive-rank child deletion and physical boundary are still unspecified.", + "PR2802 retired-lender invoice audit; not chosen because this is the crowded fixed-word refinement route and does not target a structural change." + ], + "predecessors": [ + { + "pr": 2799, + "head": "3401bcfce70ad5b692cd4d89e92955229f56c819", + "credit": "Arham Tahir; terminal X/Y kernels and reverse response" + }, + { + "pr": 2622, + "head": "4ffb893a08e8868057a30a065642d0b5f647f742", + "credit": "ywz65; complete response and weakened-readout handoff" + }, + { + "pr": 2763, + "head": "24b985e05d77a6005e3b18cdd4a7c33da9c0d260", + "credit": "Independent source-history audit; different obligation" + } + ], + "coverage": { + "error_sites": 1152, + "kernel_directions": 149, + "ordinary_owners": 14336, + "calls": 144, + "literal_scalar_instructions": 2835792, + "parameter_domain": "Exact first-order reciprocal deformation plus an algebraic theorem for arbitrary linear centre operators in the fixed common-frame projection. The repair word is over a free Laurent module for arbitrary invertible shared H.", + "completed": true, + "native_claim": false, + "search_claim": false + }, + "expansion_decision": "Retain the local interface result; do not expand it into a supplier. The one-pass direct batch requires 42 oracle evaluations before restoration; the supplied source-preserving implementation uses 84 and 43 initially clean work fields. The 128 terminal coordinate directions still need a real caller accepting discarded X outputs.", + "open_questions": [ + { + "question": "Can a real caller use the 128 terminal coordinate directions without repaying the complementary output?", + "why_it_matters": "They are the only parameter-independent kernel in this projection and require no feedback repair.", + "first_step": "Pin one actual caller, its demanded outputs and the complete complementary-output consumption/restoration.", + "blocked_by": "legal consumer, physical routing and full two-supplier invoice" + }, + { + "question": "Can an existing caller supply the needed HZ or H-inverse-Z values without extra oracle calls?", + "why_it_matters": "Existing outputs could evade the direct batch model and reduce the repair cost.", + "first_step": "Exhibit exact source equations and chronological availability for the 21 parameters, then price all retention and cleanup.", + "blocked_by": "No such source equations or native availability are supplied here." + }, + { + "question": "Does a native global frame/cover model admit an analogous compact kernel?", + "why_it_matters": "Common-frame scalar projection is not a native rank theorem.", + "first_step": "Lift one named compensated direction through actual cover owners, adapters and bridges.", + "blocked_by": "physical chart and payload covariance; PR2391 cautions against scalar-to-native inference." + } + ], + "freshness": { + "canonical_main": "28f54620ff770dd051d5df35882bd84303d13c6f", + "initial_all_state_pr_metadata_count": 2506, + "initial_open_pr_metadata_count": 732, + "overlap_open_pr_metadata_count": 733, + "broad_discussion_refresh": "Failed with network timeout; old 1408-record cache not represented as fresh. Targeted2791,1163 and latest1166 handoffs read live.", + "review_state": "Selected1094 unchanged; PR2805 open/no reviews/61 queued jobs. PR2802 is a newer pending numerical claim, not selected.", + "scope_limits": "Titles and bodies, current ledger and relevant package notes; not every PR diff or private work.", + "pre_submission_main": "d9b24831174325cad2e04e34da2068d7acb02938", + "checked_at_utc": "2026-10-15T23:02:50Z", + "inputs_guidance_selection_and_runner_unchanged": true, + "final_open_pr_metadata_count": 722, + "highest_open_pr_number": 2813, + "targeted_predecessor_2799_head_unchanged": true, + "final_targeted_discussion": "2791 comments and replies read live; only this scope is claimed. No metadata match for causal kernel transport in all722 open PR bodies." + }, + "validation": { + "environment": "Linux x86_64; CPython3.12.14; standard library", + "registered_replay": "PASS_REGISTERED_RESEARCH_PACKAGE research/centre-kernel-feedback outcome=completed", + "literal": "2,835,792 scalar instructions;1152 noncommuting repairs;435 wrong-sign rejections", + "controls": "3 behavioral groups pass, including optimized Git-free source export", + "unrun": [ + "full supplier cold replay", + "native frame/cover replay", + "hosted CI", + "independent human review", + "proof assistant" + ] + } +} diff --git a/research/centre-kernel-feedback/VERIFY.json b/research/centre-kernel-feedback/VERIFY.json new file mode 100644 index 0000000000..1cb01784a0 --- /dev/null +++ b/research/centre-kernel-feedback/VERIFY.json @@ -0,0 +1,51 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/community-frontier1094-audit/selected-replay.tar.gz" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 180, + "checks": "Exact complete baseline coefficients, strict causal feedback, all 149 kernel directions, both orientation rank 21 minors and reciprocal tangent." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/independent.py" + ], + "timeout_seconds": 180, + "checks": "Independent literal 2,835,792-instruction replay; all source coefficients, 1152 noncommuting operator repairs, full rational derivative witness and private cleanup." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/repair.py" + ], + "timeout_seconds": 60, + "checks": "Complete free-Laurent source-preserving injection word, dirty targets, every scratch boundary and final work cleanup; exact operation invoice." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/test_verify.py" + ], + "timeout_seconds": 300, + "checks": "Primitive/minor oracles, repair mutations, optimized Git-free replay and source/reference/typed-receipt corruption controls." + } + ] +} diff --git a/research/centre-kernel-feedback/independent.py b/research/centre-kernel-feedback/independent.py new file mode 100644 index 0000000000..fba0906075 --- /dev/null +++ b/research/centre-kernel-feedback/independent.py @@ -0,0 +1,183 @@ +#!/usr/bin/env python3 +"""Literal rational replay, without importing the block-factor verifier. +Tekalign with substantial OpenAI Codex assistance; Apache-2.0. +""" +import gzip +import hashlib +import json +from fractions import Fraction +from pathlib import Path +import tarfile + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +F = Fraction + + +def check(condition, why): + if not condition: + raise ValueError(why) + + +def plus(left, right, coefficient=1): + out = dict(left) + for k in right: + out[k] = out.get(k, 0)+coefficient*right[k] + if not out[k]: del out[k] + return out + + +def times(row, q): + return {k: v*q for k, v in row.items() if v*q} + + +def source(): + pins = json.loads((HERE/'SOURCES.json').read_text()) + for pin in pins['files']: + if pin['usage'] == 'input': + raw = (ROOT/pin['path']).read_bytes() + check(hashlib.sha256(raw).hexdigest() == pin['sha256'], 'archive bytes') + reference_pin = next(p for p in pins['references'] if p['local'].startswith('pr2799')) + raw = gzip.decompress((HERE/reference_pin['local']).read_bytes()) + check(hashlib.sha256(raw).hexdigest() == reference_pin['sha256'], 'reference bytes') + reference = json.loads(raw) + data = {} + with tarfile.open(ROOT/'research/community-frontier1094-audit/selected-replay.tar.gz') as tar: + for key in ('global', 'program'): + pin = pins['archive_members'][key] + entries = [m for m in tar.getmembers() if m.name == pin['path']] + check(len(entries) == 1 and entries[0].isfile(), 'unique input') + raw = tar.extractfile(entries[0]).read() + check(hashlib.sha256(raw).hexdigest() == pin['sha256'], 'member bytes') + data[key] = json.loads(gzip.decompress(raw)) + return data, reference + + +def digest(rows): + return hashlib.sha256(json.dumps([ + {str(k): str(q) for k, q in sorted(row.items())} for row in rows + ], separators=(',', ':')).encode()).hexdigest() + + +def operator(site): + # Invertible, noncommuting 2x2 matrices. No native or unitary claim. + options = (((1, 1), (0, 1)), ((1, 0), (1, 1)), ((0, -1), (1, 0)), + ((2, 0), (0, F(1, 2))), ((1, 0), (0, 1))) + return options[site % len(options)] + + +def apply_matrix(matrix, vector): + return [plus(times(vector[0], row[0]), times(vector[1], row[1])) for row in matrix] + + +def tensor(row): + return [{2*k+component: q for k, q in row.items()} for component in range(2)] + + +def repair_check(current, injection, feedback, matrix, wrong_sign=False): + raw = tensor(current) + hz = apply_matrix(matrix, tensor(feedback)) + difference = [plus(hz[k], tensor(feedback)[k], -1) for k in range(2)] + corrected = [plus(tensor(injection)[k], difference[k], 1 if wrong_sign else -1) + for k in range(2)] + applied = apply_matrix(matrix, raw) + result = [plus(applied[k], corrected[k]) for k in range(2)] + expected = [plus(raw[k], tensor(injection)[k]) for k in range(2)] + return result == expected + + +def run(): + data, ref = source() + receipt = json.loads((HERE/'RESULT.json').read_text()) + correction = json.loads((HERE/'CORRECTION.json').read_text()) + basis = [{j: F(1)} for j in ref['readouts']['Y']['zero_columns']] + basis += [{int(j): F(q) for j, q in row.items()} + for row in ref['readouts']['Y']['noncoordinate_kernel_basis']] + injections = [{} for _ in range(1152)] + for k, row in enumerate(basis): + for j, q in row.items(): injections[j][k] = q + expected_feedback = [{int(k)+128: F(q) for k, q in correction.get(str(j), {}).items()} + for j in range(1152)] + state = [{} for _ in range(14336)] + # Separate literal dual number propagation for one complete witness. + slope = [F(0) for _ in state] + calls = {(c['time'], c['replica'], c['stage'], c['provider_id']): c + for c in data['global']['calls']} + scalar_count = call_count = repairs = wrong_sign_detections = 0 + observed = [] + for event in data['global']['execution_schedule']: + kind = event['kind'] + if kind == 'local_cover_sweep': + key = tuple(event[k] for k in ('time', 'replica', 'stage', 'provider_id')) + c = calls[key] + owners = [row[0] for row in c['owners']] + values = {('L', i): dict(state[owner]) for i, owner in enumerate(owners)} + dual = {('L', i): slope[owner] for i, owner in enumerate(owners)} + # Initial private differences are arbitrary and must be literally cleared. + values.update({('C', i): {149: F(17+i, 3)} for i in range(8)}) + dual.update({('C', i): F(23+i, 5) for i in range(8)}) + for instruction in data['program'][c['orientation']]: + tag = instruction[0] + if tag == 'scalar': + scalar_count += 1 + op = instruction[1] + name, target = op[0], tuple(op[1]) + if name == 'add': + origin = tuple(op[2]);q = F(op[3], op[4]) + values[target] = plus(values[target], values[origin], q) + dual[target] += q*dual[origin] + elif name == 'copy': + origin = tuple(op[2]);values[target] = dict(values[origin]);dual[target] = dual[origin] + elif name == 'clear': + values[target] = {};dual[target] = F(0) + elif name == 'scale': + q = F(op[2], op[3]);values[target] = times(values[target], q);dual[target] *= q + else: raise ValueError('unknown literal scalar') + elif tag == 'center': + k = instruction[1];j = 8*call_count+k;row = values['C', k] + check(row == expected_feedback[j], 'literal chronological feedback at '+str(j)) + observed.append(dict(row)) + check(repair_check(row, injections[j], expected_feedback[j], operator(j)), + 'noncommuting operator compensation') + repairs += 1 + wrong_sign_detections += not repair_check(row, injections[j], expected_feedback[j], + operator(j), wrong_sign=True) + dual['C', k] += (1 if c['orientation'] == 'forward' else -1)*row.get(128, 0) + values['C', k] = plus(row, injections[j]) + else: + check(tag in {'phase', 'climb', 'adapter', 'residual_adapter'}, 'unknown local tag') + check(all(not values['C', i] and dual['C', i] == 0 for i in range(8)), 'literal private exit') + for i, owner in enumerate(owners):state[owner] = values['L', i];slope[owner] = dual['L', i] + call_count += 1 + elif kind == 'bridge': + start = 896*event['replica'];s = start+224*event['src'];d = start+224*event['dst'];q = event['coefficient'] + for i in range(112): + state[d+i] = plus(state[d+i], state[s+i], q) + state[s+112+i] = plus(state[s+112+i], state[d+112+i], -q) + slope[d+i] += q*slope[s+i];slope[s+112+i] -= q*slope[d+112+i] + elif kind == 'terminal': + for pair in range(4): + for i in range(112): + x = 896*event['replica']+224*pair+i + state[x], state[x+112] = state[x+112], times(state[x], -1) + slope[x], slope[x+112] = slope[x+112], -slope[x] + else: + check(kind in {'idle_cover_sweep', 'terminal_Y_translations', + 'bank_padding_cover_sweep', 'translate_every_live_family'}, 'unknown global tag') + check(call_count == 144 and repairs == 1152 and scalar_count == 2835792, 'literal coverage') + check(all(not row for i, row in enumerate(state) if i % 224 >= 112), 'literal final Y') + check(all(149 not in row for row in state), 'arbitrary private dirt erased') + check(digest(observed) == receipt['feedback_sha256'], 'all feedback coefficients') + check(wrong_sign_detections > 0, 'wrong correction sign detected') + nonzero = {i: str(q) for i, q in enumerate(slope) if i % 224 >= 112 and q} + check(len(nonzero) == receipt['witness_tangent_Y_nonzero'], 'literal derivative support') + check({str(i): q for i, q in list(nonzero.items())[:16]} == receipt['witness_tangent_Y_first16'], + 'literal derivative values') + # Authenticate every derivative coefficient, not just the displayed sample. + raw = [{i: F(q) for i, q in nonzero.items()}] + check(digest(raw) == receipt['witness_tangent_Y_sha256'], 'entire literal derivative witness') + print('PASS_LITERAL_KERNEL_FEEDBACK', 'scalar_instructions='+str(scalar_count), + 'operator_repairs='+str(repairs), 'wrong_sign_rejections='+str(wrong_sign_detections)) + + +if __name__ == '__main__': run() diff --git a/research/centre-kernel-feedback/pr2622-result.json.gz b/research/centre-kernel-feedback/pr2622-result.json.gz new file mode 100644 index 0000000000..0ff426e8de Binary files /dev/null and b/research/centre-kernel-feedback/pr2622-result.json.gz differ diff --git a/research/centre-kernel-feedback/pr2799-result.json.gz b/research/centre-kernel-feedback/pr2799-result.json.gz new file mode 100644 index 0000000000..1a9caa57d1 Binary files /dev/null and b/research/centre-kernel-feedback/pr2799-result.json.gz differ diff --git a/research/centre-kernel-feedback/repair.py b/research/centre-kernel-feedback/repair.py new file mode 100644 index 0000000000..85cf4b6910 --- /dev/null +++ b/research/centre-kernel-feedback/repair.py @@ -0,0 +1,111 @@ +#!/usr/bin/env python3 +"""Explicit source-preserving repair generator in a rational field-bank model. +Tekalign, substantial OpenAI Codex assistance. Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as F +import gzip +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent + + +def need(ok, why): + if not ok: raise ValueError(why) + + +def word(): + reference = json.loads(gzip.decompress((HERE/'pr2799-result.json.gz').read_bytes())) + kernel = [{int(j): F(q) for j, q in row.items()} + for row in reference['readouts']['Y']['noncoordinate_kernel_basis']] + correction = {int(j): {int(k): F(q) for k, q in row.items()} + for j, row in json.loads((HERE/'CORRECTION.json').read_text()).items()} + # The orientation at each chronological site is committed in the correction receipt. + orientations = json.loads((HERE/'RESULT.json').read_text())['call_orientations'] + operations = [] + for group, exponent in [('P', 1), ('M', -1)]: + for k in range(21): + w, z = (group, k), ('Z', k) + operations.extend([('add', w, z, F(1)), ('oracle', w, exponent), ('add', w, z, F(-1))]) + setup = len(operations) + def weighted(dst, src, q): + if q in (1, -1): operations.append(('add', dst, src, q)) + else: + scratch = ('S', 0) + operations.extend([('add', scratch, src, F(1)), ('scale', scratch, q), + ('add', dst, scratch, F(1)), ('scale', scratch, 1/q), + ('add', scratch, src, F(-1))]) + injections = [] + for j in range(1152): + start = len(operations) + for k, row in enumerate(kernel): + if j in row: weighted(('E', j), ('Z', k), row[j]) + group = 'P' if orientations[j//8] == 'forward' else 'M' + for k, q in correction.get(j, {}).items(): weighted(('E', j), (group, k), -q) + injections.append((start, len(operations))) + cleanup = len(operations) + for group, exponent in [('M', -1), ('P', 1)]: + for k in reversed(range(21)): + w, z = (group, k), ('Z', k) + operations.extend([('add', w, z, F(1)), ('oracle', w, -exponent), ('add', w, z, F(-1))]) + return operations, setup, cleanup, injections, kernel, correction, orientations + + +def verify(mutation=None): + operations, setup, cleanup, injections, kernel, correction, orientations = word() + if mutation == 'omit-cleanup': operations = operations[:cleanup] + if mutation == 'wrong-oracle': + operations = list(operations) + j = next(i for i, op in enumerate(operations) if op[0] == 'oracle') + operations[j] = ('oracle', operations[j][1], -operations[j][2]) + # Free Laurent module: each H^a Z_k is an independent formal term. + # This checks the entire word for an arbitrary invertible linear H. + state = {('Z', k): {('Z', k, 0): F(1)} for k in range(21)} + state.update({('E', j): {('E', j, 0): F(1)} for j in range(1152)}) + state.update({(group, k): {} for group in ('P', 'M') for k in range(21)}) + state['S', 0] = {} + original = {k: dict(v) for k, v in state.items()} + def merge(left, right, q): + out = dict(left) + for k, value in right.items(): + new = out.get(k, 0)+q*value + if new: out[k] = new + else: out.pop(k, None) + return out + def shift(row, exponent): + return {(role, k, a+exponent): q for (role, k, a), q in row.items()} + counts = Counter() + boundaries = {end for start, end in injections} + for number, op in enumerate(operations): + name, dst = op[:2];counts[name] += 1 + need(dst[0] != 'Z', 'read-only source at every prefix') + if name == 'add': state[dst] = merge(state[dst], state[op[2]], op[3]) + elif name == 'scale': state[dst] = {k: q*op[2] for k, q in state[dst].items()} + else: + need(name == 'oracle', 'known repair op') + state[dst] = shift(state[dst], op[2]) + counts['H' if op[2] == 1 else 'H_inverse'] += 1 + if number+1 in boundaries: + need(not state['S', 0], 'scratch restored at every centre boundary') + for j in range(1152): + expected = dict(original['E', j]) + for k, row in enumerate(kernel): + if j in row: expected = merge(expected, original['Z', k], row[j]) + exponent = 1 if orientations[j//8] == 'forward' else -1 + for k, q in correction.get(j, {}).items(): + dz = merge(shift(original['Z', k], exponent), original['Z', k], -1) + expected = merge(expected, dz, -q) + need(state['E', j] == expected, 'complete dirty injection map') + need(all(state['Z', k] == original['Z', k] for k in range(21)), 'source restoration') + need(all(not value for key, value in state.items() if key[0] in ('P', 'M', 'S')), + 'all clean work restored') + result = dict(oracle_H=counts['H'], oracle_H_inverse=counts['H_inverse'], + signed_unit_adds=counts['add'], rational_scales=counts['scale'], + clean_work_fields=43, source_fields=21, total_instructions=len(operations), + formal_dirty_injection_targets=1152, source_written_at_any_prefix=False) + need(result == json.loads((HERE/'RESULT.json').read_text())['expanded_repair_invoice'], 'expanded invoice') + print('PASS_SOURCE_PRESERVING_KERNEL_REPAIR', json.dumps(result, sort_keys=True)) + + +if __name__ == '__main__': verify() diff --git a/research/centre-kernel-feedback/test_verify.py b/research/centre-kernel-feedback/test_verify.py new file mode 100644 index 0000000000..79de568f38 --- /dev/null +++ b/research/centre-kernel-feedback/test_verify.py @@ -0,0 +1,102 @@ +#!/usr/bin/env python3 +"""Behavioral controls for causal kernel transport. Apache-2.0.""" +import contextlib +from fractions import Fraction as F +import gzip +import io +import itertools +import json +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile +import types +import unittest + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] + + +def load_module(name): + # Read source directly; -B alone does not disable reads of stale bytecode. + path = HERE/(name+'.py') + module = types.ModuleType(name) + module.__file__ = str(path) + exec(compile(path.read_bytes(), str(path), 'exec', optimize=0), module.__dict__) + return module + + +class Tests(unittest.TestCase): + def test_assignment_rules_and_minor(self): + primary = load_module('verify') + for op in [('add', ['L', 0], ['L', 1], 3, 2), + ('copy', ['L', 0], ['L', 1]), + ('clear', ['L', 0]), ('scale', ['L', 0], -2, 3)]: + state = {('L', 0): {0: F(1)}, ('L', 1): {1: F(1)}} + primary.scalar(state, op) + for a, b in ((0, 0), (2, -3), (-7, 5)): + actual = sum(q*(a if k == 0 else b) for k, q in state['L', 0].items()) + expected = {'add': F(a)+F(3, 2)*b, 'copy': F(b), + 'clear': F(0), 'scale': F(-2, 3)*a}[op[0]] + self.assertEqual(actual, expected) + for size in range(1, 6): + for shift in range(5): + matrix = [[F((3*i+5*j+shift+2)**2 % 17-8, 2**((i+j)%3)) + for j in range(size)] for i in range(size)] + determinant = F(0) + for perm in itertools.permutations(range(size)): + sign = (-1)**sum(perm[i] > perm[j] for i in range(size) for j in range(i+1, size)) + term = F(sign) + for i in range(size): term *= matrix[i][perm[i]] + determinant += term + expected = determinant.numerator*pow(determinant.denominator, -1, primary.PRIME)%primary.PRIME + rows = [dict(enumerate(row)) for row in matrix] + self.assertEqual(primary.determinant_mod(rows, list(range(size)), list(range(size))), expected) + + def test_repair_and_noncommutation_controls(self): + repair = load_module('repair') + with contextlib.redirect_stdout(io.StringIO()): repair.verify() + for mutation in ('omit-cleanup', 'wrong-oracle'): + with self.assertRaises(ValueError): repair.verify(mutation) + literal = load_module('independent') + vector = [{0: F(1)}, {1: F(1)}] + a, b = literal.operator(0), literal.operator(1) + self.assertNotEqual(literal.apply_matrix(a, literal.apply_matrix(b, vector)), + literal.apply_matrix(b, literal.apply_matrix(a, vector))) + self.assertTrue(literal.repair_check({0: F(2)}, {1: F(1)}, {0: F(2)}, a)) + self.assertFalse(literal.repair_check({0: F(2)}, {1: F(1)}, {0: F(2)}, a, wrong_sign=True)) + + def test_git_free_optimized_and_corruption(self): + with tempfile.TemporaryDirectory() as temp: + root = Path(temp);package = root/'research/centre-kernel-feedback' + shutil.copytree(HERE, package, ignore=shutil.ignore_patterns('__pycache__')) + relative = 'research/community-frontier1094-audit/selected-replay.tar.gz' + archive = root/relative;archive.parent.mkdir(parents=True) + shutil.copy2(ROOT/relative, archive) + def run(name='verify', *args): + return subprocess.run([sys.executable, '-I', '-O', '-B', str(package/(name+'.py')), *args], + cwd=root, text=True, capture_output=True, timeout=180) + good = run();self.assertEqual(good.returncode, 0, good.stderr) + good = run('repair');self.assertEqual(good.returncode, 0, good.stderr) + result = package/'RESULT.json';saved = result.read_bytes() + changed = json.loads(saved);changed['expanded_repair_invoice']['source_written_at_any_prefix'] = 0 + result.write_text(json.dumps(changed)) + bad = run();self.assertNotEqual(bad.returncode, 0);self.assertIn('typed result receipt', bad.stderr) + result.write_bytes(saved) + correction = package/'CORRECTION.json';saved = correction.read_bytes() + changed = json.loads(saved);first = next(iter(changed));key = next(iter(changed[first]));changed[first][key] = '999' + correction.write_text(json.dumps(changed)) + bad = run();self.assertNotEqual(bad.returncode, 0);self.assertIn('typed correction receipt', bad.stderr) + correction.write_bytes(saved) + reference = package/'pr2799-result.json.gz';saved = reference.read_bytes() + reference.write_bytes(gzip.compress(gzip.decompress(saved)+b' ')) + bad = run();self.assertNotEqual(bad.returncode, 0);self.assertIn('source SHA256', bad.stderr) + reference.write_bytes(saved) + with archive.open('r+b') as stream: byte = stream.read(1);stream.seek(0);stream.write(bytes([byte[0]^1])) + bad = run();self.assertNotEqual(bad.returncode, 0);self.assertIn('source SHA256', bad.stderr) + bad = run('verify', '--out', str(package)) + self.assertNotEqual(bad.returncode, 0);self.assertIn('FileExistsError', bad.stderr) + + +if __name__ == '__main__': unittest.main() diff --git a/research/centre-kernel-feedback/verify.py b/research/centre-kernel-feedback/verify.py new file mode 100644 index 0000000000..bf2bb7cd84 --- /dev/null +++ b/research/centre-kernel-feedback/verify.py @@ -0,0 +1,413 @@ +#!/usr/bin/env python3 +"""Exact causal transport of the selected terminal-Y error kernel. + +Tekalign, with substantial OpenAI Codex assistance. Apache-2.0. +No predecessor implementation is imported. PR2799 supplies the kernel vectors; +PR2622 supplies coefficient digests. Both are authenticated comparison data. +""" +import argparse +from collections import Counter +from fractions import Fraction as Q +import gzip +import hashlib +import json +from pathlib import Path +import tarfile + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +PRIME = 2147483647 +IGNORED = {'idle_cover_sweep', 'terminal_Y_translations', + 'bank_padding_cover_sweep', 'translate_every_live_family'} + + +def require(ok, message): + if not ok: + raise ValueError(message) + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(',', ':')).encode() + + +def digest(rows): + # Credited PR2622 coefficient serialization, not executable predecessor code. + return hashlib.sha256(json.dumps([ + {str(k): str(v) for k, v in sorted(row.items())} for row in rows + ], separators=(',', ':')).encode()).hexdigest() + + +def authenticate(raw, pin): + require(hashlib.sha256(raw).hexdigest() == pin['sha256'], 'source SHA256') + if 'git_blob' in pin: + require(hashlib.sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest() + == pin['git_blob'], 'source Git blob') + + +def load(): + pins = json.loads((HERE/'SOURCES.json').read_text()) + for pin in pins['files']: + if pin['usage'] == 'input': + authenticate((ROOT/pin['path']).read_bytes(), pin) + refs = {} + for pin in pins['references']: + raw = gzip.decompress((HERE/pin['local']).read_bytes()) + authenticate(raw, pin) + refs[pin['local'].removesuffix('.gz')] = json.loads(raw) + data = {} + with tarfile.open(ROOT/'research/community-frontier1094-audit/selected-replay.tar.gz') as tar: + members = tar.getmembers() + for name, pin in pins['archive_members'].items(): + matches = [m for m in members if m.name == pin['path']] + require(len(matches) == 1 and matches[0].isfile(), 'unique archive member') + raw = tar.extractfile(matches[0]).read() + authenticate(raw, pin) + data[name] = json.loads(gzip.decompress(raw)) + return data, refs + + +def add(dst, src, coefficient=1): + for key, value in src.items(): + new = dst.get(key, 0)+coefficient*value + if new: + dst[key] = new + else: + dst.pop(key, None) + + +def scalar(state, op): + name, dst = op[0], tuple(op[1]) + if name in ('add', 'copy'): + src = tuple(op[2]) + require(src != dst, 'distinct assignment roles') + if name == 'add': + add(state[dst], state[src], Q(op[3], op[4])) + elif name == 'copy': + state[dst] = dict(state[src]) + elif name == 'clear': + state[dst] = {} + elif name == 'scale': + q = Q(op[2], op[3]) + state[dst] = {k: q*v for k, v in state[dst].items() if q*v} + else: + raise ValueError('unknown scalar instruction') + + +def local_maps(program, orientation): + """Forward symbolic replay: ordinary inputs 0..703, insertions 704..711.""" + state = {('L', i): {i: Q(1)} for i in range(704)} + state.update({('C', i): {712+i: Q(1)} for i in range(8)}) + sources, count = [], 0 + for tag, *args in program: + if tag == 'scalar': + scalar(state, args[0]) + count += 1 + elif tag == 'center': + k = args[0] + require(k == len(sources) and args[3] == 8, 'ordered rank-eight cuts') + sources.append(dict(state['C', k])) + state['C', k][704+k] = Q(1) + else: + require(tag in {'phase', 'climb', 'adapter', 'residual_adapter'}, + 'unknown local projection') + require(len(sources) == 8, 'eight cuts') + require(all(not state['C', k] for k in range(8)), 'private restoration') + require(all(j < 704 for row in sources for j in row), 'no within-call cut feedback') + response = [{} for _ in range(8)] + for i in range(704): + row = state['L', i] + require(all(j < 712 for j in row), 'no initial private influence') + ordinary = {j: q for j, q in row.items() if j < 704} + expected = {i: Q(1)} + if orientation == 'forward' and 112 <= i < 224: + expected[i-112] = Q(1) + if orientation == 'backward' and i < 112: + expected[i+112] = Q(-1) + require(ordinary == expected, 'complete local ordinary endpoint') + for j, q in row.items(): + if j >= 704: + response[j-704][i] = q + return sources, response, count + + +def call_key(call): + return tuple(call[k] for k in ('time', 'replica', 'stage', 'provider_id')) + + +def validate(data): + require((data['word']['h'], data['word']['v'], data['word']['R']) == (9, 112, 480), + 'selected 480-helper word') + template = data['global'] + require(template['live'] == 14336, 'ordinary owner count') + calls = {call_key(c): c for c in template['calls']} + require(len(calls) == len(template['calls']) == 144, 'unique calls') + scheduled = [] + for event in template['execution_schedule']: + kind = event['kind'] + if kind == 'local_cover_sweep': + c = calls[call_key(event)] + require(c['orientation'] in ('forward', 'backward'), 'orientation') + raw = canonical(data['program'][c['orientation']]) + require(hashlib.sha256(raw).hexdigest() == c['local_program_sha256'], 'call hash') + owners = [r[0] for r in c['owners']] + require(len(owners) == len(set(owners)) == 704 and + all(type(i) is int and 0 <= i < 14336 for i in owners), 'owner injection') + start = 896*c['replica']+224*c['pair'] + require(owners[:224] == list(range(start, start+224)), 'stream numbering') + scheduled.append(c) + elif kind in ('bridge', 'terminal'): + require(event['replicas'] == [event['replica']] and 0 <= event['replica'] < 16, + 'single replica event') + if kind == 'bridge': + require(event['src'] != event['dst'] and + all(0 <= event[k] < 4 for k in ('src', 'dst')) and + event['coefficient'] in (-1, 1), 'bridge schema') + else: + require(event['pairs'] == 4, 'terminal pairs') + else: + require(kind in IGNORED, 'unknown global projection') + require(len(scheduled) == len({call_key(c) for c in scheduled}) == 144, + 'complete chronology') + return calls, scheduled + + +def global_event(arrays, event): + kind = event['kind'] + if kind == 'bridge': + base = 896*event['replica'] + s, d = base+224*event['src'], base+224*event['dst'] + q = event['coefficient'] + for rows in arrays: + for k in range(112): + add(rows[d+k], rows[s+k], q) + add(rows[s+112+k], rows[d+112+k], -q) + elif kind == 'terminal': + for rows in arrays: + for pair in range(4): + for k in range(112): + x = 896*event['replica']+224*pair+k + rows[x], rows[x+112] = rows[x+112], {j: -q for j, q in rows[x].items()} + else: + require(kind in IGNORED, 'unknown global projection') + + +def propagate(data, local, calls, injections, tangent=False): + """Local forward source/response factorization, complete global chronology. + + Tangent uses t=1+eps forward and t^-1=1-eps backward, eps^2=0. + The transcript is K times the supplied insertion matrix, not initial inputs. + """ + values = [{} for _ in range(14336)] + slopes = [{} for _ in values] + transcript = [] + number = 0 + for event in data['global']['execution_schedule']: + if event['kind'] != 'local_cover_sweep': + global_event((values, slopes) if tangent else (values,), event) + continue + c = calls[call_key(event)] + owners = [r[0] for r in c['owners']] + source, response, _ = local[c['orientation']] + cuts = [] + for row in source: + out = {} + for i, q in row.items(): + add(out, values[owners[i]], q) + cuts.append(out) + transcript.extend(cuts) + for rows in ((values, slopes) if tangent else (values,)): + for k in range(112): + x, y = owners[k], owners[k+112] + if c['orientation'] == 'forward': add(rows[y], rows[x]) + else: add(rows[x], rows[y], -1) + sign = 1 if c['orientation'] == 'forward' else -1 + for k in range(8): + for i, q in response[k].items(): + add(values[owners[i]], injections[8*number+k], q) + if tangent: add(slopes[owners[i]], cuts[k], sign*q) + number += 1 + require(number == 144, 'all calls propagated') + return values, transcript, slopes + + +def transpose(rows, size): + out = [{} for _ in range(size)] + for i, row in enumerate(rows): + for j, q in row.items(): out[j][i] = q + return out + + +def row_basis(rows): + pivots, selected = {}, [] + for index, original in enumerate(rows): + row = dict(original) + while row: + lead = min(row) + if lead not in pivots: + q = row[lead] + pivots[lead] = {i: v/q for i, v in row.items()} + selected.append(index) + break + add(row, pivots[lead], -row[lead]) + return selected, sorted(pivots) + + +def determinant_mod(rows, selected_rows, selected_columns): + """Separate dense prime-field minor elimination; no rational pivot states.""" + require(len(selected_rows) == len(selected_columns), 'square minor') + matrix = [[(q.numerator*pow(q.denominator, -1, PRIME)) % PRIME + if (q := rows[i].get(j, Q(0))) else 0 for j in selected_columns] + for i in selected_rows] + determinant = 1 + for j in range(len(matrix)): + pivot = next((i for i in range(j, len(matrix)) if matrix[i][j]), None) + if pivot is None: return 0 + if pivot != j: + matrix[j], matrix[pivot] = matrix[pivot], matrix[j] + determinant = -determinant + a = matrix[j][j] + determinant = determinant*a % PRIME + inv = pow(a, -1, PRIME) + for i in range(j+1, len(matrix)): + if matrix[i][j]: + q = matrix[i][j]*inv % PRIME + for k in range(j+1, len(matrix)): + matrix[i][k] = (matrix[i][k]-q*matrix[j][k]) % PRIME + matrix[i][j] = 0 + return determinant % PRIME + + +def rank_record(rows): + chosen, columns = row_basis(rows) + det = determinant_mod(rows, chosen, columns) + require(det != 0 or not columns, 'independent modular rank minor') + return dict(rank=len(columns), rows=chosen, columns=columns, + determinant_mod_2147483647=det) + + +def kernel_matrix(reference): + y = reference['readouts']['Y'] + basis = [{j: Q(1)} for j in y['zero_columns']] + basis += [{int(j): Q(q) for j, q in row.items()} + for row in y['noncoordinate_kernel_basis']] + require(len(basis) == 149 and len(y['zero_columns']) == 128, 'reference kernel size') + require(len({max(row) for row in basis}) == 149 and + all(row[max(row)] == 1 for row in basis), 'independent reference basis') + return basis, transpose(basis, 1152) + + +def run(): + data, refs = load() + calls, scheduled = validate(data) + local = {name: local_maps(data['program'][name], name) + for name in ('forward', 'backward')} + for name, (_, response, _) in local.items(): + require(digest(transpose(response, 704)) == + refs['pr2622-result.json']['local_error_response_sha256'][name], + 'independent local response coefficients') + # Replay every baseline error column, not only the inherited kernel. + ordinary, full_feedback, _ = propagate(data, local, calls, [{j: Q(1)} for j in range(1152)]) + require(digest(ordinary) == refs['pr2622-result.json']['response_sha256'], + 'all baseline response coefficients') + require(all(j < i for i, row in enumerate(full_feedback) for j in row), 'strict causal feedback') + yrows = [row if i % 224 >= 112 else {} for i, row in enumerate(ordinary)] + # Kernel upper bound below; independent field rank provides the lower bound. + yref = refs['pr2799-result.json']['readouts']['Y'] + # Sparse field elimination of the pinned minor is used for the large baseline. + allowed = set(yref['selected_error_columns']) + pivots = {} + for owner in yref['pivot_output_owners']: + row = {j: q.numerator*pow(q.denominator, -1, PRIME) % PRIME + for j, q in yrows[owner].items() if j in allowed} + row = {j: q for j, q in row.items() if q} + while row: + lead = max(row) + if lead not in pivots: + inv = pow(row[lead], -1, PRIME) + pivots[lead] = {j: q*inv % PRIME for j, q in row.items()} + break + q = row[lead] + for j, value in pivots[lead].items(): + new = (row.get(j, 0)-q*value) % PRIME + if new: row[j] = new + else: row.pop(j, None) + else: + raise ValueError('singular baseline minor') + require(len(pivots) == 1003, 'baseline rank lower bound') + basis, injections = kernel_matrix(refs['pr2799-result.json']) + require(all(scheduled[j//8]['stage'] == 8 and scheduled[j//8]['orientation'] == 'forward' + for j in yref['zero_columns']), 'coordinate kernel is final forward stage') + endpoint, feedback, slopes = propagate(data, local, calls, injections, tangent=True) + require(all(not row for i, row in enumerate(endpoint) if i % 224 >= 112), + 'complete terminal-Y kernel') + require(all(j >= 128 for row in feedback for j in row), 'terminal coordinates need no repair') + expected_feedback = [] + for row in full_feedback: + out = {} + for j, q in row.items(): add(out, injections[j], q) + expected_feedback.append(out) + require(feedback == expected_feedback, 'two computations of K times kernel') + groups = {} + for name in ('forward', 'backward'): + rows = [row if scheduled[i//8]['orientation'] == name else {} + for i, row in enumerate(feedback)] + groups[name] = dict(rank_record(rows), sites=sum(bool(r) for r in rows), + terms=sum(map(len, rows))) + sensitivity = [row if i % 224 >= 112 else {} for i, row in enumerate(slopes)] + sensitivity_rank = rank_record(sensitivity) + require(sensitivity_rank['rank'] == 21, 'fixed noncoordinate directions change') + require(all(groups[n]['rank'] == 21 for n in groups), 'two orientation feedback ranks') + first = 128 + witness = {i: str(row[first]) for i, row in enumerate(sensitivity) if first in row} + feedback_rows = [{str(j-128): str(q) for j, q in sorted(row.items())} for row in feedback] + nonunit = sum(q not in (1, -1) for row in feedback for q in row.values()) + nonunit += sum(q not in (1, -1) for row in basis[128:] for q in row.values()) + return dict(status='PASS_CENTRE_KERNEL_FEEDBACK', error_sites=1152, + call_orientations=[c['orientation'] for c in scheduled], + expanded_repair_invoice=dict(oracle_H=42, oracle_H_inverse=42, + signed_unit_adds=2131+2*nonunit, rational_scales=2*nonunit, + clean_work_fields=43, source_fields=21, total_instructions=2215+4*nonunit, + formal_dirty_injection_targets=1152, source_written_at_any_prefix=False), + Y_rank=1003, kernel_dimension=149, terminal_coordinate_directions=128, + noncoordinate_directions=21, feedback_sites=sum(bool(r) for r in feedback), + feedback_terms=sum(map(len, feedback)), feedback_sha256=digest(feedback), + kernel_sha256=digest(basis), baseline_response_sha256=digest(ordinary), + causal_feedback_sha256=digest(full_feedback), + local_scalar_instructions={n: local[n][2] for n in local}, + orientation_feedback=groups, reciprocal_tangent=sensitivity_rank, + reciprocal_tangent_sha256=digest(sensitivity), + witness_basis=basis[first] and {str(j): str(q) for j, q in basis[first].items()}, + witness_tangent_Y_sha256=digest([{int(i): Q(q) for i, q in witness.items()}]), + witness_tangent_Y_nonzero=len(witness), + witness_tangent_Y_first16=dict(list(witness.items())[:16]), + correction_matrix_noncoordinate=feedback_rows, + direct_repair_invoice=dict(clean_work_fields=42, forward_oracle_calls=42, + inverse_oracle_calls=42, build_and_uncompute_unit_adds=168, + injection_weighted_adds=sum(map(len, feedback))+sum(map(len, basis[128:])), + correction_weighted_adds=sum(map(len, feedback)), + original_kernel_weighted_adds=sum(map(len, basis[128:]))), + scope='Common-frame scalar projection with arbitrary linear centre operators; no native routing, supplier or kappa claim.') + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--out', type=Path) + args = parser.parse_args() + if args.out and args.out.exists(): raise FileExistsError(args.out) + result = run() + correction = {str(i): row for i, row in enumerate(result.pop('correction_matrix_noncoordinate')) if row} + if args.out: + args.out.mkdir() + (args.out/'RESULT.json').write_text(json.dumps(result, indent=2, sort_keys=True)+'\n') + # One nonempty chronological source row per line, keeping the certificate reviewable. + lines = [json.dumps(str(i))+': '+json.dumps(row, sort_keys=True) for i, row in correction.items()] + (args.out/'CORRECTION.json').write_text('{\n '+',\n '.join(lines)+'\n}\n') + else: + require(canonical(result) == canonical(json.loads((HERE/'RESULT.json').read_text())), + 'typed result receipt mismatch') + require(canonical(correction) == canonical(json.loads((HERE/'CORRECTION.json').read_text())), + 'typed correction receipt mismatch') + print(result['status'], 'kernel=149 correction_sites=546 correction_rank=21+21 no_new_kappa') + + +if __name__ == '__main__': main()