diff --git a/Makefile b/Makefile index 66f00cfb30..7571b3fcd8 100644 --- a/Makefile +++ b/Makefile @@ -604,3 +604,10 @@ frontier890-verify: selected-record-check frontier942-verify: selected-record-check @work=$$(mktemp -d "$${TMPDIR:-/tmp}/integer-mult-frontier942.XXXXXX"); \ python3 -B scripts/verify_frontier942.py --work "$$work/replay" + +# Research note: restoration deferral and coverage identity on the selected T37 payload (no new kappa). +.PHONY: t37-restoration-deferral-verify +t37-restoration-deferral-verify: + @work=$$(mktemp -d "$${TMPDIR:-/tmp}/integer-mult-t37-restoration.XXXXXX"); \ + python3 -B research/t37-restoration-deferral/verify.py --work "$$work/replay" && \ + python3 -B -m unittest discover -s research/t37-restoration-deferral -p test_package.py diff --git a/research/t37-restoration-deferral/CENSUS.json b/research/t37-restoration-deferral/CENSUS.json new file mode 100644 index 0000000000..5bfebfb18b --- /dev/null +++ b/research/t37-restoration-deferral/CENSUS.json @@ -0,0 +1,4544 @@ +{ + "T21": { + "construction": "T21", + "coverage": { + "R": 504, + "calls": 189, + "coverage_values": { + "73": 18816 + }, + "data_coordinates": 357504, + "data_incidences_per_family": { + "2": 14112, + "3": 4704 + }, + "deficit": 6720, + "hosted_coordinates": 714042, + "idle_coordinates": 302022, + "live": 18816, + "m": 73, + "private_centre_families": [ + 18816, + 18824 + ], + "total_rank_mass": 1366848, + "v": 112 + }, + "identity": { + "calls": 189, + "deficit": 6720, + "live": 18816, + "rank_mass": 1366848, + "statement": "data_climb*k_f + 1 + hosted_f + idle_f = m for every live family f; rank mass = (m-1)*W + 64*N; deficit = W - 64*N" + } + }, + "T37": { + "construction": "T37", + "coverage": { + "R": 504, + "calls": 333, + "coverage_values": { + "73": 33152 + }, + "data_coordinates": 629888, + "data_incidences_per_family": { + "2": 24864, + "3": 8288 + }, + "deficit": 11840, + "hosted_coordinates": 1258074, + "idle_coordinates": 532134, + "live": 33152, + "m": 73, + "private_centre_families": [ + 33152, + 33160 + ], + "total_rank_mass": 2408256, + "v": 112 + }, + "emitted_programs": { + "backward": { + "final_climbs": { + "1": 350, + "2": 18, + "3": 64, + "4": 2, + "5": 56 + }, + "phases": [ + "zero_frame_precondition", + "entry_adapters", + "A", + "centers", + "B", + "cleanup_tail", + "final", + "exit_adapters", + "full_frame_cleanup", + "done" + ] + }, + "forward": { + "final_climbs": { + "1": 350, + "2": 18, + "3": 64, + "4": 2, + "5": 56 + }, + "phases": [ + "zero_frame_precondition", + "entry_adapters", + "A", + "centers", + "B", + "cleanup_tail", + "final", + "exit_adapters", + "full_frame_cleanup", + "done" + ] + } + }, + "global_profile": { + "1": 848490, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "identity": { + "calls": 333, + "deficit": 11840, + "live": 33152, + "rank_mass": 2408256, + "statement": "data_climb*k_f + 1 + hosted_f + idle_f = m for every live family f; rank mass = (m-1)*W + 64*N; deficit = W - 64*N" + }, + "index_binding": { + "helper_restoration_by_index": "native word = canonical provider word bound by the template", + "helper_widths_by_index": "native word = hosted template provider (504 helpers)", + "source_restoration": "equal as a multiset (sources are relabelled in the canonical word)" + }, + "local": { + "R": 504, + "centre_children": { + "8": 8 + }, + "data_climb_per_incidence": 8, + "h": 9, + "mass": 5634, + "phase_mass": { + "A": 1160, + "B": 3288, + "early_cleanup": 256, + "final": 866 + }, + "profile": { + "1": 2548, + "2": 338, + "3": 446, + "4": 162, + "5": 72, + "8": 8 + }, + "roles": { + "helper": { + "full_cleanup_gates_on_positive_restoration": 8492, + "paid_endpoint_mass": 3778, + "positive_restoration": 378, + "positive_restoration_touched_by_full_cleanup": 378, + "registers": 504, + "restoration_mass": 636, + "restoration_profile": { + "1": 272, + "2": 12, + "3": 64, + "4": 2, + "5": 28 + }, + "zero_restoration_low_ends": 126 + }, + "source": { + "full_cleanup_gates_on_positive_restoration": 3618, + "paid_endpoint_mass": 896, + "positive_restoration": 112, + "positive_restoration_touched_by_full_cleanup": 112, + "registers": 112, + "restoration_mass": 230, + "restoration_profile": { + "1": 78, + "2": 6, + "5": 28 + }, + "zero_restoration_low_ends": 0 + }, + "target": { + "full_cleanup_gates_on_positive_restoration": 0, + "paid_endpoint_mass": 896, + "positive_restoration": 0, + "positive_restoration_touched_by_full_cleanup": 0, + "registers": 112, + "restoration_mass": 0, + "restoration_profile": {}, + "zero_restoration_low_ends": 0 + } + }, + "v": 112 + } + }, + "base_commit": "bbc600db2fc15007b7c914f4f2b2ed55fa909c87", + "helper_restoration": { + "0": 1, + "1": 0, + "10": 0, + "100": 1, + "101": 0, + "102": 1, + "103": 0, + "104": 1, + "105": 5, + "106": 0, + "107": 1, + "108": 1, + "109": 5, + "11": 1, + "110": 1, + "111": 2, + "112": 1, + "113": 0, + "114": 1, + "115": 0, + "116": 1, + "117": 0, + "118": 1, + "119": 1, + "12": 1, + "120": 1, + "121": 5, + "122": 0, + "123": 1, + "124": 1, + "125": 5, + "126": 1, + "127": 1, + "128": 1, + "129": 0, + "13": 5, + "130": 1, + "131": 0, + "132": 1, + "133": 0, + "134": 1, + "135": 1, + "136": 1, + "137": 5, + "138": 0, + "139": 1, + "14": 1, + "140": 1, + "141": 5, + "142": 1, + "143": 1, + "144": 1, + "145": 0, + "146": 3, + "147": 0, + "148": 3, + "149": 0, + "15": 1, + "150": 3, + "151": 3, + "152": 1, + "153": 5, + "154": 0, + "155": 1, + "156": 1, + "157": 5, + "158": 1, + "159": 1, + "16": 1, + "160": 1, + "161": 0, + "162": 3, + "163": 0, + "164": 3, + "165": 0, + "166": 3, + "167": 3, + "168": 1, + "169": 5, + "17": 0, + "170": 0, + "171": 1, + "172": 1, + "173": 5, + "174": 1, + "175": 1, + "176": 1, + "177": 0, + "178": 3, + "179": 0, + "18": 1, + "180": 3, + "181": 0, + "182": 3, + "183": 3, + "184": 1, + "185": 5, + "186": 0, + "187": 1, + "188": 1, + "189": 5, + "19": 0, + "190": 1, + "191": 1, + "192": 1, + "193": 0, + "194": 3, + "195": 0, + "196": 3, + "197": 0, + "198": 3, + "199": 3, + "2": 1, + "20": 1, + "200": 1, + "201": 5, + "202": 0, + "203": 1, + "204": 1, + "205": 5, + "206": 1, + "207": 1, + "208": 1, + "209": 0, + "21": 0, + "210": 1, + "211": 0, + "212": 1, + "213": 0, + "214": 1, + "215": 1, + "216": 1, + "217": 5, + "218": 0, + "219": 1, + "22": 1, + "220": 1, + "221": 5, + "222": 1, + "223": 1, + "224": 0, + "225": 0, + "226": 0, + "227": 0, + "228": 0, + "229": 0, + "23": 1, + "230": 0, + "231": 0, + "232": 0, + "233": 0, + "234": 0, + "235": 0, + "236": 0, + "237": 0, + "238": 1, + "239": 1, + "24": 1, + "240": 1, + "241": 1, + "242": 1, + "243": 1, + "244": 1, + "245": 1, + "246": 0, + "247": 0, + "248": 0, + "249": 0, + "25": 5, + "250": 1, + "251": 1, + "252": 1, + "253": 1, + "254": 1, + "255": 1, + "256": 1, + "257": 1, + "258": 0, + "259": 0, + "26": 0, + "260": 2, + "261": 2, + "262": 3, + "263": 3, + "264": 3, + "265": 3, + "266": 1, + "267": 1, + "268": 1, + "269": 1, + "27": 1, + "270": 1, + "271": 1, + "272": 0, + "273": 0, + "274": 3, + "275": 3, + "276": 3, + "277": 3, + "278": 1, + "279": 1, + "28": 1, + "280": 1, + "281": 1, + "282": 1, + "283": 1, + "284": 2, + "285": 2, + "286": 0, + "287": 1, + "288": 0, + "289": 0, + "29": 5, + "290": 1, + "291": 1, + "292": 1, + "293": 1, + "294": 1, + "295": 1, + "296": 0, + "297": 0, + "298": 0, + "299": 1, + "3": 0, + "30": 1, + "300": 0, + "301": 0, + "302": 1, + "303": 1, + "304": 1, + "305": 1, + "306": 1, + "307": 1, + "308": 2, + "309": 2, + "31": 1, + "310": 3, + "311": 3, + "312": 3, + "313": 3, + "314": 3, + "315": 3, + "316": 3, + "317": 3, + "318": 4, + "319": 0, + "32": 1, + "320": 0, + "321": 0, + "322": 3, + "323": 3, + "324": 3, + "325": 3, + "326": 3, + "327": 3, + "328": 3, + "329": 3, + "33": 0, + "330": 4, + "331": 0, + "332": 2, + "333": 2, + "334": 3, + "335": 3, + "336": 3, + "337": 3, + "338": 3, + "339": 3, + "34": 1, + "340": 3, + "341": 3, + "342": 0, + "343": 0, + "344": 0, + "345": 0, + "346": 3, + "347": 3, + "348": 3, + "349": 3, + "35": 0, + "350": 3, + "351": 3, + "352": 3, + "353": 3, + "354": 0, + "355": 0, + "356": 0, + "357": 0, + "358": 3, + "359": 3, + "36": 1, + "360": 3, + "361": 3, + "362": 0, + "363": 0, + "364": 0, + "365": 0, + "366": 0, + "367": 0, + "368": 0, + "369": 0, + "37": 0, + "370": 3, + "371": 3, + "372": 3, + "373": 3, + "374": 0, + "375": 0, + "376": 0, + "377": 0, + "378": 0, + "379": 0, + "38": 1, + "380": 0, + "381": 0, + "382": 0, + "383": 0, + "384": 0, + "385": 0, + "386": 0, + "387": 0, + "388": 0, + "389": 0, + "39": 1, + "390": 0, + "391": 0, + "392": 1, + "393": 1, + "394": 1, + "395": 1, + "396": 1, + "397": 1, + "398": 1, + "399": 1, + "4": 1, + "40": 1, + "400": 1, + "401": 1, + "402": 1, + "403": 1, + "404": 1, + "405": 1, + "406": 1, + "407": 1, + "408": 1, + "409": 1, + "41": 5, + "410": 1, + "411": 1, + "412": 1, + "413": 1, + "414": 1, + "415": 1, + "416": 1, + "417": 1, + "418": 1, + "419": 1, + "42": 0, + "420": 1, + "421": 1, + "422": 1, + "423": 1, + "424": 1, + "425": 1, + "426": 1, + "427": 1, + "428": 1, + "429": 1, + "43": 1, + "430": 1, + "431": 1, + "432": 1, + "433": 1, + "434": 1, + "435": 1, + "436": 1, + "437": 1, + "438": 1, + "439": 1, + "44": 1, + "440": 1, + "441": 1, + "442": 1, + "443": 1, + "444": 1, + "445": 1, + "446": 1, + "447": 1, + "448": 1, + "449": 1, + "45": 5, + "450": 1, + "451": 1, + "452": 1, + "453": 1, + "454": 1, + "455": 1, + "456": 1, + "457": 1, + "458": 1, + "459": 1, + "46": 1, + "460": 1, + "461": 1, + "462": 1, + "463": 1, + "464": 1, + "465": 1, + "466": 1, + "467": 1, + "468": 1, + "469": 1, + "47": 1, + "470": 1, + "471": 1, + "472": 1, + "473": 1, + "474": 1, + "475": 1, + "476": 1, + "477": 1, + "478": 1, + "479": 1, + "48": 1, + "480": 1, + "481": 1, + "482": 1, + "483": 1, + "484": 1, + "485": 1, + "486": 1, + "487": 1, + "488": 1, + "489": 1, + "49": 0, + "490": 1, + "491": 1, + "492": 1, + "493": 1, + "494": 1, + "495": 1, + "496": 1, + "497": 1, + "498": 1, + "499": 1, + "5": 0, + "50": 1, + "500": 1, + "501": 1, + "502": 1, + "503": 1, + "51": 0, + "52": 1, + "53": 0, + "54": 1, + "55": 1, + "56": 1, + "57": 5, + "58": 0, + "59": 1, + "6": 1, + "60": 1, + "61": 5, + "62": 1, + "63": 2, + "64": 1, + "65": 0, + "66": 1, + "67": 0, + "68": 1, + "69": 0, + "7": 1, + "70": 1, + "71": 1, + "72": 1, + "73": 5, + "74": 0, + "75": 1, + "76": 1, + "77": 5, + "78": 1, + "79": 2, + "8": 1, + "80": 1, + "81": 0, + "82": 1, + "83": 0, + "84": 1, + "85": 0, + "86": 1, + "87": 0, + "88": 1, + "89": 5, + "9": 5, + "90": 0, + "91": 1, + "92": 1, + "93": 5, + "94": 1, + "95": 2, + "96": 1, + "97": 0, + "98": 1, + "99": 0 + }, + "positive_restoration_helpers": [ + 0, + 2, + 4, + 6, + 7, + 8, + 9, + 11, + 12, + 13, + 14, + 15, + 16, + 18, + 20, + 22, + 23, + 24, + 25, + 27, + 28, + 29, + 30, + 31, + 32, + 34, + 36, + 38, + 39, + 40, + 41, + 43, + 44, + 45, + 46, + 47, + 48, + 50, + 52, + 54, + 55, + 56, + 57, + 59, + 60, + 61, + 62, + 63, + 64, + 66, + 68, + 70, + 71, + 72, + 73, + 75, + 76, + 77, + 78, + 79, + 80, + 82, + 84, + 86, + 88, + 89, + 91, + 92, + 93, + 94, + 95, + 96, + 98, + 100, + 102, + 104, + 105, + 107, + 108, + 109, + 110, + 111, + 112, + 114, + 116, + 118, + 119, + 120, + 121, + 123, + 124, + 125, + 126, + 127, + 128, + 130, + 132, + 134, + 135, + 136, + 137, + 139, + 140, + 141, + 142, + 143, + 144, + 146, + 148, + 150, + 151, + 152, + 153, + 155, + 156, + 157, + 158, + 159, + 160, + 162, + 164, + 166, + 167, + 168, + 169, + 171, + 172, + 173, + 174, + 175, + 176, + 178, + 180, + 182, + 183, + 184, + 185, + 187, + 188, + 189, + 190, + 191, + 192, + 194, + 196, + 198, + 199, + 200, + 201, + 203, + 204, + 205, + 206, + 207, + 208, + 210, + 212, + 214, + 215, + 216, + 217, + 219, + 220, + 221, + 222, + 223, + 238, + 239, + 240, + 241, + 242, + 243, + 244, + 245, + 250, + 251, + 252, + 253, + 254, + 255, + 256, + 257, + 260, + 261, + 262, + 263, + 264, + 265, + 266, + 267, + 268, + 269, + 270, + 271, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 287, + 290, + 291, + 292, + 293, + 294, + 295, + 299, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 346, + 347, + 348, + 349, + 350, + 351, + 352, + 353, + 358, + 359, + 360, + 361, + 370, + 371, + 372, + 373, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 399, + 400, + 401, + 402, + 403, + 404, + 405, + 406, + 407, + 408, + 409, + 410, + 411, + 412, + 413, + 414, + 415, + 416, + 417, + 418, + 419, + 420, + 421, + 422, + 423, + 424, + 425, + 426, + 427, + 428, + 429, + 430, + 431, + 432, + 433, + 434, + 435, + 436, + 437, + 438, + 439, + 440, + 441, + 442, + 443, + 444, + 445, + 446, + 447, + 448, + 449, + 450, + 451, + 452, + 453, + 454, + 455, + 456, + 457, + 458, + 459, + 460, + 461, + 462, + 463, + 464, + 465, + 466, + 467, + 468, + 469, + 470, + 471, + 472, + 473, + 474, + 475, + 476, + 477, + 478, + 479, + 480, + 481, + 482, + 483, + 484, + 485, + 486, + 487, + 488, + 489, + 490, + 491, + 492, + 493, + 494, + 495, + 496, + 497, + 498, + 499, + 500, + 501, + 502, + 503 + ], + "scenarios": { + "baseline": { + "description": "Selected T37 profile.", + "profile": { + "1": 848490, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "rank_mass": 2408256, + "rank_mass_neutral": true, + "realizable_in_selected_windows": true + }, + "baseline_free_concentration": { + "description": "The same relaxation with no deferral (control for the relaxation itself).", + "profile": { + "1": 848484, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 1, + "8": 2664 + }, + "rank_mass": 2408256, + "rank_mass_neutral": true, + "realizable_in_selected_windows": false + }, + "defer_all_free_concentration": { + "description": "Relaxation of the previous row: all idle coordinates, including the returned ones, placed in capacity-48 children, ignoring helper indivisibility, windows and chronology.", + "profile": { + "1": 757908, + "18": 1, + "2": 108558, + "3": 127206, + "4": 53280, + "48": 15498, + "5": 14652, + "8": 2664 + }, + "rank_mass": 2408256, + "rank_mass_neutral": true, + "realizable_in_selected_windows": false + }, + "defer_all_selected_hosting": { + "deferred_children": { + "1": 90576, + "2": 3996, + "3": 21312, + "4": 666, + "5": 9324 + }, + "deferred_helpers_per_call": 378, + "description": "Every positive helper restoration climb (all calls) is deferred; its host coordinates return to the same hosting window and are advanced by that window's idle child, merged per window. Owner map unchanged.", + "profile": { + "1": 776383, + "10": 1010, + "11": 582, + "12": 858, + "13": 324, + "14": 262, + "15": 160, + "16": 153, + "17": 73, + "18": 29, + "19": 47, + "2": 113600, + "20": 36, + "21": 22, + "23": 50, + "3": 135587, + "4": 59944, + "48": 11086, + "5": 18475, + "6": 3812, + "7": 1890, + "8": 5609, + "9": 905 + }, + "rank_mass": 2408256, + "rank_mass_neutral": true, + "realizable_in_selected_windows": true, + "returned_window_ranks": { + "1": 18475, + "10": 1010, + "11": 582, + "12": 858, + "13": 324, + "14": 262, + "15": 160, + "16": 153, + "17": 73, + "18": 29, + "19": 47, + "2": 5042, + "20": 36, + "21": 22, + "23": 50, + "3": 8381, + "4": 6664, + "5": 3823, + "6": 3812, + "7": 1891, + "8": 2949, + "9": 900 + }, + "windows_receiving": 55543 + }, + "exchange_merge_rank1_into_48": { + "description": "Relaxation: per call, one rank-one climb is removed and its coordinate joins an existing rank-48 idle child (48 -> 49; halving 2*49^2 < 73^2). Every selected window has capacity at most 48 and every rank-48 child fills a whole idle window, so no re-hosting realizes this; it over-estimates one deferred rank-one climb per call.", + "profile": { + "1": 848157, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 10753, + "49": 333, + "5": 23976, + "8": 2664 + }, + "rank_mass": 2408256, + "rank_mass_neutral": true, + "realizable_in_selected_windows": false + }, + "zero_cost_delete_rank1": { + "description": "PR974-style relaxation: one rank-one child per call deleted with zero parent cost. It leaves N live coordinates unadvanced; priced only for comparison.", + "profile": { + "1": 848157, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "rank_mass": 2407923, + "rank_mass_neutral": false, + "realizable_in_selected_windows": false + } + }, + "single_helper_profiles": { + "0": { + "1": 848326, + "2": 112592, + "3": 148530, + "4": 53959, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "100": { + "1": 848422, + "2": 112573, + "3": 148528, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "102": { + "1": 848418, + "2": 112581, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "104": { + "1": 848418, + "2": 112581, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "105": { + "1": 848490, + "10": 27, + "15": 6, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23904, + "8": 2664 + }, + "107": { + "1": 848420, + "2": 112580, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "108": { + "1": 848420, + "2": 112580, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "109": { + "1": 848490, + "10": 26, + "15": 6, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23906, + "8": 2664 + }, + "11": { + "1": 848346, + "2": 112596, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "110": { + "1": 848428, + "2": 112576, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "111": { + "1": 848490, + "2": 112492, + "3": 148518, + "4": 53968, + "48": 11086, + "5": 23976, + "6": 6, + "8": 2664 + }, + "112": { + "1": 848428, + "2": 112576, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "114": { + "1": 848420, + "2": 112580, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "116": { + "1": 848428, + "2": 112576, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "118": { + "1": 848428, + "2": 112576, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "119": { + "1": 848428, + "2": 112576, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "12": { + "1": 848354, + "2": 112592, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "120": { + "1": 848428, + "2": 112576, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "121": { + "1": 848490, + "10": 22, + "15": 6, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23914, + "8": 2664 + }, + "123": { + "1": 848428, + "2": 112576, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "124": { + "1": 848428, + "2": 112576, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "125": { + "1": 848490, + "10": 22, + "15": 6, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23914, + "8": 2664 + }, + "126": { + "1": 848428, + "2": 112576, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "127": { + "1": 848428, + "2": 112576, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "128": { + "1": 848436, + "2": 112572, + "3": 148524, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "13": { + "1": 848490, + "10": 38, + "15": 8, + "2": 112554, + "20": 9, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23840, + "8": 2664 + }, + "130": { + "1": 848437, + "2": 112573, + "3": 148523, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "132": { + "1": 848437, + "2": 112573, + "3": 148523, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "134": { + "1": 848437, + "2": 112573, + "3": 148523, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "135": { + "1": 848437, + "2": 112573, + "3": 148523, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "136": { + "1": 848437, + "2": 112573, + "3": 148523, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "137": { + "1": 848490, + "10": 19, + "15": 5, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23923, + "8": 2664 + }, + "139": { + "1": 848437, + "2": 112573, + "3": 148523, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "14": { + "1": 848356, + "2": 112591, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "140": { + "1": 848437, + "2": 112573, + "3": 148523, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "141": { + "1": 848490, + "10": 19, + "15": 5, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23923, + "8": 2664 + }, + "142": { + "1": 848427, + "2": 112578, + "3": 148523, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "143": { + "1": 848427, + "2": 112578, + "3": 148523, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "144": { + "1": 848427, + "2": 112578, + "3": 148523, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "146": { + "1": 848490, + "2": 112554, + "3": 148455, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 24, + "8": 2664, + "9": 5 + }, + "148": { + "1": 848490, + "2": 112554, + "3": 148455, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 24, + "8": 2664, + "9": 5 + }, + "15": { + "1": 848356, + "2": 112591, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "150": { + "1": 848490, + "2": 112554, + "3": 148455, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 24, + "8": 2664, + "9": 5 + }, + "151": { + "1": 848486, + "2": 112554, + "3": 148451, + "4": 53950, + "48": 11086, + "5": 23976, + "6": 24, + "8": 2664, + "9": 5 + }, + "152": { + "1": 848435, + "2": 112574, + "3": 148523, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "153": { + "1": 848490, + "10": 22, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23932, + "8": 2664 + }, + "155": { + "1": 848444, + "2": 112577, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "156": { + "1": 848444, + "2": 112577, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "157": { + "1": 848490, + "10": 23, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23930, + "8": 2664 + }, + "158": { + "1": 848444, + "2": 112577, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "159": { + "1": 848444, + "2": 112577, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "16": { + "1": 848356, + "2": 112591, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "160": { + "1": 848444, + "2": 112577, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "162": { + "1": 848490, + "2": 112554, + "3": 148472, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 23, + "8": 2664 + }, + "164": { + "1": 848490, + "2": 112554, + "3": 148472, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 23, + "8": 2664 + }, + "166": { + "1": 848490, + "2": 112554, + "3": 148472, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 23, + "8": 2664 + }, + "167": { + "1": 848490, + "2": 112554, + "3": 148480, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 19, + "8": 2664 + }, + "168": { + "1": 848452, + "2": 112573, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "169": { + "1": 848490, + "10": 19, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23938, + "8": 2664 + }, + "171": { + "1": 848452, + "2": 112573, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "172": { + "1": 848452, + "2": 112573, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "173": { + "1": 848490, + "10": 19, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23938, + "8": 2664 + }, + "174": { + "1": 848452, + "2": 112573, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "175": { + "1": 848444, + "2": 112577, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "176": { + "1": 848444, + "2": 112577, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "178": { + "1": 848490, + "2": 112554, + "3": 148472, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 23, + "8": 2664 + }, + "18": { + "1": 848356, + "2": 112591, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "180": { + "1": 848490, + "2": 112554, + "3": 148472, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 23, + "8": 2664 + }, + "182": { + "1": 848490, + "2": 112554, + "3": 148472, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 23, + "8": 2664 + }, + "183": { + "1": 848490, + "2": 112554, + "3": 148472, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 23, + "8": 2664 + }, + "184": { + "1": 848444, + "2": 112577, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "185": { + "1": 848490, + "10": 23, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23930, + "8": 2664 + }, + "187": { + "1": 848444, + "2": 112577, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "188": { + "1": 848444, + "2": 112577, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "189": { + "1": 848490, + "10": 23, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23930, + "8": 2664 + }, + "190": { + "1": 848444, + "2": 112577, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "191": { + "1": 848444, + "2": 112577, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "192": { + "1": 848443, + "2": 112576, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "194": { + "1": 848490, + "2": 112554, + "3": 148471, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 22, + "8": 2664, + "9": 1 + }, + "196": { + "1": 848490, + "2": 112554, + "3": 148471, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 22, + "8": 2664, + "9": 1 + }, + "198": { + "1": 848490, + "2": 112554, + "3": 148471, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 22, + "8": 2664, + "9": 1 + }, + "199": { + "1": 848490, + "2": 112554, + "3": 148479, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 18, + "8": 2664, + "9": 1 + }, + "2": { + "1": 848326, + "2": 112592, + "3": 148530, + "4": 53959, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "20": { + "1": 848356, + "2": 112591, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "200": { + "1": 848451, + "2": 112572, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "201": { + "1": 848490, + "10": 18, + "15": 1, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23937, + "8": 2664 + }, + "203": { + "1": 848451, + "2": 112572, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "204": { + "1": 848451, + "2": 112572, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "205": { + "1": 848490, + "10": 19, + "15": 1, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23935, + "8": 2664 + }, + "206": { + "1": 848449, + "2": 112573, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "207": { + "1": 848451, + "2": 112572, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "208": { + "1": 848451, + "2": 112572, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "210": { + "1": 848451, + "2": 112572, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "212": { + "1": 848451, + "2": 112572, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "214": { + "1": 848443, + "2": 112576, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "215": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "216": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "217": { + "1": 848490, + "10": 26, + "15": 1, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23921, + "8": 2664 + }, + "219": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "22": { + "1": 848356, + "2": 112591, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "220": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "221": { + "1": 848490, + "10": 26, + "15": 1, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23921, + "8": 2664 + }, + "222": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "223": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "23": { + "1": 848356, + "2": 112591, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "238": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "239": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "24": { + "1": 848356, + "2": 112591, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "240": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "241": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "242": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "243": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "244": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "245": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "25": { + "1": 848490, + "10": 37, + "15": 8, + "2": 112554, + "20": 9, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23842, + "8": 2664 + }, + "250": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "251": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "252": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "253": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "254": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "255": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "256": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "257": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "260": { + "1": 848490, + "2": 112515, + "3": 148518, + "4": 53964, + "48": 11086, + "5": 23976, + "6": 1, + "8": 2664 + }, + "261": { + "1": 848490, + "2": 112515, + "3": 148518, + "4": 53964, + "48": 11086, + "5": 23976, + "6": 1, + "8": 2664 + }, + "262": { + "1": 848490, + "2": 112554, + "3": 148479, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 18, + "8": 2664, + "9": 1 + }, + "263": { + "1": 848490, + "2": 112554, + "3": 148479, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 18, + "8": 2664, + "9": 1 + }, + "264": { + "1": 848490, + "2": 112554, + "3": 148479, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 18, + "8": 2664, + "9": 1 + }, + "265": { + "1": 848490, + "2": 112554, + "3": 148479, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 18, + "8": 2664, + "9": 1 + }, + "266": { + "1": 848431, + "2": 112582, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "267": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "268": { + "1": 848425, + "2": 112573, + "3": 148527, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "269": { + "1": 848424, + "2": 112572, + "3": 148528, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "27": { + "1": 848356, + "2": 112591, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "270": { + "1": 848424, + "2": 112572, + "3": 148528, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "271": { + "1": 848423, + "2": 112572, + "3": 148527, + "4": 53947, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "274": { + "1": 848490, + "2": 112554, + "3": 148479, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 18, + "8": 2664, + "9": 1 + }, + "275": { + "1": 848490, + "2": 112554, + "3": 148479, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 18, + "8": 2664, + "9": 1 + }, + "276": { + "1": 848490, + "2": 112554, + "3": 148479, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 18, + "8": 2664, + "9": 1 + }, + "277": { + "1": 848490, + "2": 112554, + "3": 148479, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 18, + "8": 2664, + "9": 1 + }, + "278": { + "1": 848423, + "2": 112572, + "3": 148527, + "4": 53947, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "279": { + "1": 848423, + "2": 112572, + "3": 148527, + "4": 53947, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "28": { + "1": 848356, + "2": 112591, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "280": { + "1": 848423, + "2": 112572, + "3": 148527, + "4": 53947, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "281": { + "1": 848423, + "2": 112572, + "3": 148527, + "4": 53947, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "282": { + "1": 848423, + "2": 112572, + "3": 148527, + "4": 53947, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "283": { + "1": 848419, + "2": 112572, + "3": 148523, + "4": 53951, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "284": { + "1": 848490, + "2": 112515, + "3": 148518, + "4": 53964, + "48": 11086, + "5": 23976, + "6": 1, + "8": 2664 + }, + "285": { + "1": 848490, + "2": 112515, + "3": 148518, + "4": 53964, + "48": 11086, + "5": 23976, + "6": 1, + "8": 2664 + }, + "287": { + "1": 848419, + "2": 112572, + "3": 148523, + "4": 53951, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "29": { + "1": 848490, + "10": 37, + "15": 8, + "2": 112554, + "20": 9, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23842, + "8": 2664 + }, + "290": { + "1": 848419, + "2": 112572, + "3": 148523, + "4": 53951, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "291": { + "1": 848419, + "2": 112572, + "3": 148523, + "4": 53951, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "292": { + "1": 848419, + "2": 112572, + "3": 148523, + "4": 53951, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "293": { + "1": 848419, + "2": 112572, + "3": 148523, + "4": 53951, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "294": { + "1": 848451, + "2": 112572, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "295": { + "1": 848419, + "2": 112572, + "3": 148523, + "4": 53951, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "299": { + "1": 848419, + "2": 112572, + "3": 148523, + "4": 53951, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "30": { + "1": 848356, + "2": 112591, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "302": { + "1": 848415, + "2": 112568, + "3": 148527, + "4": 53951, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "303": { + "1": 848413, + "2": 112569, + "3": 148527, + "4": 53951, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "304": { + "1": 848413, + "2": 112569, + "3": 148527, + "4": 53951, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "305": { + "1": 848405, + "2": 112573, + "3": 148527, + "4": 53951, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "306": { + "1": 848452, + "2": 112573, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "307": { + "1": 848405, + "2": 112573, + "3": 148527, + "4": 53951, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "308": { + "1": 848490, + "2": 112508, + "3": 148518, + "4": 53969, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "309": { + "1": 848490, + "2": 112508, + "3": 148518, + "4": 53969, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "31": { + "1": 848356, + "2": 112591, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "310": { + "1": 848490, + "2": 112554, + "3": 148474, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 22, + "8": 2664 + }, + "311": { + "1": 848490, + "2": 112554, + "3": 148474, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 22, + "8": 2664 + }, + "312": { + "1": 848490, + "2": 112554, + "3": 148474, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 22, + "8": 2664 + }, + "313": { + "1": 848490, + "2": 112554, + "3": 148474, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 22, + "8": 2664 + }, + "314": { + "1": 848490, + "2": 112554, + "3": 148474, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 22, + "8": 2664 + }, + "315": { + "1": 848490, + "2": 112554, + "3": 148474, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 22, + "8": 2664 + }, + "316": { + "1": 848490, + "2": 112554, + "3": 148472, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 23, + "8": 2664 + }, + "317": { + "1": 848490, + "2": 112554, + "3": 148472, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 23, + "8": 2664 + }, + "318": { + "1": 848490, + "12": 9, + "16": 5, + "2": 112554, + "3": 148518, + "4": 53861, + "48": 11086, + "5": 23976, + "8": 2683 + }, + "32": { + "1": 848356, + "2": 112591, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "322": { + "1": 848490, + "2": 112554, + "3": 148480, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 19, + "8": 2664 + }, + "323": { + "1": 848490, + "2": 112554, + "3": 148480, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 19, + "8": 2664 + }, + "324": { + "1": 848490, + "2": 112554, + "3": 148480, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 19, + "8": 2664 + }, + "325": { + "1": 848490, + "2": 112554, + "3": 148480, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 19, + "8": 2664 + }, + "326": { + "1": 848490, + "2": 112554, + "3": 148480, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 19, + "8": 2664 + }, + "327": { + "1": 848490, + "2": 112554, + "3": 148480, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 19, + "8": 2664 + }, + "328": { + "1": 848490, + "2": 112554, + "3": 148482, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 18, + "8": 2664 + }, + "329": { + "1": 848490, + "2": 112554, + "3": 148482, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 18, + "8": 2664 + }, + "330": { + "1": 848490, + "12": 9, + "16": 5, + "2": 112554, + "3": 148518, + "4": 53861, + "48": 11086, + "5": 23976, + "8": 2683 + }, + "332": { + "1": 848490, + "2": 112520, + "3": 148518, + "4": 53963, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "333": { + "1": 848490, + "2": 112520, + "3": 148518, + "4": 53963, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "334": { + "1": 848490, + "12": 5, + "2": 112554, + "3": 148433, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 19, + "8": 2664, + "9": 9 + }, + "335": { + "1": 848490, + "12": 5, + "2": 112554, + "3": 148433, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 19, + "8": 2664, + "9": 9 + }, + "336": { + "1": 848490, + "12": 5, + "2": 112554, + "3": 148433, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 19, + "8": 2664, + "9": 9 + }, + "337": { + "1": 848490, + "12": 5, + "2": 112554, + "3": 148433, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 19, + "8": 2664, + "9": 9 + }, + "338": { + "1": 848490, + "2": 112554, + "3": 148484, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 17, + "8": 2664 + }, + "339": { + "1": 848490, + "2": 112554, + "3": 148484, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 17, + "8": 2664 + }, + "34": { + "1": 848364, + "2": 112587, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "340": { + "1": 848490, + "2": 112554, + "3": 148492, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 13, + "8": 2664 + }, + "341": { + "1": 848490, + "2": 112554, + "3": 148492, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 13, + "8": 2664 + }, + "346": { + "1": 848490, + "12": 5, + "2": 112554, + "3": 148433, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 19, + "8": 2664, + "9": 9 + }, + "347": { + "1": 848490, + "2": 112554, + "3": 148500, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 9, + "8": 2664 + }, + "348": { + "1": 848490, + "12": 5, + "2": 112554, + "3": 148433, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 19, + "8": 2664, + "9": 9 + }, + "349": { + "1": 848490, + "2": 112554, + "3": 148492, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 13, + "8": 2664 + }, + "350": { + "1": 848490, + "2": 112554, + "3": 148492, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 13, + "8": 2664 + }, + "351": { + "1": 848490, + "2": 112554, + "3": 148492, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 13, + "8": 2664 + }, + "352": { + "1": 848490, + "2": 112554, + "3": 148492, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 13, + "8": 2664 + }, + "353": { + "1": 848490, + "2": 112554, + "3": 148492, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 13, + "8": 2664 + }, + "358": { + "1": 848490, + "12": 5, + "2": 112554, + "3": 148431, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 20, + "8": 2664, + "9": 9 + }, + "359": { + "1": 848490, + "2": 112554, + "3": 148492, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 13, + "8": 2664 + }, + "36": { + "1": 848364, + "2": 112587, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "360": { + "1": 848484, + "12": 5, + "2": 112554, + "3": 148419, + "4": 53950, + "48": 11086, + "5": 23976, + "6": 22, + "7": 2, + "8": 2664, + "9": 9 + }, + "361": { + "1": 848490, + "2": 112554, + "3": 148492, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 13, + "8": 2664 + }, + "370": { + "1": 848490, + "2": 112554, + "3": 148484, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 17, + "8": 2664 + }, + "371": { + "1": 848490, + "2": 112554, + "3": 148484, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 17, + "8": 2664 + }, + "372": { + "1": 848490, + "2": 112554, + "3": 148484, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 17, + "8": 2664 + }, + "373": { + "1": 848490, + "2": 112554, + "3": 148484, + "4": 53946, + "48": 11086, + "5": 23976, + "6": 17, + "8": 2664 + }, + "38": { + "1": 848364, + "2": 112587, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "39": { + "1": 848364, + "2": 112587, + "3": 148526, + "4": 53955, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "392": { + "1": 848448, + "2": 112575, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "393": { + "1": 848448, + "2": 112575, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "394": { + "1": 848448, + "2": 112575, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "396": { + "1": 848448, + "2": 112575, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "4": { + "1": 848326, + "2": 112592, + "3": 148530, + "4": 53959, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "40": { + "1": 848365, + "2": 112587, + "3": 148527, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "400": { + "1": 848448, + "2": 112575, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "401": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "402": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "403": { + "1": 848372, + "2": 112613, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "404": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "405": { + "1": 848372, + "2": 112613, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "406": { + "1": 848372, + "2": 112613, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "407": { + "1": 848372, + "2": 112613, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "408": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "409": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "41": { + "1": 848490, + "10": 37, + "15": 5, + "2": 112554, + "20": 8, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23855, + "8": 2664 + }, + "410": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "411": { + "1": 848364, + "2": 112617, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "412": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "413": { + "1": 848356, + "2": 112621, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "414": { + "1": 848355, + "2": 112620, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "415": { + "1": 848362, + "2": 112618, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "416": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "417": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "418": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "419": { + "1": 848362, + "2": 112618, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "420": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "421": { + "1": 848362, + "2": 112618, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "422": { + "1": 848360, + "2": 112619, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "423": { + "1": 848352, + "2": 112623, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "424": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "425": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "426": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "427": { + "1": 848349, + "2": 112623, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "428": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "429": { + "1": 848349, + "2": 112623, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "43": { + "1": 848377, + "2": 112587, + "3": 148523, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "430": { + "1": 848349, + "2": 112623, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "431": { + "1": 848349, + "2": 112623, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "432": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "433": { + "1": 848456, + "2": 112571, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "434": { + "1": 848453, + "2": 112571, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "435": { + "1": 848347, + "2": 112624, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "436": { + "1": 848453, + "2": 112571, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "437": { + "1": 848339, + "2": 112628, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "438": { + "1": 848339, + "2": 112628, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "439": { + "1": 848339, + "2": 112628, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "44": { + "1": 848386, + "2": 112584, + "3": 148522, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "440": { + "1": 848453, + "2": 112571, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "441": { + "1": 848453, + "2": 112571, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "442": { + "1": 848453, + "2": 112571, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "444": { + "1": 848453, + "2": 112571, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "448": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "449": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "45": { + "1": 848490, + "10": 28, + "15": 4, + "2": 112554, + "20": 8, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23876, + "8": 2664 + }, + "450": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "451": { + "1": 848347, + "2": 112624, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "452": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "453": { + "1": 848347, + "2": 112624, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "454": { + "1": 848339, + "2": 112628, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "455": { + "1": 848345, + "2": 112625, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "456": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "457": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "458": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "46": { + "1": 848390, + "2": 112582, + "3": 148522, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "460": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "464": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "465": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "466": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "468": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "47": { + "1": 848390, + "2": 112582, + "3": 148522, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "472": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "473": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "474": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "476": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "48": { + "1": 848391, + "2": 112583, + "3": 148521, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "480": { + "1": 848445, + "2": 112575, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "481": { + "1": 848437, + "2": 112579, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "482": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "484": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "488": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "489": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "490": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "492": { + "1": 848435, + "2": 112580, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "496": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "497": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "498": { + "1": 848433, + "2": 112581, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "50": { + "1": 848391, + "2": 112583, + "3": 148521, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "500": { + "1": 848425, + "2": 112585, + "3": 148519, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "52": { + "1": 848399, + "2": 112579, + "3": 148521, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "54": { + "1": 848399, + "2": 112579, + "3": 148521, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "55": { + "1": 848399, + "2": 112579, + "3": 148521, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "56": { + "1": 848399, + "2": 112579, + "3": 148521, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "57": { + "1": 848490, + "10": 25, + "15": 3, + "2": 112554, + "20": 8, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23885, + "8": 2664 + }, + "59": { + "1": 848399, + "2": 112579, + "3": 148521, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "6": { + "1": 848326, + "2": 112592, + "3": 148530, + "4": 53959, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "60": { + "1": 848399, + "2": 112579, + "3": 148521, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "61": { + "1": 848490, + "10": 25, + "15": 3, + "2": 112554, + "20": 8, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23885, + "8": 2664 + }, + "62": { + "1": 848399, + "2": 112579, + "3": 148521, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "63": { + "1": 848490, + "2": 112466, + "3": 148518, + "4": 53971, + "48": 11086, + "5": 23976, + "6": 2, + "8": 2672 + }, + "64": { + "1": 848402, + "2": 112579, + "3": 148520, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "66": { + "1": 848402, + "2": 112579, + "3": 148520, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "68": { + "1": 848402, + "2": 112579, + "3": 148520, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "7": { + "1": 848326, + "2": 112592, + "3": 148530, + "4": 53959, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "70": { + "1": 848402, + "2": 112579, + "3": 148520, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "71": { + "1": 848402, + "2": 112579, + "3": 148520, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "72": { + "1": 848402, + "2": 112579, + "3": 148520, + "4": 53954, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "73": { + "1": 848490, + "10": 25, + "15": 6, + "2": 112554, + "20": 4, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23892, + "8": 2664 + }, + "75": { + "1": 848406, + "2": 112579, + "3": 148524, + "4": 53950, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "76": { + "1": 848406, + "2": 112579, + "3": 148524, + "4": 53950, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "77": { + "1": 848490, + "10": 25, + "15": 6, + "2": 112554, + "20": 4, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23892, + "8": 2664 + }, + "78": { + "1": 848414, + "2": 112575, + "3": 148524, + "4": 53950, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "79": { + "1": 848490, + "2": 112480, + "3": 148518, + "4": 53966, + "48": 11086, + "5": 23976, + "6": 6, + "8": 2668 + }, + "8": { + "1": 848338, + "2": 112592, + "3": 148526, + "4": 53959, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "80": { + "1": 848416, + "2": 112574, + "3": 148524, + "4": 53950, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "82": { + "1": 848416, + "2": 112574, + "3": 148524, + "4": 53950, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "84": { + "1": 848418, + "2": 112573, + "3": 148524, + "4": 53950, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "86": { + "1": 848418, + "2": 112573, + "3": 148524, + "4": 53950, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "88": { + "1": 848418, + "2": 112573, + "3": 148524, + "4": 53950, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "89": { + "1": 848490, + "10": 19, + "15": 6, + "2": 112554, + "20": 4, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23904, + "8": 2664 + }, + "9": { + "1": 848490, + "10": 38, + "15": 12, + "2": 112554, + "20": 9, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23828, + "8": 2664 + }, + "91": { + "1": 848418, + "2": 112573, + "3": 148524, + "4": 53950, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "92": { + "1": 848418, + "2": 112573, + "3": 148524, + "4": 53950, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "93": { + "1": 848490, + "10": 19, + "15": 10, + "2": 112554, + "3": 148518, + "4": 53946, + "48": 11086, + "5": 23908, + "8": 2664 + }, + "94": { + "1": 848422, + "2": 112573, + "3": 148528, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "95": { + "1": 848490, + "2": 112486, + "3": 148518, + "4": 53965, + "48": 11086, + "5": 23976, + "6": 10, + "8": 2664 + }, + "96": { + "1": 848422, + "2": 112573, + "3": 148528, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + }, + "98": { + "1": 848422, + "2": 112573, + "3": 148528, + "4": 53946, + "48": 11086, + "5": 23976, + "8": 2664 + } + }, + "single_helper_unchanged": [ + 395, + 397, + 398, + 399, + 443, + 445, + 446, + 447, + 459, + 461, + 462, + 463, + 467, + 469, + 470, + 471, + 475, + 477, + 478, + 479, + 483, + 485, + 486, + 487, + 491, + 493, + 494, + 495, + 499, + 501, + 502, + 503 + ], + "status": "PASS_T37_RESTORATION_CENSUS" +} diff --git a/research/t37-restoration-deferral/CLAIM.json b/research/t37-restoration-deferral/CLAIM.json new file mode 100644 index 0000000000..4426a5c947 --- /dev/null +++ b/research/t37-restoration-deferral/CLAIM.json @@ -0,0 +1,43 @@ +{ + "ai_assistance": "substantial: Claude (Anthropic) via Claude Code", + "assignment_seed": 57, + "base_commit": "bbc600db2fc15007b7c914f4f2b2ed55fa909c87", + "claims": [ + "Coverage identity on the selected T37 payload: 8*k_f + 1 + hosted_f + idle_f = 73 for all 33152 live families (and all 18816 T21 families); hence rank mass = 72W + 64N and deficit = W - 64N.", + "Every positive U8 helper restoration climb (378 helpers, 636 mass) belongs to a register touched by the full-frame inverse cleanup and equals, index by index, the canonical provider word bound by the template; the 112 sources (230 mass) have full endpoints fixed by the data contract. Both emitted programs have 490 final climbs with exactly the replay rank multiset, before full_frame_cleanup.", + "Restoration deferral is rank-mass neutral; under the selected owner map deferring all helper restoration gives at most kappa = 0.001708640379500299; under free concentration the PR589 bit side binds at 0.001730427469823602.", + "The best single helper index gives 0.001662126446464193; as a relaxation that no re-hosting realizes, one rank-one climb per call merged into a rank-48 idle child gives at most 0.001662339932746932, versus 0.001708820303553035 for a PR974-style zero-cost deletion that leaves live coordinates unadvanced." + ], + "contributor": "Sagar Thakrar (thakrarsagar)", + "deficit_T21": 6720, + "deficit_T37": 11840, + "expected_last_line": "PASS_T37_RESTORATION_DEFERRAL_REPLAY", + "kappa_rows": { + "baseline": "1661960547713947/1000000000000000000", + "baseline_free_concentration": "41549076555561/25000000000000000", + "defer_all_free_concentration": "865213734911801/500000000000000000", + "defer_all_selected_hosting": "1708640379500299/1000000000000000000", + "exchange_merge_rank1_into_48": "415584983186733/250000000000000000", + "zero_cost_delete_rank1": "341764060710607/200000000000000000" + }, + "license": "Apache-2.0", + "mechanism": "restoration deferral: a helper ends at its pre-restoration frame; its host coordinates return to the same hosting window and are advanced by that window's idle child", + "not_claimed": [ + "a construction or admitted word", + "a new selected kappa", + "validity of any low end, cleanup retiming, phase recipe, hosting admission or invoice for the deferred helpers", + "a lower bound for any mechanism", + "a proof of the inherited all-size, realization, hosting, precision/tape, analytic or bit H1-H5 assumptions" + ], + "rebased_and_reverified_on": "2921874911956718fcaaaf9396fe8267b3cfa9f0", + "reproduce": "make t37-restoration-deferral-verify", + "results": { + "census": "CENSUS.json", + "prices": "PRICES.json" + }, + "review": "Independent adversarial review (AI-assisted subagent) of commit 2a4480a4: no blocking issues; should-fix items addressed in the follow-up commit.", + "seed_source": "Python secrets (OS CSPRNG)", + "selected_kappa_unchanged": "1661960547713947/1000000000000000000", + "status": "research note / scoped negative result; no new kappa", + "track": "50-59 recursive interfaces" +} diff --git a/research/t37-restoration-deferral/PRICES.json b/research/t37-restoration-deferral/PRICES.json new file mode 100644 index 0000000000..01662906fc --- /dev/null +++ b/research/t37-restoration-deferral/PRICES.json @@ -0,0 +1,140 @@ +{ + "base_commit": "bbc600db2fc15007b7c914f4f2b2ed55fa909c87", + "bit_lower": "1733427039589844234749/1000000000000000000000000", + "engines": { + "base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c" + }, + "scenarios": { + "baseline": { + "binding": "complex", + "complex_decimal": "0.001664727258740678855772", + "complex_lower": "416181814685169713943/250000000000000000000000", + "kappa": "1661960547713947/1000000000000000000", + "kappa_decimal": "0.001661960547713947", + "kappa_gain": "0", + "kappa_gain_percent": "0", + "rank_mass": 2408256, + "rank_mass_neutral": true, + "realizable_in_selected_windows": true + }, + "baseline_free_concentration": { + "binding": "complex", + "complex_decimal": "0.001664729781628087931514", + "complex_lower": "832364890814043965757/500000000000000000000000", + "kappa": "41549076555561/25000000000000000", + "kappa_decimal": "0.00166196306222244", + "kappa_gain": "2.514508493E-9", + "kappa_gain_percent": "0.000151297724634", + "rank_mass": 2408256, + "rank_mass_neutral": true, + "realizable_in_selected_windows": false + }, + "defer_all_free_concentration": { + "binding": "bit", + "complex_decimal": "0.001836621859873056285676", + "complex_lower": "459155464968264071419/250000000000000000000000", + "kappa": "865213734911801/500000000000000000", + "kappa_decimal": "0.001730427469823602", + "kappa_gain": "0.000068466922109655", + "kappa_gain_percent": "4.11964785830", + "rank_mass": 2408256, + "rank_mass_neutral": true, + "realizable_in_selected_windows": false + }, + "defer_all_selected_hosting": { + "binding": "complex", + "complex_decimal": "0.001711564828278027772823", + "complex_lower": "1711564828278027772823/1000000000000000000000000", + "kappa": "1708640379500299/1000000000000000000", + "kappa_decimal": "0.001708640379500299", + "kappa_gain": "0.000046679831786352", + "kappa_gain_percent": "2.80872081173", + "rank_mass": 2408256, + "rank_mass_neutral": true, + "realizable_in_selected_windows": true + }, + "exchange_merge_rank1_into_48": { + "binding": "complex", + "complex_decimal": "0.001665107908114924955942", + "complex_lower": "832553954057462477971/500000000000000000000000", + "kappa": "415584983186733/250000000000000000", + "kappa_decimal": "0.001662339932746932", + "kappa_gain": "3.79385032985E-7", + "kappa_gain_percent": "0.0228275595054", + "rank_mass": 2408256, + "rank_mass_neutral": true, + "realizable_in_selected_windows": false + }, + "zero_cost_delete_rank1": { + "binding": "complex", + "complex_decimal": "0.001711745368793742811272", + "complex_lower": "213968171099217851409/125000000000000000000000", + "kappa": "341764060710607/200000000000000000", + "kappa_decimal": "0.001708820303553035", + "kappa_gain": "0.000046859755839088", + "kappa_gain_percent": "2.81954682399", + "rank_mass": 2407923, + "rank_mass_neutral": false, + "realizable_in_selected_windows": false + } + }, + "single_helper_deferral": { + "best_complex_lower": "332978742066137137057/200000000000000000000000", + "best_helper": 9, + "best_kappa": "1662126446464193/1000000000000000000", + "best_kappa_decimal": "0.001662126446464193", + "best_kappa_gain": "1.65898750246E-7", + "best_kappa_gain_percent": "0.00998211121643", + "best_moment_drop_times_mW": "1.187341707397", + "changed_profiles": 346, + "joint_moment_drop_times_mW": "324.975386392", + "ranking": "60-digit Decimal drop of m*W*moment at the baseline endpoint; only the best row is certified exactly", + "sum_of_single_moment_drops_times_mW": "53.927087289", + "top10": [ + { + "helper": 9, + "moment_drop_times_mW": "1.187341707397" + }, + { + "helper": 13, + "moment_drop_times_mW": "1.077218197256" + }, + { + "helper": 29, + "moment_drop_times_mW": "1.065634256185" + }, + { + "helper": 25, + "moment_drop_times_mW": "1.065634256185" + }, + { + "helper": 41, + "moment_drop_times_mW": "0.936732577323" + }, + { + "helper": 45, + "moment_drop_times_mW": "0.804946230156" + }, + { + "helper": 61, + "moment_drop_times_mW": "0.742663529411" + }, + { + "helper": 57, + "moment_drop_times_mW": "0.742663529411" + }, + { + "helper": 77, + "moment_drop_times_mW": "0.640019976991" + }, + { + "helper": 73, + "moment_drop_times_mW": "0.640019976991" + } + ], + "unchanged": 32 + }, + "status": "PASS_T37_RESTORATION_PRICES" +} diff --git a/research/t37-restoration-deferral/README.md b/research/t37-restoration-deferral/README.md new file mode 100644 index 0000000000..5602739512 --- /dev/null +++ b/research/t37-restoration-deferral/README.md @@ -0,0 +1,202 @@ +# Restoration deferral in the selected T37 complex supplier + +**Status: research note and scoped negative result. No new κ; the selected result is unchanged.** +Track 50–59 (recursive interfaces), assignment seed 57 (OS CSPRNG via Python `secrets`). +Analysis base `bbc600db2fc15007b7c914f4f2b2ed55fa909c87`, where PR942's T37 record +(κ = 0.001661960547713947) is selected. Rebased onto `29218749` and re-verified there: the selected +record is unchanged and all pinned inputs are byte-identical. + +## Question + +At the end of every U8 invocation, 378 helpers and all 112 sources climb back to the full +frame. PR974 calls these 866 mass units per call "pure boundary climbs" and prices their +deletion with zero parent cost. This note prices one explicit way to remove the helper part, +counting every child the change creates. + +**Mechanism (restoration deferral).** A helper ends at the frame it holds before its +restoration climb, as a low end. The host coordinates that the climb advanced go back to the +pending set of the same hosting window. That window's idle child then advances them, as in the +hosting lemma of `research/idle-axis-hosting/PROOF.md` §2. Coordinates returned to one window +form a single child, merged with any remainder the window already has. + +## Findings + +1. **Coverage identity (exact, every live family).** On the selected T37 payload, every one of + the 33,152 live families satisfies + + ``` + 8·k_f + 1 + hosted_f + idle_f = 73, k_f ∈ {2, 3} data incidences. + ``` + + The same holds for all 18,816 families of T21. So rank mass = 72W + 64N, and the deficit is + exactly **D = W − 64N** (T37: 33,152 − 64·333 = 11,840; T21: 18,816 − 64·189 = 6,720). This is + the per-family form of the per-replica relation `8v − 9C` in Dominik Scholz's + `research/larger-gain/geometry`. Outside the eight centre paths, paid mass equals advanced + live coordinates family by family: 8 per data incidence, the hosted residual widths and the + idle ranks. One coordinate per family is unpaid. The centre paths act on private work + families `[W, W+8)`. + +2. **The full-frame inverse cleanup consumes every helper restoration climb.** 378 helpers carry + 636 mass of restoration, with children `{1:272, 2:12, 3:64, 4:2, 5:28}`, and every one of them + is touched by a full-frame cleanup gate (8,492 incidences). The other 126 helpers are already + low ends with zero restoration, and targets have none. The 112 sources carry another 230; the + data contract fixes their full endpoint, and the cleanup also touches them (3,618 + incidences). Index by index, the helper restoration equals that of the canonical provider + word bound by the hosted template. In both emitted programs, the 490 `final` climbs have + exactly the replay's rank multiset `{1:350, 2:18, 3:64, 4:2, 5:56}` and run in a phase that + precedes `full_frame_cleanup`, with only exit adapters between. + +3. **Deferral is mass-neutral, and its whole value is consolidation.** Removing a restoration + climb returns the same number of coordinates to an idle child, so total rank mass is + unchanged. Only the shape of the profile can move. Deferring one helper index alone changes + nothing unless that index recurs in a window: 32 of the 378 indices leave the profile + unchanged. The best single index (helper 9, all 333 calls) is worth +0.00998%. The value is + strongly superadditive. Single-helper moment drops sum to 53.9 (× mW), while joint deferral + drops the moment by 325.0. + +4. **Exact ceilings.** The table below uses the pinned engines and the selected outer witness. + With the selected owner map, deferring all 636 restoration mass per call is worth at most + **κ = 0.001708640379500299 (+2.81%)**. That is about what PR974's model assigns to deleting + *one* rank-one child per call. Under ideal re-hosting into capacity-48 windows, the complex + side passes the PR589 bit side, and κ stops at the bit cap 0.001730427469823602. + As a relaxation, one rank-one climb merged into an existing rank-48 idle child is worth at + most about 1/124 of a zero-cost deletion. No re-hosting realizes that merge: every selected + window has capacity at most 48, and every rank-48 child already fills a whole idle window. + +5. **Source restoration has no deferral target in this template.** A source's restoration + coordinates belong to the current invocation level of its own family. In the fixed nine-stage + template, no idle window of that family contains them, and later bridges touch the family. + This note therefore does not price source deferral. This finding is argued from the + template's level structure and is not machine-checked here. + +## Exact prices + +Every row is certified the same way. Both pinned moment engines accept the complex endpoint b +and reject b + 10⁻²⁴. All 47 outer inequalities pass at κ, and κ + 10⁻¹⁸ is rejected. +The bit endpoint is the unchanged PR589 value 0.001733427039589844234749. + +| Scenario | Rank-mass neutral | Realizable in selected windows | Complex b | κ | Gain | +|---|:---:|:---:|---|---|---:| +| selected baseline (reproduced exactly) | yes | yes | 0.0016647272587406788557 | 0.001661960547713947 | — | +| baseline under free concentration (relaxation control) | yes | no | 0.0016647297816280879 | 0.001661963062222440 | +0.00015% | +| defer all helper restoration, selected owner map | yes | yes* | 0.0017115648282780278 | **0.001708640379500299** | +2.809% | +| same, free concentration into capacity-48 windows | yes | no | 0.0018366218598730563 | 0.001730427469823602 (bit binds) | +4.120% | +| best single helper index (9), all calls | yes | yes* | 0.0016648937103306857 | 0.001662126446464193 | +0.00998% | +| one rank-one climb per call into an existing 48-child (48 → 49) | yes | no | 0.0016651079081149250 | 0.001662339932746932 | +0.0228% | +| PR974-style deletion of one rank-one child per call | **no** | no | 0.0017117453687937428 | 0.001708820303553035 | +2.820% | + +\* The window placement is realizable. The local obligations listed below are not attempted. + +"Free concentration" places all idle coordinates in children of rank 48. It ignores helper +indivisibility, window capacities and chronology, so it bounds every re-hosting from above. +On the unchanged word it moves κ by only +0.00015%, so the selected packing is already +nearly concentrated. The last row reproduces PR974's T37 value for comparison. It leaves 333 +live coordinates unadvanced, so it does not correspond to any coverage-preserving mechanism. + +## What this means for interface work + +- In the hosted recursion, helper and source restoration climbs are **coverage-productive + work**, not removable boundary overhead. PR974's rows "final helper climbs to FULL", "final + source climbs", "all final endpoint climbs", "early cleanup tails", "target delivery climbs" + and "all helper width" all delete live advances. A coverage-preserving version has mass value + zero and keeps only the shape value priced above. +- Of PR974's classes, only the **centre path** (64 per call, on private work families) is + non-productive. Its existing obstructions are recorded in `research/larger-gain/geometry`. + Apart from the centre path, the deficit can grow only through the template, by giving each + family more unpaid coordinates or each invocation more families (D = W − 64N). +- Restoration deferral could still be worth up to +2.81% with the current owner map. Getting + there needs most of the 378 helpers deferred **jointly**, because the value comes from + merging inside shared windows. Retiming a few helpers at a time is nearly worthless. + +## Remaining obligations (none attempted here) + +Realizing any part of the ceiling requires all of the following: + +1. Retime the full-frame inverse cleanup so that the deferred helpers are never needed at the + full frame. PR601 did this with commuting-prefix cleanup for 46 hyperplane-ended helpers per + call at the time. PR935's bounded retiming census found no local gain, but it held the final + caps fixed, which excludes this mechanism. +2. Establish low-end validity: inverse-row and dirt-column cone conditions and dirty + compensation, as checked in PR881. +3. Supply exact phase recipes and adapters for the changed word, in both orientations. +4. Pass hosting-window and owner admission for the changed residual widths. +5. Recompute the finite invoice and assembly, including prefix bits, row coefficient and + idle-child count. + +## Scope and limits + +- These are exact identities on the frozen payload and exact model prices, **not a construction + and not a new κ**. Neither ceiling is a lower bound for any mechanism. +- The census checks that one coordinate per live family is unpaid. It does not re-derive the + route by which the nine-stage template supplies that coordinate. +- The frame semantics follow `audit_local.py` and PR881's independent checker: monotone nested + F₂⁹ frames, one paid child per climb, a centre path at the cut and fixed endpoint frames. The + implementation here is new. Scalar maps, compensation and cones are not rechecked. +- All inherited assumptions of the selected result remain: all-size compilation, + common-label/mutable-source realization, whole-call hosting, precision/tape, analytic transfer + and the bit H1–H5 interface. This is not a Lean proof of anything. + +## Reproduce + +```sh +make t37-restoration-deferral-verify +``` + +The same check without make: + +```sh +python3 -B research/t37-restoration-deferral/verify.py --work /new/empty/dir +python3 -B -m unittest discover -s research/t37-restoration-deferral -p test_package.py -v +``` + +The expected last line is `PASS_T37_RESTORATION_DEFERRAL_REPLAY`. It takes about 8 s with +standard-library Python 3.10+ and no network. The pinned engine files are loaded from the +repository and hash-checked. `verify.py` reads five members of the committed T37 archive and +two of the T21 archive in memory, without extracting them. It recomputes `CENSUS.json` and +`PRICES.json` and requires them to equal the committed files. A double-precision bisection +that shares no code with the pinned engines must then agree with every certified endpoint and +κ to within 10⁻¹³, including the best single-helper row. Finally it runs nine negative +controls. C4, C5 and C7 test this package's own checks; the others test the inputs and the +certification: + +| Control | Rejected because | +|---|---| +| C1 one rank-48 idle child dropped | coverage identity fails (a family covers 25) | +| C2 one idle child shrunk to rank 47 | coverage identity fails | +| C3 one idle child duplicated | coverage identity fails | +| C4 full-frame cleanup removed for one restoration helper | its restoration climb is no longer consumed | +| C5 zero-cost deletion presented as a deferral | rank mass changes | +| C6 corrupted payload pin | payload digest mismatch | +| C7 a child of rank 52 | halving guard `73² > 2r²` fails | +| C8 complex endpoint b + 10⁻²⁴ | both engines exceed one | +| C9 one extra rank-one child | baseline κ no longer equals the selected record | + +## Sources and pins + +[`SOURCES.json`](SOURCES.json) records every input. The selected T37 archive is +`research/community-frontier942-audit/t37-replay.tar.gz` (`48285025…`). From it, the census +reads the hosted template (payload `956e0c0e…`, equal to the `template_sha256` of the selected +`ASSEMBLY.json`), the U8 word (content `090fd574…`) and the emitted local programs (container +`8b6a9e3a…`, bound by the template) and the canonical provider word (container `387a2266…`, +bound by the template). T21 is read from `t21-replay.tar.gz` (`6dcd7040…`). The engines +`moment.py`, `base_two_moment.py` and `outer.py` are taken from +`research/native-complex-moment552/engines` and carry the SHA-256 digests recorded in the +selected assembly. `price.py` transcribes `outer_witness` from the archive's +`runtime/code/assemble.py`. It checks that file's digest (`d89ed7a6…`) and the literal lines it +transcribes, and it cross-checks the bit endpoint against the selected `ASSEMBLY.json`. + +## Credit + +- **Selected construction:** Jonathan Capalbo (PR942); Chafik Boukhalfa (PR890); Jeremy Kothe + and NewBArch (PR869/PR870); Hao Yan (PR858); DreamingOfClouds (PR589) on eumemic (PR555). +- **Concurrent work, PR974 (avirazza, open, same track).** It supplies the role/phase partition + and the zero-parent-cost budget. This note reproduces its T37 one-unit price independently and + adds the coverage-preserving recurrence for its restoration rows. +- **Building blocks:** + - Dominik Scholz's `research/larger-gain` (`8v − 9C`, centre obstructions). + - DaysSky's idle-axis hosting (PR442) and its hosting lemma. + - Jeremy Kothe's hyperplane-ended helpers (PR601). + - goatliamia's cleanup retiming census (PR935). + - SethBurkart123's U8 independent cross-check (PR881). +- **This note:** prepared by Sagar Thakrar (thakrarsagar) with substantial AI assistance from + Claude (Anthropic) via Claude Code. New material is Apache-2.0. diff --git a/research/t37-restoration-deferral/SOURCES.json b/research/t37-restoration-deferral/SOURCES.json new file mode 100644 index 0000000000..87cd0fd0fb --- /dev/null +++ b/research/t37-restoration-deferral/SOURCES.json @@ -0,0 +1,59 @@ +{ + "base_commit": "bbc600db2fc15007b7c914f4f2b2ed55fa909c87", + "selected_record": { + "path": "certificates/selected-result.json", + "kappa": "1661960547713947/1000000000000000000", + "source_pr": 942 + }, + "constructions": { + "T37": { + "role": "selected construction (PR942 on PR890/PR869/PR870/PR858, PR589 bit supplier)", + "archive": "research/community-frontier942-audit/t37-replay.tar.gz", + "archive_sha256": "48285025105210b56a32d3d4d57a21b7591760acc709d38073e4dca339eb06fe", + "template_member": "strict/global/hosted/GLOBAL-TEMPLATE.json.gz", + "template_payload_sha256": "956e0c0e9b083806268bf93525441ccea143d5f78e46c5f6b793b22cfe11113d", + "template_binding": "equals template_sha256 recorded in research/community-frontier942-audit/ASSEMBLY.json", + "word_member": "native/local/FULL-WORD.json.gz", + "word_payload_sha256": "090fd574747fbf9628e70cb9beb792732914cfa52e1df147579fe4dbccc68c5a", + "assembly": "research/community-frontier942-audit/ASSEMBLY.json", + "assembly_sha256": "4b2894956e594e408e111d806c842f2ed2c32aefcadff93fad69ff0b46f1991a", + "program_member": "strict/global/base/providers/gauge44/LOCAL-PROGRAMS.json.gz", + "program_container_sha256": "8b6a9e3a2411a04e5ca79ba6cd1dd449b21c95f65ca127475167d9b97c80a1ce", + "program_payload_sha256": "a073d8d6a561cf5c8148d8b29ae2800bbe3978377c016b549edd7523eb3cf7e5", + "program_binding": "container digest equals local_providers.gauge44.local_programs_sha256 of the pinned hosted template", + "canonical_member": "strict/global/base/providers/gauge44/CANONICAL-WORD.json.gz", + "canonical_container_sha256": "387a2266ffe006d20042221d967f67a4b18d9bb8de1cd1e01d4031b539fa74a5", + "canonical_payload_sha256": "24db880b7dab31e6af4eec8a1aba1bbbae29cd50d9a7b77cf0e9b571b3e5ae7c", + "canonical_binding": "container digest equals local_providers.gauge44.canonical_word_sha256 of the pinned hosted template; its register numbering is the template numbering" + }, + "T21": { + "role": "preceding checkpoint (PR890), second instance of the coverage identity only", + "archive": "research/community-frontier890-audit/t21-replay.tar.gz", + "archive_sha256": "6dcd7040109174918fe25a631e349741e5d7fa1740e063e2bdd5ea77b054b6b4", + "template_member": "global/hosted/GLOBAL-TEMPLATE.json.gz", + "template_payload_sha256": "d7074fb509f61cf6d62bda4b3bec2419d5baaafcb8ceeed8c5ce295db6f5b82d", + "word_member": "native/local/FULL-WORD.json.gz", + "word_payload_sha256": "090fd574747fbf9628e70cb9beb792732914cfa52e1df147579fe4dbccc68c5a", + "assembly": "research/community-frontier890-audit/ASSEMBLY.json", + "assembly_sha256": "190110b509dc87d38b72ad37c3290efcc245ce26df4cae3d7e2d6dcf0bac2c43" + } + }, + "engines": { + "directory": "research/native-complex-moment552/engines", + "moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "binding": "the same SHA-256 digests are recorded under input_sha256 in research/community-frontier942-audit/ASSEMBLY.json" + }, + "outer_witness": { + "source": "runtime/code/assemble.py inside the T37 archive (sha256 d89ed7a68f19e6d0dbb9d1bd75805433b1dc000bd89649fb598ef381c3887925), function outer_witness", + "eta": "1/1000000000000000000000000", + "beta": "1/1000000000000000000000000", + "bootstrap_start": "384599/10000000000", + "bootstrap_steps": 7, + "charged_complex_prefix_bits": 1024, + "bit_lower": "1733427039589844234749/1000000000000000000000000", + "source_sha256": "d89ed7a68f19e6d0dbb9d1bd75805433b1dc000bd89649fb598ef381c3887925", + "source_member": "runtime/code/assemble.py" + } +} diff --git a/research/t37-restoration-deferral/census.py b/research/t37-restoration-deferral/census.py new file mode 100644 index 0000000000..b838dc7efc --- /dev/null +++ b/research/t37-restoration-deferral/census.py @@ -0,0 +1,189 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Coverage identity, restoration census and deferral profiles for T37. + +Usage: census.py OUT.json + +Reads only the hash-pinned committed replay archives (no extraction to disk). +Writes the census and every scenario profile that price.py certifies. +""" +import json +import sys +from collections import Counter + +from common import (ROOT, SOURCES, canonical, canonical_restoration, concentrated, coverage_census, + emitted_restoration, global_profile, load_canonical, load_construction, load_programs, + rank_mass, require, restoration_census, sha256, window_deferral) + +CENTRE_RANK = 8 +HALVING_CAP = 48 # every idle window has capacity <= 48; 2*48^2 < 73^2 + + +def counter_json(c): + return {str(k): c[k] for k in sorted(c) if c[k]} + + +def role_summary(registers): + out = {} + for role in ('source', 'target', 'helper'): + rs = [r for r in registers if r['role'] == role] + pos = [r for r in rs if r['restoration'] > 0] + out[role] = dict(registers=len(rs), + paid_endpoint_mass=sum(r['end'] - r['start'] for r in rs), + positive_restoration=len(pos), + restoration_mass=sum(r['restoration'] for r in pos), + restoration_profile=counter_json(Counter(r['restoration'] for r in pos)), + positive_restoration_touched_by_full_cleanup=sum(r['full_cleanup_gates'] > 0 for r in pos), + zero_restoration_low_ends=sum(r['restoration'] == 0 and r['low_end'] for r in rs), + full_cleanup_gates_on_positive_restoration=sum(r['full_cleanup_gates'] for r in pos)) + return out + + +def census(name): + template, word = load_construction(name) + local = restoration_census(word) + rep = word['report'] + local_profile = Counter({int(k): n for k, n in rep['local_profile'].items()}) + require(local['paid'] == local_profile, f'{name}: replayed local profile differs from the word report') + require(local['widths'] == Counter({int(k): n for k, n in rep['width_inventory'].items()}), 'width inventory') + require(dict(local['centre_children']) == {CENTRE_RANK: 8}, 'eight rank-eight centre paths') + data_steps = {r['end'] - r['start'] for r in local['registers'] if r['role'] != 'helper'} + require(len(data_steps) == 1, 'every data register pays the same climb') + data_step, = data_steps + local_mass = rank_mass(local_profile) + cov = coverage_census(template, local_mass, data_step) + W, N, m = cov['live'], cov['calls'], cov['m'] + require(cov['coverage_values'] == {str(m): W}, f'{name}: coverage identity fails') + require(cov['total_rank_mass'] == (m - 1) * W + local['centre_children'][CENTRE_RANK] * CENTRE_RANK * N, + f'{name}: mass identity fails') + require(cov['deficit'] == W - CENTRE_RANK * 8 * N, f'{name}: deficit identity fails') + centres = cov['private_centre_families'] + require(centres[0] >= W, 'centre work families lie outside the live stock') + H = global_profile(template, local_profile) + assembly = json.loads((ROOT / SOURCES['constructions'][name]['assembly']).read_text()) + require(sha256((ROOT / SOURCES['constructions'][name]['assembly']).read_bytes()) + == SOURCES['constructions'][name]['assembly_sha256'], f'{name}: assembly digest') + require(counter_json(H) == assembly['complex_profile'], f'{name}: global profile differs from the selected assembly') + emitted = None + binding = None + if 'canonical_member' in SOURCES['constructions'][name]: + (prov,) = template['local_providers'].values() + native = [r for r in local['registers'] if r['role'] == 'helper'] + require([r['end'] - r['start'] for r in native] == prov['widths'], 'helper widths differ by index from the template') + canon = canonical_restoration(load_canonical(name, template)) + v = local['v'] + require(canon[2 * v:] == [r['restoration'] for r in native], + 'helper restoration differs by index between the native and canonical words') + require(sorted(canon[:v]) == sorted(r['restoration'] for r in local['registers'] if r['role'] == 'source'), + 'source restoration multiset differs between the native and canonical words') + local['template_helper_restoration'] = canon[2 * v:] + binding = dict(helper_widths_by_index='native word = hosted template provider (504 helpers)', + helper_restoration_by_index='native word = canonical provider word bound by the template', + source_restoration='equal as a multiset (sources are relabelled in the canonical word)') + if 'program_member' in SOURCES['constructions'][name]: + restored = Counter() + for r in local['registers']: + if r['restoration'] > 0: + restored[r['restoration']] += 1 + no_centres = Counter(local_profile) + no_centres.subtract(local['centre_children']) + emitted = {} + for orientation, e in emitted_restoration(load_programs(name, template)).items(): + require(e['final'] == restored, f'{name} {orientation}: emitted final climbs differ from the replay') + require(+e['climbs'] == +no_centres and e['centres'] == 8, f'{name} {orientation}: emitted children') + ph = e['phases'] + require(ph.index('final') < ph.index('full_frame_cleanup'), 'final climbs precede the full-frame cleanup') + emitted[orientation] = dict(phases=ph, final_climbs=counter_json(e['final'])) + out = dict(construction=name, emitted_programs=emitted, index_binding=binding, local=dict( + h=local['h'], v=local['v'], R=local['R'], profile=counter_json(local_profile), mass=local_mass, + data_climb_per_incidence=data_step, centre_children=counter_json(local['centre_children']), + phase_mass=counter_json(local['phase_mass']), roles=role_summary(local['registers'])), + coverage=cov, global_profile=counter_json(H), + identity=dict(statement='data_climb*k_f + 1 + hosted_f + idle_f = m for every live family f; ' + 'rank mass = (m-1)*W + 64*N; deficit = W - 64*N', + rank_mass=cov['total_rank_mass'], deficit=cov['deficit'], live=W, calls=N)) + return out, template, local, local_profile, H + + +def scenarios(template, local, local_profile, H): + N = len(template['calls']) + restoration = dict(enumerate(local['template_helper_restoration'])) + positive = sorted(i for i, d in restoration.items() if d > 0) + idle_ranks = Counter(c['rank'] for c in template['idle_children']) + base_mass = rank_mass(H) + out = {} + + def add(key, profile, realizable, **meta): + require(73 * 73 > 2 * max(profile) ** 2, f"{key}: child above the halving cap") + if realizable: + require(max(profile) <= HALVING_CAP, f"{key}: child above every window capacity") + out[key] = dict(profile=counter_json(profile), rank_mass=rank_mass(profile), + rank_mass_neutral=rank_mass(profile) == base_mass, + realizable_in_selected_windows=realizable, **meta) + + add('baseline', H, True, description='Selected T37 profile.') + H1, removed, returned = window_deferral(template, local_profile, restoration, set(positive)) + require(rank_mass(H1) == base_mass, 'deferral must be mass neutral') + add('defer_all_selected_hosting', H1, True, + description='Every positive helper restoration climb (all calls) is deferred; its host ' + 'coordinates return to the same hosting window and are advanced by that ' + "window's idle child, merged per window. Owner map unchanged.", + deferred_helpers_per_call=len(positive), deferred_children=counter_json(removed), + windows_receiving=sum(returned.values()), returned_window_ranks=counter_json(returned)) + H3 = concentrated(H, removed, idle_ranks, HALVING_CAP) + add('defer_all_free_concentration', H3, False, + description='Relaxation of the previous row: all idle coordinates, including the returned ' + 'ones, placed in capacity-48 children, ignoring helper indivisibility, windows ' + 'and chronology.') + H4 = concentrated(H, Counter(), idle_ranks, HALVING_CAP) + add('baseline_free_concentration', H4, False, + description='The same relaxation with no deferral (control for the relaxation itself).') + # One rank-one restoration climb per call moved into an existing rank-48 idle child. + H5 = Counter(H) + H5[1] -= N + H5[48] -= N + H5[49] += N + require(idle_ranks[48] >= N, 'enough rank-48 children') + add('exchange_merge_rank1_into_48', +H5, False, + description='Relaxation: per call, one rank-one climb is removed and its coordinate joins an ' + 'existing rank-48 idle child (48 -> 49; halving 2*49^2 < 73^2). Every selected window ' + 'has capacity at most 48 and every rank-48 child fills a whole idle window, so no ' + 're-hosting realizes this; it over-estimates one deferred rank-one climb per call.') + H6 = Counter(H) + H6[1] -= N + out['zero_cost_delete_rank1'] = dict( + profile=counter_json(+H6), rank_mass=rank_mass(H6), rank_mass_neutral=False, + realizable_in_selected_windows=False, + description='PR974-style relaxation: one rank-one child per call deleted with zero parent ' + 'cost. It leaves N live coordinates unadvanced; priced only for comparison.') + single = {} + for i in positive: + Hi, rem, _ = window_deferral(template, local_profile, restoration, {i}) + single[i] = Hi + return out, single, positive, restoration + + +def main(): + target = sys.argv[1] + t37, template, local, local_profile, H = census('T37') + t21 = census('T21')[0] + rows, single, positive, restoration = scenarios(template, local, local_profile, H) + changed = {str(i): counter_json(Hi) for i, Hi in single.items() if Hi != H} + result = dict(status='PASS_T37_RESTORATION_CENSUS', base_commit=SOURCES['base_commit'], + T37=t37, T21=dict(construction='T21', coverage=t21['coverage'], identity=t21['identity']), + helper_restoration={str(i): restoration[i] for i in sorted(restoration)}, + positive_restoration_helpers=positive, + scenarios=rows, + single_helper_profiles=changed, + single_helper_unchanged=sorted(int(i) for i in single if single[i] == H)) + with open(target, 'w') as f: + f.write(canonical(result)) + print(result['status']) + for role, s in t37['local']['roles'].items(): + print(f"{role:7s} restoration mass {s['restoration_mass']:4d} in {s['positive_restoration']:3d} registers, " + f"{s['positive_restoration_touched_by_full_cleanup']:3d} touched by full-frame cleanup") + print('T37 coverage', t37['coverage']['coverage_values'], 'deficit', t37['coverage']['deficit'], + '| T21 coverage', t21['coverage']['coverage_values'], 'deficit', t21['coverage']['deficit']) + + +if __name__ == '__main__': + main() diff --git a/research/t37-restoration-deferral/common.py b/research/t37-restoration-deferral/common.py new file mode 100644 index 0000000000..144323b941 --- /dev/null +++ b/research/t37-restoration-deferral/common.py @@ -0,0 +1,383 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Shared, standard-library-only helpers for the T37 restoration-deferral note. + +Nothing here imports producer, auditor or checker code from the selected +packages. Inputs are read directly from the committed, hash-pinned replay +archives without extracting them to disk. +""" +import gzip +import hashlib +import json +import tarfile +from collections import Counter, defaultdict +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[2] +HERE = Path(__file__).resolve().parent + +SOURCES = json.loads((HERE / 'SOURCES.json').read_text()) + + +def sha256(data): + return hashlib.sha256(data).hexdigest() + + +def require(ok, message): + if not ok: + raise ValueError(message) + + +def canonical(obj): + return json.dumps(obj, indent=1, sort_keys=True) + '\n' + + +def read_member(archive, member, payload_sha256): + """Return the decompressed JSON payload of one gzip member of a pinned tar archive.""" + with tarfile.open(archive, 'r:gz') as tar: + info = tar.getmember(member) + require(info.isfile(), f'{member} is not a regular file') + payload = gzip.decompress(tar.extractfile(info).read()) + require(sha256(payload) == payload_sha256, f'{member}: payload digest mismatch') + return json.loads(payload) + + +def bound_member(name, template_key, member_key, container_key, payload_key, template, root=ROOT): + """A gzip JSON member whose container digest is bound by the hosted template.""" + src = SOURCES['constructions'][name] + with tarfile.open(Path(root) / src['archive'], 'r:gz') as tar: + info = tar.getmember(src[member_key]) + require(info.isfile(), f'{src[member_key]} is not a regular file') + container = tar.extractfile(info).read() + (prov,) = template['local_providers'].values() + require(sha256(container) == src[container_key] == prov[template_key], + f'{name}: {src[member_key]} is not the one bound by the hosted template') + payload = gzip.decompress(container) + require(sha256(payload) == src[payload_key], f'{name}: {src[member_key]} payload digest mismatch') + return json.loads(payload) + + +def load_canonical(name, template, root=ROOT): + return bound_member(name, 'canonical_word_sha256', 'canonical_member', 'canonical_container_sha256', + 'canonical_payload_sha256', template, root) + + +def archive_text(name, member_key, digest_key, root=ROOT): + src = SOURCES['constructions'][name] + with tarfile.open(Path(root) / src['archive'], 'r:gz') as tar: + data = tar.extractfile(tar.getmember(SOURCES['outer_witness'][member_key])).read() + require(sha256(data) == SOURCES['outer_witness'][digest_key], 'outer witness source digest') + return data.decode() + + +def load_programs(name, template, root=ROOT): + """Emitted forward/backward local programs, bound to the hosted template by container digest.""" + src = SOURCES['constructions'][name] + archive = Path(root) / src['archive'] + with tarfile.open(archive, 'r:gz') as tar: + info = tar.getmember(src['program_member']) + require(info.isfile(), 'program member is not a regular file') + container = tar.extractfile(info).read() + (prov,) = template['local_providers'].values() + require(sha256(container) == src['program_container_sha256'] == prov['local_programs_sha256'], + f'{name}: program container is not the one bound by the hosted template') + payload = gzip.decompress(container) + require(sha256(payload) == src['program_payload_sha256'], f'{name}: program payload digest mismatch') + return json.loads(payload) + + +def emitted_restoration(programs): + """Rank profile of the emitted 'final' climbs and the phase order, per orientation.""" + out = {} + for orientation in ('forward', 'backward'): + prog = programs[orientation] + phases = [e[1] for e in prog if e[0] == 'phase'] + final = Counter(e[5] for e in prog if e[0] == 'climb' and e[1] == 'final') + climbs = Counter(e[5] for e in prog if e[0] == 'climb') + centres = sum(1 for e in prog if e[0] == 'center') + out[orientation] = dict(phases=phases, final=final, climbs=climbs, centres=centres) + return out + + +def load_construction(name, root=ROOT): + """Load the hosted global template and the local U8 word of a pinned construction.""" + src = SOURCES['constructions'][name] + archive = Path(root) / src['archive'] + require(sha256(archive.read_bytes()) == src['archive_sha256'], f'{name}: archive digest mismatch') + template = read_member(archive, src['template_member'], src['template_payload_sha256']) + word = read_member(archive, src['word_member'], src['word_payload_sha256']) + return template, word + + +# --------------------------------------------------------------------------- +# Local frame semantics (monotone nested F2^h frames). + +class Span: + """A subspace of F2^h held as a list of basis vectors in reduced echelon form.""" + __slots__ = ('basis',) + + def __init__(self, vectors=()): + self.basis = [] + for x in vectors: + self.insert(x) + + def residue(self, x): + for b in self.basis: # basis sorted by decreasing leading bit + if x ^ b < x: + x ^= b + return x + + def insert(self, x): + x = self.residue(x) + if not x: + return False + lead = x.bit_length() - 1 + self.basis = [b ^ x if (b >> lead) & 1 else b for b in self.basis] + self.basis.append(x) + self.basis.sort(reverse=True) + return True + + @property + def rank(self): + return len(self.basis) + + def within(self, other): + return all(other.residue(b) == 0 for b in self.basis) + + def same(self, other): + return self.rank == other.rank and self.within(other) + + +def hyperplane(port, h): + """{x in F2^h : = 0}.""" + require(0 < port < 1 << h, 'port out of range') + vectors = [x for x in (1 << i for i in range(h))] + pivot = port & -port + out = [] + for x in vectors: + if x == pivot: + continue + out.append(x ^ (pivot if bin(x & port).count('1') % 2 else 0)) + U = Span(out) + require(U.rank == h - 1, 'hyperplane rank') + return U + + +def gate_registers(g): + return list(g[1:3]) if g[0] == 'add' else list(g[1:2]) + + +def canonical_restoration(cw): + """Per-register restoration climbs of the template's canonical provider word. + + The canonical word indexes its frames through cw['frames'] and numbers its + registers as the hosted template does, so its helper k is the template's + pooled_slots helper k. Same semantics as restoration_census. + """ + h = cw['h'] + F = [Span(f) for f in cw['frames']] + full = Span([1 << i for i in range(h)]) + require(not cw['target_levels'], 'canonical word has target levels') + frame = [F[i] for i in cw['start']] + + def climb(q, U): + require(frame[q].within(U), f'canonical word: non-monotone frame for register {q}') + frame[q] = U + + for g in cw['A']: + for q in gate_registers(g): + climb(q, F[g[-1]]) + for q, i in zip(cw['centers'], cw['center_frames']): + require(frame[q].same(F[i]), 'canonical word: centre frame at the cut') + for g in cw['B'] + cw['tail']: + for q in gate_registers(g): + climb(q, F[g[-1]]) + restoration = [] + for q, i in enumerate(cw['final']): + restoration.append(F[i].rank - frame[q].rank) + climb(q, F[i]) + for g in cw['cleanup']: + require(F[g[-1]].same(full), 'canonical cleanup gate is not full-frame') + return restoration + + +def restoration_census(word): + """Replay the literal frame chains of a local word. + + Returns the paid child profile, the width inventory, and for every register + its start/end ranks, its final restoration climb (the climb from its last + gate frame to its endpoint frame) and the number of full-frame cleanup + gates that touch it. + """ + rep = word['report'] + h, v, R = rep['h'], rep['v'], rep['R'] + n = 2 * v + R + require(not word['target_levels'], 'this replay assumes empty target levels') + full = Span([1 << i for i in range(h)]) + frame = [Span([p]) for p in word['ports']] + [Span() for _ in range(v + R)] + for q, U in word['start_extra'].items(): + frame[int(q)] = Span(U) + start = [f.rank for f in frame] + paid = Counter() + phase_mass = Counter() + + def climb(q, U, phase): + require(frame[q].within(U), f'non-monotone frame for register {q} in {phase}') + step = U.rank - frame[q].rank + if step: + paid[step] += 1 + phase_mass[phase] += step + frame[q] = U + + for g in word['A']: + for q in gate_registers(g): + climb(q, Span(g[-1]), 'A') + centre_children = Counter() + for q, U in zip(word['centers'], word['center_frames']): + U = Span(U) + require(frame[q].same(U), 'centre frame at the cut') + if any(g[2] == q for g in word['cut']): + centre_children[U.rank] += 1 + paid.update(centre_children) + for g in word['B']: + for q in gate_registers(g): + climb(q, Span(g[-1]), 'B') + early = {} + for i, U in word['early_cleanup']: + early[i] = U + for q in gate_registers(word['cleanup'][i]): + climb(q, Span(U), 'early_cleanup') + end = [full] * v + [hyperplane(p, h) for p in word['ports']] + [full] * R + for q, U in word['helper_final'].items(): + end[int(q)] = Span(U) + before_final = [f.rank for f in frame] + for q in range(n): + climb(q, end[q], 'final') + full_touch = Counter() + for i, g in enumerate(word['cleanup']): + if i in early: + continue + require(Span(g[-1]).same(full), 'non-early cleanup gate is not full-frame') + for q in gate_registers(g): + require(end[q].same(full), 'full-frame cleanup touches a low end') + full_touch[q] += 1 + registers = [] + for q in range(n): + role = 'source' if q < v else 'target' if q < 2 * v else 'helper' + registers.append(dict(register=q, role=role, start=start[q], end=end[q].rank, + restoration=end[q].rank - before_final[q], + low_end=str(q) in word['helper_final'], + full_cleanup_gates=full_touch[q])) + widths = Counter(r['end'] - r['start'] for r in registers if r['role'] == 'helper') + return dict(h=h, v=v, R=R, paid=paid, centre_children=centre_children, + phase_mass=phase_mass, widths=widths, registers=registers) + + +# --------------------------------------------------------------------------- +# Global coverage semantics of the hosted nine-stage template. + +def coverage_census(template, local_mass, data_step): + """Per-family coordinate coverage of every live family. + + data_step is the paid frame climb of one data register per incidence, + taken from the local word; the identity checked is + data_step*k_f + 1 + hosted_f + idle_f = m for every live family f. + """ + W, m = template['live'], template['m'] + provider = template['local_providers'] + require(len(provider) == 1, 'one local provider expected') + (pid, prov), = provider.items() + v, R, widths = prov['v'], prov['R'], prov['widths'] + require(len(widths) == R, 'width list') + k, hosted = Counter(), Counter() + for call in template['calls']: + require(call['provider_id'] == pid, 'provider dispatch') + owners = call['owners'] + require(len(owners) == 2 * v + R, 'owner count') + for i, (family, route) in enumerate(owners): + require((route[0] == 1) == (i < 2 * v), 'data routes are exactly the data registers') + if i < 2 * v: + k[family] += 1 + else: + hosted[family] += widths[i - 2 * v] + pooled = Counter() + for s in template['hosting']['pooled_slots']: + require(widths[s['helper']] == s['width'], 'pooled slot width') + pooled[s['family']] += s['width'] + require(pooled == hosted, 'pooled slots differ from call owners') + idle = Counter() + for c in template['idle_children']: + require(c['replicas'] == 1 and c['rank'] > 0, 'idle child shape') + idle[c['family']] += c['rank'] + outside = [f for f in set(k) | set(hosted) | set(idle) if not 0 <= f < W] + require(not outside, 'coverage outside the live families') + values = Counter(data_step * k[f] + 1 + hosted[f] + idle[f] for f in range(W)) + N = len(template['calls']) + idle_mass = sum(idle.values()) + total = N * local_mass + idle_mass + centres = template['private_namespace']['centers'] + return dict(live=W, m=m, calls=N, v=v, R=R, + coverage_values={str(x): n for x, n in sorted(values.items())}, + data_incidences_per_family={str(x): n for x, n in sorted(Counter(k[f] for f in range(W)).items())}, + data_coordinates=data_step * sum(k.values()) + W, + hosted_coordinates=sum(hosted.values()), + idle_coordinates=idle_mass, + total_rank_mass=total, + deficit=m * W - total, + private_centre_families=centres) + + +def global_profile(template, local_profile): + H = Counter() + for _ in template['calls']: + H.update(local_profile) + for c in template['idle_children']: + H[c['rank']] += 1 + return H + + +# --------------------------------------------------------------------------- +# Restoration deferral: the explicit mechanism and its complete recurrence. + +def window_deferral(template, local_profile, restoration_by_helper, chosen): + """Profile after deferring the restoration climbs of the chosen helper indices. + + Each deferred climb of rank d leaves the local profile. Its d host + coordinates are returned to the pending set of the same hosting window + (family, idle child), where they are advanced by that window's idle child. + Coordinates returned to one window form one child, merged with any + existing remainder of that window. Rank mass is unchanged by construction. + """ + H = global_profile(template, local_profile) + remainder = {(c['family'], c['child']): c['rank'] for c in template['idle_children']} + returned = defaultdict(int) + removed = Counter() + for s in template['hosting']['pooled_slots']: + d = restoration_by_helper[s['helper']] + if s['helper'] in chosen and d > 0: + returned[(s['family'], s['child'])] += d + removed[d] += 1 + H.subtract(removed) + for w, d in returned.items(): + r0 = remainder.get(w, 0) + if r0: + H[r0] -= 1 + H[r0 + d] += 1 + H = +H + return H, removed, Counter(returned.values()) + + +def concentrated(H, removed, idle_ranks, cap): + """Free-concentration relaxation: all idle coordinates in children of rank cap.""" + out = Counter(H) + out.subtract(removed) + out.subtract(idle_ranks) + mass = sum(r * n for r, n in idle_ranks.items()) + sum(r * n for r, n in removed.items()) + q, r = divmod(mass, cap) + out[cap] += q + if r: + out[r] += 1 + return +out + + +def rank_mass(H): + return sum(int(r) * n for r, n in H.items()) diff --git a/research/t37-restoration-deferral/price.py b/research/t37-restoration-deferral/price.py new file mode 100644 index 0000000000..6805a3fbda --- /dev/null +++ b/research/t37-restoration-deferral/price.py @@ -0,0 +1,172 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Exact prices of the census scenarios with the pinned rational engines. + +kappa() is a transcription of outer_witness in the T37 archive's runtime/code/assemble.py; +check_transcription() binds it to that file's digest and to the literal lines it transcribes. + +Usage: price.py CENSUS.json OUT.json + +The complex endpoint b of a profile is accepted by both pinned interval +engines at b and rejected at b + 10^-24. kappa is the largest 10^-18 grid +point accepted by the selected T37 outer witness (seven bootstrap steps and +all 47 strict inequalities), and the next grid point must be rejected. +The baseline must reproduce the selected record exactly. +""" +import importlib.util +import json +import sys +from decimal import Decimal, localcontext +from fractions import Fraction as Q + +from common import ROOT, SOURCES, archive_text, canonical, require, sha256 + +M_COMPLEX = 73 + + +def engine(name): + path = ROOT / SOURCES['engines']['directory'] / (name + '.py') + require(sha256(path.read_bytes()) == SOURCES['engines'][name + '.py'], f'engine pin {name}') + spec = importlib.util.spec_from_file_location('pinned_' + name, path) + mod = importlib.util.module_from_spec(spec) + spec.loader.exec_module(mod) + return mod + + +MOMENT, BASE_TWO, OUTER = engine('moment'), engine('base_two_moment'), engine('outer') +OW = SOURCES['outer_witness'] +BIT = Q(OW['bit_lower']) +ETA, BETA = Q(OW['eta']), Q(OW['beta']) +GRID = 10 ** 18 +BRIDGE = {'semantic': {'C0': {'base': 2, 'exponent': 210000}, 'strict_literal_gap': 1}, + 'rows': {'degree_gap': Q(10 ** 6) - Q(51 * 20161, 25)}} + + +def dec(x, prec=40): + with localcontext() as ctx: + ctx.prec = prec + return str(Decimal(x.numerator) / Decimal(x.denominator)) + + +def endpoint(H, W): + """Certified complex lower endpoint on the 10^-24 grid (native recurrence, no surcharge).""" + b = Q(MOMENT.certify(H, M_COMPLEX, W, False)['lower']) + for z, accept in ((b, True), (b + Q(1, 10 ** 24), False)): + lo, hi = MOMENT.moment(H, M_COMPLEX, W, z, False) + blo, bhi = BASE_TWO.moment(M_COMPLEX, W, list(H.items()), z) + require((hi < 1 and bhi < 1) if accept else (lo > 1 and blo > 1), 'endpoint certification') + return b + + +def check_transcription(): + text = archive_text('T37', 'source_member', 'source_sha256') + for line in ("eta=beta=Q(1,10**24);s=min(c,(1-beta)*bb)-Q(1,10**27)", + "chain=[Q(384599,10**10)];cuts=[]", "for _ in range(7):", + "old=chain[-1];a=(1-s)*s+s*old;gap=min(s-a,1-a-s,1-a-s*(1-old),1-s)", + "q=chain[-1]*(1-2*eta);margin=(1-eta)*q/(1+q);ticks=margin*10**18;" + "k=Q((ticks.numerator-1)//ticks.denominator,10**18)", + "bridge={'semantic':{'C0':{'base':2,'exponent':210000},'strict_literal_gap':1}," + "'rows':{'degree_gap':Q(10**6)-Q(51*20161,25)}}"): + require(line in text, 'transcribed outer_witness line not found: ' + line) + + +def kappa(b): + """Replays outer_witness of the selected T37 assembly for complex endpoint b.""" + s = min(BIT, (1 - BETA) * b) - Q(1, 10 ** 27) + require(0 < s < BIT and s < (1 - BETA) * b, 'effective saving') + chain = [Q(OW['bootstrap_start'])] + for _ in range(OW['bootstrap_steps']): + old = chain[-1] + a = (1 - s) * s + s * old + gap = min(s - a, 1 - a - s, 1 - a - s * (1 - old), 1 - s) + require(old < a < s < 1 - a and gap > 0, 'bootstrap step') + chain.append(a) + q = chain[-1] * (1 - 2 * ETA) + margin = (1 - ETA) * q / (1 + q) + ticks = margin * GRID + k = Q((ticks.numerator - 1) // ticks.denominator, GRID) + out = OUTER.assembly(chain[-1], b, BRIDGE, k, eta=ETA, beta=BETA) + require(len(out['strict_constraints']) == 47 and all(v > 0 for v in out['strict_constraints'].values()), + 'outer inequalities') + try: + OUTER.assembly(chain[-1], b, BRIDGE, k + Q(1, GRID), eta=ETA, beta=BETA) + except AssertionError: + pass + else: + raise ValueError('next kappa grid point accepted') + return k, ('bit' if BIT <= (1 - BETA) * b else 'complex') + + +def drop(H0, H, W, b): + """60-digit Decimal value of moment(H0) - moment(H) at exponent b, times m*W (ranking only).""" + with localcontext() as ctx: + ctx.prec = 60 + bd = Decimal(b.numerator) / Decimal(b.denominator) + g = lambda P: sum(Decimal(r * n) * ((Decimal(M_COMPLEX) / Decimal(r)).ln() * bd).exp() + for r, n in P.items()) + return g(H0) - g(H) + + +def main(): + check_transcription() + census = json.loads(open(sys.argv[1]).read()) + W = census['T37']['coverage']['live'] + selected = json.loads((ROOT / SOURCES['selected_record']['path']).read_text()) + assembly = json.loads((ROOT / SOURCES['constructions']['T37']['assembly']).read_text()) + require(Q(assembly['bit_lower']) == BIT, 'bit endpoint differs from the selected assembly') + rows = {} + for key, row in census['scenarios'].items(): + H = {int(r): n for r, n in row['profile'].items()} + b = endpoint(H, W) + k, binding = kappa(b) + rows[key] = dict(complex_lower=str(b), complex_decimal=dec(b), kappa=str(k), kappa_decimal=dec(k), + binding=binding, rank_mass_neutral=row['rank_mass_neutral'], + realizable_in_selected_windows=row['realizable_in_selected_windows'], + rank_mass=row['rank_mass']) + base = rows['baseline'] + require(base['complex_lower'] == assembly['complex_lower'], 'baseline complex endpoint differs from selected') + require(base['kappa'] == selected['kappa'] == SOURCES['selected_record']['kappa'], 'baseline kappa differs') + k0 = Q(base['kappa']) + for row in rows.values(): + dk = Q(row['kappa']) - k0 + row['kappa_gain'] = dec(dk) + row['kappa_gain_percent'] = dec(100 * dk / k0, 12) + # Single-helper deferrals: rank by a 60-digit proxy, certify the best one exactly. + H0 = {int(r): n for r, n in census['scenarios']['baseline']['profile'].items()} + b0 = Q(base['complex_lower']) + singles = [] + for i, prof in census['single_helper_profiles'].items(): + singles.append((drop(H0, {int(r): n for r, n in prof.items()}, W, b0), int(i))) + singles.sort(reverse=True) + best_gain, best = singles[0] + Hb = {int(r): n for r, n in census['single_helper_profiles'][str(best)].items()} + bb = endpoint(Hb, W) + kb, _ = kappa(bb) + joint = drop(H0, {int(r): n for r, n in census['scenarios']['defer_all_selected_hosting']['profile'].items()}, + W, b0) + with localcontext() as ctx: + ctx.prec = 60 + total_single = sum(x for x, _ in singles) + q = lambda x, e: str(x.quantize(Decimal(e))) + single = dict(changed_profiles=len(singles), unchanged=len(census['single_helper_unchanged']), + best_helper=best, best_moment_drop_times_mW=q(best_gain, '1e-12'), + sum_of_single_moment_drops_times_mW=q(total_single, '1e-9'), + joint_moment_drop_times_mW=q(joint, '1e-9'), + best_complex_lower=str(bb), best_kappa=str(kb), best_kappa_decimal=dec(kb), + best_kappa_gain=dec(kb - k0), best_kappa_gain_percent=dec(100 * (kb - k0) / k0, 12), + ranking='60-digit Decimal drop of m*W*moment at the baseline endpoint; ' + 'only the best row is certified exactly', + top10=[dict(helper=i, moment_drop_times_mW=q(x, '1e-12')) for x, i in singles[:10]]) + result = dict(status='PASS_T37_RESTORATION_PRICES', base_commit=SOURCES['base_commit'], + engines={k: v for k, v in SOURCES['engines'].items() if k.endswith('.py')}, + bit_lower=OW['bit_lower'], scenarios=rows, single_helper_deferral=single) + with open(sys.argv[2], 'w') as f: + f.write(canonical(result)) + print(result['status']) + for key, row in rows.items(): + print(f"{key:32s} b {row['complex_decimal'][:22]} kappa {row['kappa_decimal'][:21]} " + f"gain {row['kappa_gain_percent'][:9]}% {row['binding']}") + print(f"best single helper {best}: kappa {single['best_kappa_decimal'][:21]} gain {single['best_kappa_gain_percent'][:10]}%") + + +if __name__ == '__main__': + main() diff --git a/research/t37-restoration-deferral/test_package.py b/research/t37-restoration-deferral/test_package.py new file mode 100644 index 0000000000..a4fadabd10 --- /dev/null +++ b/research/t37-restoration-deferral/test_package.py @@ -0,0 +1,151 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Unit tests for the T37 restoration-deferral note. + +Run: python3 -B -m unittest discover -s research/t37-restoration-deferral -p test_package.py -v +""" +import json +import sys +import unittest +from collections import Counter +from pathlib import Path + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) + +from common import (Span, concentrated, coverage_census, hyperplane, load_construction, rank_mass, + restoration_census, window_deferral) + +FULL3 = [0b100, 0b010, 0b001] + + +def toy_word(): + """h=3, one source (port 001), one target, two helpers; helper 3 is a low end.""" + return dict(report=dict(h=3, v=1, R=2), ports=[0b001], start_extra={}, + A=[['add', 0, 2, 1, 1, [0b001, 0b010]]], centers=[], center_frames=[], cut=[], + B=[['add', 3, 1, 1, 1, [0b010]]], early_cleanup=[], + cleanup=[['add', 0, 2, -1, 1, FULL3]], helper_final={'3': [0b010]}, target_levels={}) + + +def toy_template(): + """Two calls; helper 0 is hosted twice in one window, helper 1 in two windows, + helper 2 in a window that already has an idle remainder of rank 3.""" + slots = [dict(helper=0, family=2, child=0, width=2), dict(helper=0, family=2, child=0, width=2), + dict(helper=1, family=3, child=1, width=1), dict(helper=1, family=4, child=2, width=1), + dict(helper=2, family=5, child=3, width=2), dict(helper=2, family=5, child=3, width=2)] + return dict(calls=[{}, {}], hosting=dict(pooled_slots=slots), + idle_children=[dict(family=5, child=3, rank=3, replicas=1)]) + + +class SpanTests(unittest.TestCase): + def test_rank_and_containment(self): + U = Span([0b011, 0b001, 0b011]) + self.assertEqual(U.rank, 2) + self.assertTrue(Span([0b010]).within(U)) + self.assertFalse(Span([0b100]).within(U)) + self.assertTrue(Span([0b001, 0b010]).same(U)) + + def test_hyperplane_is_orthogonal_complement(self): + for p in range(1, 1 << 5): + U = hyperplane(p, 5) + self.assertEqual(U.rank, 4) + self.assertTrue(all(bin(b & p).count('1') % 2 == 0 for b in U.basis)) + + +class RestorationTests(unittest.TestCase): + def test_toy_word(self): + r = restoration_census(toy_word()) + self.assertEqual(r['paid'], Counter({1: 6, 2: 1})) + regs = r['registers'] + self.assertEqual([x['restoration'] for x in regs], [1, 1, 1, 0]) + self.assertEqual([x['full_cleanup_gates'] for x in regs], [1, 0, 1, 0]) + self.assertTrue(regs[3]['low_end']) + self.assertEqual(r['widths'], Counter({3: 1, 1: 1})) + + def test_non_monotone_frame_rejected(self): + w = toy_word() + w['B'].append(['add', 2, 3, 1, 1, [0b100]]) # helper 2 sits at rank 2 and cannot drop to <100> + with self.assertRaisesRegex(ValueError, 'non-monotone'): + restoration_census(w) + + def test_target_levels_rejected(self): + w = toy_word() + w['target_levels'] = {'1': 1} + with self.assertRaisesRegex(ValueError, 'target levels'): + restoration_census(w) + + def test_full_cleanup_on_low_end_rejected(self): + w = toy_word() + w['cleanup'].append(['add', 3, 0, 1, 1, FULL3]) + with self.assertRaisesRegex(ValueError, 'low end'): + restoration_census(w) + + +class DeferralTests(unittest.TestCase): + local = Counter({1: 2, 2: 1, 4: 1}) + restoration = {0: 1, 1: 1, 2: 2} + + def run_case(self, chosen): + H, removed, _ = window_deferral(toy_template(), self.local, self.restoration, chosen) + base, _, _ = window_deferral(toy_template(), self.local, self.restoration, set()) + self.assertEqual(rank_mass(H), rank_mass(base)) + return H, base + + def test_isolated_deferral_is_shape_neutral(self): + H, base = self.run_case({1}) + self.assertEqual(H, base) + + def test_same_window_deferrals_merge(self): + H, base = self.run_case({0}) + self.assertEqual(base - H, Counter({1: 2})) + self.assertEqual(H - base, Counter({2: 1})) + + def test_existing_remainder_absorbs(self): + H, base = self.run_case({2}) + self.assertEqual(base - H, Counter({2: 2, 3: 1})) + self.assertEqual(H - base, Counter({7: 1})) + + def test_concentration_preserves_mass(self): + H = Counter({1: 5, 48: 2}) + out = concentrated(H, Counter({1: 3}), Counter({48: 2}), 48) + self.assertEqual(rank_mass(out), rank_mass(H)) + self.assertEqual(out, Counter({1: 2, 48: 2, 3: 1})) + + +class CoverageTests(unittest.TestCase): + def template(self): + prov = dict(v=1, R=2, widths=[2, 1]) + call = dict(provider_id='p', owners=[[0, [1, 0, 0]], [1, [1, 1, 0]], [2, [3, 0, 0]], [3, [4, 0, 0]]]) + return dict(live=4, m=5, local_providers={'p': prov}, calls=[call], + hosting=dict(pooled_slots=[dict(helper=0, family=2, width=2), dict(helper=1, family=3, width=1)]), + idle_children=[dict(family=0, rank=2, replicas=1), dict(family=1, rank=2, replicas=1), + dict(family=2, rank=2, replicas=1), dict(family=3, rank=3, replicas=1)], + private_namespace=dict(centers=[4, 5])) + + def test_identity_and_failure(self): + cov = coverage_census(self.template(), local_mass=7, data_step=2) + self.assertEqual(cov['coverage_values'], {'5': 4}) + t = self.template() + t['idle_children'][3]['rank'] = 2 + self.assertEqual(coverage_census(t, 7, 2)['coverage_values'], {'4': 1, '5': 3}) + + +class SelectedDataTests(unittest.TestCase): + def test_t37_census_claims(self): + template, word = load_construction('T37') + local = restoration_census(word) + pos = [r for r in local['registers'] if r['restoration'] > 0] + self.assertEqual(sum(r['restoration'] for r in pos if r['role'] == 'helper'), 636) + self.assertEqual(sum(r['restoration'] for r in pos if r['role'] == 'source'), 230) + self.assertTrue(all(r['full_cleanup_gates'] > 0 for r in pos)) + cov = coverage_census(template, rank_mass(local['paid']), 8) + self.assertEqual(cov['coverage_values'], {'73': 33152}) + self.assertEqual(cov['deficit'], 33152 - 64 * 333) + + def test_committed_baseline_is_selected(self): + prices = json.loads((HERE / 'PRICES.json').read_text()) + selected = json.loads((HERE.parents[1] / 'certificates/selected-result.json').read_text()) + self.assertEqual(prices['scenarios']['baseline']['kappa'], selected['kappa']) + + +if __name__ == '__main__': + unittest.main() diff --git a/research/t37-restoration-deferral/verify.py b/research/t37-restoration-deferral/verify.py new file mode 100644 index 0000000000..56aeed2281 --- /dev/null +++ b/research/t37-restoration-deferral/verify.py @@ -0,0 +1,190 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Replay the T37 restoration-deferral note and its negative controls. + +Usage: python3 -B research/t37-restoration-deferral/verify.py --work NEW_EMPTY_DIR + +Runs census.py and price.py into the new work directory, requires their +outputs to equal the committed CENSUS.json and PRICES.json, and checks that +every negative control is rejected for its stated reason. +Expected last line: PASS_T37_RESTORATION_DEFERRAL_REPLAY +""" +import argparse +import copy +import json +import subprocess +import sys +from collections import Counter +from pathlib import Path + +from common import (HERE, ROOT, SOURCES, coverage_census, gate_registers, load_construction, rank_mass, + read_member, require, restoration_census, window_deferral) + + +def run(script, *args): + proc = subprocess.run([sys.executable, '-B', str(HERE / script), *map(str, args)], + cwd=HERE, capture_output=True, text=True) + sys.stdout.write(proc.stdout) + require(proc.returncode == 0, f'{script} failed:\n{proc.stderr}') + + +def same_json(a, b): + return json.loads(Path(a).read_text()) == json.loads(Path(b).read_text()) + + +def rejects(name, fn, reason): + try: + fn() + except ValueError as exc: + require(reason in str(exc), f'control {name} rejected for another reason: {exc}') + return name + raise SystemExit(f'FAIL control {name} was accepted') + + +def consumed_by_cleanup(local): + """The note's claim: every positive restoration climb is consumed by full-frame cleanup.""" + for r in local['registers']: + if r['restoration'] > 0: + require(r['full_cleanup_gates'] > 0, f"unconsumed restoration climb at register {r['register']}") + return True + + +def controls(): + template, word = load_construction('T37') + local = restoration_census(word) + local_mass = rank_mass(local['paid']) + W = template['live'] + passed = [] + + def coverage_with(mutate): + t = copy.copy(template) + t['idle_children'] = copy.deepcopy(template['idle_children']) + mutate(t) + cov = coverage_census(t, local_mass, 8) + require(cov['coverage_values'] == {'73': W}, 'coverage identity fails') + + big = next(i for i, c in enumerate(template['idle_children']) if c['rank'] == 48) + passed.append(rejects('C1_idle_child_dropped', + lambda: coverage_with(lambda t: t['idle_children'].pop(big)), 'coverage identity fails')) + passed.append(rejects('C2_idle_child_rank_47', + lambda: coverage_with(lambda t: t['idle_children'][big].update(rank=47)), + 'coverage identity fails')) + passed.append(rejects('C3_idle_child_duplicated', + lambda: coverage_with(lambda t: t['idle_children'].append(dict(t['idle_children'][big]))), + 'coverage identity fails')) + # C4: delete every full-frame cleanup gate touching one restoration helper. + victim = next(r['register'] for r in local['registers'] if r['role'] == 'helper' and r['restoration'] > 0) + early = {i for i, _ in word['early_cleanup']} + w2 = dict(word) + keep, remap = [], {} + for i, g in enumerate(word['cleanup']): + if i in early or victim not in gate_registers(g): + remap[i] = len(keep) + keep.append(g) + w2['cleanup'] = keep + w2['early_cleanup'] = [[remap[i], U] for i, U in word['early_cleanup']] + passed.append(rejects('C4_cleanup_removed_for_one_helper', + lambda: consumed_by_cleanup(restoration_census(w2)), 'unconsumed restoration climb')) + # C5: a 'deferral' that drops the returned coordinates is not coverage preserving. + restoration = {r['register'] - 2 * local['v']: r['restoration'] for r in local['registers'] if r['role'] == 'helper'} + H, removed, _ = window_deferral(template, local['paid'], restoration, {9}) + base = Counter() + for _ in template['calls']: + base.update(local['paid']) + for c in template['idle_children']: + base[c['rank']] += 1 + zero_cost = base - removed + + def mass_neutral(P): + require(rank_mass(P) == rank_mass(base), 'deferral changes rank mass') + mass_neutral(H) + passed.append(rejects('C5_zero_cost_deletion', lambda: mass_neutral(zero_cost), 'deferral changes rank mass')) + # C6: a corrupted payload pin is rejected before parsing. + src = SOURCES['constructions']['T37'] + passed.append(rejects('C6_payload_pin', lambda: read_member(ROOT / src['archive'], src['word_member'], '0' * 64), + 'payload digest mismatch')) + # C7: a child above the halving cap is rejected by the scenario guard. + def halving(P): + require(73 * 73 > 2 * max(P) ** 2, 'halving guard') + halving(Counter({48: 1})) + passed.append(rejects('C7_halving_cap', lambda: halving(Counter({52: 1})), 'halving guard')) + return passed + + +def price_controls(): + sys.path.insert(0, str(HERE)) + import price + from fractions import Fraction as Q + census = json.loads((HERE / 'CENSUS.json').read_text()) + W = census['T37']['coverage']['live'] + H0 = {int(r): n for r, n in census['scenarios']['baseline']['profile'].items()} + passed = [] + b0 = price.endpoint(H0, W) + # C8: at the next complex grid point both engines put the moment above one. + z = b0 + Q(1, 10 ** 24) + lo, hi = price.MOMENT.moment(H0, 73, W, z, False) + blo, bhi = price.BASE_TWO.moment(73, W, list(H0.items()), z) + require(lo > 1 and blo > 1, 'both engines must exceed one at the next endpoint') + + def accept_next(): + require(hi < 1 or bhi < 1, 'next complex endpoint rejected by both engines') + passed.append(rejects('C8_next_complex_endpoint', accept_next, 'next complex endpoint rejected by both engines')) + # C9: one extra rank-one child changes the baseline kappa, so the selected pin would fail. + H1 = dict(H0) + H1[1] += 1 + k1, _ = price.kappa(price.endpoint(H1, W)) + def pin(): + require(str(k1) == SOURCES['selected_record']['kappa'], 'baseline kappa differs') + passed.append(rejects('C9_perturbed_baseline', pin, 'baseline kappa differs')) + return passed + + +def float_crosscheck(census_path, prices_path): + """Double-precision bisection that shares no code with the pinned engines.""" + import math + census = json.loads(Path(census_path).read_text()) + prices = json.loads(Path(prices_path).read_text()) + W, m = census['T37']['coverage']['live'], 73 + bit = float(prices['bit_lower'].split('/')[0]) / float(prices['bit_lower'].split('/')[1]) + for key, row in census['scenarios'].items(): + H = {int(r): n for r, n in row['profile'].items()} + f = lambda a: sum(r * n / (m * W) * math.exp(a * math.log(m / r)) for r, n in H.items()) - 1 + lo, hi = 0.0, 0.01 + for _ in range(200): + mid = (lo + hi) / 2 + lo, hi = (mid, hi) if f(mid) < 0 else (lo, mid) + exact = prices['scenarios'][key] + s = min(bit, lo) + require(abs(lo - float(exact['complex_decimal'])) < 1e-13, f'{key}: float endpoint disagrees') + require(abs(s / (1 + s) - float(exact['kappa_decimal'])) < 1e-13, f'{key}: float kappa disagrees') + best = prices['single_helper_deferral'] + H = {int(r): n for r, n in census['single_helper_profiles'][str(best['best_helper'])].items()} + f = lambda a: sum(r * n / (m * W) * math.exp(a * math.log(m / r)) for r, n in H.items()) - 1 + lo, hi = 0.0, 0.01 + for _ in range(200): + mid = (lo + hi) / 2 + lo, hi = (mid, hi) if f(mid) < 0 else (lo, mid) + b = best['best_complex_lower'].split('/') + require(abs(lo - int(b[0]) / int(b[1])) < 1e-13, 'best single helper: float endpoint disagrees') + return len(census['scenarios']) + 1 + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument('--work', required=True) + work = Path(ap.parse_args().work).resolve() + require(not work.exists(), 'work directory must not exist') + work.mkdir(parents=True) + run('census.py', work / 'CENSUS.json') + require(same_json(work / 'CENSUS.json', HERE / 'CENSUS.json'), 'CENSUS.json differs from the committed result') + run('price.py', work / 'CENSUS.json', work / 'PRICES.json') + require(same_json(work / 'PRICES.json', HERE / 'PRICES.json'), 'PRICES.json differs from the committed result') + print('float cross-check agrees for', float_crosscheck(work / 'CENSUS.json', work / 'PRICES.json'), 'priced rows') + template, word = load_construction('T37') + consumed_by_cleanup(restoration_census(word)) + passed = controls() + price_controls() + print('controls rejected as expected:', ', '.join(passed)) + print('PASS_T37_RESTORATION_DEFERRAL_REPLAY') + + +if __name__ == '__main__': + main()