From 4c00ff7f18ee236005f041f70ce4ba7789465042 Mon Sep 17 00:00:00 2001 From: woklerx Date: Tue, 13 Oct 2026 09:06:03 -0700 Subject: [PATCH 1/2] Research audit: certify integer penalties in the T37 relaxation --- research/t37-integrality-audit/CLAIM.md | 40 + research/t37-integrality-audit/EXPECTED.json | 1017 +++++++++++++++++ research/t37-integrality-audit/PROOF.md | 180 +++ research/t37-integrality-audit/README.md | 139 +++ research/t37-integrality-audit/SOURCES.json | 17 + research/t37-integrality-audit/VALIDATION.md | 47 + .../independent_check.py | 315 +++++ research/t37-integrality-audit/verify.py | 284 +++++ 8 files changed, 2039 insertions(+) create mode 100644 research/t37-integrality-audit/CLAIM.md create mode 100644 research/t37-integrality-audit/EXPECTED.json create mode 100644 research/t37-integrality-audit/PROOF.md create mode 100644 research/t37-integrality-audit/README.md create mode 100644 research/t37-integrality-audit/SOURCES.json create mode 100644 research/t37-integrality-audit/VALIDATION.md create mode 100644 research/t37-integrality-audit/independent_check.py create mode 100644 research/t37-integrality-audit/verify.py diff --git a/research/t37-integrality-audit/CLAIM.md b/research/t37-integrality-audit/CLAIM.md new file mode 100644 index 0000000000..adbe6a83e4 --- /dev/null +++ b/research/t37-integrality-audit/CLAIM.md @@ -0,0 +1,40 @@ +# Local sprint claim + +- Track: adversarial mathematical audit; OS assignment seed **65**. +- Base: `407d52ff15b2217b6e22bce44728b4c3907b6515` (origin/main fetched + 2026-10-13). Branch: `research/audit-seed65`. +- Object: the integer-count/equality step in PR942's fixed-U8 all-replica + signed-dual relaxation, especially nonmultiples of 37. +- Method: derive the credit-slack lattice; certify a 37-state residue + potential with exact rational interval edge bounds; exhibit relaxation + witnesses and controls that remove one premise at a time. +- Deliverable: scoped proof, deterministic standard-library checker, + source pins, exact certificate and negative controls. No new kappa, + supplier, physical owner assignment or frontier edit. +- Expected finish: 2026-10-13 09:25 America/Los_Angeles. Reserve the final + quarter for verification, independent review and packaging. + +The three candidates were (0) the prime-power cyclic inverse circle proof, +(1) the disjoint-helper matching floor, and (2) integer consequences of the +all-replica signed-dual support inequality. Seed `65 % 3 = 2` selects the +third. The inverse family already has several open audits; the matching +floor has a complete integer-dual review. The selected obligation has a +qualitative equality statement, but no quantitative residue certificate. + +Curiosity Bot checked the issue listing and current PR metadata immediately +before this local claim. No pinned sprint coordination issue was visible; +the two open issues were #913 and #650. No issue was opened to reserve work. +Queries for integrality and all-replica work found no competing quantitative +residue audit. This is bounded coverage, not a claim to have read every PR. + +Overlap: Jonathan Capalbo's #942 proves the all-T support bound and +constructs T37. Chafik Boukhalfa's #890 exhausts a finite T<=22 relaxation. +Joel Pulikkan's open #962 independently constructs T37 and identifies its +optimal normalized profile. This audit credits those results and adds the +slack lattice, a uniform sharp numerator penalty in the arithmetic +relaxation, and all 37 residue-class certificates. It does not repeat their +construction or claim priority for T37 optimality. + +Delegated review is confined to this same integrality step and certificate. +Stopping rule: prove/check the finite 37-state certificate and declared +controls, then stop; no broader supplier or parameter search. diff --git a/research/t37-integrality-audit/EXPECTED.json b/research/t37-integrality-audit/EXPECTED.json new file mode 100644 index 0000000000..b1682a4790 --- /dev/null +++ b/research/t37-integrality-audit/EXPECTED.json @@ -0,0 +1,1017 @@ +{ + "arithmetic_engine": "pinned retained base-two rational engine", + "base_commit": "407d52ff15b2217b6e22bce44728b4c3907b6515", + "checked_edge_inequalities": 1591, + "credit_divisor": 25, + "edges": [ + { + "label": "rank_2", + "lower": 291373150447864129539126, + "rank": 2, + "step": 26, + "upper": 291373150447864129539127 + }, + { + "label": "rank_3", + "lower": 540749173849751936941776, + "rank": 3, + "step": 15, + "upper": 540749173849751936941777 + }, + { + "label": "rank_4", + "lower": 762872447709351839755676, + "rank": 4, + "step": 4, + "upper": 762872447709351839755677 + }, + { + "label": "rank_5", + "lower": 561863569659888073255926, + "rank": 5, + "step": 4, + "upper": 561863569659888073255927 + }, + { + "label": "rank_6", + "lower": 747597020781255554045176, + "rank": 6, + "step": 30, + "upper": 747597020781255554045177 + }, + { + "label": "rank_7", + "lower": 919916739346764924521392, + "rank": 7, + "step": 19, + "upper": 919916739346764924521393 + }, + { + "label": "rank_8", + "lower": 1080756287700815736418614, + "rank": 8, + "step": 8, + "upper": 1080756287700815736418615 + }, + { + "label": "rank_9", + "lower": 1231561035602449497605296, + "rank": 9, + "step": 34, + "upper": 1231561035602449497605297 + }, + { + "label": "rank_10", + "lower": 970575303204962493720486, + "rank": 10, + "step": 34, + "upper": 970575303204962493720487 + }, + { + "label": "rank_11", + "lower": 1104449647609005587509476, + "rank": 11, + "step": 23, + "upper": 1104449647609005587509477 + }, + { + "label": "rank_12", + "lower": 1231038856720210588872724, + "rank": 12, + "step": 12, + "upper": 1231038856720210588872725 + }, + { + "label": "rank_13", + "lower": 1350952472011696235584942, + "rank": 13, + "step": 1, + "upper": 1350952472011696235584943 + }, + { + "label": "rank_14", + "lower": 1061828548254607639331038, + "rank": 14, + "step": 1, + "upper": 1061828548254607639331039 + }, + { + "label": "rank_15", + "lower": 1169863257797547545124138, + "rank": 15, + "step": 27, + "upper": 1169863257797547545124139 + }, + { + "label": "rank_16", + "lower": 1272561713300929478092572, + "rank": 16, + "step": 16, + "upper": 1272561713300929478092573 + }, + { + "label": "rank_17", + "lower": 1370258419090074746225738, + "rank": 17, + "step": 5, + "upper": 1370258419090074746225739 + }, + { + "label": "rank_18", + "lower": 1463248422419013265082066, + "rank": 18, + "step": 31, + "upper": 1463248422419013265082067 + }, + { + "label": "rank_19", + "lower": 1148916572621690147382471, + "rank": 19, + "step": 31, + "upper": 1148916572621690147382472 + }, + { + "label": "rank_20", + "lower": 1233252064104500702238084, + "rank": 20, + "step": 20, + "upper": 1233252064104500702238085 + }, + { + "label": "rank_21", + "lower": 1313588583575919600287961, + "rank": 21, + "step": 9, + "upper": 1313588583575919600287962 + }, + { + "label": "rank_22", + "lower": 1390117015712699000901314, + "rank": 22, + "step": 35, + "upper": 1390117015712699000901315 + }, + { + "label": "rank_23", + "lower": 1060133524144627070475040, + "rank": 23, + "step": 35, + "upper": 1060133524144627070475041 + }, + { + "label": "rank_24", + "lower": 1129551164434007514610038, + "rank": 24, + "step": 24, + "upper": 1129551164434007514610039 + }, + { + "label": "rank_25", + "lower": 1195637765101648029894966, + "rank": 25, + "step": 13, + "upper": 1195637765101648029894967 + }, + { + "label": "rank_26", + "lower": 1258526857834431184418603, + "rank": 26, + "step": 2, + "upper": 1258526857834431184418604 + }, + { + "label": "rank_27", + "lower": 1318341686506402871022501, + "rank": 27, + "step": 28, + "upper": 1318341686506402871022502 + }, + { + "label": "rank_28", + "lower": 972319016724093213511960, + "rank": 28, + "step": 28, + "upper": 972319016724093213511961 + }, + { + "label": "rank_29", + "lower": 1429196793106294118222858, + "rank": 29, + "step": 6, + "upper": 1429196793106294118222859 + }, + { + "label": "rank_30", + "lower": 1077564296979474399886100, + "rank": 30, + "step": 6, + "upper": 1077564296979474399886101 + }, + { + "label": "rank_31", + "lower": 1126145572553111084525641, + "rank": 31, + "step": 32, + "upper": 1126145572553111084525642 + }, + { + "label": "rank_32", + "lower": 769272041816362647478852, + "rank": 32, + "step": 32, + "upper": 769272041816362647478853 + }, + { + "label": "rank_33", + "lower": 1215656415194678790320174, + "rank": 33, + "step": 10, + "upper": 1215656415194678790320175 + }, + { + "label": "rank_34", + "lower": 1256742494125143513389143, + "rank": 34, + "step": 36, + "upper": 1256742494125143513389144 + }, + { + "label": "rank_35", + "lower": 892601620968615446635161, + "rank": 35, + "step": 36, + "upper": 892601620968615446635162 + }, + { + "label": "rank_36", + "lower": 929055726876890171150270, + "rank": 36, + "step": 25, + "upper": 929055726876890171150271 + }, + { + "label": "rank_37", + "lower": 963290996025931037102513, + "rank": 37, + "step": 14, + "upper": 963290996025931037102514 + }, + { + "label": "rank_38", + "lower": 1398244845546894355282699, + "rank": 38, + "step": 29, + "upper": 1398244845546894355282700 + }, + { + "label": "rank_39", + "lower": 622464850403995684843128, + "rank": 39, + "step": 3, + "upper": 622464850403995684843129 + }, + { + "label": "rank_40", + "lower": 650391680732529095138145, + "rank": 40, + "step": 29, + "upper": 650391680732529095138146 + }, + { + "label": "rank_41", + "lower": 676321957133912011837257, + "rank": 41, + "step": 18, + "upper": 676321957133912011837258 + }, + { + "label": "rank_43", + "lower": 722385667673981310525690, + "rank": 43, + "step": 33, + "upper": 722385667673981310525691 + }, + { + "label": "rank_44", + "lower": 339732524422610284719514, + "rank": 44, + "step": 33, + "upper": 339732524422610284719515 + }, + { + "label": "slack", + "lower": 402877335254760242813269, + "rank": null, + "step": 26, + "upper": 402877335254760242813270 + } + ], + "endpoint": "1664727258740678855773/1000000000000000000000000", + "legal_bin_patterns": 1163, + "mass_per_replica": 14382, + "negative_controls": { + "credit_omission": { + "T": 8, + "credit_shortfall": 1200, + "n48": 2397 + }, + "fractional_equality": { + "T": 1, + "n1": "6/37", + "n48": "11086/37" + }, + "mass_omission": { + "T": 1, + "mass_shortfall": 29, + "n1": 1, + "n48": 299 + }, + "rejected": [ + "fractional_equality_at_T1", + "drop_credit_at_T8", + "drop_mass_at_T1", + "inflate_seeded_residue_potential", + "omit_slack_edge", + "omit_negative_credit_rank", + "overstate_certified_edge", + "erase_strict_rank30_penalty" + ], + "seeded_mutation_residue": 28, + "strictness_omission": { + "T": 1, + "credit_slack": 0, + "n30": 1, + "n48": 299 + } + }, + "potential_ticks": [ + 0, + 1061828548254607639331038, + 1258526857834431184418603, + 622464850403995684843128, + 561863569659888073255926, + 1370258419090074746225738, + 1077564296979474399886100, + 967695107581776141376383, + 1080756287700815736418614, + 1313588583575919600287961, + 1215656415194678790320174, + 880481698272362221661290, + 1231038856720210588872724, + 1195637765101648029894966, + 963290996025931037102513, + 540749173849751936941776, + 1272561713300929478092572, + 1263692167171957343051086, + 676321957133912011837257, + 919916739346764924521392, + 1233252064104500702238084, + 1060645192264226777017978, + 631105674870474414258640, + 1104449647609005587509476, + 1129551164434007514610038, + 929055726876890171150270, + 291373150447864129539126, + 1169863257797547545124138, + 972319016724093213511960, + 650391680732529095138145, + 747597020781255554045176, + 1148916572621690147382471, + 769272041816362647478852, + 339732524422610284719514, + 970575303204962493720486, + 1060133524144627070475040, + 892601620968615446635161 + ], + "residue_certificates": [ + { + "first_positive_T": 37, + "gap_lower_ticks": 0, + "path": [], + "profile": { + "1": 6, + "48": 11086 + }, + "replica_residue": 0, + "slack": 0, + "witness_gap_upper_ticks": 0 + }, + { + "first_positive_T": 1, + "gap_lower_ticks": 1077564296979474399886100, + "path": [ + "rank_30" + ], + "profile": { + "30": 1, + "48": 299 + }, + "replica_residue": 1, + "slack": 0, + "witness_gap_upper_ticks": 1077564296979474399886101 + }, + { + "first_positive_T": 2, + "gap_lower_ticks": 1231038856720210588872724, + "path": [ + "rank_12" + ], + "profile": { + "12": 1, + "48": 599 + }, + "replica_residue": 2, + "slack": 0, + "witness_gap_upper_ticks": 1231038856720210588872725 + }, + { + "first_positive_T": 3, + "gap_lower_ticks": 676321957133912011837257, + "path": [ + "rank_41" + ], + "profile": { + "1": 1, + "41": 1, + "48": 898 + }, + "replica_residue": 3, + "slack": 0, + "witness_gap_upper_ticks": 676321957133912011837258 + }, + { + "first_positive_T": 4, + "gap_lower_ticks": 1129551164434007514610038, + "path": [ + "rank_24" + ], + "profile": { + "24": 1, + "48": 1198 + }, + "replica_residue": 4, + "slack": 0, + "witness_gap_upper_ticks": 1129551164434007514610039 + }, + { + "first_positive_T": 5, + "gap_lower_ticks": 747597020781255554045176, + "path": [ + "rank_6" + ], + "profile": { + "48": 1498, + "6": 1 + }, + "replica_residue": 5, + "slack": 0, + "witness_gap_upper_ticks": 747597020781255554045177 + }, + { + "first_positive_T": 6, + "gap_lower_ticks": 892601620968615446635161, + "path": [ + "rank_35" + ], + "profile": { + "1": 1, + "35": 1, + "48": 1797 + }, + "replica_residue": 6, + "slack": 0, + "witness_gap_upper_ticks": 892601620968615446635162 + }, + { + "first_positive_T": 7, + "gap_lower_ticks": 1370258419090074746225738, + "path": [ + "rank_17" + ], + "profile": { + "1": 1, + "17": 1, + "48": 2097 + }, + "replica_residue": 7, + "slack": 0, + "witness_gap_upper_ticks": 1370258419090074746225739 + }, + { + "first_positive_T": 8, + "gap_lower_ticks": 880481698272362221661290, + "path": [ + "rank_44", + "rank_3" + ], + "profile": { + "1": 1, + "3": 1, + "44": 1, + "48": 2396 + }, + "replica_residue": 8, + "slack": 0, + "witness_gap_upper_ticks": 880481698272362221661292 + }, + { + "first_positive_T": 9, + "gap_lower_ticks": 1263692167171957343051086, + "path": [ + "rank_2", + "rank_28" + ], + "profile": { + "2": 1, + "28": 1, + "48": 2696 + }, + "replica_residue": 9, + "slack": 0, + "witness_gap_upper_ticks": 1263692167171957343051088 + }, + { + "first_positive_T": 10, + "gap_lower_ticks": 1104449647609005587509476, + "path": [ + "rank_11" + ], + "profile": { + "1": 1, + "11": 1, + "48": 2996 + }, + "replica_residue": 10, + "slack": 0, + "witness_gap_upper_ticks": 1104449647609005587509477 + }, + { + "first_positive_T": 11, + "gap_lower_ticks": 650391680732529095138145, + "path": [ + "rank_40" + ], + "profile": { + "1": 2, + "40": 1, + "48": 3295 + }, + "replica_residue": 11, + "slack": 0, + "witness_gap_upper_ticks": 650391680732529095138146 + }, + { + "first_positive_T": 12, + "gap_lower_ticks": 1060133524144627070475040, + "path": [ + "rank_23" + ], + "profile": { + "1": 1, + "23": 1, + "48": 3595 + }, + "replica_residue": 12, + "slack": 0, + "witness_gap_upper_ticks": 1060133524144627070475041 + }, + { + "first_positive_T": 13, + "gap_lower_ticks": 561863569659888073255926, + "path": [ + "rank_5" + ], + "profile": { + "1": 1, + "48": 3895, + "5": 1 + }, + "replica_residue": 13, + "slack": 0, + "witness_gap_upper_ticks": 561863569659888073255927 + }, + { + "first_positive_T": 14, + "gap_lower_ticks": 1215656415194678790320174, + "path": [ + "rank_33" + ], + "profile": { + "1": 3, + "33": 1, + "48": 4194 + }, + "replica_residue": 14, + "slack": 0, + "witness_gap_upper_ticks": 1215656415194678790320175 + }, + { + "first_positive_T": 15, + "gap_lower_ticks": 1272561713300929478092572, + "path": [ + "rank_16" + ], + "profile": { + "1": 2, + "16": 1, + "48": 4494 + }, + "replica_residue": 15, + "slack": 0, + "witness_gap_upper_ticks": 1272561713300929478092573 + }, + { + "first_positive_T": 16, + "gap_lower_ticks": 631105674870474414258640, + "path": [ + "rank_2", + "rank_44" + ], + "profile": { + "1": 2, + "2": 1, + "44": 1, + "48": 4793 + }, + "replica_residue": 16, + "slack": 0, + "witness_gap_upper_ticks": 631105674870474414258642 + }, + { + "first_positive_T": 17, + "gap_lower_ticks": 972319016724093213511960, + "path": [ + "rank_28" + ], + "profile": { + "1": 2, + "28": 1, + "48": 5093 + }, + "replica_residue": 17, + "slack": 0, + "witness_gap_upper_ticks": 972319016724093213511961 + }, + { + "first_positive_T": 18, + "gap_lower_ticks": 970575303204962493720486, + "path": [ + "rank_10" + ], + "profile": { + "1": 2, + "10": 1, + "48": 5393 + }, + "replica_residue": 18, + "slack": 0, + "witness_gap_upper_ticks": 970575303204962493720487 + }, + { + "first_positive_T": 19, + "gap_lower_ticks": 622464850403995684843128, + "path": [ + "rank_39" + ], + "profile": { + "1": 3, + "39": 1, + "48": 5692 + }, + "replica_residue": 19, + "slack": 0, + "witness_gap_upper_ticks": 622464850403995684843129 + }, + { + "first_positive_T": 20, + "gap_lower_ticks": 1313588583575919600287961, + "path": [ + "rank_21" + ], + "profile": { + "1": 3, + "21": 1, + "48": 5992 + }, + "replica_residue": 20, + "slack": 0, + "witness_gap_upper_ticks": 1313588583575919600287962 + }, + { + "first_positive_T": 21, + "gap_lower_ticks": 540749173849751936941776, + "path": [ + "rank_3" + ], + "profile": { + "1": 3, + "3": 1, + "48": 6292 + }, + "replica_residue": 21, + "slack": 0, + "witness_gap_upper_ticks": 540749173849751936941777 + }, + { + "first_positive_T": 22, + "gap_lower_ticks": 1060645192264226777017978, + "path": [ + "rank_2", + "rank_32" + ], + "profile": { + "1": 2, + "2": 1, + "32": 1, + "48": 6591 + }, + "replica_residue": 22, + "slack": 0, + "witness_gap_upper_ticks": 1060645192264226777017980 + }, + { + "first_positive_T": 23, + "gap_lower_ticks": 1169863257797547545124138, + "path": [ + "rank_15" + ], + "profile": { + "1": 3, + "15": 1, + "48": 6891 + }, + "replica_residue": 23, + "slack": 0, + "witness_gap_upper_ticks": 1169863257797547545124139 + }, + { + "first_positive_T": 24, + "gap_lower_ticks": 339732524422610284719514, + "path": [ + "rank_44" + ], + "profile": { + "1": 4, + "44": 1, + "48": 7190 + }, + "replica_residue": 24, + "slack": 0, + "witness_gap_upper_ticks": 339732524422610284719515 + }, + { + "first_positive_T": 25, + "gap_lower_ticks": 1258526857834431184418603, + "path": [ + "rank_26" + ], + "profile": { + "1": 4, + "26": 1, + "48": 7490 + }, + "replica_residue": 25, + "slack": 0, + "witness_gap_upper_ticks": 1258526857834431184418604 + }, + { + "first_positive_T": 26, + "gap_lower_ticks": 1080756287700815736418614, + "path": [ + "rank_8" + ], + "profile": { + "1": 4, + "48": 7790, + "8": 1 + }, + "replica_residue": 26, + "slack": 0, + "witness_gap_upper_ticks": 1080756287700815736418615 + }, + { + "first_positive_T": 27, + "gap_lower_ticks": 963290996025931037102513, + "path": [ + "rank_37" + ], + "profile": { + "1": 5, + "37": 1, + "48": 8089 + }, + "replica_residue": 27, + "slack": 0, + "witness_gap_upper_ticks": 963290996025931037102514 + }, + { + "first_positive_T": 28, + "gap_lower_ticks": 1233252064104500702238084, + "path": [ + "rank_20" + ], + "profile": { + "1": 4, + "20": 1, + "48": 8389 + }, + "replica_residue": 28, + "slack": 0, + "witness_gap_upper_ticks": 1233252064104500702238085 + }, + { + "first_positive_T": 29, + "gap_lower_ticks": 291373150447864129539126, + "path": [ + "rank_2" + ], + "profile": { + "1": 4, + "2": 1, + "48": 8689 + }, + "replica_residue": 29, + "slack": 0, + "witness_gap_upper_ticks": 291373150447864129539127 + }, + { + "first_positive_T": 30, + "gap_lower_ticks": 769272041816362647478852, + "path": [ + "rank_32" + ], + "profile": { + "1": 4, + "32": 1, + "48": 8988 + }, + "replica_residue": 30, + "slack": 0, + "witness_gap_upper_ticks": 769272041816362647478853 + }, + { + "first_positive_T": 31, + "gap_lower_ticks": 1061828548254607639331038, + "path": [ + "rank_14" + ], + "profile": { + "1": 4, + "14": 1, + "48": 9288 + }, + "replica_residue": 31, + "slack": 0, + "witness_gap_upper_ticks": 1061828548254607639331039 + }, + { + "first_positive_T": 32, + "gap_lower_ticks": 967695107581776141376383, + "path": [ + "rank_2", + "rank_41" + ], + "profile": { + "1": 5, + "2": 1, + "41": 1, + "48": 9587 + }, + "replica_residue": 32, + "slack": 0, + "witness_gap_upper_ticks": 967695107581776141376385 + }, + { + "first_positive_T": 33, + "gap_lower_ticks": 1195637765101648029894966, + "path": [ + "rank_25" + ], + "profile": { + "1": 5, + "25": 1, + "48": 9887 + }, + "replica_residue": 33, + "slack": 0, + "witness_gap_upper_ticks": 1195637765101648029894967 + }, + { + "first_positive_T": 34, + "gap_lower_ticks": 919916739346764924521392, + "path": [ + "rank_7" + ], + "profile": { + "1": 5, + "48": 10187, + "7": 1 + }, + "replica_residue": 34, + "slack": 0, + "witness_gap_upper_ticks": 919916739346764924521393 + }, + { + "first_positive_T": 35, + "gap_lower_ticks": 929055726876890171150270, + "path": [ + "rank_36" + ], + "profile": { + "1": 6, + "36": 1, + "48": 10486 + }, + "replica_residue": 35, + "slack": 0, + "witness_gap_upper_ticks": 929055726876890171150271 + }, + { + "first_positive_T": 36, + "gap_lower_ticks": 1148916572621690147382471, + "path": [ + "rank_19" + ], + "profile": { + "1": 5, + "19": 1, + "48": 10786 + }, + "replica_residue": 36, + "slack": 0, + "witness_gap_upper_ticks": 1148916572621690147382472 + } + ], + "signed_price_per_replica": -3892, + "slack_modulus": 1200, + "source_sha256": { + "research/complex-k492-owner-repair/vendor/multicold/engines/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "research/complex-k492-owner-repair/vendor/multicold/engines/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "research/complex-t21-owner-bound/PROOF.md": "2aa0aa6ec1d87402138564c38749b5ca0f058c16817efdf58a2685d2d90cb417", + "research/complex-t21-owners/data/CLAIM.json": "433d7bc4a371aaffeee35c12a1db6ea974722a85b799233626e1a57dcfdcb121", + "research/complex-t37-owners/ALL-T-PROOF.md": "4c0c71ccd0afb850538af1b467e5208b7eb3edd0260fded84e02a8c01dfc868b", + "research/complex-t37-owners/PROOF.md": "09b39ad0d5f1f59f54dcff15c16640f7a7acf27e6597660acaf957b95c7e8510", + "research/complex-t37-owners/independent/all_t_bound.py": "3f8637a90baaa11ef18eab9e739d17b32fcff18fbc50c355f9ef32727a92e4f6" + }, + "status": "PASS_T37_INTEGRALITY_AUDIT", + "tick_denominator": 1000000000000000000000000, + "uniform_gap": { + "exact_expression": "c(2)-26*c(1)/37", + "full_moment_denominator_per_T": 3139584, + "lower_ticks": 291373150447864129539126, + "sharp_relaxed_profile": { + "1": 4, + "2": 1, + "48": 8689, + "T": 29 + }, + "upper_ticks": 291373150447864129539127 + }, + "upper": { + "0": 0, + "1": 19, + "10": 15, + "11": 9, + "12": 3, + "13": -3, + "14": 16, + "15": 10, + "16": 4, + "17": -2, + "18": -8, + "19": 11, + "2": 13, + "20": 5, + "21": -1, + "22": -7, + "23": 12, + "24": 6, + "25": 0, + "26": -6, + "27": -12, + "28": 7, + "29": -24, + "3": 7, + "30": -5, + "31": -11, + "32": 8, + "33": -23, + "34": -29, + "35": -10, + "36": -16, + "37": -22, + "38": -53, + "39": -9, + "4": 1, + "40": -15, + "41": -21, + "43": -33, + "44": -14, + "48": -13, + "5": 20, + "6": 14, + "7": 8, + "8": 2, + "9": -4 + } +} diff --git a/research/t37-integrality-audit/PROOF.md b/research/t37-integrality-audit/PROOF.md new file mode 100644 index 0000000000..05ed62a755 --- /dev/null +++ b/research/t37-integrality-audit/PROOF.md @@ -0,0 +1,180 @@ +# The slack lattice and residue certificate + +All claims below concern the exact fixed-U8 arithmetic relaxation in +PR942's `ALL-T-PROOF.md`, at its upper endpoint +`z=0.001664727258740678855773`. They do not assert realizability of an +arbitrary relaxed profile. + +## 1. Necessary conditions and a stronger divisibility statement + +Let `u(r)` be the largest signed bin price among all legal count vectors +leaving rank `r`, as in the inherited proof. The four bin capacities have +bonuses `(2,4,8,-13)` at `(8,16,32,48)`, and helper widths `(4,5,7,8,9)` +have prices `(-1,-20,-8,-2,4)`. There are exactly 1,163 legal count vectors. +The primary DFS and independent unbounded-fill computation reconstruct the +same table, including `u(0)=0`, `u(1)=19`, `u(2)=13`, and `u(48)=-13`. + +For nonnegative integer counts `n_r`, the retained necessary conditions are + +``` +sum_r r*n_r = 14382*T, +sum_r u(r)*n_r >= -3892*T. +``` + +Put `v(r)=48*u(r)+13*r`. For any particular bin with capacity `a`, bonus +`b`, and helper multiplicities `h_j`, its corresponding credit is + +``` +48*b + 13*a + sum_j (48*price_j - 13*width_j)*h_j. +``` + +The four constants are `(200,400,800,0)` and the five helper coefficients +are `(-100,-1025,-475,-200,75)`. All are divisible by 25. Taking the maximum +over bins with the same remainder therefore preserves divisibility: +`25 | v(r)` for every attainable `r`. This is a statement about all legal +bin patterns, including those with negative signed credit. + +Define the credit slack + +``` +E = sum_(0= 0. +``` + +Thus `48 | E`. Also `25 | E`, because `25 | v(r)` and `25 | 150`. +Since 25 and 48 are coprime, **E=1200*k for an integer k>=0**. +This implication uses integral counts and exact rank balance. + +## 2. A sharp penalty outside multiples of 37 + +Use `phi`, `c` and `lambda` as defined in the README. Set +`delta(r)=c(r)-lambda*v(r)` for attainable `r` other than 0, 1 and 48. +The retained supporting inequality says that all these deltas are positive. +The new checker recomputes exact rational intervals and additionally checks + +``` +0 < delta(2) < delta(r) for every such r != 2, +delta(2) < 1200*lambda. +``` + +The exact excess over the formal continuous optimum is + +``` +Delta = sum_(0=1` or some off-support count is positive. Otherwise +`925*n1=150*T`, hence `37*n1=6*T`, which implies `37 | T`. +Every term is nonnegative, so `Delta>=delta(2)` follows. + +At `T=29`, the integer profile `{1:4,2:1,48:8689}` has mass `417078` +and signed price `-112868`, exactly `14382*29` and `-3892*29`. +It has `k=0` and one rank-2 remainder, so `Delta=delta(2)`. +Since `v(2)=650`, this exact constant is `c(2)-(26/37)*c(1)`. +It is therefore a sharp uniform *numerator* bound in this relaxation. + +The normalized moment denominator is `73*896*T`. Eliminating rank 48 +contributes an additional factor 48, giving + +``` +M_T(z)-M_formal_T37(z) = Delta/(48*73*896*T) + = Delta/(3139584*T). +``` + +No positive uniform normalized gap as `T -> infinity` follows. In particular, +this audit does not improve the selected root or kappa grid. + +## 3. All residue classes with a finite graph + +Write `w(r)=v(r)/25`. Removing rank one from the slack equation gives + +``` +37*n1 + sum_off w(r)*n_r = 6*T + 48*k. +``` + +Every feasible profile therefore supplies a path in the additive group +`Z/37Z`, starting at zero and ending at `6*T mod37`, with the following +edge types: + +| Type | Increment modulo 37 | True cost | +| --- | --- | --- | +| One off-support rank r | w(r) | delta(r) | +| One slack unit | -48 | 1200*lambda | + +The sum of its edge costs is exactly `Delta`. Order is immaterial here; +this graph is an arithmetic relaxation, not an execution schedule. + +For each edge, the certificate uses an integer `L_e` such that +`L_e/10^24 <= true_cost(e)`, obtained by outward rational rounding. +For the 37 integer potentials `d(a)`, it checks + +``` +d(0)=0, +d(a+step(e)) <= d(a)+L_e +``` + +for every state and every edge: **37*43=1591 inequalities**. Telescoping +along the path of any feasible profile proves + +``` +Delta >= d(6*T mod37)/10^24. +``` + +This implication does not require trusting the shortest-path generator. +The primary generator uses Dijkstra; the independent check uses a separate +computation. Completeness requires the slack edge and all attainable +off-support ranks, including negative-credit ones. + +## 4. Explicit upper witnesses and extension to every positive T + +For a recorded path with off-support multiplicities `m_r` and `k` slack +edges, reconstruct + +``` +n1 = (6*T + 48*k - sum_off w(r)*m_r)/37, +n48 = (14382*T - n1 - sum_off r*m_r)/48. +``` + +The first is integral by the path endpoint. Also +`w(r) == 37*r (mod48)`, because `25*w(r)=48*u(r)+13*r` and 25 is its own +inverse modulo 48. Multiplying the second numerator by 37 therefore shows +it is divisible by 48; `gcd(37,48)=1` finishes the argument. + +The certificate checks nonnegative integer counts, exact mass and exact +credit for each first positive representative `T=1,...,37`. All 37 recorded +witnesses happen to have `k=0`. Replacing `T` by `T+37` increases `n1` by +6 and `n48` by 11086, preserving both equations and all off-support counts. +Consequently the same certificate covers every positive integer replica +count, not just those first 37. + +The sum of outward-rounded edge *upper* bounds for each path is an upper +bound for the witness's true excess. Each differs from its certified lower +bound by at most `10/10^24=10^-23`. This sandwiches the integer relaxation's +infimum without claiming that rounded shortest paths establish exact +transcendental minimizers. Individual bin capacities and owner geometry +are still relaxed. + +## 5. Premise-removal witnesses + +- Without integral counts, the smallest positive `T=1` admits equality + with `n1=6/37`, `n48=11086/37`. +- Without the credit inequality, `T=8`, `n48=2397` has the correct integer + mass but zero credit rather than the required 1200. +- Without rank balance, `T=1`, `n1=1`, `n48=299` meets credit but has mass + 14353 rather than 14382. Its apparent slack 775 is not divisible by 1200. +- Without strict off-support penalties, falsely allowing `delta(30)=0` + makes `{30:1,48:299}` at `T=1` an equality profile despite correct integer + mass and credit. The actual certified rank-30 penalty is positive. + +These are concrete counterexamples to weakened implications, not bugs +reported in the inherited theorem. The checkers reject the corresponding +malformed inputs/certificates and preserve the full inherited scope. + +Prepared for woklerx with substantial OpenAI Codex assistance; Apache-2.0. +Predecessor attribution and unresolved physical assumptions are in README.md. diff --git a/research/t37-integrality-audit/README.md b/research/t37-integrality-audit/README.md new file mode 100644 index 0000000000..c229619fe8 --- /dev/null +++ b/research/t37-integrality-audit/README.md @@ -0,0 +1,139 @@ +# Integer penalties in the T37 signed-dual relaxation + +**Adversarial mathematical audit; no new kappa.** The fixed-U8 all-replica +bound in Jonathan Capalbo's PR942 is consistent with integer replica counts. +This package strengthens its qualitative equality condition with a **sharp +positive numerator penalty** whenever `37` does not divide the replica count, +and provides certified lower bounds for all 37 residue classes. + +The exact base is `407d52ff15b2217b6e22bce44728b4c3907b6515`. At that base, +the selected conditional kappa is `0.001661960547713947`, from PR942 at +`1960cfa919a0945d0ca4cb14ea96237000037903`. That selection is unchanged. + +## Result + +Use exactly the fixed family and endpoint from +[the inherited all-T proof](../complex-t37-owners/ALL-T-PROOF.md): + +``` +z = 0.001664727258740678855773 +phi(r) = r*(73/r)^z +c(r) = 48*phi(r) - r*phi(48) +lambda = c(1)/925 +delta(r) = c(r) - lambda*v(r) +``` + +For every nonnegative **integer** residual profile satisfying that proof's +rank and signed-credit constraints at a positive integer `T` with `37 ∤ T`, + +``` +Delta = sum_(0= delta(2) + = c(2) - (26/37)*c(1) + > 0.291373150447. +``` + +This constant is sharp **in the arithmetic relaxation**: `T=29` with +`{1:4, 2:1, 48:8689}` attains exactly `delta(2)`. Adding any number of +`(T,n1,n48)=(37,6,11086)` blocks preserves its excess. This does not +construct a physical owner assignment for these profiles. + +For the full normalized complex moment, including the unchanged repeated +local profile, the exact penalty is + +``` +M_T(z) - M_formal_T37(z) = Delta / (3,139,584*T). +``` + +The penalty tends to zero as `T` grows. It establishes **no fixed improvement +in the root or kappa grid**, and does not exclude other supplier families. + +The [proof](PROOF.md) derives the stronger `1200`-unit credit-slack lattice +and reduces every positive replica count to a 37-state residue graph. The +receipt checks every directed edge inequality of an exact rational +potential. Its 37 explicit profiles give upper witnesses within `10^-23` +of their corresponding certified numerator lower bounds. These are rigorous +sandwiches; rounding the graph weights is not presented as an exact symbolic +optimization of the transcendental costs. + +## Reproduce + +Python 3.11+ and the standard library suffice. From the repository root: + +```sh +python -I -O -B research/t37-integrality-audit/verify.py +``` + +Expected final line: + +``` +PASS_T37_INTEGRALITY_AUDIT: 1163 bins; 37 residue certificates; 1591 edge inequalities; 8 rejection controls; no new kappa +``` + +The checker verifies [source hashes](SOURCES.json), recomputes all intervals, +checks all certificate fields against [EXPECTED.json](EXPECTED.json), and +writes no files. To generate a fresh receipt, pass `--write NEW_FILE`; +existing files are refused. Checks remain active under optimized Python. + +A separately structured checker is also supplied: + +```sh +python -I -O -B research/t37-integrality-audit/independent_check.py +``` + +It uses a different bin enumeration and shortest-path computation, checks +the full moment normalization directly, and imports no primary checker. +The primary checker reuses the repository's pinned base-two rational +engine; the second reuses its pinned Mercator engine. Neither claims to +provide a new proof of those arithmetic engines or formal verification of +the multiplication theorem. + +## Controls and completed coverage + +The primary replay completes all 1,163 legal bin count vectors, all 43 graph +edge types at all 37 states (1,591 inequalities), and all 37 relaxation +witnesses. There is no replica cutoff: the proof lifts each residue witness +by the exact T37 block. Negative controls exhibit: + +- Fractional equality at `T=1` if count integrality is dropped. +- A mass-correct `T=8` profile that fails the credit inequality. +- A credit-correct `T=1` profile that fails rank balance. +- A mass/credit-correct `T=1` profile that would give false equality if + the strictly positive rank-30 penalty were erased. +- An inflated potential at seeded residue `65 % 37 = 28`, a missing slack + edge, an omitted negative-credit rank, and an overstated edge bound. + +The seed-65 example is `T=65`, with `{1:10,20:1,48:19475}`, obtained from +the residue-28 witness by adding one T37 block. Its excess is `delta(20)`. +Seed 65 selected this obligation from the three +candidates in [CLAIM.md](CLAIM.md); it is not a randomized evidence sample. +The stopping rule was complete residue coverage and the stated controls. + +## Scope, pins and credit + +This audits the finite arithmetic relaxation at one specified endpoint. +It retains the U8 widths, capacity inventory, whole-helper convention and +signed prices. Bin-type inventory realization, chronology, source access, +frame changes, restoration, hosting, precision/tape admission, all-size +compiler, common-label/mutable-source realization, bit interfaces and +analytic transfer remain outside this contribution. No supplier program, +complete recurrence, or finite invoice is proposed or changed. + +Credit belongs to Chafik Boukhalfa (@chafreaky), whose PR795 supplies the +signed prices and PR890 the fixed-family equations and finite `T<=22` +relaxation; Jonathan Capalbo (@jon314159), whose PR942 supplies the all-T +support inequality and selected T37 construction; and Joel Pulikkan +(@GamingPuzzled), whose concurrent [PR962](https://github.com/CrocSwap/integer-mult-bounds/pull/962) +independently constructs T37 and identifies the normalized optimum. The +U8 supplier lineage includes Jeremy Kothe and Hao Yan; unchanged bit and +arithmetic dependencies retain their predecessor notices, including eumemic +and the maintainer arithmetic lineage. This audit claims priority for none +of those results. Its addition is the slack lattice and quantitative +integer-residue certificates. + +Prepared for **woklerx** with substantial **OpenAI Codex** assistance, +including a separately implemented agent check. This is not independent +human peer review. New work is Apache-2.0 under the repository license. +Source implementations, `upstream/`, selected certificates and the review +ledger are untouched. The source pins identify what was audited even if +the accepted frontier subsequently changes. diff --git a/research/t37-integrality-audit/SOURCES.json b/research/t37-integrality-audit/SOURCES.json new file mode 100644 index 0000000000..f67b27fb58 --- /dev/null +++ b/research/t37-integrality-audit/SOURCES.json @@ -0,0 +1,17 @@ +{ + "base_commit": "407d52ff15b2217b6e22bce44728b4c3907b6515", + "selected_at_base": { + "kappa": "1661960547713947/1000000000000000000", + "source_head": "1960cfa919a0945d0ca4cb14ea96237000037903", + "source_pr": 942 + }, + "sha256": { + "research/complex-k492-owner-repair/vendor/multicold/engines/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "research/complex-k492-owner-repair/vendor/multicold/engines/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "research/complex-t21-owner-bound/PROOF.md": "2aa0aa6ec1d87402138564c38749b5ca0f058c16817efdf58a2685d2d90cb417", + "research/complex-t21-owners/data/CLAIM.json": "433d7bc4a371aaffeee35c12a1db6ea974722a85b799233626e1a57dcfdcb121", + "research/complex-t37-owners/ALL-T-PROOF.md": "4c0c71ccd0afb850538af1b467e5208b7eb3edd0260fded84e02a8c01dfc868b", + "research/complex-t37-owners/PROOF.md": "09b39ad0d5f1f59f54dcff15c16640f7a7acf27e6597660acaf957b95c7e8510", + "research/complex-t37-owners/independent/all_t_bound.py": "3f8637a90baaa11ef18eab9e739d17b32fcff18fbc50c355f9ef32727a92e4f6" + } +} diff --git a/research/t37-integrality-audit/VALIDATION.md b/research/t37-integrality-audit/VALIDATION.md new file mode 100644 index 0000000000..1f32ea2463 --- /dev/null +++ b/research/t37-integrality-audit/VALIDATION.md @@ -0,0 +1,47 @@ +# Verification and handoff + +Validated locally on Windows with CPython 3.14.5. Both commands passed +normally and with optimized Python; no third-party library is required: + +```sh +python -I -B research/t37-integrality-audit/verify.py +python -I -O -B research/t37-integrality-audit/verify.py +python -I -B research/t37-integrality-audit/independent_check.py +python -I -O -B research/t37-integrality-audit/independent_check.py +``` + +The primary checker reproduces the complete committed JSON receipt. The +separately written checker uses the other pinned rational engine, DP bin +enumeration, synchronous Bellman-Ford and direct moment differences. It +checks the same 37 witnesses and 1,591 edges, with ten additional rejection +controls. Its review found no substantive mathematical defect in the +primary argument. Both checks are AI-assisted; this is not human peer review. + +Exact reported uniform penalty interval: + +``` +291373150447864129539126 / 10^24 + <= delta(2) <= +291373150447864129539127 / 10^24. +``` + +All 37 residue certificates have witness upper bound minus certified lower +bound at most **2/10^24** in this receipt (the checker permits at most +10/10^24). The T29 witness attains the exact symbolic uniform constant. + +Only this additive research package is changed. Existing selected-supplier +replays and the repository-wide regenerating `make verify` suite were not +rerun: no supplier, generator, selected record or upstream source changed. +This package's two complete replays are the affected checks. + +Immediately before packaging, Curiosity Bot refreshed PR metadata for T37 +and integrality. PR942 was closed/incorporated; PR962 remained an independent +T37 construction; PR974 concerned interface budgets and bit-binding +headroom. Those are credited or distinguished in the claim. No overlapping +quantitative integer-residue certificate appeared in those queries. This is +a scoped overlap check, not a claim to have inspected every open PR. + +The intended submission is one **research audit / scoped arithmetic result**, +with no new kappa and no request to change the selected frontier. Reviewers +can inspect the short slack-lattice proof, the T29 sharpness witness, and +the exact edge inequalities without rebuilding a physical supplier. diff --git a/research/t37-integrality-audit/independent_check.py b/research/t37-integrality-audit/independent_check.py new file mode 100644 index 0000000000..42a834c483 --- /dev/null +++ b/research/t37-integrality-audit/independent_check.py @@ -0,0 +1,315 @@ +#!/usr/bin/env python3 +"""Separately structured check of EXPECTED.json; no import of verify.py. + +Uses dynamic programming for bins, synchronous Bellman-Ford for the residue +graph, and the other pinned retained rational engine (Mercator). The engine +is reused, not a newly independent transcendental implementation. Its two +called functions have their domain requirements checked explicitly here, +so this checker supports Python -I -O -B. Apache-2.0. +""" +import argparse +from collections import Counter +from copy import deepcopy +from fractions import Fraction +import hashlib +import importlib.util +import json +from pathlib import Path + + +PACKAGE = Path(__file__).resolve().parent +REPOSITORY = PACKAGE.parents[1] +PRECISION = 10**24 +ENDPOINT = Fraction("0.001664727258740678855773") +BASE = "407d52ff15b2217b6e22bce44728b4c3907b6515" +MERCATOR = "research/complex-k492-owner-repair/vendor/multicold/engines/moment.py" +MERCATOR_SHA256 = "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482" +HELPERS = ((4, -1), (5, -20), (7, -8), (8, -2), (9, 4)) +BIN_TYPES = ((8, 672, 2), (16, 448, 4), (32, 448, 8), (48, 448, -13)) + + +def check(condition, explanation): + if not condition: + raise ValueError(explanation) + + +def bin_dynamic_program(): + """Optimal exact-fill score and a separate unbounded coin-change count.""" + score = [None] * 49 + score[0] = 0 + for filled in range(1, 49): + candidates = [score[filled - width] + price + for width, price in HELPERS + if filled >= width and score[filled - width] is not None] + if candidates: + score[filled] = max(candidates) + ways = [0] * 49 + ways[0] = 1 + for width, _ in HELPERS: + for filled in range(width, 49): + ways[filled] += ways[filled - width] + residual_prices = {} + pattern_count = 0 + for capacity, _, bonus in BIN_TYPES: + pattern_count += sum(ways[:capacity + 1]) + check((48 * bonus + 13 * capacity) % 25 == 0, "bonus lattice") + for filled in range(capacity + 1): + check(bool(ways[filled]) == (score[filled] is not None), "DP support agreement") + if score[filled] is not None: + residual = capacity - filled + proposal = bonus + score[filled] + if residual not in residual_prices or proposal > residual_prices[residual]: + residual_prices[residual] = proposal + check(pattern_count == 1163, "DP count of legal bin patterns") + for width, price in HELPERS: + check((48 * price - 13 * width) % 25 == 0, "helper lattice") + check(residual_prices[0] == 0 and residual_prices[1] == 19 and residual_prices[48] == -13, + "zero, rank-one and maximal residual prices") + check(48 * residual_prices[1] + 13 == 925 + and 48 * residual_prices[2] + 26 == 650, "support and sharp-witness credits") + return residual_prices + + +def read_phi(ranks): + engine_file = REPOSITORY / MERCATOR + check(hashlib.sha256(engine_file.read_bytes()).hexdigest() == MERCATOR_SHA256, + "pinned Mercator engine drift") + module_spec = importlib.util.spec_from_file_location("retained_mercator_audit", engine_file) + engine = importlib.util.module_from_spec(module_spec) + module_spec.loader.exec_module(engine) + values = {} + for rank in sorted(ranks): + if rank == 0: + continue + argument = Fraction(73, rank) + check(argument >= 1, "Mercator logarithm input domain") + reduced = argument + while reduced >= 2: + reduced /= 2 + if reduced >= Fraction(3, 2): + reduced /= Fraction(3, 2) + # These bounds also ensure the internal alternating series domain. + check(1 <= reduced < Fraction(3, 2), "Mercator reduced domain") + log_lower, log_upper = engine.logarithm(argument) + exp_lower, exp_upper = ENDPOINT * log_lower, ENDPOINT * log_upper + check(0 <= exp_lower <= exp_upper < Fraction(1, 10), "exponential domain") + lo, hi = engine.exponential(exp_lower, exp_upper) + check(lo <= hi, "ordered exponential enclosure") + values[rank] = rank * lo, rank * hi + return values + + +def affine(coefficients, values): + """Enclose a linear expression directly, retaining signed coefficients.""" + lower = upper = Fraction(0) + for rank, coefficient in coefficients.items(): + endpoints = [coefficient * endpoint for endpoint in values[rank]] + lower += min(endpoints) + upper += max(endpoints) + return lower, upper + + +def ticks(pair): + low, high = [number * PRECISION for number in pair] + return low.numerator // low.denominator, -((-high.numerator) // high.denominator) + + +def independently_bounded_edges(prices, phi): + records = {} + raw = {} + for rank in sorted(set(prices) - {0, 1, 48}): + credit = 48 * prices[rank] + 13 * rank + check(credit % 25 == 0, "residual credit lattice") + weight = credit // 25 + check((weight - 37 * rank) % 48 == 0, "rank-credit congruence") + # delta_r = 48 phi(r) - 48 v(r)/925 phi(1) + # + (v(r)/925-r) phi(48). + pair = affine({rank: Fraction(48), 1: Fraction(-48 * credit, 925), + 48: Fraction(credit, 925) - rank}, phi) + label = "rank_" + str(rank) + low, high = ticks(pair) + records[label] = dict(label=label, rank=rank, step=weight % 37, + lower=low, upper=high) + raw[label] = pair + multiplier = affine({1: Fraction(48, 925), 48: Fraction(-1, 925)}, phi) + check(multiplier[0] > 0, "positive supporting multiplier") + slack = affine({1: Fraction(57600, 925), 48: Fraction(-1200, 925)}, phi) + low, high = ticks(slack) + records["slack"] = dict(label="slack", rank=None, step=26, lower=low, upper=high) + raw["slack"] = slack + check(len(records) == 43 and all(pair[0] > 0 for pair in raw.values()), + "all 43 edge costs strictly positive") + check(all(raw["rank_2"][1] < pair[0] for label, pair in raw.items() if label != "rank_2"), + "rank two is the unique smallest edge, including slack") + return records, raw + + +def profile_check(replicas, histogram, prices): + check(type(replicas) is int and replicas > 0, "positive integer replica count") + check(all(type(rank) is int and rank in prices and type(count) is int and count >= 0 + for rank, count in histogram.items()), "integral attainable bin counts") + check(sum(rank * count for rank, count in histogram.items()) == 14382 * replicas, + "witness rank balance") + signed_total = sum(prices[rank] * count for rank, count in histogram.items()) + check(signed_total >= -3892 * replicas, "witness signed-price inequality") + excess = 48 * (signed_total + 3892 * replicas) + check(excess % 1200 == 0, "witness slack lattice") + return excess + + +def inspect_receipt(receipt, prices, phi, edges, raw): + check(receipt["status"] == "PASS_T37_INTEGRALITY_AUDIT", "receipt status") + check(receipt["base_commit"] == BASE and Fraction(receipt["endpoint"]) == ENDPOINT, + "base and endpoint") + check(receipt["tick_denominator"] == PRECISION and receipt["legal_bin_patterns"] == 1163, + "scale and pattern count") + check(receipt["mass_per_replica"] == 14382 and receipt["signed_price_per_replica"] == -3892, + "fixed inventory coefficients") + check(receipt["credit_divisor"] == 25 and receipt["slack_modulus"] == 1200, "lattice metadata") + check(receipt["upper"] == {str(rank): price for rank, price in prices.items()}, "DP price table") + actual_edges = receipt["edges"] + check(len(actual_edges) == len(edges), "complete edge inventory") + check(len({item["label"] for item in actual_edges}) == len(edges), "distinct edge labels") + check({item["label"]: item for item in actual_edges} == edges, "independent edge enclosures") + potential = receipt["potential_ticks"] + check(len(potential) == 37 and all(type(value) is int for value in potential) + and potential[0] == 0, "integer potential normalized at zero") + inequalities = 0 + for start in range(37): + for edge in edges.values(): + finish = (start + edge["step"]) % 37 + check(potential[finish] - potential[start] <= edge["lower"], "potential edge inequality") + inequalities += 1 + check(inequalities == receipt["checked_edge_inequalities"] == 1591, "1591 inequalities") + # Synchronous Bellman-Ford: at round j, paths contain at most j edges. + distances = [0] + [None] * 36 + for _ in range(36): + previous = distances + distances = previous[:] + for start, distance in enumerate(previous): + if distance is None: + continue + for edge in edges.values(): + finish = (start + edge["step"]) % 37 + candidate = distance + edge["lower"] + if distances[finish] is None or candidate < distances[finish]: + distances[finish] = candidate + check(distances == potential, "independent Bellman-Ford distances") + rows = receipt["residue_certificates"] + check(len(rows) == 37 and {row["replica_residue"] for row in rows} == set(range(37)), + "exactly one witness for every residue") + for row in rows: + residue = row["replica_residue"] + replicas = row["first_positive_T"] + check(replicas == (residue or 37), "first positive representative") + histogram = {int(rank): count for rank, count in row["profile"].items()} + slack = profile_check(replicas, histogram, prices) + check(slack == row["slack"] == 0, "zero-slack reported witnesses") + labels = row["path"] + check(all(label in edges for label in labels), "known path edges") + off_support = Counter(edges[label]["rank"] for label in labels if label != "slack") + check(dict(off_support) == {rank: count for rank, count in histogram.items() + if rank not in (0, 1, 48) and count}, "path support matches witness") + check(slack == 1200 * labels.count("slack"), "path slack matches witness") + check(sum(edges[label]["step"] for label in labels) % 37 == 6 * replicas % 37, + "path reaches required residue") + lower = row["gap_lower_ticks"] + upper = row["witness_gap_upper_ticks"] + check(lower == potential[6 * replicas % 37] == sum(edges[label]["lower"] for label in labels), + "witness attains lower-weight shortest path") + check(upper == sum(edges[label]["upper"] for label in labels) and 0 <= upper - lower <= 10, + "witness upper ticks and interval width") + check(residue == 0 or lower > 0, "strict gap outside zero replica residue") + # Direct full phi-numerator difference, independently of path costs. + coefficients = {rank: Fraction(48 * count) for rank, count in histogram.items() if rank} + coefficients[1] = coefficients.get(1, Fraction(0)) - Fraction(288 * replicas, 37) + coefficients[48] = coefficients.get(48, Fraction(0)) - 14382 * replicas + Fraction(6 * replicas, 37) + direct_low, direct_high = affine(coefficients, phi) + check(Fraction(lower, PRECISION) <= direct_low <= direct_high <= Fraction(upper, PRECISION), + "direct witness moment excess enclosed by receipt") + # Equality-block extension establishes all positive T in the residue. + extended = histogram.copy() + extended[1] = extended.get(1, 0) + 6 + extended[48] = extended.get(48, 0) + 11086 + check(profile_check(replicas + 37, extended, prices) == slack, "equality-block extension") + uniform = receipt["uniform_gap"] + check(uniform["exact_expression"] == "c(2)-26*c(1)/37", "uniform expression") + check((uniform["lower_ticks"], uniform["upper_ticks"]) == ticks(raw["rank_2"]), "uniform ticks") + check(uniform["full_moment_denominator_per_T"] == 48 * 73 * 896, "moment normalization") + check(uniform["sharp_relaxed_profile"] == {"T": 29, "1": 4, "2": 1, "48": 8689}, + "sharp T29 witness metadata") + check(profile_check(29, {1: 4, 2: 1, 48: 8689}, prices) == 0, "sharp T29 premises") + check(925 * 4 + 650 - 150 * 29 == 0, "sharp excess is exactly delta_2") + return inequalities + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--receipt", type=Path, default=PACKAGE / "EXPECTED.json") + arguments = parser.parse_args() + manifest = json.loads((PACKAGE / "SOURCES.json").read_text(encoding="utf-8")) + receipt = json.loads(arguments.receipt.read_text(encoding="utf-8")) + check(manifest["base_commit"] == BASE, "manifest base") + check(receipt["source_sha256"] == manifest["sha256"], "receipt source inventory") + for relative, digest in manifest["sha256"].items(): + check(hashlib.sha256((REPOSITORY / relative).read_bytes()).hexdigest() == digest, + "source drift: " + relative) + prices = bin_dynamic_program() + check(sum(capacity * count for capacity, count, _ in BIN_TYPES) + - 9 * sum(width * count for (width, _), count in zip(HELPERS, (80, 32, 54, 122, 216))) == 14382, + "independently derived inventory rank") + check(sum(count * bonus for _, count, bonus in BIN_TYPES) + + 9 * sum(price * count for (_, price), count in zip(HELPERS, (80, 32, 54, 122, 216))) == -3892, + "independently derived signed inventory") + check(48 * (-3892) + 13 * 14382 == 150 and Fraction(150, 925) == Fraction(6, 37), + "credit demand and equality ratio") + phi = read_phi(prices) + edges, raw = independently_bounded_edges(prices, phi) + checked = inspect_receipt(receipt, prices, phi, edges, raw) + mutations = [] + for label in ("slack", "rank_44"): + changed = deepcopy(receipt) + changed["edges"] = [edge for edge in changed["edges"] if edge["label"] != label] + mutations.append(("omit_" + label, changed)) + changed = deepcopy(receipt) + changed["edges"][0]["lower"] += 1 + mutations.append(("overstate_edge", changed)) + changed = deepcopy(receipt) + changed["potential_ticks"][28] += PRECISION * 100 + mutations.append(("inflate_potential", changed)) + changed = deepcopy(receipt) + changed["residue_certificates"][1]["profile"]["48"] += 1 + mutations.append(("break_witness_mass", changed)) + changed = deepcopy(receipt) + changed["residue_certificates"][1]["witness_gap_upper_ticks"] -= 1 + mutations.append(("understate_witness_upper", changed)) + changed = deepcopy(receipt) + changed["residue_certificates"][1] = changed["residue_certificates"][0] + mutations.append(("omit_replica_residue", changed)) + rejected = 0 + for name, changed in mutations: + try: + inspect_receipt(changed, prices, phi, edges, raw) + except ValueError: + rejected += 1 + else: + raise ValueError("independent negative control accepted: " + name) + fractional = {1: Fraction(6, 37), 48: Fraction(11086, 37)} + check(sum(rank * count for rank, count in fractional.items()) == 14382 + and sum(prices[rank] * count for rank, count in fractional.items()) == -3892, + "fractional control satisfies both equalities") + for replicas, histogram in ((1, fractional), (8, {48: 2397}), (1, {1: 1, 48: 299})): + try: + profile_check(replicas, histogram, prices) + except ValueError: + rejected += 1 + else: + raise ValueError("independent premise-removal control accepted") + check(rejected == 10, "all independent negative controls rejected") + print("PASS_T37_INDEPENDENT_CHECK: Mercator; DP 1163 patterns; " + + str(checked) + " inequalities; Bellman-Ford 37 states; 37 direct moment witnesses; " + + str(rejected) + " negative controls; sharp T29; no new kappa") + + +if __name__ == "__main__": + main() diff --git a/research/t37-integrality-audit/verify.py b/research/t37-integrality-audit/verify.py new file mode 100644 index 0000000000..237d0b0d59 --- /dev/null +++ b/research/t37-integrality-audit/verify.py @@ -0,0 +1,284 @@ +#!/usr/bin/env python3 +"""Audit integer consequences of the fixed-U8 signed-dual bound. + +New bin enumeration, lattice reasoning and residue certificate; the pinned +base-two rational transcendental engine is reused, not claimed independent. +All proof-relevant checks remain enabled under -O. Apache-2.0. +""" +from collections import Counter +from copy import deepcopy +from fractions import Fraction as Q +import argparse +import hashlib +import heapq +import importlib.util +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +SCALE = 10**24 +Z = Q("0.001664727258740678855773") +WIDTHS = (4, 5, 7, 8, 9) +PRICES = (-1, -20, -8, -2, 4) +CAPS = ((8, 672, 2), (16, 448, 4), (32, 448, 8), (48, 448, -13)) +INVENTORY = (80, 32, 54, 122, 216) +ENGINE = "research/complex-k492-owner-repair/vendor/multicold/engines/base_two_moment.py" + + +def require(ok, message): + if not ok: + raise ValueError(message) + + +def floor_tick(x): + return (x * SCALE).__floor__() + + +def ceil_tick(x): + return (x * SCALE).__ceil__() + + +def source_check(): + manifest = json.loads((HERE / "SOURCES.json").read_text(encoding="utf-8")) + for name, digest in manifest["sha256"].items(): + require(hashlib.sha256((ROOT / name).read_bytes()).hexdigest() == digest, + "source drift: " + name) + return manifest + + +def bins(): + """Depth-first traversal of count vectors, independent of original loops.""" + upper = {} + count = 0 + + def visit(index, remaining, score): + nonlocal count + if index == len(WIDTHS): + count += 1 + upper[remaining] = max(upper.get(remaining, -10**9), score) + return + for multiplicity in range(remaining // WIDTHS[index] + 1): + visit(index + 1, remaining - WIDTHS[index] * multiplicity, + score + PRICES[index] * multiplicity) + + for cap, _, bonus in CAPS: + visit(0, cap, bonus) + require(count == 1163, "complete legal-bin coverage") + return dict(sorted(upper.items())), count + + +def intervals(upper): + spec = importlib.util.spec_from_file_location("t37_retained_base_two", ROOT / ENGINE) + engine = importlib.util.module_from_spec(spec) + spec.loader.exec_module(engine) + phi = {} + for r in upper: + if r: + lo, hi = engine.log_bounds(Q(73, r)) + phi[r] = (r * engine.exp_bounds(Z * lo)[0], + r * engine.exp_bounds(Z * hi)[1]) + c = {r: (48 * phi[r][0] - r * phi[48][1], + 48 * phi[r][1] - r * phi[48][0]) + for r in phi if r < 48} + lam = (c[1][0] / 925, c[1][1] / 925) + delta = {} + for r, pair in c.items(): + if r == 1: + continue + v = 48 * upper[r] + 13 * r + # Multiplication reverses interval endpoints for negative v. + products = (v * lam[0], v * lam[1]) + delta[r] = (pair[0] - max(products), pair[1] - min(products)) + require(lam[0] > 0, "positive support multiplier") + require(all(lo > 0 for lo, _ in delta.values()), "strict off-support costs") + require(all(delta[2][1] < lo for r, (lo, _) in delta.items() if r != 2), + "rank two uniquely minimizes the off-support penalty") + require(delta[2][1] < 1200 * lam[0], "rank two beats one slack unit") + return lam, delta + + +def graph(upper, lam, delta): + edges = [] + for r, (lo, hi) in sorted(delta.items()): + v = 48 * upper[r] + 13 * r + require(v % 25 == 0, "integer width-price lattice") + edges.append(dict(label="rank_" + str(r), rank=r, step=(v // 25) % 37, + lower=floor_tick(lo), upper=ceil_tick(hi))) + edges.append(dict(label="slack", rank=None, step=(-48) % 37, + lower=floor_tick(1200 * lam[0]), upper=ceil_tick(1200 * lam[1]))) + require(all(e["lower"] > 0 for e in edges), "positive graph edges") + return edges + + +def shortest_paths(edges): + distance = [None] * 37 + paths = [None] * 37 + distance[0], paths[0] = 0, [] + queue = [(0, 0)] + while queue: + value, a = heapq.heappop(queue) + if value != distance[a]: + continue + for e in edges: + b = (a + e["step"]) % 37 + candidate = value + e["lower"] + if distance[b] is None or candidate < distance[b]: + distance[b] = candidate + paths[b] = paths[a] + [e["label"]] + heapq.heappush(queue, (candidate, b)) + require(all(x is not None for x in distance), "all 37 states reachable") + return distance, paths + + +def check_potential(potential, certificate_edges, true_edges): + require(certificate_edges == true_edges, "complete, correctly rounded graph edges") + require(len(potential) == 37 and potential[0] == 0, "normalized 37-state potential") + checks = 0 + for a in range(37): + for e in true_edges: + require(potential[(a + e["step"]) % 37] <= potential[a] + e["lower"], + "Bellman edge inequality") + checks += 1 + return checks + + +def check_profile(T, profile, upper): + require(type(T) is int and T > 0, "positive integer replicas") + require(all(type(r) is int and r in upper and type(n) is int and n >= 0 + for r, n in profile.items()), "nonnegative integer attainable counts") + require(sum(r * n for r, n in profile.items()) == 14382 * T, "rank mass") + require(sum(upper[r] * n for r, n in profile.items()) >= -3892 * T, + "signed credit") + slack = sum((48 * upper[r] + 13 * r) * n for r, n in profile.items()) - 150 * T + require(slack >= 0 and slack % 1200 == 0, "1200-unit slack lattice") + return slack + + +def witnesses(paths, edges, upper, potential): + lookup = {e["label"]: e for e in edges} + rows = [] + for residue in range(37): + T = residue or 37 + path = paths[(6 * T) % 37] + off = Counter(lookup[label]["rank"] for label in path if label != "slack") + k = path.count("slack") + numerator = 6 * T + 48 * k - sum((48 * upper[r] + 13 * r) // 25 * n + for r, n in off.items()) + require(numerator % 37 == 0, "integer rank-one completion") + n1 = numerator // 37 + mass = 14382 * T - n1 - sum(r * n for r, n in off.items()) + require(mass % 48 == 0, "integer rank-48 completion") + profile = dict(off) + profile.update({1: n1, 48: mass // 48}) + profile = {r: n for r, n in sorted(profile.items()) if n} + slack = check_profile(T, profile, upper) + require(slack == 1200 * k, "path credit slack") + lower = potential[(6 * T) % 37] + high = sum(lookup[label]["upper"] for label in path) + require(lower == sum(lookup[label]["lower"] for label in path), "attaining lower-weight path") + require(lower <= high and high - lower <= 10, "narrow exact relaxation sandwich") + rows.append(dict(replica_residue=residue, first_positive_T=T, path=path, + profile={str(r): n for r, n in profile.items()}, + slack=slack, gap_lower_ticks=lower, witness_gap_upper_ticks=high)) + return rows + + +def controls(upper, potential, edges): + rejected = [] + + def reject(name, action): + try: + action() + except ValueError: + rejected.append(name) + else: + raise ValueError("negative control accepted: " + name) + + fractional = {1: Q(6, 37), 48: Q(11086, 37)} + require(sum(r * n for r, n in fractional.items()) == 14382, + "fractional control mass premise") + require(sum(upper[r] * n for r, n in fractional.items()) == -3892, + "fractional control credit premise") + reject("fractional_equality_at_T1", lambda: check_profile(1, fractional, upper)) + require(48 * 2397 == 14382 * 8, "credit control preserves mass") + reject("drop_credit_at_T8", lambda: check_profile(8, {48: 2397}, upper)) + require(upper[1] + 299 * upper[48] >= -3892, "mass control preserves credit") + reject("drop_mass_at_T1", lambda: check_profile(1, {1: 1, 48: 299}, upper)) + require(check_profile(1, {30: 1, 48: 299}, upper) == 0, + "strictness control preserves integer mass and credit") + target = 65 % 37 + altered = potential[:] + altered[target] += SCALE * 100 + reject("inflate_seeded_residue_potential", lambda: check_potential(altered, edges, edges)) + reject("omit_slack_edge", lambda: check_potential(potential, edges[:-1], edges)) + negative = next(e for e in edges if e["rank"] is not None + and 48 * upper[e["rank"]] + 13 * e["rank"] < 0) + reject("omit_negative_credit_rank", lambda: check_potential( + potential, [e for e in edges if e != negative], edges)) + corrupt = deepcopy(edges) + corrupt[0]["lower"] += 1 + reject("overstate_certified_edge", lambda: check_potential(potential, corrupt, edges)) + corrupt = deepcopy(edges) + next(e for e in corrupt if e["rank"] == 30)["lower"] = 0 + reject("erase_strict_rank30_penalty", lambda: check_potential(potential, corrupt, edges)) + return dict(rejected=rejected, + fractional_equality={"T": 1, "n1": "6/37", "n48": "11086/37"}, + credit_omission={"T": 8, "n48": 2397, "credit_shortfall": 1200}, + mass_omission={"T": 1, "n1": 1, "n48": 299, "mass_shortfall": 29}, + strictness_omission={"T": 1, "n30": 1, "n48": 299, "credit_slack": 0}, + seeded_mutation_residue=target) + + +def run(): + sources = source_check() + upper, count = bins() + mass = sum(cap * n for cap, n, _ in CAPS) - 9 * sum(w * n for w, n in zip(WIDTHS, INVENTORY)) + signed = sum(n * b for _, n, b in CAPS) + 9 * sum(p * n for p, n in zip(PRICES, INVENTORY)) + require((mass, signed, upper[0], upper[48]) == (14382, -3892, 0, -13), "fixed inventory") + require(all((48 * b + 13 * cap) % 25 == 0 for cap, _, b in CAPS), "bin bonus lattice") + require(all((48 * p - 13 * w) % 25 == 0 for p, w in zip(PRICES, WIDTHS)), "helper lattice") + require(all((48 * u + 13 * r) % 25 == 0 for r, u in upper.items()), "all attained rank credits") + lam, delta = intervals(upper) + edges = graph(upper, lam, delta) + potential, paths = shortest_paths(edges) + checked = check_potential(potential, edges, edges) + rows = witnesses(paths, edges, upper, potential) + require(check_profile(29, {1: 4, 2: 1, 48: 8689}, upper) == 0, "sharp uniform gap witness") + require(all(row["gap_lower_ticks"] > 0 for row in rows if row["replica_residue"]), + "positive penalty in every nonzero replica residue") + require(all(row["slack"] == 0 for row in rows), "reported witnesses have zero slack") + return dict(status="PASS_T37_INTEGRALITY_AUDIT", base_commit=sources["base_commit"], + endpoint=str(Z), arithmetic_engine="pinned retained base-two rational engine", + tick_denominator=SCALE, legal_bin_patterns=count, + upper={str(r): u for r, u in upper.items()}, + mass_per_replica=mass, signed_price_per_replica=signed, + credit_divisor=25, slack_modulus=1200, + uniform_gap=dict(exact_expression="c(2)-26*c(1)/37", + lower_ticks=floor_tick(delta[2][0]), upper_ticks=ceil_tick(delta[2][1]), + sharp_relaxed_profile={"T": 29, "1": 4, "2": 1, "48": 8689}, + full_moment_denominator_per_T=48 * 73 * 896), + edges=edges, potential_ticks=potential, checked_edge_inequalities=checked, + residue_certificates=rows, negative_controls=controls(upper, potential, edges), + source_sha256=sources["sha256"]) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--write", type=Path, help="write a new receipt; existing files refused") + args = parser.parse_args() + result = run() + if args.write: + with args.write.open("x", encoding="utf-8", newline="\n") as stream: + stream.write(json.dumps(result, indent=2, sort_keys=True) + "\n") + else: + expected = json.loads((HERE / "EXPECTED.json").read_text(encoding="utf-8")) + require(result == expected, "complete receipt differs from EXPECTED.json") + print(result["status"] + ": 1163 bins; 37 residue certificates; " + + str(result["checked_edge_inequalities"]) + " edge inequalities; " + + str(len(result["negative_controls"]["rejected"])) + + " rejection controls; no new kappa") + + +if __name__ == "__main__": + main() From 0efdfc28b1eb71c91c012ca1e1945baeeebce7bb Mon Sep 17 00:00:00 2001 From: woklerx Date: Tue, 13 Oct 2026 09:08:44 -0700 Subject: [PATCH 2/2] Record audit outcome and PR handoff --- research/t37-integrality-audit/CLAIM.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/research/t37-integrality-audit/CLAIM.md b/research/t37-integrality-audit/CLAIM.md index adbe6a83e4..394def32fe 100644 --- a/research/t37-integrality-audit/CLAIM.md +++ b/research/t37-integrality-audit/CLAIM.md @@ -38,3 +38,17 @@ construction or claim priority for T37 optimality. Delegated review is confined to this same integrality step and certificate. Stopping rule: prove/check the finite 37-state certificate and declared controls, then stop; no broader supplier or parameter search. + +## Result and handoff + +Completed 2026-10-13. The audit derives the 1200-unit slack lattice and +sharp off-37 numerator penalty, with all 37 residue certificates. Both +checkers passed normally and under `-I -O -B`: 1,163 bin patterns, 1,591 +edge inequalities, 37 witnesses, and 8 primary / 10 independent rejection +controls. The fresh overlap check also distinguished PR974's interface +budget study. No physical construction or new kappa is claimed. + +Submitted one focused research-audit PR: +[CrocSwap/integer-mult-bounds #992](https://github.com/CrocSwap/integer-mult-bounds/pull/992). +No coordination issue was available, so this is the single local claim +update with the result and link. The selected frontier remains unchanged.