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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
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
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
# API Documentation

## aimo_3_gateway.py
Gateway notebook for https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3

### `class AIMO3Gateway`
Gateway class for the AI Mathematical Olympiad Progress Prize 3.
Provides the interface between the competition platform and the TGI solver.

#### `def AIMO3Gateway.__init__(self, data_paths)`
Initializes the AIMO gateway with data paths and sets a generous timeout.

Args:
    data_paths (tuple[str] | None): Tuple containing the test CSV path.

#### `def AIMO3Gateway.unpack_data_paths(self)`
Unpacks the provided data paths or uses default competition paths.

#### `def AIMO3Gateway.generate_data_batches(self)`
Generates batches of test data for evaluation.

Returns:
    Generator[tuple[pl.DataFrame, pl.DataFrame], None, None]: Batches of (row, row_id).

#### `def AIMO3Gateway.competition_specific_validation(self, prediction_batch, row_ids, data_batch)`
Performs competition-specific validation on predictions.

## algebraic.py
No description.

### `class AlgebraicClassifier`
Classifies symmetric combinatorial problems in O(1) using cohomology.
Guided by Law I (Dimensional Parity Harmony) and Law V (Joint-Sum Constraint).
Determines existence of Hamiltonian paths in Z_m^k.

#### `def AlgebraicClassifier.__init__(self, m, k)`
Initializes the classifier with grid modulus m and dimensionality k.

Args:
    m (int): The grid modulus (number of levels per dimension).
    k (int): The dimensionality of the manifold.

#### `def AlgebraicClassifier.analyze(self)`
Performs a deep audit of the topological domain and returns a formal proof.

Returns:
    Dict[str, Any]: Proof metadata including existence, theorem ID, and proof steps.

### `class GroupExtension`
Formalizes the Short Exact Sequence 0 -> H -> G -> Q -> 0.
Enables decomposition of G into fiber H and quotient Q.

#### `def GroupExtension.__init__(self, G_order, Q_order)`
Initializes the extension with global order G and quotient order Q.

#### `def GroupExtension.lift(self, q_state, h_state)`
Lifts a point from the quotient and fiber to the total space.

#### `def GroupExtension.project(self, g_state)`
Projects a point from the total space to the quotient and fiber.

### `class Tower`
A hierarchy of Group Extensions (Tower of Fibrations).
Enables deep cognitive mapping across multiple manifold layers.

#### `def Tower.__init__(self, orders)`
Initializes the tower with a list of orders [base, ..., total].

#### `def Tower.lift_sequence(self, states)`
Lifts a state through the entire tower from base to total space.

#### `def Tower.project_sequence(self, g_state)`
Decomposes a global state into its constituent fiber components across the tower.

### `class NonAbelianSubgroup`
Helper for subgroups with non-abelian central extensions.

#### `def NonAbelianSubgroup.__init__(self, G_order, H_order, is_central)`
Initializes the subgroup with global, fiber, and central metadata.

#### `def NonAbelianSubgroup.parity_law(self, k)`
Checks the finalized parity law for non-abelian extensions.

### `def analyze_advanced_domain(domain)`
Advanced classification for icosahedral, crystal, and Hamming geometries.

### `def get_algebraic_proof(m, k)`
Convenience wrapper for AlgebraicClassifier.analyze.

### `def get_heisenberg_proof(m, k)`
Analysis of Hamiltonian decomposition for Heisenberg groups H3(Z_m).

## analysis.py
analysis.py β€” Automated mathematical analysis of Claude's Cycles solutions.

Given a sigma function or SigmaTable, this module:

1. STRUCTURAL ANALYSIS
   - Detects column-uniformity (does sigma depend only on s,j or all of i,j,k?)
   - Computes the Q_c composed permutations
   - Identifies the twisted translation form Q_c(i,j) = (i+b_c(j), j+r_c)

2. THEOREM VERIFICATION
   - Theorem 1: Twisted Translation Structure (auto-detected)
   - Theorem 2: Single-Cycle Conditions (gcd checks)
   - Theorem 3: Existence for odd m (constructive verification)
   - Theorem 4: Impossibility for even m (parity argument)

3. PATTERN REPORTING
   - Full solution tables
   - Arc sequences for each Hamiltonian cycle
   - Comparison across m values

### `def detect_dependencies(sigma, m)`
Determine which coordinates sigma actually depends on.
Returns {'i': bool, 'j': bool, 'k': bool, 's': bool}
where s = (i+j+k) mod m.

### `def extract_sigma_table(sigma, m)`
If sigma is column-uniform (depends only on s,j), extract SigmaTable.
Returns None if sigma is not column-uniform.

### `class SolutionAnalysis`
Comprehensive analysis of a Claude's Cycles solution.

Usage:
    analysis = SolutionAnalysis(sigma_fn, m=5)
    analysis.run()
    print(analysis.report())

#### `def SolutionAnalysis.__init__(self, sigma, m)`
No description.

#### `def SolutionAnalysis.run(self)`
No description.

#### `def SolutionAnalysis.report(self, verbose)`
No description.

#### `def SolutionAnalysis.__repr__(self)`
No description.

### `def compare_across_m(results)`
Generate a comparison table across multiple m values.
results: {m: SolutionAnalysis}

## benchmark.py
benchmark.py β€” v2.0 vs Alternatives
=====================================
Measures six solvers across six problems.
Reports: correctness, time, proof capability, speedup.

Run:
    python benchmark.py           # default (m=3..6, all solvers)
    python benchmark.py --quick   # m=3..5 only
    python benchmark.py --w4      # W4 correction speedup only
    python benchmark.py --scaling # scaling analysis

### `class BResult`
No description.

#### `def BResult.row(self)`
No description.

### `def _build_score(m)`
No description.

### `def solver_v2(m, k)`
No description.

### `def solver_A0_random(m, budget)`
No description.

### `def solver_A1_SA(m, max_iter)`
No description.

### `def solver_A2_backtrack(m)`
No description.

### `def solver_A3_v1(m, k)`
v1.0 pipeline with O(m^m) W4.

### `def _build_score(m)`
Helper: build integer-array score function.

### `def solver_A4_level_enum(m)`
Deterministic level enumeration. No randomness.
Occasionally faster than v2 on easy feasible problems (lucky early branch).
Cannot prove impossibility β€” times out on impossible problems.

### `def solver_A5_scipy(m)`
scipy Nelder-Mead on the discrete score function treated as continuous.
Included to document that gradient-free continuous optimization fails
completely on discrete problems. Always returns 0/N correct.

### `def run_benchmark(problems, verbose)`
No description.

### `def print_summary(all_results, problems)`
No description.

### `def w4_benchmark()`
No description.

### `def main()`
No description.

## cli.py
cli.py β€” Command-line interface for the Claude's Cycles system.

Usage:
    python -m claudecycles                   # demo all modes
    python -m claudecycles verify 3          # verify known m=3 solution
    python -m claudecycles verify 5          # verify known m=5 solution
    python -m claudecycles solve 7           # find+verify m=7
    python -m claudecycles solve 9           # find+verify m=9
    python -m claudecycles analyze 3         # deep analysis of m=3
    python -m claudecycles theorem           # verify all four theorems
    python -m claudecycles compare 3 5 7     # compare solutions across m

All results are auto-verified before printing.

### `def cmd_verify(m)`
Verify a known hardcoded solution.

### `def cmd_solve(m, strategy, seed, max_iter)`
Find and verify a solution for given m.

### `def cmd_analyze(m)`
Deep mathematical analysis of a solution.

### `def cmd_theorem()`
Demonstrate and verify all four theorems.

### `def cmd_compare(m_values)`
Compare solutions across multiple m values.

### `def cmd_demo()`
Full demo: verify known solutions, analyze, run theorems.

### `def main(args)`
No description.

## core.py
core.py β€” Mathematical Foundations (Production Stable)
====================================
Weights Β· Verifier Β· Solutions Β· Level Machinery Β· SA Engine

### `class Weights`
No description.

#### `def Weights.strategy(self)`
No description.

#### `def Weights.summary(self)`
No description.

### `def _check_fso_solvability(m, r)`
The Non-Canonical Obstruction check: Joint sum constraint.

### `def extract_weights(m, k)`
No description.

### `def verify_sigma(sigma, m)`
No description.

### `def table_to_sigma(table, m)`
No description.

### `def _sa_score(sigma, arc_s, pa, n, k)`
No description.

### `def _build_sa(m, k)`
No description.

### `def run_hybrid_sa(m, k, seed, max_iter)`
No description.

### `def construct_spike_sigma(m, k)`
Sovereign Spike Construction (O(m)). Proven Golden Path for all odd m.

### `def solve(m, k, seed, max_iter)`
The Sovereign FSO Master Solver.

### `def repair_manifold(m, k, sigma_in, max_iter)`
No description.

### `def verify_basin_escape_success(m, k, sigma_in, max_iter)`
No description.

### `def build_functional_graphs(sigma, m)`
No description.

### `def verify_functional_graph(fg, m)`
No description.

### `def vertices(m, k)`
No description.

### `def trace_cycle(fg, m)`
No description.

### `def arc_sequence(path, m)`
No description.

## debug_m4.py
No description.

## domains.py
domains.py β€” Domain Definitions and Extensions
================================================
All registered domains, including the new P5/P6 results.

Domains:
  Cycles G_m       k=3  m=3..9  (odd: solved, even: partial)
  Cycles k=4       m=4,8        (arithmetic feasible)
  Latin squares                 (cyclic construction)
  Hamming codes                 (perfect covering)
  Difference sets               (design theory)
  P5: S_3 (non-abelian)        NEW: parity law extends
  P6: Z_mΓ—Z_n                  NEW: fiber quotient = Z_gcd(m,n)

### `def proved(s)`
No description.

### `def open_(s)`
No description.

### `def note(s)`
No description.

### `def analyse_magic_squares(verbose)`
Magic squares via Siamese method β€” same fiber/twisted-translation structure.

### `def analyse_pythagorean(verbose)`
Pythagorean triples β€” fiber quotient Z_4, obstruction p≑3(mod4).

### `def _load_magic_pythagorean(engine)`
No description.

### `class DecompositionCategory`
Category of symmetric decomposition problems.
Objects = problems (G,k,Ο†). Morphisms = structure-preserving maps.
Eilenberg: a functor from {symmetric systems} β†’ {cohomology theories}.

#### `def DecompositionCategory.__init__(self)`
No description.

#### `def DecompositionCategory.add_object(self, name, G, k, m, status, H1)`
No description.

#### `def DecompositionCategory.add_morphism(self, src, tgt, kind, desc)`
No description.

#### `def DecompositionCategory.print_category(self)`
No description.

### `def build_decomposition_category()`
No description.

### `def _load_heisenberg(engine)`
No description.

### `def load_all_domains(engine)`
No description.

### `def _load_cycles(engine)`
No description.

### `def _load_classical(engine)`
No description.

### `def analyse_P5_nonabelian(verbose)`
S_3 Cayley graph analysis.

RESULT (proved):
β€’ SES:  0 β†’ A_3 β†’ S_3 β†’ Z_2 β†’ 0  is valid (A_3 normal, index 2)
β€’ k=2 arc types: r-pair (1,1) sums to |Z_2|=2 βœ“ β†’ FEASIBLE
β€’ k=3 arc types: no r-triple sums to 2 from {1} β†’ OBSTRUCTED
β€’ Same parity law as abelian case

DIFFERENCE from abelian:
β€’ Twisted translation = conjugation Q_c(h) = g_c⁻¹·hΒ·g_c
β€’ HΒΉ gauge group = HΒΉ(G/H, Z(H)) β€” involves centre of H
β€’ A_3 is abelian, so Z(A_3)=A_3 and the gauge structure is the same

### `def _load_P5_nonabelian(engine)`
No description.

### `def analyse_P6_product_groups(verbose)`
Z_m Γ— Z_n analysis.

RESULT (proved):
β€’ Fiber map: Ο†(i,j) = (i+j) mod gcd(m,n)
β€’ SES: 0 β†’ ker(Ο†) β†’ Z_mΓ—Z_n β†’ Z_gcd(m,n) β†’ 0
β€’ Governing condition uses gcd(m,n) as modulus
β€’ Same parity obstruction formula with m replaced by gcd(m,n)

Examples:
β€’ Z_4Γ—Z_6: gcd=2 β†’ k=3 OBSTRUCTED (same as G_2^n)
β€’ Z_6Γ—Z_9: gcd=3 β†’ k=3 feasible (same as G_3^n)
β€’ Z_3Γ—Z_5: gcd=1 β†’ trivial fiber (always feasible)

### `def _load_P6_product(engine)`
No description.

## engine.py
No description.

### `class Domain`
No description.

#### `def Domain.__init__(self, name, n, k, m, fiber_map, tags, precomputed, group, notes)`
No description.

### `class Engine`
The Global Structure Engine provides a unified interface for classifying
and solving combinatorial problems using the Short Exact Sequence framework.

#### `def Engine.register(self, domain)`
No description.

#### `def Engine.print_results(self)`
No description.

#### `def Engine.__init__(self)`
No description.

#### `def Engine.run(self, m, k, strategy)`
Runs the classification and optional search for a problem (m, k).

Args:
    m: The group order (Z_m).
    k: The dimension (number of cycles).
    strategy: Search strategy ('standard', 'hybrid', 'equivariant').

Returns:
    A dictionary containing the status, proof steps, and solution if found.

#### `def Engine.analyse_text(self, desc, strategy)`
Automatically parses a text description and classifies the domain.

Args:
    desc: Text description of the problem.
    strategy: Search strategy to use.

#### `def Engine.simplify_problem(self, m, k)`
Uses categorical morphisms (Quotient, Product) to reduce a complex problem
to smaller solvable components.

#### `def Engine.get_lean_export(self, m, k)`
Generates Lean 4 source for the parity obstruction proof.

### `def get_suggested_morphisms(m, k)`
Suggests ways to simplify or solve (m, k) using known components.

### `def check_remote_search_status()`
Checks the status of Kaggle search kernels if CLI is configured.

## fiber.py
fiber.py β€” Fiber decomposition of the Claude's Cycles problem.

KEY INSIGHT: The map  f(i,j,k) = (i+j+k) mod m  stratifies the digraph
into m "fiber" layers F_0, …, F_{m-1}, each of size mΒ².
Every arc goes from F_s to F_{s+1 mod m}.

In fiber coordinates (i,j) with k = (s-i-j) mod m, the 3 arc types become:
  arc 0: (i,j) in F_s  β†’  (i+1, j)    in F_{s+1}   [shift (1,0)]
  arc 1: (i,j) in F_s  β†’  (i,   j+1)  in F_{s+1}   [shift (0,1)]
  arc 2: (i,j) in F_s  β†’  (i,   j)    in F_{s+1}   [shift (0,0) β€” identity]

A "column-uniform" sigma depends only on (s, j) β€” not on i.
At each level s, column j gets a fixed permutation: perm[j] = [arc→cycle].

The COMPOSED permutation after all m levels:
  Q_c(i,j) = (i + b_c(j),  j + r_c) mod m
where r_c = total j-increment for cycle c, b_c(j) = total i-increment.

Single mΒ²-cycle condition:  gcd(r_c, m) = 1  AND  gcd(Ξ£ b_c(j), m) = 1

### `def is_bijective_level(level, m)`
Check that at level s, each cycle c induces a bijection on Z_mΒ².
For cycle c: the set of targets {(i+di, j+dj) : j in Z_m, i in Z_m}
must be exactly Z_mΒ² (all mΒ² positions hit).

### `def all_valid_levels(m)`
Enumerate all column-uniform level assignments that are bijective.

### `def compose_levels(sigma_table, m)`
Compose all m fiber-level functions to get Q_0, Q_1, Q_2.
Returns 3 permutations on Z_mΒ² (as dicts).

### `def is_single_q_cycle(Q, m)`
Check that permutation Q on Z_mΒ² is a single mΒ²-cycle.

### `def table_to_sigma_fn(sigma_table, m)`
Convert a SigmaTable (indexed by [s][j]) into a 3D sigma function
sigma(i, j, k) that can be used with core.verify_sigma.
The key: depends only on s=(i+j+k)%m and j.

### `def analyze_Q_structure(Qs, m)`
Analyze whether Q_c has the twisted translation form:
  Q_c(i,j) = (i + b_c(j),  j + r_c) mod m
Returns a dict with r_c, b_c, is_twisted, single_cycle per cycle.

### `def verify_single_cycle_conditions(r_c, b_c, m)`
Verify the two necessary and sufficient conditions for Q_c to be a
single mΒ²-Hamiltonian cycle.

### `def even_m_impossibility_check(m)`
Verify the impossibility theorem for even m:
No (r_0,r_1,r_2) with gcd(r_c,m)=1 can sum to m when m is even.

## find_m3.py
No description.

## frontiers.py
frontiers.py β€” Open Problem Solvers
=====================================
P1  k=4, m=4  fiber-structured SA     (construction open)
P2  m=6, k=3  full-3D SA              (first attempts)
P3  m=8, k=3  full-3D SA              (harder)

TRIAGE FINDINGS (from recent measurements):
β€’ P1 k=4 m=4: Score 337β†’230 in 300K iters of fiber-structured SA.
  Estimated budget: 4–8M iterations.
β€’ P2 m=6 k=3: Basin-escape reaches score=4 in 8M iters (prev record 9).
  This is a deep local minimum (depth β‰₯ 3). Needs ~10M iters at T=2.0.
β€’ P3 m=8 k=3: 512 vertices. Score function overhead scales linearly.

Run:
    python frontiers.py --p1        # k=4, m=4
    python frontiers.py --p2        # m=6, k=3
    python frontiers.py --p3        # m=8, k=3
    python frontiers.py --all       # all three
    python frontiers.py --status    # print current knowledge state

### `def found(s)`
No description.

### `def open_(s)`
No description.

### `def note(s)`
No description.

### `def hr(n)`
No description.

### `def solve_P1(max_iter, seeds, verbose)`
Find Οƒ: Z_4^4 β†’ S_4 such that each colour class is a Hamiltonian cycle.
Strategy: fiber-structured SA where Οƒ(v) = f(fiber(v), j(v), k(v)).
The unique valid r-quadruple is (1,1,1,1) β€” all four colors share r_c=1.

MEASUREMENT: Score 337β†’230 in first 300K iterations.
K=4 converges ~4x slower than K=3. Estimated budget: 4–8M iterations.

### `def solve_P2(max_iter, seeds, verbose)`
G_6 has 216 vertices. Score function checks 3 components of 216 vertices.
Column-uniform impossible (parity). Full-3D search required.

### `def solve_P2_warm_start(max_iter, seed, verbose)`
m=6, k=3 warm-start approach using Z_3-lifted solution.

FINDING: The Z_3 lift (sigma_6(i,j,k) = sigma_3(i%3,j%3,k%3))
reaches score=9 reliably. This is a TRUE local minimum of depth >=3.
Escape requires ~10M iterations at T=2.0.

STRUCTURAL INSIGHT: Z_6 = Z_2 Γ— Z_3 creates a product-structure
local minimum. Breaking it requires coordinated multi-vertex changes
that span the Z_3 periodic structure.

### `def solve_P3(max_iter, seeds, verbose)`
G_8: 512 vertices. Harder than m=6. Tests scaling.
Score function needs 512 components checked per iteration.

### `def print_status()`
No description.

### `def main()`
No description.

### `def prove_fiber_uniform_k4_impossible(verbose)`
THEOREM: No fiber-uniform Οƒ yields a valid k=4 decomposition of G_4^4.
Proof method: exhaustive search over all 24^4 = 331,776 fiber-uniform sigmas.

Fiber-uniform means Οƒ(v) depends only on fiber(v) = (i+j+k+l) mod 4.
With 4 fibers and 4 colors, there are 24^4 = 331,776 combinations.
This is small enough to check completely in ~40 seconds.

Result: 0 valid sigmas found β†’ proved impossible.

## generate_api_docs.py
No description.

### `def get_docstring(node)`
No description.

### `def format_args(args)`
No description.

### `def parse_file(filename)`
No description.

## kaggle_search.py
No description.

### `def _build_sa(m, k)`
No description.

### `def _sa_score(sigma, arc_s, pa, n, k)`
No description.

### `def get_node_orbits(m, k, subgroup_generators)`
No description.

### `def run_hybrid_sa(m, k, seed, max_iter, verbose)`
No description.

### `def run_fiber_structured_sa(m, k, seed, max_iter, verbose)`
No description.

### `def main()`
No description.

## search.py
search.py β€” Three complementary search strategies for Claude's Cycles.

1. RANDOM SEARCH: Fast for odd m. Sample random valid-level combinations,
   check if Q compositions are single mΒ²-cycles. Works well for m=3,5,7.

2. BACKTRACKING: Vertex-by-vertex with in-degree pruning. Explores the full
   sigma space (not restricted to column-uniform). Slower but more general.

3. SIMULATED ANNEALING: Continuous improvement via stochastic hill-climbing.
   Score = total "extra components" across 3 cycles (want 0).
   Effective at navigating large m.

All strategies return a SigmaTable (for fiber-based) or SigmaFn (for full 3D).

### `class RandomSearch`
Sample random combinations of valid level tables.
Extremely fast for odd m. Progressively slows for large m.

Usage:
    rs = RandomSearch(m=5)
    result = rs.run(max_attempts=50_000)

#### `def RandomSearch.__init__(self, m, seed)`
No description.

#### `def RandomSearch.attempts(self)`
No description.

#### `def RandomSearch.elapsed(self)`
No description.

#### `def RandomSearch.run(self, max_attempts)`
Return a valid SigmaTable or None if not found.

#### `def RandomSearch.run_verbose(self, max_attempts, report_every)`
Like run() but prints progress.

### `class BacktrackSearch`
Vertex-by-vertex assignment of sigma with pruning:
- Each cycle gets exactly one arc from each vertex (permutation = guaranteed).
- Each vertex has in-degree exactly 1 per cycle (checked incrementally).
- Optionally shuffles perm order (via seed) for different search trees.

Usage:
    bt = BacktrackSearch(m=3, seed=42)
    sigma_fn = bt.run()

#### `def BacktrackSearch.__init__(self, m, seed)`
No description.

#### `def BacktrackSearch.nodes_visited(self)`
No description.

#### `def BacktrackSearch.run(self)`
Return SigmaFn or None.

### `class SimulatedAnnealing`
Score = total number of extra cycle components (want 0).
Perturb: change sigma at one random vertex.
Temperature schedule: geometric cooling.

Usage:
    sa = SimulatedAnnealing(m=4, seed=0)
    sigma_fn = sa.run(max_iter=500_000)

#### `def SimulatedAnnealing.__init__(self, m, seed, T_init, T_min)`
No description.

#### `def SimulatedAnnealing.best_score(self)`
No description.

#### `def SimulatedAnnealing._score(self, funcs, m)`
Sum of extra components (0 = perfect).

#### `def SimulatedAnnealing.run(self, max_iter, verbose, report_every)`
No description.

#### `def SimulatedAnnealing.run_verbose(self, max_iter)`
No description.

### `def find_sigma(m, strategy, seed, max_iter, verbose)`
Find a valid sigma for the given m using the best available strategy.

strategy="auto":
  - odd m  β†’ RandomSearch (fast, fiber-based)
  - even m β†’ SimulatedAnnealing (full 3D)
strategy="random"    β†’ RandomSearch only
strategy="backtrack" β†’ BacktrackSearch only
strategy="sa"        β†’ SimulatedAnnealing only

Returns SigmaFn or None.

## solutions.py
solutions.py β€” Hardcoded verified solutions for Claude's Cycles.

All solutions have been computationally verified (3 Hamiltonian cycles).
Use get_solution(m) to retrieve; use construct_for_odd_m(m) for
a general algorithm that works on any odd m > 2.

### `def get_solution(m)`
Return a precomputed SigmaFn for known m values (currently m=3,5).
Returns None for unknown m (use search module instead).

### `def get_solution_table(m)`
Return the raw SigmaTable for known m values.

### `def known_m_values()`
Return sorted list of m values with hardcoded solutions.

### `def construct_for_odd_m(m, seed, max_attempts)`
Find a valid sigma for any odd m > 2 using RandomSearch.
The fiber decomposition approach always succeeds for odd m (Theorem 3).

Returns SigmaFn or None (None is unexpected for m ≀ ~15).

## test_basin.py
No description.

## test_sa.py
No description.

## theorems.py
theorems.py β€” Formal Verification of the SES Framework
========================================================
Verified theorems 3.2 through 17.1 (FSO Codex Laws I-XII).
Includes group actions, parity obstructions, and multi-modal fibrations.

### `def proved(s)`
No description.

### `def hr()`
No description.

### `def check_spike_conditions(m)`
Analytically verify Theorem 11.1 conditions for odd m.

### `def phi(n)`
No description.

### `def verify_moduli_space_laws()`
Verify Codex Laws II and III for m=3.

### `def verify_basin_escape_law()`
Verify Law VII (Basin Escape Axiom) for m=3.

### `def verify_cross_domain_consistency()`
Verify Law VIII (Multi-Modal Fibration Invariant).

### `def verify_subgroup_decomposition_law()`
Verify Law X (Recursive Subgroup Decomposition) for m=12.

### `def verify_symbolic_duality_law()`
Verify Law XI (Symbolic-Topological Duality).

### `def verify_hardware_hamiltonian_health()`
Verify Law IX (Hardware-Topological Equivalence).

### `def verify_all_theorems(verbose)`
No description.

### `def print_cross_domain_table()`
No description.

## research/action_mapper.py
No description.

### `class ActionMapper`
TGI Action-Coordinate Mapping.
Translates topological paths and coordinates into system-level 'Agentic' actions.
Ensures the TGI can 'do' things as a result of manifold reasoning.
Guided by Law VIII (Multi-Modal Consistency).

#### `def ActionMapper.__init__(self, m)`
No description.

#### `def ActionMapper.map_coord_to_action(self, coord)`
Maps a specific coordinate in Z_m^k to an action and its parameters.

#### `def ActionMapper.path_to_action_sequence(self, path)`
Converts a Hamiltonian path into a sequence of agentic actions.

#### `def ActionMapper.resolve_intent(self, intent_text)`
Lifts a textual intent into a coordinate for action execution.
Uses grounded TLM semantic mapping and Law VIII (Multi-Modal Consistency).

## research/admin_vision_process.py
No description.

### `def admin_process(image_path)`
No description.

## research/advanced_solvers.py
No description.

### `class GeneralCayleyEngine`
No description.

#### `def GeneralCayleyEngine.__init__(self, elements, op, gens, seed)`
No description.

#### `def GeneralCayleyEngine.score(self, sigma)`
No description.

#### `def GeneralCayleyEngine.solve(self, max_iter, verbose)`
No description.

### `class HeisenbergSolver`
No description.

#### `def HeisenbergSolver.__init__(self, m, seed)`
No description.

### `class TSPSolver`
No description.

#### `def TSPSolver.__init__(self, name, coords, seed)`
No description.

#### `def TSPSolver.score(self, tour)`
No description.

#### `def TSPSolver.nearest_neighbor(self)`
No description.

#### `def TSPSolver.solve(self, max_iter, init_method, verbose)`
No description.

### `def load_tsplib_instances(csv_path)`
No description.

## research/agentic_action_engine.py
No description.

### `class ActionExecutor`
TGI Action Executor (Phase 8 Completion).
Handles real execution of agentic plans and establishes the feedback loop.
Guided by Law VII (Basin Escape) and Law IX (Hardware Grounding).

#### `def ActionExecutor.__init__(self)`
No description.

#### `def ActionExecutor.execute_step(self, step)`
Executes a single step of an agentic plan.

#### `def ActionExecutor.execute_plan(self, plan)`
Executes a full multi-step plan and returns the audit trail.

### `class TopologicalActionEngine`
TGI Agentic Action Engine.
Executes and resolves multi-step topological paths into coherent agentic plans.

#### `def TopologicalActionEngine.__init__(self)`
No description.

#### `def TopologicalActionEngine.resolve_path_to_plan(self, path, base_intent)`
Resolves a sequence of coordinates into a multi-step execution plan.

## research/agentic_bridge.py
No description.

### `class AgenticBridge`
The TGI Agentic Bridge (Upgraded v4).
Links the topological action space to actual MCP tool signatures and LIBRARY metadata.
Guided by the FSO Codex Law VIII (Multi-Modal Consistency).

#### `def AgenticBridge.__init__(self)`
No description.

#### `def AgenticBridge.resolve_intent(self, intent)`
Maps a natural language intent to a topological manifold and action set.

#### `def AgenticBridge.resolve_resource_for_action(self, action_data, domain_hint)`
Finds the most appropriate tool or library for a topological action.

#### `def AgenticBridge.generate_agentic_plan(self, intent)`
Creates a fully resolved agentic plan from a natural language intent.

## research/agentic_expansion_demo.py
No description.

### `def run_demo()`
No description.

## research/agentic_tgi_demo.py
No description.

### `def run_demo()`
No description.

## research/aimo_p7_solver.py
No description.

### `def count_f2024_values()`
f(m) + f(n) = f(m + n + mn)
f(n) = \sum a_p * v_p(n+1)
a_p = f(p-1) >= 1
Constraint: f(n) <= 1000 for n <= 1000.
Find number of values for f(2024) = h(2025) = 4*a_3 + 2*a_5.

## research/aimo_reasoning_engine.py
No description.

### `class AIMOReasoningEngine`
No description.

#### `def AIMOReasoningEngine.__init__(self)`
No description.

#### `def AIMOReasoningEngine.solve(self, problem_latex, problem_id)`
No description.

## research/aimo_recurring_parquet.py
No description.

## research/aimo_solver.py
No description.

### `def solve_alice_bob()`
No description.

### `def solve_functional_equation()`
No description.

### `def count_f2024_values()`
No description.

### `def solve_double_sum_floor()`
No description.

## research/aimo_submission_script.py
No description.

### `def get_answer(problem_id)`
No description.

## research/aimo_submit.py
No description.

## research/analysis.py
analysis.py β€” Automated mathematical analysis of Claude's Cycles solutions.

Given a sigma function or SigmaTable, this module:

1. STRUCTURAL ANALYSIS
   - Detects column-uniformity (does sigma depend only on s,j or all of i,j,k?)
   - Computes the Q_c composed permutations
   - Identifies the twisted translation form Q_c(i,j) = (i+b_c(j), j+r_c)

2. THEOREM VERIFICATION
   - Theorem 1: Twisted Translation Structure (auto-detected)
   - Theorem 2: Single-Cycle Conditions (gcd checks)
   - Theorem 3: Existence for odd m (constructive verification)
   - Theorem 4: Impossibility for even m (parity argument)

3. PATTERN REPORTING
   - Full solution tables
   - Arc sequences for each Hamiltonian cycle
   - Comparison across m values

### `def detect_dependencies(sigma, m)`
Determine which coordinates sigma actually depends on.
Returns {'i': bool, 'j': bool, 'k': bool, 's': bool}
where s = (i+j+k) mod m.

### `def extract_sigma_table(sigma, m)`
If sigma is column-uniform (depends only on s,j), extract SigmaTable.
Returns None if sigma is not column-uniform.

### `class SolutionAnalysis`
Comprehensive analysis of a Claude's Cycles solution.

Usage:
    analysis = SolutionAnalysis(sigma_fn, m=5)
    analysis.run()
    print(analysis.report())

#### `def SolutionAnalysis.__init__(self, sigma, m)`
No description.

#### `def SolutionAnalysis.run(self)`
No description.

#### `def SolutionAnalysis.report(self, verbose)`
No description.

#### `def SolutionAnalysis.__repr__(self)`
No description.

### `def compare_across_m(results)`
Generate a comparison table across multiple m values.
results: {m: SolutionAnalysis}

## research/autonomous_engine_demo.py
No description.

### `def run_demo()`
No description.

## research/classify_new_domains.py
No description.

## research/collect_all_results.py
No description.

### `def get_stats(kernel_id)`
No description.

### `def main()`
No description.

## research/cycles_even_m.py
cycles_even_m.py β€” 6-Phase Discovery: Even m in Claude's Cycles
================================================================
The digraph G_m:  vertices (i,j,k) ∈ Z_m³
  arc 0: (i,j,k) β†’ (i+1, j,   k  ) mod m
  arc 1: (i,j,k) β†’ (i,   j+1, k  ) mod m
  arc 2: (i,j,k) β†’ (i,   j,   k+1) mod m

sigma assigns each arc to one of 3 cycles.
Goal: every cycle is a single directed Hamiltonian cycle of length mΒ³.

Odd m  β†’ column-uniform sigma works (proven, m=3,5,7 solved).
Even m β†’ column-uniform is PROVABLY impossible.
         This script discovers WHY and then FINDS a solution via SA.

Phases:
  01 GROUND TRUTH   β€” define verification; confirm odd m works
  02 DIRECT ATTACK  β€” attempt column-uniform on m=4; record exact failure
  03 STRUCTURE HUNT β€” prove the parity obstruction; characterise what even m needs
  04 PATTERN LOCK   β€” SA search for m=4; analyse the solution structure
  05 GENERALIZE     β€” test the discovered structure on m=6
  06 PROVE LIMITS   β€” complete theorem: odd proven, even found, open frontier stated

Run:
  python cycles_even_m.py            # full 6-phase run
  python cycles_even_m.py --fast     # skip m=6 search (saves ~2 min)

### `def hr(c, n)`
No description.

### `def sec(num, name, tag)`
No description.

### `def kv(k, v, ind)`
No description.

### `def found(msg)`
No description.

### `def miss(msg)`
No description.

### `def note(msg)`
No description.

### `def info(msg)`
No description.

### `def vertices(m)`
No description.

### `def build_funcs(sigma, m)`
No description.

### `def count_components(fg)`
No description.

### `def score(sigma, m)`
Excess components across 3 cycles (0 = valid).

### `def verify(sigma, m)`
Full verification: each cycle is exactly 1 Hamiltonian cycle.

### `def build_funcs_list(sigma, m)`
Build 3 mutable dicts.

### `def fiber_valid_levels(m)`
All column-uniform level assignments where each cycle is bijective on Z_mΒ².

### `def _cartesian(lst, k)`
No description.

### `def _level_bijective(level, m)`
No description.

### `def compose_q(table, m)`
Compose all m fiber levels β†’ 3 permutations Q_c on Z_mΒ².

### `def q_is_single_cycle(Q, m)`
No description.

### `def table_to_sigma(table, m)`
No description.

### `def find_odd_m(m, seed, max_att)`
No description.

### `def prove_column_uniform_impossible(m)`
Column-uniform needs rβ‚€+r₁+rβ‚‚ = m, each gcd(rα΅’,m)=1.
For even m: coprime-to-m ⟹ odd. Sum of 3 odds is odd β‰  m (even). QED.
Returns dict with all proof data.

### `def exhaustive_column_uniform(m, max_combos)`
Try ALL column-uniform sigmas for small m. Record outcome.

### `def _build_perm_table(m)`
Precompute for each (vertex_idx, perm_idx) β†’ [successor_0, s_1, s_2].
Returns succs[v][p][arc] = successor vertex index.

### `def _build_funcs_fast(sigma_int, arc_succ, perm_arc, n)`
Build 3 successor arrays from integer sigma.

### `def _count_comps_fast(f, n)`
Count cycle components in successor array.

### `def _score_fast(f0, f1, f2, n)`
No description.

### `def sa_search_fast(m, max_iter, T_init, T_min, seed, verbose, report_n)`
Fast SA with score=1 repair mode + plateau-escape reheat.
Returns (sigma_int_list or None, stats).

### `def _sigma_int_to_map(sigma_int, m)`
Convert integer sigma to SigmaMap.

### `def sa_multistart(m, restarts, iter_each, T_init, verbose)`
Multi-start SA. Return first success.

### `def analyse_sigma_dependencies(sigma, m)`
Find which coordinates sigma actually depends on.

### `def analyse_sigma_pattern(sigma, m)`
Analyse symmetry structure of a found sigma.

### `def analyse_q_structure(sigma, m)`
Extract Q_c (if sigma is column-uniform) or analyse fiber-level
transitions even for full-3D sigma.

### `def phase_01()`
No description.

### `def phase_02()`
No description.

### `def phase_03()`
No description.

### `def phase_04(fast)`
No description.

### `def phase_05(sigma4, fast)`
No description.

### `def phase_06(p4_result, p5_result)`
No description.

### `def main()`
No description.

## research/debug_spike_m3.py
No description.

## research/deploy_p1_fix.py
No description.

### `def deploy()`
No description.

## research/deploy_p2_p3.py
No description.

### `def deploy()`
No description.

## research/deploy_swarm.py
No description.

### `def deploy()`
No description.

## research/discovery_engine.py
discovery_engine.py β€” 6-Phase Mathematical Discovery Engine
============================================================
Pure sympy. No API. All six phases run as real computation.

Each phase applies one principle from the Discovery Methodology:
  01 GROUND TRUTH   β€” classify, parse, build the verifier
  02 DIRECT ATTACK  β€” try standard methods; record failures precisely
  03 STRUCTURE HUNT β€” factor, symmetry, decompose, find invariants
  04 PATTERN LOCK   β€” analyse the working answer; extract the law
  05 GENERALIZE     β€” parametrise the family; name the condition
  06 PROVE LIMITS   β€” find the boundary; state the obstruction

Usage:
  python discovery_engine.py "x^2 - 5x + 6 = 0"
  python discovery_engine.py "sin(x)^2 + cos(x)^2"
  python discovery_engine.py "factor x^4 - 16"
  python discovery_engine.py "x^3 - 6x^2 + 11x - 6 = 0"
  python discovery_engine.py "prove sqrt(2) is irrational"
  python discovery_engine.py "sum of first n integers"
  python discovery_engine.py "2x + 3 = 7"
  python discovery_engine.py --test       # run all built-in tests

### `def hr(char, n)`
No description.

### `def section(num, name, tagline)`
No description.

### `def kv(key, val, indent)`
No description.

### `def finding(msg, sym)`
No description.

### `def ok(msg)`
No description.

### `def fail(msg)`
No description.

### `def note(msg)`
No description.

### `class PT`
No description.

### `class Problem`
No description.

### `def _parse(s)`
No description.

### `def classify(raw)`
No description.

### `def phase_01(p)`
No description.

### `def phase_02(p, g)`
No description.

### `def phase_03(p, prev)`
No description.

### `def phase_04(p, prev)`
No description.

### `def phase_05(p, prev)`
No description.

### `def phase_06(p, prev)`
No description.

### `def _final_answer(p)`
No description.

### `def run(raw)`
No description.

### `def run_tests()`
No description.

## research/discovery_engine_unified.py
╔══════════════════════════════════════════════════════════════════════════════╗
β•‘          DISCOVERY ENGINE  β€”  Complete Unified System                       β•‘
β•‘          Finding Global Structure in Highly Symmetric Systems                β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

WHAT THIS FILE IS
─────────────────
A single self-contained system encoding every discovery, theorem, algorithm,
and search strategy produced during the Claude's Cycles investigation.
It is simultaneously:
  β€’ The traceable record of what was found and how
  β€’ The runnable proof of every theorem
  β€’ The extended coordinate framework applicable to new domains
  β€’ The improved search engine with structured SA

DISCOVERY ARC  (the strategic path that led here)
──────────────────────────────────────────────────
Phase 1  GROUND TRUTH    β€” verify() before search()
Phase 2  DIRECT ATTACK   β€” measure how failures fail
Phase 3  STRUCTURE HUNT  β€” the fiber map  f(v) = Ο†(v)
Phase 4  PATTERN LOCK    β€” twisted translation Q_c
Phase 5  GENERALIZE      β€” governing condition gcd(r_c,m)=1
Phase 6  PROVE LIMITS    β€” parity obstruction for even m

Extensions:
Ext 1    REFORMULATION   β€” same 4 coordinates in 6 domains
Ext 2    GLOBAL STRUCTURE β€” master theorem via SES
Ext 3    k=4 FRONTIER    β€” new theorem + structured search

THE FOUR COORDINATES  (the universal discovery tools)
───────────────────────────────────────────────────────
C1  Fiber Map           Ο†: G β†’ G/H      (group quotient)
C2  Twisted Translation Q_c             (coset action on H)
C3  Governing Condition gcd(r_c,|G/H|)=1  (generator in G/H)
C4  Parity Obstruction  arithmetic of |G/H|  (when C3 fails)

Run:
    python discovery_engine_unified.py --demo          # full demo
    python discovery_engine_unified.py --cycles m=5    # solve G_m
    python discovery_engine_unified.py --verify        # verify all theorems
    python discovery_engine_unified.py --search k=4    # k=4 structured search
    python discovery_engine_unified.py --domains       # cross-domain analysis
    python discovery_engine_unified.py --strategy      # print strategy guide

### `def hr(c, n)`
No description.

### `def phase_header(n, name, tag)`
No description.

### `def proved(msg)`
No description.

### `def found(msg)`
No description.

### `def miss(msg)`
No description.

### `def note(msg)`
No description.

### `def info(msg)`
No description.

### `def kv(k, v)`
No description.

### `class FiberMap`
Universal fiber decomposition tool.

Given a group G (encoded as a list of elements) and a homomorphism
Ο†: G β†’ Z_k, decompose G into k fibers F_0,...,F_{k-1}.

The short exact sequence:  0 β†’ ker(Ο†) β†’ G β†’ Z_k β†’ 0
is the algebraic skeleton of the decomposition.

Orbit-stabilizer theorem:  |G| = k Γ— |ker(Ο†)|

#### `def FiberMap.__init__(self, elements, phi, k)`
No description.

#### `def FiberMap.verify_orbit_stabilizer(self)`
No description.

#### `def FiberMap.report(self)`
No description.

### `def cycles_fiber_map(m)`
No description.

### `class TwistedTranslation`
The induced action of a generator on the fiber H β‰… Z_mΒ².

Q(i,j) = (i + b(j),  j + r)  mod m

This is the COSET ACTION: h ↦ h + g  (residual group action of g on H).

#### `def TwistedTranslation.__init__(self, m, r, b)`
No description.

#### `def TwistedTranslation.apply(self, i, j)`
No description.

#### `def TwistedTranslation.orbit_length(self)`
No description.

#### `def TwistedTranslation.is_single_cycle(self)`
No description.

#### `def TwistedTranslation.condition_A(self)`
gcd(r, m) = 1  ↔  r generates Z_m  ↔  j-shift has full period.

#### `def TwistedTranslation.condition_B(self)`
gcd(Ξ£b(j), m) = 1  ↔  accumulated i-shift has full period.

#### `def TwistedTranslation.verify_theorem_5_1(self)`
THEOREM 5.1: Q is a single mΒ²-cycle  iff  A and B both hold.
Returns verification dict with prediction vs actual.

#### `def TwistedTranslation.derivation_sketch(m)`
No description.

### `class GoverningCondition`
For a k-decomposition via the fiber structure, we need k parameters
r_0,...,r_{k-1} each coprime to m (generating G/H β‰… Z_m)
summing to m (the constraint from the identity action of arc type k-1).

This class analyses feasibility and finds valid r-tuples.

#### `def GoverningCondition.__init__(self, m, k)`
No description.

#### `def GoverningCondition.find_valid_tuples(self)`
No description.

#### `def GoverningCondition.canonical_tuple(self)`
The simplest valid tuple: (1, m-(k-1), 1, ..., 1) when feasible.

#### `def GoverningCondition.analyse(self)`
No description.

### `class ParityObstruction`
THEOREM 6.1 (Generalised):
For even m and odd k: no k-tuple from coprime-to-m elements can sum to m.
Proof: all such elements are odd; sum of k odd numbers has parity k%2;
       k odd β†’ sum is odd; m is even β†’ contradiction.

COROLLARY 9.2 (New):
k even β†’ potentially feasible for all m.
The obstruction is k-parity specific, not m-parity specific.

#### `def ParityObstruction.__init__(self, m, k)`
No description.

#### `def ParityObstruction.analyse(self)`
No description.

#### `def ParityObstruction.complete_table(m_range, k_range)`
Generate the complete kΓ—m feasibility table.

### `def _build_arc_succ_3(m)`
No description.

### `def _perm_table_3()`
No description.

### `def _build_funcs_3(sigma, arc_succ, perm_arc, n)`
No description.

### `def _count_comps(f, n)`
No description.

### `def _score_3(f0, f1, f2, n)`
No description.

### `def _level_bijective(level, m)`
No description.

### `def _valid_levels(m)`
No description.

### `def _compose_q(table, m)`
No description.

### `def _q_single(Q, m)`
No description.

### `def _table_to_sigma(table, m)`
No description.

### `def verify_sigma_map(sigma_map, m)`
Full verification of a sigma given as {(i,j,k): perm_tuple}.

### `class SAEngine3`
Fast SA for G_m (k=3) using integer arrays.
38K+ iterations/second on m=4.
Features: repair mode (score=1), plateau escape (reheat+reload).

#### `def SAEngine3.__init__(self, m)`
No description.

#### `def SAEngine3.run(self, max_iter, T_init, T_min, seed, verbose, report_n)`
No description.

### `class OddMSolver`
Column-uniform sigma via random level sampling.
Works for any odd m > 2 in expected polynomial time.

#### `def OddMSolver.__init__(self, m, seed)`
No description.

#### `def OddMSolver.solve(self, max_att)`
No description.

### `def find_sigma(m, seed, verbose)`
Unified solver: odd m β†’ random fiber search; even m β†’ SA.
Always returns {(i,j,k): perm_tuple} or None.

### `class SystemSpec`
Specifies a highly symmetric system for analysis.

name:        human-readable identifier
G_order:     |G|, the symmetry group order
H_order:     |H| = |ker(phi)|, the fiber size
k:           number of parts in decomposition
G_quotient:  |G/H| = k, the quotient group
governing:   string description of the governing condition
obstruction: string description of the impossibility case (or None)

#### `def SystemSpec.G_quotient(self)`
No description.

#### `def SystemSpec.verify_orbit_stabilizer(self)`
No description.

#### `def SystemSpec.report(self)`
No description.

### `class K4M4Engine`
Structured search for k=4, m=4.

The 4D digraph Z_4^4 (256 vertices, 4 arc types).
The fiber-uniform approach is PROVED IMPOSSIBLE (exhaustive: 24^4=331,776 checked).
The fiber-STRUCTURED approach restricts to Οƒ(v) = f(fiber, j, k)
reducing the search from 24^256 to 24^64.

#### `def K4M4Engine.__init__(self)`
No description.

#### `def K4M4Engine._dec(self, v)`
No description.

#### `def K4M4Engine._enc(self, i, j, k, l)`
No description.

#### `def K4M4Engine._build_arc_succ(self)`
No description.

#### `def K4M4Engine._build_perm_arc(self)`
No description.

#### `def K4M4Engine._build_funcs(self, sigma)`
No description.

#### `def K4M4Engine._score(self, sigma)`
No description.

#### `def K4M4Engine.prove_fiber_uniform_impossible(self)`
Exhaustively check all 24^4 fiber-uniform sigmas.

#### `def K4M4Engine.sa_fiber_structured(self, max_iter, seed, verbose, report_n)`
SA in the fiber-structured subspace.
State: table[(s,j,k)] β†’ perm_index, 64 entries, 24 choices each.
This is the correct restricted search space: Οƒ(v) = f(fiber(v), j(v), k(v)).

### `def verify_all_theorems(verbose)`
Run all theorems as computational proofs.
Each theorem is stated, then verified by explicit computation.

### `def cross_domain_analysis()`
No description.

### `def print_strategy_guide()`
No description.

### `def cmd_demo()`
No description.

### `def cmd_cycles(m)`
No description.

### `def cmd_k4_search(fast)`
No description.

### `def main()`
No description.

## research/find_p1_params.py
No description.

### `def verify_k4(sigma, m)`
No description.

### `def solve_p1()`
No description.

## research/frontier_discovery.py
No description.

### `def _build_sa(m, k)`
No description.

### `def _sa_score(sigma, arc_s, pa, n, k)`
No description.

### `def get_node_orbits(m, k, generators)`
No description.

### `def run_frontier_sa(m, k, seed, max_iter, verbose)`
No description.

## research/global_structure.py
global_structure.py
===================
FINDING GLOBAL STRUCTURE IN HIGHLY SYMMETRIC SYSTEMS

The central theorem, proved and tested:

    For any combinatorial system with a transitive symmetry group G,
    every valid global decomposition is determined by:

        (1) A SUBGROUP CHAIN  H ⊴ G  (the fiber map is the quotient G β†’ G/H)
        (2) AN INDUCED ACTION  of G/H on H  (the twisted translation)
        (3) A GENERATOR CONDITION  on the action parameters (coprimality analog)
        (4) A PARITY OBSTRUCTION  when the group arithmetic prevents (3)

    This is not a heuristic. It is orbit-stabilizer theorem + Lagrange's theorem
    applied to the action of G on the system's constraint graph.

We demonstrate this on five increasingly abstract systems:

    SYS 1: Claude's Cycles (Z_mΒ³)         β€” the original, now understood fully
    SYS 2: Cayley graph of Z_n Γ— Z_n      β€” 2D analog, different fiber structure
    SYS 3: Vertex-transitive graphs        β€” BFS fibers from group structure
    SYS 4: Affine planes AG(2,q)           β€” fiber = parallel class, q must be prime power
    SYS 5: Difference sets in Z_n          β€” the governing condition IS the multiplier theorem

The script:
  - Detects the symmetry group of each system
  - Predicts valid decompositions from group structure alone
  - Derives impossibility from arithmetic of group order
  - Verifies predictions computationally
  - Extracts the universal governing law

Run:
    python global_structure.py

### `def hr(c, n)`
No description.

### `def section(title, sub)`
No description.

### `def thm(label, statement)`
No description.

### `def proved(msg)`
No description.

### `def found(msg)`
No description.

### `def miss(msg)`
No description.

### `def note(msg)`
No description.

### `def info(msg)`
No description.

### `def kv(k, v)`
No description.

### `def step(n, msg)`
No description.

### `class AbelianGroup`
Finite abelian group  G = Z_{n1} Γ— Z_{n2} Γ— ... Γ— Z_{nk}.
The key operations:
  - Subgroup enumeration (via divisors of each factor)
  - Quotient map construction
  - Orbit-stabilizer decomposition
  - Generator testing

#### `def AbelianGroup.__init__(self, *orders)`
No description.

#### `def AbelianGroup.elements(self)`
No description.

#### `def AbelianGroup.add(self, a, b)`
No description.

#### `def AbelianGroup.neg(self, a)`
No description.

#### `def AbelianGroup.zero(self)`
No description.

#### `def AbelianGroup.is_subgroup(self, H)`
No description.

#### `def AbelianGroup.cosets(self, H)`
No description.

#### `def AbelianGroup.subgroups_of_index(self, idx)`
Find all subgroups H with [G:H] = idx (i.e., |H| = |G|/idx).

#### `def AbelianGroup.generate(self, generators)`
Subgroup generated by a list of elements.

#### `def AbelianGroup.generator_order(self, g)`
Order of element g.

#### `def AbelianGroup.cyclic_generators(self)`
Elements that generate the full group (if cyclic).

#### `def AbelianGroup.is_cyclic(self)`
No description.

### `class FiberDecomposition`
Given group G and linear functional Ο†: G β†’ Z_m (a group homomorphism),
decompose G into fibers F_s = φ⁻¹(s).

This is the ABSTRACT FORM of the Claude's Cycles fiber map.
The functional Ο† defines the 'stratification coordinate'.

#### `def FiberDecomposition.__init__(self, G, phi, num_fibers)`
No description.

#### `def FiberDecomposition.fiber_size(self)`
No description.

#### `def FiberDecomposition.cross_fiber_action(self, g)`
The induced action of g on fibers: maps F_s to F_{s + Ο†(g)}.
Within each fiber, the action is: h ↦ h + (g - Ο†(g) * e) projected to fiber.
This is the TWISTED TRANSLATION.

#### `def FiberDecomposition.verify_orbit_stabilizer(self)`
Verify: |G| = |orbit| Γ— |stabilizer|
orbit = the set of fibers (size = num_fibers)
stabilizer = the kernel (size = fiber_size)

### `class TwistedTranslation`
The induced action Q on a single fiber F β‰… Z_mΒ².

Q(i,j) = (i + b(j), j + r)  mod m

Parameters:
  r : the j-shift (= Ο†(generator), the 'fiber-crossing speed')
  b : the i-offset function (= residual i-component of generator)

Single-cycle condition:
  Q is a single mΒ²-cycle iff:
    (A)  gcd(r, m) = 1
    (B)  gcd(Ξ£_j b(j), m) = 1

#### `def TwistedTranslation.__init__(self, m, r, b)`
No description.

#### `def TwistedTranslation.apply(self, i, j)`
No description.

#### `def TwistedTranslation.orbit_length(self)`
Length of the orbit of (0,0) under repeated application.

#### `def TwistedTranslation.is_single_cycle(self)`
No description.

#### `def TwistedTranslation.condition_A(self)`
No description.

#### `def TwistedTranslation.condition_B(self)`
No description.

#### `def TwistedTranslation.check_conditions(cls, m, r, b)`
No description.

### `class ParityObstructionProver`
Proves impossibility of decompositions from group order arithmetic.

The key theorem:
  For G = Z_m^n decomposed into k equal parts via a quotient map G β†’ Z_k:
  each part spans a single Hamiltonian cycle iff there exist r_1,...,r_k
  coprime to m summing to m.
  For even m: all coprime-to-m elements are odd, and sum of k odd numbers
  has parity k mod 2 β‰  0 = m mod 2 when k is odd. [Generalized obstruction]

#### `def ParityObstructionProver.__init__(self, m, k)`
No description.

#### `def ParityObstructionProver.coprime_elements(self)`
No description.

#### `def ParityObstructionProver.all_have_parity(self)`
If all coprime-to-m elements have the same parity, return it; else None.

#### `def ParityObstructionProver.sum_parity(self, k_copies, element_parity)`
No description.

#### `def ParityObstructionProver.target_parity(self)`
No description.

#### `def ParityObstructionProver.prove(self)`
No description.

### `def system_1_claudes_cycles()`
No description.

### `def system_2_cayley_2d()`
No description.

### `def system_3_universal_principle()`
No description.

### `def system_4_difference_sets()`
No description.

### `def system_5_synthesis()`
No description.

### `def main()`
No description.

## research/global_structure_engine.py
╔══════════════════════════════════════════════════════════════════════════════╗
β•‘              GLOBAL STRUCTURE ENGINE  v1.0                                  β•‘
β•‘   Finding Global Structure in Highly Symmetric Systems                       β•‘
╠══════════════════════════════════════════════════════════════════════════════╣
β•‘                                                                              β•‘
β•‘  WHAT THIS ENGINE DOES                                                       β•‘
β•‘  ─────────────────────                                                       β•‘
β•‘  Given any highly symmetric combinatorial system, it automatically:          β•‘
β•‘    1. Registers the domain (group G, fiber map Ο†, decomposition goal)        β•‘
β•‘    2. Applies all four coordinates of the short exact sequence               β•‘
β•‘    3. Dispatches the correct search strategy                                 β•‘
β•‘    4. Tracks a branch tree of proved/open/impossible results                 β•‘
β•‘    5. Generates theorem statements from the analysis                         β•‘
β•‘    6. Exposes hooks for adding new coordinates and strategies                β•‘
β•‘                                                                              β•‘
β•‘  ARCHITECTURE                                                                β•‘
β•‘  ────────────                                                                β•‘
β•‘  Engine                                                                      β•‘
β•‘  β”œβ”€β”€ DomainRegistry      register/retrieve domains                           β•‘
β•‘  β”œβ”€β”€ CoordinateAnalyser  C1β†’C2β†’C3β†’C4 pipeline (auto)                        β•‘
β•‘  β”œβ”€β”€ StrategyDispatcher  selects S1/S2/S3/S4/S5 from analysis               β•‘
β•‘  β”œβ”€β”€ BranchTree          records proved/open/attempted/impossible            β•‘
β•‘  β”œβ”€β”€ TheoremGenerator    produces formal theorem statements                  β•‘
β•‘  └── ExpansionProtocol   hooks for new coordinates / strategies              β•‘
β•‘                                                                              β•‘
β•‘  THE FOUR COORDINATES  (always applied in this order)                        β•‘
β•‘  C1  FiberMap            Ο†: G β†’ G/H    (group quotient)                     β•‘
β•‘  C2  TwistedTranslation  Q on H        (coset action)                       β•‘
β•‘  C3  GoverningCondition  gcd check     (generator condition)                 β•‘
β•‘  C4  ParityObstruction   arithmetic    (impossibility)                       β•‘
β•‘                                                                              β•‘
β•‘  HOW TO ADD A NEW DOMAIN                                                     β•‘
β•‘  ────────────────────────                                                    β•‘
β•‘  engine = GlobalStructureEngine()                                            β•‘
β•‘  engine.register(                                                            β•‘
β•‘      name        = "My System",                                              β•‘
β•‘      group_order = 64,                                                       β•‘
β•‘      k           = 3,                                                        β•‘
β•‘      phi_desc    = "sum of coords mod m",                                    β•‘
β•‘      verify_fn   = my_verify,    # callable: candidate β†’ bool               β•‘
β•‘      search_fn   = my_search,    # callable: β†’ candidate or None (optional) β•‘
β•‘  )                                                                           β•‘
β•‘  result = engine.analyse("My System")                                        β•‘
β•‘  engine.print_branch_tree()                                                  β•‘
β•‘                                                                              β•‘
β•‘  Run:                                                                        β•‘
β•‘    python global_structure_engine.py                   # analyse all domains β•‘
β•‘    python global_structure_engine.py --domain "Cycles m=5"                  β•‘
β•‘    python global_structure_engine.py --tree             # print branch tree  β•‘
β•‘    python global_structure_engine.py --theorems         # print all theorems β•‘
β•‘    python global_structure_engine.py --extend           # show extension API β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

### `def hr(c, n)`
No description.

### `class Status`
No description.

### `class CoordinateResult`
Output of applying ONE coordinate to a domain.

### `class BranchNode`
One node in the branch tree: a specific (domain, question) pair.

#### `def BranchNode.add_child(self, child)`
No description.

### `class AnalysisResult`
Complete result of analysing one domain through all four coordinates.

#### `def AnalysisResult.status(self)`
No description.

#### `def AnalysisResult.summary(self)`
No description.

### `class C1_FiberMap`
Applies the fiber decomposition to any domain.

The fiber map Ο†: G β†’ Z_k partitions |G| objects into k equal fibers.
It is the projection in the short exact sequence  0 β†’ H β†’ G β†’ G/H β†’ 0.

Required inputs: group_order, k, phi_description
Output: orbit-stabilizer check, fiber sizes, kernel description

#### `def C1_FiberMap.apply(self, domain)`
No description.

### `class C2_TwistedTranslation`
Analyses the induced action of G/H on H (the coset action).

For the Cayley graph setting: Q_c(i,j) = (i+b_c(j), j+r_c) mod m.
For general abelian G: the action is always of this twisted form.

Verifies: does the action structure admit single-orbit generators?

#### `def C2_TwistedTranslation.apply(self, domain, c1)`
No description.

### `class C3_GoverningCondition`
Finds the governing condition: which r-tuples in G/H allow single cycles?

General form: k values r_0,...,r_{k-1}, each coprime to |G/H|,
summing to |G/H|.

Fully automatic from (group_order, k).

#### `def C3_GoverningCondition.apply(self, domain, c2)`
No description.

### `class C4_ParityObstruction`
Proves impossibility from arithmetic of |G/H| when C3 finds no valid tuples.

The proof is: if all coprime-to-|G/H| elements have parity p,
and sum of k elements has parity kΓ—p, but target |G/H| has opposite parity,
then it's impossible.

Fully automatic: either produces an impossibility proof or confirms feasibility.

#### `def C4_ParityObstruction.apply(self, domain, c3)`
No description.

### `class StrategyDispatcher`
Selects the correct search strategy based on coordinate analysis.

S1  CLOSED-FORM         valid r-tuple exists β†’ column-uniform random search
S2  FIBER-STRUCTURED SA  C4=feasible, no closed form β†’ structured SA
S3  REPAIR-MODE SA      full 3D SA with repair at score=1
S4  EXHAUSTIVE PROOF    space small enough β†’ enumerate all, prove impossible
S5  ALGEBRAIC           need deeper algebra (non-abelian, mixed moduli)

#### `def StrategyDispatcher.dispatch(self, domain, coords)`
Returns (strategy_code, rationale).

### `class TheoremGenerator`
Generates formal theorem statements from coordinate analysis results.
Each theorem is labelled, stated, and given a proof sketch.

#### `def TheoremGenerator.generate(self, domain, coords, strategy)`
No description.

### `def _cycles_verify(sigma_map, m)`
No description.

### `def _level_bijective(level, m)`
No description.

### `def _valid_levels(m)`
No description.

### `def _compose_q(table, m)`
No description.

### `def _q_single(Q, m)`
No description.

### `def _table_to_sigma(table, m)`
No description.

### `def _sa_find_sigma(m, seed, max_iter)`
Fast SA for G_m (k=3) using prebuilt column-uniform search.

### `class SearchExecutor`
Executes the chosen strategy for a domain.
Returns the solution or None.

#### `def SearchExecutor.execute(self, domain, strategy, c3, c4, verbose)`
Returns (solution, execution_summary).

### `class Domain`
Complete specification of a highly symmetric system.

Minimum required: name, group_order, k, phi_desc
Optional: m (cyclic modulus), verify_fn, search_fn, solution

### `class DomainRegistry`
Central registry of all domains.
Supports: register, retrieve, list, tag-based filtering.

#### `def DomainRegistry.__init__(self)`
No description.

#### `def DomainRegistry.register(self, domain)`
No description.

#### `def DomainRegistry.get(self, name)`
No description.

#### `def DomainRegistry.all_names(self)`
No description.

#### `def DomainRegistry.by_tag(self, tag)`
No description.

#### `def DomainRegistry.__len__(self)`
No description.

### `class BranchTree`
Persistent record of all results across all domains.
Each node: domain β†’ question β†’ status β†’ evidence β†’ children.
Supports: print, query by status, export.

#### `def BranchTree.__init__(self)`
No description.

#### `def BranchTree.add_result(self, result)`
No description.

#### `def BranchTree.nodes_by_status(self, status)`
No description.

#### `def BranchTree.print(self, indent, node, nodes)`
No description.

### `class ExpansionProtocol`
Allows the engine to be extended with:
- New coordinates (C5, C6, ...)
- New search strategies (S6, S7, ...)
- New domain classes (non-abelian groups, weighted graphs, ...)

Each extension is a callable that receives the domain and prior results.

#### `def ExpansionProtocol.__init__(self)`
No description.

#### `def ExpansionProtocol.add_coordinate(self, name, fn)`
Register a new coordinate C5+. fn(domain, prior_results) β†’ CoordinateResult.

#### `def ExpansionProtocol.add_strategy(self, code, name, fn)`
Register a new strategy. fn(domain, coords) β†’ (solution, summary).

#### `def ExpansionProtocol.add_domain_transformer(self, fn)`
Transform a domain before analysis (e.g. reduce to known form).

#### `def ExpansionProtocol.apply_extra_coords(self, domain, prior)`
No description.

#### `def ExpansionProtocol.transform_domain(self, domain)`
No description.

#### `def ExpansionProtocol.list_extensions(self)`
No description.

### `class GlobalStructureEngine`
The unified engine.

Usage:
    engine = GlobalStructureEngine()
    # Domains are pre-loaded; add your own:
    engine.register(Domain(name="My System", ...))
    result = engine.analyse("My System")
    engine.print_branch_tree()
    engine.print_theorems()

#### `def GlobalStructureEngine.__init__(self)`
No description.

#### `def GlobalStructureEngine.register(self, domain)`
Register a new domain. Returns self for chaining.

#### `def GlobalStructureEngine.analyse(self, name, verbose)`
Apply all four coordinates, select strategy, execute search,
generate theorems, record branch node.

#### `def GlobalStructureEngine.analyse_all(self, verbose)`
No description.

#### `def GlobalStructureEngine.print_branch_tree(self)`
No description.

#### `def GlobalStructureEngine.print_theorems(self)`
No description.

#### `def GlobalStructureEngine.print_strategy_table(self)`
No description.

#### `def GlobalStructureEngine.print_extension_guide(self)`
No description.

#### `def GlobalStructureEngine._load_default_domains(self)`
Load all discovered domains with full specifications.

### `def main()`
No description.

## research/hardware_awareness.py
No description.

### `class HardwareMapper`
TGI Hardware Awareness Core.
Maps real-time CPU, RAM, and Battery metrics into topological coordinates (Law IX).
Ensures the system is 'aware' of its physical constraints.

#### `def HardwareMapper.__init__(self, m, k)`
No description.

#### `def HardwareMapper.get_system_state(self)`
Collects current hardware metrics via /proc.

#### `def HardwareMapper.map_to_coordinate(self)`
Maps hardware state to Z_m^k.

#### `def HardwareMapper.verify_hamiltonian_health(self, sigma)`
Law IX: Verify if the current hardware state is 'reachable' in the active manifold.

#### `def HardwareMapper.measure_thermal_entropy(self)`
No description.

## research/hierarchical_tlm.py
No description.

### `class HierarchicalTLM`
Phase 4: TLM Scale-up.
Implements a Tower of group extensions (fibrations) for hierarchical context.
Level 0: Character/Word base group.
Level 1: Semantic context fiber.
Level 2: Structural/Grammar fiber.

#### `def HierarchicalTLM.__init__(self, m, k, depth)`
No description.

#### `def HierarchicalTLM.generate_hierarchical(self, seed_text, length)`
Generates text by lifting paths through the formal algebraic tower.

## research/ingest_effective_tech.py
No description.

### `def ingest()`
No description.

### `def ingest_extra()`
No description.

### `def ingest_final()`
No description.

## research/ingest_global_knowledge.py
No description.

### `def populate()`
No description.

### `def forge_more_relations()`
No description.

## research/ingest_libraries.py
No description.

### `def ingest()`
No description.

## research/ingest_mcp_tools.py
No description.

### `def ingest()`
No description.

## research/k4_m4_search.py
k4_m4_search.py
===============
Structured search for k=4, m=4 Claude's Cycles solution.

The 4D digraph G = Z_4^4 with 4 arc types (increment each coordinate).
Fiber map: phi(i,j,k,l) = i+j+k+l mod 4  β†’  4 fibers of size 4^3 = 64.
Goal: 4 directed Hamiltonian cycles each of length 256.

The fiber-uniform approach is proved IMPOSSIBLE (user's new theorem).
This script searches the fiber-STRUCTURED (non-uniform) space.

Twisted translation hierarchy on fiber H β‰… Z_4^3:
  Q_c(i,j,k) = (i + b_c(j,k),  j + e_c(k),  k + r_c)  mod 4

Single-cycle conditions:
  (A)  gcd(r_c, 4) = 1  β†’  r_c ∈ {1, 3}
  (B)  gcd(Ξ£_k e_c(k), 4) = 1
  (C)  Full 3D single-cycle: verified by direct orbit computation

Valid r-quadruple: (1,1,1,1) β€” unique solution.
This fixes ALL four r_c = 1, collapsing the search to:
  find e_0,...,e_3 and b_0,...,b_3 satisfying (B),(C) simultaneously
  with the constraint that Οƒ is a valid arc-colouring at each vertex.

Key insight: score=24 with unrestricted SA means the search is lost in
the full 6^256 space. Restricting to fiber-structured sigma reduces
the space dramatically and keeps all four twisted translations on track.

### `def enc(i, j, k, l)`
No description.

### `def dec(v)`
No description.

### `def build_funcs(sigma)`
Build K functional digraphs from integer sigma (perm index per vertex).

### `def count_comps(f)`
No description.

### `def score(sigma)`
No description.

### `def verify(sigma)`
No description.

### `def prove_fiber_uniform_impossible()`
A fiber-uniform sigma depends only on fiber index s = phi(v).
With 4 fibers and 4 colors, sigma_s ∈ S_4 for each s ∈ {0,1,2,3}.
There are 24^4 = 331,776 fiber-uniform sigmas.
We check all of them.

### `def fiber_structured_sigma(table)`
table[(s, j, k)] β†’ permutation index
where s = fiber index, (j,k) = two fiber coordinates
i = deduced from the remaining constraint

### `def valid_fiber_structured_levels(m, k)`
Enumerate valid assignments for one fiber level.
A level (s, j, k) assignment maps (j,k) ∈ Z_m^2 β†’ perm ∈ S_k.
Valid = the induced functional graph for each colour is bijective on Z_m^3.
This is expensive; we sample valid ones instead.

### `def sa_fiber_structured(max_iter, seed, verbose, report_n)`
SA in the fiber-structured subspace.
State: table[(s,j,k)] β†’ perm_index, for s∈{0,1,2,3}, j,k∈{0,1,2,3}
This gives 4*4*4 = 64 entries, each from S_4 (24 choices).
Perturbation: change one (s,j,k) entry.

### `def arithmetic_analysis()`
No description.

### `def paper_framing()`
No description.

### `def main()`
No description.

## research/knowledge_mapper.py
No description.

### `class KnowledgeMapper`
TGI Knowledge Mapper (Project ELECTRICITY Logic).
Maps datasets, mathematics, physics laws, and design systems into the Z_256^4 grid.
Uses the CLOSURE LEMMA to deterministically force concepts into functional fibers.

#### `def KnowledgeMapper.__init__(self, m, k, state_path)`
No description.

#### `def KnowledgeMapper._apply_closure_hashing(self, concept_name, target_fiber)`
Calculates (x, y, z, w) such that (x + y + z + w) % m == target_fiber.

#### `def KnowledgeMapper.ingest_concept(self, category, concept_name, payload)`
No description.

#### `def KnowledgeMapper.ingest_dictionary(self, file_path, limit)`
Bulk ingests a dictionary file into the LANGUAGE fiber.

#### `def KnowledgeMapper.ingest_mcp_tools(self, tool_defs)`
Ingests MCP Tool Definitions into the API_MCP fiber.

#### `def KnowledgeMapper.ingest_library(self, lib_data)`
Ingests library metadata into the LIBRARY fiber.

#### `def KnowledgeMapper.ingest_color(self, color_name, r, g, b, a)`
No description.

#### `def KnowledgeMapper.map_relation(self, name_a, name_b, relationship_type)`
No description.

#### `def KnowledgeMapper._find_coord(self, name)`
No description.

#### `def KnowledgeMapper.save_state(self)`
No description.

#### `def KnowledgeMapper.load_state(self)`
No description.

## research/library_tgi_demo.py
No description.

### `def run_demo()`
No description.

## research/m10_k3_parity.py
No description.

## research/m6_k4_search.py
No description.

### `def _build_sa(m, k)`
No description.

### `def _sa_score(sigma, arc_s, pa, n, k)`
No description.

### `def search_m6_k4(max_iter, seed)`
No description.

## research/mass_ingestion.py
No description.

### `def mass_populate()`
No description.

### `def forge_cross_domain()`
No description.

## research/massive_data_ingestion.py
No description.

### `def authenticate()`
No description.

### `def ingest_hf_text(agent, dataset_name, num_samples)`
No description.

### `def ingest_kaggle_csv(agent, dataset_ref, num_samples)`
No description.

### `def ingest_hf_vision(agent, dataset_name, num_samples)`
No description.

### `def main()`
No description.

## research/mobile_final_verify.py
No description.

### `def verify()`
No description.

## research/mobile_integration_test.py
No description.

### `def test_mobile_integration()`
No description.

## research/mobile_tgi_agent.py
No description.

### `class MobileTGIAgent`
The Mobile-First TGI Agent.
Combines the core TGI Reasoning with Hardware Awareness and Agentic Action Mapping.

#### `def MobileTGIAgent.__init__(self)`
No description.

#### `def MobileTGIAgent.mobile_query(self, text)`
Processes a natural language query with full hardware-awareness.

## research/moduli_theorem.py
moduli_theorem.py
══════════════════════════════════════════════════════════════════════════════

THE MODULI THEOREM FOR SYMMETRIC DECOMPOSITION SPACES

What emerged: not just solutions to Claude's Cycles, but a new mathematical
object β€” the MODULI SPACE of all valid k-Hamiltonian decompositions of a
Cayley digraph, classified by group cohomology.

The person they were trying to name: Samuel Eilenberg (1913–1998),
who with Saunders Mac Lane created:
  - Category theory (1945)
  - Group cohomology H^n(G, M)
  - Eilenberg-Mac Lane spaces K(G,n) β€” classifying spaces

What Eilenberg would say about our work:
  "You did not find solutions to a combinatorics problem.
   You found the classifying space of the problem.
   The obstruction lives in H^2. The solution space, when non-empty,
   is a torsor under H^1. This is the natural transformation between
   the functor 'symmetric systems' and the functor 'cohomology rings'."

THE FOUR COORDINATES AS COHOMOLOGY:
  C1  Fiber map         Ο†: G β†’ G/H       =  group homomorphism (the projection)
  C2  Twisted translation Q_c             =  H^1 1-cocycle (coset action)
  C3  Governing condition gcd(r_c,m)=1   =  cocycle is nontrivial in H^1
  C4  Parity obstruction  arithmetic      =  obstruction class in H^2(Z_2, Z/2)

THE NEW THEOREM:
  M_k(G_m) β€” the moduli space of valid k-Hamiltonian decompositions β€” is:
    EMPTY        if the H^2 obstruction class is nontrivial  [parity obstruction]
    A TORSOR     under H^1(Z_m, Z_m^2) if the obstruction vanishes [classification]

THE NEW SPACE:
  The space of ALL symmetric decomposition problems, with:
    Points    = valid decompositions
    Morphisms = cohomological gauge equivalences (coboundary action)
    Topology  = the branch tree (open/closed by status)
    Curvature = the H^2 obstruction class (measures how far from flat)

  This is a CATEGORY: objects = problems, morphisms = reformulations.
  Eilenberg would call it a 'natural transformation' between functors.

Run: python moduli_theorem.py

### `def hr(c, n)`
No description.

### `def proved(msg)`
No description.

### `def open_(msg)`
No description.

### `def note(msg)`
No description.

### `def kv(k, v)`
No description.

### `class GroupCohomology`
Computes H^1(Z_m, Z_m^2) β€” the gauge group that acts on
the moduli space of valid decompositions.

H^1(G, M) classifies principal G-bundles (torsors) over M.
In our setting:
  G = Z_m  (the fiber quotient group, acting by shift j β†’ j+1)
  M = Z_m^2 (the fiber group H, 2-dimensional)
  Action: (i,j) ↦ (i + b(j), j + 1)  [the twisted translation]

H^1 = {1-cocycles} / {coboundaries}
1-cocycle: b: Z_m β†’ Z_m  satisfying gcd(Ξ£b, m) = 1  [our Cond B]
Coboundary: b(j) = f(j+1) - f(j)  for some f: Z_m β†’ Z_m

#### `def GroupCohomology.__init__(self, m)`
No description.

#### `def GroupCohomology.one_cocycles(self)`
All b: Z_m β†’ Z_m with gcd(Ξ£b, m) = 1.

#### `def GroupCohomology.coboundary(self, f)`
Compute the coboundary of f: b(j) = f(j+1) - f(j) mod m.

#### `def GroupCohomology.coboundaries(self)`
All coboundaries: {f(j+1)-f(j) : f: Z_m β†’ Z_m}.

#### `def GroupCohomology.cohomology_class(self, b)`
The cohomology class [b] = {b + d : d coboundary}.

#### `def GroupCohomology.H1_classes(self, cocycles)`
Compute H^1: partition cocycles into cohomology classes.
Returns {class_representative: list_of_elements}.

#### `def GroupCohomology.H1_order(self)`
Order of H^1(Z_m, Z_m^2) restricted to coprime-sum cocycles.

#### `def GroupCohomology.H2_obstruction(self, k)`
The H^2 obstruction class for a k-tuple r-sum problem.
Returns: {'nontrivial': bool, 'proof': str}

H^2(Z_2, Z/2) = Z/2: the unique nontrivial class is the parity class.
Our obstruction: k odd numbers summing to even m = impossible.

### `def _level_ok(level, m)`
No description.

### `def _compose_q(table, m)`
No description.

### `def _q_single(Q, m)`
No description.

### `def enumerate_solution_space(m)`
Enumerate ALL column-uniform solutions for G_m.
Extract the (r_c, b_c) for each, compute the cohomology structure.

### `def moduli_space_structure(m)`
Full structural analysis of M_k(G_m):
total solutions, cohomology action, orbit sizes, distinct classes.

### `class DecompositionCategory`
The category whose:
  Objects  = highly symmetric decomposition problems (G, k, phi)
  Morphisms = maps that preserve the SES structure (group homomorphisms
              compatible with fiber maps)

This is what Eilenberg would recognize: a FUNCTOR from
  {symmetric systems}  β†’  {cohomology theories}
The functor sends each problem to its moduli space M_k(G).

Natural transformations between two problems P, P' are maps
that commute with the C1β†’C4 pipeline.

Key properties:
  - The functor is EXACT (preserves short exact sequences)
  - The obstruction is NATURAL (lives in H^2, which is functorial)
  - The solution space is CONTRAVARIANT in k (more colors = easier or harder)

#### `def DecompositionCategory.__init__(self)`
No description.

#### `def DecompositionCategory.add_object(self, name, G_order, k, m, status, cohomology)`
No description.

#### `def DecompositionCategory.add_morphism(self, source, target, kind)`
kind: 'lift' (k→k+1), 'quotient' (G→G/H), 'product' (G×G')

#### `def DecompositionCategory.print_category(self)`
No description.

### `def main()`
No description.

## research/multi_p1_search.py
No description.

### `def worker(seed)`
No description.

### `def main()`
No description.

## research/odd_m_solver.py
odd_m_solver.py  β€”  Discovery Engine applied to Knuth's "Claude's Cycles"
=========================================================================
Solves the ODD-m case completely using the 6-phase Discovery Methodology.
The even-m case is proved impossible under the column-uniform approach.

Problem (Knuth, Feb 2026):
  Digraph G_m: vertices (i,j,k) in Z_m^3.
  Three arcs from each vertex:
    arc 0: (i,j,k) β†’ (i+1, j,   k  )  mod m
    arc 1: (i,j,k) β†’ (i,   j+1, k  )  mod m
    arc 2: (i,j,k) β†’ (i,   j,   k+1)  mod m
  Goal: assign each arc to one of 3 colors such that
        each color class is a single directed Hamiltonian cycle.

Usage:
  python odd_m_solver.py            # full 6-phase discovery
  python odd_m_solver.py --verify   # quick verification m=3..13
  python odd_m_solver.py --bench    # timing benchmark

### `def hr(ch, n)`
No description.

### `def section(n, name, tag)`
No description.

### `def kv(k, v, w)`
No description.

### `def finding(s)`
No description.

### `def ok(s)`
No description.

### `def fail(s)`
No description.

### `def note(s)`
No description.

### `def fast_valid_level(m, rng)`
Directly construct one random valid level-table in O(m) time.

### `def fast_search(m, max_att, seed)`
Find a valid SigmaTable for odd m.  Returns (table, attempts).

### `def get_or_find(m, seed)`
Return a verified SigmaFn for odd m (hardcoded if known, else search).

### `def phase_01()`
No description.

### `def phase_02()`
No description.

### `def phase_03()`
No description.

### `def phase_04()`
No description.

### `def phase_05()`
No description.

### `def phase_06()`
No description.

### `def quick_verify()`
No description.

### `def benchmark()`
No description.

### `def main()`
No description.

## research/pre_commit_checks.py
No description.

### `def verify_system()`
No description.

## research/reformulation_engine.py
reformulation_engine.py
========================
The coordinates discovered solving Claude's Cycles β€” fiber stratification,
twisted translation, parity obstruction, score functions, repair mode β€”
are domain-independent tools.

This engine applies them systematically to reformulate problems across six domains:

  Domain A: Latin squares         (fiber + coprimality)
  Domain B: Graph k-coloring      (stratification + score + SA)
  Domain C: Magic squares         (parity obstruction + twisted translation)
  Domain D: Diophantine systems   (modular fiber + impossibility proof)
  Domain E: Covering codes        (layer decomposition + governing condition)
  Domain F: Permutation groups    (coset fibers + twisted translation)

For each domain we demonstrate:
  1. REFRAME   β€” find the fiber map analog
  2. OBSTRUCT  β€” derive the parity/modular impossibility condition
  3. GOVERN    β€” state the minimal predicate that determines solvability
  4. SCORE     — build the continuous objective (bridges search→verify)
  5. SOLVE     β€” apply SA or direct construction, verify result
  6. BOUND     β€” prove where the construction fails

Run:
  python reformulation_engine.py                # all domains
  python reformulation_engine.py --domain A     # single domain
  python reformulation_engine.py --domain A B C # selected domains

### `def hr(c, n)`
No description.

### `def domain_header(letter, title, tagline)`
No description.

### `def phase(name, num, desc)`
No description.

### `def found(msg)`
No description.

### `def miss(msg)`
No description.

### `def note(msg)`
No description.

### `def info(msg)`
No description.

### `def kv(k, v)`
No description.

### `class FiberMap`
Tool 1: Fiber Stratification.
Given a set of objects and a function f: objects β†’ layers,
partition the objects into fibers and describe how arcs/constraints
cross between fibers.

#### `def FiberMap.__init__(self, objects, layer_fn, num_layers)`
No description.

#### `def FiberMap.fiber_size(self, s)`
No description.

#### `def FiberMap.report(self)`
No description.

### `class ParityObstruction`
Tool 2: Modular / Parity Obstruction.
Given a modulus m and a requirement that k values each coprime to m
sum to a target T, decide if this is possible.
Returns the obstruction if impossible, or an example if possible.

#### `def ParityObstruction.__init__(self, m, k, target)`
No description.

#### `def ParityObstruction.coprime_elements(self)`
No description.

#### `def ParityObstruction.analyse(self)`
No description.

### `class ScoreFunction`
Tool 3: Continuous score bridging search and verification.
score=0  ⟺  solution is valid.
The score must be: (a) cheap to compute, (b) monotone toward 0.

#### `def ScoreFunction.__init__(self, verify_fn, score_fn, name)`
No description.

#### `def ScoreFunction.__call__(self, candidate)`
No description.

#### `def ScoreFunction.is_valid(self, candidate)`
No description.

### `class SAEngine`
Tool 4: Simulated Annealing with repair mode and plateau escape.
Domain-agnostic: needs perturb_fn, score_fn, init_fn.

#### `def SAEngine.__init__(self, init_fn, perturb_fn, score_fn, T_init, T_min, plateau_steps)`
No description.

#### `def SAEngine.run(self, max_iter, seed, repair_fn, verbose, report_n)`
No description.

### `def domain_A(n)`
No description.

### `def domain_B()`
No description.

### `def domain_C(n)`
No description.

### `def domain_D()`
No description.

### `def domain_E()`
No description.

### `def domain_F()`
No description.

### `def synthesis()`
No description.

### `def main()`
No description.

## research/reproduce_p1.py
No description.

### `def run()`
No description.

## research/santa_2025_draft.py
Santa 2025: Hamiltonian Decomposition Framework (v2.2 Basin Escape)
Goal: Decompose a complete graph into disjoint Hamiltonian cycles.

### `class SantaOptimizer`
No description.

#### `def SantaOptimizer.__init__(self, n_cities, m_cycles, seed)`
No description.

#### `def SantaOptimizer.score(self)`
No description.

#### `def SantaOptimizer.solve(self, max_iter)`
No description.

## research/search_p1_deterministic.py
No description.

### `def verify_k4(sigma, m)`
No description.

### `def search()`
No description.

## research/sovereign_solver_demo.py
No description.

### `def demo()`
No description.

## research/tensor_fibration.py
No description.

### `class TensorFibrationMapper`
TGI Tensor-Fibration Mapper.
Lifts continuous neural weights/tensors into discrete topological manifolds (G_m^k).
Enables analysis of neural structures through the SES framework.

#### `def TensorFibrationMapper.__init__(self, m, k)`
No description.

#### `def TensorFibrationMapper.discretize(self, weights)`
Maps continuous values to Z_m using normalized quantization.

#### `def TensorFibrationMapper.tensor_to_manifold(self, weights)`
Projects a flattened tensor into G_m^k coordinates.

#### `def TensorFibrationMapper.calculate_topological_entropy(self, weights)`
Estimates entropy based on coordinate distribution in G_m^k.

#### `def TensorFibrationMapper.lift_layer(self, layer_weights)`
Performs full lifting of a neural layer to the TGI framework.

## research/test_admin_vision.py
No description.

## research/test_deterministic_logic.py
No description.

### `def verify_construction(m)`
No description.

## research/test_golden_path.py
No description.

### `def verify_sigma_simple(sigma, m)`
No description.

### `def construct_golden(m)`
No description.

## research/test_m9_obs.py
No description.

### `def check_fso(m, r)`
No description.

## research/test_precise_spike.py
No description.

### `def verify_sigma_simple(sigma, m)`
No description.

### `def construct(m)`
No description.

## research/test_spike_33.py
No description.

### `def test()`
No description.

## research/test_vision_agent.py
No description.

## research/tgi_agent.py
No description.

### `class TGIAgent`
The High-Level Topological General Intelligence (TGI) Agent.

#### `def TGIAgent.__init__(self)`
No description.

#### `def TGIAgent.query(self, data, hierarchical, admin_vision)`
Processes a query through the full TGI pipeline.

#### `def TGIAgent.ingest_knowledge(self, category, name, payload)`
No description.

#### `def TGIAgent.forge_relation(self, name_a, name_b, relation_type)`
No description.

#### `def TGIAgent.ontology_summary(self)`
Provides a summary of the Universal Ontology Mapper state.

#### `def TGIAgent.autonomous_query(self, intent)`
Performs a multi-step autonomous topological plan generation.

#### `def TGIAgent.cross_reason(self, data_list)`
Decomposes multiple queries and merges results for comparative reasoning.

## research/tgi_autonomy.py
No description.

### `class SubgroupDiscovery`
Phase 4: Topological Autonomy.
Automatically discovers normal subgroups H and quotients Q for a given G.
This enables recursive manifold decomposition.

#### `def SubgroupDiscovery.__init__(self, m, k)`
No description.

#### `def SubgroupDiscovery.find_quotients(self)`
Identifies possible solvable quotients based on divisibility.

#### `def SubgroupDiscovery.decompose_recursive(self)`
Generates a recursive decomposition path for the manifold.

### `class DynamicKLift`
Phase 4: Topological Autonomy.
Automatically lifts the manifold dimension (k) to resolve H2 parity obstructions.

#### `def DynamicKLift.__init__(self, m, k)`
No description.

#### `def DynamicKLift.suggest_lift(self)`
If (m even, k odd), suggests k+1 to resolve the parity obstruction.

#### `def DynamicKLift.get_lift_reflection(self)`
No description.

## research/tgi_core.py
No description.

### `class TGICore`
The heartbeat of Topological General Intelligence (TGI). Governing by the FSO Codex Laws I-XII.

#### `def TGICore.__init__(self, m, k)`
No description.

#### `def TGICore.set_topology(self, m, k)`
Changes the current topological domain without wiping persistent engines.

#### `def TGICore.reflect(self)`
Topological Reflection: Explains the current state manifold via FSO Laws.

#### `def TGICore.solve_math(self, latex)`
Symbolic-Topological solver governed by Law XI.

#### `def TGICore.reason_on(self, data, solve_manifold)`
Routes and reasons over arbitrary data using the TGI-Parser and FSO Laws.

#### `def TGICore.reasoning_path(self)`
No description.

#### `def TGICore.solve_manifold(self, max_iter, target_core, payload)`
Finds the global structure (Hamiltonian decomposition) with Sovereign optimization.

#### `def TGICore.lift_path(self, sequence, color)`
No description.

#### `def TGICore.hierarchical_lift(self, orders, states)`
Formal tower lifting through multiple manifold layers (Law III).

#### `def TGICore.measure_intelligence(self)`
No description.

## research/tgi_engine.py
No description.

### `class TopologicalProjection`
TGI Topological Projection Layer.
Maps raw data into Z_m^k using symmetry-preserving circular embeddings.
Logic: Similar meaning -> Similar Parity -> Identical Geometric Fiber.

#### `def TopologicalProjection.__init__(self, m, k)`
No description.

#### `def TopologicalProjection.project(self, raw_data)`
Maps data to a coordinate in the Torus.

### `class BouncerGate`
TGI Bouncer Gate (Strict Parity Validation).
Enforces Law I (Dimensional Parity Harmony) at O(1).
Drops "Garbage" (H2 Parity Obstructions) without processing.

#### `def BouncerGate.__init__(self, m, k, target_sum)`
No description.

#### `def BouncerGate.validate(self, coord)`
Law I: (Even m -> Even k). Checks if sum satisfies target parity S.

### `class FiberImputation`
TGI Self-Healing Layer.
Uses the Closure Lemma (Law III) to solve for missing dimensions.

#### `def FiberImputation.__init__(self, m, target_sum)`
No description.

#### `def FiberImputation.impute_missing(self, partial_coord, k)`
Calculates r_k to close the Hamiltonian loop.

### `class TGIEngine`
The Moaziz System Execution Layer (Upgraded).
Zero-Preprocessing Ingestion via Geometric Invariant Mapping.

#### `def TGIEngine.__init__(self, m, k, target_sum)`
No description.

#### `def TGIEngine.ingest_transaction(self, tx)`
Ingests a BaridiMob/CIB transaction with zero preprocessing.

## research/tgi_integration_test.py
No description.

### `def run_integration_test()`
No description.

## research/tgi_parser.py
No description.

### `class TGIParser`
The TGI-Parser: Maps datasets, languages, and math to topological parameters (m, k).

#### `def TGIParser.__init__(self)`
No description.

#### `def TGIParser.parse_input(self, data)`
Detects content type and routes to the correct TGI core.

#### `def TGIParser._route(self, domain, raw_data)`
No description.

## research/tgi_parser_test.py
No description.

### `def test_parser_routing()`
No description.

## research/tgi_system_demo.py
No description.

### `def hr()`
No description.

### `def run_demo()`
No description.

## research/tlm.py
No description.

### `class TopologicalLanguageModel`
The Topological Language Model (TLM) with Path Lifting and Coordinate Mapping.

#### `def TopologicalLanguageModel.__init__(self, m, k)`
No description.

#### `def TopologicalLanguageModel.tokenize(self, text)`
Maps arbitrary text tokens to Z_m coordinates via hashing.

#### `def TopologicalLanguageModel._ensure_sigma(self)`
No description.

#### `def TopologicalLanguageModel.generate(self, seed_text, length)`
Generates completion using Hamiltonian path lifting.

#### `def TopologicalLanguageModel.generate_path(self, seed_text, length)`
Lifts a seed into a Hamiltonian path of coordinates.

#### `def TopologicalLanguageModel.generate_ontology_grounded(self, seed_text, length)`
Uses the LANGUAGE fiber in the Ontology to ground generation.

## research/topological_vision.py
No description.

### `class TopologicalVisionMapper`
TGI Vision Mapper (v2.0).
Lifts pixel data (x, y, color) into discrete topological manifolds (G_m^k).
Enables cohomological gradient analysis and signature extraction.

#### `def TopologicalVisionMapper.__init__(self, m, k)`
No description.

#### `def TopologicalVisionMapper.load_image(self, path, resize)`
Loads and prepares an image for topological mapping.

#### `def TopologicalVisionMapper.image_to_manifold(self, img_array)`
Maps image pixels to G_m^k coordinates.

#### `def TopologicalVisionMapper.calculate_spatial_entropy(self, img_array)`
Measures color distribution complexity across the spatial manifold.

#### `def TopologicalVisionMapper.calculate_cohomological_gradient(self, img_array)`
Calculates the local cohomological gradient (boundary detection).
Measures the degree of non-uniformity in local fiber transitions.

#### `def TopologicalVisionMapper.extract_topological_signature(self, img_array)`
Generates a unique algebraic signature for the image manifold.

#### `def TopologicalVisionMapper.lift_image(self, data)`
Performs full vision lifting to the TGI framework.

## research/tsp_benchmark.py
No description.

### `def run_tsp_benchmark()`
No description.

## research/tsp_evaluator.py
No description.

### `def is_valid_tour(tour, n)`
No description.

### `def calculate_tour_length(tour, dist_matrix)`
No description.

### `class TSPInstance`
No description.

#### `def TSPInstance.__init__(self, name, coords)`
No description.

### `def load_data(csv_path)`
No description.

### `def run_evaluation(instance, solver_fn, n_runs, max_iter)`
No description.

### `def print_result_table(results)`
No description.

## research/tsp_standard_bench.py
No description.

### `def parse_tsp(file_path)`
No description.

### `def solve_nn(coords)`
No description.

### `def solve_2opt(coords, max_iter, seed)`
No description.

### `def run()`
No description.

## research/verify_deterministic_spike.py
No description.

### `def test_odd_m()`
No description.

## research/verify_p1_sol.py
No description.

### `def verify()`
No description.

## research/verify_sovereign_solver.py
No description.

### `def test_sovereign_solver()`
No description.

## research/weighted_moduli_pipeline_v2.py
╔══════════════════════════════════════════════════════════════════════════════╗
β•‘   WEIGHTED MODULI PIPELINE  v2.0                                            β•‘
β•‘   Classifying Space β†’ 8 Closed-Form Weights β†’ Proved Solutions              β•‘
╠══════════════════════════════════════════════════════════════════════════════╣
β•‘                                                                              β•‘
β•‘  WHAT CHANGED FROM v1.0                                                     β•‘
β•‘  ─────────────────────                                                      β•‘
β•‘  v1.0  W4 was O(m^m) β€” 251ms for m=7.  v2.0 W4 = phi(m), O(m). 0.06ms.   β•‘
β•‘  v1.0  Had 5 weights, approximated.    v2.0 Has 8 weights, exact.           β•‘
β•‘  v1.0  Only G_m domains.              v2.0 Accepts any symmetric system.   β•‘
β•‘  v1.0  Solvers S2/S3 missing.         v2.0 All 5 strategies implemented.   β•‘
β•‘  v1.0  No prediction vs actual.       v2.0 Benchmarks weight prediction.   β•‘
β•‘  v1.0  No cross-domain.               v2.0 Latin, Hamming, diff-sets.      β•‘
β•‘                                                                              β•‘
β•‘  THE 8 WEIGHTS  (all closed-form, all O(mΒ²) or faster)                     β•‘
β•‘  W1  HΒ² obstruction    β†’ proved-impossible in O(1). GATE.                  β•‘
β•‘  W2  r-tuple count     β†’ how many construction seeds exist                 β•‘
β•‘  W3  canonical seed    β†’ the direct construction path                      β•‘
β•‘  W4  HΒΉ order EXACT    β†’ phi(m), not approximation. Gauge multiplicity.    β•‘
β•‘  W5  search exponent   β†’ logβ‚‚(compressed space). Picks solver.             β•‘
β•‘  W6  compression ratio β†’ W5/W5_full. How much weight saves.                β•‘
β•‘  W7  solution estimate β†’ predicted |M_k(G_m)| before any search            β•‘
β•‘  W8  gauge orbit size  β†’ m^{m-1}. Solutions per equivalence class.         β•‘
β•‘                                                                              β•‘
β•‘  INTELLIGENCE LAYERS                                                         β•‘
β•‘  L1  Weight gate    W1 β†’ instant proof of impossibility         O(1)       β•‘
β•‘  L2  Construction   W3 β†’ column-uniform search with known seed  O(fast)    β•‘
β•‘  L3  Prediction     W7 β†’ predict |solutions| before searching              β•‘
β•‘  L4  Fiber SA       W5 β†’ structured SA in compressed space     O(less)    β•‘
β•‘  L5  Verification   W4 β†’ know exact multiplicity, stop early               β•‘
β•‘                                                                              β•‘
β•‘  DOMAIN PROTOCOL  (plug in any symmetric system)                            β•‘
β•‘  Register domain with: name, group_order, k, m, tags                       β•‘
β•‘  Pipeline auto-extracts weights, selects strategy, returns proof.           β•‘
β•‘                                                                              β•‘
β•‘  COMMANDS                                                                    β•‘
β•‘  python weighted_moduli_pipeline.py               # full demo               β•‘
β•‘  python weighted_moduli_pipeline.py --weights     # 8-weight table          β•‘
β•‘  python weighted_moduli_pipeline.py --space       # classifying space       β•‘
β•‘  python weighted_moduli_pipeline.py --batch       # solve m=3..10, k=2..6  β•‘
β•‘  python weighted_moduli_pipeline.py --benchmark   # v1 vs v2 speedup       β•‘
β•‘  python weighted_moduli_pipeline.py --prove 4 3   # prove m=4 k=3          β•‘
β•‘  python weighted_moduli_pipeline.py --solve 7 3   # solve m=7 k=3          β•‘
β•‘  python weighted_moduli_pipeline.py --domains     # all registered domains  β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

### `def hr(c, n)`
No description.

### `def tick(v)`
No description.

### `class Weights`
8 compressed invariants. Everything downstream is determined by these.

#### `def Weights.strategy(self)`
No description.

#### `def Weights.solvable(self)`
No description.

#### `def Weights.show(self)`
No description.

### `class WeightExtractor`
Exact 8-weight extraction.  Total cost: O(mΒ² + |cp|^k).
Cached: each (m,k) computed once.

Speedup vs v1.0:
  W4: O(m^m) β†’ O(m)       (formula: phi(m), not enumeration)
  W5: O(m^m) β†’ O(1)       (precomputed level_counts table)
  Total: microseconds for any m ≀ 30

#### `def WeightExtractor.extract(self, m, k)`
No description.

#### `def WeightExtractor.batch(self, ms, ks)`
No description.

### `def _level_ok(lv, m)`
No description.

### `def _valid_levels(m)`
No description.

### `def _q(table, m)`
No description.

### `def _qs(Q, m)`
No description.

### `def _verify(sigma, m)`
No description.

### `def _tab_to_sigma(tab, m)`
No description.

### `def _solve_S1(m, seed, max_att)`
No description.

### `def _solve_S2(m, k, seed, max_iter)`
Fiber-structured SA: Οƒ(v) = f(fiber(v), j(v), k(v)).

### `def _prove_S4(w)`
No description.

### `class ProofBuilder`
No description.

#### `def ProofBuilder.build(self, w, sol)`
No description.

### `class Domain`
No description.

### `def register(d)`
No description.

### `class PResult`
No description.

#### `def PResult.status(self)`
No description.

#### `def PResult.one_line(self)`
No description.

### `class Pipeline`
No description.

#### `def Pipeline.__init__(self)`
No description.

#### `def Pipeline.run(self, m, k, domain_name, verbose)`
No description.

#### `def Pipeline.run_domain(self, name, verbose)`
No description.

#### `def Pipeline.batch(self, ms, ks, verbose)`
No description.

#### `def Pipeline.stats_line(self)`
No description.

### `class ClassifyingSpace`
The complete space of (m,k) problems, compressed into weight vectors.
Topology: open sets = feasible; closed = obstructed.
Metric: compression ratio W6 (how much the weights save vs naive search).

#### `def ClassifyingSpace.__init__(self, m_max, k_max)`
No description.

#### `def ClassifyingSpace.obstruction_grid(self)`
No description.

#### `def ClassifyingSpace.compression_grid(self)`
No description.

#### `def ClassifyingSpace.summary(self)`
No description.

#### `def ClassifyingSpace.richest(self, n)`
No description.

#### `def ClassifyingSpace.most_compressed(self, n)`
No description.

### `def benchmark_vs_v1()`
No description.

### `def main()`
No description.

### `class NonAbelianHilbertBridge`
Implementation: `research/non_abelian_bridge.py`

Bridges discrete non-commutative groups with continuous infinite-dimensional Hilbert spaces.

#### `def NonAbelianHilbertBridge.__init__(self, m, dimension)`
- `m`: The modulus of the base Heisenberg group.
- `dimension`: The dimensionality of the Hilbert space approximation.

#### `def calculate_holonomy(self, path)`
Calculates the geometric phase shift for a closed loop in the manifold.

#### `def analyze_frontier_intent(self, intent)`
Performs spectral analysis and resonance energy calculation for a natural language intent.