passagemath-combinat 10.6.42__cp314-cp314t-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. passagemath_combinat/__init__.py +3 -0
  2. passagemath_combinat-10.6.42.dist-info/DELVEWHEEL +2 -0
  3. passagemath_combinat-10.6.42.dist-info/METADATA +160 -0
  4. passagemath_combinat-10.6.42.dist-info/RECORD +401 -0
  5. passagemath_combinat-10.6.42.dist-info/WHEEL +5 -0
  6. passagemath_combinat-10.6.42.dist-info/top_level.txt +3 -0
  7. passagemath_combinat.libs/libgmp-10-3a5f019e2510aeaad918cab2b57a689d.dll +0 -0
  8. passagemath_combinat.libs/libsymmetrica-3-7dcf900932804d0df5fd0919b4668720.dll +0 -0
  9. sage/algebras/affine_nil_temperley_lieb.py +263 -0
  10. sage/algebras/all.py +24 -0
  11. sage/algebras/all__sagemath_combinat.py +35 -0
  12. sage/algebras/askey_wilson.py +935 -0
  13. sage/algebras/associated_graded.py +345 -0
  14. sage/algebras/cellular_basis.py +350 -0
  15. sage/algebras/cluster_algebra.py +2766 -0
  16. sage/algebras/down_up_algebra.py +860 -0
  17. sage/algebras/free_algebra.py +1698 -0
  18. sage/algebras/free_algebra_element.py +345 -0
  19. sage/algebras/free_algebra_quotient.py +405 -0
  20. sage/algebras/free_algebra_quotient_element.py +295 -0
  21. sage/algebras/free_zinbiel_algebra.py +885 -0
  22. sage/algebras/hall_algebra.py +783 -0
  23. sage/algebras/hecke_algebras/all.py +4 -0
  24. sage/algebras/hecke_algebras/ariki_koike_algebra.py +1796 -0
  25. sage/algebras/hecke_algebras/ariki_koike_specht_modules.py +475 -0
  26. sage/algebras/hecke_algebras/cubic_hecke_algebra.py +3520 -0
  27. sage/algebras/hecke_algebras/cubic_hecke_base_ring.py +1473 -0
  28. sage/algebras/hecke_algebras/cubic_hecke_matrix_rep.py +1079 -0
  29. sage/algebras/iwahori_hecke_algebra.py +3095 -0
  30. sage/algebras/jordan_algebra.py +1773 -0
  31. sage/algebras/lie_conformal_algebras/abelian_lie_conformal_algebra.py +113 -0
  32. sage/algebras/lie_conformal_algebras/affine_lie_conformal_algebra.py +156 -0
  33. sage/algebras/lie_conformal_algebras/all.py +18 -0
  34. sage/algebras/lie_conformal_algebras/bosonic_ghosts_lie_conformal_algebra.py +134 -0
  35. sage/algebras/lie_conformal_algebras/examples.py +43 -0
  36. sage/algebras/lie_conformal_algebras/fermionic_ghosts_lie_conformal_algebra.py +131 -0
  37. sage/algebras/lie_conformal_algebras/finitely_freely_generated_lca.py +139 -0
  38. sage/algebras/lie_conformal_algebras/free_bosons_lie_conformal_algebra.py +174 -0
  39. sage/algebras/lie_conformal_algebras/free_fermions_lie_conformal_algebra.py +167 -0
  40. sage/algebras/lie_conformal_algebras/freely_generated_lie_conformal_algebra.py +107 -0
  41. sage/algebras/lie_conformal_algebras/graded_lie_conformal_algebra.py +135 -0
  42. sage/algebras/lie_conformal_algebras/lie_conformal_algebra.py +353 -0
  43. sage/algebras/lie_conformal_algebras/lie_conformal_algebra_element.py +236 -0
  44. sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_basis.py +78 -0
  45. sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py +328 -0
  46. sage/algebras/lie_conformal_algebras/n2_lie_conformal_algebra.py +117 -0
  47. sage/algebras/lie_conformal_algebras/neveu_schwarz_lie_conformal_algebra.py +86 -0
  48. sage/algebras/lie_conformal_algebras/virasoro_lie_conformal_algebra.py +82 -0
  49. sage/algebras/lie_conformal_algebras/weyl_lie_conformal_algebra.py +205 -0
  50. sage/algebras/nil_coxeter_algebra.py +191 -0
  51. sage/algebras/q_commuting_polynomials.py +673 -0
  52. sage/algebras/q_system.py +608 -0
  53. sage/algebras/quantum_clifford.py +959 -0
  54. sage/algebras/quantum_groups/ace_quantum_onsager.py +693 -0
  55. sage/algebras/quantum_groups/all.py +9 -0
  56. sage/algebras/quantum_groups/fock_space.py +2219 -0
  57. sage/algebras/quantum_groups/q_numbers.py +207 -0
  58. sage/algebras/quantum_groups/quantum_group_gap.py +2695 -0
  59. sage/algebras/quantum_groups/representations.py +591 -0
  60. sage/algebras/quantum_matrix_coordinate_algebra.py +1006 -0
  61. sage/algebras/quantum_oscillator.py +623 -0
  62. sage/algebras/quaternion_algebra.py +20 -0
  63. sage/algebras/quaternion_algebra_element.py +55 -0
  64. sage/algebras/rational_cherednik_algebra.py +525 -0
  65. sage/algebras/schur_algebra.py +670 -0
  66. sage/algebras/shuffle_algebra.py +1011 -0
  67. sage/algebras/splitting_algebra.py +779 -0
  68. sage/algebras/tensor_algebra.py +709 -0
  69. sage/algebras/yangian.py +1082 -0
  70. sage/algebras/yokonuma_hecke_algebra.py +1018 -0
  71. sage/all__sagemath_combinat.py +44 -0
  72. sage/combinat/SJT.py +255 -0
  73. sage/combinat/affine_permutation.py +2405 -0
  74. sage/combinat/algebraic_combinatorics.py +55 -0
  75. sage/combinat/all.py +53 -0
  76. sage/combinat/all__sagemath_combinat.py +195 -0
  77. sage/combinat/alternating_sign_matrix.py +2063 -0
  78. sage/combinat/baxter_permutations.py +346 -0
  79. sage/combinat/bijectionist.py +3220 -0
  80. sage/combinat/binary_recurrence_sequences.py +1180 -0
  81. sage/combinat/blob_algebra.py +685 -0
  82. sage/combinat/catalog_partitions.py +27 -0
  83. sage/combinat/chas/all.py +23 -0
  84. sage/combinat/chas/fsym.py +1180 -0
  85. sage/combinat/chas/wqsym.py +2601 -0
  86. sage/combinat/cluster_complex.py +326 -0
  87. sage/combinat/colored_permutations.py +2039 -0
  88. sage/combinat/colored_permutations_representations.py +964 -0
  89. sage/combinat/composition_signed.py +142 -0
  90. sage/combinat/composition_tableau.py +855 -0
  91. sage/combinat/constellation.py +1729 -0
  92. sage/combinat/core.py +751 -0
  93. sage/combinat/counting.py +12 -0
  94. sage/combinat/crystals/affine.py +742 -0
  95. sage/combinat/crystals/affine_factorization.py +518 -0
  96. sage/combinat/crystals/affinization.py +331 -0
  97. sage/combinat/crystals/alcove_path.py +2013 -0
  98. sage/combinat/crystals/all.py +22 -0
  99. sage/combinat/crystals/bkk_crystals.py +141 -0
  100. sage/combinat/crystals/catalog.py +115 -0
  101. sage/combinat/crystals/catalog_elementary_crystals.py +18 -0
  102. sage/combinat/crystals/catalog_infinity_crystals.py +33 -0
  103. sage/combinat/crystals/catalog_kirillov_reshetikhin.py +18 -0
  104. sage/combinat/crystals/crystals.py +257 -0
  105. sage/combinat/crystals/direct_sum.py +260 -0
  106. sage/combinat/crystals/elementary_crystals.py +1251 -0
  107. sage/combinat/crystals/fast_crystals.py +441 -0
  108. sage/combinat/crystals/fully_commutative_stable_grothendieck.py +1205 -0
  109. sage/combinat/crystals/generalized_young_walls.py +1076 -0
  110. sage/combinat/crystals/highest_weight_crystals.py +436 -0
  111. sage/combinat/crystals/induced_structure.py +695 -0
  112. sage/combinat/crystals/infinity_crystals.py +730 -0
  113. sage/combinat/crystals/kac_modules.py +863 -0
  114. sage/combinat/crystals/kirillov_reshetikhin.py +4196 -0
  115. sage/combinat/crystals/kyoto_path_model.py +497 -0
  116. sage/combinat/crystals/letters.cp314t-win_amd64.pyd +0 -0
  117. sage/combinat/crystals/letters.pxd +79 -0
  118. sage/combinat/crystals/letters.pyx +3056 -0
  119. sage/combinat/crystals/littelmann_path.py +1518 -0
  120. sage/combinat/crystals/monomial_crystals.py +1262 -0
  121. sage/combinat/crystals/multisegments.py +462 -0
  122. sage/combinat/crystals/mv_polytopes.py +467 -0
  123. sage/combinat/crystals/pbw_crystal.py +511 -0
  124. sage/combinat/crystals/pbw_datum.cp314t-win_amd64.pyd +0 -0
  125. sage/combinat/crystals/pbw_datum.pxd +4 -0
  126. sage/combinat/crystals/pbw_datum.pyx +487 -0
  127. sage/combinat/crystals/polyhedral_realization.py +372 -0
  128. sage/combinat/crystals/spins.cp314t-win_amd64.pyd +0 -0
  129. sage/combinat/crystals/spins.pxd +21 -0
  130. sage/combinat/crystals/spins.pyx +756 -0
  131. sage/combinat/crystals/star_crystal.py +290 -0
  132. sage/combinat/crystals/subcrystal.py +464 -0
  133. sage/combinat/crystals/tensor_product.py +1177 -0
  134. sage/combinat/crystals/tensor_product_element.cp314t-win_amd64.pyd +0 -0
  135. sage/combinat/crystals/tensor_product_element.pxd +35 -0
  136. sage/combinat/crystals/tensor_product_element.pyx +1870 -0
  137. sage/combinat/crystals/virtual_crystal.py +420 -0
  138. sage/combinat/cyclic_sieving_phenomenon.py +204 -0
  139. sage/combinat/debruijn_sequence.cp314t-win_amd64.pyd +0 -0
  140. sage/combinat/debruijn_sequence.pyx +355 -0
  141. sage/combinat/decorated_permutation.py +270 -0
  142. sage/combinat/degree_sequences.cp314t-win_amd64.pyd +0 -0
  143. sage/combinat/degree_sequences.pyx +588 -0
  144. sage/combinat/derangements.py +527 -0
  145. sage/combinat/descent_algebra.py +1008 -0
  146. sage/combinat/diagram.py +1551 -0
  147. sage/combinat/diagram_algebras.py +5886 -0
  148. sage/combinat/dyck_word.py +4349 -0
  149. sage/combinat/e_one_star.py +1623 -0
  150. sage/combinat/enumerated_sets.py +123 -0
  151. sage/combinat/expnums.cp314t-win_amd64.pyd +0 -0
  152. sage/combinat/expnums.pyx +148 -0
  153. sage/combinat/fast_vector_partitions.cp314t-win_amd64.pyd +0 -0
  154. sage/combinat/fast_vector_partitions.pyx +346 -0
  155. sage/combinat/fqsym.py +1977 -0
  156. sage/combinat/free_dendriform_algebra.py +954 -0
  157. sage/combinat/free_prelie_algebra.py +1141 -0
  158. sage/combinat/fully_commutative_elements.py +1077 -0
  159. sage/combinat/fully_packed_loop.py +1523 -0
  160. sage/combinat/gelfand_tsetlin_patterns.py +1409 -0
  161. sage/combinat/gray_codes.py +311 -0
  162. sage/combinat/grossman_larson_algebras.py +667 -0
  163. sage/combinat/growth.py +4352 -0
  164. sage/combinat/hall_polynomial.py +188 -0
  165. sage/combinat/hillman_grassl.py +866 -0
  166. sage/combinat/integer_matrices.py +329 -0
  167. sage/combinat/integer_vectors_mod_permgroup.py +1238 -0
  168. sage/combinat/k_tableau.py +4564 -0
  169. sage/combinat/kazhdan_lusztig.py +215 -0
  170. sage/combinat/key_polynomial.py +885 -0
  171. sage/combinat/knutson_tao_puzzles.py +2286 -0
  172. sage/combinat/lr_tableau.py +311 -0
  173. sage/combinat/matrices/all.py +24 -0
  174. sage/combinat/matrices/hadamard_matrix.py +3790 -0
  175. sage/combinat/matrices/latin.py +2912 -0
  176. sage/combinat/misc.py +401 -0
  177. sage/combinat/multiset_partition_into_sets_ordered.py +3541 -0
  178. sage/combinat/ncsf_qsym/all.py +21 -0
  179. sage/combinat/ncsf_qsym/combinatorics.py +317 -0
  180. sage/combinat/ncsf_qsym/generic_basis_code.py +1427 -0
  181. sage/combinat/ncsf_qsym/ncsf.py +5637 -0
  182. sage/combinat/ncsf_qsym/qsym.py +4053 -0
  183. sage/combinat/ncsf_qsym/tutorial.py +447 -0
  184. sage/combinat/ncsym/all.py +21 -0
  185. sage/combinat/ncsym/bases.py +855 -0
  186. sage/combinat/ncsym/dual.py +593 -0
  187. sage/combinat/ncsym/ncsym.py +2076 -0
  188. sage/combinat/necklace.py +551 -0
  189. sage/combinat/non_decreasing_parking_function.py +634 -0
  190. sage/combinat/nu_dyck_word.py +1474 -0
  191. sage/combinat/output.py +861 -0
  192. sage/combinat/parallelogram_polyomino.py +4326 -0
  193. sage/combinat/parking_functions.py +1602 -0
  194. sage/combinat/partition_algebra.py +1998 -0
  195. sage/combinat/partition_kleshchev.py +1982 -0
  196. sage/combinat/partition_shifting_algebras.py +584 -0
  197. sage/combinat/partition_tuple.py +3114 -0
  198. sage/combinat/path_tableaux/all.py +13 -0
  199. sage/combinat/path_tableaux/catalog.py +29 -0
  200. sage/combinat/path_tableaux/dyck_path.py +380 -0
  201. sage/combinat/path_tableaux/frieze.py +476 -0
  202. sage/combinat/path_tableaux/path_tableau.py +728 -0
  203. sage/combinat/path_tableaux/semistandard.py +510 -0
  204. sage/combinat/perfect_matching.py +779 -0
  205. sage/combinat/plane_partition.py +3300 -0
  206. sage/combinat/q_bernoulli.cp314t-win_amd64.pyd +0 -0
  207. sage/combinat/q_bernoulli.pyx +128 -0
  208. sage/combinat/quickref.py +81 -0
  209. sage/combinat/recognizable_series.py +2051 -0
  210. sage/combinat/regular_sequence.py +4316 -0
  211. sage/combinat/regular_sequence_bounded.py +543 -0
  212. sage/combinat/restricted_growth.py +81 -0
  213. sage/combinat/ribbon.py +20 -0
  214. sage/combinat/ribbon_shaped_tableau.py +489 -0
  215. sage/combinat/ribbon_tableau.py +1180 -0
  216. sage/combinat/rigged_configurations/all.py +46 -0
  217. sage/combinat/rigged_configurations/bij_abstract_class.py +548 -0
  218. sage/combinat/rigged_configurations/bij_infinity.py +370 -0
  219. sage/combinat/rigged_configurations/bij_type_A.py +163 -0
  220. sage/combinat/rigged_configurations/bij_type_A2_dual.py +338 -0
  221. sage/combinat/rigged_configurations/bij_type_A2_even.py +218 -0
  222. sage/combinat/rigged_configurations/bij_type_A2_odd.py +199 -0
  223. sage/combinat/rigged_configurations/bij_type_B.py +900 -0
  224. sage/combinat/rigged_configurations/bij_type_C.py +267 -0
  225. sage/combinat/rigged_configurations/bij_type_D.py +771 -0
  226. sage/combinat/rigged_configurations/bij_type_D_tri.py +392 -0
  227. sage/combinat/rigged_configurations/bij_type_D_twisted.py +576 -0
  228. sage/combinat/rigged_configurations/bij_type_E67.py +402 -0
  229. sage/combinat/rigged_configurations/bijection.py +143 -0
  230. sage/combinat/rigged_configurations/kleber_tree.py +1475 -0
  231. sage/combinat/rigged_configurations/kr_tableaux.py +1898 -0
  232. sage/combinat/rigged_configurations/rc_crystal.py +461 -0
  233. sage/combinat/rigged_configurations/rc_infinity.py +540 -0
  234. sage/combinat/rigged_configurations/rigged_configuration_element.py +2403 -0
  235. sage/combinat/rigged_configurations/rigged_configurations.py +1918 -0
  236. sage/combinat/rigged_configurations/rigged_partition.cp314t-win_amd64.pyd +0 -0
  237. sage/combinat/rigged_configurations/rigged_partition.pxd +15 -0
  238. sage/combinat/rigged_configurations/rigged_partition.pyx +680 -0
  239. sage/combinat/rigged_configurations/tensor_product_kr_tableaux.py +499 -0
  240. sage/combinat/rigged_configurations/tensor_product_kr_tableaux_element.py +428 -0
  241. sage/combinat/rsk.py +3438 -0
  242. sage/combinat/schubert_polynomial.py +508 -0
  243. sage/combinat/set_partition.py +3318 -0
  244. sage/combinat/set_partition_iterator.cp314t-win_amd64.pyd +0 -0
  245. sage/combinat/set_partition_iterator.pyx +136 -0
  246. sage/combinat/set_partition_ordered.py +1590 -0
  247. sage/combinat/sf/abreu_nigro.py +346 -0
  248. sage/combinat/sf/all.py +52 -0
  249. sage/combinat/sf/character.py +576 -0
  250. sage/combinat/sf/classical.py +319 -0
  251. sage/combinat/sf/dual.py +996 -0
  252. sage/combinat/sf/elementary.py +549 -0
  253. sage/combinat/sf/hall_littlewood.py +1028 -0
  254. sage/combinat/sf/hecke.py +336 -0
  255. sage/combinat/sf/homogeneous.py +464 -0
  256. sage/combinat/sf/jack.py +1428 -0
  257. sage/combinat/sf/k_dual.py +1458 -0
  258. sage/combinat/sf/kfpoly.py +447 -0
  259. sage/combinat/sf/llt.py +789 -0
  260. sage/combinat/sf/macdonald.py +2019 -0
  261. sage/combinat/sf/monomial.py +525 -0
  262. sage/combinat/sf/multiplicative.py +113 -0
  263. sage/combinat/sf/new_kschur.py +1786 -0
  264. sage/combinat/sf/ns_macdonald.py +964 -0
  265. sage/combinat/sf/orthogonal.py +246 -0
  266. sage/combinat/sf/orthotriang.py +355 -0
  267. sage/combinat/sf/powersum.py +963 -0
  268. sage/combinat/sf/schur.py +880 -0
  269. sage/combinat/sf/sf.py +1653 -0
  270. sage/combinat/sf/sfa.py +7053 -0
  271. sage/combinat/sf/symplectic.py +253 -0
  272. sage/combinat/sf/witt.py +721 -0
  273. sage/combinat/shifted_primed_tableau.py +2735 -0
  274. sage/combinat/shuffle.py +830 -0
  275. sage/combinat/sidon_sets.py +146 -0
  276. sage/combinat/similarity_class_type.py +1721 -0
  277. sage/combinat/sine_gordon.py +618 -0
  278. sage/combinat/six_vertex_model.py +784 -0
  279. sage/combinat/skew_partition.py +2053 -0
  280. sage/combinat/skew_tableau.py +2989 -0
  281. sage/combinat/sloane_functions.py +8935 -0
  282. sage/combinat/specht_module.py +1403 -0
  283. sage/combinat/species/all.py +48 -0
  284. sage/combinat/species/characteristic_species.py +321 -0
  285. sage/combinat/species/composition_species.py +273 -0
  286. sage/combinat/species/cycle_species.py +284 -0
  287. sage/combinat/species/empty_species.py +155 -0
  288. sage/combinat/species/functorial_composition_species.py +148 -0
  289. sage/combinat/species/generating_series.py +673 -0
  290. sage/combinat/species/library.py +148 -0
  291. sage/combinat/species/linear_order_species.py +169 -0
  292. sage/combinat/species/misc.py +83 -0
  293. sage/combinat/species/partition_species.py +290 -0
  294. sage/combinat/species/permutation_species.py +268 -0
  295. sage/combinat/species/product_species.py +423 -0
  296. sage/combinat/species/recursive_species.py +476 -0
  297. sage/combinat/species/set_species.py +192 -0
  298. sage/combinat/species/species.py +820 -0
  299. sage/combinat/species/structure.py +539 -0
  300. sage/combinat/species/subset_species.py +243 -0
  301. sage/combinat/species/sum_species.py +225 -0
  302. sage/combinat/subword.py +564 -0
  303. sage/combinat/subword_complex.py +2122 -0
  304. sage/combinat/subword_complex_c.cp314t-win_amd64.pyd +0 -0
  305. sage/combinat/subword_complex_c.pyx +119 -0
  306. sage/combinat/super_tableau.py +821 -0
  307. sage/combinat/superpartition.py +1154 -0
  308. sage/combinat/symmetric_group_algebra.py +3774 -0
  309. sage/combinat/symmetric_group_representations.py +1830 -0
  310. sage/combinat/t_sequences.py +877 -0
  311. sage/combinat/tableau.py +9506 -0
  312. sage/combinat/tableau_residues.py +860 -0
  313. sage/combinat/tableau_tuple.py +5353 -0
  314. sage/combinat/tiling.py +2432 -0
  315. sage/combinat/triangles_FHM.py +777 -0
  316. sage/combinat/tutorial.py +1857 -0
  317. sage/combinat/vector_partition.py +337 -0
  318. sage/combinat/words/abstract_word.py +1722 -0
  319. sage/combinat/words/all.py +59 -0
  320. sage/combinat/words/alphabet.py +268 -0
  321. sage/combinat/words/finite_word.py +7201 -0
  322. sage/combinat/words/infinite_word.py +113 -0
  323. sage/combinat/words/lyndon_word.py +652 -0
  324. sage/combinat/words/morphic.py +351 -0
  325. sage/combinat/words/morphism.py +3878 -0
  326. sage/combinat/words/paths.py +2932 -0
  327. sage/combinat/words/shuffle_product.py +278 -0
  328. sage/combinat/words/suffix_trees.py +1873 -0
  329. sage/combinat/words/word.py +769 -0
  330. sage/combinat/words/word_char.cp314t-win_amd64.pyd +0 -0
  331. sage/combinat/words/word_char.pyx +847 -0
  332. sage/combinat/words/word_datatypes.cp314t-win_amd64.pyd +0 -0
  333. sage/combinat/words/word_datatypes.pxd +4 -0
  334. sage/combinat/words/word_datatypes.pyx +1067 -0
  335. sage/combinat/words/word_generators.py +2026 -0
  336. sage/combinat/words/word_infinite_datatypes.py +1218 -0
  337. sage/combinat/words/word_options.py +99 -0
  338. sage/combinat/words/words.py +2396 -0
  339. sage/data_structures/all__sagemath_combinat.py +1 -0
  340. sage/databases/all__sagemath_combinat.py +13 -0
  341. sage/databases/findstat.py +4897 -0
  342. sage/databases/oeis.py +2058 -0
  343. sage/databases/sloane.py +393 -0
  344. sage/dynamics/all__sagemath_combinat.py +14 -0
  345. sage/dynamics/cellular_automata/all.py +7 -0
  346. sage/dynamics/cellular_automata/catalog.py +34 -0
  347. sage/dynamics/cellular_automata/elementary.py +612 -0
  348. sage/dynamics/cellular_automata/glca.py +477 -0
  349. sage/dynamics/cellular_automata/solitons.py +1463 -0
  350. sage/dynamics/finite_dynamical_system.py +1249 -0
  351. sage/dynamics/finite_dynamical_system_catalog.py +382 -0
  352. sage/games/all.py +7 -0
  353. sage/games/hexad.py +704 -0
  354. sage/games/quantumino.py +591 -0
  355. sage/games/sudoku.py +889 -0
  356. sage/games/sudoku_backtrack.cp314t-win_amd64.pyd +0 -0
  357. sage/games/sudoku_backtrack.pyx +189 -0
  358. sage/groups/all__sagemath_combinat.py +1 -0
  359. sage/groups/indexed_free_group.py +489 -0
  360. sage/libs/all__sagemath_combinat.py +6 -0
  361. sage/libs/lrcalc/__init__.py +1 -0
  362. sage/libs/lrcalc/lrcalc.py +525 -0
  363. sage/libs/symmetrica/__init__.py +7 -0
  364. sage/libs/symmetrica/all.py +101 -0
  365. sage/libs/symmetrica/kostka.pxi +168 -0
  366. sage/libs/symmetrica/part.pxi +193 -0
  367. sage/libs/symmetrica/plet.pxi +42 -0
  368. sage/libs/symmetrica/sab.pxi +196 -0
  369. sage/libs/symmetrica/sb.pxi +332 -0
  370. sage/libs/symmetrica/sc.pxi +192 -0
  371. sage/libs/symmetrica/schur.pxi +956 -0
  372. sage/libs/symmetrica/symmetrica.cp314t-win_amd64.pyd +0 -0
  373. sage/libs/symmetrica/symmetrica.pxi +1172 -0
  374. sage/libs/symmetrica/symmetrica.pyx +39 -0
  375. sage/monoids/all.py +13 -0
  376. sage/monoids/automatic_semigroup.py +1054 -0
  377. sage/monoids/free_abelian_monoid.py +315 -0
  378. sage/monoids/free_abelian_monoid_element.cp314t-win_amd64.pyd +0 -0
  379. sage/monoids/free_abelian_monoid_element.pxd +16 -0
  380. sage/monoids/free_abelian_monoid_element.pyx +397 -0
  381. sage/monoids/free_monoid.py +335 -0
  382. sage/monoids/free_monoid_element.py +431 -0
  383. sage/monoids/hecke_monoid.py +65 -0
  384. sage/monoids/string_monoid.py +817 -0
  385. sage/monoids/string_monoid_element.py +547 -0
  386. sage/monoids/string_ops.py +143 -0
  387. sage/monoids/trace_monoid.py +972 -0
  388. sage/rings/all__sagemath_combinat.py +2 -0
  389. sage/sat/all.py +4 -0
  390. sage/sat/boolean_polynomials.py +405 -0
  391. sage/sat/converters/__init__.py +6 -0
  392. sage/sat/converters/anf2cnf.py +14 -0
  393. sage/sat/converters/polybori.py +611 -0
  394. sage/sat/solvers/__init__.py +5 -0
  395. sage/sat/solvers/cryptominisat.py +287 -0
  396. sage/sat/solvers/dimacs.py +783 -0
  397. sage/sat/solvers/picosat.py +228 -0
  398. sage/sat/solvers/sat_lp.py +156 -0
  399. sage/sat/solvers/satsolver.cp314t-win_amd64.pyd +0 -0
  400. sage/sat/solvers/satsolver.pxd +3 -0
  401. sage/sat/solvers/satsolver.pyx +405 -0
@@ -0,0 +1,1079 @@
1
+ # sage_setup: distribution = sagemath-combinat
2
+ # sage.doctest: needs sage.modules
3
+ r"""
4
+ Cubic Hecke matrix representations
5
+
6
+ This module contains the class :class:`CubicHeckeMatrixRep` which is used to
7
+ treat the matrix representations of the elements of the cubic Hecke algebra
8
+ (:class:`~sage.algebras.hecke_algebras.cubic_hecke_algebra.CubicHeckeAlgebra`)
9
+ together with its parent class :class:`CubicHeckeMatrixSpace`. Furthermore,
10
+ it contains enums for their types (:class:`RepresentationType`) and names
11
+ (:class:`AbsIrreducibeRep`).
12
+
13
+
14
+ AUTHORS:
15
+
16
+ - Sebastian Oehms May 2020: initial version
17
+ """
18
+ # ###########################################################################
19
+ # Copyright (C) 2020 Sebastian Oehms <seb.oehms@gmail.com>
20
+ #
21
+ # This program is free software: you can redistribute it and/or modify
22
+ # it under the terms of the GNU General Public License as published by
23
+ # the Free Software Foundation, either version 2 of the License, or
24
+ # (at your option) any later version.
25
+ # https://www.gnu.org/licenses/
26
+ # ###########################################################################
27
+ from enum import Enum
28
+
29
+ from sage.misc.cachefunc import cached_method
30
+ from sage.misc.verbose import verbose
31
+ from sage.rings.integer import Integer
32
+ from sage.matrix.matrix_generic_dense import Matrix_generic_dense
33
+ from sage.matrix.matrix_space import MatrixSpace
34
+ from sage.matrix.constructor import matrix
35
+ from sage.matrix.special import block_diagonal_matrix
36
+ from sage.databases.cubic_hecke_db import CubicHeckeDataSection as sc
37
+
38
+
39
+ # -------------------------------------------
40
+ # Enum for the generators sign (of exponent)
41
+ # -------------------------------------------
42
+ class GenSign(Enum):
43
+ r"""
44
+ Enum class to select the braid generators sign.
45
+
46
+ EXAMPLES::
47
+
48
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
49
+ sage: chmr.GenSign.pos
50
+ <GenSign.pos: 1>
51
+ sage: chmr.GenSign.neg
52
+ <GenSign.neg: -1>
53
+ """
54
+ pos = 1
55
+ neg = -1
56
+
57
+
58
+ # -------------------------------------------
59
+ # Enum for typ of matrix representation
60
+ # -------------------------------------------
61
+ class RepresentationType(Enum):
62
+ r"""
63
+ Enum class to select a representation type for the cubic Hecke algebra.
64
+
65
+ - ``RegularLeft`` -- left regular representations
66
+ - ``RegularRight`` -- right regular representations
67
+ - ``SplitIrredMarin`` -- split irreducible representations obtained from
68
+ Ivan Marin's data
69
+ - ``SplitIrredChevie`` -- the split irreducible representations obtained
70
+ from CHEVIE via the ``GAP3`` interface
71
+
72
+ EXAMPLES::
73
+
74
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
75
+ sage: chmr.RepresentationType.RegularLeft.is_regular()
76
+ True
77
+ """
78
+ def is_split(self):
79
+ r"""
80
+ Return ``True`` if this representation type is absolutely split,
81
+ ``False`` else-wise.
82
+
83
+ EXAMPLES::
84
+
85
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
86
+ sage: chevie = chmr.RepresentationType.SplitIrredChevie
87
+ sage: chevie.is_split()
88
+ True
89
+ """
90
+ return self.value['split']
91
+
92
+ def is_regular(self):
93
+ r"""
94
+ Return ``True`` if this representation type is regular, ``False``
95
+ else-wise.
96
+
97
+ EXAMPLES::
98
+
99
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
100
+ sage: reg_left = chmr.RepresentationType.RegularLeft
101
+ sage: reg_left.is_regular()
102
+ True
103
+ """
104
+ return self.value['regular']
105
+
106
+ def data_section(self):
107
+ r"""
108
+ Return the name of the data file. For more information see
109
+ :class:`~sage.databases.cubic_hecke_db.CubicHeckeDataBase`.
110
+
111
+ EXAMPLES::
112
+
113
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
114
+ sage: reg_left = chmr.RepresentationType.RegularLeft
115
+ sage: reg_left.data_section()
116
+ <CubicHeckeDataSection.regular_left: 'regular_left'>
117
+ """
118
+ return self.value['data']
119
+
120
+ def number_of_representations(self, nstrands):
121
+ r"""
122
+ Return the number of representations existing to that type.
123
+
124
+ EXAMPLES::
125
+
126
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
127
+ sage: chmr.RepresentationType.SplitIrredChevie.number_of_representations(4)
128
+ 24
129
+ sage: chmr.RepresentationType.SplitIrredMarin.number_of_representations(4)
130
+ 24
131
+ """
132
+ if self.value['data'] is None:
133
+ if nstrands < 1 or nstrands > 5:
134
+ raise ValueError("nstrands must be between 1 and 5")
135
+ elif nstrands < 1 or nstrands > 4:
136
+ raise ValueError("nstrands must be between 1 and 4")
137
+ return self.value['num_rep'][nstrands - 1]
138
+
139
+ RegularLeft = {'split': False, 'regular': True, 'data': sc.regular_left, 'num_rep': [1, 1, 1, 1]}
140
+ RegularRight = {'split': False, 'regular': True, 'data': sc.regular_right, 'num_rep': [1, 1, 1, 1]}
141
+ SplitIrredMarin = {'split': True, 'regular': False, 'data': sc.split_irred, 'num_rep': [1, 3, 7, 24]}
142
+ SplitIrredChevie = {'split': True, 'regular': False, 'data': None, 'num_rep': [1, 3, 7, 24, 30]}
143
+
144
+
145
+ # ---------------------------------------------
146
+ # Enum for absolute irreducible representations
147
+ # ---------------------------------------------
148
+ class AbsIrreducibeRep(Enum):
149
+ r"""
150
+ Enum class to select an absolutely irreducible representation for the cubic
151
+ Hecke algebra (``CHAn``) on `n`-strands.
152
+
153
+ The names are build as follows: Take the determinant of one of the
154
+ generators of the ``CHAn``. This is a monomial in the generic extension
155
+ ring (``GER``) of ``CHA``, say ``a^ib^jc^k`` where ``a, b`` and ``c`` are
156
+ the generators of ``GER``. This does not depend on the choice of the
157
+ generator of ``CHA``, since these are conjugated to each other. This
158
+ monomial might be looked as the weight of the representation. Therefore we
159
+ use it as a name:
160
+
161
+ ``Wn_ijk``
162
+
163
+ The only ambiguity among the available irreducible representations occurs for the two nine-dimensional modules, which
164
+ are conjugated to each other and distinguished by these names:
165
+
166
+ ``W4_333`` and ``W4_333bar``
167
+
168
+ Examples of names:
169
+
170
+ - ``W2_100`` -- one dimensional representation of the cubic Hecke algebra on 2 strands corresponding to the first root
171
+ of the cubic equation
172
+ - ``W3_111`` -- three dimensional irreducible representation of the cubic Hecke algebra on 3 strands
173
+ - ``W4_242`` -- eight dimensional irreducible representation of the cubic Hecke algebra on 4 strands having the second
174
+ root of the cubic equation as weight of dimension 4
175
+
176
+ Alternative names are taken from [MW2012]_ and can be shown by
177
+ :meth:`alternative_name`.
178
+
179
+ EXAMPLES::
180
+
181
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
182
+ sage: [irr.name for irr in chmr.AbsIrreducibeRep]
183
+ ['W2_100', 'W2_001', 'W2_010', 'W3_100', 'W3_001', 'W3_010', 'W3_011', 'W3_110',
184
+ 'W3_101', 'W3_111', 'W4_100', 'W4_001', 'W4_010', 'W4_011', 'W4_110', 'W4_101',
185
+ 'W4_111', 'W4_120', 'W4_201', 'W4_012', 'W4_102', 'W4_210', 'W4_021', 'W4_213',
186
+ 'W4_132', 'W4_321', 'W4_231', 'W4_123', 'W4_312', 'W4_422', 'W4_224', 'W4_242',
187
+ 'W4_333', 'W4_333bar', 'W5_100', 'W5_001', 'W5_010', 'W5_013', 'W5_130', 'W5_301',
188
+ 'W5_031', 'W5_103', 'W5_310', 'W5_203', 'W5_032', 'W5_320', 'W5_230', 'W5_023',
189
+ 'W5_302', 'W5_033', 'W5_330', 'W5_303', 'W5_163', 'W5_631', 'W5_316', 'W5_136',
190
+ 'W5_613', 'W5_361', 'W5_366', 'W5_663', 'W5_636', 'W5_933', 'W5_339', 'W5_393']
191
+
192
+ REFERENCES:
193
+
194
+ - [MW2012]_
195
+ """
196
+ def alternative_name(self):
197
+ r"""
198
+ Return the name of the split irreducible representation for cubic Hecke
199
+ algebras for up to four strands as given in [MW2012]_.
200
+
201
+ EXAMPLES::
202
+
203
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
204
+ sage: chmr.AbsIrreducibeRep.W3_011.alternative_name()
205
+ 'Tbc'
206
+ """
207
+ return self.value['alt_name']
208
+
209
+ def dimension(self):
210
+ r"""
211
+ Return the dimension of the representation.
212
+
213
+ EXAMPLES::
214
+
215
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
216
+ sage: chmr.AbsIrreducibeRep.W3_111.dimension()
217
+ 3
218
+ """
219
+ return self.value['dim']
220
+
221
+ def number_gens(self):
222
+ r"""
223
+ Return the number of generators of the underlying cubic Hecke algebra.
224
+
225
+ EXAMPLES::
226
+
227
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
228
+ sage: chmr.AbsIrreducibeRep.W3_001.number_gens()
229
+ 2
230
+ sage: chmr.AbsIrreducibeRep.W4_001.number_gens()
231
+ 3
232
+ """
233
+ return self.value['ngens']
234
+
235
+ def length_orbit(self):
236
+ r"""
237
+ Return the length of the orbit of this representation under the action
238
+ of the Galois group of the cubic equation.
239
+
240
+ EXAMPLES::
241
+
242
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
243
+ sage: chmr.AbsIrreducibeRep.W3_001.length_orbit()
244
+ 3
245
+ sage: chmr.AbsIrreducibeRep.W3_111.length_orbit()
246
+ 1
247
+ """
248
+ return self.value['len_orbit']
249
+
250
+ def gap_index(self):
251
+ r"""
252
+ Return the array index of this representation for the access
253
+ to the ``GAP3`` package ``CHEVIE``.
254
+
255
+ EXAMPLES::
256
+
257
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
258
+ sage: chmr.AbsIrreducibeRep.W3_111.gap_index()
259
+ 6
260
+ """
261
+ return self.value['gap_ind']
262
+
263
+ def internal_index(self):
264
+ r"""
265
+ Return the array index of this representation for the internal access.
266
+
267
+ EXAMPLES::
268
+
269
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
270
+ sage: chmr.AbsIrreducibeRep.W3_111.internal_index()
271
+ 6
272
+ """
273
+ return self.value['intern_ind']
274
+
275
+ # -------------------------------------------------------------------------------------------------
276
+ # absolutely irreducible representations corresponding to braids on 2 strands
277
+ # -------------------------------------------------------------------------------------------------
278
+ W2_100 = {'alt_name': 'Sa', 'dim': 1, 'ngens': 1, 'len_orbit': 3, 'gap_ind': 0, 'intern_ind': 0}
279
+ W2_001 = {'alt_name': 'Sc', 'dim': 1, 'ngens': 1, 'len_orbit': 3, 'gap_ind': 1, 'intern_ind': 1}
280
+ W2_010 = {'alt_name': 'Sb', 'dim': 1, 'ngens': 1, 'len_orbit': 3, 'gap_ind': 2, 'intern_ind': 2}
281
+
282
+ # -------------------------------------------------------------------------------------------------
283
+ # absolutely irreducible representations corresponding to braids on 3 strands
284
+ # -------------------------------------------------------------------------------------------------
285
+ W3_100 = {'alt_name': 'Sa', 'dim': 1, 'ngens': 2, 'len_orbit': 3, 'gap_ind': 0, 'intern_ind': 0}
286
+ W3_001 = {'alt_name': 'Sc', 'dim': 1, 'ngens': 2, 'len_orbit': 3, 'gap_ind': 1, 'intern_ind': 1}
287
+ W3_010 = {'alt_name': 'Sb', 'dim': 1, 'ngens': 2, 'len_orbit': 3, 'gap_ind': 2, 'intern_ind': 2}
288
+
289
+ W3_011 = {'alt_name': 'Tbc', 'dim': 2, 'ngens': 2, 'len_orbit': 3, 'gap_ind': 3, 'intern_ind': 3}
290
+ W3_110 = {'alt_name': 'Tab', 'dim': 2, 'ngens': 2, 'len_orbit': 3, 'gap_ind': 4, 'intern_ind': 4}
291
+ W3_101 = {'alt_name': 'Tac', 'dim': 2, 'ngens': 2, 'len_orbit': 3, 'gap_ind': 5, 'intern_ind': 5}
292
+
293
+ W3_111 = {'alt_name': 'V', 'dim': 3, 'ngens': 2, 'len_orbit': 1, 'gap_ind': 6, 'intern_ind': 6}
294
+
295
+ # -------------------------------------------------------------------------------------------------
296
+ # absolutely irreducible representations corresponding to braids on 4 strands
297
+ # -------------------------------------------------------------------------------------------------
298
+ W4_100 = {'alt_name': 'Sa', 'dim': 1, 'ngens': 3, 'len_orbit': 3, 'gap_ind': 0, 'intern_ind': 0}
299
+ W4_001 = {'alt_name': 'Sc', 'dim': 1, 'ngens': 3, 'len_orbit': 3, 'gap_ind': 1, 'intern_ind': 1}
300
+ W4_010 = {'alt_name': 'Sb', 'dim': 1, 'ngens': 3, 'len_orbit': 3, 'gap_ind': 2, 'intern_ind': 2}
301
+
302
+ W4_011 = {'alt_name': 'Tbc', 'dim': 2, 'ngens': 3, 'len_orbit': 3, 'gap_ind': 3, 'intern_ind': 3}
303
+ W4_110 = {'alt_name': 'Tab', 'dim': 2, 'ngens': 3, 'len_orbit': 3, 'gap_ind': 4, 'intern_ind': 4}
304
+ W4_101 = {'alt_name': 'Tac', 'dim': 2, 'ngens': 3, 'len_orbit': 3, 'gap_ind': 5, 'intern_ind': 5}
305
+
306
+ W4_111 = {'alt_name': 'V', 'dim': 3, 'ngens': 3, 'len_orbit': 1, 'gap_ind': 6, 'intern_ind': 6}
307
+
308
+ W4_120 = {'alt_name': 'Uba', 'dim': 3, 'ngens': 3, 'len_orbit': 6, 'gap_ind': 7, 'intern_ind': 7}
309
+ W4_201 = {'alt_name': 'Uac', 'dim': 3, 'ngens': 3, 'len_orbit': 6, 'gap_ind': 8, 'intern_ind': 8}
310
+ W4_012 = {'alt_name': 'Ucb', 'dim': 3, 'ngens': 3, 'len_orbit': 6, 'gap_ind': 9, 'intern_ind': 9}
311
+ W4_102 = {'alt_name': 'Uca', 'dim': 3, 'ngens': 3, 'len_orbit': 6, 'gap_ind': 10, 'intern_ind': 10}
312
+ W4_210 = {'alt_name': 'Uab', 'dim': 3, 'ngens': 3, 'len_orbit': 6, 'gap_ind': 11, 'intern_ind': 11}
313
+ W4_021 = {'alt_name': 'Ubc', 'dim': 3, 'ngens': 3, 'len_orbit': 6, 'gap_ind': 12, 'intern_ind': 12}
314
+
315
+ W4_213 = {'alt_name': 'Vcab', 'dim': 6, 'ngens': 3, 'len_orbit': 6, 'gap_ind': 13, 'intern_ind': 13}
316
+ W4_132 = {'alt_name': 'Vbca', 'dim': 6, 'ngens': 3, 'len_orbit': 6, 'gap_ind': 14, 'intern_ind': 14}
317
+ W4_321 = {'alt_name': 'Vabc', 'dim': 6, 'ngens': 3, 'len_orbit': 6, 'gap_ind': 15, 'intern_ind': 15}
318
+ W4_231 = {'alt_name': 'Vbac', 'dim': 6, 'ngens': 3, 'len_orbit': 6, 'gap_ind': 16, 'intern_ind': 16}
319
+ W4_123 = {'alt_name': 'Vcba', 'dim': 6, 'ngens': 3, 'len_orbit': 6, 'gap_ind': 17, 'intern_ind': 17}
320
+ W4_312 = {'alt_name': 'Vacb', 'dim': 6, 'ngens': 3, 'len_orbit': 6, 'gap_ind': 18, 'intern_ind': 18}
321
+
322
+ W4_422 = {'alt_name': 'Wa', 'dim': 8, 'ngens': 3, 'len_orbit': 3, 'gap_ind': 19, 'intern_ind': 19}
323
+ W4_224 = {'alt_name': 'Wc', 'dim': 8, 'ngens': 3, 'len_orbit': 3, 'gap_ind': 20, 'intern_ind': 20}
324
+ W4_242 = {'alt_name': 'Wb', 'dim': 8, 'ngens': 3, 'len_orbit': 3, 'gap_ind': 21, 'intern_ind': 21}
325
+
326
+ W4_333 = {'alt_name': 'X', 'dim': 9, 'ngens': 3, 'len_orbit': 2, 'gap_ind': 22, 'intern_ind': 22}
327
+ W4_333bar = {'alt_name': 'Xbar', 'dim': 9, 'ngens': 3, 'len_orbit': 2, 'gap_ind': 23, 'intern_ind': 23}
328
+
329
+ # -------------------------------------------------------------------------------------------------
330
+ # absolutely irreducible representations corresponding to braids on 5 strands
331
+ # -------------------------------------------------------------------------------------------------
332
+ W5_100 = {'alt_name': None, 'dim': 1, 'ngens': 4, 'len_orbit': 3, 'gap_ind': 0, 'intern_ind': 0}
333
+ W5_001 = {'alt_name': None, 'dim': 1, 'ngens': 4, 'len_orbit': 3, 'gap_ind': 1, 'intern_ind': 1}
334
+ W5_010 = {'alt_name': None, 'dim': 1, 'ngens': 4, 'len_orbit': 3, 'gap_ind': 2, 'intern_ind': 2}
335
+
336
+ W5_013 = {'alt_name': None, 'dim': 4, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 3, 'intern_ind': 3}
337
+ W5_130 = {'alt_name': None, 'dim': 4, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 4, 'intern_ind': 4}
338
+ W5_301 = {'alt_name': None, 'dim': 4, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 5, 'intern_ind': 5}
339
+ W5_031 = {'alt_name': None, 'dim': 4, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 6, 'intern_ind': 6}
340
+ W5_103 = {'alt_name': None, 'dim': 4, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 7, 'intern_ind': 7}
341
+ W5_310 = {'alt_name': None, 'dim': 4, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 8, 'intern_ind': 8}
342
+
343
+ W5_203 = {'alt_name': None, 'dim': 5, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 9, 'intern_ind': 9}
344
+ W5_032 = {'alt_name': None, 'dim': 5, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 10, 'intern_ind': 10}
345
+ W5_320 = {'alt_name': None, 'dim': 5, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 11, 'intern_ind': 11}
346
+ W5_230 = {'alt_name': None, 'dim': 5, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 12, 'intern_ind': 12}
347
+ W5_023 = {'alt_name': None, 'dim': 5, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 13, 'intern_ind': 13}
348
+ W5_302 = {'alt_name': None, 'dim': 5, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 14, 'intern_ind': 14}
349
+
350
+ W5_033 = {'alt_name': None, 'dim': 6, 'ngens': 4, 'len_orbit': 3, 'gap_ind': 15, 'intern_ind': 15}
351
+ W5_330 = {'alt_name': None, 'dim': 6, 'ngens': 4, 'len_orbit': 3, 'gap_ind': 16, 'intern_ind': 16}
352
+ W5_303 = {'alt_name': None, 'dim': 6, 'ngens': 4, 'len_orbit': 3, 'gap_ind': 17, 'intern_ind': 17}
353
+
354
+ W5_163 = {'alt_name': None, 'dim': 10, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 18, 'intern_ind': 18}
355
+ W5_631 = {'alt_name': None, 'dim': 10, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 19, 'intern_ind': 19}
356
+ W5_316 = {'alt_name': None, 'dim': 10, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 20, 'intern_ind': 20}
357
+ W5_136 = {'alt_name': None, 'dim': 10, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 21, 'intern_ind': 21}
358
+ W5_613 = {'alt_name': None, 'dim': 10, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 22, 'intern_ind': 22}
359
+ W5_361 = {'alt_name': None, 'dim': 10, 'ngens': 4, 'len_orbit': 6, 'gap_ind': 23, 'intern_ind': 23}
360
+
361
+ W5_366 = {'alt_name': None, 'dim': 15, 'ngens': 4, 'len_orbit': 3, 'gap_ind': 24, 'intern_ind': 24}
362
+ W5_663 = {'alt_name': None, 'dim': 15, 'ngens': 4, 'len_orbit': 3, 'gap_ind': 26, 'intern_ind': 25}
363
+ W5_636 = {'alt_name': None, 'dim': 15, 'ngens': 4, 'len_orbit': 3, 'gap_ind': 27, 'intern_ind': 26}
364
+
365
+ W5_933 = {'alt_name': None, 'dim': 15, 'ngens': 4, 'len_orbit': 3, 'gap_ind': 25, 'intern_ind': 27}
366
+ W5_339 = {'alt_name': None, 'dim': 15, 'ngens': 4, 'len_orbit': 3, 'gap_ind': 28, 'intern_ind': 28}
367
+ W5_393 = {'alt_name': None, 'dim': 15, 'ngens': 4, 'len_orbit': 3, 'gap_ind': 29, 'intern_ind': 29}
368
+
369
+
370
+ # ------------------------------------------------------------------------------------------------------------------
371
+ # Definition of CubicHeckeMatrixRep
372
+ # --------------------------------------------------------------------------------------------------------
373
+ class CubicHeckeMatrixRep(Matrix_generic_dense):
374
+ r"""
375
+ Class to supervise the diagonal block matrix structure arising from
376
+ cubic Hecke algebra-representations.
377
+
378
+ EXAMPLES::
379
+
380
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
381
+ sage: CHA2.<c1> = algebras.CubicHecke(2)
382
+ sage: MS = chmr.CubicHeckeMatrixSpace(CHA2)
383
+ sage: m1 = MS(c1); m1
384
+ [ a 0 0]
385
+ [ 0 b 0]
386
+ [ 0 0 -b - a + u]
387
+ sage: type(m1)
388
+ <class 'sage.algebras.hecke_algebras.cubic_hecke_matrix_rep.CubicHeckeMatrixSpace_with_category.element_class'>
389
+ sage: m1.block_diagonal_list()
390
+ [[a], [b], [-b - a + u]]
391
+
392
+ sage: MSo = chmr.CubicHeckeMatrixSpace(CHA2, original=True)
393
+ sage: MSo(c1)
394
+ [a 0 0]
395
+ [0 b 0]
396
+ [0 0 c]
397
+
398
+ sage: reg_left = chmr.RepresentationType.RegularLeft
399
+ sage: MSreg = chmr.CubicHeckeMatrixSpace(CHA2, representation_type=reg_left)
400
+ sage: MSreg(c1)
401
+ [ 0 -v 1]
402
+ [ 1 u 0]
403
+ [ 0 w 0]
404
+ sage: len(_.block_diagonal_list())
405
+ 1
406
+
407
+ TESTS:
408
+
409
+ The minpoly does not work over more generic rings::
410
+
411
+ sage: TestSuite(m1).run(skip='_test_minpoly')
412
+ """
413
+
414
+ @cached_method
415
+ def _get_block(self, ind):
416
+ r"""
417
+ Return the ``ind``-th sub-matrix block of ``self`` considered
418
+ as block diagonal matrix.
419
+
420
+ INPUT:
421
+
422
+ - ``ind`` -- integer specifying the list index according to
423
+ :meth:`internal_index` respectively :meth:`gap_index`
424
+
425
+ OUTPUT:
426
+
427
+ An instance of :class:`Matrix_generic_dense` representing
428
+ the specified block of ``self``.
429
+
430
+ EXAMPLES::
431
+
432
+ sage: CHA2.<c1> = algebras.CubicHecke(2)
433
+ sage: c1.matrix()._get_block(0) # indirect doctest
434
+ [a]
435
+ """
436
+ representation_type = self.parent()._representation_type
437
+ if not representation_type.is_split():
438
+ return matrix(self)
439
+ n = self.parent()._cubic_hecke_algebra.ngens()
440
+ s = sum(irr_rep.dimension() for irr_rep in AbsIrreducibeRep if irr_rep.number_gens() == n and irr_rep.internal_index() < ind)
441
+ for irr_rep in AbsIrreducibeRep:
442
+ if irr_rep.number_gens() == n and irr_rep.internal_index() == ind:
443
+ d = irr_rep.dimension()
444
+ return matrix(self.submatrix(s, s, d, d))
445
+ raise ValueError('no irreducible representation for this index')
446
+
447
+ @cached_method
448
+ def _irr_to_ind(self, irr):
449
+ r"""
450
+ Return the index if the given split irreducible representation
451
+ of ``self``.
452
+
453
+ INPUT:
454
+
455
+ - ``irr`` -- an instance of :class:`AbsIrreducibeRep` specifying an
456
+ absolute irreducible representation of the cubic Hecke algebra
457
+
458
+ EXAMPLES::
459
+
460
+ sage: CHA2.<c1> = algebras.CubicHecke(2)
461
+ sage: m1 = c1.matrix()
462
+ sage: m1._irr_to_ind(CHA2.irred_repr.W2_001)
463
+ 1
464
+ sage: m1._irr_to_ind(CHA2.irred_repr.W3_001)
465
+ Traceback (most recent call last):
466
+ ...
467
+ TypeError: representation must have 1 generators
468
+ """
469
+ representation_type = self.parent()._representation_type
470
+ if not representation_type.is_split():
471
+ raise TypeError('representation type is non split')
472
+
473
+ ch_algebra = self.parent()._cubic_hecke_algebra
474
+ if ch_algebra.strands() != irr.number_gens() + 1:
475
+ raise TypeError('representation must have %s generators' % (ch_algebra.strands() - 1))
476
+
477
+ ind = irr.gap_index()
478
+ if representation_type == RepresentationType.SplitIrredMarin:
479
+ ind = irr.internal_index()
480
+ return ind
481
+
482
+ @cached_method
483
+ def __getitem__(self, item):
484
+ r"""
485
+ Return the sub-matrix block of ``self`` considered as block diagonal
486
+ matrix specified by `item`.
487
+
488
+ Overloading builtin-method to select a list-item.
489
+
490
+ INPUT:
491
+
492
+ - ``item`` -- an :class:`AbsIrreducibeRep` specifying an
493
+ absolute irreducible representation of the cubic Hecke algebra;
494
+ alternatively, it can be specified by list index
495
+ (see :meth:`internal_index` respectively :meth:`gap_index`)
496
+
497
+ OUTPUT:
498
+
499
+ An instance of :class:`Matrix_generic_dense` representing
500
+ the specified block of ``self``.
501
+
502
+ EXAMPLES::
503
+
504
+ sage: CHA2.<c1> = algebras.CubicHecke(2)
505
+ sage: m1 = c1.matrix()
506
+ sage: m1[0] # indirect doctest
507
+ [a]
508
+ sage: m1[CHA2.irred_repr.W2_001] # indirect doctest
509
+ [b]
510
+ """
511
+ if isinstance(item, AbsIrreducibeRep):
512
+ return self._get_block(self._irr_to_ind(item))
513
+ elif isinstance(item, (Integer, int)):
514
+ return self._get_block(item)
515
+
516
+ return super().__getitem__(item)
517
+
518
+ @cached_method
519
+ def block_diagonal_list(self):
520
+ r"""
521
+ Return the list of sub-matrix blocks of ``self`` considered
522
+ as block diagonal matrix.
523
+
524
+ OUTPUT:
525
+
526
+ A list of instances of :class:`Matrix_generic_dense` each of
527
+ which represents a diagonal block of ``self``.
528
+
529
+ EXAMPLES::
530
+
531
+ sage: CHA2.<c1> = algebras.CubicHecke(2)
532
+ sage: c1.matrix().block_diagonal_list()
533
+ [[a], [b], [-b - a + u]]
534
+ """
535
+ representation_type = self.parent()._representation_type
536
+ n = self.parent()._cubic_hecke_algebra.strands()
537
+ m = representation_type.number_of_representations(n)
538
+ return [self._get_block(i) for i in range(m)]
539
+
540
+ @cached_method
541
+ def reduce_to_irr_block(self, irr):
542
+ r"""
543
+ Return a copy of ``self`` with zeroes outside the block corresponding to
544
+ ``irr`` but the block according to the input identical to that of ``self``.
545
+
546
+ INPUT:
547
+
548
+ - ``irr`` -- an :class:`AbsIrreducibeRep` specifying an
549
+ absolute irreducible representation of the cubic Hecke algebra;
550
+ alternatively, it can be specified by list index (see
551
+ :meth:`internal_index` respectively :meth:`gap_index`)
552
+
553
+ OUTPUT:
554
+
555
+ An instance of :class:`Matrix_generic_dense` with exactly one nonzero block
556
+ according to ``irr``.
557
+
558
+ EXAMPLES::
559
+
560
+ sage: CHA2.<c1> = algebras.CubicHecke(2)
561
+ sage: m1 = c1.matrix()
562
+ sage: m1.reduce_to_irr_block(0)
563
+ [a 0 0]
564
+ [0 0 0]
565
+ [0 0 0]
566
+ sage: m1.reduce_to_irr_block(CHA2.irred_repr.W2_001)
567
+ [0 0 0]
568
+ [0 b 0]
569
+ [0 0 0]
570
+ """
571
+ if isinstance(irr, AbsIrreducibeRep):
572
+ ind = self._irr_to_ind(irr)
573
+ else:
574
+ ind = Integer(irr)
575
+ from copy import copy
576
+ mat_list = copy(self.parent().zero().block_diagonal_list())
577
+ mat_list[ind] = self[ind]
578
+ return block_diagonal_matrix(mat_list, subdivide=self.parent()._subdivide, sparse=True)
579
+
580
+
581
+ # ------------------------------------------------------------------------------------------------------------------
582
+ # Definition of CubicHeckeMatrixSpace
583
+ # --------------------------------------------------------------------------------------------------------
584
+ class CubicHeckeMatrixSpace(MatrixSpace):
585
+ r"""
586
+ The matrix space of cubic Hecke algebra representations.
587
+
588
+ INPUT:
589
+
590
+ - ``cubic_hecke_algebra`` -- (optional)
591
+ :class:`~sage.algebras.hecke_algebras.cubic_hecke_algebra.CubicHeckeAlgebra`
592
+ must be given if ``element`` fails to be an instance of its element class
593
+ - ``representation_type`` -- (default: ``RepresentationType.SplitIrredChevie``)
594
+ :class:`RepresentationType` specifying the type of the representation
595
+ - ``subdivide`` -- boolean (default: ``False``); whether or not to subdivide
596
+ the resulting matrices
597
+
598
+ - ``original`` -- boolean (default: ``False``); if ``True``, the matrix
599
+ will have coefficients in the generic base / extension ring
600
+
601
+ EXAMPLES::
602
+
603
+ sage: CHA2.<c1> = algebras.CubicHecke(2)
604
+ sage: c1.matrix() # indirect doctest
605
+ [ a 0 0]
606
+ [ 0 b 0]
607
+ [ 0 0 -b - a + u]
608
+ sage: c1.matrix(original=True)
609
+ [a 0 0]
610
+ [0 b 0]
611
+ [0 0 c]
612
+ sage: c1.matrix(representation_type = CHA2.repr_type.RegularLeft) # indirect doctest
613
+ [ 0 -v 1]
614
+ [ 1 u 0]
615
+ [ 0 w 0]
616
+ """
617
+ @staticmethod
618
+ def __classcall_private__(cls, cubic_hecke_algebra, representation_type=None, subdivide=False, original=False):
619
+ r"""
620
+ Normalize the arguments to call the ``__init__`` constructor.
621
+
622
+ See the documentation in ``__init__``.
623
+
624
+ TESTS::
625
+
626
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
627
+ sage: CHA2.<c1> = algebras.CubicHecke(2)
628
+ sage: MS = chmr.CubicHeckeMatrixSpace(CHA2)
629
+ sage: MS2 = chmr.CubicHeckeMatrixSpace(CHA2, representation_type=CHA2.repr_type.SplitIrredMarin, subdivide=False)
630
+ sage: MS is MS2
631
+ True
632
+ """
633
+ from sage.algebras.hecke_algebras.cubic_hecke_algebra import CubicHeckeAlgebra
634
+
635
+ if not isinstance(cubic_hecke_algebra, CubicHeckeAlgebra):
636
+ raise TypeError('cubic_hecke_algebra must be an instance of CubicHeckeAlgebra')
637
+
638
+ if representation_type is None:
639
+ representation_type = RepresentationType.SplitIrredMarin
640
+
641
+ if representation_type == RepresentationType.SplitIrredChevie:
642
+ from sage.combinat.root_system.reflection_group_real import is_chevie_available
643
+ if not is_chevie_available():
644
+ raise ValueError('CHEVIE is not available')
645
+
646
+ base_ring = cubic_hecke_algebra.base_ring(generic=original)
647
+ dimension = cubic_hecke_algebra.dimension()
648
+ if representation_type.is_split():
649
+ dimension = cubic_hecke_algebra._dim_irr_rep
650
+ base_ring = cubic_hecke_algebra.extension_ring(generic=original)
651
+ # Bypass the MatrixSpace.__classcall__
652
+ return super(MatrixSpace, cls).__classcall__(cls, base_ring, int(dimension),
653
+ cubic_hecke_algebra=cubic_hecke_algebra,
654
+ representation_type=representation_type,
655
+ subdivide=subdivide)
656
+
657
+ def __init__(self, base_ring,
658
+ dimension,
659
+ cubic_hecke_algebra,
660
+ representation_type,
661
+ subdivide):
662
+ r"""
663
+ Initialize ``self``.
664
+
665
+ TESTS::
666
+
667
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
668
+ sage: CHA3.<c1, c2> = algebras.CubicHecke(3)
669
+ sage: MS = chmr.CubicHeckeMatrixSpace(CHA3, original=True)
670
+
671
+ The minpoly does not work over more generic rings::
672
+
673
+ sage: TestSuite(MS).run(skip='_test_elements') # long time
674
+ """
675
+ from sage.algebras.hecke_algebras.cubic_hecke_algebra import CubicHeckeAlgebra
676
+
677
+ if not isinstance(cubic_hecke_algebra, CubicHeckeAlgebra):
678
+ raise TypeError('cubic_hecke_algebra must be an instance of CubicHeckeAlgebra')
679
+
680
+ # -------------------------------------------------------------------------------------------------
681
+ # saving input parameters
682
+ # -------------------------------------------------------------------------------------------------
683
+ self._cubic_hecke_algebra = cubic_hecke_algebra
684
+ self._representation_type = representation_type
685
+ self._subdivide = subdivide
686
+
687
+ original_base_ring = cubic_hecke_algebra.base_ring(generic=True)
688
+
689
+ if representation_type.is_split():
690
+ original_base_ring = cubic_hecke_algebra.extension_ring(generic=True)
691
+ specialize = cubic_hecke_algebra._generic_extension_ring_map
692
+ else:
693
+ specialize = cubic_hecke_algebra._ring_of_definition_map
694
+
695
+ verbose("original_base_ring %s base_ring %s" % (original_base_ring, base_ring), level=2)
696
+
697
+ self._original_base_ring = original_base_ring
698
+ self._specialize = specialize
699
+
700
+ super().__init__(base_ring, dimension, dimension, sparse=True, implementation=CubicHeckeMatrixRep)
701
+
702
+ def construction(self):
703
+ r"""
704
+ Return ``None`` since this construction is not functorial.
705
+
706
+ EXAMPLES::
707
+
708
+ sage: CHA2.<c1> = algebras.CubicHecke(2)
709
+ sage: MS = c1.matrix().parent()
710
+ sage: MS._test_category() # indirect doctest
711
+ """
712
+ return None
713
+
714
+ def __reduce__(self):
715
+ r"""
716
+ Used for pickling.
717
+
718
+ EXAMPLES::
719
+
720
+ sage: CHA2.<c1> = algebras.CubicHecke(2)
721
+ sage: MS = c1.matrix().parent()
722
+ sage: loads(dumps(MS)) == MS # indirect doctest
723
+ True
724
+ """
725
+ original = self.base_ring() == self._original_base_ring
726
+ return CubicHeckeMatrixSpace, (self._cubic_hecke_algebra, self._representation_type, self._subdivide, original)
727
+
728
+ def _element_constructor_(self, x):
729
+ r"""
730
+ INPUT:
731
+
732
+ - ``x`` -- an element of a
733
+ :class:`~sage.algebras.hecke_algebras.cubic_hecke_algebra.CubicHeckeAlgebra`
734
+ or an element whose parent is a :class:`MatrixSpace`
735
+
736
+ EXAMPlES::
737
+
738
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
739
+ sage: CHA3.<c1, c2> = algebras.CubicHecke(3)
740
+ sage: MS = chmr.CubicHeckeMatrixSpace(CHA3, original=True)
741
+ sage: m1 = MS._element_constructor_(c1)
742
+ sage: isinstance(m1, MS.element_class)
743
+ True
744
+ sage: isinstance(MS._element_constructor_(m1), MS.element_class)
745
+ True
746
+
747
+ sage: m = matrix(MS.base_ring(), 12, 12, lambda i, j: 1)
748
+ sage: MS._element_constructor_(m)
749
+ Traceback (most recent call last):
750
+ ...
751
+ TypeError: incompatible block structure
752
+ """
753
+ # -------------------------------------------------------------------------------------------------
754
+ # checking input and setting the self._cubic_hecke_algebra
755
+ # -------------------------------------------------------------------------------------------------
756
+ ch_algebra = self._cubic_hecke_algebra
757
+ ele_parent = x.parent()
758
+ ori_base_ring = self._original_base_ring
759
+ if isinstance(ele_parent, MatrixSpace):
760
+ # TODO: Find preimage in cubic hecke algebra
761
+ d1, d2 = x.dimensions()
762
+ if d1 != self.ncols() or d2 != self.nrows():
763
+ raise ValueError('incompatible dimensions!')
764
+
765
+ if ele_parent.base_ring() == ori_base_ring:
766
+ x = self._specialize_matrix(x)
767
+ elif ele_parent.base_ring() != self.base_ring():
768
+ raise ValueError('incompatible base ring!')
769
+ x_in_self = self.element_class(self, x)
770
+ matrix_list = x_in_self.block_diagonal_list()
771
+ matrix = block_diagonal_matrix(matrix_list, subdivide=self._subdivide, sparse=True)
772
+ if matrix != x:
773
+ raise TypeError('incompatible block structure')
774
+ return self.element_class(self, matrix)
775
+
776
+ if ele_parent == ch_algebra:
777
+ mat = ch_algebra._apply_module_morphism(x, self._image_on_basis)
778
+ return self(mat)
779
+
780
+ raise TypeError('element must be an instance of CubicHeckeElement or a matrix')
781
+
782
+ @cached_method
783
+ def __call__(self, entries=None, coerce=True, copy=None):
784
+ r"""
785
+ Construct an element of ``self``.
786
+
787
+ This method needs to be overloaded here since
788
+ :class:`MatrixSpace` has an own implementation of it.
789
+
790
+ EXAMPLES::
791
+
792
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
793
+ sage: CHA2.<c1> = algebras.CubicHecke(2)
794
+ sage: MS = chmr.CubicHeckeMatrixSpace(CHA2)
795
+ sage: MS(c1)
796
+ [ a 0 0]
797
+ [ 0 b 0]
798
+ [ 0 0 -b - a + u]
799
+ """
800
+ from sage.algebras.hecke_algebras.cubic_hecke_algebra import CubicHeckeAlgebra
801
+ if entries is None:
802
+ return super().__call__(entries=entries, coerce=coerce, copy=copy)
803
+ if not hasattr(entries, 'parent'):
804
+ return super().__call__(entries=entries, coerce=coerce, copy=copy)
805
+ ele_parent = entries.parent()
806
+ if not isinstance(ele_parent, (CubicHeckeAlgebra, MatrixSpace)):
807
+ return super().__call__(entries=entries, coerce=coerce, copy=copy)
808
+ return self._element_constructor_(entries)
809
+
810
+ @cached_method
811
+ def _specialize_matrix(self, mat):
812
+ r"""
813
+ Return the given matrix specializing the original coefficients
814
+ from data import to the base ring of ``self``.
815
+
816
+ INPUT:
817
+
818
+ - ``mat`` -- matrix over the original base ring
819
+
820
+ OUTPUT: matrix over the base ring of ``self``
821
+
822
+ EXAMPLES::
823
+
824
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
825
+ sage: CHA2.<c1> = algebras.CubicHecke(2)
826
+ sage: MS = chmr.CubicHeckeMatrixSpace(CHA2)
827
+ sage: B = MS._original_base_ring
828
+ sage: a, b, c = B.gens()
829
+ sage: mat = matrix(B, [[a, b], [0, c]])
830
+ sage: MS._specialize_matrix(mat)
831
+ [ a b]
832
+ [ 0 -b - a + u]
833
+ """
834
+ base_ring = self.base_ring()
835
+ original_base_ring = self._original_base_ring
836
+ specialize = self._specialize
837
+
838
+ if base_ring == original_base_ring:
839
+ return mat
840
+
841
+ mat_dict = {k: specialize(original_base_ring(v)) for k, v in mat.dict().items()}
842
+ return matrix(base_ring, mat_dict)
843
+
844
+ @cached_method
845
+ def _image_on_gen(self, gen_ind):
846
+ r"""
847
+ Return the matrix list corresponding to the generator given by
848
+ ``(gen_ind,)`` in Tietze form under the representation_type of
849
+ ``self`` from the data-file or via the ``GAP3`` interface
850
+
851
+ INPUT:
852
+
853
+ - ``gen_ind`` -- integer; index of a generator of the cubic Hecke
854
+ algebra attached to ``self + 1``; negative values correspond to
855
+ the according inverses
856
+
857
+ EXAMPLES::
858
+
859
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
860
+ sage: CHA3.<c1, c2> = algebras.CubicHecke(3)
861
+ sage: MS = chmr.CubicHeckeMatrixSpace(CHA3)
862
+ sage: MS._image_on_gen(1)
863
+ [
864
+ [ b 0] [ a 0] [ a 0]
865
+ [a], [c], [b], [b*c c], [a*b b], [a*c c],
866
+ <BLANKLINE>
867
+ [ c 0 0]
868
+ [b^2 + a*c b 0]
869
+ [ b 1 a]
870
+ ]
871
+
872
+ sage: CHA2 = CHA3.cubic_hecke_subalgebra()
873
+ sage: MSreg = chmr.CubicHeckeMatrixSpace(CHA2, representation_type=CHA2.repr_type.RegularRight)
874
+ sage: MSreg._image_on_gen(-1)
875
+ [
876
+ [ 0 1 (-u)/w]
877
+ [ 0 0 1/w]
878
+ [ 1 0 v/w]
879
+ ]
880
+ """
881
+ representation_type = self._representation_type
882
+ original_base_ring = self._original_base_ring
883
+ ch_algebra = self._cubic_hecke_algebra
884
+ n = ch_algebra.strands()
885
+
886
+ def invert_gen(matr):
887
+ r"""
888
+ Return the inverse matrix of generators.
889
+ """
890
+ cfs = ch_algebra.cubic_equation(as_coefficients=True, generic=True)
891
+ fac = - 1 / cfs[0]
892
+ cf0, cf1, cf2, cf3 = (original_base_ring(cf * fac) for cf in cfs)
893
+
894
+ matri = cf1 * matr.parent().one()
895
+ matri += cf2 * matr
896
+ matri += cf3 * matr**2
897
+ d1, d2 = matr.dimensions()
898
+ matrI = matrix(original_base_ring, d1, d2, lambda i, j: original_base_ring(matri[i, j]))
899
+ return matrI
900
+
901
+ if n == 2:
902
+ if representation_type.is_split():
903
+ # Split representations for n == 2 are missing in CHEVIE and data files
904
+ a, b, c = original_base_ring.gens()
905
+ matrix_list = [matrix(1, 1, [a]), matrix(1, 1, [b]), matrix(1, 1, [c])]
906
+ if gen_ind < 0:
907
+ matrix_list = [invert_gen(mat) for mat in matrix_list]
908
+ return matrix_list
909
+
910
+ num_rep = representation_type.number_of_representations(n)
911
+
912
+ if representation_type == RepresentationType.SplitIrredChevie:
913
+ rep_list = [ch_algebra._fetch_matrix_list_from_chevie(i + 1) for i in range(num_rep)]
914
+ if gen_ind > 0:
915
+ matrix_list = [rep[gen_ind - 1] for rep in rep_list]
916
+ else:
917
+ matrix_list = [invert_gen(rep[-gen_ind - 1]) for rep in rep_list]
918
+ else:
919
+ database = ch_algebra._database
920
+ matrix_list = database.read_matrix_representation(representation_type, gen_ind, n, original_base_ring)
921
+ return matrix_list
922
+
923
+ @cached_method
924
+ def _image_on_basis(self, basis_element):
925
+ r"""
926
+ Return the image of the given basis element of the cubic Hecke algebra
927
+ in ``self``.
928
+
929
+ INPUT:
930
+
931
+ - ``basis_element`` -- a
932
+ :class:`~sage.algebras.hecke_algebras.cubic_hecke_algebra.CubicHeckeElement`
933
+ that is a monomial
934
+
935
+ EXAMPLES::
936
+
937
+ sage: import sage.algebras.hecke_algebras.cubic_hecke_matrix_rep as chmr
938
+ sage: CHA3.<c1, c2> = algebras.CubicHecke(3)
939
+ sage: MS = chmr.CubicHeckeMatrixSpace(CHA3, original=True)
940
+ sage: MS._image_on_basis(c1)
941
+ [ a 0 0 0 0 0 0 0 0 0 0 0]
942
+ [ 0 c 0 0 0 0 0 0 0 0 0 0]
943
+ [ 0 0 b 0 0 0 0 0 0 0 0 0]
944
+ [ 0 0 0 b 0 0 0 0 0 0 0 0]
945
+ [ 0 0 0 b*c c 0 0 0 0 0 0 0]
946
+ [ 0 0 0 0 0 a 0 0 0 0 0 0]
947
+ [ 0 0 0 0 0 a*b b 0 0 0 0 0]
948
+ [ 0 0 0 0 0 0 0 a 0 0 0 0]
949
+ [ 0 0 0 0 0 0 0 a*c c 0 0 0]
950
+ [ 0 0 0 0 0 0 0 0 0 c 0 0]
951
+ [ 0 0 0 0 0 0 0 0 0 b^2 + a*c b 0]
952
+ [ 0 0 0 0 0 0 0 0 0 b 1 a]
953
+ """
954
+ representation_type = self._representation_type
955
+ ch_algebra = self._cubic_hecke_algebra
956
+ filecache = ch_algebra._filecache
957
+
958
+ original_base_ring = self._original_base_ring
959
+
960
+ ele_Tietze = basis_element.Tietze()
961
+ matrix_list = filecache.read_matrix_representation(representation_type, ele_Tietze, original_base_ring)
962
+ if matrix_list is None:
963
+ verbose('not in memory %s (Tietze %s)' % (basis_element, ele_Tietze), level=2)
964
+ if len(ele_Tietze) == 0:
965
+ matrix_list = ch_algebra._create_matrix_list_for_one(representation_type)
966
+ else:
967
+ for gen_ind in ele_Tietze:
968
+ gen_matrix_list = self._image_on_gen(gen_ind)
969
+ if matrix_list is None:
970
+ matrix_list = list(gen_matrix_list)
971
+ else:
972
+ for i in range(len(matrix_list)):
973
+ matrix_list[i] *= gen_matrix_list[i]
974
+
975
+ filecache.write_matrix_representation(representation_type, ele_Tietze, matrix_list)
976
+ verbose('%s saved to memory' % basis_element, level=2)
977
+
978
+ mat = block_diagonal_matrix(matrix_list, subdivide=self._subdivide, sparse=True)
979
+ return self._specialize_matrix(mat)
980
+
981
+ @cached_method
982
+ def zero(self):
983
+ r"""
984
+ Return the zero element of ``self``.
985
+
986
+ EXAMPLES::
987
+
988
+ sage: CHA2.<c1> = algebras.CubicHecke(2)
989
+ sage: m1 = c1.matrix()
990
+ sage: m1rl = c1.matrix(representation_type = CHA2.repr_type.RegularLeft)
991
+ sage: z = m1.parent().zero()
992
+ sage: zrl = m1rl.parent().zero()
993
+ sage: matrix(z) == matrix(zrl), z.is_zero(), zrl.is_zero()
994
+ (True, True, True)
995
+ sage: z.block_diagonal_list()
996
+ [[0], [0], [0]]
997
+ sage: zrl.block_diagonal_list()
998
+ [
999
+ [0 0 0]
1000
+ [0 0 0]
1001
+ [0 0 0]
1002
+ ]
1003
+ """
1004
+ z = self.element_class(self, super().zero())
1005
+ z._cubic_hecke_element = self._cubic_hecke_algebra.zero()
1006
+ z.set_immutable()
1007
+ return z
1008
+
1009
+ @cached_method
1010
+ def one(self):
1011
+ r"""
1012
+ Return the one element of ``self``.
1013
+
1014
+ EXAMPLES::
1015
+
1016
+ sage: CHA2.<c1> = algebras.CubicHecke(2)
1017
+ sage: m1 = c1.matrix()
1018
+ sage: m1rl = c1.matrix(representation_type = CHA2.repr_type.RegularLeft)
1019
+ sage: o = m1.parent().one()
1020
+ sage: orl = m1rl.parent().one()
1021
+ sage: matrix(o) == matrix(orl), o.is_one(), orl.is_one()
1022
+ (True, True, True)
1023
+ sage: o.block_diagonal_list()
1024
+ [[1], [1], [1]]
1025
+ sage: orl.block_diagonal_list()
1026
+ [
1027
+ [1 0 0]
1028
+ [0 1 0]
1029
+ [0 0 1]
1030
+ ]
1031
+ """
1032
+ o = self.element_class(self, super().one())
1033
+ o._cubic_hecke_element = self._cubic_hecke_algebra.one()
1034
+ o.set_immutable()
1035
+ return o
1036
+
1037
+ @cached_method
1038
+ def _an_element_(self):
1039
+ r"""
1040
+ Return an element of ``self``.
1041
+
1042
+ EXAMPLES::
1043
+
1044
+ sage: CHA2.<c1> = algebras.CubicHecke(2, cubic_equation_roots=(2, 3, 5))
1045
+ sage: c1.matrix()
1046
+ [2 0 0]
1047
+ [0 3 0]
1048
+ [0 0 5]
1049
+ sage: _.parent()._an_element_()
1050
+ [ 94/3 0 0]
1051
+ [ 0 187/3 0]
1052
+ [ 0 0 373/3]
1053
+ """
1054
+ x = self._cubic_hecke_algebra.an_element()
1055
+ return self(x)
1056
+
1057
+ @cached_method
1058
+ def some_elements(self):
1059
+ r"""
1060
+ Return a generator of elements of ``self``.
1061
+
1062
+ EXAMPLES::
1063
+
1064
+ sage: CHA2.<c1> = algebras.CubicHecke(2, cubic_equation_roots=(2, 3, 5))
1065
+ sage: M = c1.matrix(); M
1066
+ [2 0 0]
1067
+ [0 3 0]
1068
+ [0 0 5]
1069
+ sage: MS = M.parent()
1070
+ sage: MS.some_elements()
1071
+ (
1072
+ [ 94/3 0 0]
1073
+ [ 0 187/3 0]
1074
+ [ 0 0 373/3]
1075
+ )
1076
+ sage: MS.some_elements() == tuple(MS(x) for x in CHA2.some_elements())
1077
+ True
1078
+ """
1079
+ return tuple([self(x) for x in self._cubic_hecke_algebra.some_elements()])