diff --git a/data/spectral_codebook.json b/data/spectral_codebook.json new file mode 100644 index 00000000..0c4d5236 --- /dev/null +++ b/data/spectral_codebook.json @@ -0,0 +1,5504 @@ +{ + "schema": "spectral_codebook_v2", + "generated": "2026-07-01", + "source": "formal/SilverSight/PIST/Matrices250.lean", + "matrix_count": 250, + "lambda_semantics": "spectral_radius is the exact max root modulus of the integer characteristic polynomial (charpoly); lambda_power_iteration is the legacy estimate and is unreliable on peripheral spectra", + "quantization": { + "method": "gap_aware_deduped_min_support", + "gap_factor": 3.0, + "min_support": 10, + "median_gap": 0.021671, + "threshold": 0.065013, + "boundaries": [ + 0.5, + 1.07435, + 1.459915, + 2.725096, + 3.359837, + 3.731092, + 4.32637, + 6.126622 + ], + "candidate_boundaries": [ + 0.5, + 1.07435, + 1.268409, + 1.459915, + 2.725096, + 3.359837, + 3.731092, + 4.148955, + 4.32637, + 4.539174, + 4.62582, + 4.717449, + 4.820098, + 5.006531, + 5.335163, + 5.709344, + 6.126622, + 6.450877, + 6.724978, + 6.977877, + 7.113456, + 7.371759, + 7.656836, + 8.049133, + 8.432153, + 8.853329, + 9.65061, + 10.888428, + 14.121834, + 16.776822 + ], + "suppressed_boundaries": [ + 1.268409, + 4.148955, + 4.539174, + 4.62582, + 4.717449, + 4.820098, + 5.006531, + 5.335163, + 5.709344, + 6.450877, + 6.724978, + 6.977877, + 7.113456, + 7.371759, + 7.656836, + 8.049133, + 8.432153, + 8.853329, + 9.65061, + 10.888428, + 14.121834, + 16.776822 + ], + "sparse_tail_cutoff": 7.656836 + }, + "clusters": [ + { + "codeword": "C0", + "count": 35, + "distinct_matrices": 31, + "lambda_min": 0.0, + "lambda_max": 0.0, + "sparse_tail_members": 0 + }, + { + "codeword": "C1", + "count": 20, + "distinct_matrices": 20, + "lambda_min": 1.0, + "lambda_max": 1.000003, + "sparse_tail_members": 0 + }, + { + "codeword": "C2", + "count": 13, + "distinct_matrices": 13, + "lambda_min": 1.148698, + "lambda_max": 1.4253, + "sparse_tail_members": 0 + }, + { + "codeword": "C3", + "count": 79, + "distinct_matrices": 77, + "lambda_min": 1.49453, + "lambda_max": 2.69193, + "sparse_tail_members": 0 + }, + { + "codeword": "C4", + "count": 29, + "distinct_matrices": 28, + "lambda_min": 2.758262, + "lambda_max": 3.290975, + "sparse_tail_members": 0 + }, + { + "codeword": "C5", + "count": 15, + "distinct_matrices": 14, + "lambda_min": 3.428699, + "lambda_max": 3.697041, + "sparse_tail_members": 0 + }, + { + "codeword": "C6", + "count": 22, + "distinct_matrices": 20, + "lambda_min": 3.765143, + "lambda_max": 4.288853, + "sparse_tail_members": 0 + }, + { + "codeword": "C7", + "count": 19, + "distinct_matrices": 18, + "lambda_min": 4.363888, + "lambda_max": 5.878936, + "sparse_tail_members": 0 + }, + { + "codeword": "C8", + "count": 18, + "distinct_matrices": 17, + "lambda_min": 6.374309, + "lambda_max": 16.991482, + "sparse_tail_members": 10 + } + ], + "collisions": { + "corpus_size": 250, + "distinct_matrices": 238, + "duplicate_matrix_groups": 11, + "duplicate_matrix_members": 23, + "duplicate_matrix_classes": [ + [ + "rrc_eq_05370b4783a8bd6a", + "rrc_eq_068487b9141c4fb6", + "rrc_eq_e25b46d22b7ca0f1" + ], + [ + "rrc_eq_1038b814e5a78435", + "rrc_eq_673652a4317dd847" + ], + [ + "rrc_eq_185011f4d6cf6a2b", + "rrc_eq_8b812bf47cc024b4" + ], + [ + "rrc_eq_296f8ca4495edd26", + "rrc_eq_3e634eac50426ea3" + ], + [ + "rrc_eq_2f44e729b9d25d34", + "rrc_eq_e4b70a718fcfb1ab" + ], + [ + "rrc_eq_35e1c2bc2da6d854", + "rrc_eq_b9eb3119b4d99483" + ], + [ + "rrc_eq_3f87d2c06726bc30", + "rrc_eq_ac1a7a22801b7d77" + ], + [ + "rrc_eq_5e10957e0cbb9de8", + "rrc_eq_8c569cbfc2385eab" + ], + [ + "rrc_eq_811d99697e055c2b", + "rrc_eq_f691b1b9f433854f" + ], + [ + "rrc_eq_8a05e2496e67848b", + "rrc_eq_a9bdc40d07c74659" + ], + [ + "rrc_eq_8a4d6790faf66d6b", + "rrc_eq_dd01aec7b2c20774" + ] + ], + "unique_lambda_4dp": 179, + "lambda_collision_groups": 15, + "lambda_collision_members": 86, + "unique_charpoly": 196, + "charpoly_collision_groups": 13, + "charpoly_collision_members": 67, + "charpoly_collision_classes": { + "-1,0,0,0,0,0,0,0": [ + "rrc_eq_0252524b379eac41", + "rrc_eq_4cab00eaeac59782", + "rrc_eq_a91f2f772995a9b9", + "rrc_eq_c704bc7e7c531303", + "rrc_eq_d767dc5b5996f6dc" + ], + "0,0,0,0,0,0,0,0": [ + "rrc_eq_03c5ca134c799e06", + "rrc_eq_05370b4783a8bd6a", + "rrc_eq_068487b9141c4fb6", + "rrc_eq_0edd7758873784a5", + "rrc_eq_1038b814e5a78435", + "rrc_eq_131b32c8ed70796c", + "rrc_eq_17cb89b04d825252", + "rrc_eq_217148f607dfe5ff", + "rrc_eq_2f9d4e3b2060b799", + "rrc_eq_3a60fca57229c15b", + "rrc_eq_3e9910b639adf295", + "rrc_eq_3f87b53694e706e9", + "rrc_eq_3fc5864a199b7aa9", + "rrc_eq_434ad4a173c4cb24", + "rrc_eq_4795802d1dfe8dc9", + "rrc_eq_4b0eb5baf8d88582", + "rrc_eq_673652a4317dd847", + "rrc_eq_7533d46cedd4a4c5", + "rrc_eq_774c019464fd328c", + "rrc_eq_7995b3bdb3f05ce3", + "rrc_eq_84f94841b9e9578b", + "rrc_eq_8a4d6790faf66d6b", + "rrc_eq_8ffeff0c4877aa25", + "rrc_eq_9781272a1dff3d7d", + "rrc_eq_9c22fd7b336c5904", + "rrc_eq_b650dd7bdbcd9bcb", + "rrc_eq_bcd458bef84fe2a2", + "rrc_eq_bfd316d8427b2f6c", + "rrc_eq_c221ccc2bc9ccc45", + "rrc_eq_c5a00dead68e12a0", + "rrc_eq_dd01aec7b2c20774", + "rrc_eq_e0ac7e1847f830a3", + "rrc_eq_e25b46d22b7ca0f1", + "rrc_eq_e5f58db6423d2f9c", + "rrc_eq_fe98a523c9c0b821" + ], + "-1,-1,0,-1,0,0,0,0": [ + "rrc_eq_185011f4d6cf6a2b", + "rrc_eq_891a81dfc968f58e", + "rrc_eq_8b812bf47cc024b4" + ], + "0,0,-1,0,0,0,0,0": [ + "rrc_eq_1d0a752af1946515", + "rrc_eq_7076f5bdea119531", + "rrc_eq_71dd02d32f3e59b0", + "rrc_eq_cbefaa1738883221", + "rrc_eq_d07532a1db76d958", + "rrc_eq_ecf3ddf7af735ee6" + ], + "0,-10,-8,-6,-30,-29,-8,0": [ + "rrc_eq_296f8ca4495edd26", + "rrc_eq_3e634eac50426ea3" + ], + "0,-2,-3,-2,-6,0,-2,0": [ + "rrc_eq_2f44e729b9d25d34", + "rrc_eq_e4b70a718fcfb1ab" + ], + "-3,-5,-1,-13,34,8,-10,2": [ + "rrc_eq_35e1c2bc2da6d854", + "rrc_eq_b9eb3119b4d99483" + ], + "-7,-145,-453,259,3252,25492,44348,-164234": [ + "rrc_eq_3f87d2c06726bc30", + "rrc_eq_ac1a7a22801b7d77" + ], + "0,0,0,-2,0,0,0,0": [ + "rrc_eq_5a01598605abcd3f", + "rrc_eq_5d39c74f1cbc3aab" + ], + "-4,-2,6,2,2,-3,2,0": [ + "rrc_eq_5e10957e0cbb9de8", + "rrc_eq_8c569cbfc2385eab" + ], + "0,-1,0,0,0,0,0,0": [ + "rrc_eq_64f81fa3c4725d4e", + "rrc_eq_c3dde450e7ce933a" + ], + "0,-5,-8,-3,-2,-2,1,0": [ + "rrc_eq_811d99697e055c2b", + "rrc_eq_f691b1b9f433854f" + ], + "-2,-7,-20,-56,-68,-84,-76,26": [ + "rrc_eq_8a05e2496e67848b", + "rrc_eq_a9bdc40d07c74659" + ] + }, + "cospectral_nonidentical_groups": 6, + "cospectral_nonidentical": { + "-1,0,0,0,0,0,0,0": [ + "rrc_eq_0252524b379eac41", + "rrc_eq_4cab00eaeac59782", + "rrc_eq_a91f2f772995a9b9", + "rrc_eq_c704bc7e7c531303", + "rrc_eq_d767dc5b5996f6dc" + ], + "0,0,0,0,0,0,0,0": [ + "rrc_eq_03c5ca134c799e06", + "rrc_eq_05370b4783a8bd6a", + "rrc_eq_068487b9141c4fb6", + "rrc_eq_0edd7758873784a5", + "rrc_eq_1038b814e5a78435", + "rrc_eq_131b32c8ed70796c", + "rrc_eq_17cb89b04d825252", + "rrc_eq_217148f607dfe5ff", + "rrc_eq_2f9d4e3b2060b799", + "rrc_eq_3a60fca57229c15b", + "rrc_eq_3e9910b639adf295", + "rrc_eq_3f87b53694e706e9", + "rrc_eq_3fc5864a199b7aa9", + "rrc_eq_434ad4a173c4cb24", + "rrc_eq_4795802d1dfe8dc9", + "rrc_eq_4b0eb5baf8d88582", + "rrc_eq_673652a4317dd847", + "rrc_eq_7533d46cedd4a4c5", + "rrc_eq_774c019464fd328c", + "rrc_eq_7995b3bdb3f05ce3", + "rrc_eq_84f94841b9e9578b", + "rrc_eq_8a4d6790faf66d6b", + "rrc_eq_8ffeff0c4877aa25", + "rrc_eq_9781272a1dff3d7d", + "rrc_eq_9c22fd7b336c5904", + "rrc_eq_b650dd7bdbcd9bcb", + "rrc_eq_bcd458bef84fe2a2", + "rrc_eq_bfd316d8427b2f6c", + "rrc_eq_c221ccc2bc9ccc45", + "rrc_eq_c5a00dead68e12a0", + "rrc_eq_dd01aec7b2c20774", + "rrc_eq_e0ac7e1847f830a3", + "rrc_eq_e25b46d22b7ca0f1", + "rrc_eq_e5f58db6423d2f9c", + "rrc_eq_fe98a523c9c0b821" + ], + "-1,-1,0,-1,0,0,0,0": [ + "rrc_eq_185011f4d6cf6a2b", + "rrc_eq_891a81dfc968f58e", + "rrc_eq_8b812bf47cc024b4" + ], + "0,0,-1,0,0,0,0,0": [ + "rrc_eq_1d0a752af1946515", + "rrc_eq_7076f5bdea119531", + "rrc_eq_71dd02d32f3e59b0", + "rrc_eq_cbefaa1738883221", + "rrc_eq_d07532a1db76d958", + "rrc_eq_ecf3ddf7af735ee6" + ], + "0,0,0,-2,0,0,0,0": [ + "rrc_eq_5a01598605abcd3f", + "rrc_eq_5d39c74f1cbc3aab" + ], + "0,-1,0,0,0,0,0,0": [ + "rrc_eq_64f81fa3c4725d4e", + "rrc_eq_c3dde450e7ce933a" + ] + }, + "identified_by_lambda_4dp": 164, + "identified_by_charpoly": 183, + "power_iteration_artifacts": [ + "rrc_eq_1d0a752af1946515", + "rrc_eq_1f12deb00ad16d8f", + "rrc_eq_2efd637f1e4bd389", + "rrc_eq_5a01598605abcd3f", + "rrc_eq_5d39c74f1cbc3aab", + "rrc_eq_a4adf8b5cc0e5c73", + "rrc_eq_bb071a3f64f90363", + "rrc_eq_bd8bcf9cb663c096", + "rrc_eq_bedb0334896533f3", + "rrc_eq_bf1b905e94089ddc", + "rrc_eq_c3dde450e7ce933a", + "rrc_eq_cd4dfc767616524d", + "rrc_eq_d07532a1db76d958", + "rrc_eq_dd3140340d9c9a33", + "rrc_eq_decad728fbd76456", + "rrc_eq_def9542a5004dc68", + "rrc_eq_ecf3ddf7af735ee6", + "rrc_eq_f112b5836bdbd47d" + ], + "power_iteration_artifact_count": 18 + }, + "entries": [ + { + "equation_id": "rrc_eq_01ab6e9c32652d06", + "codeword": "C3", + "index": 35, + "spectral_radius": 2.02296, + "lambda_power_iteration": 2.02296, + "charpoly": [ + 0, + -3, + -1, + -3, + 0, + 4, + -5, + 3 + ], + "density": 0.25, + "frobenius": 4.2426, + "trace": 0 + }, + { + "equation_id": "rrc_eq_01f85e831660c26e", + "codeword": "C3", + "index": 40, + "spectral_radius": 2.108646, + "lambda_power_iteration": 2.108646, + "charpoly": [ + -2, + -2, + 6, + -6, + 4, + -3, + 0, + 0 + ], + "density": 0.25, + "frobenius": 4.2426, + "trace": 2 + }, + { + "equation_id": "rrc_eq_0252524b379eac41", + "codeword": "C1", + "index": 2, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.0, + "charpoly": [ + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0312, + "frobenius": 1.4142, + "trace": 1 + }, + { + "equation_id": "rrc_eq_03c5ca134c799e06", + "codeword": "C0", + "index": 3, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 2.6458, + "trace": 0 + }, + { + "equation_id": "rrc_eq_04ac9264dcd7c6c1", + "codeword": "C8", + "index": 10, + "spectral_radius": 8.363521, + "lambda_power_iteration": 8.363521, + "charpoly": [ + -8, + -12, + 88, + -97, + -136, + 230, + 394, + 128 + ], + "density": 0.9531, + "frobenius": 11.0, + "trace": 8, + "sparse_tail": true + }, + { + "equation_id": "rrc_eq_05370b4783a8bd6a", + "codeword": "C0", + "index": 16, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0469, + "frobenius": 1.7321, + "trace": 0, + "identical_matrix_ids": [ + "rrc_eq_068487b9141c4fb6", + "rrc_eq_e25b46d22b7ca0f1" + ] + }, + { + "equation_id": "rrc_eq_05407e13b79c062b", + "codeword": "C8", + "index": 13, + "spectral_radius": 10.095348, + "lambda_power_iteration": 10.095348, + "charpoly": [ + -8, + 4, + -150, + -841, + -1175, + -8235, + -9607, + -17549 + ], + "density": 1.1875, + "frobenius": 15.0333, + "trace": 8, + "sparse_tail": true + }, + { + "equation_id": "rrc_eq_0606dcb042ba0e6f", + "codeword": "C3", + "index": 10, + "spectral_radius": 1.618034, + "lambda_power_iteration": 1.618034, + "charpoly": [ + -1, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 2.6458, + "trace": 1 + }, + { + "equation_id": "rrc_eq_068487b9141c4fb6", + "codeword": "C0", + "index": 17, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0469, + "frobenius": 1.7321, + "trace": 0, + "identical_matrix_ids": [ + "rrc_eq_05370b4783a8bd6a", + "rrc_eq_e25b46d22b7ca0f1" + ] + }, + { + "equation_id": "rrc_eq_079917209598b9e1", + "codeword": "C6", + "index": 9, + "spectral_radius": 4.006987, + "lambda_power_iteration": 4.006987, + "charpoly": [ + -5, + 1, + 14, + -4, + -20, + 11, + 3, + -2 + ], + "density": 0.4375, + "frobenius": 5.831, + "trace": 5 + }, + { + "equation_id": "rrc_eq_07b0a4a6f75d86b4", + "codeword": "C4", + "index": 9, + "spectral_radius": 2.901366, + "lambda_power_iteration": 2.901366, + "charpoly": [ + 0, + -3, + -7, + -25, + -6, + 11, + 12, + -2 + ], + "density": 0.3594, + "frobenius": 5.5678, + "trace": 0 + }, + { + "equation_id": "rrc_eq_07bd7750aa9c1698", + "codeword": "C2", + "index": 6, + "spectral_radius": 1.324718, + "lambda_power_iteration": 1.324718, + "charpoly": [ + 0, + -1, + -1, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0781, + "frobenius": 2.2361, + "trace": 0 + }, + { + "equation_id": "rrc_eq_0abce0721f473201", + "codeword": "C3", + "index": 49, + "spectral_radius": 2.186734, + "lambda_power_iteration": 2.186734, + "charpoly": [ + 0, + -5, + -2, + 1, + 6, + 8, + 0, + 0 + ], + "density": 0.2344, + "frobenius": 4.5826, + "trace": 0 + }, + { + "equation_id": "rrc_eq_0d19ee61a2cd8497", + "codeword": "C3", + "index": 46, + "spectral_radius": 2.151917, + "lambda_power_iteration": 2.151917, + "charpoly": [ + 0, + -2, + 0, + -8, + -9, + 0, + 0, + 0 + ], + "density": 0.2344, + "frobenius": 5.1962, + "trace": 0 + }, + { + "equation_id": "rrc_eq_0ddb4aae4fd1d8d5", + "codeword": "C3", + "index": 66, + "spectral_radius": 2.474763, + "lambda_power_iteration": 2.474763, + "charpoly": [ + -1, + -2, + -1, + -7, + -1, + 0, + -3, + -1 + ], + "density": 0.2812, + "frobenius": 4.2426, + "trace": 1 + }, + { + "equation_id": "rrc_eq_0edd7758873784a5", + "codeword": "C0", + "index": 14, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0938, + "frobenius": 2.4495, + "trace": 0 + }, + { + "equation_id": "rrc_eq_1038b814e5a78435", + "codeword": "C0", + "index": 27, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0312, + "frobenius": 1.4142, + "trace": 0, + "identical_matrix_ids": [ + "rrc_eq_673652a4317dd847" + ] + }, + { + "equation_id": "rrc_eq_10c072664568b78d", + "codeword": "C3", + "index": 26, + "spectral_radius": 1.912302, + "lambda_power_iteration": 1.912302, + "charpoly": [ + 0, + -1, + 0, + -5, + -5, + -4, + -6, + -2 + ], + "density": 0.2344, + "frobenius": 4.1231, + "trace": 0 + }, + { + "equation_id": "rrc_eq_10dfe03d2d21bf90", + "codeword": "C3", + "index": 69, + "spectral_radius": 2.485395, + "lambda_power_iteration": 2.485395, + "charpoly": [ + -3, + 2, + -1, + -2, + 0, + 1, + -2, + 0 + ], + "density": 0.2969, + "frobenius": 4.3589, + "trace": 3 + }, + { + "equation_id": "rrc_eq_114c66f1878ac7b8", + "codeword": "C4", + "index": 27, + "spectral_radius": 3.241428, + "lambda_power_iteration": 3.241428, + "charpoly": [ + -2, + -3, + -2, + -3, + -2, + -6, + -3, + 0 + ], + "density": 0.2812, + "frobenius": 4.6904, + "trace": 2 + }, + { + "equation_id": "rrc_eq_12d5519ce1a35889", + "codeword": "C7", + "index": 5, + "spectral_radius": 4.493242, + "lambda_power_iteration": 4.493242, + "charpoly": [ + 0, + -11, + -40, + -25, + 77, + 40, + 8, + 0 + ], + "density": 0.4688, + "frobenius": 7.0711, + "trace": 0 + }, + { + "equation_id": "rrc_eq_12d678b6dc94f9d6", + "codeword": "C4", + "index": 22, + "spectral_radius": 3.162116, + "lambda_power_iteration": 3.162116, + "charpoly": [ + -1, + -5, + -3, + -5, + -6, + -15, + -14, + -4 + ], + "density": 0.3281, + "frobenius": 5.1962, + "trace": 1 + }, + { + "equation_id": "rrc_eq_131b32c8ed70796c", + "codeword": "C0", + "index": 15, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0781, + "frobenius": 2.2361, + "trace": 0 + }, + { + "equation_id": "rrc_eq_14fd73dcf1af02b8", + "codeword": "C8", + "index": 7, + "spectral_radius": 7.549847, + "lambda_power_iteration": 7.549847, + "charpoly": [ + -5, + -13, + -25, + -150, + -105, + -210, + 6, + 60 + ], + "density": 0.8906, + "frobenius": 9.8489, + "trace": 5 + }, + { + "equation_id": "rrc_eq_1523798f49d3e916", + "codeword": "C4", + "index": 24, + "spectral_radius": 3.195849, + "lambda_power_iteration": 3.195849, + "charpoly": [ + -1, + -4, + -6, + -13, + 3, + 3, + 4, + 0 + ], + "density": 0.3594, + "frobenius": 5.1962, + "trace": 1 + }, + { + "equation_id": "rrc_eq_16a8e172297c28a7", + "codeword": "C7", + "index": 1, + "spectral_radius": 4.391693, + "lambda_power_iteration": 4.391693, + "charpoly": [ + -5, + 4, + -24, + 83, + -18, + 31, + -66, + 18 + ], + "density": 0.5312, + "frobenius": 7.746, + "trace": 5 + }, + { + "equation_id": "rrc_eq_17cb89b04d825252", + "codeword": "C0", + "index": 12, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 2.6458, + "trace": 0 + }, + { + "equation_id": "rrc_eq_181e73a390899053", + "codeword": "C8", + "index": 0, + "spectral_radius": 6.374309, + "lambda_power_iteration": 6.374309, + "charpoly": [ + -4, + -9, + -36, + -14, + -66, + 121, + 408, + 28 + ], + "density": 0.75, + "frobenius": 8.9443, + "trace": 4 + }, + { + "equation_id": "rrc_eq_185011f4d6cf6a2b", + "codeword": "C3", + "index": 16, + "spectral_radius": 1.754878, + "lambda_power_iteration": 1.754878, + "charpoly": [ + -1, + -1, + 0, + -1, + 0, + 0, + 0, + 0 + ], + "density": 0.1406, + "frobenius": 3.0, + "trace": 1, + "identical_matrix_ids": [ + "rrc_eq_8b812bf47cc024b4" + ] + }, + { + "equation_id": "rrc_eq_1975033c8fbea2a4", + "codeword": "C3", + "index": 70, + "spectral_radius": 2.495061, + "lambda_power_iteration": 2.495061, + "charpoly": [ + -1, + -3, + 0, + -6, + 3, + -1, + 6, + 1 + ], + "density": 0.2969, + "frobenius": 4.3589, + "trace": 1 + }, + { + "equation_id": "rrc_eq_1b1de15c4bbf2d2e", + "codeword": "C5", + "index": 7, + "spectral_radius": 3.547448, + "lambda_power_iteration": 3.547448, + "charpoly": [ + -3, + -1, + -10, + 22, + 8, + -8, + 0, + 0 + ], + "density": 0.4375, + "frobenius": 6.0, + "trace": 3 + }, + { + "equation_id": "rrc_eq_1d0a752af1946515", + "codeword": "C1", + "index": 15, + "spectral_radius": 1.0, + "lambda_power_iteration": 0.898717, + "charpoly": [ + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.125, + "frobenius": 2.8284, + "trace": 0 + }, + { + "equation_id": "rrc_eq_1f12deb00ad16d8f", + "codeword": "C1", + "index": 6, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.003316, + "charpoly": [ + 0, + -1, + 0, + 0, + -1, + 0, + 1, + 0 + ], + "density": 0.1406, + "frobenius": 3.0, + "trace": 0 + }, + { + "equation_id": "rrc_eq_1f5af7e9fb2b518f", + "codeword": "C3", + "index": 25, + "spectral_radius": 1.867397, + "lambda_power_iteration": 1.867397, + "charpoly": [ + 0, + -1, + -3, + -2, + -2, + 0, + 0, + 0 + ], + "density": 0.2188, + "frobenius": 3.7417, + "trace": 0 + }, + { + "equation_id": "rrc_eq_1f912c8afa928326", + "codeword": "C8", + "index": 3, + "spectral_radius": 6.527443, + "lambda_power_iteration": 6.527443, + "charpoly": [ + -1, + -11, + -3, + -697, + -2101, + -1289, + 24, + 39 + ], + "density": 0.6719, + "frobenius": 12.0416, + "trace": 1 + }, + { + "equation_id": "rrc_eq_1fe1cbc05827ec00", + "codeword": "C5", + "index": 1, + "spectral_radius": 3.446999, + "lambda_power_iteration": 3.446999, + "charpoly": [ + -2, + -4, + -5, + 1, + 15, + 0, + 6, + 0 + ], + "density": 0.3594, + "frobenius": 5.7446, + "trace": 2 + }, + { + "equation_id": "rrc_eq_20b0dce68b1ff729", + "codeword": "C3", + "index": 62, + "spectral_radius": 2.429293, + "lambda_power_iteration": 2.429293, + "charpoly": [ + -1, + -2, + -3, + 1, + -6, + 0, + 1, + 0 + ], + "density": 0.2812, + "frobenius": 4.2426, + "trace": 1 + }, + { + "equation_id": "rrc_eq_20f6a9ed1c2675da", + "codeword": "C3", + "index": 71, + "spectral_radius": 2.497015, + "lambda_power_iteration": 2.497015, + "charpoly": [ + -1, + -3, + 0, + -3, + -4, + 0, + 0, + 0 + ], + "density": 0.2188, + "frobenius": 4.0, + "trace": 1 + }, + { + "equation_id": "rrc_eq_217148f607dfe5ff", + "codeword": "C0", + "index": 32, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0625, + "frobenius": 2.0, + "trace": 0 + }, + { + "equation_id": "rrc_eq_21c2954626a5661d", + "codeword": "C7", + "index": 9, + "spectral_radius": 4.871831, + "lambda_power_iteration": 4.871831, + "charpoly": [ + 0, + -12, + -47, + -48, + -2, + -27, + 1, + -3 + ], + "density": 0.4531, + "frobenius": 7.8102, + "trace": 0 + }, + { + "equation_id": "rrc_eq_251255e3132f5533", + "codeword": "C3", + "index": 59, + "spectral_radius": 2.359304, + "lambda_power_iteration": 2.359304, + "charpoly": [ + -2, + 0, + -2, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.25, + "frobenius": 4.0, + "trace": 2 + }, + { + "equation_id": "rrc_eq_25d3e2f91df8c0a0", + "codeword": "C3", + "index": 21, + "spectral_radius": 1.826516, + "lambda_power_iteration": 1.826516, + "charpoly": [ + -2, + 1, + -1, + -1, + 1, + 0, + 0, + 0 + ], + "density": 0.1875, + "frobenius": 3.4641, + "trace": 2 + }, + { + "equation_id": "rrc_eq_282beac067cdee85", + "codeword": "C3", + "index": 63, + "spectral_radius": 2.445492, + "lambda_power_iteration": 2.445492, + "charpoly": [ + -3, + 0, + 3, + 2, + -3, + 0, + 0, + 0 + ], + "density": 0.2656, + "frobenius": 4.3589, + "trace": 3 + }, + { + "equation_id": "rrc_eq_295fb47f2cd6ddfb", + "codeword": "C6", + "index": 2, + "spectral_radius": 3.794662, + "lambda_power_iteration": 3.794662, + "charpoly": [ + -5, + 4, + -1, + 10, + 14, + -19, + -16, + -4 + ], + "density": 0.375, + "frobenius": 5.831, + "trace": 5 + }, + { + "equation_id": "rrc_eq_296f8ca4495edd26", + "codeword": "C5", + "index": 11, + "spectral_radius": 3.662686, + "lambda_power_iteration": 3.662686, + "charpoly": [ + 0, + -10, + -8, + -6, + -30, + -29, + -8, + 0 + ], + "density": 0.4375, + "frobenius": 6.0, + "trace": 0, + "identical_matrix_ids": [ + "rrc_eq_3e634eac50426ea3" + ] + }, + { + "equation_id": "rrc_eq_2c1d4c645f0025fb", + "codeword": "C7", + "index": 14, + "spectral_radius": 5.078214, + "lambda_power_iteration": 5.078214, + "charpoly": [ + -5, + -1, + 10, + -21, + -24, + -198, + -240, + 0 + ], + "density": 0.5312, + "frobenius": 8.2462, + "trace": 5 + }, + { + "equation_id": "rrc_eq_2ee35bd32d933ac7", + "codeword": "C6", + "index": 16, + "spectral_radius": 4.182433, + "lambda_power_iteration": 4.182433, + "charpoly": [ + -2, + -8, + -4, + -3, + 0, + 0, + 0, + 0 + ], + "density": 0.2812, + "frobenius": 5.6569, + "trace": 2 + }, + { + "equation_id": "rrc_eq_2ee9bc98d2a7c773", + "codeword": "C6", + "index": 4, + "spectral_radius": 3.848234, + "lambda_power_iteration": 3.848234, + "charpoly": [ + -3, + -3, + -2, + 6, + -10, + 5, + 1, + 6 + ], + "density": 0.4219, + "frobenius": 6.0828, + "trace": 3 + }, + { + "equation_id": "rrc_eq_2efd637f1e4bd389", + "codeword": "C2", + "index": 8, + "spectral_radius": 1.414214, + "lambda_power_iteration": 1.36277, + "charpoly": [ + 0, + -2, + 0, + -2, + 0, + 4, + 0, + 0 + ], + "density": 0.1719, + "frobenius": 3.873, + "trace": 0 + }, + { + "equation_id": "rrc_eq_2f24d8cc16590af0", + "codeword": "C3", + "index": 53, + "spectral_radius": 2.218136, + "lambda_power_iteration": 2.218136, + "charpoly": [ + -2, + -1, + 0, + 2, + 3, + -4, + 0, + 0 + ], + "density": 0.2344, + "frobenius": 4.3589, + "trace": 2 + }, + { + "equation_id": "rrc_eq_2f44e729b9d25d34", + "codeword": "C3", + "index": 43, + "spectral_radius": 2.126658, + "lambda_power_iteration": 2.126658, + "charpoly": [ + 0, + -2, + -3, + -2, + -6, + 0, + -2, + 0 + ], + "density": 0.25, + "frobenius": 4.6904, + "trace": 0, + "identical_matrix_ids": [ + "rrc_eq_e4b70a718fcfb1ab" + ] + }, + { + "equation_id": "rrc_eq_2f9d4e3b2060b799", + "codeword": "C0", + "index": 1, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0156, + "frobenius": 1.0, + "trace": 0 + }, + { + "equation_id": "rrc_eq_310ec3a93d82b04e", + "codeword": "C6", + "index": 15, + "spectral_radius": 4.115477, + "lambda_power_iteration": 4.115477, + "charpoly": [ + -4, + 1, + -6, + 0, + 0, + -4, + -4, + 0 + ], + "density": 0.2969, + "frobenius": 5.7446, + "trace": 4 + }, + { + "equation_id": "rrc_eq_3305fd3254a89e5b", + "codeword": "C3", + "index": 29, + "spectral_radius": 1.937333, + "lambda_power_iteration": 1.937369, + "charpoly": [ + 0, + 0, + 0, + 0, + -18, + -18, + 0, + 0 + ], + "density": 0.2188, + "frobenius": 5.2915, + "trace": 0 + }, + { + "equation_id": "rrc_eq_35e1c2bc2da6d854", + "codeword": "C6", + "index": 19, + "spectral_radius": 4.282496, + "lambda_power_iteration": 4.282496, + "charpoly": [ + -3, + -5, + -1, + -13, + 34, + 8, + -10, + 2 + ], + "density": 0.4688, + "frobenius": 6.3246, + "trace": 3, + "identical_matrix_ids": [ + "rrc_eq_b9eb3119b4d99483" + ] + }, + { + "equation_id": "rrc_eq_3654d8cd243cde2b", + "codeword": "C3", + "index": 65, + "spectral_radius": 2.464571, + "lambda_power_iteration": 2.464571, + "charpoly": [ + 0, + -1, + -9, + -4, + -9, + -6, + 0, + 0 + ], + "density": 0.25, + "frobenius": 4.4721, + "trace": 0 + }, + { + "equation_id": "rrc_eq_372fdc0c8b995ef2", + "codeword": "C4", + "index": 13, + "spectral_radius": 2.97193, + "lambda_power_iteration": 2.97193, + "charpoly": [ + -3, + -1, + 4, + -5, + 5, + 5, + 8, + 10 + ], + "density": 0.3438, + "frobenius": 5.099, + "trace": 3 + }, + { + "equation_id": "rrc_eq_3823a73f30463f6e", + "codeword": "C3", + "index": 20, + "spectral_radius": 1.813824, + "lambda_power_iteration": 1.813824, + "charpoly": [ + -2, + 1, + -2, + 2, + -1, + 0, + 0, + 0 + ], + "density": 0.1875, + "frobenius": 3.4641, + "trace": 2 + }, + { + "equation_id": "rrc_eq_39d59d35fd9672a0", + "codeword": "C4", + "index": 17, + "spectral_radius": 3.049932, + "lambda_power_iteration": 3.049932, + "charpoly": [ + -1, + -4, + -6, + -1, + -7, + 6, + 0, + 0 + ], + "density": 0.3125, + "frobenius": 5.2915, + "trace": 1 + }, + { + "equation_id": "rrc_eq_3a60fca57229c15b", + "codeword": "C0", + "index": 22, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0625, + "frobenius": 2.0, + "trace": 0 + }, + { + "equation_id": "rrc_eq_3ad1c4d008fc910b", + "codeword": "C4", + "index": 15, + "spectral_radius": 2.975988, + "lambda_power_iteration": 2.975988, + "charpoly": [ + -3, + 0, + 3, + -10, + 1, + 11, + 2, + 4 + ], + "density": 0.3438, + "frobenius": 4.899, + "trace": 3 + }, + { + "equation_id": "rrc_eq_3c97cd0a63059c60", + "codeword": "C2", + "index": 11, + "spectral_radius": 1.421484, + "lambda_power_iteration": 1.421484, + "charpoly": [ + 0, + 0, + 0, + 0, + -2, + -4, + -2, + 0 + ], + "density": 0.1719, + "frobenius": 3.3166, + "trace": 0 + }, + { + "equation_id": "rrc_eq_3db7a0150185b5a1", + "codeword": "C3", + "index": 58, + "spectral_radius": 2.311323, + "lambda_power_iteration": 2.311323, + "charpoly": [ + -3, + 2, + -2, + 4, + -2, + -5, + 3, + 0 + ], + "density": 0.25, + "frobenius": 4.2426, + "trace": 3 + }, + { + "equation_id": "rrc_eq_3e634eac50426ea3", + "codeword": "C5", + "index": 12, + "spectral_radius": 3.662686, + "lambda_power_iteration": 3.662686, + "charpoly": [ + 0, + -10, + -8, + -6, + -30, + -29, + -8, + 0 + ], + "density": 0.4375, + "frobenius": 6.0, + "trace": 0, + "identical_matrix_ids": [ + "rrc_eq_296f8ca4495edd26" + ] + }, + { + "equation_id": "rrc_eq_3e9910b639adf295", + "codeword": "C0", + "index": 8, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0781, + "frobenius": 2.2361, + "trace": 0 + }, + { + "equation_id": "rrc_eq_3ed73c5849372e40", + "codeword": "C2", + "index": 3, + "spectral_radius": 1.220744, + "lambda_power_iteration": 1.220744, + "charpoly": [ + 0, + 0, + -1, + -1, + 0, + 0, + 0, + 0 + ], + "density": 0.0938, + "frobenius": 2.4495, + "trace": 0 + }, + { + "equation_id": "rrc_eq_3f87b53694e706e9", + "codeword": "C0", + "index": 7, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 2.6458, + "trace": 0 + }, + { + "equation_id": "rrc_eq_3f87d2c06726bc30", + "codeword": "C8", + "index": 16, + "spectral_radius": 16.991482, + "lambda_power_iteration": 16.991482, + "charpoly": [ + -7, + -145, + -453, + 259, + 3252, + 25492, + 44348, + -164234 + ], + "density": 1.9688, + "frobenius": 22.0, + "trace": 7, + "sparse_tail": true, + "identical_matrix_ids": [ + "rrc_eq_ac1a7a22801b7d77" + ] + }, + { + "equation_id": "rrc_eq_3fbf8213151eae2f", + "codeword": "C3", + "index": 75, + "spectral_radius": 2.605924, + "lambda_power_iteration": 2.605924, + "charpoly": [ + -3, + 0, + -1, + 8, + 5, + 0, + -6, + 0 + ], + "density": 0.2812, + "frobenius": 4.6904, + "trace": 3 + }, + { + "equation_id": "rrc_eq_3fc5864a199b7aa9", + "codeword": "C0", + "index": 25, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0625, + "frobenius": 2.0, + "trace": 0 + }, + { + "equation_id": "rrc_eq_434ad4a173c4cb24", + "codeword": "C0", + "index": 29, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0469, + "frobenius": 1.7321, + "trace": 0 + }, + { + "equation_id": "rrc_eq_4430cc5b9ebb8311", + "codeword": "C3", + "index": 11, + "spectral_radius": 1.618034, + "lambda_power_iteration": 1.618034, + "charpoly": [ + 0, + -1, + -2, + -1, + 0, + 0, + 0, + 0 + ], + "density": 0.1562, + "frobenius": 3.4641, + "trace": 0 + }, + { + "equation_id": "rrc_eq_45606d1f25dd6aa5", + "codeword": "C7", + "index": 0, + "spectral_radius": 4.363888, + "lambda_power_iteration": 4.363888, + "charpoly": [ + -1, + -19, + 15, + 18, + -12, + 28, + 8, + 0 + ], + "density": 0.3281, + "frobenius": 7.0, + "trace": 1 + }, + { + "equation_id": "rrc_eq_45b2907bd442578f", + "codeword": "C4", + "index": 25, + "spectral_radius": 3.228266, + "lambda_power_iteration": 3.228266, + "charpoly": [ + -2, + -2, + -4, + -17, + 32, + -5, + 0, + 0 + ], + "density": 0.3438, + "frobenius": 6.0, + "trace": 2 + }, + { + "equation_id": "rrc_eq_4795802d1dfe8dc9", + "codeword": "C0", + "index": 34, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0781, + "frobenius": 2.2361, + "trace": 0 + }, + { + "equation_id": "rrc_eq_4b0eb5baf8d88582", + "codeword": "C0", + "index": 30, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0625, + "frobenius": 2.0, + "trace": 0 + }, + { + "equation_id": "rrc_eq_4b6cfeff599d0583", + "codeword": "C6", + "index": 7, + "spectral_radius": 3.932863, + "lambda_power_iteration": 3.932863, + "charpoly": [ + -2, + -1, + -18, + -20, + -36, + -34, + 4, + -8 + ], + "density": 0.4062, + "frobenius": 6.3246, + "trace": 2 + }, + { + "equation_id": "rrc_eq_4c87c96f612f6100", + "codeword": "C3", + "index": 3, + "spectral_radius": 1.52138, + "lambda_power_iteration": 1.52138, + "charpoly": [ + 0, + -1, + -3, + 0, + 1, + 2, + 0, + 0 + ], + "density": 0.1719, + "frobenius": 3.3166, + "trace": 0 + }, + { + "equation_id": "rrc_eq_4cab00eaeac59782", + "codeword": "C1", + "index": 4, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.0, + "charpoly": [ + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.125, + "frobenius": 2.8284, + "trace": 1 + }, + { + "equation_id": "rrc_eq_4d8a407792ae463c", + "codeword": "C4", + "index": 19, + "spectral_radius": 3.079015, + "lambda_power_iteration": 3.079015, + "charpoly": [ + -2, + -5, + 2, + 7, + 11, + -5, + -10, + 4 + ], + "density": 0.3438, + "frobenius": 5.2915, + "trace": 2 + }, + { + "equation_id": "rrc_eq_50659e00428d753c", + "codeword": "C8", + "index": 1, + "spectral_radius": 6.399607, + "lambda_power_iteration": 6.399607, + "charpoly": [ + -5, + -5, + -19, + -38, + -61, + 284, + 66, + -198 + ], + "density": 0.7188, + "frobenius": 9.0554, + "trace": 5 + }, + { + "equation_id": "rrc_eq_5193efd26258bc51", + "codeword": "C3", + "index": 19, + "spectral_radius": 1.791999, + "lambda_power_iteration": 1.791999, + "charpoly": [ + 0, + -3, + -2, + 2, + 1, + 0, + 2, + 0 + ], + "density": 0.1875, + "frobenius": 3.7417, + "trace": 0 + }, + { + "equation_id": "rrc_eq_5281edbc9d70f191", + "codeword": "C4", + "index": 8, + "spectral_radius": 2.900326, + "lambda_power_iteration": 2.900326, + "charpoly": [ + -3, + 1, + 0, + -15, + 23, + 9, + 6, + -16 + ], + "density": 0.3438, + "frobenius": 5.4772, + "trace": 3 + }, + { + "equation_id": "rrc_eq_535b43060096e699", + "codeword": "C3", + "index": 2, + "spectral_radius": 1.51749, + "lambda_power_iteration": 1.517694, + "charpoly": [ + 0, + -2, + 0, + -2, + 0, + 3, + 0, + 0 + ], + "density": 0.1719, + "frobenius": 3.3166, + "trace": 0 + }, + { + "equation_id": "rrc_eq_56bc9e8becb7bcba", + "codeword": "C4", + "index": 23, + "spectral_radius": 3.172858, + "lambda_power_iteration": 3.172858, + "charpoly": [ + -1, + -1, + 1, + -54, + -27, + 0, + 0, + 0 + ], + "density": 0.2812, + "frobenius": 6.1644, + "trace": 1 + }, + { + "equation_id": "rrc_eq_56d979e780ead00b", + "codeword": "C7", + "index": 2, + "spectral_radius": 4.393698, + "lambda_power_iteration": 4.393698, + "charpoly": [ + -3, + -6, + 1, + 4, + -37, + -53, + 33, + 0 + ], + "density": 0.5156, + "frobenius": 6.7082, + "trace": 3 + }, + { + "equation_id": "rrc_eq_57188e85cab23a67", + "codeword": "C5", + "index": 4, + "spectral_radius": 3.523605, + "lambda_power_iteration": 3.523605, + "charpoly": [ + -3, + 0, + -7, + 2, + 0, + -3, + 0, + 0 + ], + "density": 0.2656, + "frobenius": 5.5678, + "trace": 3 + }, + { + "equation_id": "rrc_eq_59c14acaba40cdc9", + "codeword": "C3", + "index": 45, + "spectral_radius": 2.151065, + "lambda_power_iteration": 2.151065, + "charpoly": [ + -1, + -1, + -3, + -3, + 4, + 4, + -1, + 0 + ], + "density": 0.2344, + "frobenius": 3.873, + "trace": 1 + }, + { + "equation_id": "rrc_eq_5a01598605abcd3f", + "codeword": "C2", + "index": 2, + "spectral_radius": 1.189207, + "lambda_power_iteration": 1.125463, + "charpoly": [ + 0, + 0, + 0, + -2, + 0, + 0, + 0, + 0 + ], + "density": 0.1406, + "frobenius": 3.3166, + "trace": 0 + }, + { + "equation_id": "rrc_eq_5d1fa53e2bceba76", + "codeword": "C3", + "index": 5, + "spectral_radius": 1.540626, + "lambda_power_iteration": 1.540626, + "charpoly": [ + 0, + -1, + -1, + 0, + -2, + -1, + 0, + 0 + ], + "density": 0.1719, + "frobenius": 3.3166, + "trace": 0 + }, + { + "equation_id": "rrc_eq_5d39c74f1cbc3aab", + "codeword": "C2", + "index": 1, + "spectral_radius": 1.189207, + "lambda_power_iteration": 1.125463, + "charpoly": [ + 0, + 0, + 0, + -2, + 0, + 0, + 0, + 0 + ], + "density": 0.1406, + "frobenius": 3.3166, + "trace": 0 + }, + { + "equation_id": "rrc_eq_5e10957e0cbb9de8", + "codeword": "C6", + "index": 13, + "spectral_radius": 4.096678, + "lambda_power_iteration": 4.096678, + "charpoly": [ + -4, + -2, + 6, + 2, + 2, + -3, + 2, + 0 + ], + "density": 0.4062, + "frobenius": 5.831, + "trace": 4, + "identical_matrix_ids": [ + "rrc_eq_8c569cbfc2385eab" + ] + }, + { + "equation_id": "rrc_eq_5ece89b86c865faf", + "codeword": "C3", + "index": 8, + "spectral_radius": 1.589933, + "lambda_power_iteration": 1.589933, + "charpoly": [ + 0, + -1, + 0, + -3, + -2, + 1, + 0, + 0 + ], + "density": 0.1875, + "frobenius": 3.7417, + "trace": 0 + }, + { + "equation_id": "rrc_eq_603b460ebf696fbb", + "codeword": "C7", + "index": 7, + "spectral_radius": 4.666534, + "lambda_power_iteration": 4.666534, + "charpoly": [ + -5, + 3, + -11, + 17, + 13, + 1, + 5, + 4 + ], + "density": 0.5156, + "frobenius": 6.8557, + "trace": 5 + }, + { + "equation_id": "rrc_eq_613c8a56dee0f83a", + "codeword": "C3", + "index": 61, + "spectral_radius": 2.425529, + "lambda_power_iteration": 2.425529, + "charpoly": [ + -1, + -1, + -9, + 8, + 4, + -20, + 16, + 0 + ], + "density": 0.2812, + "frobenius": 5.2915, + "trace": 1 + }, + { + "equation_id": "rrc_eq_64f81fa3c4725d4e", + "codeword": "C1", + "index": 7, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.0, + "charpoly": [ + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0781, + "frobenius": 2.2361, + "trace": 0 + }, + { + "equation_id": "rrc_eq_66f6066b3fb74fcb", + "codeword": "C4", + "index": 18, + "spectral_radius": 3.057082, + "lambda_power_iteration": 3.057082, + "charpoly": [ + -3, + -1, + 4, + -7, + 5, + -4, + 30, + 20 + ], + "density": 0.375, + "frobenius": 5.4772, + "trace": 3 + }, + { + "equation_id": "rrc_eq_673652a4317dd847", + "codeword": "C0", + "index": 28, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0312, + "frobenius": 1.4142, + "trace": 0, + "identical_matrix_ids": [ + "rrc_eq_1038b814e5a78435" + ] + }, + { + "equation_id": "rrc_eq_685a03c6c1db609e", + "codeword": "C3", + "index": 4, + "spectral_radius": 1.534158, + "lambda_power_iteration": 1.534158, + "charpoly": [ + 0, + -1, + -1, + -1, + -1, + 0, + 0, + 0 + ], + "density": 0.1719, + "frobenius": 3.3166, + "trace": 0 + }, + { + "equation_id": "rrc_eq_685a969028ff5c50", + "codeword": "C3", + "index": 64, + "spectral_radius": 2.45362, + "lambda_power_iteration": 2.45362, + "charpoly": [ + -1, + 0, + -5, + -7, + -5, + -1, + 0, + 0 + ], + "density": 0.25, + "frobenius": 4.2426, + "trace": 1 + }, + { + "equation_id": "rrc_eq_68ac9a041d842bcf", + "codeword": "C3", + "index": 78, + "spectral_radius": 2.69193, + "lambda_power_iteration": 2.69193, + "charpoly": [ + -3, + 0, + 3, + -2, + 1, + -4, + 0, + 6 + ], + "density": 0.3125, + "frobenius": 4.6904, + "trace": 3 + }, + { + "equation_id": "rrc_eq_68bc5f8d951cef23", + "codeword": "C4", + "index": 28, + "spectral_radius": 3.290975, + "lambda_power_iteration": 3.290975, + "charpoly": [ + -1, + -4, + -5, + -14, + -20, + -16, + -11, + -2 + ], + "density": 0.3906, + "frobenius": 5.3852, + "trace": 1 + }, + { + "equation_id": "rrc_eq_6a952cb84d6e1fbf", + "codeword": "C3", + "index": 32, + "spectral_radius": 2.0, + "lambda_power_iteration": 2.0, + "charpoly": [ + -1, + -2, + 2, + -2, + -4, + 0, + 0, + 0 + ], + "density": 0.2031, + "frobenius": 4.1231, + "trace": 1 + }, + { + "equation_id": "rrc_eq_6abda80c652b80c8", + "codeword": "C3", + "index": 9, + "spectral_radius": 1.618034, + "lambda_power_iteration": 1.618034, + "charpoly": [ + -1, + -1, + 0, + -1, + 1, + 1, + 0, + 0 + ], + "density": 0.1719, + "frobenius": 3.3166, + "trace": 1 + }, + { + "equation_id": "rrc_eq_6d33c14a88eb0a12", + "codeword": "C7", + "index": 13, + "spectral_radius": 4.934847, + "lambda_power_iteration": 4.934847, + "charpoly": [ + -2, + -11, + 8, + -97, + -108, + -127, + -24, + 0 + ], + "density": 0.5156, + "frobenius": 8.3066, + "trace": 2 + }, + { + "equation_id": "rrc_eq_6dcfafa9019b29a2", + "codeword": "C8", + "index": 8, + "spectral_radius": 7.763825, + "lambda_power_iteration": 7.763825, + "charpoly": [ + -9, + 12, + -37, + 134, + 86, + -161, + 8, + 72 + ], + "density": 0.8594, + "frobenius": 11.1803, + "trace": 9, + "sparse_tail": true + }, + { + "equation_id": "rrc_eq_6f8b200d29180003", + "codeword": "C5", + "index": 2, + "spectral_radius": 3.473844, + "lambda_power_iteration": 3.473844, + "charpoly": [ + -1, + 0, + -35, + 15, + 10, + 0, + 0, + 0 + ], + "density": 0.3281, + "frobenius": 6.8557, + "trace": 1 + }, + { + "equation_id": "rrc_eq_7076f5bdea119531", + "codeword": "C1", + "index": 13, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.0, + "charpoly": [ + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 2.6458, + "trace": 0 + }, + { + "equation_id": "rrc_eq_7106bb20125b3d6f", + "codeword": "C6", + "index": 0, + "spectral_radius": 3.765143, + "lambda_power_iteration": 3.765143, + "charpoly": [ + -2, + -4, + -6, + -13, + -5, + -6, + -9, + 0 + ], + "density": 0.4375, + "frobenius": 6.3246, + "trace": 2 + }, + { + "equation_id": "rrc_eq_71dd02d32f3e59b0", + "codeword": "C1", + "index": 12, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.0, + "charpoly": [ + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0938, + "frobenius": 2.4495, + "trace": 0 + }, + { + "equation_id": "rrc_eq_72b416376f1bf5b0", + "codeword": "C3", + "index": 36, + "spectral_radius": 2.034614, + "lambda_power_iteration": 2.034614, + "charpoly": [ + -1, + -3, + 2, + 0, + 0, + -2, + 1, + 0 + ], + "density": 0.2188, + "frobenius": 4.0, + "trace": 1 + }, + { + "equation_id": "rrc_eq_74c2bb3396094843", + "codeword": "C8", + "index": 6, + "spectral_radius": 7.19367, + "lambda_power_iteration": 7.19367, + "charpoly": [ + -7, + -4, + 9, + 122, + -373, + -4, + 9, + 162 + ], + "density": 0.75, + "frobenius": 10.4881, + "trace": 7 + }, + { + "equation_id": "rrc_eq_7533d46cedd4a4c5", + "codeword": "C0", + "index": 26, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 2.6458, + "trace": 0 + }, + { + "equation_id": "rrc_eq_75b10c1207c769bb", + "codeword": "C3", + "index": 13, + "spectral_radius": 1.695621, + "lambda_power_iteration": 1.695621, + "charpoly": [ + -2, + 1, + -2, + 2, + 0, + 0, + 0, + 0 + ], + "density": 0.1562, + "frobenius": 3.1623, + "trace": 2 + }, + { + "equation_id": "rrc_eq_7731084327989290", + "codeword": "C4", + "index": 16, + "spectral_radius": 3.012113, + "lambda_power_iteration": 3.012113, + "charpoly": [ + -2, + -2, + -2, + -5, + -4, + 20, + 16, + 4 + ], + "density": 0.3438, + "frobenius": 5.4772, + "trace": 2 + }, + { + "equation_id": "rrc_eq_774c019464fd328c", + "codeword": "C0", + "index": 4, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 2.6458, + "trace": 0 + }, + { + "equation_id": "rrc_eq_77bd06f725c27b4d", + "codeword": "C8", + "index": 5, + "spectral_radius": 7.033242, + "lambda_power_iteration": 7.033242, + "charpoly": [ + -3, + -16, + -90, + 34, + -110, + 144, + 0, + -48 + ], + "density": 0.7188, + "frobenius": 10.198, + "trace": 3 + }, + { + "equation_id": "rrc_eq_78fb56a55b615659", + "codeword": "C3", + "index": 27, + "spectral_radius": 1.927562, + "lambda_power_iteration": 1.927562, + "charpoly": [ + -1, + -1, + -1, + -1, + 0, + 0, + 0, + 0 + ], + "density": 0.1719, + "frobenius": 3.3166, + "trace": 1 + }, + { + "equation_id": "rrc_eq_795413454087e025", + "codeword": "C3", + "index": 39, + "spectral_radius": 2.097637, + "lambda_power_iteration": 2.097637, + "charpoly": [ + -2, + -1, + 0, + 3, + 2, + -2, + 0, + 0 + ], + "density": 0.2031, + "frobenius": 3.6056, + "trace": 2 + }, + { + "equation_id": "rrc_eq_7956fd7c6e98638a", + "codeword": "C4", + "index": 20, + "spectral_radius": 3.125714, + "lambda_power_iteration": 3.125714, + "charpoly": [ + -3, + 0, + 0, + 0, + -12, + 0, + 0, + 0 + ], + "density": 0.2344, + "frobenius": 5.3852, + "trace": 3 + }, + { + "equation_id": "rrc_eq_7995b3bdb3f05ce3", + "codeword": "C0", + "index": 23, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0781, + "frobenius": 2.2361, + "trace": 0 + }, + { + "equation_id": "rrc_eq_7a38c905340961db", + "codeword": "C3", + "index": 54, + "spectral_radius": 2.266297, + "lambda_power_iteration": 2.266297, + "charpoly": [ + -2, + -1, + 4, + -11, + 9, + 0, + 0, + 0 + ], + "density": 0.2344, + "frobenius": 4.7958, + "trace": 2 + }, + { + "equation_id": "rrc_eq_7cdf1c3e052e1f33", + "codeword": "C8", + "index": 14, + "spectral_radius": 11.681508, + "lambda_power_iteration": 11.681508, + "charpoly": [ + -7, + -38, + -166, + -283, + -551, + -1061, + 177, + -2128 + ], + "density": 1.2031, + "frobenius": 15.7162, + "trace": 7, + "sparse_tail": true + }, + { + "equation_id": "rrc_eq_8018bcedc9b84a9d", + "codeword": "C2", + "index": 7, + "spectral_radius": 1.363965, + "lambda_power_iteration": 1.363965, + "charpoly": [ + -1, + 0, + -2, + 2, + -1, + 1, + 0, + 0 + ], + "density": 0.1719, + "frobenius": 3.3166, + "trace": 1 + }, + { + "equation_id": "rrc_eq_80edc83f7fb3d80e", + "codeword": "C1", + "index": 18, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + -1, + 0, + 0 + ], + "density": 0.0938, + "frobenius": 2.4495, + "trace": 0 + }, + { + "equation_id": "rrc_eq_810420419a4025f0", + "codeword": "C3", + "index": 57, + "spectral_radius": 2.304959, + "lambda_power_iteration": 2.304959, + "charpoly": [ + -1, + -2, + -2, + -1, + 0, + -2, + 6, + 4 + ], + "density": 0.25, + "frobenius": 4.4721, + "trace": 1 + }, + { + "equation_id": "rrc_eq_811d99697e055c2b", + "codeword": "C4", + "index": 5, + "spectral_radius": 2.873346, + "lambda_power_iteration": 2.873346, + "charpoly": [ + 0, + -5, + -8, + -3, + -2, + -2, + 1, + 0 + ], + "density": 0.3125, + "frobenius": 4.4721, + "trace": 0, + "identical_matrix_ids": [ + "rrc_eq_f691b1b9f433854f" + ] + }, + { + "equation_id": "rrc_eq_81ad5c64ecea2574", + "codeword": "C2", + "index": 5, + "spectral_radius": 1.324718, + "lambda_power_iteration": 1.324718, + "charpoly": [ + -1, + 0, + 0, + 0, + -1, + 0, + 0, + 0 + ], + "density": 0.1406, + "frobenius": 3.0, + "trace": 1 + }, + { + "equation_id": "rrc_eq_82aaddc592cb524f", + "codeword": "C4", + "index": 1, + "spectral_radius": 2.786951, + "lambda_power_iteration": 2.786951, + "charpoly": [ + -1, + -2, + -4, + -9, + -8, + -1, + 0, + 0 + ], + "density": 0.3125, + "frobenius": 4.899, + "trace": 1 + }, + { + "equation_id": "rrc_eq_84f94841b9e9578b", + "codeword": "C0", + "index": 33, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0469, + "frobenius": 1.7321, + "trace": 0 + }, + { + "equation_id": "rrc_eq_8500000bbf612a0e", + "codeword": "C4", + "index": 4, + "spectral_radius": 2.831177, + "lambda_power_iteration": 2.831177, + "charpoly": [ + -2, + -2, + -1, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.2031, + "frobenius": 4.1231, + "trace": 2 + }, + { + "equation_id": "rrc_eq_85435dde0bcc5cfd", + "codeword": "C3", + "index": 37, + "spectral_radius": 2.065995, + "lambda_power_iteration": 2.065995, + "charpoly": [ + 0, + -2, + -3, + -3, + -1, + 0, + 0, + 0 + ], + "density": 0.1875, + "frobenius": 3.7417, + "trace": 0 + }, + { + "equation_id": "rrc_eq_86ccde7bfd669b77", + "codeword": "C3", + "index": 50, + "spectral_radius": 2.187738, + "lambda_power_iteration": 2.187738, + "charpoly": [ + -1, + -5, + 5, + 4, + -7, + -3, + 4, + 0 + ], + "density": 0.25, + "frobenius": 4.4721, + "trace": 1 + }, + { + "equation_id": "rrc_eq_87b4887fb400c8c8", + "codeword": "C3", + "index": 6, + "spectral_radius": 1.543689, + "lambda_power_iteration": 1.543689, + "charpoly": [ + -1, + 0, + 0, + -2, + 0, + 0, + 0, + 0 + ], + "density": 0.1562, + "frobenius": 3.1623, + "trace": 1 + }, + { + "equation_id": "rrc_eq_891a81dfc968f58e", + "codeword": "C3", + "index": 18, + "spectral_radius": 1.754878, + "lambda_power_iteration": 1.754878, + "charpoly": [ + -1, + -1, + 0, + -1, + 0, + 0, + 0, + 0 + ], + "density": 0.1406, + "frobenius": 3.0, + "trace": 1 + }, + { + "equation_id": "rrc_eq_8a05e2496e67848b", + "codeword": "C7", + "index": 11, + "spectral_radius": 4.895311, + "lambda_power_iteration": 4.895311, + "charpoly": [ + -2, + -7, + -20, + -56, + -68, + -84, + -76, + 26 + ], + "density": 0.5781, + "frobenius": 7.8102, + "trace": 2, + "identical_matrix_ids": [ + "rrc_eq_a9bdc40d07c74659" + ] + }, + { + "equation_id": "rrc_eq_8a4d6790faf66d6b", + "codeword": "C0", + "index": 20, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0312, + "frobenius": 1.4142, + "trace": 0, + "identical_matrix_ids": [ + "rrc_eq_dd01aec7b2c20774" + ] + }, + { + "equation_id": "rrc_eq_8acff8093805680f", + "codeword": "C3", + "index": 31, + "spectral_radius": 2.0, + "lambda_power_iteration": 2.0, + "charpoly": [ + -2, + 0, + 2, + -5, + 2, + 0, + 0, + 0 + ], + "density": 0.2344, + "frobenius": 3.873, + "trace": 2 + }, + { + "equation_id": "rrc_eq_8b812bf47cc024b4", + "codeword": "C3", + "index": 17, + "spectral_radius": 1.754878, + "lambda_power_iteration": 1.754878, + "charpoly": [ + -1, + -1, + 0, + -1, + 0, + 0, + 0, + 0 + ], + "density": 0.1406, + "frobenius": 3.0, + "trace": 1, + "identical_matrix_ids": [ + "rrc_eq_185011f4d6cf6a2b" + ] + }, + { + "equation_id": "rrc_eq_8beb9cc11e59ff37", + "codeword": "C3", + "index": 15, + "spectral_radius": 1.740719, + "lambda_power_iteration": 1.740719, + "charpoly": [ + -1, + 0, + -2, + -1, + 1, + 0, + 0, + 0 + ], + "density": 0.1719, + "frobenius": 3.6056, + "trace": 1 + }, + { + "equation_id": "rrc_eq_8c569cbfc2385eab", + "codeword": "C6", + "index": 14, + "spectral_radius": 4.096678, + "lambda_power_iteration": 4.096678, + "charpoly": [ + -4, + -2, + 6, + 2, + 2, + -3, + 2, + 0 + ], + "density": 0.4062, + "frobenius": 5.831, + "trace": 4, + "identical_matrix_ids": [ + "rrc_eq_5e10957e0cbb9de8" + ] + }, + { + "equation_id": "rrc_eq_8ffeff0c4877aa25", + "codeword": "C0", + "index": 11, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 2.6458, + "trace": 0 + }, + { + "equation_id": "rrc_eq_9064d88b17992de3", + "codeword": "C4", + "index": 0, + "spectral_radius": 2.758262, + "lambda_power_iteration": 2.758262, + "charpoly": [ + -2, + -6, + 11, + 1, + -2, + -6, + -3, + 3 + ], + "density": 0.3125, + "frobenius": 5.2915, + "trace": 2 + }, + { + "equation_id": "rrc_eq_90bbd1bf7d23655e", + "codeword": "C7", + "index": 10, + "spectral_radius": 4.894782, + "lambda_power_iteration": 4.894782, + "charpoly": [ + -2, + -11, + -26, + 30, + 105, + 9, + -30, + -138 + ], + "density": 0.5469, + "frobenius": 8.0623, + "trace": 2 + }, + { + "equation_id": "rrc_eq_9166088a2f79f059", + "codeword": "C5", + "index": 5, + "spectral_radius": 3.536437, + "lambda_power_iteration": 3.536437, + "charpoly": [ + -3, + -3, + 4, + -1, + 1, + 4, + 2, + 0 + ], + "density": 0.4219, + "frobenius": 5.7446, + "trace": 3 + }, + { + "equation_id": "rrc_eq_931cb5c74aaade03", + "codeword": "C7", + "index": 6, + "spectral_radius": 4.585105, + "lambda_power_iteration": 4.585105, + "charpoly": [ + -2, + -10, + -4, + -19, + -14, + 28, + 12, + -8 + ], + "density": 0.4375, + "frobenius": 7.0711, + "trace": 2 + }, + { + "equation_id": "rrc_eq_9781272a1dff3d7d", + "codeword": "C0", + "index": 19, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0781, + "frobenius": 2.2361, + "trace": 0 + }, + { + "equation_id": "rrc_eq_9817626505a4fedf", + "codeword": "C3", + "index": 7, + "spectral_radius": 1.549052, + "lambda_power_iteration": 1.549052, + "charpoly": [ + 0, + -1, + -1, + -2, + 0, + 0, + 2, + -2 + ], + "density": 0.1875, + "frobenius": 3.7417, + "trace": 0 + }, + { + "equation_id": "rrc_eq_982c784b74af6c5c", + "codeword": "C3", + "index": 72, + "spectral_radius": 2.516223, + "lambda_power_iteration": 2.516223, + "charpoly": [ + -1, + -1, + -5, + -6, + 0, + 4, + 2, + 0 + ], + "density": 0.25, + "frobenius": 4.4721, + "trace": 1 + }, + { + "equation_id": "rrc_eq_98b0599e8c46c1bf", + "codeword": "C5", + "index": 13, + "spectral_radius": 3.677361, + "lambda_power_iteration": 3.677361, + "charpoly": [ + -1, + -7, + -15, + 7, + 39, + -6, + -24, + 0 + ], + "density": 0.3594, + "frobenius": 6.4031, + "trace": 1 + }, + { + "equation_id": "rrc_eq_9a468347631152ce", + "codeword": "C3", + "index": 12, + "spectral_radius": 1.635396, + "lambda_power_iteration": 1.635396, + "charpoly": [ + 0, + 0, + -4, + 0, + -1, + 0, + 0, + 0 + ], + "density": 0.1719, + "frobenius": 3.6056, + "trace": 0 + }, + { + "equation_id": "rrc_eq_9c22fd7b336c5904", + "codeword": "C0", + "index": 0, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0, + "frobenius": 0.0, + "trace": 0 + }, + { + "equation_id": "rrc_eq_9c2c0d5c61628eb5", + "codeword": "C6", + "index": 6, + "spectral_radius": 3.896048, + "lambda_power_iteration": 3.896048, + "charpoly": [ + -2, + -6, + -6, + 4, + -5, + -6, + 0, + 0 + ], + "density": 0.3125, + "frobenius": 6.0, + "trace": 2 + }, + { + "equation_id": "rrc_eq_9d1897c1a7967172", + "codeword": "C6", + "index": 21, + "spectral_radius": 4.288853, + "lambda_power_iteration": 4.288853, + "charpoly": [ + -3, + -8, + 10, + 4, + -7, + 12, + -36, + 8 + ], + "density": 0.4062, + "frobenius": 6.3246, + "trace": 3 + }, + { + "equation_id": "rrc_eq_9d485a8333644b3b", + "codeword": "C3", + "index": 68, + "spectral_radius": 2.479747, + "lambda_power_iteration": 2.479747, + "charpoly": [ + -1, + -3, + -1, + -1, + -1, + -2, + 1, + 1 + ], + "density": 0.2188, + "frobenius": 3.7417, + "trace": 1 + }, + { + "equation_id": "rrc_eq_9f67a9105f9e0e3c", + "codeword": "C5", + "index": 8, + "spectral_radius": 3.571754, + "lambda_power_iteration": 3.571754, + "charpoly": [ + -3, + -3, + 2, + 4, + 4, + 0, + -2, + 0 + ], + "density": 0.3438, + "frobenius": 5.2915, + "trace": 3 + }, + { + "equation_id": "rrc_eq_a109587e866701dc", + "codeword": "C5", + "index": 0, + "spectral_radius": 3.428699, + "lambda_power_iteration": 3.428699, + "charpoly": [ + -2, + -5, + -5, + 15, + 11, + 5, + -12, + 0 + ], + "density": 0.3438, + "frobenius": 6.0, + "trace": 2 + }, + { + "equation_id": "rrc_eq_a4348738394b0597", + "codeword": "C3", + "index": 47, + "spectral_radius": 2.156743, + "lambda_power_iteration": 2.156743, + "charpoly": [ + -2, + 1, + -4, + 3, + -2, + 2, + -1, + 0 + ], + "density": 0.2188, + "frobenius": 3.7417, + "trace": 2 + }, + { + "equation_id": "rrc_eq_a4adf8b5cc0e5c73", + "codeword": "C3", + "index": 28, + "spectral_radius": 1.933182, + "lambda_power_iteration": 1.341641, + "charpoly": [ + 0, + 0, + 0, + 0, + -27, + 0, + 0, + 0 + ], + "density": 0.2188, + "frobenius": 5.2915, + "trace": 0 + }, + { + "equation_id": "rrc_eq_a59af904a8ad739f", + "codeword": "C6", + "index": 10, + "spectral_radius": 4.013601, + "lambda_power_iteration": 4.013601, + "charpoly": [ + 0, + -10, + -21, + -14, + 0, + -2, + 0, + 0 + ], + "density": 0.4219, + "frobenius": 6.245, + "trace": 0 + }, + { + "equation_id": "rrc_eq_a5dae5efe3dc9a94", + "codeword": "C5", + "index": 9, + "spectral_radius": 3.616651, + "lambda_power_iteration": 3.616651, + "charpoly": [ + -2, + -7, + 5, + -3, + 0, + 0, + 0, + 0 + ], + "density": 0.2656, + "frobenius": 5.1962, + "trace": 2 + }, + { + "equation_id": "rrc_eq_a5fbdc2a7f09759e", + "codeword": "C8", + "index": 12, + "spectral_radius": 9.205873, + "lambda_power_iteration": 9.205873, + "charpoly": [ + -2, + -52, + -138, + 9, + 384, + 401, + 25, + -316 + ], + "density": 1.0625, + "frobenius": 11.225, + "trace": 2, + "sparse_tail": true + }, + { + "equation_id": "rrc_eq_a91ed081e55a7adc", + "codeword": "C4", + "index": 10, + "spectral_radius": 2.928994, + "lambda_power_iteration": 2.928994, + "charpoly": [ + -1, + -5, + 1, + -10, + 8, + -13, + 7, + 0 + ], + "density": 0.3438, + "frobenius": 5.2915, + "trace": 1 + }, + { + "equation_id": "rrc_eq_a91f2f772995a9b9", + "codeword": "C1", + "index": 3, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.0, + "charpoly": [ + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.125, + "frobenius": 2.8284, + "trace": 1 + }, + { + "equation_id": "rrc_eq_a9bdc40d07c74659", + "codeword": "C7", + "index": 12, + "spectral_radius": 4.895311, + "lambda_power_iteration": 4.895311, + "charpoly": [ + -2, + -7, + -20, + -56, + -68, + -84, + -76, + 26 + ], + "density": 0.5781, + "frobenius": 7.8102, + "trace": 2, + "identical_matrix_ids": [ + "rrc_eq_8a05e2496e67848b" + ] + }, + { + "equation_id": "rrc_eq_aaddd26cf129e0ff", + "codeword": "C3", + "index": 76, + "spectral_radius": 2.66725, + "lambda_power_iteration": 2.66725, + "charpoly": [ + -1, + -3, + -4, + 0, + 1, + 0, + 0, + 0 + ], + "density": 0.2656, + "frobenius": 4.3589, + "trace": 1 + }, + { + "equation_id": "rrc_eq_aafdb23c6c8cb77a", + "codeword": "C3", + "index": 74, + "spectral_radius": 2.591304, + "lambda_power_iteration": 2.591304, + "charpoly": [ + -2, + 1, + -4, + -5, + -3, + -4, + 2, + 0 + ], + "density": 0.2656, + "frobenius": 4.3589, + "trace": 2 + }, + { + "equation_id": "rrc_eq_ac1a7a22801b7d77", + "codeword": "C8", + "index": 17, + "spectral_radius": 16.991482, + "lambda_power_iteration": 16.991482, + "charpoly": [ + -7, + -145, + -453, + 259, + 3252, + 25492, + 44348, + -164234 + ], + "density": 1.9688, + "frobenius": 22.0, + "trace": 7, + "sparse_tail": true, + "identical_matrix_ids": [ + "rrc_eq_3f87d2c06726bc30" + ] + }, + { + "equation_id": "rrc_eq_ae70c43fd815392e", + "codeword": "C3", + "index": 73, + "spectral_radius": 2.528659, + "lambda_power_iteration": 2.528659, + "charpoly": [ + -2, + 0, + -3, + -2, + 2, + 0, + 4, + 0 + ], + "density": 0.2344, + "frobenius": 4.5826, + "trace": 2 + }, + { + "equation_id": "rrc_eq_aef93abc672b8e29", + "codeword": "C3", + "index": 1, + "spectral_radius": 1.512876, + "lambda_power_iteration": 1.512876, + "charpoly": [ + 0, + -2, + 0, + 0, + -1, + 0, + 0, + 0 + ], + "density": 0.1406, + "frobenius": 3.3166, + "trace": 0 + }, + { + "equation_id": "rrc_eq_b20eddced9a6b7da", + "codeword": "C3", + "index": 67, + "spectral_radius": 2.47753, + "lambda_power_iteration": 2.47753, + "charpoly": [ + -2, + 0, + -1, + -2, + -5, + -6, + 2, + 3 + ], + "density": 0.2969, + "frobenius": 4.3589, + "trace": 2 + }, + { + "equation_id": "rrc_eq_b2fc5edc90c4c538", + "codeword": "C5", + "index": 14, + "spectral_radius": 3.697041, + "lambda_power_iteration": 3.697041, + "charpoly": [ + -3, + 1, + -13, + 4, + -18, + 0, + 2, + 0 + ], + "density": 0.4375, + "frobenius": 5.831, + "trace": 3 + }, + { + "equation_id": "rrc_eq_b639be44c38e19f1", + "codeword": "C4", + "index": 26, + "spectral_radius": 3.230275, + "lambda_power_iteration": 3.230275, + "charpoly": [ + -1, + -5, + -6, + -6, + 6, + 9, + -9, + -8 + ], + "density": 0.375, + "frobenius": 5.4772, + "trace": 1 + }, + { + "equation_id": "rrc_eq_b650dd7bdbcd9bcb", + "codeword": "C0", + "index": 6, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0938, + "frobenius": 2.4495, + "trace": 0 + }, + { + "equation_id": "rrc_eq_b720db642290ed9d", + "codeword": "C2", + "index": 12, + "spectral_radius": 1.4253, + "lambda_power_iteration": 1.4253, + "charpoly": [ + 0, + 0, + -1, + -2, + -1, + 0, + 0, + 0 + ], + "density": 0.1562, + "frobenius": 3.1623, + "trace": 0 + }, + { + "equation_id": "rrc_eq_b8bfc827c0fd3d28", + "codeword": "C3", + "index": 48, + "spectral_radius": 2.156993, + "lambda_power_iteration": 2.156993, + "charpoly": [ + 0, + -2, + -2, + -6, + -3, + 0, + -5, + -3 + ], + "density": 0.2656, + "frobenius": 4.1231, + "trace": 0 + }, + { + "equation_id": "rrc_eq_b97583b24c3b2936", + "codeword": "C8", + "index": 11, + "spectral_radius": 8.500785, + "lambda_power_iteration": 8.500785, + "charpoly": [ + -14, + 35, + 196, + -848, + -320, + 4338, + 5020, + 1104 + ], + "density": 0.9531, + "frobenius": 13.2288, + "trace": 14, + "sparse_tail": true + }, + { + "equation_id": "rrc_eq_b975f510c14227e3", + "codeword": "C4", + "index": 2, + "spectral_radius": 2.806373, + "lambda_power_iteration": 2.806373, + "charpoly": [ + -1, + -5, + -1, + 0, + 4, + 8, + -4, + 0 + ], + "density": 0.3281, + "frobenius": 5.1962, + "trace": 1 + }, + { + "equation_id": "rrc_eq_b9eb3119b4d99483", + "codeword": "C6", + "index": 20, + "spectral_radius": 4.282496, + "lambda_power_iteration": 4.282496, + "charpoly": [ + -3, + -5, + -1, + -13, + 34, + 8, + -10, + 2 + ], + "density": 0.4688, + "frobenius": 6.3246, + "trace": 3, + "identical_matrix_ids": [ + "rrc_eq_35e1c2bc2da6d854" + ] + }, + { + "equation_id": "rrc_eq_bb071a3f64f90363", + "codeword": "C1", + "index": 16, + "spectral_radius": 1.0, + "lambda_power_iteration": 0.886405, + "charpoly": [ + 0, + 0, + 0, + -1, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 2.6458, + "trace": 0 + }, + { + "equation_id": "rrc_eq_bb62cba4864b0def", + "codeword": "C6", + "index": 8, + "spectral_radius": 3.980362, + "lambda_power_iteration": 3.980362, + "charpoly": [ + -4, + 3, + -8, + -40, + 126, + -103, + 15, + 40 + ], + "density": 0.4531, + "frobenius": 7.2801, + "trace": 4 + }, + { + "equation_id": "rrc_eq_bcd458bef84fe2a2", + "codeword": "C0", + "index": 13, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0938, + "frobenius": 2.4495, + "trace": 0 + }, + { + "equation_id": "rrc_eq_bd8bcf9cb663c096", + "codeword": "C2", + "index": 0, + "spectral_radius": 1.148698, + "lambda_power_iteration": 0.932505, + "charpoly": [ + 0, + 0, + 0, + 0, + -2, + 0, + 0, + 0 + ], + "density": 0.1406, + "frobenius": 3.0, + "trace": 0 + }, + { + "equation_id": "rrc_eq_bedb0334896533f3", + "codeword": "C2", + "index": 10, + "spectral_radius": 1.414214, + "lambda_power_iteration": 1.322876, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + -8, + 0, + 0 + ], + "density": 0.1562, + "frobenius": 3.7417, + "trace": 0 + }, + { + "equation_id": "rrc_eq_bf1b905e94089ddc", + "codeword": "C3", + "index": 41, + "spectral_radius": 2.109381, + "lambda_power_iteration": 2.132736, + "charpoly": [ + 0, + -4, + 0, + -2, + 0, + 0, + 0, + 0 + ], + "density": 0.1875, + "frobenius": 4.2426, + "trace": 0 + }, + { + "equation_id": "rrc_eq_bf9f2062b96a9d25", + "codeword": "C3", + "index": 60, + "spectral_radius": 2.386871, + "lambda_power_iteration": 2.386871, + "charpoly": [ + -1, + 0, + -5, + -8, + 2, + -2, + 8, + 0 + ], + "density": 0.2812, + "frobenius": 4.899, + "trace": 1 + }, + { + "equation_id": "rrc_eq_bfd316d8427b2f6c", + "codeword": "C0", + "index": 24, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 2.6458, + "trace": 0 + }, + { + "equation_id": "rrc_eq_c221ccc2bc9ccc45", + "codeword": "C0", + "index": 2, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0312, + "frobenius": 1.4142, + "trace": 0 + }, + { + "equation_id": "rrc_eq_c3dde450e7ce933a", + "codeword": "C1", + "index": 8, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.224745, + "charpoly": [ + 0, + -1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0625, + "frobenius": 2.0, + "trace": 0 + }, + { + "equation_id": "rrc_eq_c3f6aa5efce88262", + "codeword": "C6", + "index": 17, + "spectral_radius": 4.213678, + "lambda_power_iteration": 4.213678, + "charpoly": [ + -3, + -3, + -13, + 6, + 45, + 10, + 0, + 0 + ], + "density": 0.375, + "frobenius": 6.4807, + "trace": 3 + }, + { + "equation_id": "rrc_eq_c5417aae2492b416", + "codeword": "C8", + "index": 15, + "spectral_radius": 16.562161, + "lambda_power_iteration": 16.562161, + "charpoly": [ + -11, + -91, + 72, + -1595, + 1114, + 8692, + -18880, + 9528 + ], + "density": 1.7344, + "frobenius": 21.8861, + "trace": 11, + "sparse_tail": true + }, + { + "equation_id": "rrc_eq_c56ffe8dd188e331", + "codeword": "C3", + "index": 14, + "spectral_radius": 1.722084, + "lambda_power_iteration": 1.722084, + "charpoly": [ + -1, + -1, + -1, + 1, + 0, + 0, + 0, + 0 + ], + "density": 0.1719, + "frobenius": 3.3166, + "trace": 1 + }, + { + "equation_id": "rrc_eq_c57a3f3edc39ddd3", + "codeword": "C3", + "index": 56, + "spectral_radius": 2.29769, + "lambda_power_iteration": 2.29769, + "charpoly": [ + -2, + -1, + 0, + 3, + -2, + -2, + -1, + 0 + ], + "density": 0.25, + "frobenius": 4.2426, + "trace": 2 + }, + { + "equation_id": "rrc_eq_c5a00dead68e12a0", + "codeword": "C0", + "index": 9, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 2.6458, + "trace": 0 + }, + { + "equation_id": "rrc_eq_c704bc7e7c531303", + "codeword": "C1", + "index": 0, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.0, + "charpoly": [ + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0938, + "frobenius": 2.4495, + "trace": 1 + }, + { + "equation_id": "rrc_eq_c8b7f0fe52ef32fe", + "codeword": "C3", + "index": 24, + "spectral_radius": 1.844674, + "lambda_power_iteration": 1.844674, + "charpoly": [ + 0, + -2, + -2, + 0, + -2, + 0, + 0, + 0 + ], + "density": 0.1875, + "frobenius": 3.7417, + "trace": 0 + }, + { + "equation_id": "rrc_eq_c8d2e5596d91ebbd", + "codeword": "C3", + "index": 55, + "spectral_radius": 2.27073, + "lambda_power_iteration": 2.27073, + "charpoly": [ + -3, + 1, + 0, + 6, + -6, + -1, + 3, + -1 + ], + "density": 0.25, + "frobenius": 4.0, + "trace": 3 + }, + { + "equation_id": "rrc_eq_ca946ab1632d585c", + "codeword": "C4", + "index": 14, + "spectral_radius": 2.972567, + "lambda_power_iteration": 2.972567, + "charpoly": [ + -2, + 0, + -2, + -18, + -4, + 0, + -4, + -8 + ], + "density": 0.3125, + "frobenius": 5.6569, + "trace": 2 + }, + { + "equation_id": "rrc_eq_cabf5eab335f2d23", + "codeword": "C3", + "index": 38, + "spectral_radius": 2.075483, + "lambda_power_iteration": 2.075483, + "charpoly": [ + 0, + -1, + -4, + -5, + -1, + -2, + 0, + 0 + ], + "density": 0.2188, + "frobenius": 4.0, + "trace": 0 + }, + { + "equation_id": "rrc_eq_cbefaa1738883221", + "codeword": "C1", + "index": 11, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.0, + "charpoly": [ + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 2.6458, + "trace": 0 + }, + { + "equation_id": "rrc_eq_cc8b5f7c4742473c", + "codeword": "C3", + "index": 34, + "spectral_radius": 2.0, + "lambda_power_iteration": 2.0, + "charpoly": [ + 0, + -1, + -2, + -4, + -8, + 0, + 0, + 0 + ], + "density": 0.2188, + "frobenius": 4.2426, + "trace": 0 + }, + { + "equation_id": "rrc_eq_cd4dfc767616524d", + "codeword": "C1", + "index": 9, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.0033, + "charpoly": [ + 0, + 0, + -1, + 0, + -1, + 0, + 0, + 1 + ], + "density": 0.1406, + "frobenius": 3.0, + "trace": 0 + }, + { + "equation_id": "rrc_eq_ce049f9298cfb095", + "codeword": "C8", + "index": 9, + "spectral_radius": 8.334441, + "lambda_power_iteration": 8.334441, + "charpoly": [ + -10, + 20, + -49, + -27, + 97, + -104, + 122, + 130 + ], + "density": 0.9531, + "frobenius": 10.7238, + "trace": 10, + "sparse_tail": true + }, + { + "equation_id": "rrc_eq_cf576a1cfbd9da63", + "codeword": "C6", + "index": 11, + "spectral_radius": 4.020341, + "lambda_power_iteration": 4.020341, + "charpoly": [ + -1, + -1, + -15, + -80, + -160, + 0, + 0, + 0 + ], + "density": 0.375, + "frobenius": 7.4833, + "trace": 1 + }, + { + "equation_id": "rrc_eq_d07532a1db76d958", + "codeword": "C1", + "index": 10, + "spectral_radius": 1.0, + "lambda_power_iteration": 0.901388, + "charpoly": [ + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.125, + "frobenius": 2.8284, + "trace": 0 + }, + { + "equation_id": "rrc_eq_d24270e4be19de76", + "codeword": "C3", + "index": 0, + "spectral_radius": 1.49453, + "lambda_power_iteration": 1.49453, + "charpoly": [ + -1, + 0, + -2, + 0, + 2, + 0, + 0, + 0 + ], + "density": 0.1719, + "frobenius": 3.3166, + "trace": 1 + }, + { + "equation_id": "rrc_eq_d356d2da175a4185", + "codeword": "C6", + "index": 1, + "spectral_radius": 3.779395, + "lambda_power_iteration": 3.779395, + "charpoly": [ + -1, + -5, + -15, + -11, + -42, + 15, + -47, + 0 + ], + "density": 0.4531, + "frobenius": 6.5574, + "trace": 1 + }, + { + "equation_id": "rrc_eq_d4e90c1cd69ef948", + "codeword": "C7", + "index": 16, + "spectral_radius": 5.130574, + "lambda_power_iteration": 5.130574, + "charpoly": [ + -3, + -6, + -26, + 3, + -3, + 34, + -17, + 10 + ], + "density": 0.5469, + "frobenius": 7.2801, + "trace": 3 + }, + { + "equation_id": "rrc_eq_d521b2282dde0c38", + "codeword": "C7", + "index": 15, + "spectral_radius": 5.117296, + "lambda_power_iteration": 5.117296, + "charpoly": [ + -4, + -1, + -17, + -10, + -129, + -14, + -104, + -16 + ], + "density": 0.5625, + "frobenius": 7.746, + "trace": 4 + }, + { + "equation_id": "rrc_eq_d618a97b4f87abe9", + "codeword": "C3", + "index": 23, + "spectral_radius": 1.841627, + "lambda_power_iteration": 1.841627, + "charpoly": [ + -1, + -1, + 0, + -2, + 0, + 1, + -1, + 0 + ], + "density": 0.2031, + "frobenius": 3.6056, + "trace": 1 + }, + { + "equation_id": "rrc_eq_d726df3a6c9943ff", + "codeword": "C7", + "index": 8, + "spectral_radius": 4.768364, + "lambda_power_iteration": 4.768364, + "charpoly": [ + -2, + -10, + -13, + -12, + 4, + 3, + 26, + 3 + ], + "density": 0.5312, + "frobenius": 6.9282, + "trace": 2 + }, + { + "equation_id": "rrc_eq_d75b1352c39fe13e", + "codeword": "C8", + "index": 4, + "spectral_radius": 6.922513, + "lambda_power_iteration": 6.922513, + "charpoly": [ + -6, + -8, + 4, + 29, + 125, + 124, + 4, + -16 + ], + "density": 0.6719, + "frobenius": 9.3274, + "trace": 6 + }, + { + "equation_id": "rrc_eq_d76203fbca4e9b81", + "codeword": "C3", + "index": 33, + "spectral_radius": 2.0, + "lambda_power_iteration": 2.0, + "charpoly": [ + 0, + -3, + -2, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.2031, + "frobenius": 3.6056, + "trace": 0 + }, + { + "equation_id": "rrc_eq_d767dc5b5996f6dc", + "codeword": "C1", + "index": 1, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.0, + "charpoly": [ + -1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0625, + "frobenius": 2.0, + "trace": 1 + }, + { + "equation_id": "rrc_eq_d93085afc737effa", + "codeword": "C5", + "index": 6, + "spectral_radius": 3.544043, + "lambda_power_iteration": 3.544043, + "charpoly": [ + -1, + -9, + -1, + 6, + -7, + -9, + 2, + -2 + ], + "density": 0.3438, + "frobenius": 5.4772, + "trace": 1 + }, + { + "equation_id": "rrc_eq_d9785ef71690f60b", + "codeword": "C6", + "index": 5, + "spectral_radius": 3.861369, + "lambda_power_iteration": 3.861369, + "charpoly": [ + -1, + -7, + -7, + -19, + -49, + -28, + 8, + 20 + ], + "density": 0.4219, + "frobenius": 6.4031, + "trace": 1 + }, + { + "equation_id": "rrc_eq_dd01aec7b2c20774", + "codeword": "C0", + "index": 21, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0312, + "frobenius": 1.4142, + "trace": 0, + "identical_matrix_ids": [ + "rrc_eq_8a4d6790faf66d6b" + ] + }, + { + "equation_id": "rrc_eq_dd3140340d9c9a33", + "codeword": "C1", + "index": 19, + "spectral_radius": 1.000003, + "lambda_power_iteration": 1.006707, + "charpoly": [ + -1, + -1, + 0, + 1, + 1, + -1, + 0, + 0 + ], + "density": 0.1562, + "frobenius": 3.1623, + "trace": 1 + }, + { + "equation_id": "rrc_eq_decad728fbd76456", + "codeword": "C2", + "index": 4, + "spectral_radius": 1.316074, + "lambda_power_iteration": 1.133893, + "charpoly": [ + 0, + 0, + 0, + -3, + 0, + 0, + 0, + 0 + ], + "density": 0.1562, + "frobenius": 3.4641, + "trace": 0 + }, + { + "equation_id": "rrc_eq_def9542a5004dc68", + "codeword": "C2", + "index": 9, + "spectral_radius": 1.414214, + "lambda_power_iteration": 1.128152, + "charpoly": [ + 0, + 0, + 0, + -4, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 3.3166, + "trace": 0 + }, + { + "equation_id": "rrc_eq_df9f885395884594", + "codeword": "C3", + "index": 52, + "spectral_radius": 2.198848, + "lambda_power_iteration": 2.198848, + "charpoly": [ + -1, + -3, + 1, + -1, + -1, + 4, + 2, + 0 + ], + "density": 0.2344, + "frobenius": 4.1231, + "trace": 1 + }, + { + "equation_id": "rrc_eq_e0ac7e1847f830a3", + "codeword": "C0", + "index": 10, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0938, + "frobenius": 2.4495, + "trace": 0 + }, + { + "equation_id": "rrc_eq_e22543ef62f2494e", + "codeword": "C1", + "index": 17, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.0, + "charpoly": [ + 0, + 0, + 0, + 0, + -1, + 0, + 0, + 0 + ], + "density": 0.0781, + "frobenius": 2.2361, + "trace": 0 + }, + { + "equation_id": "rrc_eq_e25b46d22b7ca0f1", + "codeword": "C0", + "index": 18, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.0469, + "frobenius": 1.7321, + "trace": 0, + "identical_matrix_ids": [ + "rrc_eq_05370b4783a8bd6a", + "rrc_eq_068487b9141c4fb6" + ] + }, + { + "equation_id": "rrc_eq_e2f1f1f142418961", + "codeword": "C6", + "index": 18, + "spectral_radius": 4.218504, + "lambda_power_iteration": 4.218504, + "charpoly": [ + -3, + -4, + -4, + -3, + -2, + 1, + 0, + 0 + ], + "density": 0.3125, + "frobenius": 5.4772, + "trace": 3 + }, + { + "equation_id": "rrc_eq_e43c6929cd3bc3bf", + "codeword": "C3", + "index": 30, + "spectral_radius": 1.980705, + "lambda_power_iteration": 1.980705, + "charpoly": [ + 0, + -2, + -3, + -3, + 2, + 0, + 2, + 2 + ], + "density": 0.2188, + "frobenius": 4.0, + "trace": 0 + }, + { + "equation_id": "rrc_eq_e4b70a718fcfb1ab", + "codeword": "C3", + "index": 44, + "spectral_radius": 2.126658, + "lambda_power_iteration": 2.126658, + "charpoly": [ + 0, + -2, + -3, + -2, + -6, + 0, + -2, + 0 + ], + "density": 0.25, + "frobenius": 4.6904, + "trace": 0, + "identical_matrix_ids": [ + "rrc_eq_2f44e729b9d25d34" + ] + }, + { + "equation_id": "rrc_eq_e517db2c50e19613", + "codeword": "C3", + "index": 77, + "spectral_radius": 2.680583, + "lambda_power_iteration": 2.680583, + "charpoly": [ + 0, + -6, + -3, + 0, + -1, + 0, + -2, + 0 + ], + "density": 0.3125, + "frobenius": 4.899, + "trace": 0 + }, + { + "equation_id": "rrc_eq_e58f768224fb1bbe", + "codeword": "C6", + "index": 3, + "spectral_radius": 3.81041, + "lambda_power_iteration": 3.81041, + "charpoly": [ + -1, + -7, + -13, + -6, + 8, + -6, + 0, + 0 + ], + "density": 0.375, + "frobenius": 5.4772, + "trace": 1 + }, + { + "equation_id": "rrc_eq_e5f58db6423d2f9c", + "codeword": "C0", + "index": 5, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 2.6458, + "trace": 0 + }, + { + "equation_id": "rrc_eq_e672df600fa82b76", + "codeword": "C5", + "index": 10, + "spectral_radius": 3.627365, + "lambda_power_iteration": 3.627365, + "charpoly": [ + -3, + -2, + -1, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1562, + "frobenius": 4.0, + "trace": 3 + }, + { + "equation_id": "rrc_eq_e6a6d86ede20e5ad", + "codeword": "C6", + "index": 12, + "spectral_radius": 4.041452, + "lambda_power_iteration": 4.041452, + "charpoly": [ + -3, + -6, + 11, + -12, + -14, + 6, + -6, + -4 + ], + "density": 0.4062, + "frobenius": 6.0, + "trace": 3 + }, + { + "equation_id": "rrc_eq_e6b902735f906c33", + "codeword": "C7", + "index": 3, + "spectral_radius": 4.425267, + "lambda_power_iteration": 4.425267, + "charpoly": [ + -1, + -10, + -13, + -21, + -81, + -73, + -33, + -24 + ], + "density": 0.5, + "frobenius": 6.9282, + "trace": 1 + }, + { + "equation_id": "rrc_eq_e9cff20a11527ba0", + "codeword": "C7", + "index": 18, + "spectral_radius": 5.878936, + "lambda_power_iteration": 5.878936, + "charpoly": [ + -3, + -10, + -33, + -40, + -29, + -12, + -12, + 0 + ], + "density": 0.5156, + "frobenius": 7.5498, + "trace": 3 + }, + { + "equation_id": "rrc_eq_ea1df518da53e850", + "codeword": "C3", + "index": 42, + "spectral_radius": 2.116329, + "lambda_power_iteration": 2.116329, + "charpoly": [ + -1, + -3, + 1, + -3, + 10, + -3, + -3, + 0 + ], + "density": 0.2344, + "frobenius": 4.5826, + "trace": 1 + }, + { + "equation_id": "rrc_eq_ec7566b5d400a6fb", + "codeword": "C4", + "index": 7, + "spectral_radius": 2.878655, + "lambda_power_iteration": 2.878655, + "charpoly": [ + -1, + -5, + -1, + 2, + -4, + -12, + 8, + 0 + ], + "density": 0.2812, + "frobenius": 5.099, + "trace": 1 + }, + { + "equation_id": "rrc_eq_ecf3ddf7af735ee6", + "codeword": "C1", + "index": 14, + "spectral_radius": 1.0, + "lambda_power_iteration": 0.898717, + "charpoly": [ + 0, + 0, + -1, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.125, + "frobenius": 2.8284, + "trace": 0 + }, + { + "equation_id": "rrc_eq_ef9d2a2f3c8de320", + "codeword": "C4", + "index": 11, + "spectral_radius": 2.944441, + "lambda_power_iteration": 2.944441, + "charpoly": [ + 0, + -4, + -11, + -9, + 3, + -1, + 0, + 0 + ], + "density": 0.2656, + "frobenius": 4.7958, + "trace": 0 + }, + { + "equation_id": "rrc_eq_f010fb33997b8f51", + "codeword": "C4", + "index": 3, + "spectral_radius": 2.811638, + "lambda_power_iteration": 2.811638, + "charpoly": [ + 0, + 0, + -14, + 0, + -62, + 0, + -24, + 0 + ], + "density": 0.2812, + "frobenius": 5.831, + "trace": 0 + }, + { + "equation_id": "rrc_eq_f112b5836bdbd47d", + "codeword": "C1", + "index": 5, + "spectral_radius": 1.0, + "lambda_power_iteration": 1.002072, + "charpoly": [ + 0, + -2, + 0, + 1, + 0, + 0, + 0, + 0 + ], + "density": 0.1406, + "frobenius": 3.0, + "trace": 0 + }, + { + "equation_id": "rrc_eq_f26b20a02d1cf105", + "codeword": "C4", + "index": 21, + "spectral_radius": 3.140367, + "lambda_power_iteration": 3.140367, + "charpoly": [ + -1, + -2, + -12, + -15, + 11, + 22, + 12, + 0 + ], + "density": 0.3281, + "frobenius": 5.7446, + "trace": 1 + }, + { + "equation_id": "rrc_eq_f4249695d9de4adc", + "codeword": "C8", + "index": 2, + "spectral_radius": 6.502147, + "lambda_power_iteration": 6.502147, + "charpoly": [ + -2, + -23, + -37, + -28, + 17, + 28, + 16, + 16 + ], + "density": 0.6875, + "frobenius": 8.3666, + "trace": 2 + }, + { + "equation_id": "rrc_eq_f46446cfb0f8d5b1", + "codeword": "C7", + "index": 17, + "spectral_radius": 5.539752, + "lambda_power_iteration": 5.539752, + "charpoly": [ + -3, + -15, + 7, + 0, + -47, + -50, + -19, + 0 + ], + "density": 0.4844, + "frobenius": 7.4162, + "trace": 3 + }, + { + "equation_id": "rrc_eq_f5bb28753a2271dd", + "codeword": "C4", + "index": 12, + "spectral_radius": 2.969856, + "lambda_power_iteration": 2.969856, + "charpoly": [ + -2, + -1, + -9, + 7, + 16, + -18, + -8, + 8 + ], + "density": 0.3438, + "frobenius": 5.6569, + "trace": 2 + }, + { + "equation_id": "rrc_eq_f691b1b9f433854f", + "codeword": "C4", + "index": 6, + "spectral_radius": 2.873346, + "lambda_power_iteration": 2.873346, + "charpoly": [ + 0, + -5, + -8, + -3, + -2, + -2, + 1, + 0 + ], + "density": 0.3125, + "frobenius": 4.4721, + "trace": 0, + "identical_matrix_ids": [ + "rrc_eq_811d99697e055c2b" + ] + }, + { + "equation_id": "rrc_eq_f6ecffdb3a584bc6", + "codeword": "C5", + "index": 3, + "spectral_radius": 3.516261, + "lambda_power_iteration": 3.516261, + "charpoly": [ + -2, + -4, + 0, + -11, + -14, + 41, + -154, + -192 + ], + "density": 0.4375, + "frobenius": 6.7823, + "trace": 2 + }, + { + "equation_id": "rrc_eq_f9a9276cb08dd3bb", + "codeword": "C3", + "index": 51, + "spectral_radius": 2.190328, + "lambda_power_iteration": 2.190328, + "charpoly": [ + -2, + 0, + 0, + -2, + 0, + 0, + 0, + 0 + ], + "density": 0.1562, + "frobenius": 3.7417, + "trace": 2 + }, + { + "equation_id": "rrc_eq_fc46c7ee6a40460d", + "codeword": "C7", + "index": 4, + "spectral_radius": 4.430102, + "lambda_power_iteration": 4.430102, + "charpoly": [ + -5, + 7, + -22, + 7, + 14, + -7, + -15, + 0 + ], + "density": 0.4219, + "frobenius": 7.0, + "trace": 5 + }, + { + "equation_id": "rrc_eq_fe98a523c9c0b821", + "codeword": "C0", + "index": 31, + "spectral_radius": 0.0, + "lambda_power_iteration": 0.0, + "charpoly": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1094, + "frobenius": 2.6458, + "trace": 0 + }, + { + "equation_id": "rrc_eq_feea4fcff27bd600", + "codeword": "C3", + "index": 22, + "spectral_radius": 1.839287, + "lambda_power_iteration": 1.839287, + "charpoly": [ + -1, + -1, + -1, + 0, + 0, + 0, + 0, + 0 + ], + "density": 0.1719, + "frobenius": 3.3166, + "trace": 1 + } + ], + "manifold_278": { + "rows": 278, + "unique_ids": 250, + "extra_rows": 28, + "ids_without_matrix": [], + "distinct_matrices": 238, + "boundaries": [ + 0.5, + 1.07435, + 1.459915, + 2.725096, + 3.359837, + 3.731092, + 4.32637, + 6.126622 + ], + "median_gap": 0.021671, + "boundaries_match_250": true, + "clusters": 9 + } +} diff --git a/docs/SPECTRAL_CODEBOOK_GENERATOR.md b/docs/SPECTRAL_CODEBOOK_GENERATOR.md new file mode 100644 index 00000000..2e137670 --- /dev/null +++ b/docs/SPECTRAL_CODEBOOK_GENERATOR.md @@ -0,0 +1,150 @@ +# Spectral Codebook Generator + +**Date:** 2026-07-01 +**Module:** `python/spectral_codebook.py` +**Output:** `data/spectral_codebook.json` +**Tests:** `tests/test_spectral_codebook.py` (15 tests) + +Implements the "Next Steps" of `docs/SPECTRAL_CODEBOOK_ANALYSIS.md`: a +gap-aware spectral codebook over the 250 8×8 integer braid adjacency +matrices in `formal/SilverSight/PIST/Matrices250.lean`, with an +encode/decode round trip and an exact, float-free fingerprint per matrix. + +## Usage + +```sh +python3 python/spectral_codebook.py # build + report + write JSON +python3 python/spectral_codebook.py --check-manifold # also run the 278-row corpus +python3 python/spectral_codebook.py --gap-factor 3 --min-support 10 --no-write +python3 tests/test_spectral_codebook.py # or python3 -m pytest tests/test_spectral_codebook.py +``` + +Pure stdlib (`fractions.Fraction` for exactness). NumPy is used only as an +optional fast path for the spectral radius; without it, a Durand–Kerner +root finder runs on the exact integer characteristic polynomial (verified +to agree with NumPy to 4dp in the test suite). + +API: `build_codebook()` returns a `Codebook` with +`encode(matrix) → (codeword, index)`, `decode(codeword, index) → equation_id`, +`codeword_of(equation_id)`, `cluster_table()`, and `collision_report()`. + +## What changed vs. the original concept + +1. **Exact char-poly fingerprint replaces float λ as primary key.** Each + matrix gets the 8 exact integer coefficients of det(λI − M), computed by + Faddeev–LeVerrier in exact rational arithmetic (integrality of every + coefficient is asserted; Cayley–Hamilton p(M) = 0 is checked in integer + arithmetic in the tests). This is strictly finer than 4dp λ — see the + measured collision numbers below — and involves no floats at all. + +2. **Power-iteration λ is demoted to a traceability field.** The analysis + doc's 9 "mid band / edge-of-chaos" values in (0.5, 1) are power-iteration + **non-convergence artifacts**: all 9 matrices have exact spectral radius + ρ = 1.0 (peripheral spectra — several eigenvalues of modulus 1, + including complex pairs). The C1 "edge-of-chaos" cluster of the analysis + doc therefore does not exist; those matrices belong to the ρ = 1 class. + `spectral_radius` in the new JSON is the exact max root modulus of the + char poly; the legacy estimate is kept as `lambda_power_iteration`. + Measured: 18 of 250 entries have |λ_pi − ρ| > 1e-3. + +3. **Dedupe before gap analysis.** The corpus has only **238 distinct + matrices** over 250 ids (11 groups of byte-identical duplicates, 23 ids + involved). Gap statistics and cluster support are computed over distinct + matrices; duplicates are listed per entry (`identical_matrix_ids`) and + in the collision report. + +4. **Sample-size guard on gap detection.** Gaps > 3× median gap propose + boundaries (30 candidates), but a segment must hold ≥ 10 distinct + matrices to stand as a cluster; smaller segments merge into the neighbor + across the smaller gap. Points isolated above a suppressed gap with + < 10 occupancy are flagged `sparse_tail: true` (outliers, not clusters): + the region above λ ≈ 7.66 holds only 10 ids (and only 4 above λ = 11 — + {11.68, 16.56, 16.99, 16.99}), far too few to assert cluster structure. + +## Measured numbers (250 ids / 238 distinct matrices) + +### Fingerprint uniqueness / collisions + +| Fingerprint | Unique values | Ids uniquely identified | Collision groups (ids) | +|---|---|---|---| +| λ (exact, 4dp) | 179 | 164 / 250 | 15 (86 ids) | +| char poly (exact ℤ⁸) | **196** | **183 / 250** | 13 (67 ids) | +| raw matrix bytes | 238 | 227 / 250 | 11 (23 ids) | + +- Exact duplicate matrices: **11 groups, 23 ids** (12 ids are copies of + another id's matrix). No encoder can separate these; `encode` returns the + canonical (first-sorted) entry and the JSON lists the twins. +- **Cospectral non-identical groups: 6** — same char poly, different + matrices. The largest is the nilpotent class x⁸ (35 ids / 31 distinct + matrices, all ρ = 0); the others are `-1,0,…` (5 ids), `0,0,-1,0,…` + (6 ids), `-1,-1,0,-1,…` (3 ids), and two pairs. +- The 4dp-λ count differs from the analysis doc's 190 because the 9 + artifact values collapse onto ρ = 1.0 once computed exactly. +- **Neither λ nor the char poly is injective** — the round-trip decode key + is the within-cluster rank index, and all collision classes are explicit + in `data/spectral_codebook.json` (`collisions.charpoly_collision_classes`, + `collisions.duplicate_matrix_classes`). + +### Cluster table (gap factor 3.0, min support 10) + +Median gap 0.021671 → threshold 0.065013; 30 candidate boundaries, 8 kept: +`[0.5, 1.0744, 1.4599, 2.7251, 3.3598, 3.7311, 4.3264, 6.1266]`; +sparse-tail cutoff λ = 7.6568. + +| Codeword | Ids | Distinct | λ range | Note | +|---|---|---|---|---| +| C0 | 35 | 31 | 0.0 | nilpotent class (char poly x⁸) | +| C1 | 20 | 20 | [1.0, 1.000003] | peripheral-unit class (incl. the 9 mis-measured) | +| C2 | 13 | 13 | [1.1487, 1.4253] | | +| C3 | 79 | 77 | [1.4945, 2.6919] | bulk | +| C4 | 29 | 28 | [2.7583, 3.2910] | | +| C5 | 15 | 14 | [3.4287, 3.6970] | | +| C6 | 22 | 20 | [3.7651, 4.2889] | | +| C7 | 19 | 18 | [4.3639, 5.8789] | | +| C8 | 18 | 17 | [6.3743, 16.9915] | 10 sparse-tail outliers above 7.6568 | + +The three structurally defensible regions are ρ = 0 (nilpotent), ρ = 1 +(peripheral unit), and the ρ > 1 bulk; the finer C2–C8 boundaries are +gap-supported but data-driven, and the high tail is outlier territory. + +### Round trip + +`decode ∘ encode` verified over all 250 equations: bijective on +(codeword, index) pairs; `encode(matrix)` recovers the exact equation id +for all 227 ids with unique matrices and a byte-identical matrix for the +23 duplicate-group ids. + +### 278-row manifold (`formal/SilverSight/RRC/Q16_16Manifold.lean`) + +278 rows resolve to **250 unique equation ids** — the 28 extra rows are +repeated ids reusing matrices already in the codebook (238 distinct +matrices, no id lacks a matrix). Rerunning gap quantization on the 278-row +corpus reproduces the 250-matrix boundaries exactly: **no new gaps, no new +clusters, all extra rows fall inside existing clusters.** + +## Notes for the Lean side + +- **Identity layer vs. similarity layer.** `ClassifyN.hashMatrix` is a + positional base-5 hash, but corpus entries reach **9**, so injectivity is + not provable (positional carries can collide). Using base ≥ max_entry + 1 + (e.g. 10) makes injectivity trivial to prove. Recommended split: the + positional hash (base ≥ 10) is the *identity* key; the exact char-poly + fingerprint is the *similarity/clustering* key (invariant under + permutation-relabelling of strands, unlike the hash). +- **Threshold mismatch.** `ClassifyN.lean` defines `signalThreshold = + 98304` (1.5 in Q16.16) and `oberthHighThreshold = 262144` (4.0), but + `docs/SPECTRAL_CODEBOOK_ANALYSIS.md` claims the post-fix thresholds are + 0.5/1.0. The code and the analysis doc disagree; this generator matches + neither silently — it emits the gap-derived boundaries above and flags + the discrepancy here for resolution. + +## Output schema (`data/spectral_codebook.json`) + +- header: `schema` (`spectral_codebook_v2`), `quantization` (factor, + min support, median gap, kept/candidate/suppressed boundaries, + sparse-tail cutoff), `clusters` (table above), `collisions` (all counts + and explicit collision classes), `manifold_278` (when `--check-manifold`). +- `entries[]`: `equation_id`, `codeword`, `index`, `spectral_radius` + (exact), `lambda_power_iteration` (legacy), `charpoly` (8 exact ints), + `density`, `frobenius`, `trace`, optional `sparse_tail`, + optional `identical_matrix_ids`. diff --git a/python/spectral_codebook.py b/python/spectral_codebook.py new file mode 100644 index 00000000..71388fb2 --- /dev/null +++ b/python/spectral_codebook.py @@ -0,0 +1,644 @@ +#!/usr/bin/env python3 +# /// script +# requires-python = ">=3.10" +# dependencies = [] +# /// +""" +spectral_codebook.py — Gap-aware spectral codebook over the PIST matrix corpus. + +Implements the "Next Steps" of docs/SPECTRAL_CODEBOOK_ANALYSIS.md, with +corrections found while building it (see docs/SPECTRAL_CODEBOOK_GENERATOR.md): + + 1. Parse the 250 8×8 integer braid adjacency matrices from + formal/SilverSight/PIST/Matrices250.lean (regex on the auto-generated + `def : Array (Array Int)` blocks, plus the `findMatrix` cases). + 2. Compute a full spectral profile per matrix: + - EXACT integer characteristic-polynomial coefficients via the + Faddeev–LeVerrier algorithm in fractions.Fraction arithmetic + (the primary, float-free fingerprint), + - spectral radius λ as the max root modulus of that exact char poly + (NumPy eigvals fast path; pure-stdlib Durand–Kerner fallback), + - power-iteration λ retained only for traceability: the analysis + doc's 9 "mid band" values in (0.5, 1) are power-iteration + NON-CONVERGENCE artifacts — all 9 matrices have exact ρ = 1.0 + (peripheral spectrum with several eigenvalues of modulus 1). + 3. Gap-aware quantization with a sample-size guard: dedupe byte-identical + matrices first (the corpus has 238 distinct matrices over 250 ids), + find gaps > 3× median gap between consecutive distinct λ, then merge + any segment with fewer than MIN_SUPPORT distinct matrices into its + neighbor across the smaller gap. Points isolated above a suppressed + gap with sub-threshold occupancy are flagged as sparse-tail outliers + rather than treated as clusters. + 4. Round-trip: Codebook.encode(matrix) → (codeword, index) and + Codebook.decode(codeword, index) → equation_id are mutually inverse + over the corpus. Neither λ nor the char poly is injective (nilpotent + x^8 class alone has 31 distinct members), so the decode key is the + within-cluster rank index; all collision classes are explicit in the + emitted JSON. + +Pure stdlib. NumPy is used only as an optional fast path when importable; +the pure-Python path is authoritative. + +Usage: + python3 python/spectral_codebook.py # build + report + python3 python/spectral_codebook.py --check-manifold # incl. 278-row corpus + python3 python/spectral_codebook.py --out data/spectral_codebook.json +""" +from __future__ import annotations + +import argparse +import json +import math +import re +import sys +from datetime import date +from fractions import Fraction +from pathlib import Path +from typing import Dict, List, Optional, Sequence, Tuple + +try: # optional fast path only; both paths agree to float rounding + import numpy as _np +except ImportError: # pragma: no cover + _np = None + +REPO_ROOT = Path(__file__).resolve().parent.parent +MATRICES_LEAN = REPO_ROOT / "formal" / "SilverSight" / "PIST" / "Matrices250.lean" +MANIFOLD_LEAN = REPO_ROOT / "formal" / "SilverSight" / "RRC" / "Q16_16Manifold.lean" +DEFAULT_OUT = REPO_ROOT / "data" / "spectral_codebook.json" + +POWER_ITERS = 300 # matches docs/SPECTRAL_CODEBOOK_ANALYSIS.md +GAP_FACTOR = 3.0 # boundary threshold = GAP_FACTOR × median gap +MIN_SUPPORT = 10 # min distinct matrices per cluster (sample-size guard) +LAMBDA_DP = 4 # rounding used for "unique λ" counting (as in doc) + +Matrix = Tuple[Tuple[int, ...], ...] + + +# ────────────────────────────────────────────────────────────────────── +# Parsing Matrices250.lean +# ────────────────────────────────────────────────────────────────────── + +_DEF_RE = re.compile( + r"^def\s+(\w+)\s*:\s*Array\s*\(Array\s+Int\)\s*:=\s*\n\s*#\[(.*?)\n\s*\]", + re.MULTILINE | re.DOTALL, +) +_ROW_RE = re.compile(r"#\[([^\]]*)\]") +_FIND_CASE_RE = re.compile(r'\|\s*"([^"]+)"\s*=>\s*some\s+(\w+)') + + +def parse_matrices_lean(path: Path = MATRICES_LEAN) -> Dict[str, Matrix]: + """Parse `def : Array (Array Int) := #[#[...], ...]` blocks. + + Returns an equation_id → matrix mapping (row-major tuples of ints), + resolving ids through the `findMatrix` match cases when present so the + mapping survives Lean-identifier sanitization of ids. + """ + text = path.read_text() + defs: Dict[str, Matrix] = {} + for name, body in _DEF_RE.findall(text): + rows = tuple( + tuple(int(x) for x in row.split(",") if x.strip()) + for row in _ROW_RE.findall(body) + ) + if rows: + defs[name] = rows + + cases = _FIND_CASE_RE.findall(text) + if cases: + mats = {eid: defs[name] for eid, name in cases if name in defs} + else: # fall back: def name == equation id + mats = dict(defs) + + for eid, mat in mats.items(): + n = len(mat) + if any(len(r) != n for r in mat): + raise ValueError(f"non-square matrix for {eid}") + return mats + + +def parse_manifold_ids(path: Path = MANIFOLD_LEAN) -> List[str]: + """All equationId occurrences (with multiplicity) in the fixture corpus.""" + text = path.read_text() + return re.findall(r'equationId\s*:=\s*"([^"]+)"', text) + + +# ────────────────────────────────────────────────────────────────────── +# Spectral profile +# ────────────────────────────────────────────────────────────────────── + +def charpoly_coeffs(mat: Sequence[Sequence[int]]) -> Tuple[int, ...]: + """Exact characteristic-polynomial coefficients via Faddeev–LeVerrier. + + For an n×n integer matrix M returns (c1, ..., cn) with + + det(λI − M) = λ^n + c1·λ^(n−1) + ... + cn. + + Runs in exact fractions.Fraction arithmetic; every ck is provably an + integer (char poly of an integer matrix), which is asserted. + """ + n = len(mat) + m = [[Fraction(x) for x in row] for row in mat] + aux = [[Fraction(0)] * n for _ in range(n)] # M_0 = 0 + coeffs: List[int] = [] + c = Fraction(1) + for k in range(1, n + 1): + # M_k = M · (M_{k−1} + c_{k−1}·I) + shifted = [ + [aux[i][j] + (c if i == j else 0) for j in range(n)] + for i in range(n) + ] + aux = [ + [sum(m[i][t] * shifted[t][j] for t in range(n)) for j in range(n)] + for i in range(n) + ] + c = -sum(aux[i][i] for i in range(n)) / k + assert c.denominator == 1, "char-poly coefficient must be integral" + coeffs.append(int(c)) + return tuple(coeffs) + + +def _durand_kerner_max_modulus(coeffs: Sequence[int]) -> float: + """Max root modulus of the monic polynomial x^n + c1 x^(n-1) + ... + cn. + + Pure-stdlib root finder (Durand–Kerner). Zero roots are stripped + exactly first, so nilpotent classes return 0.0 with no iteration. + """ + poly = [1] + [int(c) for c in coeffs] + # strip exact zero roots (trailing zero coefficients) + while len(poly) > 1 and poly[-1] == 0: + poly.pop() + n = len(poly) - 1 + if n == 0: + return 0.0 + # Cauchy bound and standard (0.4 + 0.9i)^k seeds + bound = 1.0 + max(abs(c) for c in poly[1:]) + roots = [complex(0.4, 0.9) ** k * (bound / 1.1) for k in range(n)] + + def ev(z: complex) -> complex: + r = complex(0) + for c in poly: + r = r * z + c + return r + + for _ in range(1000): + delta = 0.0 + new_roots = [] + for i, z in enumerate(roots): + den = complex(1) + for j, w in enumerate(roots): + if j != i: + den *= (z - w) + dz = ev(z) / den if den != 0 else complex(0) + new_roots.append(z - dz) + delta = max(delta, abs(dz)) + roots = new_roots + if delta < 1e-13: + break + return max(abs(z) for z in roots) + + +def spectral_radius(mat: Sequence[Sequence[int]], + coeffs: Optional[Sequence[int]] = None) -> float: + """Exact-spectrum spectral radius ρ(M) = max |eigenvalue|. + + NumPy eigvals fast path when available; otherwise Durand–Kerner on the + exact integer char poly. Do NOT use power iteration here: it fails to + converge on peripheral spectra (several eigenvalues of equal modulus), + which is exactly what the ρ = 1 matrices in this corpus have. + """ + if _np is not None: + m = _np.asarray(mat, dtype=float) + if m.size == 0: + return 0.0 + return float(max(abs(_np.linalg.eigvals(m)))) + if coeffs is None: + coeffs = charpoly_coeffs(mat) + return _durand_kerner_max_modulus(coeffs) + + +def power_iteration(mat: Sequence[Sequence[int]], iters: int = POWER_ITERS) -> float: + """Power-iteration λ estimate — UNTRUSTED, kept only for traceability + against data/spectral_codebook_raw.json. Does not converge for + peripheral spectra (see spectral_radius).""" + n = len(mat) + if n == 0: + return 0.0 + v = [1.0 / math.sqrt(n)] * n + lam = 0.0 + for _ in range(iters): + w = [sum(mat[i][j] * v[j] for j in range(n)) for i in range(n)] + norm = math.sqrt(sum(x * x for x in w)) + if norm < 1e-12: + return 0.0 + lam = norm + v = [x / norm for x in w] + return lam + + +def density(mat: Sequence[Sequence[int]]) -> float: + """Total entry weight / n² (matches SpectralN.lean and the raw JSON).""" + n = len(mat) + return sum(sum(row) for row in mat) / (n * n) if n else 0.0 + + +def frobenius(mat: Sequence[Sequence[int]]) -> float: + return math.sqrt(sum(x * x for row in mat for x in row)) + + +def spectral_profile(mat: Sequence[Sequence[int]]) -> dict: + coeffs = charpoly_coeffs(mat) + return { + "spectral_radius": round(spectral_radius(mat, coeffs), 6), + "lambda_power_iteration": round(power_iteration(mat), 6), + "charpoly": list(coeffs), + "density": round(density(mat), 4), + "frobenius": round(frobenius(mat), 4), + "trace": sum(mat[i][i] for i in range(len(mat))), + } + + +# ────────────────────────────────────────────────────────────────────── +# Gap-aware quantization (deduped, sample-size guarded) +# ────────────────────────────────────────────────────────────────────── + +def gap_quantize(lambda_counts: Dict[float, int], + factor: float = GAP_FACTOR, + min_support: int = MIN_SUPPORT) -> dict: + """Gap-aware boundaries over distinct-λ values with occupancy counts. + + `lambda_counts` maps λ → number of DISTINCT matrices at that λ (dedupe + byte-identical matrices before calling; 12 of the 250 corpus matrices + are exact duplicates of another). + + Candidate boundaries sit at midpoints of gaps > factor × median gap. + Sample-size guard: segments holding < min_support distinct matrices are + merged into the neighbor across the smaller bounding gap, so no cluster + is asserted on a handful of points. The suppressed high-end boundaries + define a sparse-tail cutoff: everything above the lowest suppressed + boundary with < min_support mass above it is an outlier region, not a + cluster. + """ + uniq = sorted(lambda_counts) + if len(uniq) < 2: + return {"boundaries": [], "median_gap": 0.0, "threshold": 0.0, + "candidates": [], "suppressed": [], "sparse_tail_cutoff": None} + gaps = [uniq[i + 1] - uniq[i] for i in range(len(uniq) - 1)] + sizes = sorted(gaps) + mid = len(sizes) // 2 + median = sizes[mid] if len(sizes) % 2 else 0.5 * (sizes[mid - 1] + sizes[mid]) + threshold = factor * median + # candidate boundary index i ↔ gap between uniq[i] and uniq[i+1] + candidates = [i for i, g in enumerate(gaps) if g > threshold] + + def seg_counts(bnds: List[int]) -> List[int]: + counts, prev = [], 0 + for b in bnds + [len(uniq) - 1]: + counts.append(sum(lambda_counts[uniq[k]] for k in range(prev, b + 1))) + prev = b + 1 + return counts + + kept = list(candidates) + suppressed: List[int] = [] + while kept: + counts = seg_counts(kept) + weak = [s for s, c in enumerate(counts) if c < min_support] + if not weak: + break + s = min(weak, key=lambda i: counts[i]) + # bounding boundaries of segment s in `kept` + options = [] + if s > 0: + options.append(kept[s - 1]) + if s < len(kept): + options.append(kept[s]) + drop = min(options, key=lambda b: gaps[b]) # merge across smaller gap + kept.remove(drop) + suppressed.append(drop) + + def midpoint(i: int) -> float: + return 0.5 * (uniq[i] + uniq[i + 1]) + + total = sum(lambda_counts.values()) + sparse_cutoff: Optional[float] = None + for b in sorted(suppressed): + above = sum(lambda_counts[v] for v in uniq if v > midpoint(b)) + if above < min_support: + sparse_cutoff = midpoint(b) + break + + return { + "boundaries": [round(midpoint(b), 6) for b in sorted(kept)], + "median_gap": median, + "threshold": threshold, + "candidates": [round(midpoint(b), 6) for b in sorted(candidates)], + "suppressed": [round(midpoint(b), 6) for b in sorted(suppressed)], + "sparse_tail_cutoff": sparse_cutoff, + "total_support": total, + } + + +class Codebook: + """Gap-aware spectral codebook: matrix → (codeword, index) → equation_id.""" + + def __init__(self, matrices: Dict[str, Matrix], + gap_factor: float = GAP_FACTOR, + min_support: int = MIN_SUPPORT) -> None: + self.matrices = matrices + self.gap_factor = gap_factor + self.min_support = min_support + self.profiles: Dict[str, dict] = { + eid: spectral_profile(mat) for eid, mat in matrices.items() + } + + # dedupe byte-identical matrices BEFORE gap analysis + self.matrix_groups: Dict[Matrix, List[str]] = {} + for eid in sorted(self.profiles): + self.matrix_groups.setdefault(matrices[eid], []).append(eid) + lambda_counts: Dict[float, int] = {} + for mat, ids in self.matrix_groups.items(): + lam = self.profiles[ids[0]]["spectral_radius"] + lambda_counts[lam] = lambda_counts.get(lam, 0) + 1 + + self.quant = gap_quantize(lambda_counts, gap_factor, min_support) + self.boundaries: List[float] = self.quant["boundaries"] + + # cluster assignment + deterministic within-cluster rank + by_cluster: Dict[int, List[str]] = {} + for eid, p in self.profiles.items(): + by_cluster.setdefault(self.cluster_of(p["spectral_radius"]), []).append(eid) + self._assign: Dict[str, Tuple[str, int]] = {} + self._decode: Dict[Tuple[str, int], str] = {} + self._by_matrix: Dict[Matrix, Tuple[str, int]] = {} + for ci in sorted(by_cluster): + members = sorted( + by_cluster[ci], + key=lambda e: ( + self.profiles[e]["spectral_radius"], + self.profiles[e]["charpoly"], + self.matrices[e], + e, + ), + ) + for idx, eid in enumerate(members): + cw = f"C{ci}" + self._assign[eid] = (cw, idx) + self._decode[(cw, idx)] = eid + # first (canonical) entry wins for byte-identical duplicates + self._by_matrix.setdefault(self.matrices[eid], (cw, idx)) + + def cluster_of(self, lam: float) -> int: + return sum(1 for b in self.boundaries if lam > b) + + def is_sparse_tail(self, lam: float) -> bool: + cut = self.quant["sparse_tail_cutoff"] + return cut is not None and lam > cut + + def codeword_of(self, equation_id: str) -> Tuple[str, int]: + return self._assign[equation_id] + + def encode(self, mat: Sequence[Sequence[int]]) -> Tuple[str, Optional[int]]: + """(codeword, index) for a matrix. Known matrices get their exact + index (canonical entry for byte-identical duplicates); novel + matrices get a cluster codeword with index None.""" + key = tuple(tuple(int(x) for x in row) for row in mat) + if key in self._by_matrix: + return self._by_matrix[key] + return f"C{self.cluster_of(spectral_radius(key))}", None + + def decode(self, codeword: str, index: int) -> str: + return self._decode[(codeword, index)] + + # ── reporting ──────────────────────────────────────────────────── + + def cluster_table(self) -> List[dict]: + clusters: Dict[str, List[str]] = {} + for eid, (cw, _) in self._assign.items(): + clusters.setdefault(cw, []).append(eid) + rows = [] + for cw in sorted(clusters, key=lambda c: int(c[1:])): + ids = clusters[cw] + lams = [self.profiles[e]["spectral_radius"] for e in ids] + distinct = len({self.matrices[e] for e in ids}) + rows.append({ + "codeword": cw, + "count": len(ids), + "distinct_matrices": distinct, + "lambda_min": round(min(lams), 6), + "lambda_max": round(max(lams), 6), + "sparse_tail_members": sum(1 for l in lams if self.is_sparse_tail(l)), + }) + return rows + + def collision_report(self) -> dict: + lam_groups: Dict[float, List[str]] = {} + cp_groups: Dict[Tuple[int, ...], List[str]] = {} + for eid, p in self.profiles.items(): + lam_groups.setdefault(round(p["spectral_radius"], LAMBDA_DP), []).append(eid) + cp_groups.setdefault(tuple(p["charpoly"]), []).append(eid) + + def collide(groups): # groups with >1 member + return {k: sorted(v) for k, v in groups.items() if len(v) > 1} + + lam_c, cp_c = collide(lam_groups), collide(cp_groups) + mat_c = {m: ids for m, ids in self.matrix_groups.items() if len(ids) > 1} + # cospectral = same char poly but NOT byte-identical matrices + dup_sets = [frozenset(v) for v in mat_c.values()] + cospectral = { + ",".join(map(str, k)): v + for k, v in cp_c.items() if frozenset(v) not in dup_sets + } + pi_mismatch = [ + eid for eid, p in self.profiles.items() + if abs(p["spectral_radius"] - p["lambda_power_iteration"]) > 1e-3 + ] + n = len(self.profiles) + return { + "corpus_size": n, + "distinct_matrices": len(self.matrix_groups), + "duplicate_matrix_groups": len(mat_c), + "duplicate_matrix_members": sum(len(v) for v in mat_c.values()), + "duplicate_matrix_classes": [sorted(v) for v in mat_c.values()], + "unique_lambda_4dp": len(lam_groups), + "lambda_collision_groups": len(lam_c), + "lambda_collision_members": sum(len(v) for v in lam_c.values()), + "unique_charpoly": len(cp_groups), + "charpoly_collision_groups": len(cp_c), + "charpoly_collision_members": sum(len(v) for v in cp_c.values()), + "charpoly_collision_classes": { + ",".join(map(str, k)): v for k, v in cp_c.items() + }, + "cospectral_nonidentical_groups": len(cospectral), + "cospectral_nonidentical": cospectral, + "identified_by_lambda_4dp": sum(1 for v in lam_groups.values() if len(v) == 1), + "identified_by_charpoly": sum(1 for v in cp_groups.values() if len(v) == 1), + "power_iteration_artifacts": sorted(pi_mismatch), + "power_iteration_artifact_count": len(pi_mismatch), + } + + def to_json(self) -> dict: + entries = [] + for eid in sorted(self.profiles): + cw, idx = self._assign[eid] + p = self.profiles[eid] + entry = { + "equation_id": eid, + "codeword": cw, + "index": idx, + "spectral_radius": p["spectral_radius"], + "lambda_power_iteration": p["lambda_power_iteration"], + "charpoly": p["charpoly"], + "density": p["density"], + "frobenius": p["frobenius"], + "trace": p["trace"], + } + if self.is_sparse_tail(p["spectral_radius"]): + entry["sparse_tail"] = True + twins = [t for t in self.matrix_groups[self.matrices[eid]] if t != eid] + if twins: + entry["identical_matrix_ids"] = twins + entries.append(entry) + return { + "schema": "spectral_codebook_v2", + "generated": date.today().isoformat(), + "source": "formal/SilverSight/PIST/Matrices250.lean", + "matrix_count": len(entries), + "lambda_semantics": ( + "spectral_radius is the exact max root modulus of the integer " + "characteristic polynomial (charpoly); lambda_power_iteration is " + "the legacy estimate and is unreliable on peripheral spectra" + ), + "quantization": { + "method": "gap_aware_deduped_min_support", + "gap_factor": self.gap_factor, + "min_support": self.min_support, + "median_gap": round(self.quant["median_gap"], 6), + "threshold": round(self.quant["threshold"], 6), + "boundaries": self.boundaries, + "candidate_boundaries": self.quant["candidates"], + "suppressed_boundaries": self.quant["suppressed"], + "sparse_tail_cutoff": self.quant["sparse_tail_cutoff"], + }, + "clusters": self.cluster_table(), + "collisions": self.collision_report(), + "entries": entries, + } + + +# ────────────────────────────────────────────────────────────────────── +# 278-row manifold cross-check +# ────────────────────────────────────────────────────────────────────── + +def manifold_check(codebook: Codebook, + manifold_path: Path = MANIFOLD_LEAN) -> dict: + """Run the pipeline over the full 278-row fixture corpus. + + The manifold repeats equation ids (278 rows over 250 unique ids), so the + 28 extra rows reuse matrices already in the codebook. After dedupe the + λ multiset is unchanged, so boundaries must match the 250-matrix + codebook exactly; this is reported rather than assumed. + """ + ids = parse_manifold_ids(manifold_path) + missing = sorted({e for e in ids if e not in codebook.profiles}) + seen: Dict[Matrix, str] = {} + lambda_counts: Dict[float, int] = {} + for eid in ids: + if eid in codebook.profiles: + mat = codebook.matrices[eid] + if mat not in seen: # dedupe, matching the codebook build + seen[mat] = eid + lam = codebook.profiles[eid]["spectral_radius"] + lambda_counts[lam] = lambda_counts.get(lam, 0) + 1 + quant = gap_quantize(lambda_counts, codebook.gap_factor, codebook.min_support) + return { + "rows": len(ids), + "unique_ids": len(set(ids)), + "extra_rows": len(ids) - len(set(ids)), + "ids_without_matrix": missing, + "distinct_matrices": len(seen), + "boundaries": quant["boundaries"], + "median_gap": round(quant["median_gap"], 6), + "boundaries_match_250": quant["boundaries"] == codebook.boundaries, + "clusters": len(quant["boundaries"]) + 1, + } + + +# ────────────────────────────────────────────────────────────────────── +# CLI +# ────────────────────────────────────────────────────────────────────── + +def build_codebook(matrices_path: Path = MATRICES_LEAN, + gap_factor: float = GAP_FACTOR, + min_support: int = MIN_SUPPORT) -> Codebook: + return Codebook(parse_matrices_lean(matrices_path), gap_factor, min_support) + + +def main(argv: Optional[List[str]] = None) -> int: + ap = argparse.ArgumentParser(description="Gap-aware spectral codebook generator") + ap.add_argument("--matrices", type=Path, default=MATRICES_LEAN, + help="Matrices250.lean path") + ap.add_argument("--out", type=Path, default=DEFAULT_OUT, + help="Output codebook JSON (default data/spectral_codebook.json)") + ap.add_argument("--gap-factor", type=float, default=GAP_FACTOR, + help="Boundary threshold = factor × median gap (default 3)") + ap.add_argument("--min-support", type=int, default=MIN_SUPPORT, + help="Minimum distinct matrices per cluster (default 10)") + ap.add_argument("--check-manifold", action="store_true", + help="Also run over the 278-row RRC/Q16_16Manifold corpus") + ap.add_argument("--no-write", action="store_true", + help="Report only; do not write the JSON") + args = ap.parse_args(argv) + + cb = build_codebook(args.matrices, args.gap_factor, args.min_support) + doc = cb.to_json() + + col = doc["collisions"] + q = doc["quantization"] + print(f"Spectral codebook over {doc['matrix_count']} matrices " + f"({col['distinct_matrices']} distinct)") + print(f" median gap {q['median_gap']:.6f} × {args.gap_factor:g} → " + f"threshold {q['threshold']:.6f}; min support {args.min_support} " + f"(candidates {len(q['candidate_boundaries'])}, " + f"kept {len(q['boundaries'])}, " + f"suppressed {len(q['suppressed_boundaries'])})") + print(f" boundaries: {q['boundaries']}") + print(f" sparse-tail cutoff: {q['sparse_tail_cutoff']}") + print("\n codeword ids distinct lambda range sparse-tail") + for row in doc["clusters"]: + print(f" {row['codeword']:<8} {row['count']:>4} {row['distinct_matrices']:>8}" + f" [{row['lambda_min']:.4f}, {row['lambda_max']:.4f}]" + f" {row['sparse_tail_members'] or ''}") + print(f"\n fingerprint uniqueness (of {col['corpus_size']} ids / " + f"{col['distinct_matrices']} distinct matrices):") + print(f" λ @4dp : {col['unique_lambda_4dp']} unique values, " + f"{col['identified_by_lambda_4dp']} ids uniquely identified, " + f"{col['lambda_collision_groups']} collision groups " + f"({col['lambda_collision_members']} ids)") + print(f" char-poly ℤ : {col['unique_charpoly']} unique fingerprints, " + f"{col['identified_by_charpoly']} ids uniquely identified, " + f"{col['charpoly_collision_groups']} collision groups " + f"({col['charpoly_collision_members']} ids)") + print(f" exact duplicate matrices: {col['duplicate_matrix_groups']} groups " + f"({col['duplicate_matrix_members']} ids)") + print(f" cospectral non-identical groups: " + f"{col['cospectral_nonidentical_groups']}") + print(f" power-iteration artifacts (|λ_pi − ρ| > 1e-3): " + f"{col['power_iteration_artifact_count']}") + + if args.check_manifold: + mc = manifold_check(cb) + doc["manifold_278"] = mc + print(f"\n 278-row manifold: {mc['rows']} rows / {mc['unique_ids']} unique ids " + f"({mc['extra_rows']} duplicate rows, " + f"{mc['distinct_matrices']} distinct matrices)") + print(f" boundaries match 250-matrix codebook: {mc['boundaries_match_250']} " + f"({mc['clusters']} clusters)") + + if not args.no_write: + args.out.parent.mkdir(parents=True, exist_ok=True) + args.out.write_text(json.dumps(doc, indent=2) + "\n") + print(f"\nWrote {args.out}") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/tests/test_spectral_codebook.py b/tests/test_spectral_codebook.py new file mode 100644 index 00000000..31fbf5ea --- /dev/null +++ b/tests/test_spectral_codebook.py @@ -0,0 +1,203 @@ +"""test_spectral_codebook.py — Gap-aware spectral codebook round-trip tests. + +Validates the spectral_codebook module against the 250-matrix PIST corpus: +exact char-poly fingerprints (Cayley–Hamilton in integer arithmetic), +pure-stdlib vs NumPy spectral-radius agreement, gap-aware quantization +invariants, and the encode/decode round trip over all 250 equations. +""" + +from __future__ import annotations + +import sys +import unittest +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parent.parent / "python")) + +import spectral_codebook as sc + + +def _mat_mul(a, b): + n = len(a) + return [ + [sum(a[i][t] * b[t][j] for t in range(n)) for j in range(n)] + for i in range(n) + ] + + +class TestSpectralCodebook(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.matrices = sc.parse_matrices_lean() + cls.codebook = sc.Codebook(cls.matrices) + + # ── parsing ───────────────────────────────────────────────────── + + def test_parse_250_8x8(self): + self.assertEqual(len(self.matrices), 250) + for eid, mat in self.matrices.items(): + self.assertEqual(len(mat), 8, eid) + self.assertTrue(all(len(r) == 8 for r in mat), eid) + self.assertTrue(all(x >= 0 for r in mat for x in r), eid) + + # ── exact char poly ───────────────────────────────────────────── + + def test_charpoly_identity(self): + # det(λI − I) = (λ − 1)^8 → coefficients are signed binomials + ident = tuple(tuple(1 if i == j else 0 for j in range(8)) for i in range(8)) + expect = (-8, 28, -56, 70, -56, 28, -8, 1) + self.assertEqual(sc.charpoly_coeffs(ident), expect) + + def test_cayley_hamilton_integer(self): + """p(M) = 0 exactly in integer arithmetic (spot check).""" + for eid in sorted(self.matrices)[::50]: # 5 spread-out matrices + m = [list(r) for r in self.matrices[eid]] + coeffs = sc.charpoly_coeffs(m) + n = len(m) + acc = [[1 if i == j else 0 for j in range(n)] for i in range(n)] # M^0 + total = [[coeffs[-1] if i == j else 0 for j in range(n)] for i in range(n)] + for k in range(1, n + 1): + acc = _mat_mul(acc, m) # M^k + c = 1 if k == n else coeffs[n - 1 - k] + for i in range(n): + for j in range(n): + total[i][j] += c * acc[i][j] + self.assertTrue( + all(x == 0 for row in total for x in row), + f"Cayley–Hamilton failed for {eid}", + ) + + def test_charpoly_trace_relation(self): + for eid, mat in self.matrices.items(): + coeffs = self.codebook.profiles[eid]["charpoly"] + self.assertEqual(coeffs[0], -sum(mat[i][i] for i in range(8)), eid) + + # ── spectral radius ───────────────────────────────────────────── + + def test_pure_root_finder_matches_numpy(self): + """Durand–Kerner on the exact char poly agrees with the fast path.""" + for eid in sorted(self.matrices)[::10]: # 25 matrices + p = self.codebook.profiles[eid] + pure = sc._durand_kerner_max_modulus(p["charpoly"]) + self.assertAlmostEqual(pure, p["spectral_radius"], places=4, msg=eid) + + def test_peripheral_spectra_are_unit(self): + """The 9 'mid band' λ in the committed raw JSON (0.5 ≤ λ < 1) are + power-iteration non-convergence artifacts: exact ρ = 1 for all 9.""" + import json + + raw_path = Path(__file__).resolve().parent.parent / "data" / "spectral_codebook_raw.json" + raw = json.loads(raw_path.read_text()) + artifacts = [ + e["equation_id"] for e in raw["entries"] + if 0.5 <= e["spectral_radius"] < 1.0 + ] + self.assertEqual(len(artifacts), 9) + for eid in artifacts: + self.assertAlmostEqual( + self.codebook.profiles[eid]["spectral_radius"], 1.0, places=6, msg=eid + ) + + def test_nilpotent_class(self): + """Every ρ = 0 matrix has char poly exactly x^8 (nilpotent), and the + pure path detects it with no iteration.""" + zeros = [ + eid for eid, p in self.codebook.profiles.items() + if p["spectral_radius"] == 0.0 + ] + self.assertEqual(len(zeros), 35) + for eid in zeros: + coeffs = self.codebook.profiles[eid]["charpoly"] + self.assertEqual(list(coeffs), [0] * 8, eid) + self.assertEqual(sc._durand_kerner_max_modulus(coeffs), 0.0) + + # ── fingerprints & collisions ─────────────────────────────────── + + def test_charpoly_strictly_finer_than_lambda(self): + col = self.codebook.collision_report() + self.assertEqual(col["corpus_size"], 250) + self.assertEqual(col["distinct_matrices"], 238) + self.assertEqual(col["duplicate_matrix_groups"], 11) + self.assertEqual(col["duplicate_matrix_members"], 23) + self.assertGreater(col["unique_charpoly"], col["unique_lambda_4dp"]) + self.assertGreater( + col["identified_by_charpoly"], col["identified_by_lambda_4dp"] + ) + # char poly is NOT injective: collision classes must be explicit + self.assertGreater(col["charpoly_collision_groups"], 0) + self.assertEqual( + sum(len(v) for v in col["charpoly_collision_classes"].values()), + col["charpoly_collision_members"], + ) + + # ── quantization invariants ───────────────────────────────────── + + def test_boundaries_sorted_and_gapped(self): + b = self.codebook.boundaries + self.assertEqual(b, sorted(b)) + self.assertGreater(len(b), 0) + # no λ value sits on a boundary + for p in self.codebook.profiles.values(): + self.assertNotIn(p["spectral_radius"], b) + + def test_min_support_guard(self): + """Every cluster holds ≥ MIN_SUPPORT distinct matrices.""" + for row in self.codebook.cluster_table(): + self.assertGreaterEqual( + row["distinct_matrices"], sc.MIN_SUPPORT, row["codeword"] + ) + + def test_cluster_partition_covers_corpus(self): + table = self.codebook.cluster_table() + self.assertEqual(sum(r["count"] for r in table), 250) + self.assertEqual(sum(r["distinct_matrices"] for r in table), 238) + + # ── round trip ────────────────────────────────────────────────── + + def test_decode_is_bijective_over_250(self): + seen = set() + for eid in self.matrices: + cw, idx = self.codebook.codeword_of(eid) + self.assertNotIn((cw, idx), seen) + seen.add((cw, idx)) + self.assertEqual(self.codebook.decode(cw, idx), eid) + self.assertEqual(len(seen), 250) + + def test_encode_decode_round_trip(self): + """encode(matrix) → decode must return the same equation for every + unique matrix, and a byte-identical matrix for exact duplicates + (identical inputs are information-theoretically indistinguishable).""" + dup_members = { + eid + for ids in self.codebook.matrix_groups.values() + if len(ids) > 1 + for eid in ids + } + for eid, mat in self.matrices.items(): + cw, idx = self.codebook.encode([list(r) for r in mat]) + self.assertIsNotNone(idx, eid) + decoded = self.codebook.decode(cw, idx) + if eid in dup_members: + self.assertEqual(self.matrices[decoded], mat, eid) + else: + self.assertEqual(decoded, eid) + + def test_encode_novel_matrix(self): + novel = [[3 if i == j else 1 for j in range(8)] for i in range(8)] + cw, idx = self.codebook.encode(novel) + self.assertIsNone(idx) + self.assertTrue(cw.startswith("C")) + + # ── 278-row manifold ──────────────────────────────────────────── + + def test_manifold_278_no_new_gaps(self): + mc = sc.manifold_check(self.codebook) + self.assertEqual(mc["rows"], 278) + self.assertEqual(mc["unique_ids"], 250) + self.assertEqual(mc["extra_rows"], 28) + self.assertEqual(mc["ids_without_matrix"], []) + self.assertTrue(mc["boundaries_match_250"]) + + +if __name__ == "__main__": + unittest.main()