passagemath-modules 10.6.31rc3__cp314-cp314-musllinux_1_2_x86_64.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.

Potentially problematic release.


This version of passagemath-modules might be problematic. Click here for more details.

Files changed (808) hide show
  1. passagemath_modules-10.6.31rc3.dist-info/METADATA +281 -0
  2. passagemath_modules-10.6.31rc3.dist-info/RECORD +808 -0
  3. passagemath_modules-10.6.31rc3.dist-info/WHEEL +5 -0
  4. passagemath_modules-10.6.31rc3.dist-info/top_level.txt +2 -0
  5. passagemath_modules.libs/libgcc_s-0cd532bd.so.1 +0 -0
  6. passagemath_modules.libs/libgfortran-2c33b284.so.5.0.0 +0 -0
  7. passagemath_modules.libs/libgmp-0e7fc84e.so.10.5.0 +0 -0
  8. passagemath_modules.libs/libgsl-42cda06f.so.28.0.0 +0 -0
  9. passagemath_modules.libs/libmpc-d8ebe4b5.so.3.3.1 +0 -0
  10. passagemath_modules.libs/libmpfr-aaecbfc0.so.6.2.1 +0 -0
  11. passagemath_modules.libs/libopenblasp-r0-905cb27d.3.29.so +0 -0
  12. passagemath_modules.libs/libquadmath-bb76a5fc.so.0.0.0 +0 -0
  13. sage/algebras/all__sagemath_modules.py +20 -0
  14. sage/algebras/catalog.py +148 -0
  15. sage/algebras/clifford_algebra.py +3107 -0
  16. sage/algebras/clifford_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
  17. sage/algebras/clifford_algebra_element.pxd +16 -0
  18. sage/algebras/clifford_algebra_element.pyx +997 -0
  19. sage/algebras/commutative_dga.py +4252 -0
  20. sage/algebras/exterior_algebra_groebner.cpython-314-x86_64-linux-musl.so +0 -0
  21. sage/algebras/exterior_algebra_groebner.pxd +55 -0
  22. sage/algebras/exterior_algebra_groebner.pyx +727 -0
  23. sage/algebras/finite_dimensional_algebras/all.py +2 -0
  24. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +1029 -0
  25. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
  26. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +12 -0
  27. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +706 -0
  28. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_ideal.py +196 -0
  29. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_morphism.py +255 -0
  30. sage/algebras/finite_gca.py +528 -0
  31. sage/algebras/group_algebra.py +232 -0
  32. sage/algebras/lie_algebras/abelian.py +197 -0
  33. sage/algebras/lie_algebras/affine_lie_algebra.py +1213 -0
  34. sage/algebras/lie_algebras/all.py +25 -0
  35. sage/algebras/lie_algebras/all__sagemath_modules.py +1 -0
  36. sage/algebras/lie_algebras/bch.py +177 -0
  37. sage/algebras/lie_algebras/bgg_dual_module.py +1184 -0
  38. sage/algebras/lie_algebras/bgg_resolution.py +232 -0
  39. sage/algebras/lie_algebras/center_uea.py +767 -0
  40. sage/algebras/lie_algebras/classical_lie_algebra.py +2516 -0
  41. sage/algebras/lie_algebras/examples.py +683 -0
  42. sage/algebras/lie_algebras/free_lie_algebra.py +973 -0
  43. sage/algebras/lie_algebras/heisenberg.py +820 -0
  44. sage/algebras/lie_algebras/lie_algebra.py +1562 -0
  45. sage/algebras/lie_algebras/lie_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
  46. sage/algebras/lie_algebras/lie_algebra_element.pxd +68 -0
  47. sage/algebras/lie_algebras/lie_algebra_element.pyx +2122 -0
  48. sage/algebras/lie_algebras/morphism.py +661 -0
  49. sage/algebras/lie_algebras/nilpotent_lie_algebra.py +457 -0
  50. sage/algebras/lie_algebras/onsager.py +1324 -0
  51. sage/algebras/lie_algebras/poincare_birkhoff_witt.py +816 -0
  52. sage/algebras/lie_algebras/quotient.py +462 -0
  53. sage/algebras/lie_algebras/rank_two_heisenberg_virasoro.py +355 -0
  54. sage/algebras/lie_algebras/representation.py +1040 -0
  55. sage/algebras/lie_algebras/structure_coefficients.py +459 -0
  56. sage/algebras/lie_algebras/subalgebra.py +967 -0
  57. sage/algebras/lie_algebras/symplectic_derivation.py +289 -0
  58. sage/algebras/lie_algebras/verma_module.py +1630 -0
  59. sage/algebras/lie_algebras/virasoro.py +1186 -0
  60. sage/algebras/octonion_algebra.cpython-314-x86_64-linux-musl.so +0 -0
  61. sage/algebras/octonion_algebra.pxd +20 -0
  62. sage/algebras/octonion_algebra.pyx +987 -0
  63. sage/algebras/orlik_solomon.py +907 -0
  64. sage/algebras/orlik_terao.py +779 -0
  65. sage/algebras/steenrod/all.py +7 -0
  66. sage/algebras/steenrod/steenrod_algebra.py +4258 -0
  67. sage/algebras/steenrod/steenrod_algebra_bases.py +1179 -0
  68. sage/algebras/steenrod/steenrod_algebra_misc.py +1167 -0
  69. sage/algebras/steenrod/steenrod_algebra_mult.py +954 -0
  70. sage/algebras/weyl_algebra.py +1126 -0
  71. sage/all__sagemath_modules.py +62 -0
  72. sage/calculus/all__sagemath_modules.py +19 -0
  73. sage/calculus/expr.py +205 -0
  74. sage/calculus/integration.cpython-314-x86_64-linux-musl.so +0 -0
  75. sage/calculus/integration.pyx +698 -0
  76. sage/calculus/interpolation.cpython-314-x86_64-linux-musl.so +0 -0
  77. sage/calculus/interpolation.pxd +13 -0
  78. sage/calculus/interpolation.pyx +387 -0
  79. sage/calculus/interpolators.cpython-314-x86_64-linux-musl.so +0 -0
  80. sage/calculus/interpolators.pyx +326 -0
  81. sage/calculus/ode.cpython-314-x86_64-linux-musl.so +0 -0
  82. sage/calculus/ode.pxd +5 -0
  83. sage/calculus/ode.pyx +610 -0
  84. sage/calculus/riemann.cpython-314-x86_64-linux-musl.so +0 -0
  85. sage/calculus/riemann.pyx +1521 -0
  86. sage/calculus/test_sympy.py +201 -0
  87. sage/calculus/transforms/all.py +7 -0
  88. sage/calculus/transforms/dft.py +844 -0
  89. sage/calculus/transforms/dwt.cpython-314-x86_64-linux-musl.so +0 -0
  90. sage/calculus/transforms/dwt.pxd +7 -0
  91. sage/calculus/transforms/dwt.pyx +160 -0
  92. sage/calculus/transforms/fft.cpython-314-x86_64-linux-musl.so +0 -0
  93. sage/calculus/transforms/fft.pxd +12 -0
  94. sage/calculus/transforms/fft.pyx +487 -0
  95. sage/calculus/wester.py +662 -0
  96. sage/coding/abstract_code.py +1108 -0
  97. sage/coding/ag_code.py +868 -0
  98. sage/coding/ag_code_decoders.cpython-314-x86_64-linux-musl.so +0 -0
  99. sage/coding/ag_code_decoders.pyx +2639 -0
  100. sage/coding/all.py +15 -0
  101. sage/coding/bch_code.py +494 -0
  102. sage/coding/binary_code.cpython-314-x86_64-linux-musl.so +0 -0
  103. sage/coding/binary_code.pxd +124 -0
  104. sage/coding/binary_code.pyx +4139 -0
  105. sage/coding/bounds_catalog.py +43 -0
  106. sage/coding/channel.py +819 -0
  107. sage/coding/channels_catalog.py +29 -0
  108. sage/coding/code_bounds.py +755 -0
  109. sage/coding/code_constructions.py +804 -0
  110. sage/coding/codes_catalog.py +111 -0
  111. sage/coding/cyclic_code.py +1329 -0
  112. sage/coding/databases.py +316 -0
  113. sage/coding/decoder.py +373 -0
  114. sage/coding/decoders_catalog.py +88 -0
  115. sage/coding/delsarte_bounds.py +709 -0
  116. sage/coding/encoder.py +390 -0
  117. sage/coding/encoders_catalog.py +64 -0
  118. sage/coding/extended_code.py +468 -0
  119. sage/coding/gabidulin_code.py +1058 -0
  120. sage/coding/golay_code.py +404 -0
  121. sage/coding/goppa_code.py +441 -0
  122. sage/coding/grs_code.py +2371 -0
  123. sage/coding/guava.py +107 -0
  124. sage/coding/guruswami_sudan/all.py +1 -0
  125. sage/coding/guruswami_sudan/gs_decoder.py +897 -0
  126. sage/coding/guruswami_sudan/interpolation.py +409 -0
  127. sage/coding/guruswami_sudan/utils.py +176 -0
  128. sage/coding/hamming_code.py +176 -0
  129. sage/coding/information_set_decoder.py +1032 -0
  130. sage/coding/kasami_codes.cpython-314-x86_64-linux-musl.so +0 -0
  131. sage/coding/kasami_codes.pyx +351 -0
  132. sage/coding/linear_code.py +3067 -0
  133. sage/coding/linear_code_no_metric.py +1354 -0
  134. sage/coding/linear_rank_metric.py +961 -0
  135. sage/coding/parity_check_code.py +353 -0
  136. sage/coding/punctured_code.py +719 -0
  137. sage/coding/reed_muller_code.py +999 -0
  138. sage/coding/self_dual_codes.py +942 -0
  139. sage/coding/source_coding/all.py +2 -0
  140. sage/coding/source_coding/huffman.py +553 -0
  141. sage/coding/subfield_subcode.py +423 -0
  142. sage/coding/two_weight_db.py +399 -0
  143. sage/combinat/all__sagemath_modules.py +7 -0
  144. sage/combinat/cartesian_product.py +347 -0
  145. sage/combinat/family.py +11 -0
  146. sage/combinat/free_module.py +1977 -0
  147. sage/combinat/root_system/all.py +147 -0
  148. sage/combinat/root_system/ambient_space.py +527 -0
  149. sage/combinat/root_system/associahedron.py +471 -0
  150. sage/combinat/root_system/braid_move_calculator.py +143 -0
  151. sage/combinat/root_system/braid_orbit.cpython-314-x86_64-linux-musl.so +0 -0
  152. sage/combinat/root_system/braid_orbit.pyx +144 -0
  153. sage/combinat/root_system/branching_rules.py +2301 -0
  154. sage/combinat/root_system/cartan_matrix.py +1245 -0
  155. sage/combinat/root_system/cartan_type.py +3069 -0
  156. sage/combinat/root_system/coxeter_group.py +162 -0
  157. sage/combinat/root_system/coxeter_matrix.py +1261 -0
  158. sage/combinat/root_system/coxeter_type.py +681 -0
  159. sage/combinat/root_system/dynkin_diagram.py +900 -0
  160. sage/combinat/root_system/extended_affine_weyl_group.py +2993 -0
  161. sage/combinat/root_system/fundamental_group.py +795 -0
  162. sage/combinat/root_system/hecke_algebra_representation.py +1203 -0
  163. sage/combinat/root_system/integrable_representations.py +1227 -0
  164. sage/combinat/root_system/non_symmetric_macdonald_polynomials.py +1965 -0
  165. sage/combinat/root_system/pieri_factors.py +1147 -0
  166. sage/combinat/root_system/plot.py +1615 -0
  167. sage/combinat/root_system/root_lattice_realization_algebras.py +1214 -0
  168. sage/combinat/root_system/root_lattice_realizations.py +4628 -0
  169. sage/combinat/root_system/root_space.py +487 -0
  170. sage/combinat/root_system/root_system.py +882 -0
  171. sage/combinat/root_system/type_A.py +348 -0
  172. sage/combinat/root_system/type_A_affine.py +227 -0
  173. sage/combinat/root_system/type_A_infinity.py +241 -0
  174. sage/combinat/root_system/type_B.py +347 -0
  175. sage/combinat/root_system/type_BC_affine.py +287 -0
  176. sage/combinat/root_system/type_B_affine.py +216 -0
  177. sage/combinat/root_system/type_C.py +317 -0
  178. sage/combinat/root_system/type_C_affine.py +188 -0
  179. sage/combinat/root_system/type_D.py +357 -0
  180. sage/combinat/root_system/type_D_affine.py +208 -0
  181. sage/combinat/root_system/type_E.py +641 -0
  182. sage/combinat/root_system/type_E_affine.py +231 -0
  183. sage/combinat/root_system/type_F.py +387 -0
  184. sage/combinat/root_system/type_F_affine.py +137 -0
  185. sage/combinat/root_system/type_G.py +293 -0
  186. sage/combinat/root_system/type_G_affine.py +132 -0
  187. sage/combinat/root_system/type_H.py +105 -0
  188. sage/combinat/root_system/type_I.py +110 -0
  189. sage/combinat/root_system/type_Q.py +150 -0
  190. sage/combinat/root_system/type_affine.py +509 -0
  191. sage/combinat/root_system/type_dual.py +704 -0
  192. sage/combinat/root_system/type_folded.py +301 -0
  193. sage/combinat/root_system/type_marked.py +748 -0
  194. sage/combinat/root_system/type_reducible.py +601 -0
  195. sage/combinat/root_system/type_relabel.py +730 -0
  196. sage/combinat/root_system/type_super_A.py +837 -0
  197. sage/combinat/root_system/weight_lattice_realizations.py +1188 -0
  198. sage/combinat/root_system/weight_space.py +639 -0
  199. sage/combinat/root_system/weyl_characters.py +2238 -0
  200. sage/crypto/__init__.py +4 -0
  201. sage/crypto/all.py +28 -0
  202. sage/crypto/block_cipher/all.py +7 -0
  203. sage/crypto/block_cipher/des.py +1065 -0
  204. sage/crypto/block_cipher/miniaes.py +2171 -0
  205. sage/crypto/block_cipher/present.py +909 -0
  206. sage/crypto/block_cipher/sdes.py +1527 -0
  207. sage/crypto/boolean_function.cpython-314-x86_64-linux-musl.so +0 -0
  208. sage/crypto/boolean_function.pxd +10 -0
  209. sage/crypto/boolean_function.pyx +1487 -0
  210. sage/crypto/cipher.py +78 -0
  211. sage/crypto/classical.py +3668 -0
  212. sage/crypto/classical_cipher.py +569 -0
  213. sage/crypto/cryptosystem.py +387 -0
  214. sage/crypto/key_exchange/all.py +7 -0
  215. sage/crypto/key_exchange/catalog.py +24 -0
  216. sage/crypto/key_exchange/diffie_hellman.py +323 -0
  217. sage/crypto/key_exchange/key_exchange_scheme.py +107 -0
  218. sage/crypto/lattice.py +312 -0
  219. sage/crypto/lfsr.py +295 -0
  220. sage/crypto/lwe.py +840 -0
  221. sage/crypto/mq/__init__.py +4 -0
  222. sage/crypto/mq/mpolynomialsystemgenerator.py +204 -0
  223. sage/crypto/mq/rijndael_gf.py +2345 -0
  224. sage/crypto/mq/sbox.py +7 -0
  225. sage/crypto/mq/sr.py +3344 -0
  226. sage/crypto/public_key/all.py +5 -0
  227. sage/crypto/public_key/blum_goldwasser.py +776 -0
  228. sage/crypto/sbox.cpython-314-x86_64-linux-musl.so +0 -0
  229. sage/crypto/sbox.pyx +2090 -0
  230. sage/crypto/sboxes.py +2090 -0
  231. sage/crypto/stream.py +390 -0
  232. sage/crypto/stream_cipher.py +297 -0
  233. sage/crypto/util.py +519 -0
  234. sage/ext/all__sagemath_modules.py +1 -0
  235. sage/ext/interpreters/__init__.py +1 -0
  236. sage/ext/interpreters/all__sagemath_modules.py +2 -0
  237. sage/ext/interpreters/wrapper_cc.cpython-314-x86_64-linux-musl.so +0 -0
  238. sage/ext/interpreters/wrapper_cc.pxd +30 -0
  239. sage/ext/interpreters/wrapper_cc.pyx +252 -0
  240. sage/ext/interpreters/wrapper_cdf.cpython-314-x86_64-linux-musl.so +0 -0
  241. sage/ext/interpreters/wrapper_cdf.pxd +26 -0
  242. sage/ext/interpreters/wrapper_cdf.pyx +245 -0
  243. sage/ext/interpreters/wrapper_rdf.cpython-314-x86_64-linux-musl.so +0 -0
  244. sage/ext/interpreters/wrapper_rdf.pxd +23 -0
  245. sage/ext/interpreters/wrapper_rdf.pyx +221 -0
  246. sage/ext/interpreters/wrapper_rr.cpython-314-x86_64-linux-musl.so +0 -0
  247. sage/ext/interpreters/wrapper_rr.pxd +28 -0
  248. sage/ext/interpreters/wrapper_rr.pyx +335 -0
  249. sage/geometry/all__sagemath_modules.py +5 -0
  250. sage/geometry/toric_lattice.py +1745 -0
  251. sage/geometry/toric_lattice_element.cpython-314-x86_64-linux-musl.so +0 -0
  252. sage/geometry/toric_lattice_element.pyx +432 -0
  253. sage/groups/abelian_gps/abelian_group.py +1925 -0
  254. sage/groups/abelian_gps/abelian_group_element.py +164 -0
  255. sage/groups/abelian_gps/all__sagemath_modules.py +5 -0
  256. sage/groups/abelian_gps/dual_abelian_group.py +421 -0
  257. sage/groups/abelian_gps/dual_abelian_group_element.py +179 -0
  258. sage/groups/abelian_gps/element_base.py +341 -0
  259. sage/groups/abelian_gps/values.py +488 -0
  260. sage/groups/additive_abelian/additive_abelian_group.py +476 -0
  261. sage/groups/additive_abelian/additive_abelian_wrapper.py +857 -0
  262. sage/groups/additive_abelian/all.py +4 -0
  263. sage/groups/additive_abelian/qmodnz.py +231 -0
  264. sage/groups/additive_abelian/qmodnz_element.py +349 -0
  265. sage/groups/affine_gps/affine_group.py +535 -0
  266. sage/groups/affine_gps/all.py +1 -0
  267. sage/groups/affine_gps/catalog.py +17 -0
  268. sage/groups/affine_gps/euclidean_group.py +246 -0
  269. sage/groups/affine_gps/group_element.py +562 -0
  270. sage/groups/all__sagemath_modules.py +12 -0
  271. sage/groups/galois_group.py +479 -0
  272. sage/groups/matrix_gps/all.py +4 -0
  273. sage/groups/matrix_gps/all__sagemath_modules.py +13 -0
  274. sage/groups/matrix_gps/catalog.py +26 -0
  275. sage/groups/matrix_gps/coxeter_group.py +927 -0
  276. sage/groups/matrix_gps/finitely_generated.py +487 -0
  277. sage/groups/matrix_gps/group_element.cpython-314-x86_64-linux-musl.so +0 -0
  278. sage/groups/matrix_gps/group_element.pxd +11 -0
  279. sage/groups/matrix_gps/group_element.pyx +431 -0
  280. sage/groups/matrix_gps/linear.py +440 -0
  281. sage/groups/matrix_gps/matrix_group.py +617 -0
  282. sage/groups/matrix_gps/named_group.py +296 -0
  283. sage/groups/matrix_gps/orthogonal.py +544 -0
  284. sage/groups/matrix_gps/symplectic.py +251 -0
  285. sage/groups/matrix_gps/unitary.py +436 -0
  286. sage/groups/misc_gps/all__sagemath_modules.py +1 -0
  287. sage/groups/misc_gps/argument_groups.py +1905 -0
  288. sage/groups/misc_gps/imaginary_groups.py +479 -0
  289. sage/groups/perm_gps/all__sagemath_modules.py +1 -0
  290. sage/groups/perm_gps/partn_ref/all__sagemath_modules.py +1 -0
  291. sage/groups/perm_gps/partn_ref/refinement_binary.cpython-314-x86_64-linux-musl.so +0 -0
  292. sage/groups/perm_gps/partn_ref/refinement_binary.pxd +41 -0
  293. sage/groups/perm_gps/partn_ref/refinement_binary.pyx +1167 -0
  294. sage/groups/perm_gps/partn_ref/refinement_matrices.cpython-314-x86_64-linux-musl.so +0 -0
  295. sage/groups/perm_gps/partn_ref/refinement_matrices.pxd +31 -0
  296. sage/groups/perm_gps/partn_ref/refinement_matrices.pyx +385 -0
  297. sage/homology/algebraic_topological_model.py +595 -0
  298. sage/homology/all.py +2 -0
  299. sage/homology/all__sagemath_modules.py +8 -0
  300. sage/homology/chain_complex.py +2148 -0
  301. sage/homology/chain_complex_homspace.py +165 -0
  302. sage/homology/chain_complex_morphism.py +629 -0
  303. sage/homology/chain_homotopy.py +604 -0
  304. sage/homology/chains.py +653 -0
  305. sage/homology/free_resolution.py +923 -0
  306. sage/homology/graded_resolution.py +567 -0
  307. sage/homology/hochschild_complex.py +756 -0
  308. sage/homology/homology_group.py +188 -0
  309. sage/homology/homology_morphism.py +422 -0
  310. sage/homology/homology_vector_space_with_basis.py +1454 -0
  311. sage/homology/koszul_complex.py +169 -0
  312. sage/homology/matrix_utils.py +205 -0
  313. sage/libs/all__sagemath_modules.py +1 -0
  314. sage/libs/gsl/__init__.py +1 -0
  315. sage/libs/gsl/airy.pxd +56 -0
  316. sage/libs/gsl/all.pxd +66 -0
  317. sage/libs/gsl/array.cpython-314-x86_64-linux-musl.so +0 -0
  318. sage/libs/gsl/array.pxd +5 -0
  319. sage/libs/gsl/array.pyx +102 -0
  320. sage/libs/gsl/bessel.pxd +208 -0
  321. sage/libs/gsl/blas.pxd +116 -0
  322. sage/libs/gsl/blas_types.pxd +34 -0
  323. sage/libs/gsl/block.pxd +52 -0
  324. sage/libs/gsl/chebyshev.pxd +37 -0
  325. sage/libs/gsl/clausen.pxd +12 -0
  326. sage/libs/gsl/combination.pxd +47 -0
  327. sage/libs/gsl/complex.pxd +151 -0
  328. sage/libs/gsl/coulomb.pxd +30 -0
  329. sage/libs/gsl/coupling.pxd +21 -0
  330. sage/libs/gsl/dawson.pxd +12 -0
  331. sage/libs/gsl/debye.pxd +24 -0
  332. sage/libs/gsl/dilog.pxd +14 -0
  333. sage/libs/gsl/eigen.pxd +46 -0
  334. sage/libs/gsl/elementary.pxd +12 -0
  335. sage/libs/gsl/ellint.pxd +48 -0
  336. sage/libs/gsl/elljac.pxd +8 -0
  337. sage/libs/gsl/erf.pxd +32 -0
  338. sage/libs/gsl/errno.pxd +26 -0
  339. sage/libs/gsl/exp.pxd +44 -0
  340. sage/libs/gsl/expint.pxd +44 -0
  341. sage/libs/gsl/fermi_dirac.pxd +44 -0
  342. sage/libs/gsl/fft.pxd +121 -0
  343. sage/libs/gsl/fit.pxd +50 -0
  344. sage/libs/gsl/gamma.pxd +94 -0
  345. sage/libs/gsl/gegenbauer.pxd +26 -0
  346. sage/libs/gsl/histogram.pxd +176 -0
  347. sage/libs/gsl/hyperg.pxd +52 -0
  348. sage/libs/gsl/integration.pxd +69 -0
  349. sage/libs/gsl/interp.pxd +109 -0
  350. sage/libs/gsl/laguerre.pxd +24 -0
  351. sage/libs/gsl/lambert.pxd +16 -0
  352. sage/libs/gsl/legendre.pxd +90 -0
  353. sage/libs/gsl/linalg.pxd +185 -0
  354. sage/libs/gsl/log.pxd +26 -0
  355. sage/libs/gsl/math.pxd +43 -0
  356. sage/libs/gsl/matrix.pxd +143 -0
  357. sage/libs/gsl/matrix_complex.pxd +130 -0
  358. sage/libs/gsl/min.pxd +67 -0
  359. sage/libs/gsl/monte.pxd +56 -0
  360. sage/libs/gsl/ntuple.pxd +32 -0
  361. sage/libs/gsl/odeiv.pxd +70 -0
  362. sage/libs/gsl/permutation.pxd +78 -0
  363. sage/libs/gsl/poly.pxd +40 -0
  364. sage/libs/gsl/pow_int.pxd +12 -0
  365. sage/libs/gsl/psi.pxd +28 -0
  366. sage/libs/gsl/qrng.pxd +29 -0
  367. sage/libs/gsl/random.pxd +257 -0
  368. sage/libs/gsl/rng.pxd +100 -0
  369. sage/libs/gsl/roots.pxd +72 -0
  370. sage/libs/gsl/sort.pxd +36 -0
  371. sage/libs/gsl/statistics.pxd +59 -0
  372. sage/libs/gsl/sum.pxd +55 -0
  373. sage/libs/gsl/synchrotron.pxd +16 -0
  374. sage/libs/gsl/transport.pxd +24 -0
  375. sage/libs/gsl/trig.pxd +58 -0
  376. sage/libs/gsl/types.pxd +137 -0
  377. sage/libs/gsl/vector.pxd +101 -0
  378. sage/libs/gsl/vector_complex.pxd +83 -0
  379. sage/libs/gsl/wavelet.pxd +49 -0
  380. sage/libs/gsl/zeta.pxd +28 -0
  381. sage/libs/mpc/__init__.pxd +114 -0
  382. sage/libs/mpc/types.pxd +28 -0
  383. sage/libs/mpfr/__init__.pxd +299 -0
  384. sage/libs/mpfr/types.pxd +26 -0
  385. sage/libs/mpmath/__init__.py +1 -0
  386. sage/libs/mpmath/all.py +27 -0
  387. sage/libs/mpmath/all__sagemath_modules.py +1 -0
  388. sage/libs/mpmath/utils.cpython-314-x86_64-linux-musl.so +0 -0
  389. sage/libs/mpmath/utils.pxd +4 -0
  390. sage/libs/mpmath/utils.pyx +319 -0
  391. sage/matrix/action.cpython-314-x86_64-linux-musl.so +0 -0
  392. sage/matrix/action.pxd +26 -0
  393. sage/matrix/action.pyx +596 -0
  394. sage/matrix/all.py +9 -0
  395. sage/matrix/args.cpython-314-x86_64-linux-musl.so +0 -0
  396. sage/matrix/args.pxd +144 -0
  397. sage/matrix/args.pyx +1668 -0
  398. sage/matrix/benchmark.py +1258 -0
  399. sage/matrix/berlekamp_massey.py +95 -0
  400. sage/matrix/compute_J_ideal.py +926 -0
  401. sage/matrix/constructor.cpython-314-x86_64-linux-musl.so +0 -0
  402. sage/matrix/constructor.pyx +750 -0
  403. sage/matrix/docs.py +430 -0
  404. sage/matrix/echelon_matrix.cpython-314-x86_64-linux-musl.so +0 -0
  405. sage/matrix/echelon_matrix.pyx +155 -0
  406. sage/matrix/matrix.pxd +2 -0
  407. sage/matrix/matrix0.cpython-314-x86_64-linux-musl.so +0 -0
  408. sage/matrix/matrix0.pxd +68 -0
  409. sage/matrix/matrix0.pyx +6324 -0
  410. sage/matrix/matrix1.cpython-314-x86_64-linux-musl.so +0 -0
  411. sage/matrix/matrix1.pxd +8 -0
  412. sage/matrix/matrix1.pyx +2851 -0
  413. sage/matrix/matrix2.cpython-314-x86_64-linux-musl.so +0 -0
  414. sage/matrix/matrix2.pxd +25 -0
  415. sage/matrix/matrix2.pyx +20181 -0
  416. sage/matrix/matrix_cdv.cpython-314-x86_64-linux-musl.so +0 -0
  417. sage/matrix/matrix_cdv.pxd +4 -0
  418. sage/matrix/matrix_cdv.pyx +93 -0
  419. sage/matrix/matrix_complex_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
  420. sage/matrix/matrix_complex_double_dense.pxd +5 -0
  421. sage/matrix/matrix_complex_double_dense.pyx +98 -0
  422. sage/matrix/matrix_dense.cpython-314-x86_64-linux-musl.so +0 -0
  423. sage/matrix/matrix_dense.pxd +5 -0
  424. sage/matrix/matrix_dense.pyx +343 -0
  425. sage/matrix/matrix_domain_dense.pxd +5 -0
  426. sage/matrix/matrix_domain_sparse.pxd +5 -0
  427. sage/matrix/matrix_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
  428. sage/matrix/matrix_double_dense.pxd +7 -0
  429. sage/matrix/matrix_double_dense.pyx +3906 -0
  430. sage/matrix/matrix_double_sparse.cpython-314-x86_64-linux-musl.so +0 -0
  431. sage/matrix/matrix_double_sparse.pxd +6 -0
  432. sage/matrix/matrix_double_sparse.pyx +248 -0
  433. sage/matrix/matrix_generic_dense.cpython-314-x86_64-linux-musl.so +0 -0
  434. sage/matrix/matrix_generic_dense.pxd +7 -0
  435. sage/matrix/matrix_generic_dense.pyx +354 -0
  436. sage/matrix/matrix_generic_sparse.cpython-314-x86_64-linux-musl.so +0 -0
  437. sage/matrix/matrix_generic_sparse.pxd +7 -0
  438. sage/matrix/matrix_generic_sparse.pyx +461 -0
  439. sage/matrix/matrix_laurent_mpolynomial_dense.cpython-314-x86_64-linux-musl.so +0 -0
  440. sage/matrix/matrix_laurent_mpolynomial_dense.pxd +5 -0
  441. sage/matrix/matrix_laurent_mpolynomial_dense.pyx +115 -0
  442. sage/matrix/matrix_misc.py +313 -0
  443. sage/matrix/matrix_numpy_dense.cpython-314-x86_64-linux-musl.so +0 -0
  444. sage/matrix/matrix_numpy_dense.pxd +14 -0
  445. sage/matrix/matrix_numpy_dense.pyx +450 -0
  446. sage/matrix/matrix_numpy_integer_dense.cpython-314-x86_64-linux-musl.so +0 -0
  447. sage/matrix/matrix_numpy_integer_dense.pxd +7 -0
  448. sage/matrix/matrix_numpy_integer_dense.pyx +59 -0
  449. sage/matrix/matrix_polynomial_dense.cpython-314-x86_64-linux-musl.so +0 -0
  450. sage/matrix/matrix_polynomial_dense.pxd +5 -0
  451. sage/matrix/matrix_polynomial_dense.pyx +5341 -0
  452. sage/matrix/matrix_real_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
  453. sage/matrix/matrix_real_double_dense.pxd +7 -0
  454. sage/matrix/matrix_real_double_dense.pyx +122 -0
  455. sage/matrix/matrix_space.py +2848 -0
  456. sage/matrix/matrix_sparse.cpython-314-x86_64-linux-musl.so +0 -0
  457. sage/matrix/matrix_sparse.pxd +5 -0
  458. sage/matrix/matrix_sparse.pyx +1222 -0
  459. sage/matrix/matrix_window.cpython-314-x86_64-linux-musl.so +0 -0
  460. sage/matrix/matrix_window.pxd +37 -0
  461. sage/matrix/matrix_window.pyx +242 -0
  462. sage/matrix/misc_mpfr.cpython-314-x86_64-linux-musl.so +0 -0
  463. sage/matrix/misc_mpfr.pyx +80 -0
  464. sage/matrix/operation_table.py +1182 -0
  465. sage/matrix/special.py +3666 -0
  466. sage/matrix/strassen.cpython-314-x86_64-linux-musl.so +0 -0
  467. sage/matrix/strassen.pyx +851 -0
  468. sage/matrix/symplectic_basis.py +541 -0
  469. sage/matrix/template.pxd +6 -0
  470. sage/matrix/tests.py +71 -0
  471. sage/matroids/advanced.py +77 -0
  472. sage/matroids/all.py +13 -0
  473. sage/matroids/basis_exchange_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  474. sage/matroids/basis_exchange_matroid.pxd +96 -0
  475. sage/matroids/basis_exchange_matroid.pyx +2344 -0
  476. sage/matroids/basis_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  477. sage/matroids/basis_matroid.pxd +45 -0
  478. sage/matroids/basis_matroid.pyx +1217 -0
  479. sage/matroids/catalog.py +44 -0
  480. sage/matroids/chow_ring.py +473 -0
  481. sage/matroids/chow_ring_ideal.py +849 -0
  482. sage/matroids/circuit_closures_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  483. sage/matroids/circuit_closures_matroid.pxd +16 -0
  484. sage/matroids/circuit_closures_matroid.pyx +559 -0
  485. sage/matroids/circuits_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  486. sage/matroids/circuits_matroid.pxd +38 -0
  487. sage/matroids/circuits_matroid.pyx +947 -0
  488. sage/matroids/constructor.py +1086 -0
  489. sage/matroids/database_collections.py +365 -0
  490. sage/matroids/database_matroids.py +5338 -0
  491. sage/matroids/dual_matroid.py +583 -0
  492. sage/matroids/extension.cpython-314-x86_64-linux-musl.so +0 -0
  493. sage/matroids/extension.pxd +34 -0
  494. sage/matroids/extension.pyx +519 -0
  495. sage/matroids/flats_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  496. sage/matroids/flats_matroid.pxd +28 -0
  497. sage/matroids/flats_matroid.pyx +715 -0
  498. sage/matroids/gammoid.py +600 -0
  499. sage/matroids/graphic_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  500. sage/matroids/graphic_matroid.pxd +39 -0
  501. sage/matroids/graphic_matroid.pyx +2024 -0
  502. sage/matroids/lean_matrix.cpython-314-x86_64-linux-musl.so +0 -0
  503. sage/matroids/lean_matrix.pxd +126 -0
  504. sage/matroids/lean_matrix.pyx +3667 -0
  505. sage/matroids/linear_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  506. sage/matroids/linear_matroid.pxd +180 -0
  507. sage/matroids/linear_matroid.pyx +6649 -0
  508. sage/matroids/matroid.cpython-314-x86_64-linux-musl.so +0 -0
  509. sage/matroids/matroid.pxd +243 -0
  510. sage/matroids/matroid.pyx +8759 -0
  511. sage/matroids/matroids_catalog.py +190 -0
  512. sage/matroids/matroids_plot_helpers.py +890 -0
  513. sage/matroids/minor_matroid.py +480 -0
  514. sage/matroids/minorfix.h +9 -0
  515. sage/matroids/named_matroids.py +5 -0
  516. sage/matroids/rank_matroid.py +268 -0
  517. sage/matroids/set_system.cpython-314-x86_64-linux-musl.so +0 -0
  518. sage/matroids/set_system.pxd +38 -0
  519. sage/matroids/set_system.pyx +800 -0
  520. sage/matroids/transversal_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  521. sage/matroids/transversal_matroid.pxd +14 -0
  522. sage/matroids/transversal_matroid.pyx +893 -0
  523. sage/matroids/union_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  524. sage/matroids/union_matroid.pxd +20 -0
  525. sage/matroids/union_matroid.pyx +331 -0
  526. sage/matroids/unpickling.cpython-314-x86_64-linux-musl.so +0 -0
  527. sage/matroids/unpickling.pyx +843 -0
  528. sage/matroids/utilities.py +809 -0
  529. sage/misc/all__sagemath_modules.py +20 -0
  530. sage/misc/c3.cpython-314-x86_64-linux-musl.so +0 -0
  531. sage/misc/c3.pyx +238 -0
  532. sage/misc/compat.py +87 -0
  533. sage/misc/element_with_label.py +173 -0
  534. sage/misc/func_persist.py +79 -0
  535. sage/misc/pickle_old.cpython-314-x86_64-linux-musl.so +0 -0
  536. sage/misc/pickle_old.pyx +19 -0
  537. sage/misc/proof.py +7 -0
  538. sage/misc/replace_dot_all.py +472 -0
  539. sage/misc/sagedoc_conf.py +168 -0
  540. sage/misc/sphinxify.py +167 -0
  541. sage/misc/test_class_pickling.py +85 -0
  542. sage/modules/all.py +42 -0
  543. sage/modules/complex_double_vector.py +25 -0
  544. sage/modules/diamond_cutting.py +380 -0
  545. sage/modules/fg_pid/all.py +1 -0
  546. sage/modules/fg_pid/fgp_element.py +456 -0
  547. sage/modules/fg_pid/fgp_module.py +2091 -0
  548. sage/modules/fg_pid/fgp_morphism.py +550 -0
  549. sage/modules/filtered_vector_space.py +1271 -0
  550. sage/modules/finite_submodule_iter.cpython-314-x86_64-linux-musl.so +0 -0
  551. sage/modules/finite_submodule_iter.pxd +27 -0
  552. sage/modules/finite_submodule_iter.pyx +452 -0
  553. sage/modules/fp_graded/all.py +1 -0
  554. sage/modules/fp_graded/element.py +346 -0
  555. sage/modules/fp_graded/free_element.py +298 -0
  556. sage/modules/fp_graded/free_homspace.py +53 -0
  557. sage/modules/fp_graded/free_module.py +1060 -0
  558. sage/modules/fp_graded/free_morphism.py +217 -0
  559. sage/modules/fp_graded/homspace.py +563 -0
  560. sage/modules/fp_graded/module.py +1340 -0
  561. sage/modules/fp_graded/morphism.py +1990 -0
  562. sage/modules/fp_graded/steenrod/all.py +1 -0
  563. sage/modules/fp_graded/steenrod/homspace.py +65 -0
  564. sage/modules/fp_graded/steenrod/module.py +477 -0
  565. sage/modules/fp_graded/steenrod/morphism.py +404 -0
  566. sage/modules/fp_graded/steenrod/profile.py +241 -0
  567. sage/modules/free_module.py +8447 -0
  568. sage/modules/free_module_element.cpython-314-x86_64-linux-musl.so +0 -0
  569. sage/modules/free_module_element.pxd +22 -0
  570. sage/modules/free_module_element.pyx +5445 -0
  571. sage/modules/free_module_homspace.py +369 -0
  572. sage/modules/free_module_integer.py +896 -0
  573. sage/modules/free_module_morphism.py +823 -0
  574. sage/modules/free_module_pseudohomspace.py +352 -0
  575. sage/modules/free_module_pseudomorphism.py +578 -0
  576. sage/modules/free_quadratic_module.py +1706 -0
  577. sage/modules/free_quadratic_module_integer_symmetric.py +1790 -0
  578. sage/modules/matrix_morphism.py +1745 -0
  579. sage/modules/misc.py +103 -0
  580. sage/modules/module_functors.py +192 -0
  581. sage/modules/multi_filtered_vector_space.py +719 -0
  582. sage/modules/ore_module.py +2208 -0
  583. sage/modules/ore_module_element.py +178 -0
  584. sage/modules/ore_module_homspace.py +147 -0
  585. sage/modules/ore_module_morphism.py +968 -0
  586. sage/modules/quotient_module.py +699 -0
  587. sage/modules/real_double_vector.py +22 -0
  588. sage/modules/submodule.py +255 -0
  589. sage/modules/tensor_operations.py +567 -0
  590. sage/modules/torsion_quadratic_module.py +1352 -0
  591. sage/modules/tutorial_free_modules.py +248 -0
  592. sage/modules/vector_complex_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
  593. sage/modules/vector_complex_double_dense.pxd +6 -0
  594. sage/modules/vector_complex_double_dense.pyx +117 -0
  595. sage/modules/vector_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
  596. sage/modules/vector_double_dense.pxd +6 -0
  597. sage/modules/vector_double_dense.pyx +604 -0
  598. sage/modules/vector_integer_dense.cpython-314-x86_64-linux-musl.so +0 -0
  599. sage/modules/vector_integer_dense.pxd +15 -0
  600. sage/modules/vector_integer_dense.pyx +361 -0
  601. sage/modules/vector_integer_sparse.cpython-314-x86_64-linux-musl.so +0 -0
  602. sage/modules/vector_integer_sparse.pxd +29 -0
  603. sage/modules/vector_integer_sparse.pyx +406 -0
  604. sage/modules/vector_modn_dense.cpython-314-x86_64-linux-musl.so +0 -0
  605. sage/modules/vector_modn_dense.pxd +12 -0
  606. sage/modules/vector_modn_dense.pyx +394 -0
  607. sage/modules/vector_modn_sparse.cpython-314-x86_64-linux-musl.so +0 -0
  608. sage/modules/vector_modn_sparse.pxd +21 -0
  609. sage/modules/vector_modn_sparse.pyx +298 -0
  610. sage/modules/vector_numpy_dense.cpython-314-x86_64-linux-musl.so +0 -0
  611. sage/modules/vector_numpy_dense.pxd +15 -0
  612. sage/modules/vector_numpy_dense.pyx +304 -0
  613. sage/modules/vector_numpy_integer_dense.cpython-314-x86_64-linux-musl.so +0 -0
  614. sage/modules/vector_numpy_integer_dense.pxd +7 -0
  615. sage/modules/vector_numpy_integer_dense.pyx +54 -0
  616. sage/modules/vector_rational_dense.cpython-314-x86_64-linux-musl.so +0 -0
  617. sage/modules/vector_rational_dense.pxd +15 -0
  618. sage/modules/vector_rational_dense.pyx +387 -0
  619. sage/modules/vector_rational_sparse.cpython-314-x86_64-linux-musl.so +0 -0
  620. sage/modules/vector_rational_sparse.pxd +30 -0
  621. sage/modules/vector_rational_sparse.pyx +413 -0
  622. sage/modules/vector_real_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
  623. sage/modules/vector_real_double_dense.pxd +6 -0
  624. sage/modules/vector_real_double_dense.pyx +126 -0
  625. sage/modules/vector_space_homspace.py +430 -0
  626. sage/modules/vector_space_morphism.py +989 -0
  627. sage/modules/with_basis/all.py +15 -0
  628. sage/modules/with_basis/cell_module.py +494 -0
  629. sage/modules/with_basis/indexed_element.cpython-314-x86_64-linux-musl.so +0 -0
  630. sage/modules/with_basis/indexed_element.pxd +13 -0
  631. sage/modules/with_basis/indexed_element.pyx +1058 -0
  632. sage/modules/with_basis/invariant.py +1075 -0
  633. sage/modules/with_basis/morphism.py +1636 -0
  634. sage/modules/with_basis/representation.py +2939 -0
  635. sage/modules/with_basis/subquotient.py +685 -0
  636. sage/numerical/all__sagemath_modules.py +6 -0
  637. sage/numerical/gauss_legendre.cpython-314-x86_64-linux-musl.so +0 -0
  638. sage/numerical/gauss_legendre.pyx +381 -0
  639. sage/numerical/optimize.py +910 -0
  640. sage/probability/all.py +10 -0
  641. sage/probability/probability_distribution.cpython-314-x86_64-linux-musl.so +0 -0
  642. sage/probability/probability_distribution.pyx +1242 -0
  643. sage/probability/random_variable.py +411 -0
  644. sage/quadratic_forms/all.py +4 -0
  645. sage/quadratic_forms/all__sagemath_modules.py +15 -0
  646. sage/quadratic_forms/binary_qf.py +2042 -0
  647. sage/quadratic_forms/bqf_class_group.py +748 -0
  648. sage/quadratic_forms/constructions.py +93 -0
  649. sage/quadratic_forms/count_local_2.cpython-314-x86_64-linux-musl.so +0 -0
  650. sage/quadratic_forms/count_local_2.pyx +365 -0
  651. sage/quadratic_forms/extras.py +195 -0
  652. sage/quadratic_forms/quadratic_form.py +1753 -0
  653. sage/quadratic_forms/quadratic_form__count_local_2.py +221 -0
  654. sage/quadratic_forms/quadratic_form__equivalence_testing.py +708 -0
  655. sage/quadratic_forms/quadratic_form__evaluate.cpython-314-x86_64-linux-musl.so +0 -0
  656. sage/quadratic_forms/quadratic_form__evaluate.pyx +139 -0
  657. sage/quadratic_forms/quadratic_form__local_density_congruence.py +977 -0
  658. sage/quadratic_forms/quadratic_form__local_field_invariants.py +1072 -0
  659. sage/quadratic_forms/quadratic_form__neighbors.py +424 -0
  660. sage/quadratic_forms/quadratic_form__reduction_theory.py +488 -0
  661. sage/quadratic_forms/quadratic_form__split_local_covering.py +416 -0
  662. sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +657 -0
  663. sage/quadratic_forms/quadratic_form__theta.py +352 -0
  664. sage/quadratic_forms/quadratic_form__variable_substitutions.py +370 -0
  665. sage/quadratic_forms/random_quadraticform.py +209 -0
  666. sage/quadratic_forms/ternary.cpython-314-x86_64-linux-musl.so +0 -0
  667. sage/quadratic_forms/ternary.pyx +1154 -0
  668. sage/quadratic_forms/ternary_qf.py +2027 -0
  669. sage/rings/all__sagemath_modules.py +28 -0
  670. sage/rings/asymptotic/all__sagemath_modules.py +1 -0
  671. sage/rings/asymptotic/misc.py +1252 -0
  672. sage/rings/cc.py +4 -0
  673. sage/rings/cfinite_sequence.py +1306 -0
  674. sage/rings/complex_conversion.cpython-314-x86_64-linux-musl.so +0 -0
  675. sage/rings/complex_conversion.pxd +8 -0
  676. sage/rings/complex_conversion.pyx +23 -0
  677. sage/rings/complex_double.cpython-314-x86_64-linux-musl.so +0 -0
  678. sage/rings/complex_double.pxd +21 -0
  679. sage/rings/complex_double.pyx +2654 -0
  680. sage/rings/complex_mpc.cpython-314-x86_64-linux-musl.so +0 -0
  681. sage/rings/complex_mpc.pxd +21 -0
  682. sage/rings/complex_mpc.pyx +2576 -0
  683. sage/rings/complex_mpfr.cpython-314-x86_64-linux-musl.so +0 -0
  684. sage/rings/complex_mpfr.pxd +18 -0
  685. sage/rings/complex_mpfr.pyx +3602 -0
  686. sage/rings/derivation.py +2334 -0
  687. sage/rings/finite_rings/all__sagemath_modules.py +1 -0
  688. sage/rings/finite_rings/maps_finite_field.py +191 -0
  689. sage/rings/function_field/all__sagemath_modules.py +8 -0
  690. sage/rings/function_field/derivations.py +102 -0
  691. sage/rings/function_field/derivations_rational.py +132 -0
  692. sage/rings/function_field/differential.py +853 -0
  693. sage/rings/function_field/divisor.py +1107 -0
  694. sage/rings/function_field/drinfeld_modules/action.py +199 -0
  695. sage/rings/function_field/drinfeld_modules/all.py +1 -0
  696. sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py +673 -0
  697. sage/rings/function_field/drinfeld_modules/drinfeld_module.py +2087 -0
  698. sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +1131 -0
  699. sage/rings/function_field/drinfeld_modules/homset.py +420 -0
  700. sage/rings/function_field/drinfeld_modules/morphism.py +820 -0
  701. sage/rings/function_field/hermite_form_polynomial.cpython-314-x86_64-linux-musl.so +0 -0
  702. sage/rings/function_field/hermite_form_polynomial.pyx +188 -0
  703. sage/rings/function_field/khuri_makdisi.cpython-314-x86_64-linux-musl.so +0 -0
  704. sage/rings/function_field/khuri_makdisi.pyx +935 -0
  705. sage/rings/invariants/all.py +4 -0
  706. sage/rings/invariants/invariant_theory.py +4597 -0
  707. sage/rings/invariants/reconstruction.py +395 -0
  708. sage/rings/polynomial/all__sagemath_modules.py +17 -0
  709. sage/rings/polynomial/integer_valued_polynomials.py +1230 -0
  710. sage/rings/polynomial/laurent_polynomial_mpair.cpython-314-x86_64-linux-musl.so +0 -0
  711. sage/rings/polynomial/laurent_polynomial_mpair.pxd +15 -0
  712. sage/rings/polynomial/laurent_polynomial_mpair.pyx +2023 -0
  713. sage/rings/polynomial/ore_function_element.py +952 -0
  714. sage/rings/polynomial/ore_function_field.py +1028 -0
  715. sage/rings/polynomial/ore_polynomial_element.cpython-314-x86_64-linux-musl.so +0 -0
  716. sage/rings/polynomial/ore_polynomial_element.pxd +48 -0
  717. sage/rings/polynomial/ore_polynomial_element.pyx +3145 -0
  718. sage/rings/polynomial/ore_polynomial_ring.py +1334 -0
  719. sage/rings/polynomial/polynomial_real_mpfr_dense.cpython-314-x86_64-linux-musl.so +0 -0
  720. sage/rings/polynomial/polynomial_real_mpfr_dense.pyx +788 -0
  721. sage/rings/polynomial/q_integer_valued_polynomials.py +1264 -0
  722. sage/rings/polynomial/skew_polynomial_element.cpython-314-x86_64-linux-musl.so +0 -0
  723. sage/rings/polynomial/skew_polynomial_element.pxd +9 -0
  724. sage/rings/polynomial/skew_polynomial_element.pyx +684 -0
  725. sage/rings/polynomial/skew_polynomial_finite_field.cpython-314-x86_64-linux-musl.so +0 -0
  726. sage/rings/polynomial/skew_polynomial_finite_field.pxd +19 -0
  727. sage/rings/polynomial/skew_polynomial_finite_field.pyx +1093 -0
  728. sage/rings/polynomial/skew_polynomial_finite_order.cpython-314-x86_64-linux-musl.so +0 -0
  729. sage/rings/polynomial/skew_polynomial_finite_order.pxd +10 -0
  730. sage/rings/polynomial/skew_polynomial_finite_order.pyx +567 -0
  731. sage/rings/polynomial/skew_polynomial_ring.py +908 -0
  732. sage/rings/real_double_element_gsl.cpython-314-x86_64-linux-musl.so +0 -0
  733. sage/rings/real_double_element_gsl.pxd +8 -0
  734. sage/rings/real_double_element_gsl.pyx +794 -0
  735. sage/rings/real_field.py +58 -0
  736. sage/rings/real_mpfr.cpython-314-x86_64-linux-musl.so +0 -0
  737. sage/rings/real_mpfr.pxd +29 -0
  738. sage/rings/real_mpfr.pyx +6122 -0
  739. sage/rings/ring_extension.cpython-314-x86_64-linux-musl.so +0 -0
  740. sage/rings/ring_extension.pxd +42 -0
  741. sage/rings/ring_extension.pyx +2779 -0
  742. sage/rings/ring_extension_conversion.cpython-314-x86_64-linux-musl.so +0 -0
  743. sage/rings/ring_extension_conversion.pxd +16 -0
  744. sage/rings/ring_extension_conversion.pyx +462 -0
  745. sage/rings/ring_extension_element.cpython-314-x86_64-linux-musl.so +0 -0
  746. sage/rings/ring_extension_element.pxd +21 -0
  747. sage/rings/ring_extension_element.pyx +1635 -0
  748. sage/rings/ring_extension_homset.py +64 -0
  749. sage/rings/ring_extension_morphism.cpython-314-x86_64-linux-musl.so +0 -0
  750. sage/rings/ring_extension_morphism.pxd +35 -0
  751. sage/rings/ring_extension_morphism.pyx +920 -0
  752. sage/schemes/all__sagemath_modules.py +1 -0
  753. sage/schemes/projective/all__sagemath_modules.py +1 -0
  754. sage/schemes/projective/coherent_sheaf.py +300 -0
  755. sage/schemes/projective/cohomology.py +510 -0
  756. sage/stats/all.py +15 -0
  757. sage/stats/basic_stats.py +489 -0
  758. sage/stats/distributions/all.py +7 -0
  759. sage/stats/distributions/catalog.py +34 -0
  760. sage/stats/distributions/dgs.h +50 -0
  761. sage/stats/distributions/dgs.pxd +111 -0
  762. sage/stats/distributions/dgs_bern.h +400 -0
  763. sage/stats/distributions/dgs_gauss.h +614 -0
  764. sage/stats/distributions/dgs_misc.h +104 -0
  765. sage/stats/distributions/discrete_gaussian_integer.cpython-314-x86_64-linux-musl.so +0 -0
  766. sage/stats/distributions/discrete_gaussian_integer.pxd +14 -0
  767. sage/stats/distributions/discrete_gaussian_integer.pyx +498 -0
  768. sage/stats/distributions/discrete_gaussian_lattice.py +908 -0
  769. sage/stats/distributions/discrete_gaussian_polynomial.py +141 -0
  770. sage/stats/hmm/all.py +15 -0
  771. sage/stats/hmm/chmm.cpython-314-x86_64-linux-musl.so +0 -0
  772. sage/stats/hmm/chmm.pyx +1595 -0
  773. sage/stats/hmm/distributions.cpython-314-x86_64-linux-musl.so +0 -0
  774. sage/stats/hmm/distributions.pxd +29 -0
  775. sage/stats/hmm/distributions.pyx +531 -0
  776. sage/stats/hmm/hmm.cpython-314-x86_64-linux-musl.so +0 -0
  777. sage/stats/hmm/hmm.pxd +17 -0
  778. sage/stats/hmm/hmm.pyx +1388 -0
  779. sage/stats/hmm/util.cpython-314-x86_64-linux-musl.so +0 -0
  780. sage/stats/hmm/util.pxd +7 -0
  781. sage/stats/hmm/util.pyx +165 -0
  782. sage/stats/intlist.cpython-314-x86_64-linux-musl.so +0 -0
  783. sage/stats/intlist.pxd +14 -0
  784. sage/stats/intlist.pyx +588 -0
  785. sage/stats/r.py +49 -0
  786. sage/stats/time_series.cpython-314-x86_64-linux-musl.so +0 -0
  787. sage/stats/time_series.pxd +6 -0
  788. sage/stats/time_series.pyx +2546 -0
  789. sage/tensor/all.py +2 -0
  790. sage/tensor/modules/all.py +8 -0
  791. sage/tensor/modules/alternating_contr_tensor.py +761 -0
  792. sage/tensor/modules/comp.py +5598 -0
  793. sage/tensor/modules/ext_pow_free_module.py +824 -0
  794. sage/tensor/modules/finite_rank_free_module.py +3589 -0
  795. sage/tensor/modules/format_utilities.py +333 -0
  796. sage/tensor/modules/free_module_alt_form.py +858 -0
  797. sage/tensor/modules/free_module_automorphism.py +1207 -0
  798. sage/tensor/modules/free_module_basis.py +1074 -0
  799. sage/tensor/modules/free_module_element.py +284 -0
  800. sage/tensor/modules/free_module_homset.py +652 -0
  801. sage/tensor/modules/free_module_linear_group.py +564 -0
  802. sage/tensor/modules/free_module_morphism.py +1581 -0
  803. sage/tensor/modules/free_module_tensor.py +3289 -0
  804. sage/tensor/modules/reflexive_module.py +386 -0
  805. sage/tensor/modules/tensor_free_module.py +780 -0
  806. sage/tensor/modules/tensor_free_submodule.py +538 -0
  807. sage/tensor/modules/tensor_free_submodule_basis.py +140 -0
  808. sage/tensor/modules/tensor_with_indices.py +1043 -0
@@ -0,0 +1,2301 @@
1
+ # sage_setup: distribution = sagemath-modules
2
+ # sage.doctest: needs sage.graphs sage.libs.gap
3
+ """
4
+ Branching rules
5
+ """
6
+ # ****************************************************************************
7
+ # Copyright (C) 2014 Daniel Bump <bump at match.stanford.edu>
8
+ #
9
+ # Distributed under the terms of the GNU General Public License (GPL)
10
+ # https://www.gnu.org/licenses/
11
+ # ****************************************************************************
12
+
13
+ import sage.combinat.root_system.weyl_characters
14
+ from sage.combinat.root_system.root_system import RootSystem
15
+ from sage.matrix.constructor import matrix
16
+ from sage.misc.flatten import flatten
17
+ from sage.structure.sage_object import SageObject
18
+ from sage.combinat.root_system.cartan_type import CartanType
19
+ from sage.modules.free_module_element import vector
20
+ from sage.rings.rational_field import QQ
21
+ from sage.misc.functional import is_even, is_odd
22
+
23
+
24
+ def branch_weyl_character(chi, R, S, rule='default'):
25
+ r"""
26
+ A branching rule describes the restriction of representations from
27
+ a Lie group or algebra `G` to a subgroup `H`. See for example, R. C.
28
+ King, Branching rules for classical Lie groups using tensor and
29
+ spinor methods. J. Phys. A 8 (1975), 429-449, Howe, Tan and
30
+ Willenbring, Stable branching rules for classical symmetric pairs,
31
+ Trans. Amer. Math. Soc. 357 (2005), no. 4, 1601-1626, McKay and
32
+ Patera, Tables of Dimensions, Indices and Branching Rules for
33
+ Representations of Simple Lie Algebras (Marcel Dekker, 1981),
34
+ and Fauser, Jarvis, King and Wybourne, New branching rules induced
35
+ by plethysm. J. Phys. A 39 (2006), no. 11, 2611--2655. If `H\subset G`
36
+ we will write `G\Rightarrow H` to denote the branching rule, which
37
+ is a homomorphism of WeylCharacterRings.
38
+
39
+ INPUT:
40
+
41
+ - ``chi`` -- a character of `G`
42
+
43
+ - ``R`` -- the Weyl Character Ring of `G`
44
+
45
+ - ``S`` -- the Weyl Character Ring of `H`
46
+
47
+ - ``rule`` -- an element of the ``BranchingRule`` class
48
+ or one (most usually) a keyword such as:
49
+
50
+ * ``'levi'``
51
+ * ``'automorphic'``
52
+ * ``'symmetric'``
53
+ * ``'extended'``
54
+ * ``'orthogonal_sum'``
55
+ * ``'tensor'``
56
+ * ``'triality'``
57
+ * ``'miscellaneous'``
58
+
59
+ The :class:`BranchingRule` class is a wrapper for functions
60
+ from the weight lattice of `G` to the weight lattice of `H`.
61
+ An instance of this class encodes an embedding of `H` into
62
+ `G`. The usual way to specify an embedding is to supply a
63
+ keyword, which tells Sage to use one of the built-in rules.
64
+ We will discuss these first.
65
+
66
+ To explain the predefined rules, we survey the most important
67
+ branching rules. These may be classified into several cases, and
68
+ once this is understood, the detailed classification can be read
69
+ off from the Dynkin diagrams. Dynkin classified the maximal
70
+ subgroups of Lie groups in Mat. Sbornik N.S. 30(72):349-462 (1952).
71
+
72
+ We will list give predefined rules that cover most cases where the
73
+ branching rule is to a maximal subgroup. For convenience, we
74
+ also give some branching rules to subgroups that are not maximal.
75
+ For example, a Levi subgroup may or may not be maximal.
76
+
77
+ For example, there is a "levi" branching rule defined from `SL(5)` (with
78
+ Cartan type `A_4`) to `SL(4)` (with Cartan type `A_3`), so
79
+ we may compute the branching rule as follows:
80
+
81
+ EXAMPLES::
82
+
83
+ sage: A3=WeylCharacterRing("A3",style='coroots')
84
+ sage: A2=WeylCharacterRing("A2",style='coroots')
85
+ sage: [A3(fw).branch(A2,rule='levi') for fw in A3.fundamental_weights()]
86
+ [A2(0,0) + A2(1,0), A2(0,1) + A2(1,0), A2(0,0) + A2(0,1)]
87
+
88
+ In this case the Levi branching rule is the default branching rule
89
+ so we may omit the specification rule="levi".
90
+
91
+ If a subgroup is not maximal, you may specify a branching rule
92
+ by finding a chain of intermediate subgroups. For this
93
+ purpose, branching rules may be multiplied as in the following
94
+ example.
95
+
96
+ EXAMPLES::
97
+
98
+ sage: A4=WeylCharacterRing("A4",style='coroots')
99
+ sage: A2=WeylCharacterRing("A2",style='coroots')
100
+ sage: br=branching_rule("A4","A3")*branching_rule("A3","A2")
101
+ sage: A4(1,0,0,0).branch(A2,rule=br)
102
+ 2*A2(0,0) + A2(1,0)
103
+
104
+ You may try omitting the rule if it is "obvious". Default
105
+ rules are provided for the following cases:
106
+
107
+ .. MATH::
108
+
109
+ \begin{aligned}
110
+ A_{2s} & \Rightarrow B_s,
111
+ \\ A_{2s-1} & \Rightarrow C_s,
112
+ \\ A_{2*s-1} & \Rightarrow D_s.
113
+ \end{aligned}
114
+
115
+ The above default rules correspond to embedding the group
116
+ `SO(2s+1)`, `Sp(2s)` or `SO(2s)` into the corresponding general
117
+ or special linear group by the standard representation. Default
118
+ rules are also specified for the following cases:
119
+
120
+ .. MATH::
121
+
122
+ \begin{aligned}
123
+ B_{s+1} & \Rightarrow D_s,
124
+ \\ D_s & \Rightarrow B_s.
125
+ \end{aligned}
126
+
127
+ These correspond to the embedding of `O(n)` into `O(n+1)` where
128
+ `n = 2s` or `2s + 1`. Finally, the branching rule for the embedding of
129
+ a Levi subgroup is also implemented as a default rule.
130
+
131
+ EXAMPLES::
132
+
133
+ sage: A1 = WeylCharacterRing("A1", style='coroots')
134
+ sage: A2 = WeylCharacterRing("A2", style='coroots')
135
+ sage: D4 = WeylCharacterRing("D4", style='coroots')
136
+ sage: B3 = WeylCharacterRing("B3", style='coroots')
137
+ sage: B4 = WeylCharacterRing("B4", style='coroots')
138
+ sage: A6 = WeylCharacterRing("A6", style='coroots')
139
+ sage: A7 = WeylCharacterRing("A7", style='coroots')
140
+ sage: def try_default_rule(R, S): return [R(f).branch(S) for f in R.fundamental_weights()]
141
+ sage: try_default_rule(A2,A1)
142
+ [A1(0) + A1(1), A1(0) + A1(1)]
143
+ sage: try_default_rule(D4,B3)
144
+ [B3(0,0,0) + B3(1,0,0), B3(1,0,0) + B3(0,1,0), B3(0,0,1), B3(0,0,1)]
145
+ sage: try_default_rule(B4,D4)
146
+ [D4(0,0,0,0) + D4(1,0,0,0), D4(1,0,0,0) + D4(0,1,0,0),
147
+ D4(0,1,0,0) + D4(0,0,1,1), D4(0,0,1,0) + D4(0,0,0,1)]
148
+ sage: try_default_rule(A7,D4)
149
+ [D4(1,0,0,0), D4(0,1,0,0), D4(0,0,1,1), D4(0,0,2,0) + D4(0,0,0,2),
150
+ D4(0,0,1,1),
151
+ D4(0,1,0,0),
152
+ D4(1,0,0,0)]
153
+ sage: try_default_rule(A6,B3)
154
+ [B3(1,0,0), B3(0,1,0), B3(0,0,2), B3(0,0,2), B3(0,1,0), B3(1,0,0)]
155
+
156
+ If a default rule is not known, you may cue Sage as to what the
157
+ Lie group embedding is by supplying a rule from the list of
158
+ predefined rules. We will treat these next.
159
+
160
+ .. RUBRIC:: Levi Type
161
+
162
+ These can be read off from the Dynkin diagram. If
163
+ removing a node from the Dynkin diagram produces another Dynkin
164
+ diagram, there is a branching rule. A Levi subgroup may
165
+ or may not be maximal. If it is maximal, there may or may not
166
+ be a built-in branching rule for but you may obtain the
167
+ Levi branching rule by first branching to a suitable
168
+ maximal subgroup. For these rules use the option ``rule="levi"``:
169
+
170
+ .. MATH::
171
+
172
+ \begin{aligned}
173
+ A_r & \Rightarrow A_{r-1}
174
+ \\ B_r & \Rightarrow A_{r-1}
175
+ \\ B_r & \Rightarrow B_{r-1}
176
+ \\ C_r & \Rightarrow A_{r-1}
177
+ \\ C_r & \Rightarrow C_{r-1}
178
+ \\ D_r & \Rightarrow A_{r-1}
179
+ \\ D_r & \Rightarrow D_{r-1}
180
+ \\ E_r & \Rightarrow A_{r-1} \quad r = 7,8
181
+ \\ E_r & \Rightarrow D_{r-1} \quad r = 6,7,8
182
+ \\ E_r & \Rightarrow E_{r-1}
183
+ \\ F_4 & \Rightarrow B_3
184
+ \\ F_4 & \Rightarrow C_3
185
+ \\ G_2 & \Rightarrow A_1 \text{(short root)}
186
+ \end{aligned}
187
+
188
+ Not all Levi subgroups are maximal subgroups. If the Levi is not
189
+ maximal there may or may not be a preprogrammed ``rule="levi"`` for
190
+ it. If there is not, the branching rule may still be obtained by going
191
+ through an intermediate subgroup that is maximal using rule="extended".
192
+ Thus the other Levi branching rule from `G_2 \Rightarrow A_1` corresponding to the
193
+ long root is available by first branching `G_2 \Rightarrow A_2` then `A_2 \Rightarrow A_1`.
194
+ Similarly the branching rules to the Levi subgroup:
195
+
196
+ .. MATH::
197
+
198
+ E_r \Rightarrow A_{r-1} \quad r = 6,7,8
199
+
200
+ may be obtained by first branching `E_6 \Rightarrow A_5 \times A_1`, `E_7 \Rightarrow A_7`
201
+ or `E_8 \Rightarrow A_8`.
202
+
203
+ EXAMPLES::
204
+
205
+ sage: A1 = WeylCharacterRing("A1")
206
+ sage: A2 = WeylCharacterRing("A2")
207
+ sage: A3 = WeylCharacterRing("A3")
208
+ sage: A4 = WeylCharacterRing("A4")
209
+ sage: A5 = WeylCharacterRing("A5")
210
+ sage: B2 = WeylCharacterRing("B2")
211
+ sage: B3 = WeylCharacterRing("B3")
212
+ sage: B4 = WeylCharacterRing("B4")
213
+ sage: C2 = WeylCharacterRing("C2")
214
+ sage: C3 = WeylCharacterRing("C3")
215
+ sage: D3 = WeylCharacterRing("D3")
216
+ sage: D4 = WeylCharacterRing("D4")
217
+ sage: G2 = WeylCharacterRing("G2")
218
+ sage: F4 = WeylCharacterRing("F4",style='coroots')
219
+ sage: E6=WeylCharacterRing("E6",style='coroots')
220
+ sage: E7=WeylCharacterRing("E7",style='coroots')
221
+ sage: D5=WeylCharacterRing("D5",style='coroots')
222
+ sage: D6=WeylCharacterRing("D6",style='coroots')
223
+ sage: [B3(w).branch(A2,rule='levi') for w in B3.fundamental_weights()]
224
+ [A2(0,0,0) + A2(1,0,0) + A2(0,0,-1),
225
+ A2(0,0,0) + A2(1,0,0) + A2(1,1,0) + A2(1,0,-1) + A2(0,-1,-1) + A2(0,0,-1),
226
+ A2(-1/2,-1/2,-1/2) + A2(1/2,-1/2,-1/2) + A2(1/2,1/2,-1/2) + A2(1/2,1/2,1/2)]
227
+
228
+ The last example must be understood as follows. The representation
229
+ of `B_3` being branched is spin, which is not a representation of
230
+ `SO(7)` but of its double cover `\mathrm{spin}(7)`. The group `A_2` is
231
+ really GL(3) and the double cover of `SO(7)` induces a cover of `GL(3)`
232
+ that is trivial over `SL(3)` but not over the center of `GL(3)`. The weight
233
+ lattice for this `GL(3)` consists of triples `(a,b,c)` of half integers
234
+ such that `a - b` and `b - c` are in `\ZZ`, and this is reflected in the
235
+ last decomposition.
236
+
237
+ ::
238
+
239
+ sage: [C3(w).branch(A2,rule='levi') for w in C3.fundamental_weights()]
240
+ [A2(1,0,0) + A2(0,0,-1),
241
+ A2(1,1,0) + A2(1,0,-1) + A2(0,-1,-1),
242
+ A2(-1,-1,-1) + A2(1,-1,-1) + A2(1,1,-1) + A2(1,1,1)]
243
+ sage: [D4(w).branch(A3,rule='levi') for w in D4.fundamental_weights()]
244
+ [A3(1,0,0,0) + A3(0,0,0,-1),
245
+ A3(0,0,0,0) + A3(1,1,0,0) + A3(1,0,0,-1) + A3(0,0,-1,-1),
246
+ A3(1/2,-1/2,-1/2,-1/2) + A3(1/2,1/2,1/2,-1/2),
247
+ A3(-1/2,-1/2,-1/2,-1/2) + A3(1/2,1/2,-1/2,-1/2) + A3(1/2,1/2,1/2,1/2)]
248
+ sage: [B3(w).branch(B2,rule='levi') for w in B3.fundamental_weights()]
249
+ [2*B2(0,0) + B2(1,0), B2(0,0) + 2*B2(1,0) + B2(1,1), 2*B2(1/2,1/2)]
250
+ sage: C3 = WeylCharacterRing(['C',3])
251
+ sage: [C3(w).branch(C2,rule='levi') for w in C3.fundamental_weights()]
252
+ [2*C2(0,0) + C2(1,0),
253
+ C2(0,0) + 2*C2(1,0) + C2(1,1),
254
+ C2(1,0) + 2*C2(1,1)]
255
+ sage: [D5(w).branch(D4,rule='levi') for w in D5.fundamental_weights()]
256
+ [2*D4(0,0,0,0) + D4(1,0,0,0),
257
+ D4(0,0,0,0) + 2*D4(1,0,0,0) + D4(1,1,0,0),
258
+ D4(1,0,0,0) + 2*D4(1,1,0,0) + D4(1,1,1,0),
259
+ D4(1/2,1/2,1/2,-1/2) + D4(1/2,1/2,1/2,1/2),
260
+ D4(1/2,1/2,1/2,-1/2) + D4(1/2,1/2,1/2,1/2)]
261
+ sage: G2(1,0,-1).branch(A1,rule='levi')
262
+ A1(1,0) + A1(1,-1) + A1(0,-1)
263
+ sage: E6=WeylCharacterRing("E6",style='coroots')
264
+ sage: D5=WeylCharacterRing("D5",style='coroots')
265
+ sage: fw = E6.fundamental_weights()
266
+ sage: [E6(fw[i]).branch(D5,rule='levi') for i in [1,2,6]]
267
+ [D5(0,0,0,0,0) + D5(0,0,0,0,1) + D5(1,0,0,0,0),
268
+ D5(0,0,0,0,0) + D5(0,0,0,1,0) + D5(0,0,0,0,1) + D5(0,1,0,0,0),
269
+ D5(0,0,0,0,0) + D5(0,0,0,1,0) + D5(1,0,0,0,0)]
270
+ sage: E7=WeylCharacterRing("E7",style='coroots')
271
+ sage: A3xA3xA1=WeylCharacterRing("A3xA3xA1",style='coroots')
272
+ sage: E7(1,0,0,0,0,0,0).branch(A3xA3xA1,rule='extended') # long time (0.7s)
273
+ A3xA3xA1(0,0,1,0,0,1,1) + A3xA3xA1(0,1,0,0,1,0,0) + A3xA3xA1(1,0,0,1,0,0,1) +
274
+ A3xA3xA1(1,0,1,0,0,0,0) + A3xA3xA1(0,0,0,1,0,1,0) + A3xA3xA1(0,0,0,0,0,0,2)
275
+ sage: fw = E7.fundamental_weights()
276
+ sage: [E7(fw[i]).branch(D6,rule='levi') for i in [1,2,7]] # long time (0.3s)
277
+ [3*D6(0,0,0,0,0,0) + 2*D6(0,0,0,0,1,0) + D6(0,1,0,0,0,0),
278
+ 3*D6(0,0,0,0,0,1) + 2*D6(1,0,0,0,0,0) + 2*D6(0,0,1,0,0,0) + D6(1,0,0,0,1,0),
279
+ D6(0,0,0,0,0,1) + 2*D6(1,0,0,0,0,0)]
280
+ sage: D7=WeylCharacterRing("D7",style='coroots')
281
+ sage: E8=WeylCharacterRing("E8",style='coroots')
282
+ sage: D7=WeylCharacterRing("D7",style='coroots')
283
+ sage: E8(1,0,0,0,0,0,0,0).branch(D7,rule='levi') # long time (7s)
284
+ 3*D7(0,0,0,0,0,0,0) + 2*D7(0,0,0,0,0,1,0) + 2*D7(0,0,0,0,0,0,1) + 2*D7(1,0,0,0,0,0,0)
285
+ + D7(0,1,0,0,0,0,0) + 2*D7(0,0,1,0,0,0,0) + D7(0,0,0,1,0,0,0) + D7(1,0,0,0,0,1,0) + D7(1,0,0,0,0,0,1) + D7(2,0,0,0,0,0,0)
286
+ sage: E8(0,0,0,0,0,0,0,1).branch(D7,rule='levi') # long time (0.6s)
287
+ D7(0,0,0,0,0,0,0) + D7(0,0,0,0,0,1,0) + D7(0,0,0,0,0,0,1) + 2*D7(1,0,0,0,0,0,0) + D7(0,1,0,0,0,0,0)
288
+ sage: [F4(fw).branch(B3,rule='levi') for fw in F4.fundamental_weights()] # long time (1s)
289
+ [B3(0,0,0) + 2*B3(1/2,1/2,1/2) + 2*B3(1,0,0) + B3(1,1,0),
290
+ B3(0,0,0) + 6*B3(1/2,1/2,1/2) + 5*B3(1,0,0) + 7*B3(1,1,0) + 3*B3(1,1,1)
291
+ + 6*B3(3/2,1/2,1/2) + 2*B3(3/2,3/2,1/2) + B3(2,0,0) + 2*B3(2,1,0) + B3(2,1,1),
292
+ 3*B3(0,0,0) + 6*B3(1/2,1/2,1/2) + 4*B3(1,0,0) + 3*B3(1,1,0) + B3(1,1,1) + 2*B3(3/2,1/2,1/2),
293
+ 3*B3(0,0,0) + 2*B3(1/2,1/2,1/2) + B3(1,0,0)]
294
+ sage: [F4(fw).branch(C3,rule='levi') for fw in F4.fundamental_weights()] # long time (1s)
295
+ [3*C3(0,0,0) + 2*C3(1,1,1) + C3(2,0,0),
296
+ 3*C3(0,0,0) + 6*C3(1,1,1) + 4*C3(2,0,0) + 2*C3(2,1,0) + 3*C3(2,2,0) + C3(2,2,2) + C3(3,1,0) + 2*C3(3,1,1),
297
+ 2*C3(1,0,0) + 3*C3(1,1,0) + C3(2,0,0) + 2*C3(2,1,0) + C3(2,1,1),
298
+ 2*C3(1,0,0) + C3(1,1,0)]
299
+ sage: A1xA1 = WeylCharacterRing("A1xA1")
300
+ sage: [A3(hwv).branch(A1xA1,rule='levi') for hwv in A3.fundamental_weights()]
301
+ [A1xA1(1,0,0,0) + A1xA1(0,0,1,0),
302
+ A1xA1(1,1,0,0) + A1xA1(1,0,1,0) + A1xA1(0,0,1,1),
303
+ A1xA1(1,1,1,0) + A1xA1(1,0,1,1)]
304
+ sage: A1xB1=WeylCharacterRing("A1xB1",style='coroots')
305
+ sage: [B3(x).branch(A1xB1,rule='levi') for x in B3.fundamental_weights()]
306
+ [2*A1xB1(1,0) + A1xB1(0,2),
307
+ 3*A1xB1(0,0) + 2*A1xB1(1,2) + A1xB1(2,0) + A1xB1(0,2),
308
+ A1xB1(1,1) + 2*A1xB1(0,1)]
309
+
310
+ .. RUBRIC:: Automorphic Type
311
+
312
+ If the Dynkin diagram has a symmetry, then there
313
+ is an automorphism that is a special case of a branching rule.
314
+ There is also an exotic "triality" automorphism of `D_4` having order 3.
315
+ Use ``rule="automorphic"`` (or for `D_4` ``rule="triality"``):
316
+
317
+ .. MATH::
318
+
319
+ \begin{aligned}
320
+ A_r & \Rightarrow A_r
321
+ \\ D_r & \Rightarrow D_r
322
+ \\ E_6 & \Rightarrow E_6
323
+ \end{aligned}
324
+
325
+ EXAMPLES::
326
+
327
+ sage: [A3(chi).branch(A3,rule='automorphic') for chi in A3.fundamental_weights()]
328
+ [A3(0,0,0,-1), A3(0,0,-1,-1), A3(0,-1,-1,-1)]
329
+ sage: [D4(chi).branch(D4,rule='automorphic') for chi in D4.fundamental_weights()]
330
+ [D4(1,0,0,0), D4(1,1,0,0), D4(1/2,1/2,1/2,1/2), D4(1/2,1/2,1/2,-1/2)]
331
+
332
+ Here is an example with `D_4` triality::
333
+
334
+ sage: [D4(chi).branch(D4,rule='triality') for chi in D4.fundamental_weights()]
335
+ [D4(1/2,1/2,1/2,-1/2), D4(1,1,0,0), D4(1/2,1/2,1/2,1/2), D4(1,0,0,0)]
336
+
337
+ .. RUBRIC:: Symmetric Type
338
+
339
+ Related to the automorphic type, when `G` admits
340
+ an outer automorphism (usually of degree 2) we may consider
341
+ the branching rule to the isotropy subgroup `H`. Outer
342
+ automorphisms correspond to symmetries of the Dynkin diagram.
343
+ For such isotropy subgroups use ``rule="symmetric"``.
344
+ We may thus obtain the following branching rules.
345
+
346
+ .. MATH::
347
+
348
+ A_{2r} & \Rightarrow B_r
349
+ \\ A_{2r-1} & \Rightarrow C_r
350
+ \\ A_{2r-1} & \Rightarrow D_r
351
+ \\ D_r & \Rightarrow B_{r-1}
352
+ \\ E_6 & \Rightarrow F_4
353
+ \\ E_6 & \Rightarrow C_4
354
+ \\ D_4 & \Rightarrow G_2
355
+
356
+ The last branching rule, `D_4 \Rightarrow G_2` is not to a maximal subgroup
357
+ since `D_4 \Rightarrow B_3 \Rightarrow G_2`, but it is included for convenience.
358
+
359
+ In some cases, two outer automorphisms that differ by an
360
+ inner automorphism may have different fixed subgroups.
361
+ Thus, while the Dynkin diagram of `E_6` has a single
362
+ involutory automorphism, there are two involutions
363
+ of the group (differing by an inner automorphism) with
364
+ fixed subgroups `F_4` and `C_4`. Similarly
365
+ `SL(2r)`, of Cartan type `A_{2r-1}`, has subgroups
366
+ `SO(2r)` and `Sp(2r)`, both fixed subgroups of outer
367
+ automorphisms that differ from each other by an inner
368
+ automorphism.
369
+
370
+ In many cases the Dynkin diagram of `H` can be obtained by
371
+ folding the Dynkin diagram of `G`.
372
+
373
+ EXAMPLES::
374
+
375
+ sage: [w.branch(B2,rule='symmetric') for w in [A4(1,0,0,0,0),A4(1,1,0,0,0),A4(1,1,1,0,0),A4(2,0,0,0,0)]]
376
+ [B2(1,0), B2(1,1), B2(1,1), B2(0,0) + B2(2,0)]
377
+ sage: [A5(w).branch(C3,rule='symmetric') for w in A5.fundamental_weights()]
378
+ [C3(1,0,0), C3(0,0,0) + C3(1,1,0), C3(1,0,0) + C3(1,1,1), C3(0,0,0) + C3(1,1,0), C3(1,0,0)]
379
+ sage: [A5(w).branch(D3,rule='symmetric') for w in A5.fundamental_weights()]
380
+ [D3(1,0,0), D3(1,1,0), D3(1,1,-1) + D3(1,1,1), D3(1,1,0), D3(1,0,0)]
381
+ sage: [D4(x).branch(B3,rule='symmetric') for x in D4.fundamental_weights()]
382
+ [B3(0,0,0) + B3(1,0,0), B3(1,0,0) + B3(1,1,0), B3(1/2,1/2,1/2), B3(1/2,1/2,1/2)]
383
+ sage: [D4(x).branch(G2,rule='symmetric') for x in D4.fundamental_weights()]
384
+ [G2(0,0,0) + G2(1,0,-1), 2*G2(1,0,-1) + G2(2,-1,-1), G2(0,0,0) + G2(1,0,-1), G2(0,0,0) + G2(1,0,-1)]
385
+ sage: [E6(fw).branch(F4,rule='symmetric') for fw in E6.fundamental_weights()] # long time (4s)
386
+ [F4(0,0,0,0) + F4(0,0,0,1),
387
+ F4(0,0,0,1) + F4(1,0,0,0),
388
+ F4(0,0,0,1) + F4(1,0,0,0) + F4(0,0,1,0),
389
+ F4(1,0,0,0) + 2*F4(0,0,1,0) + F4(1,0,0,1) + F4(0,1,0,0),
390
+ F4(0,0,0,1) + F4(1,0,0,0) + F4(0,0,1,0),
391
+ F4(0,0,0,0) + F4(0,0,0,1)]
392
+ sage: E6=WeylCharacterRing("E6",style='coroots')
393
+ sage: C4=WeylCharacterRing("C4",style='coroots')
394
+ sage: chi = E6(1,0,0,0,0,0); chi.degree()
395
+ 27
396
+ sage: chi.branch(C4,rule='symmetric')
397
+ C4(0,1,0,0)
398
+
399
+ .. RUBRIC:: Extended Type
400
+
401
+ If removing a node from the extended Dynkin diagram
402
+ results in a Dynkin diagram, then there is a branching rule. Use
403
+ ``rule="extended"`` for these. We will also use this classification
404
+ for some rules that are not of this type, mainly involving type `B`,
405
+ such as `D_6 \Rightarrow B_3 \times B_3`.
406
+
407
+ Here is the extended Dynkin diagram for `D_6`::
408
+
409
+ 0 6
410
+ O O
411
+ | |
412
+ | |
413
+ O---O---O---O---O
414
+ 1 2 3 4 6
415
+
416
+ Removing the node 3 results in an embedding `D_3 \times D_3 \Rightarrow D_6`.
417
+ This corresponds to the embedding `SO(6) \times SO(6) \Rightarrow SO(12)`, and
418
+ is of extended type. On the other hand the embedding `SO(5) \times SO(7)
419
+ \Rightarrow SO(12)` (e.g. `B_2 \times B_3 \Rightarrow D_6`) cannot be explained this way
420
+ but for uniformity is implemented under ``rule="extended"``.
421
+
422
+ The following rules are implemented as special cases
423
+ of ``rule="extended"``:
424
+
425
+ .. MATH::
426
+
427
+ \begin{aligned}
428
+ E_6 & \Rightarrow A_5 \times A_1, A_2 \times A_2 \times A_2
429
+ \\ E_7 & \Rightarrow A_7, D_6 \times A_1, A_3 \times A_3 \times A_1
430
+ \\ E_8 & \Rightarrow A_8, D_8, E_7 \times A_1, A_4 \times A_4,
431
+ D_5 \times A_3, E_6 \times A_2
432
+ \\ F_4 & \Rightarrow B_4, C_3 \times A_1, A_2 \times A_2, A_3 \times A_1
433
+ \\ G_2 & \Rightarrow A_1 \times A_1
434
+ \end{aligned}
435
+
436
+ Note that `E_8` has only a limited number of representations of
437
+ reasonably low degree.
438
+
439
+ EXAMPLES::
440
+
441
+ sage: [B3(x).branch(D3,rule='extended') for x in B3.fundamental_weights()]
442
+ [D3(0,0,0) + D3(1,0,0),
443
+ D3(1,0,0) + D3(1,1,0),
444
+ D3(1/2,1/2,-1/2) + D3(1/2,1/2,1/2)]
445
+ sage: [G2(w).branch(A2, rule='extended') for w in G2.fundamental_weights()]
446
+ [A2(0,0,0) + A2(1/3,1/3,-2/3) + A2(2/3,-1/3,-1/3),
447
+ A2(1/3,1/3,-2/3) + A2(2/3,-1/3,-1/3) + A2(1,0,-1)]
448
+ sage: [F4(fw).branch(B4,rule='extended') for fw in F4.fundamental_weights()] # long time (2s)
449
+ [B4(1/2,1/2,1/2,1/2) + B4(1,1,0,0),
450
+ B4(1,1,0,0) + B4(1,1,1,0) + B4(3/2,1/2,1/2,1/2) + B4(3/2,3/2,1/2,1/2) + B4(2,1,1,0),
451
+ B4(1/2,1/2,1/2,1/2) + B4(1,0,0,0) + B4(1,1,0,0) + B4(1,1,1,0) + B4(3/2,1/2,1/2,1/2),
452
+ B4(0,0,0,0) + B4(1/2,1/2,1/2,1/2) + B4(1,0,0,0)]
453
+
454
+ sage: E6 = WeylCharacterRing("E6", style='coroots')
455
+ sage: A2xA2xA2 = WeylCharacterRing("A2xA2xA2",style='coroots')
456
+ sage: A5xA1 = WeylCharacterRing("A5xA1",style='coroots')
457
+ sage: G2 = WeylCharacterRing("G2", style='coroots')
458
+ sage: A1xA1 = WeylCharacterRing("A1xA1", style='coroots')
459
+ sage: F4 = WeylCharacterRing("F4",style='coroots')
460
+ sage: A3xA1 = WeylCharacterRing("A3xA1", style='coroots')
461
+ sage: A2xA2 = WeylCharacterRing("A2xA2", style='coroots')
462
+ sage: A1xC3 = WeylCharacterRing("A1xC3",style='coroots')
463
+ sage: E6(1,0,0,0,0,0).branch(A5xA1,rule='extended') # (0.7s)
464
+ A5xA1(0,0,0,1,0,0) + A5xA1(1,0,0,0,0,1)
465
+ sage: E6(1,0,0,0,0,0).branch(A2xA2xA2, rule='extended') # (0.7s)
466
+ A2xA2xA2(0,1,1,0,0,0) + A2xA2xA2(1,0,0,0,0,1) + A2xA2xA2(0,0,0,1,1,0)
467
+ sage: E7 = WeylCharacterRing("E7",style='coroots')
468
+ sage: A7 = WeylCharacterRing("A7",style='coroots')
469
+ sage: E7(1,0,0,0,0,0,0).branch(A7,rule='extended')
470
+ A7(0,0,0,1,0,0,0) + A7(1,0,0,0,0,0,1)
471
+ sage: D6xA1 = WeylCharacterRing("D6xA1",style='coroots')
472
+ sage: E7(1,0,0,0,0,0,0).branch(D6xA1,rule='extended')
473
+ D6xA1(0,0,0,0,1,0,1) + D6xA1(0,1,0,0,0,0,0) + D6xA1(0,0,0,0,0,0,2)
474
+ sage: A5xA2 = WeylCharacterRing("A5xA2",style='coroots')
475
+ sage: E7(1,0,0,0,0,0,0).branch(A5xA2,rule='extended')
476
+ A5xA2(0,0,0,1,0,1,0) + A5xA2(0,1,0,0,0,0,1) + A5xA2(1,0,0,0,1,0,0) + A5xA2(0,0,0,0,0,1,1)
477
+ sage: E8 = WeylCharacterRing("E8",style='coroots')
478
+ sage: D8 = WeylCharacterRing("D8",style='coroots')
479
+ sage: A8 = WeylCharacterRing("A8",style='coroots')
480
+ sage: E8(0,0,0,0,0,0,0,1).branch(D8,rule='extended') # long time (0.56s)
481
+ D8(0,0,0,0,0,0,1,0) + D8(0,1,0,0,0,0,0,0)
482
+ sage: E8(0,0,0,0,0,0,0,1).branch(A8,rule='extended') # long time (0.73s)
483
+ A8(0,0,0,0,0,1,0,0) + A8(0,0,1,0,0,0,0,0) + A8(1,0,0,0,0,0,0,1)
484
+ sage: F4(1,0,0,0).branch(A1xC3,rule='extended') # (0.05s)
485
+ A1xC3(1,0,0,1) + A1xC3(2,0,0,0) + A1xC3(0,2,0,0)
486
+ sage: G2(0,1).branch(A1xA1, rule='extended')
487
+ A1xA1(2,0) + A1xA1(3,1) + A1xA1(0,2)
488
+ sage: F4(0,0,0,1).branch(A2xA2, rule='extended') # (0.4s)
489
+ A2xA2(0,1,0,1) + A2xA2(1,0,1,0) + A2xA2(0,0,1,1)
490
+ sage: F4(0,0,0,1).branch(A3xA1,rule='extended') # (0.34s)
491
+ A3xA1(0,0,0,0) + A3xA1(0,0,1,1) + A3xA1(0,1,0,0) + A3xA1(1,0,0,1) + A3xA1(0,0,0,2)
492
+ sage: D4=WeylCharacterRing("D4",style='coroots')
493
+ sage: D2xD2=WeylCharacterRing("D2xD2",style='coroots') # We get D4 => A1xA1xA1xA1 by remembering that A1xA1 = D2.
494
+ sage: [D4(fw).branch(D2xD2, rule='extended') for fw in D4.fundamental_weights()]
495
+ [D2xD2(1,1,0,0) + D2xD2(0,0,1,1),
496
+ D2xD2(2,0,0,0) + D2xD2(0,2,0,0) + D2xD2(1,1,1,1) + D2xD2(0,0,2,0) + D2xD2(0,0,0,2),
497
+ D2xD2(1,0,0,1) + D2xD2(0,1,1,0),
498
+ D2xD2(1,0,1,0) + D2xD2(0,1,0,1)]
499
+
500
+ .. RUBRIC:: Orthogonal Sum
501
+
502
+ Using ``rule="orthogonal_sum"``, for `n = a + b + c + \cdots`,
503
+ you can get any branching rule
504
+
505
+ .. MATH::
506
+
507
+ \begin{aligned}
508
+ SO(n) & \Rightarrow SO(a) \times SO(b) \times SO(c) \times \cdots,
509
+ \\ Sp(2n) & \Rightarrow Sp(2a) \times Sp(2b) \times Sp(2c) x \times \cdots,
510
+ \end{aligned}
511
+
512
+ where `O(a)` is type `D_r` for `a = 2r` or `B_r` for `a = 2r+1`
513
+ and `Sp(2r)` is type `C_r`. In some cases these are also of
514
+ extended type, as in the case `D_3 \times D_3 \Rightarrow D_6` discussed above.
515
+ But in other cases, for example `B_3 \times B_3 \Rightarrow D_7`, they are not
516
+ of extended type.
517
+
518
+ .. RUBRIC:: Tensor
519
+
520
+ There are branching rules:
521
+
522
+ .. MATH::
523
+
524
+ \begin{aligned}
525
+ A_{rs-1} & \Rightarrow A_{r-1} \times A_{s-1},
526
+ \\ B_{2rs+r+s} & \Rightarrow B_r \times B_s,
527
+ \\ D_{2rs+s} & \Rightarrow B_r \times D_s,
528
+ \\ D_{2rs} & \Rightarrow D_r \times D_s,
529
+ \\ D_{2rs} & \Rightarrow C_r \times C_s,
530
+ \\ C_{2rs+s} & \Rightarrow B_r \times C_s,
531
+ \\ C_{2rs} & \Rightarrow C_r \times D_s.
532
+ \end{aligned}
533
+
534
+ corresponding to the tensor product homomorphism. For type
535
+ `A`, the homomorphism is `GL(r) \times GL(s) \Rightarrow GL(rs)`. For the
536
+ classical types, the relevant fact is that if `V, W` are
537
+ orthogonal or symplectic spaces, that is, spaces endowed
538
+ with symmetric or skew-symmetric bilinear forms, then `V \otimes W`
539
+ is also an orthogonal space (if `V` and `W` are both
540
+ orthogonal or both symplectic) or symplectic (if one of
541
+ `V` and `W` is orthogonal and the other symplectic).
542
+
543
+ The corresponding branching rules are obtained using ``rule="tensor"``.
544
+
545
+ EXAMPLES::
546
+
547
+ sage: A5=WeylCharacterRing("A5", style='coroots')
548
+ sage: A2xA1=WeylCharacterRing("A2xA1", style='coroots')
549
+ sage: [A5(hwv).branch(A2xA1, rule='tensor') for hwv in A5.fundamental_weights()]
550
+ [A2xA1(1,0,1),
551
+ A2xA1(0,1,2) + A2xA1(2,0,0),
552
+ A2xA1(1,1,1) + A2xA1(0,0,3),
553
+ A2xA1(1,0,2) + A2xA1(0,2,0),
554
+ A2xA1(0,1,1)]
555
+ sage: B4=WeylCharacterRing("B4",style='coroots')
556
+ sage: B1xB1=WeylCharacterRing("B1xB1",style='coroots')
557
+ sage: [B4(f).branch(B1xB1,rule='tensor') for f in B4.fundamental_weights()]
558
+ [B1xB1(2,2),
559
+ B1xB1(2,0) + B1xB1(2,4) + B1xB1(4,2) + B1xB1(0,2),
560
+ B1xB1(2,0) + B1xB1(2,2) + B1xB1(2,4) + B1xB1(4,2) + B1xB1(4,4) + B1xB1(6,0) + B1xB1(0,2) + B1xB1(0,6),
561
+ B1xB1(1,3) + B1xB1(3,1)]
562
+ sage: D4=WeylCharacterRing("D4",style='coroots')
563
+ sage: C2xC1=WeylCharacterRing("C2xC1",style='coroots')
564
+ sage: [D4(f).branch(C2xC1,rule='tensor') for f in D4.fundamental_weights()]
565
+ [C2xC1(1,0,1),
566
+ C2xC1(0,1,2) + C2xC1(2,0,0) + C2xC1(0,0,2),
567
+ C2xC1(1,0,1),
568
+ C2xC1(0,1,0) + C2xC1(0,0,2)]
569
+ sage: C3=WeylCharacterRing("C3",style='coroots')
570
+ sage: B1xC1=WeylCharacterRing("B1xC1",style='coroots')
571
+ sage: [C3(f).branch(B1xC1,rule='tensor') for f in C3.fundamental_weights()]
572
+ [B1xC1(2,1), B1xC1(2,2) + B1xC1(4,0), B1xC1(4,1) + B1xC1(0,3)]
573
+
574
+ .. RUBRIC:: Symmetric Power
575
+
576
+ The `k`-th symmetric and exterior power homomorphisms map
577
+
578
+ .. MATH::
579
+
580
+ GL(n) \Rightarrow GL\left(\binom{n+k-1}{k}\right)
581
+ \times GL\left(\binom{n}{k}\right).
582
+
583
+ The corresponding branching rules are not implemented but a special
584
+ case is. The `k`-th symmetric power homomorphism `SL(2) \Rightarrow GL(k+1)`
585
+ has its image inside of `SO(2r+1)` if `k = 2r` and inside of `Sp(2r)` if
586
+ `k = 2r - 1`. Hence there are branching rules:
587
+
588
+ .. MATH::
589
+
590
+ \begin{aligned}
591
+ B_r & \Rightarrow A_1
592
+ \\ C_r & \Rightarrow A_1
593
+ \end{aligned}
594
+
595
+ and these may be obtained using the rule "symmetric_power".
596
+
597
+ EXAMPLES::
598
+
599
+ sage: A1=WeylCharacterRing("A1",style='coroots')
600
+ sage: B3=WeylCharacterRing("B3",style='coroots')
601
+ sage: C3=WeylCharacterRing("C3",style='coroots')
602
+ sage: [B3(fw).branch(A1,rule='symmetric_power') for fw in B3.fundamental_weights()]
603
+ [A1(6), A1(2) + A1(6) + A1(10), A1(0) + A1(6)]
604
+ sage: [C3(fw).branch(A1,rule='symmetric_power') for fw in C3.fundamental_weights()]
605
+ [A1(5), A1(4) + A1(8), A1(3) + A1(9)]
606
+
607
+ .. RUBRIC:: Miscellaneous
608
+
609
+ Use ``rule="miscellaneous"`` for the following embeddings of maximal subgroups,
610
+ all involving exceptional groups.
611
+
612
+ .. MATH::
613
+
614
+ \begin{aligned}
615
+ B_3 & \Rightarrow G_2,
616
+ \\ E_6 & \Rightarrow G_2,
617
+ \\ E_6 & \Rightarrow A_2,
618
+ \\ F_4 & \Rightarrow G_2 \times A_1,
619
+ \\ E_6 & \Rightarrow G_2 \times A_2,
620
+ \\ E_7 & \Rightarrow G_2 \times C_3,
621
+ \\ E_7 & \Rightarrow F_4 \times A_1,
622
+ \\ E_7 & \Rightarrow A_1 \times A_1,
623
+ \\ E_7 & \Rightarrow G_2 \times A_1,
624
+ \\ E_8 & \Rightarrow G_2 \times F_4.
625
+ \\ E_8 & \Rightarrow A2 \times A_1.
626
+ \\ E_8 & \Rightarrow B2.
627
+ \end{aligned}
628
+
629
+ Except for those embeddings available by ``rule="extended"``, these
630
+ are the only embeddings of these groups as maximal subgroups.
631
+ There may be other embeddings besides these. For example,
632
+ there are other more obvious embeddings of `A_2` and `G_2` into `E_6`.
633
+ However the embeddings in this table are characterized as embeddings
634
+ as maximal subgroups. Regarding the embeddings of `A_2` and `G_2` in
635
+ `E_6`, the embeddings in question may be characterized by the condition that the
636
+ 27-dimensional representations of `E_6` restrict irreducibly to `A_2` or
637
+ `G_2`. Since `G_2` has a subgroup isomorphic to `A_2`, it is worth
638
+ mentioning that the composite branching rules::
639
+
640
+ branching_rule("E6","G2","miscellaneous")*branching_rule("G2","A2","extended")
641
+ branching_rule("E6","A2","miscellaneous")
642
+
643
+ are distinct.
644
+
645
+ These embeddings are described more completely (with references
646
+ to the literature) in the thematic tutorial at:
647
+
648
+ https://passagemath.org/docs/latest/html/en/thematic_tutorials/lie.html
649
+
650
+ EXAMPLES::
651
+
652
+ sage: G2 = WeylCharacterRing("G2")
653
+ sage: [fw1, fw2, fw3] = B3.fundamental_weights()
654
+ sage: B3(fw1+fw3).branch(G2, rule='miscellaneous')
655
+ G2(1,0,-1) + G2(2,-1,-1) + G2(2,0,-2)
656
+ sage: E6 = WeylCharacterRing("E6",style='coroots')
657
+ sage: G2 = WeylCharacterRing("G2",style='coroots')
658
+ sage: E6(1,0,0,0,0,0).branch(G2,"miscellaneous")
659
+ G2(2,0)
660
+ sage: A2=WeylCharacterRing("A2",style='coroots')
661
+ sage: E6(1,0,0,0,0,0).branch(A2,rule='miscellaneous')
662
+ A2(2,2)
663
+ sage: E6(0,1,0,0,0,0).branch(A2,rule='miscellaneous')
664
+ A2(1,1) + A2(1,4) + A2(4,1)
665
+ sage: E6(0,0,0,0,0,2).branch(G2,"miscellaneous") # long time (0.59s)
666
+ G2(0,0) + G2(2,0) + G2(1,1) + G2(0,2) + G2(4,0)
667
+ sage: F4=WeylCharacterRing("F4",style='coroots')
668
+ sage: G2xA1=WeylCharacterRing("G2xA1",style='coroots')
669
+ sage: F4(0,0,1,0).branch(G2xA1,rule='miscellaneous')
670
+ G2xA1(1,0,0) + G2xA1(1,0,2) + G2xA1(1,0,4) + G2xA1(1,0,6) + G2xA1(0,1,4) + G2xA1(2,0,2) + G2xA1(0,0,2) + G2xA1(0,0,6)
671
+ sage: E6 = WeylCharacterRing("E6",style='coroots')
672
+ sage: A2xG2 = WeylCharacterRing("A2xG2",style='coroots')
673
+ sage: E6(1,0,0,0,0,0).branch(A2xG2,rule='miscellaneous')
674
+ A2xG2(0,1,1,0) + A2xG2(2,0,0,0)
675
+ sage: E7=WeylCharacterRing("E7",style='coroots')
676
+ sage: G2xC3=WeylCharacterRing("G2xC3",style='coroots')
677
+ sage: E7(0,1,0,0,0,0,0).branch(G2xC3,rule='miscellaneous') # long time (1.84s)
678
+ G2xC3(1,0,1,0,0) + G2xC3(1,0,1,1,0) + G2xC3(0,1,0,0,1) + G2xC3(2,0,1,0,0) + G2xC3(0,0,1,1,0)
679
+ sage: F4xA1=WeylCharacterRing("F4xA1",style='coroots')
680
+ sage: E7(0,0,0,0,0,0,1).branch(F4xA1,"miscellaneous")
681
+ F4xA1(0,0,0,1,1) + F4xA1(0,0,0,0,3)
682
+ sage: A1xA1=WeylCharacterRing("A1xA1",style='coroots')
683
+ sage: E7(0,0,0,0,0,0,1).branch(A1xA1,rule='miscellaneous')
684
+ A1xA1(2,5) + A1xA1(4,1) + A1xA1(6,3)
685
+ sage: A2=WeylCharacterRing("A2",style='coroots')
686
+ sage: E7(0,0,0,0,0,0,1).branch(A2,rule='miscellaneous')
687
+ A2(0,6) + A2(6,0)
688
+ sage: G2xA1=WeylCharacterRing("G2xA1",style='coroots')
689
+ sage: E7(1,0,0,0,0,0,0).branch(G2xA1,rule='miscellaneous')
690
+ G2xA1(1,0,4) + G2xA1(0,1,0) + G2xA1(2,0,2) + G2xA1(0,0,2)
691
+ sage: E8 = WeylCharacterRing("E8",style='coroots')
692
+ sage: G2xF4 = WeylCharacterRing("G2xF4",style='coroots')
693
+ sage: E8(0,0,0,0,0,0,0,1).branch(G2xF4,rule='miscellaneous') # long time (0.76s)
694
+ G2xF4(1,0,0,0,0,1) + G2xF4(0,1,0,0,0,0) + G2xF4(0,0,1,0,0,0)
695
+ sage: E8=WeylCharacterRing("E8",style='coroots')
696
+ sage: A1xA2=WeylCharacterRing("A1xA2",style='coroots')
697
+ sage: E8(0,0,0,0,0,0,0,1).branch(A1xA2,rule='miscellaneous') # long time (0.76s)
698
+ A1xA2(2,0,0) + A1xA2(2,2,2) + A1xA2(4,0,3) + A1xA2(4,3,0) + A1xA2(6,1,1) + A1xA2(0,1,1)
699
+ sage: B2=WeylCharacterRing("B2",style='coroots')
700
+ sage: E8(0,0,0,0,0,0,0,1).branch(B2,rule='miscellaneous') # long time (0.53s)
701
+ B2(0,2) + B2(0,6) + B2(3,2)
702
+
703
+ .. RUBRIC:: A1 maximal subgroups of exceptional groups
704
+
705
+ There are seven cases where the exceptional group `G_2`, `F_4`,
706
+ `E_7` or `E_8` contains a maximal subgroup of type `A_1`.
707
+ These are tabulated in Theorem 1 of Testerman,
708
+ The construction of the maximal A1's in the exceptional algebraic groups,
709
+ Proc. Amer. Math. Soc. 116 (1992), no. 3, 635-644. The
710
+ names of these branching rules are roman numerals referring
711
+ to the seven cases of her Theorem 1. Use these branching
712
+ rules as in the following examples.
713
+
714
+ EXAMPLES::
715
+
716
+ sage: A1=WeylCharacterRing("A1",style='coroots')
717
+ sage: G2=WeylCharacterRing("G2",style='coroots')
718
+ sage: F4=WeylCharacterRing("F4",style='coroots')
719
+ sage: E7=WeylCharacterRing("E7",style='coroots')
720
+ sage: E8=WeylCharacterRing("E8",style='coroots')
721
+ sage: [G2(f).branch(A1,rule='i') for f in G2.fundamental_weights()]
722
+ [A1(6), A1(2) + A1(10)]
723
+ sage: F4(1,0,0,0).branch(A1,rule='ii')
724
+ A1(2) + A1(10) + A1(14) + A1(22)
725
+ sage: E7(0,0,0,0,0,0,1).branch(A1,rule='iii')
726
+ A1(9) + A1(17) + A1(27)
727
+ sage: E7(0,0,0,0,0,0,1).branch(A1,rule='iv')
728
+ A1(5) + A1(11) + A1(15) + A1(21)
729
+ sage: E8(0,0,0,0,0,0,0,1).branch(A1,rule='v') # long time (0.6s)
730
+ A1(2) + A1(14) + A1(22) + A1(26) + A1(34) + A1(38) + A1(46) + A1(58)
731
+ sage: E8(0,0,0,0,0,0,0,1).branch(A1,rule='vi') # long time (0.6s)
732
+ A1(2) + A1(10) + A1(14) + A1(18) + A1(22) + A1(26) + A1(28) + A1(34) + A1(38) + A1(46)
733
+ sage: E8(0,0,0,0,0,0,0,1).branch(A1,rule='vii') # long time (0.6s)
734
+ A1(2) + A1(6) + A1(10) + A1(14) + A1(16) + A1(18) + 2*A1(22) + A1(26) + A1(28) + A1(34) + A1(38)
735
+
736
+ .. RUBRIC:: Branching Rules From Plethysms
737
+
738
+ Nearly all branching rules `G \Rightarrow H` where `G` is of type `A`, `B`, `C`
739
+ or `D` are covered by the preceding rules. The function
740
+ :func:`branching_rule_from_plethysm` covers the remaining cases.
741
+
742
+ This is a general rule that includes any branching rule
743
+ from types `A`, `B`, `C`, or `D` as a special case. Thus it could be
744
+ used in place of the above rules and would give the same
745
+ results. However it is most useful when branching from `G`
746
+ to a maximal subgroup `H` such that
747
+ `\mathrm{rank}(H) < \mathrm{rank}(G) - 1`.
748
+
749
+ We consider a homomorphism `H \Rightarrow G` where `G` is one of
750
+ `SL(r+1)`, `SO(2r+1)`, `Sp(2r)` or `SO(2r)`. The function
751
+ :func:`branching_rule_from_plethysm` produces the corresponding
752
+ branching rule. The main ingredient is the character
753
+ `\chi` of the representation of `H` that is the homomorphism
754
+ to `GL(r+1)`, `GL(2r+1)` or `GL(2r)`.
755
+
756
+ This rule is so powerful that it contains the other
757
+ rules implemented above as special cases. First let
758
+ us consider the symmetric fifth power representation
759
+ of `SL(2)`.
760
+
761
+ ::
762
+
763
+ sage: A1=WeylCharacterRing("A1",style='coroots')
764
+ sage: chi=A1([5])
765
+ sage: chi.degree()
766
+ 6
767
+ sage: chi.frobenius_schur_indicator()
768
+ -1
769
+
770
+ This confirms that the character has degree 6 and
771
+ is symplectic, so it corresponds to a homomorphism
772
+ `SL(2) \Rightarrow Sp(6)`, and there is a corresponding
773
+ branching rule `C_3 \Rightarrow A_1`.
774
+
775
+ ::
776
+
777
+ sage: C3 = WeylCharacterRing("C3",style='coroots')
778
+ sage: sym5rule = branching_rule_from_plethysm(chi,"C3")
779
+ sage: [C3(hwv).branch(A1,rule=sym5rule) for hwv in C3.fundamental_weights()]
780
+ [A1(5), A1(4) + A1(8), A1(3) + A1(9)]
781
+
782
+ This is identical to the results we would obtain using
783
+ ``rule="symmetric_power"``. The next example gives a branching
784
+ not available by other standard rules.
785
+
786
+ ::
787
+
788
+ sage: G2 = WeylCharacterRing("G2",style='coroots')
789
+ sage: D7 = WeylCharacterRing("D7",style='coroots')
790
+ sage: ad=G2(0,1); ad.degree(); ad.frobenius_schur_indicator()
791
+ 14
792
+ 1
793
+ sage: spin = D7(0,0,0,0,0,1,0); spin.degree()
794
+ 64
795
+ sage: spin.branch(G2, rule=branching_rule_from_plethysm(ad, "D7"))
796
+ G2(1,1)
797
+
798
+ We have confirmed that the adjoint representation of `G_2`
799
+ gives a homomorphism into `SO(14)`, and that the pullback
800
+ of the one of the two 64 dimensional spin representations
801
+ to `SO(14)` is an irreducible representation of `G_2`.
802
+
803
+ We do not actually have to create the character or
804
+ its parent WeylCharacterRing to create the
805
+ branching rule::
806
+
807
+ sage: b = branching_rule("C7","C3(0,0,1)","plethysm"); b
808
+ plethysm (along C3(0,0,1)) branching rule C7 => C3
809
+
810
+ .. RUBRIC:: Isomorphic Type
811
+
812
+ Although not usually referred to as a branching
813
+ rule, the effects of the accidental isomorphisms may be handled
814
+ using ``rule="isomorphic"``:
815
+
816
+ .. MATH::
817
+
818
+ \begin{aligned}
819
+ B_2 & \Rightarrow C_2
820
+ \\ C_2 & \Rightarrow B_2
821
+ \\ A_3 & \Rightarrow D_3
822
+ \\ D_3 & \Rightarrow A_3
823
+ \\ D_2 & \Rightarrow A_1 \Rightarrow A_1
824
+ \\ B_1 & \Rightarrow A_1
825
+ \\ C_1 & \Rightarrow A_1
826
+ \end{aligned}
827
+
828
+ EXAMPLES::
829
+
830
+ sage: B2 = WeylCharacterRing("B2")
831
+ sage: C2 = WeylCharacterRing("C2")
832
+ sage: [B2(x).branch(C2, rule='isomorphic') for x in B2.fundamental_weights()]
833
+ [C2(1,1), C2(1,0)]
834
+ sage: [C2(x).branch(B2, rule='isomorphic') for x in C2.fundamental_weights()]
835
+ [B2(1/2,1/2), B2(1,0)]
836
+ sage: D3 = WeylCharacterRing("D3")
837
+ sage: A3 = WeylCharacterRing("A3")
838
+ sage: [A3(x).branch(D3,rule='isomorphic') for x in A3.fundamental_weights()]
839
+ [D3(1/2,1/2,1/2), D3(1,0,0), D3(1/2,1/2,-1/2)]
840
+ sage: [D3(x).branch(A3,rule='isomorphic') for x in D3.fundamental_weights()]
841
+ [A3(1/2,1/2,-1/2,-1/2), A3(1/4,1/4,1/4,-3/4), A3(3/4,-1/4,-1/4,-1/4)]
842
+
843
+ Here `A_3(x,y,z,w)` can be understood as a representation of `SL(4)`.
844
+ The weights `x,y,z,w` and `x+t,y+t,z+t,w+t` represent the same
845
+ representation of `SL(4)` - though not of `GL(4)` - since
846
+ `A_3(x+t,y+t,z+t,w+t)` is the same as `A_3(x,y,z,w)` tensored with
847
+ `\mathrm{det}^t`. So as a representation of `SL(4)`,
848
+ ``A3(1/4,1/4,1/4,-3/4)`` is the same as ``A3(1,1,1,0)``. The exterior
849
+ square representation `SL(4) \Rightarrow GL(6)` admits an invariant symmetric
850
+ bilinear form, so is a representation `SL(4) \Rightarrow SO(6)` that lifts to
851
+ an isomorphism `SL(4) \Rightarrow \mathrm{Spin}(6)`. Conversely, there are two
852
+ isomorphisms `SO(6) \Rightarrow SL(4)`, of which we've selected one.
853
+
854
+ In cases like this you might prefer ``style="coroots"``::
855
+
856
+ sage: A3 = WeylCharacterRing("A3",style='coroots')
857
+ sage: D3 = WeylCharacterRing("D3",style='coroots')
858
+ sage: [D3(fw) for fw in D3.fundamental_weights()]
859
+ [D3(1,0,0), D3(0,1,0), D3(0,0,1)]
860
+ sage: [D3(fw).branch(A3,rule='isomorphic') for fw in D3.fundamental_weights()]
861
+ [A3(0,1,0), A3(0,0,1), A3(1,0,0)]
862
+ sage: D2 = WeylCharacterRing("D2", style='coroots')
863
+ sage: A1xA1 = WeylCharacterRing("A1xA1", style='coroots')
864
+ sage: [D2(fw).branch(A1xA1,rule='isomorphic') for fw in D2.fundamental_weights()]
865
+ [A1xA1(1,0), A1xA1(0,1)]
866
+
867
+ .. RUBRIC:: Branching From a Reducible WeylCharacterRing
868
+
869
+ If the Cartan Type of R is reducible, we may project a character onto
870
+ any of the components, or any combination of components. The rule to
871
+ project on the first component is specified by the string ``'proj1'``,
872
+ the rule to project on the second component is ``"proj2". To
873
+ project on the first and third components, use ``'proj13'`` and so on.
874
+
875
+ EXAMPLES::
876
+
877
+ sage: A2xG2=WeylCharacterRing("A2xG2",style='coroots')
878
+ sage: A2=WeylCharacterRing("A2",style='coroots')
879
+ sage: G2=WeylCharacterRing("G2",style='coroots')
880
+ sage: A2xG2(1,0,1,0).branch(A2,rule='proj1')
881
+ 7*A2(1,0)
882
+ sage: A2xG2(1,0,1,0).branch(G2,rule='proj2')
883
+ 3*G2(1,0)
884
+ sage: A2xA2xG2=WeylCharacterRing("A2xA2xG2",style='coroots')
885
+ sage: A2xA2xG2(0,1,1,1,0,1).branch(A2xG2,rule='proj13')
886
+ 8*A2xG2(0,1,0,1)
887
+
888
+ A more general way of specifying a branching rule from a reducible type is
889
+ to supply a *list* of rules, one *component rule* for each
890
+ component type in the root system. In the following example, we branch the
891
+ fundamental representations of `D_4` down to `A_1\times A_1\times A_1
892
+ \times A_1` through the intermediate group `D_2\times D_2`. We use
893
+ multiplicative notation to compose the branching rules. There is no need
894
+ to construct the intermediate WeylCharacterRing with type `D_2\times D_2`.
895
+
896
+ EXAMPLES::
897
+
898
+ sage: D4 = WeylCharacterRing("D4",style='coroots')
899
+ sage: A1xA1xA1xA1 = WeylCharacterRing("A1xA1xA1xA1",style='coroots')
900
+ sage: b = branching_rule("D2","A1xA1","isomorphic")
901
+ sage: br = branching_rule("D4","D2xD2","extended")*branching_rule("D2xD2","A1xA1xA1xA1",[b,b])
902
+ sage: [D4(fw).branch(A1xA1xA1xA1,rule=br) for fw in D4.fundamental_weights()]
903
+ [A1xA1xA1xA1(1,1,0,0) + A1xA1xA1xA1(0,0,1,1),
904
+ A1xA1xA1xA1(1,1,1,1) + A1xA1xA1xA1(2,0,0,0) + A1xA1xA1xA1(0,2,0,0) + A1xA1xA1xA1(0,0,2,0) + A1xA1xA1xA1(0,0,0,2),
905
+ A1xA1xA1xA1(1,0,0,1) + A1xA1xA1xA1(0,1,1,0),
906
+ A1xA1xA1xA1(1,0,1,0) + A1xA1xA1xA1(0,1,0,1)]
907
+
908
+ In the list of rules to be supplied in branching from a reducible root
909
+ system, we may use two key words "omit" and "identity". The term "omit"
910
+ means that we omit one factor, projecting onto the remaining factors.
911
+ The term "identity" is supplied when the irreducible factor Cartan Types
912
+ of both the target and the source are the same, and the component
913
+ branching rule is to be the identity map. For example, we have
914
+ projection maps from `A_3\times A_2` to `A_3` and `A_2`, and
915
+ the corresponding branching may be accomplished as follows. In
916
+ this example the same could be accomplished using ``rule="proj2"``.
917
+
918
+ EXAMPLES::
919
+
920
+ sage: A3xA2=WeylCharacterRing("A3xA2",style='coroots')
921
+ sage: A3=WeylCharacterRing("A3",style='coroots')
922
+ sage: chi = A3xA2(0,1,0,1,0)
923
+ sage: chi.branch(A3,rule=["identity","omit"])
924
+ 3*A3(0,1,0)
925
+ sage: A2=WeylCharacterRing("A2",style='coroots')
926
+ sage: chi.branch(A2,rule=["omit","identity"])
927
+ 6*A2(1,0)
928
+
929
+ Yet another way of branching from a reducible root system with
930
+ repeated Cartan types is to embed along the diagonal. The
931
+ branching rule is equivalent to the tensor product, as
932
+ the example shows::
933
+
934
+ sage: G2=WeylCharacterRing("G2",style='coroots')
935
+ sage: G2xG2=WeylCharacterRing("G2xG2",style='coroots')
936
+ sage: G2=WeylCharacterRing("G2",style='coroots')
937
+ sage: G2xG2(1,0,0,1).branch(G2,rule='diagonal')
938
+ G2(1,0) + G2(2,0) + G2(1,1)
939
+ sage: G2xG2(1,0,0,1).branch(G2,rule='diagonal') == G2(1,0)*G2(0,1)
940
+ True
941
+
942
+ .. RUBRIC:: Writing Your Own (Branching) Rules
943
+
944
+ Suppose you want to branch from a group `G` to a subgroup `H`.
945
+ Arrange the embedding so that a Cartan subalgebra `U` of `H` is
946
+ contained in a Cartan subalgebra `T` of `G`. There is thus
947
+ a mapping from the weight spaces `\mathrm{Lie}(T)^* \Rightarrow \mathrm{Lie}(U)^*`.
948
+ Two embeddings will produce identical branching rules if they
949
+ differ by an element of the Weyl group of `H`.
950
+
951
+ The *rule* is this map `\mathrm{Lie}(T)^*`, which is ``G.space()``, to
952
+ `\mathrm{Lie}(U)^*`, which is ``H.space()``,
953
+ which you may implement as a function. As an example, let
954
+ us consider how to implement the branching rule `A_3 \Rightarrow C_2`.
955
+ Here `H = C_2 = Sp(4)` embedded as a subgroup in `A_3 = GL(4)`. The
956
+ Cartan subalgebra `U` consists of diagonal matrices with
957
+ eigenvalues `u_1, u_2, -u_2, -u_1`. The ``C2.space()`` is the
958
+ two dimensional vector spaces consisting of the linear
959
+ functionals `u_1` and `u_2` on `U`. On the other hand `\mathrm{Lie}(T)` is
960
+ `\RR^4`. A convenient way to see the restriction is to
961
+ think of it as the adjoint of the map `(u_1, u_2) \mapsto
962
+ (u_1,u_2, -u_2, -u_1)`,
963
+ that is, `(x_0, x_1, x_2, x_3) \Rightarrow (x_0 - x_3, x_1 - x_2)`. Hence we may
964
+ encode the rule as follows::
965
+
966
+ def rule(x):
967
+ return [x[0]-x[3],x[1]-x[2]]
968
+
969
+ or simply::
970
+
971
+ rule = lambda x: [x[0]-x[3],x[1]-x[2]]
972
+
973
+ We may now make and use the branching rule as follows.
974
+
975
+ EXAMPLES::
976
+
977
+ sage: br = BranchingRule("A3", "C2", lambda x: [x[0]-x[3],x[1]-x[2]], "homemade"); br
978
+ homemade branching rule A3 => C2
979
+ sage: [A3,C2]=[WeylCharacterRing(x,style='coroots') for x in ["A3","C2"]]
980
+ sage: A3(0,1,0).branch(C2,rule=br)
981
+ C2(0,0) + C2(0,1)
982
+ """
983
+ if isinstance(rule, (str, list)):
984
+ rule = branching_rule(R._cartan_type, S._cartan_type, rule)
985
+ if hasattr(rule, "_S"):
986
+ if rule._S != S.cartan_type():
987
+ raise ValueError("rule has wrong target Cartan type")
988
+ mdict = {}
989
+ for k in chi.weight_multiplicities():
990
+ # TODO: Could this use the new from_vector of ambient_space ?
991
+ if S._style == "coroots":
992
+ if S._cartan_type.is_atomic() and S._cartan_type[0] == 'E':
993
+ if S._cartan_type[1] == 6:
994
+ h = S._space(rule(list(k.to_vector()))).coerce_to_e6()
995
+ elif S._cartan_type[1] == 7:
996
+ h = S._space(rule(list(k.to_vector()))).coerce_to_e7()
997
+ else:
998
+ h = (S._space(rule(list(k.to_vector())))).coerce_to_sl()
999
+ else:
1000
+ h = S._space(rule(list(k.to_vector())))
1001
+ chi_mdict = chi.weight_multiplicities()
1002
+ if h in mdict:
1003
+ mdict[h] += chi_mdict[k]
1004
+ else:
1005
+ mdict[h] = chi_mdict[k]
1006
+ return S.char_from_weights(mdict)
1007
+
1008
+
1009
+ class BranchingRule(SageObject):
1010
+ """
1011
+ A class for branching rules.
1012
+ """
1013
+
1014
+ def __init__(self, R, S, f, name='default', intermediate_types=[],
1015
+ intermediate_names=[]):
1016
+ """
1017
+ INPUT:
1018
+
1019
+ - ``R``, ``S`` -- CartanTypes
1020
+ - ``f`` -- a function from the weight lattice of R to the weight lattice of S
1021
+ """
1022
+ self._R = CartanType(R)
1023
+ self._S = CartanType(S)
1024
+ self._f = f
1025
+ self._intermediate_types = intermediate_types
1026
+ if intermediate_names:
1027
+ self._intermediate_names = intermediate_names
1028
+ else:
1029
+ self._intermediate_names = [name]
1030
+ self._name = name
1031
+
1032
+ def _repr_(self):
1033
+ """
1034
+ EXAMPLES::
1035
+
1036
+ sage: branching_rule("E6","F4","symmetric")
1037
+ symmetric branching rule E6 => F4
1038
+ sage: b=branching_rule("F4","B3",rule='levi')*branching_rule("B3","G2",rule='miscellaneous'); b
1039
+ composite branching rule F4 => (levi) B3 => (miscellaneous) G2
1040
+ """
1041
+ R_repr = self._R._repr_(compact=True)
1042
+ S_repr = self._S._repr_(compact=True)
1043
+ if self._name == "composite":
1044
+ ret = "composite branching rule %s => " % R_repr
1045
+ for i in range(len(self._intermediate_types)):
1046
+ intt = self._intermediate_types[i]
1047
+ intn = self._intermediate_names[i]
1048
+ ret += "(%s) %s => " % (intn, intt._repr_(compact=True))
1049
+ ret += "(%s) %s" % (self._intermediate_names[-1], S_repr)
1050
+ return ret
1051
+
1052
+ return "%s branching rule %s => %s" % (self._name, R_repr, S_repr)
1053
+
1054
+ def __call__(self, x):
1055
+ """
1056
+ EXAMPLES::
1057
+
1058
+ sage: b=branching_rule("A3","C2","symmetric")
1059
+ sage: b([2,1,0,0])
1060
+ [2, 1]
1061
+ """
1062
+ try:
1063
+ return self._f(x)
1064
+ except Exception:
1065
+ return self._f(x.to_vector())
1066
+
1067
+ def __eq__(self, other):
1068
+ """
1069
+ Two branching rules with the same source and target Cartan types are
1070
+ considered equal if they are the same as mappings from the weight
1071
+ lattice of the larger group to the smaller. The last example shows
1072
+ that two rules may be different by this criterion yet describe the
1073
+ same branching, if they differ by conjugation by an element of the
1074
+ Weyl group.
1075
+
1076
+ EXAMPLES::
1077
+
1078
+ sage: b = branching_rule("E6","F4","symmetric")*branching_rule("F4","B3","levi")*branching_rule("B3","G2","miscellaneous"); b
1079
+ composite branching rule E6 => (symmetric) F4 => (levi) B3 => (miscellaneous) G2
1080
+ sage: c = branching_rule("E6", "G2xA2", "miscellaneous")*branching_rule("G2xA2", "G2", "proj1"); c
1081
+ composite branching rule E6 => (miscellaneous) G2xA2 => (proj1) G2
1082
+ sage: b == c
1083
+ True
1084
+ sage: d = branching_rule("A3","A2","levi")*branching_rule("A2","A1","levi"); d
1085
+ composite branching rule A3 => (levi) A2 => (levi) A1
1086
+ sage: e = branching_rule("A3","D3","isomorphic")*branching_rule("D3","B2","symmetric")*branching_rule("B2","A1","levi"); e
1087
+ composite branching rule A3 => (isomorphic) D3 => (symmetric) B2 => (levi) A1
1088
+ sage: d == e
1089
+ False
1090
+ sage: b1 = BranchingRule("A2","A2",lambda x: [x[2], x[1], x[0]], "long Weyl element conjugation")
1091
+ sage: b2 = BranchingRule("A2","A2",lambda x: x, "identity map")
1092
+ sage: b1 == b2
1093
+ False
1094
+ sage: A2 = WeylCharacterRing("A2",style='coroots')
1095
+ sage: [A2(f).branch(A2,rule=b1) == A2(f).branch(A2,rule=b2) for f in A2.fundamental_weights()]
1096
+ [True, True]
1097
+ """
1098
+ if not isinstance(other, BranchingRule):
1099
+ return False
1100
+
1101
+ Rspace = RootSystem(self._R).ambient_space()
1102
+ Rspace_other = RootSystem(other._R).ambient_space()
1103
+ if Rspace != Rspace_other:
1104
+ return False
1105
+
1106
+ Sspace = RootSystem(self._S).ambient_space()
1107
+ Sspace_other = RootSystem(other._S).ambient_space()
1108
+ if Sspace != Sspace_other:
1109
+ return False
1110
+
1111
+ for v in Rspace.fundamental_weights():
1112
+ w = list(v.to_vector())
1113
+ if Sspace(self(w)) != Sspace(other(w)):
1114
+ return False
1115
+ return True
1116
+
1117
+ def __ne__(self, other):
1118
+ """
1119
+ Test inequality.
1120
+
1121
+ EXAMPLES::
1122
+
1123
+ sage: b1 = BranchingRule("A2","A2",lambda x: [x[2], x[1], x[0]], "long Weyl element conjugation")
1124
+ sage: b2 = BranchingRule("A2","A2",lambda x: x, "identity map")
1125
+ sage: b1 != b2
1126
+ True
1127
+ """
1128
+ return not (self == other)
1129
+
1130
+ def __mul__(self, other):
1131
+ """
1132
+ EXAMPLES::
1133
+
1134
+ sage: E6 = WeylCharacterRing("E6",style='coroots')
1135
+ sage: A5 = WeylCharacterRing("A5",style='coroots')
1136
+ sage: br = branching_rule("E6","A5xA1",rule='extended')*branching_rule("A5xA1","A5",rule='proj1'); br
1137
+ composite branching rule E6 => (extended) A5xA1 => (proj1) A5
1138
+ sage: E6(1,0,0,0,0,0).branch(A5,rule=br)
1139
+ A5(0,0,0,1,0) + 2*A5(1,0,0,0,0)
1140
+ """
1141
+ if self._S == other._R:
1142
+ intermediates = flatten([self._intermediate_types, self._S,
1143
+ other._intermediate_types])
1144
+ internames = flatten([self._intermediate_names,
1145
+ other._intermediate_names])
1146
+
1147
+ def f(x):
1148
+ return other._f(self._f(x))
1149
+ return BranchingRule(self._R, other._S, f, "composite",
1150
+ intermediate_types=intermediates,
1151
+ intermediate_names=internames)
1152
+ else:
1153
+ raise ValueError("unable to define composite: source and target don't agree")
1154
+
1155
+ def Rtype(self):
1156
+ """
1157
+ In a branching rule R => S, returns the Cartan Type of the ambient group R.
1158
+
1159
+ EXAMPLES::
1160
+
1161
+ sage: branching_rule("A3","A2","levi").Rtype()
1162
+ ['A', 3]
1163
+ """
1164
+ return self._R
1165
+
1166
+ def Stype(self):
1167
+ """
1168
+ In a branching rule R => S, returns the Cartan Type of the subgroup S.
1169
+
1170
+ EXAMPLES::
1171
+
1172
+ sage: branching_rule("A3","A2","levi").Stype()
1173
+ ['A', 2]
1174
+ """
1175
+ return self._S
1176
+
1177
+ def describe(self, verbose=False, debug=False, no_r=False):
1178
+ r"""
1179
+ Describe how extended roots restrict under ``self``.
1180
+
1181
+ EXAMPLES::
1182
+
1183
+ sage: branching_rule("G2","A2","extended").describe()
1184
+ <BLANKLINE>
1185
+ 3
1186
+ O=<=O---O
1187
+ 1 2 0
1188
+ G2~
1189
+ <BLANKLINE>
1190
+ root restrictions G2 => A2:
1191
+ <BLANKLINE>
1192
+ O---O
1193
+ 1 2
1194
+ A2
1195
+ <BLANKLINE>
1196
+ 0 => 2
1197
+ 2 => 1
1198
+ <BLANKLINE>
1199
+ For more detailed information use verbose=True
1200
+
1201
+ In this example, `0` is the affine root, that is, the negative
1202
+ of the highest root, for `"G2"`. If `i \geq j` is printed, this
1203
+ means that the `i`-th simple (or affine) root of the ambient
1204
+ group restricts to the `j`-th simple root of the subgroup.
1205
+ For reference the Dynkin diagrams are also printed. The
1206
+ extended Dynkin diagram of the ambient group is printed if
1207
+ the affine root restricts to a simple root. More information
1208
+ is printed if the parameter `verbose` is true.
1209
+ """
1210
+ Rspace = RootSystem(self._R).ambient_space()
1211
+ Sspace = RootSystem(self._S).ambient_space()
1212
+ if self._R.is_compound():
1213
+ raise ValueError("Cannot describe branching rule from reducible type")
1214
+ if not no_r:
1215
+ print("\n%r" % self._R.affine().dynkin_diagram())
1216
+ if self._S.is_compound():
1217
+ for j in range(len(self._S.component_types())):
1218
+ ctype = self._S.component_types()[j]
1219
+ component_rule = self*branching_rule(self._S, ctype,
1220
+ "proj%s" % (j + 1))
1221
+ print("\nprojection %d on %s " % (j + 1,
1222
+ ctype._repr_(compact=True)),
1223
+ component_rule.describe(verbose=verbose, no_r=True))
1224
+ if not verbose:
1225
+ print("\nfor more detailed information use verbose=True")
1226
+ else:
1227
+ print("root restrictions %s => %s:" % (self._R._repr_(compact=True),
1228
+ self._S._repr_(compact=True)))
1229
+ print("\n%r\n" % self._S.dynkin_diagram())
1230
+ for j in self._R.affine().index_set():
1231
+ if j == 0:
1232
+ r = -Rspace.highest_root()
1233
+ else:
1234
+ r = Rspace.simple_roots()[j]
1235
+ resr = Sspace(self(list(r.to_vector())))
1236
+ if debug:
1237
+ print("root %d: r = %s, b(r)=%s" % (j, r, resr))
1238
+ done = False
1239
+ if resr == Sspace.zero():
1240
+ done = True
1241
+ print("%s => (zero)" % j)
1242
+ else:
1243
+ for s in Sspace.roots():
1244
+ if s == resr:
1245
+ for i in self._S.index_set():
1246
+ if s == Sspace.simple_root(i):
1247
+ print("%s => %s" % (j, i))
1248
+ done = True
1249
+ break
1250
+ if not done:
1251
+ done = True
1252
+ if verbose:
1253
+ print("%s => root %s" % (j, s))
1254
+ if not done:
1255
+ done = True
1256
+ if verbose:
1257
+ print("%s => weight %s" % (j, resr))
1258
+ if verbose:
1259
+ print("\nfundamental weight restrictions %s => %s:" % (self._R._repr_(compact=True),self._S._repr_(compact=True)))
1260
+ for j in self._R.index_set():
1261
+ resfw = Sspace(self(list(Rspace.fundamental_weight(j).to_vector())))
1262
+ print("%d => %s" % (j,
1263
+ tuple([resfw.inner_product(a)
1264
+ for a in Sspace.simple_coroots()])))
1265
+ if not no_r and not verbose:
1266
+ print("\nFor more detailed information use verbose=True")
1267
+
1268
+ def branch(self, chi, style=None):
1269
+ """
1270
+ INPUT:
1271
+
1272
+ - ``chi`` -- a character of the WeylCharacterRing with Cartan type self.Rtype()
1273
+
1274
+ Returns the branched character.
1275
+
1276
+ EXAMPLES::
1277
+
1278
+ sage: G2=WeylCharacterRing("G2",style='coroots')
1279
+ sage: chi=G2(1,1); chi.degree()
1280
+ 64
1281
+ sage: b=G2.maximal_subgroup("A2"); b
1282
+ extended branching rule G2 => A2
1283
+ sage: b.branch(chi)
1284
+ A2(0,1) + A2(1,0) + A2(0,2) + 2*A2(1,1) + A2(2,0) + A2(1,2) + A2(2,1)
1285
+ sage: A2=WeylCharacterRing("A2",style='coroots'); A2
1286
+ The Weyl Character Ring of Type A2 with Integer Ring coefficients
1287
+ sage: chi.branch(A2,rule=b)
1288
+ A2(0,1) + A2(1,0) + A2(0,2) + 2*A2(1,1) + A2(2,0) + A2(1,2) + A2(2,1)
1289
+ """
1290
+ from sage.combinat.root_system.weyl_characters import WeylCharacterRing
1291
+ if style is None:
1292
+ style = chi.parent()._style
1293
+ S = WeylCharacterRing(self.Stype(), style=style)
1294
+ return chi.branch(S, rule=self)
1295
+
1296
+
1297
+ def branching_rule(Rtype, Stype, rule='default'):
1298
+ """
1299
+ Create a branching rule.
1300
+
1301
+ INPUT:
1302
+
1303
+ - ``R`` -- the Weyl Character Ring of `G`
1304
+
1305
+ - ``S`` -- the Weyl Character Ring of `H`
1306
+
1307
+ - ``rule`` -- string describing the branching rule as a map from
1308
+ the weight space of `S` to the weight space of `R`
1309
+
1310
+ If the rule parameter is omitted, in some cases, a default rule is supplied. See
1311
+ :func:`~sage.combinat.root_system.branching_rules.branch_weyl_character`.
1312
+
1313
+ EXAMPLES::
1314
+
1315
+ sage: rule = branching_rule(CartanType("A3"),CartanType("C2"),"symmetric")
1316
+ sage: [rule(x) for x in WeylCharacterRing("A3").fundamental_weights()]
1317
+ [[1, 0], [1, 1], [1, 0]]
1318
+ """
1319
+ if rule == "plethysm":
1320
+ try:
1321
+ S = sage.combinat.root_system.weyl_characters.WeylCharacterRing(Stype.split("(")[0], style='coroots')
1322
+ chi = S(eval("("+Stype.split("(")[1]))
1323
+ except Exception:
1324
+ S = sage.combinat.root_system.weyl_characters.WeylCharacterRing(Stype.split(".")[0], style='coroots')
1325
+ chi = eval("S." + Stype.split(".")[1])
1326
+ return branching_rule_from_plethysm(chi, Rtype)
1327
+ Rtype = CartanType(Rtype)
1328
+ Stype = CartanType(Stype)
1329
+ r = Rtype.rank()
1330
+ s = Stype.rank()
1331
+ rdim = Rtype.root_system().ambient_space().dimension()
1332
+ sdim = Stype.root_system().ambient_space().dimension()
1333
+ if Rtype.is_compound():
1334
+ Rtypes = Rtype.component_types()
1335
+ if isinstance(rule, str):
1336
+ if rule[:4] == "proj":
1337
+ name = rule
1338
+ proj = [int(j)-1 for j in rule[4:]]
1339
+ rule = []
1340
+ for j in range(len(Rtypes)):
1341
+ if j in proj:
1342
+ rule.append("identity")
1343
+ else:
1344
+ rule.append("omit")
1345
+ elif rule == "diagonal":
1346
+ if not Stype.is_compound():
1347
+ k = len(Rtypes)
1348
+ n = RootSystem(Stype).ambient_space().dimension()
1349
+ return BranchingRule(Rtype, Stype, lambda x: [sum(x[i+n*j] for j in range(k)) for i in range(n)], "diagonal")
1350
+ raise ValueError("invalid Cartan types for diagonal branching rule")
1351
+ else:
1352
+ raise ValueError("Rule not found")
1353
+ else:
1354
+ name = repr(rule)
1355
+ rules = []
1356
+ stor = []
1357
+ for i in range(len(Rtypes)):
1358
+ l = rule[i]
1359
+ if l != "omit":
1360
+ if l == "identity":
1361
+ rules.append(BranchingRule(Rtypes[i], Rtypes[i], lambda x: x, "identity"))
1362
+ else:
1363
+ rules.append(l)
1364
+ stor.append(i)
1365
+ shifts = Rtype._shifts
1366
+ Stypes = [CartanType(ru._S) for ru in rules]
1367
+ ntypes = len(Stypes)
1368
+ if Stype.is_compound():
1369
+ def br(x):
1370
+ yl = []
1371
+ for i in range(ntypes):
1372
+ yl.append(rules[i](x[shifts[stor[i]]:shifts[stor[i]+1]]))
1373
+ return flatten(yl)
1374
+ else:
1375
+ j = stor[0]
1376
+ rulej = rules[0]
1377
+
1378
+ def br(x):
1379
+ return rulej(x[shifts[j]:shifts[j+1]])
1380
+ return BranchingRule(Rtype, Stype, br, name)
1381
+ if Stype.is_compound():
1382
+ stypes = Stype.component_types()
1383
+ if rule == "default":
1384
+ if not Rtype.is_compound():
1385
+ if Stype.is_compound() and s == r-1:
1386
+ try:
1387
+ return branching_rule(Rtype, Stype, rule='levi')
1388
+ except Exception:
1389
+ pass
1390
+ if Rtype[0] == "A":
1391
+ if Stype[0] == "B" and r == 2*s:
1392
+ return branching_rule(Rtype, Stype, rule='symmetric')
1393
+ elif Stype[0] == "C" and r == 2*s-1:
1394
+ return branching_rule(Rtype, Stype, rule='symmetric')
1395
+ elif Stype[0] == "D" and r == 2*s-1:
1396
+ return branching_rule(Rtype, Stype, rule='symmetric')
1397
+ elif Rtype[0] == "B" and Stype[0] == "D" and r == s:
1398
+ return branching_rule(Rtype, Stype, rule='extended')
1399
+ elif Rtype[0] == "D" and Stype[0] == "B" and r == s+1:
1400
+ return branching_rule(Rtype, Stype, rule='symmetric')
1401
+
1402
+ if s == r-1:
1403
+ try:
1404
+ return branching_rule(Rtype, Stype, rule='levi')
1405
+ except Exception:
1406
+ pass
1407
+ raise ValueError("No default rule found (you must specify the rule)")
1408
+ elif rule == "identity":
1409
+ if Rtype is not Stype:
1410
+ raise ValueError("Cartan types must match for identity rule")
1411
+ return BranchingRule(Rtype, Stype, lambda x: x, "identity")
1412
+ elif rule == "levi":
1413
+ if not s == r-1:
1414
+ raise ValueError("Incompatible ranks")
1415
+ if Rtype[0] == 'A':
1416
+ if Stype.is_compound():
1417
+ if all(ct[0] == 'A' for ct in stypes) and rdim == sdim:
1418
+ return BranchingRule(Rtype, Stype, lambda x: x, "levi")
1419
+ else:
1420
+ raise ValueError("Rule not found")
1421
+ elif Stype[0] == 'A':
1422
+ return BranchingRule(Rtype, Stype, lambda x: list(x)[:r], "levi")
1423
+ else:
1424
+ raise ValueError("Rule not found")
1425
+ elif Rtype[0] in ['B', 'C', 'D']:
1426
+ if Stype.is_atomic():
1427
+ if Stype[0] == 'A':
1428
+ return BranchingRule(Rtype, Stype, lambda x: x, "levi")
1429
+ elif Stype[0] == Rtype[0]:
1430
+ return BranchingRule(Rtype, Stype, lambda x: list(x)[1:], "levi")
1431
+ elif stypes[-1][0] == Rtype[0] and all(t[0] == 'A' for t in stypes[:-1]):
1432
+ return BranchingRule(Rtype, Stype, lambda x: x, "levi")
1433
+ else:
1434
+ raise ValueError("Rule not found")
1435
+ elif Rtype == CartanType("E6"):
1436
+ if Stype == CartanType("D5"):
1437
+ return BranchingRule(Rtype, Stype, lambda x: [-x[4],-x[3],-x[2],-x[1],-x[0]], "levi")
1438
+ elif Stype == CartanType("A5"): # non-maximal levi
1439
+ return branching_rule("E6","A5xA1","extended")*branching_rule("A5xA1","A5","proj1")
1440
+ elif Stype.is_compound():
1441
+ if Stype[0] == CartanType("A4") and Stype[1] == CartanType("A1"): # non-maximal levi
1442
+ return branching_rule("E6","A5xA1","extended")*branching_rule("A5xA1","A4xA1",[branching_rule("A5","A4","levi"),"identity"])
1443
+ if Stype[0] == CartanType("A1") and Stype[1] == CartanType("A4"): # non-maximal levi
1444
+ return branching_rule("E6","A1xA5","extended")*branching_rule("A1xA5","A1xA4",["identity",branching_rule("A5","A4","levi")])
1445
+ elif Stype[0] == CartanType("A2") and Stype[1] == CartanType("A2") and Stype[2] == CartanType("A1"): # non-maximal levi
1446
+ return branching_rule("E6","A2xA2xA2","extended")*branching_rule("A2xA2xA2","A2xA2xA2",["identity","identity",branching_rule("A2","A2","automorphic")*branching_rule("A2","A1","levi")])
1447
+ elif Stype[0] == CartanType("A2") and Stype[1] == CartanType("A1") and Stype[2] == CartanType("A2"): # non-maximal levi
1448
+ raise ValueError("Not implemented: use A2xA2xA1 levi or A2xA2xA2 extended rule. (Non-maximal Levi.)")
1449
+ elif Stype[0] == CartanType("A1") and Stype[1] == CartanType("A2") and Stype[2] == CartanType("A2"): # non-maximal levi
1450
+ raise ValueError("Not implemented: use A2xA2xA1 levi or A2xA2xA2 extended rule. (Non-maximal Levi.)")
1451
+ elif Rtype == CartanType("E7"):
1452
+ if Stype == CartanType("D6"):
1453
+ return branching_rule("E7","D6xA1","extended")*branching_rule("D6xA1","D6","proj1") # non-maximal levi
1454
+ if Stype == CartanType("E6"):
1455
+ return BranchingRule(Rtype, Stype, lambda x: [x[0], x[1], x[2], x[3], x[4], (x[5]+x[6]-x[7])/3, (2*x[5]+5*x[6]+x[7])/6, (-2*x[5]+x[6]+5*x[7])/6], "levi")
1456
+ elif Stype == CartanType("A6"): # non-maximal levi
1457
+ return branching_rule("E7","A7","extended")*branching_rule("A7","A7","automorphic")*branching_rule("A7","A6","levi")
1458
+ if Stype.is_compound():
1459
+ if Stype[0] == CartanType("A5") and Stype[1] == CartanType("A1"):
1460
+ return branching_rule("E7","A5xA2","extended")*branching_rule("A5xA2","A5xA1",["identity",branching_rule("A2","A2","automorphic")*branching_rule("A2","A1","levi")])
1461
+ elif Stype[0] == CartanType("A1") and Stype[1] == CartanType("A5"):
1462
+ raise NotImplementedError("Not implemented: use A5xA1")
1463
+ elif Rtype == CartanType("E8"):
1464
+ if Stype == CartanType("D7"):
1465
+ return BranchingRule(Rtype, Stype, lambda x: [-x[6],-x[5],-x[4],-x[3],-x[2],-x[1],-x[0]], "levi")
1466
+ elif Stype == CartanType("E7"):
1467
+ return BranchingRule(Rtype, Stype, lambda x: [x[0],x[1],x[2],x[3],x[4],x[5],(x[6]-x[7])/2,(x[7]-x[6])/2], "levi")
1468
+ elif Stype == CartanType("A7"):
1469
+ return branching_rule("E8","A8","extended")*branching_rule("A8","A7","levi")
1470
+ raise NotImplementedError("Not implemented yet: branch first using extended rule to get non-maximal levis")
1471
+ elif Rtype == CartanType("F4"):
1472
+ if Stype == CartanType("B3"):
1473
+ return BranchingRule(Rtype, Stype, lambda x: x[1:], "levi")
1474
+ elif Stype == CartanType("C3"):
1475
+ return BranchingRule(Rtype, Stype, lambda x: [x[1]-x[0],x[2]+x[3],x[2]-x[3]], "levi")
1476
+ else:
1477
+ raise NotImplementedError("Not implemented yet")
1478
+ elif Rtype == CartanType("G2") and Stype == CartanType("A1"):
1479
+ return BranchingRule(Rtype, Stype, lambda x: list(x)[1:][:2], "levi")
1480
+ else:
1481
+ raise ValueError("Rule not found")
1482
+ elif rule == "automorphic":
1483
+ if not Rtype == Stype:
1484
+ raise ValueError("Cartan types must agree for automorphic branching rule")
1485
+ elif Rtype[0] == 'A':
1486
+ def rule(x):
1487
+ y = [-i for i in x]
1488
+ y.reverse()
1489
+ return y
1490
+ return BranchingRule(Rtype, Stype, rule, "automorphic")
1491
+ elif Rtype[0] == 'D':
1492
+ def rule(x):
1493
+ x[len(x) - 1] = -x[len(x) - 1]
1494
+ return x
1495
+ return BranchingRule(Rtype, Stype, rule, "automorphic")
1496
+ elif Rtype[0] == 'E' and r == 6:
1497
+ M = matrix(QQ,[(3, 3, 3, -3, 0, 0, 0, 0),
1498
+ (3, 3, -3, 3, 0, 0, 0, 0),
1499
+ (3, -3, 3, 3, 0, 0, 0, 0),
1500
+ (-3, 3, 3, 3, 0, 0, 0, 0),
1501
+ (0, 0, 0, 0, -3, -3, -3, 3),
1502
+ (0, 0, 0, 0, -3, 5, -1, 1),
1503
+ (0, 0, 0, 0, -3, -1, 5, 1),
1504
+ (0, 0, 0, 0, 3, 1, 1, 5)])/6
1505
+ return BranchingRule(Rtype, Stype, lambda x: tuple(M*vector(x)), "automorphic")
1506
+ else:
1507
+ raise ValueError("No automorphism found")
1508
+ elif rule == "triality":
1509
+ if not Rtype == Stype:
1510
+ raise ValueError("Triality is an automorphic type (for D4 only)")
1511
+ elif not Rtype[0] == 'D' and r == 4:
1512
+ raise ValueError("Triality is for D4 only")
1513
+ else:
1514
+ return BranchingRule(Rtype, Stype, lambda x: [(x[0]+x[1]+x[2]+x[3])/2,(x[0]+x[1]-x[2]-x[3])/2,(x[0]-x[1]+x[2]-x[3])/2,(-x[0]+x[1]+x[2]-x[3])/2], "triality")
1515
+ elif rule == "symmetric":
1516
+ if Rtype[0] == 'A':
1517
+ if (Stype[0] == 'C' or Stype[0] == 'D' and r == 2*s-1) or (Stype[0] == 'B' and r == 2*s):
1518
+ return BranchingRule(Rtype, Stype, lambda x: [x[i]-x[r-i] for i in range(s)], "symmetric")
1519
+ else:
1520
+ raise ValueError("Rule not found")
1521
+ elif Rtype[0] == 'D' and Stype[0] == 'B' and s == r-1:
1522
+ return BranchingRule(Rtype, Stype, lambda x: x[:s], "symmetric")
1523
+ elif Rtype == CartanType("D4") and Stype == CartanType("G2"):
1524
+ return BranchingRule(Rtype, Stype, lambda x: [x[0]+x[1], -x[1]+x[2], -x[0]-x[2]], "symmetric")
1525
+ elif Rtype == CartanType("E6") and Stype == CartanType("F4"):
1526
+ return BranchingRule(Rtype, Stype, lambda x: [(x[4]-3*x[5])/2,(x[0]+x[1]+x[2]+x[3])/2,(-x[0]-x[1]+x[2]+x[3])/2,(-x[0]+x[1]-x[2]+x[3])/2], "symmetric")
1527
+ elif Rtype == CartanType("E6") and Stype == CartanType("C4"):
1528
+ def f(x):
1529
+ [x0, x1, x2, x3, x4, x5] = x[:6]
1530
+ return [(x0+x1+x2+x3+x4-3*x5)/2,
1531
+ (-x0-x1-x2-x3+x4-3*x5)/2,
1532
+ -x0 + x3, -x1 + x2]
1533
+ return BranchingRule(Rtype, Stype, f, "symmetric")
1534
+ else:
1535
+ raise ValueError("Rule not found")
1536
+ elif rule == "extended" or rule == "orthogonal_sum":
1537
+ if rule == "extended" and not s == r:
1538
+ raise ValueError('Ranks should be equal for rule="extended"')
1539
+ if Stype.is_compound():
1540
+ if Rtype[0] in ['B','D'] and all(t[0] in ['B','D'] for t in stypes):
1541
+ if Rtype[0] == 'D':
1542
+ rdeg = 2*r
1543
+ else:
1544
+ rdeg = 2*r+1
1545
+ sdeg = 0
1546
+ for t in stypes:
1547
+ if t[0] == 'D':
1548
+ sdeg += 2*t[1]
1549
+ else:
1550
+ sdeg += 2*t[1]+1
1551
+ if rdeg == sdeg:
1552
+ return BranchingRule(Rtype, Stype, lambda x: x[:s], "orthogonal_sum")
1553
+ else:
1554
+ raise ValueError("Rule not found")
1555
+ elif Rtype[0] == 'C':
1556
+ if all(t[0] == Rtype[0] for t in stypes):
1557
+ return BranchingRule(Rtype, Stype, lambda x: x, "orthogonal_sum")
1558
+ if rule == "orthogonal_sum":
1559
+ raise ValueError("Rule not found")
1560
+ elif Rtype[0] == 'E':
1561
+ if r == 6:
1562
+ if stypes == [CartanType("A5"),CartanType("A1")]:
1563
+ M = matrix(QQ,[(-3, -3, -3, -3, -3, -5, -5, 5),
1564
+ (-9, 3, 3, 3, 3, 1, 1, -1),
1565
+ (3, -9, 3, 3, 3, 1, 1, -1),
1566
+ (3, 3, -9, 3, 3, 1, 1, -1),
1567
+ (3, 3, 3, -9, 3, 1, 1, -1),
1568
+ (3, 3, 3, 3, -9, 9, -3, 3),
1569
+ (-3, -3, -3, -3, -3, -1, 11, 1),
1570
+ (3, 3, 3, 3, 3, 1, 1, 11)])/12
1571
+ return BranchingRule(Rtype, Stype, lambda x: tuple(M*vector(x)), "extended")
1572
+ if stypes == [CartanType("A1"),CartanType("A5")]:
1573
+ M = matrix(QQ,[(-3, -3, -3, -3, -3, -1, 11, 1),
1574
+ (3, 3, 3, 3, 3, 1, 1, 11),
1575
+ (-3, -3, -3, -3, -3, -5, -5, 5),
1576
+ (-9, 3, 3, 3, 3, 1, 1, -1),
1577
+ (3, -9, 3, 3, 3, 1, 1, -1),
1578
+ (3, 3, -9, 3, 3, 1, 1, -1),
1579
+ (3, 3, 3, -9, 3, 1, 1, -1),
1580
+ (3, 3, 3, 3, -9, 9, -3, 3)])/12
1581
+ return BranchingRule(Rtype, Stype, lambda x: tuple(M*vector(x)), "extended")
1582
+ if stypes == [CartanType("A2"),CartanType("A2"),CartanType("A2")]:
1583
+ M = matrix(QQ,[(0, 0, -2, -2, -2, -2, -2, 2),
1584
+ (-3, 3, 1, 1, 1, 1, 1, -1),
1585
+ (3, -3, 1, 1, 1, 1, 1, -1),
1586
+ (0, 0, -2, -2, 4, 0, 0, 0),
1587
+ (0, 0, -2, 4, -2, 0, 0, 0),
1588
+ (0, 0, 4, -2, -2, 0, 0, 0),
1589
+ (0, 0, -2, -2, -2, 2, 2, -2),
1590
+ (3, 3, 1, 1, 1, -1, -1, 1),
1591
+ (-3, -3, 1, 1, 1, -1, -1, 1)])/6
1592
+ return BranchingRule(Rtype, Stype, lambda x: tuple(M*vector(x)), "extended")
1593
+ elif r == 7:
1594
+ if stypes == [CartanType("D6"),CartanType("A1")]:
1595
+ return BranchingRule(Rtype, Stype, lambda x: [x[5],x[4],x[3],x[2],x[1],x[0],x[6],x[7]], "extended")
1596
+ elif stypes == [CartanType("A1"),CartanType("D6")]:
1597
+ return BranchingRule(Rtype, Stype, lambda x: [x[6],x[7],x[5],x[4],x[3],x[2],x[1],x[0]], "extended")
1598
+ elif stypes == [CartanType("A5"),CartanType("A2")]:
1599
+ M = matrix(QQ,[(5, 1, 1, 1, 1, 1, 0, 0),
1600
+ (-1, -5, 1, 1, 1, 1, 0, 0),
1601
+ (-1, 1, -5, 1, 1, 1, 0, 0),
1602
+ (-1, 1, 1, -5, 1, 1, 0, 0),
1603
+ (-1, 1, 1, 1, -5, 1, 0, 0),
1604
+ (-1, 1, 1, 1, 1, -5, 0, 0),
1605
+ (1, -1, -1, -1, -1, -1, 0, -6),
1606
+ (1, -1, -1, -1, -1, -1, -6, 0),
1607
+ (-2, 2, 2, 2, 2, 2, -3, -3)])/6
1608
+ return BranchingRule(Rtype, Stype, lambda x: tuple(M*vector(x)), "extended")
1609
+ elif stypes == [CartanType("A3"),CartanType("A3"),CartanType("A1")]:
1610
+ M = matrix(QQ, [(0, 0, -1, -1, -1, -1, 2, -2),
1611
+ (0, 0, -1, -1, -1, -1, -2, 2),
1612
+ (-2, 2, 1, 1, 1, 1, 0, 0),
1613
+ (2, -2, 1, 1, 1, 1, 0, 0),
1614
+ (0, 0, -1, -1, -1, 3, 0, 0),
1615
+ (0, 0, -1, -1, 3, -1, 0, 0),
1616
+ (0, 0, -1, 3, -1, -1, 0, 0),
1617
+ (0, 0, 3, -1, -1, -1, 0, 0),
1618
+ (2, 2, 0, 0, 0, 0, -2, -2),
1619
+ (-2, -2, 0, 0, 0, 0, -2, -2)])/4
1620
+ return BranchingRule(Rtype, Stype, lambda x: tuple(M*vector(x)), "extended")
1621
+ elif r == 8:
1622
+ if stypes == [CartanType("A4"),CartanType("A4")]:
1623
+ M = matrix(QQ,[(0, 0, 0, -4, -4, -4, -4, 4),
1624
+ (-5, 5, 5, 1, 1, 1, 1, -1),
1625
+ (5, -5, 5, 1, 1, 1, 1, -1),
1626
+ (5, 5, -5, 1, 1, 1, 1, -1),
1627
+ (-5, -5, -5, 1, 1, 1, 1, -1),
1628
+ (0, 0, 0, -8, 2, 2, 2, -2),
1629
+ (0, 0, 0, 2, -8, 2, 2, -2),
1630
+ (0, 0, 0, 2, 2, -8, 2, -2),
1631
+ (0, 0, 0, 2, 2, 2, -8, -2),
1632
+ (0, 0, 0, 2, 2, 2, 2, 8)])/10
1633
+ return BranchingRule(Rtype, Stype, lambda x: tuple(M*vector(x)), "extended")
1634
+ elif len(stypes) == 3:
1635
+ if 5 in stypes[0][i]: # S is A5xA2xA1
1636
+ raise NotImplementedError("Not maximal: first branch to A7xA1")
1637
+ elif stypes == [CartanType("D5"), CartanType("A3")]:
1638
+ raise NotImplementedError("Not maximal: first branch to D8 then D5xD3=D5xA3")
1639
+ elif stypes == [CartanType("A3"), CartanType("D5")]:
1640
+ raise NotImplementedError("Not maximal: first branch to D8 then D5xD3=D5xA3")
1641
+ elif stypes == [CartanType("E6"), CartanType("A2")]:
1642
+ def br(x):
1643
+ return [x[0], x[1], x[2], x[3], x[4],
1644
+ (x[5]+x[6]-x[7])/3,(x[5]+x[6]-x[7])/3,
1645
+ (-x[5]-x[6]+x[7])/3,
1646
+ (-x[5]-x[6]-2*x[7])/3,
1647
+ (-x[5]+2*x[6]+x[7])/3,
1648
+ (2*x[5]-x[6]+x[7])/3]
1649
+ return BranchingRule(Rtype, Stype, br, "extended")
1650
+ elif stypes == [CartanType("E7"), CartanType("A1")]:
1651
+ def br(x):
1652
+ return [x[0], x[1], x[2], x[3], x[4], x[5],
1653
+ (x[6]-x[7])/2, (-x[6]+x[7])/2,
1654
+ (-x[6]-x[7])/2, (x[6]+x[7])/2]
1655
+ return BranchingRule(Rtype, Stype, br, "extended")
1656
+ raise ValueError("Rule not found")
1657
+ elif Rtype[0] == 'F':
1658
+ if stypes == [CartanType("C3"), CartanType("A1")]:
1659
+ return BranchingRule(Rtype, Stype, lambda x: [x[0]-x[1],x[2]+x[3],x[2]-x[3],(-x[0]-x[1])/2,(x[0]+x[1])/2], "extended")
1660
+ elif stypes == [CartanType("A1"), CartanType("C3")]:
1661
+ return BranchingRule(Rtype, Stype, lambda x: [(-x[0]-x[1])/2,(x[0]+x[1])/2,x[0]-x[1],x[2]+x[3],x[2]-x[3]], "extended")
1662
+ elif stypes == [CartanType("A2"), CartanType("A2")]:
1663
+ M = matrix(QQ,[(-2, -1, -1, 0), (1, 2, -1, 0), (1, -1, 2, 0), (1, -1, -1, 3), (1, -1, -1, -3), (-2, 2, 2, 0)])/3
1664
+ elif stypes == [CartanType("A3"), CartanType("A1")]:
1665
+ M = matrix(QQ,[(-3, -1, -1, -1), (1, 3, -1, -1), (1, -1, 3, -1), (1, -1, -1, 3), (2, -2, -2, -2), (-2, 2, 2, 2)])/4
1666
+ elif stypes == [CartanType("A1"), CartanType("A3")]:
1667
+ M = matrix(QQ,[(2, -2, -2, -2), (-2, 2, 2, 2), (-3, -1, -1, -1), (1, 3, -1, -1), (1, -1, 3, -1), (1, -1, -1, 3)])/4
1668
+ else:
1669
+ raise ValueError("Rule not found")
1670
+ return BranchingRule(Rtype, Stype, lambda x: tuple(M*vector(x)), "extended")
1671
+ elif Rtype[0] == 'G':
1672
+ if stypes == [CartanType("A1"), CartanType("A1")]:
1673
+ return BranchingRule(Rtype, Stype, lambda x: [(x[1]-x[2])/2,-(x[1]-x[2])/2, x[0]/2, -x[0]/2], "extended")
1674
+ raise ValueError("Rule not found")
1675
+ else: # irreducible Stype
1676
+ if Rtype[0] == 'B' and Stype[0] == 'D':
1677
+ return BranchingRule(Rtype, Stype, lambda x: x, "extended")
1678
+ elif Rtype == CartanType("E7"):
1679
+ if Stype == CartanType("A7"):
1680
+ M = matrix(QQ, [(-1, -1, -1, -1, -1, -1, 2, -2),
1681
+ (-1, -1, -1, -1, -1, -1, -2, 2),
1682
+ (-3, 1, 1, 1, 1, 1, 0, 0),
1683
+ (1, -3, 1, 1, 1, 1, 0, 0),
1684
+ (1, 1, -3, 1, 1, 1, 0, 0),
1685
+ (1, 1, 1, -3, 1, 1, 0, 0),
1686
+ (1, 1, 1, 1, -3, 1, 2, 2),
1687
+ (1, 1, 1, 1, 1, -3, 2, 2)])/4
1688
+ return BranchingRule(Rtype, Stype, lambda x: tuple(M*vector(x)), "extended")
1689
+ elif Rtype == CartanType("E8"):
1690
+ if Stype == CartanType("D8"):
1691
+ return BranchingRule(Rtype, Stype, lambda x: [-x[7],x[6],x[5],x[4],x[3],x[2],x[1],x[0]], "extended")
1692
+ elif Stype == CartanType("A8"):
1693
+ M = matrix([(-2, -2, -2, -2, -2, -2, -2, 2),
1694
+ (-5, 1, 1, 1, 1, 1, 1, -1),
1695
+ (1, -5, 1, 1, 1, 1, 1, -1),
1696
+ (1, 1, -5, 1, 1, 1, 1, -1),
1697
+ (1, 1, 1, -5, 1, 1, 1, -1),
1698
+ (1, 1, 1, 1, -5, 1, 1, -1),
1699
+ (1, 1, 1, 1, 1, -5, 1, -1),
1700
+ (1, 1, 1, 1, 1, 1, -5, -1),
1701
+ (1, 1, 1, 1, 1, 1, 1, 5)])/6
1702
+ return BranchingRule(Rtype, Stype, lambda x: tuple(M*vector(x)), "extended")
1703
+ elif Rtype == CartanType("F4") and Stype == CartanType("B4"):
1704
+ return BranchingRule(Rtype, Stype, lambda x: [-x[0], x[1], x[2], x[3]], "extended")
1705
+ elif Rtype == CartanType("G2") and Stype == CartanType("A2"):
1706
+ return BranchingRule(Rtype, Stype, lambda x: [(-x[1]+x[2])/3, (-x[0]+x[1])/3, (x[0]-x[2])/3], "extended")
1707
+ else:
1708
+ raise ValueError("Rule not found")
1709
+ elif rule == "isomorphic":
1710
+ if r != s:
1711
+ raise ValueError("Incompatible ranks")
1712
+ if Rtype == Stype:
1713
+ return BranchingRule(Rtype, Stype, lambda x: x, "isomorphic")
1714
+ elif Rtype == CartanType("B2") and Stype == CartanType("C2"):
1715
+ def rule(x):
1716
+ [x1, x2] = x
1717
+ return [x1 + x2, x1 - x2]
1718
+ return BranchingRule(Rtype, Stype, rule, "isomorphic")
1719
+ elif Rtype == CartanType("C2") and Stype == CartanType("B2"):
1720
+ def rule(x):
1721
+ [x1, x2] = x
1722
+ return [(x1 + x2) / 2, (x1 - x2) / 2]
1723
+ return BranchingRule(Rtype, Stype, rule, "isomorphic")
1724
+ elif Rtype == CartanType("B1") and Stype == CartanType("A1"):
1725
+ return BranchingRule(Rtype, Stype, lambda x: [x[0],-x[0]], "isomorphic")
1726
+ elif Rtype == CartanType("A1") and Stype == CartanType("B1"):
1727
+ return BranchingRule(Rtype, Stype, lambda x: [(x[0]-x[1])/2], "isomorphic")
1728
+ elif Rtype == CartanType("C1") and Stype == CartanType("A1"):
1729
+ return BranchingRule(Rtype, Stype, lambda x: [x[0]/2,-x[0]/2], "isomorphic")
1730
+ elif Rtype == CartanType("A1") and Stype == CartanType("C1"):
1731
+ return BranchingRule(Rtype, Stype, lambda x: [x[0]-x[1]], "isomorphic")
1732
+ elif Rtype == CartanType("A3") and Stype == CartanType("D3"):
1733
+ def rule(x):
1734
+ [x1, x2, x3, x4] = x
1735
+ return [(x1+x2-x3-x4)/2, (x1-x2+x3-x4)/2, (x1-x2-x3+x4)/2]
1736
+ return BranchingRule(Rtype, Stype, rule, "isomorphic")
1737
+ elif Rtype == CartanType("D3") and Stype == CartanType("A3"):
1738
+ def rule(x):
1739
+ [t1, t2, t3] = x
1740
+ return [(t1+t2+t3)/2, (t1-t2-t3)/2,
1741
+ (-t1+t2-t3)/2, (-t1-t2+t3)/2]
1742
+ return BranchingRule(Rtype, Stype, rule, "isomorphic")
1743
+ elif Rtype == CartanType("D2") and Stype == CartanType("A1xA1"):
1744
+ def rule(x):
1745
+ [t1, t2] = x
1746
+ return [(t1-t2)/2, -(t1-t2)/2, (t1+t2)/2, -(t1+t2)/2]
1747
+ return BranchingRule(Rtype, Stype, rule, "isomorphic")
1748
+ else:
1749
+ raise ValueError("Rule not found")
1750
+ elif rule == "tensor" or rule == "tensor-debug":
1751
+ if not Stype.is_compound():
1752
+ raise ValueError("Tensor product requires more than one factor")
1753
+ if len(stypes) != 2:
1754
+ raise ValueError("Not implemented")
1755
+ if Rtype[0] == 'A':
1756
+ nr = Rtype[1]+1
1757
+ elif Rtype[0] == 'B':
1758
+ nr = 2*Rtype[1]+1
1759
+ elif Rtype[0] in ['C', 'D']:
1760
+ nr = 2*Rtype[1]
1761
+ else:
1762
+ raise ValueError("Rule not found")
1763
+ [s1, s2] = [stypes[i][1] for i in range(2)]
1764
+ ns = [s1, s2]
1765
+ for i in range(2):
1766
+ if stypes[i][0] == 'A':
1767
+ ns[i] = ns[i]+1
1768
+ if stypes[i][0] == 'B':
1769
+ ns[i] = 2*ns[i]+1
1770
+ if stypes[i][0] in ['C','D']:
1771
+ ns[i] = 2*ns[i]
1772
+ if nr != ns[0]*ns[1]:
1773
+ raise ValueError("Ranks don't agree with tensor product")
1774
+ if Rtype[0] == 'A':
1775
+ if all(t[0] == 'A' for t in stypes):
1776
+ def rule(x):
1777
+ ret = [sum(x[i*ns[1]:(i+1)*ns[1]]) for i in range(ns[0])]
1778
+ ret.extend(sum(x[ns[1]*j+i] for j in range(ns[0]))
1779
+ for i in range(ns[1]))
1780
+ return ret
1781
+ return BranchingRule(Rtype, Stype, rule, "tensor")
1782
+ else:
1783
+ raise ValueError("Rule not found")
1784
+ elif Rtype[0] == 'B':
1785
+ if not all(t[0] == 'B' for t in stypes):
1786
+ raise ValueError("Rule not found")
1787
+ elif Rtype[0] == 'C':
1788
+ if stypes[0][0] in ['B','D'] and stypes[1][0] == 'C':
1789
+ pass
1790
+ elif stypes[1][0] in ['B','D'] and stypes[0][0] == 'C':
1791
+ pass
1792
+ else:
1793
+ raise ValueError("Rule not found")
1794
+ elif Rtype[0] == 'D':
1795
+ if stypes[0][0] in ['B','D'] and stypes[1][0] == 'D':
1796
+ pass
1797
+ elif stypes[1][0] == 'B' and stypes[0][0] == 'D':
1798
+ pass
1799
+ elif stypes[1][0] == 'C' and stypes[0][0] == 'C':
1800
+ pass
1801
+ else:
1802
+ raise ValueError("Rule not found")
1803
+ rows = []
1804
+ for i in range(s1):
1805
+ for j in range(s2):
1806
+ nextrow = (s1+s2)*[0]
1807
+ nextrow[i] = 1
1808
+ nextrow[s1+j] = 1
1809
+ rows.append(nextrow)
1810
+ if stypes[1][0] == 'B':
1811
+ for i in range(s1):
1812
+ nextrow = (s1+s2)*[0]
1813
+ nextrow[i] = 1
1814
+ rows.append(nextrow)
1815
+ for i in range(s1):
1816
+ for j in range(s2):
1817
+ nextrow = (s1+s2)*[0]
1818
+ nextrow[i] = 1
1819
+ nextrow[s1+j] = -1
1820
+ rows.append(nextrow)
1821
+ if stypes[0][0] == 'B':
1822
+ for j in range(s2):
1823
+ nextrow = (s1+s2)*[0]
1824
+ nextrow[s1+j] = 1
1825
+ rows.append(nextrow)
1826
+ mat = matrix(rows).transpose()
1827
+ if rule == "tensor-debug":
1828
+ print(mat)
1829
+ return BranchingRule(Rtype, Stype, lambda x: tuple(mat*vector(x)), "tensor")
1830
+ elif rule == "symmetric_power":
1831
+ if Stype[0] == 'A' and s == 1:
1832
+ if Rtype[0] == 'B':
1833
+ def rule(x):
1834
+ a = sum((r-i)*x[i] for i in range(r))
1835
+ return [a,-a]
1836
+ return BranchingRule(Rtype, Stype, rule, "symmetric_power")
1837
+ elif Rtype[0] == 'C':
1838
+ def rule(x):
1839
+ a = sum((2*r-2*i-1)*x[i] for i in range(r))
1840
+ return [a/2,-a/2]
1841
+ return BranchingRule(Rtype, Stype, rule, "symmetric_power")
1842
+ elif rule == "miscellaneous":
1843
+ if Rtype[0] == 'B' and Stype[0] == 'G' and r == 3:
1844
+ return BranchingRule(Rtype, Stype, lambda x: [x[0]+x[1], -x[1]+x[2], -x[0]-x[2]], "miscellaneous")
1845
+ elif Rtype == CartanType("E6"):
1846
+ if Stype.is_compound():
1847
+ if stypes == [CartanType("A2"),CartanType("G2")]:
1848
+ return BranchingRule(Rtype, Stype, lambda x: [-2*x[5],x[5]+x[4],x[5]-x[4],x[2]+x[3],x[1]-x[2],-x[1]-x[3]], "miscellaneous")
1849
+ elif stypes == [CartanType("G2"),CartanType("A2")]:
1850
+ return BranchingRule(Rtype, Stype, lambda x: [x[2]+x[3],x[1]-x[2],-x[1]-x[3],-2*x[5],x[5]+x[4],x[5]-x[4]], "miscellaneous")
1851
+ else:
1852
+ if Stype == CartanType("G2"):
1853
+ return BranchingRule(Rtype, Stype, lambda x: [x[2]+x[3]+x[4]-3*x[5], x[1]-2*x[2]-x[3], -x[1]+x[2]-x[4]+3*x[5]],"miscellaneous")
1854
+ if Stype == CartanType("A2"):
1855
+ return BranchingRule(Rtype, Stype, lambda x: [x[2]+x[3]+x[4]-3*x[5], x[1]-2*x[2]-x[3], -x[1]+x[2]-x[4]+3*x[5]],"miscellaneous")
1856
+ elif Rtype == CartanType("E7"):
1857
+ if Stype.is_compound():
1858
+ if stypes == [CartanType("C3"), CartanType("G2")]:
1859
+ return BranchingRule(Rtype, Stype, lambda x: [-2*x[6],x[4]+x[5],-x[4]+x[5],x[1]+x[3],x[2]-x[3],-x[1]-x[2]], "miscellaneous")
1860
+ elif stypes == [CartanType("G2"), CartanType("C3")]:
1861
+ return BranchingRule(Rtype, Stype, lambda x: [x[1]+x[3],x[2]-x[3],-x[1]-x[2],-2*x[6],x[4]+x[5],-x[4]+x[5]], "miscellaneous")
1862
+ elif stypes == [CartanType("F4"), CartanType("A1")]:
1863
+ def f(x):
1864
+ [x0, x1, x2, x3, x4, x5, x6] = x[:7]
1865
+ return [(x4-x5)/2-x6, (x0+x1+x2+x3)/2,
1866
+ (-x0-x1+x2+x3)/2, (-x0+x1-x2+x3)/2,
1867
+ x5-x6, x6-x5]
1868
+ return BranchingRule(Rtype, Stype, f, "miscellaneous")
1869
+ elif stypes == [CartanType("A1"), CartanType("F4")]:
1870
+ def f(x):
1871
+ [x0, x1, x2, x3, x4, x5, x6] = x[:7]
1872
+ return [x5-x6, x6-x5, (x4-x5)/2-x6,
1873
+ (x0+x1+x2+x3)/2,
1874
+ (-x0-x1+x2+x3)/2,
1875
+ (-x0+x1-x2+x3)/2]
1876
+ return BranchingRule(Rtype, Stype, f, "miscellaneous")
1877
+ elif stypes == [CartanType("A1"), CartanType("A1")]:
1878
+ return BranchingRule(Rtype, Stype,
1879
+ lambda x: [x[1]+2*x[2]-2*x[3]-x[4]-2*x[6], -x[1]-2*x[2]+2*x[3]+x[4]+2*x[6],
1880
+ (x[3]+x[4]+x[5]-3*x[6]),-(x[3]+x[4]+x[5]-3*x[6])], "miscellaneous")
1881
+ elif stypes == [CartanType("G2"), CartanType("A1")]:
1882
+ def f(x):
1883
+ return [(x[0]-x[1]+x[2]+3*x[3]+x[4]-x[5]+2*x[6])/2,
1884
+ (-3*x[0]-x[1]-x[2]-x[3]+x[4]+x[5]-2*x[6])/2,
1885
+ (2*x[0]+2*x[1]-2*x[3]-2*x[4])/2,
1886
+ (x[0]+x[1]+x[2]+x[3]+x[4]+x[5]-4*x[6])/2,
1887
+ -(x[0]+x[1]+x[2]+x[3]+x[4]+x[5]-4*x[6])/2]
1888
+ return BranchingRule(Rtype, Stype, f, "miscellaneous")
1889
+ elif stypes == [CartanType("A1"), CartanType("G2")]:
1890
+ def f(x):
1891
+ return [(x[0]+x[1]+x[2]+x[3]+x[4]+x[5]-4*x[6])/2,
1892
+ -(x[0]+x[1]+x[2]+x[3]+x[4]+x[5]-4*x[6])/2,
1893
+ (x[0]-x[1]+x[2]+3*x[3]+x[4]-x[5]+2*x[6])/2,
1894
+ (-3*x[0]-x[1]-x[2]-x[3]+x[4]+x[5]-2*x[6])/2,
1895
+ (2*x[0]+2*x[1]-2*x[3]-2*x[4])/2]
1896
+ return BranchingRule(Rtype, Stype, f, "miscellaneous")
1897
+ elif Stype == CartanType("A2"):
1898
+ return BranchingRule(Rtype, Stype, lambda x: (x[1]+x[2]+2*x[4]-4*x[6],-2*x[1]-x[2]+x[3]-2*x[4]+2*x[5],x[1]-x[3]-2*x[5]+4*x[6]), "miscellaneous")
1899
+ elif Rtype == CartanType("E8"):
1900
+ if Stype.is_compound():
1901
+ if stypes == [CartanType("F4"),CartanType("G2")]:
1902
+ return BranchingRule(Rtype, Stype, lambda x: [x[7], x[6], x[5], x[4], x[1]+x[3], -x[3]+x[2], -x[1]-x[2]], "miscellaneous")
1903
+ elif stypes == [CartanType("G2"),CartanType("F4")]:
1904
+ return BranchingRule(Rtype, Stype, lambda x: [x[1]+x[3], -x[3]+x[2], -x[1]-x[2], x[7], x[6], x[5], x[4]], "miscellaneous")
1905
+ elif stypes == [CartanType("A2"), CartanType("A1")]:
1906
+ def f(x):
1907
+ return [(x[0]-x[1]+x[2]+x[3]+3*x[4]+x[5]-x[6]-x[7])/2,
1908
+ (-3*x[0]-x[1]-x[2]-x[3]-x[4]+x[5]+x[6]+x[7])/2,
1909
+ (2*x[0]+2*x[1]-2*x[4]-2*x[5])/2,
1910
+ (x[0]+x[1]+x[2]+x[3]+x[4]+x[5]+x[6]+5*x[7])/2,
1911
+ -(x[0]+x[1]+x[2]+x[3]+x[4]+x[5]+x[6]+5*x[7])/2]
1912
+ return BranchingRule("E8","A2xA1",f,"miscellaneous")
1913
+ elif stypes == [CartanType("A1"), CartanType("A2")]:
1914
+ def f(x):
1915
+ return [(x[0]+x[1]+x[2]+x[3]+x[4]+x[5]+x[6]+5*x[7])/2,
1916
+ -(x[0]+x[1]+x[2]+x[3]+x[4]+x[5]+x[6]+5*x[7])/2,
1917
+ (x[0]-x[1]+x[2]+x[3]+3*x[4]+x[5]-x[6]-x[7])/2,
1918
+ (-3*x[0]-x[1]-x[2]-x[3]-x[4]+x[5]+x[6]+x[7])/2,
1919
+ (2*x[0]+2*x[1]-2*x[4]-2*x[5])/2]
1920
+ return BranchingRule("E8", "A1xA2", f, "miscellaneous")
1921
+ elif Stype == CartanType("B2"):
1922
+ return BranchingRule("E8", "B2", lambda x: [-x[0] + x[2] + x[5] + 3*x[7], 2*x[0] - x[2] + x[3] + x[4] + 2*x[6] + x[7]], "miscellaneous")
1923
+ elif Rtype[0] == 'F':
1924
+ if Stype.is_compound():
1925
+ if stypes == [CartanType("A1"), CartanType("G2")]:
1926
+ return BranchingRule("F4", "A1xG2", lambda x: [2*x[0], -2*x[0], x[1]+x[2], -x[2]+x[3], -x[1]-x[3]], "miscellaneous")
1927
+ elif stypes == [CartanType("G2"), CartanType("A1")]:
1928
+ return BranchingRule("F4","G2xA1", lambda x: [x[1]+x[2], -x[2]+x[3], -x[1]-x[3], 2*x[0], -2*x[0]], "miscellaneous")
1929
+ raise ValueError("Rule not found")
1930
+ elif rule in ["i", "ii", "iii", "iv", "v", "vi", "vii"]:
1931
+ if Stype != CartanType("A1"):
1932
+ raise ValueError("Wrong target Cartan Type for rule %s" % rule)
1933
+ if rule == "i" and Rtype == CartanType("G2"):
1934
+ return BranchingRule(Rtype, Stype, lambda x: [(5*x[0]-x[1]-4*x[2])/3,-(5*x[0]-x[1]-4*x[2])/3], "i")
1935
+ elif rule == "ii" and Rtype == CartanType("F4"):
1936
+ return BranchingRule(Rtype, Stype, lambda x: [8*x[0]+3*x[1]+2*x[2]+x[3],-(8*x[0]+3*x[1]+2*x[2]+x[3])], "ii")
1937
+ elif rule == "iii" and Rtype == CartanType("E7"):
1938
+ return BranchingRule(Rtype, Stype,
1939
+ lambda x: [x[1]+2*x[2]+3*x[3]+4*x[4]+5*x[5]-17*x[6],-(x[1]+2*x[2]+3*x[3]+4*x[4]+5*x[5]-17*x[6])], "iii")
1940
+ elif rule == "iv" and Rtype == CartanType("E7"):
1941
+ return BranchingRule(Rtype, Stype,
1942
+ lambda x: [x[1]+x[2]+2*x[3]+3*x[4]+4*x[5]-13*x[6],-(x[1]+x[2]+2*x[3]+3*x[4]+4*x[5]-13*x[6])], "iv")
1943
+ elif rule == "v" and Rtype == CartanType("E8"):
1944
+ return BranchingRule(Rtype, Stype,
1945
+ lambda x: [x[1]+2*x[2]+3*x[3]+4*x[4]+5*x[5]+6*x[6]+23*x[7],-(x[1]+2*x[2]+3*x[3]+4*x[4]+5*x[5]+6*x[6]+23*x[7])], "v")
1946
+ elif rule == "vi" and Rtype == CartanType("E8"):
1947
+ return BranchingRule(Rtype, Stype,
1948
+ lambda x: [x[1]+x[2]+2*x[3]+3*x[4]+4*x[5]+5*x[6]+18*x[7],-(x[1]+x[2]+2*x[3]+3*x[4]+4*x[5]+5*x[6]+18*x[7])], "vi")
1949
+ elif rule == "vii" and Rtype == CartanType("E8"):
1950
+ return BranchingRule(Rtype, Stype,
1951
+ lambda x: [x[1]+x[2]+2*x[3]+2*x[4]+3*x[5]+4*x[6]+15*x[7],-(x[1]+x[2]+2*x[3]+2*x[4]+3*x[5]+4*x[6]+15*x[7])], "vii")
1952
+ raise ValueError("Wrong source Cartan Type for rule %s" % rule)
1953
+ raise ValueError("Rule not found")
1954
+
1955
+
1956
+ get_branching_rule = branching_rule
1957
+
1958
+
1959
+ def branching_rule_from_plethysm(chi, cartan_type, return_matrix=False):
1960
+ r"""
1961
+ Create the branching rule of a plethysm.
1962
+
1963
+ INPUT:
1964
+
1965
+ - ``chi`` -- the character of an irreducible representation `\pi` of
1966
+ a group `G`
1967
+ - ``cartan_type`` -- a classical Cartan type (`A`,`B`,`C` or `D`)
1968
+
1969
+ It is assumed that the image of the irreducible representation pi
1970
+ naturally has its image in the group `G`.
1971
+
1972
+ Returns a branching rule for this plethysm.
1973
+
1974
+ EXAMPLES:
1975
+
1976
+ The adjoint representation `SL(3) \to GL(8)` factors
1977
+ through `SO(8)`. The branching rule in question will
1978
+ describe how representations of `SO(8)` composed with
1979
+ this homomorphism decompose into irreducible characters
1980
+ of `SL(3)`::
1981
+
1982
+ sage: A2 = WeylCharacterRing("A2")
1983
+ sage: A2 = WeylCharacterRing("A2", style='coroots')
1984
+ sage: ad = A2.adjoint_representation(); ad
1985
+ A2(1,1)
1986
+ sage: ad.degree()
1987
+ 8
1988
+ sage: ad.frobenius_schur_indicator()
1989
+ 1
1990
+
1991
+ This confirms that `ad` has degree 8 and is orthogonal,
1992
+ hence factors through `SO(8)` which is type `D_4`::
1993
+
1994
+ sage: br = branching_rule_from_plethysm(ad,"D4")
1995
+ sage: D4 = WeylCharacterRing("D4")
1996
+ sage: [D4(f).branch(A2,rule = br) for f in D4.fundamental_weights()]
1997
+ [A2(1,1), A2(0,3) + A2(1,1) + A2(3,0), A2(1,1), A2(1,1)]
1998
+ """
1999
+ ct = CartanType(cartan_type)
2000
+ if ct[0] not in ["A", "B", "C", "D"]:
2001
+ raise ValueError("not implemented for type {}".format(ct[0]))
2002
+ if ct[0] == "A":
2003
+ ret = []
2004
+ ml = chi.weight_multiplicities()
2005
+ for v in ml:
2006
+ n = ml[v]
2007
+ ret.extend(n * [v.to_vector()])
2008
+ M = matrix(ret).transpose()
2009
+ if len(M.columns()) != ct[1] + 1:
2010
+ raise ValueError("representation has wrong degree for type {}".format(ct))
2011
+ return BranchingRule(ct, chi.parent().cartan_type(), lambda x: tuple(M*vector(x)), "plethysm (along %s)" % chi)
2012
+ if ct[0] in ["B", "D"]:
2013
+ if chi.frobenius_schur_indicator() != 1:
2014
+ raise ValueError("character is not orthogonal")
2015
+ if ct[0] == "C":
2016
+ if chi.frobenius_schur_indicator() != -1:
2017
+ raise ValueError("character is not symplectic")
2018
+ if ct[0] == "B":
2019
+ if is_even(chi.degree()):
2020
+ raise ValueError("degree is not odd")
2021
+ if ct[0] in ["C", "D"]:
2022
+ if is_odd(chi.degree()):
2023
+ raise ValueError("degree is not even")
2024
+ ret = []
2025
+ ml = chi.weight_multiplicities()
2026
+ for v in ml:
2027
+ n = ml[v]
2028
+ vec = v.to_vector()
2029
+ if all(x == 0 for x in vec):
2030
+ if ct[0] == "B":
2031
+ n = (n-1)/2
2032
+ else:
2033
+ n = n/2
2034
+ elif [x for x in vec if x != 0][0] < 0:
2035
+ continue
2036
+ ret.extend(n * [vec])
2037
+ M = matrix(ret).transpose()
2038
+ if len(M.columns()) != ct.root_system().ambient_space().dimension():
2039
+ raise ValueError("representation has wrong degree for type {}".format(ct))
2040
+ if return_matrix:
2041
+ return M
2042
+ else:
2043
+ return BranchingRule(ct, chi.parent().cartan_type(), lambda x: tuple(M*vector(x)), "plethysm (along %s)" % chi)
2044
+
2045
+
2046
+ def maximal_subgroups(ct, mode='print_rules'):
2047
+ """
2048
+ Given a classical Cartan type (of rank less than or equal to 8)
2049
+ this prints the Cartan types of maximal subgroups, with a method
2050
+ of obtaining the branching rule. The string to the right of the
2051
+ colon in the output is a command to create a branching rule.
2052
+
2053
+ INPUT:
2054
+
2055
+ - ``ct`` -- a classical irreducible Cartan type
2056
+
2057
+ Returns a list of maximal subgroups of ct.
2058
+
2059
+ EXAMPLES::
2060
+
2061
+ sage: from sage.combinat.root_system.branching_rules import maximal_subgroups
2062
+ sage: maximal_subgroups("D4")
2063
+ B3:branching_rule("D4","B3","symmetric")
2064
+ A2:branching_rule("D4","A2(1,1)","plethysm")
2065
+ A1xC2:branching_rule("D4","C1xC2","tensor")*branching_rule("C1xC2","A1xC2",[branching_rule("C1","A1","isomorphic"),"identity"])
2066
+ A1xA1xA1xA1:branching_rule("D4","D2xD2","orthogonal_sum")*branching_rule("D2xD2","A1xA1xA1xA1",[branching_rule("D2","A1xA1","isomorphic"),branching_rule("D2","A1xA1","isomorphic")])
2067
+
2068
+ .. SEEALSO:: :meth:`~sage.combinat.root_system.weyl_characters.WeylCharacterRing.ParentMethods.maximal_subgroups`
2069
+ """
2070
+
2071
+ if CartanType(ct) == CartanType("A2"):
2072
+ rul = ["""A1:branching_rule("A2","A1","levi")"""]
2073
+ elif CartanType(ct) == CartanType("A3"):
2074
+ rul = ["""A2:branching_rule("A3","A2","levi")""",
2075
+ """A1xA1:branching_rule("A3","A1xA1","tensor")""",
2076
+ """C2:branching_rule("A3","C2","symmetric")""",
2077
+ """A1xA1:branching_rule("A3","A1xA1","levi")"""]
2078
+ elif CartanType(ct) == CartanType("A4"):
2079
+ rul = ["""A3:branching_rule("A4","A3","levi")""",
2080
+ """B2:branching_rule("A4","B2","symmetric")""",
2081
+ """A1xA2:branching_rule("A4","A1xA2","levi")"""]
2082
+ elif CartanType(ct) == CartanType("A5"):
2083
+ rul = ["""A4:branching_rule("A5","A4","levi")""",
2084
+ """A3:branching_rule("A5","D3","symmetric")*branching_rule("D3","A3","isomorphic")""",
2085
+ """A3:branching_rule("A5","A3(0,1,0)","plethysm") # alternative""",
2086
+ """C3:branching_rule("A5","C3","symmetric")""",
2087
+ """A2:branching_rule("A5","A2(2,0)","plethysm")""",
2088
+ """A1xA2:branching_rule("A5","A1xA2","tensor")""",
2089
+ """A1xA3:branching_rule("A5","A1xA3","levi")""",
2090
+ """A2xA2:branching_rule("A5","A2xA2","levi")"""]
2091
+ elif CartanType(ct) == CartanType("A6"):
2092
+ rul = ["""A5:branching_rule("A6","A5","levi")""",
2093
+ """B3:branching_rule("A6","B3","symmetric")""",
2094
+ """A1xA4:branching_rule("A6","A1xA4","levi")""",
2095
+ """A2xA3:branching_rule("A6","A2xA3","levi")"""]
2096
+ elif CartanType(ct) == CartanType("A7"):
2097
+ rul = ["""A6:branching_rule("A7","A6","levi")""",
2098
+ """C4:branching_rule("A7","C4","symmetric")""",
2099
+ """D4:branching_rule("A7","D4","symmetric")""",
2100
+ """A1xA3:branching_rule("A7","A1xA3","tensor")""",
2101
+ """A1xA5:branching_rule("A7","A1xA5","levi")""",
2102
+ """A2xA4:branching_rule("A7","A2xA4","levi")""",
2103
+ """A3xA3:branching_rule("A7","A3xA3","levi")"""]
2104
+ elif CartanType(ct) == CartanType("A8"):
2105
+ rul = ["""A7:branching_rule("A8","A7","levi")""",
2106
+ """B4:branching_rule("A8","B4","symmetric")""",
2107
+ """A2xA2:branching_rule("A8","A2xA2","tensor")""",
2108
+ """A1xA6:branching_rule("A8","A1xA6","levi")""",
2109
+ """A2xA5:branching_rule("A8","A2xA5","levi")""",
2110
+ """A3xA4:branching_rule("A8","A3xA4","levi")"""]
2111
+ elif CartanType(ct) == CartanType("B3"):
2112
+ rul = ["""G2:branching_rule("B3","G2","miscellaneous")""",
2113
+ """A3:branching_rule("B3","D3","extended")*branching_rule("D3","A3","isomorphic")""",
2114
+ """A1xA1xA1:branching_rule("B3","D2xB1","orthogonal_sum")*branching_rule("D2xB1","A1xA1xA1",[branching_rule("D2","A1xA1","isomorphic"),branching_rule("B1","A1","isomorphic")])"""]
2115
+ elif CartanType(ct) == CartanType("B4"):
2116
+ rul = ["""D4:branching_rule("B4","D4","extended")""",
2117
+ """A1:branching_rule("B4","A1","symmetric_power")""",
2118
+ """A1xA1:branching_rule("B4","B1xB1","tensor")*branching_rule("B1xB1","A1xA1",[branching_rule("B1","A1","isomorphic"),branching_rule("B1","A1","isomorphic")])""",
2119
+ """A1xA1xB2:branching_rule("B4","D2xB2","extended")*branching_rule("D2xB2","A1xA1xB2",[branching_rule("D2","A1xA1","isomorphic"),"identity"])""",
2120
+ """A1xA3:branching_rule("B4","B1xD3","extended")*branching_rule("B1xD3","A1xA3",[branching_rule("B1","A1","isomorphic"),branching_rule("D3","A3","isomorphic")])"""]
2121
+ elif CartanType(ct) == CartanType("B5"):
2122
+ rul = ["""D5:branching_rule("B5","D5","extended")""",
2123
+ """A1:branching_rule("B5","A1","symmetric_power")""",
2124
+ """A1xA2xB3:branching_rule("B5","D2xB3","extended")*branching_rule("D2xB3","A1xA2xB3",[branching_rule("D2","A1xA1","isomorphic"),"identity"])""",
2125
+ """A1xD4:branching_rule("B5","B1xD4","orthogonal_sum")*branching_rule("B1xD4","A1xD4",[branching_rule("B1","A1","isomorphic"),"identity"])""",
2126
+ """A3xB2:branching_rule("B5","D3xB2","orthogonal_sum")*branching_rule("D3xB2","A3xB2",[branching_rule("D3","A3","isomorphic"),"identity"])"""]
2127
+ elif CartanType(ct) == CartanType("B6"):
2128
+ rul = ["""D6:branching_rule("B6","D6","extended")""",
2129
+ """A1:branching_rule("B6","A1","symmetric_power")""",
2130
+ """A1xA1xB4:branching_rule("B6","D2xB4","orthogonal_sum")*branching_rule("D2xB4","A1xA1xB4",[branching_rule("D2","A1xA1","isomorphic"),"identity"])""",
2131
+ """A1xD5:branching_rule("B6","B1xD5","orthogonal_sum")*branching_rule("B1xD5","A1xD5",[branching_rule("B1","A1","isomorphic"),"identity"])""",
2132
+ """A3xB3:branching_rule("B6","D3xB3","orthogonal_sum")*branching_rule("D3xB3","A3xB3",[branching_rule("D3","A3","isomorphic"),"identity"])""",
2133
+ """B2xD4:branching_rule("B6","B2xD4","orthogonal_sum")"""]
2134
+ elif CartanType(ct) == CartanType("B7"):
2135
+ rul = ["""D7:branching_rule("B7","D7","extended")""",
2136
+ """A3:branching_rule("B7","A3(1,0,1)","plethysm")""",
2137
+ """A1:branching_rule("B7","A1","symmetric_power")""",
2138
+ """A1xB2:branching_rule("B7","B1xB2","tensor")*branching_rule("B1xB2","A1xB2",[branching_rule("B1","A1","isomorphic"),"identity"])""",
2139
+ """A1xD6:branching_rule("B7","B1xD6","extended")*branching_rule("B1xD6","A1xD6",[branching_rule("B1","A1","isomorphic"),"identity"])""",
2140
+ """A1xA1xB5:branching_rule("B7","D2xB5","extended")*branching_rule("D2xB5","A1xA1xB5",[branching_rule("D2","A1xA1","isomorphic"),"identity"])""",
2141
+ """B2xD5:branching_rule("B7","B2xD5","orthogonal_sum")""",
2142
+ """A3xB4:branching_rule("B7","D3xB4","orthogonal_sum")*branching_rule("D3xB4","A3xB4",[branching_rule("D3","A3","isomorphic"),"identity"])""",
2143
+ """B3xD4:branching_rule("B7","B3xD4","orthogonal_sum")"""]
2144
+ elif CartanType(ct) == CartanType("B8"):
2145
+ rul = ["""D8:branching_rule("B8","D8","extended")""",
2146
+ """A1:branching_rule("B8","A1","symmetric_power")""",
2147
+ """A1xD7:branching_rule("B8","B1xD7","orthogonal_sum")*branching_rule("B1xD7","A1xD7",[branching_rule("B1","A1","isomorphic"),"identity"])""",
2148
+ """A1xA1xB6:branching_rule("B8","D2xB6","orthogonal_sum")*branching_rule("D2xB6","A1xA1xB6",[branching_rule("D2","A1xA1","isomorphic"),"identity"])""",
2149
+ """B2xD6:branching_rule("B8","B2xD6","orthogonal_sum")""",
2150
+ """A3xB5:branching_rule("B8","D3xB5","orthogonal_sum")*branching_rule("D3xB5","A3xB5",[branching_rule("D3","A3","isomorphic"),"identity"])""",
2151
+ """B3xD5:branching_rule("B8","B3xD5","orthogonal_sum")""",
2152
+ """B4xD4:branching_rule("B8","B4xD4","orthogonal_sum")"""]
2153
+ elif CartanType(ct) == CartanType("C2"):
2154
+ rul = ["""A1:branching_rule("C2","A1","symmetric_power")""",
2155
+ """A1xA1:branching_rule("C2","C1xC1","orthogonal_sum")*branching_rule("C1xC1","A1xA1",[branching_rule("C1","A1","isomorphic"),branching_rule("C1","A1","isomorphic")])"""]
2156
+ elif CartanType(ct) == CartanType("C3"):
2157
+ rul = ["""A2:branching_rule("C3","A2","levi")""",
2158
+ """A1:branching_rule("C3","A1","symmetric_power")""",
2159
+ """A1xA1:branching_rule("C3","B1xC1","tensor")*branching_rule("B1xC1","A1xA1",[branching_rule("B1","A1","isomorphic"),branching_rule("C1","A1","isomorphic")])""",
2160
+ """A1xC2:branching_rule("C3","C1xC2","orthogonal_sum")*branching_rule("C1xC2","A1xC2",[branching_rule("C1","A1","isomorphic"),"identity"])"""]
2161
+ elif CartanType(ct) == CartanType("C4"):
2162
+ rul = ["""A3:branching_rule("C4","A3","levi")""",
2163
+ """A1:branching_rule("C4","A1","symmetric_power")""",
2164
+ """A1xA3:branching_rule("C4","C1xC3","orthogonal_sum")*branching_rule("C1xC3","A1xA3",[branching_rule("C1","A1","isomorphic"),"identity"])""",
2165
+ """C2xC2:branching_rule("C4","C2xC2","orthogonal_sum")""",
2166
+ """A1xA1xA1:branching_rule("C4","C1xD2","tensor")*branching_rule("C1xD2","A1xA1xA1",[branching_rule("C1","A1","isomorphic"),branching_rule("D2","A1xA1","isomorphic")])"""]
2167
+ elif CartanType(ct) == CartanType("C5"):
2168
+ rul = ["""A4:branching_rule("C5","A4","levi")""",
2169
+ """A1:branching_rule("C5","A1","symmetric_power")""",
2170
+ """A1xC4:branching_rule("C5","C1xC4","orthogonal_sum")*branching_rule("C1xC4","A1xC4",[branching_rule("C1","A1","isomorphic"),"identity"])""",
2171
+ """C2xC3:branching_rule("C5","C2xC3","orthogonal_sum")""",
2172
+ """A1xB2:branching_rule("C5","C1xB2","tensor")*branching_rule("C1xB2","A1xB2",[branching_rule("C1","A1","isomorphic"),"identity"])"""]
2173
+ elif CartanType(ct) == CartanType("C6"):
2174
+ rul = ["""A5:branching_rule("C6","A5","levi")""",
2175
+ """A1:branching_rule("C6","A1","symmetric_power")""",
2176
+ """A1xA3:branching_rule("C6","C1xD3","tensor")*branching_rule("C1xD3","A1xA3",[branching_rule("C1","A1","isomorphic"),branching_rule("D3","A3","isomorphic")])""",
2177
+ """A1xC2:branching_rule("C6","B1xC2","tensor")*branching_rule("B1xC2","A1xC2",[branching_rule("B1","A1","isomorphic"),"identity"])""",
2178
+ """A1xC5:branching_rule("C6","C1xC5","orthogonal_sum")*branching_rule("C1xC5","A1xC5",[branching_rule("C1","A1","isomorphic"),"identity"])""",
2179
+ """C2xC4:branching_rule("C6","C2xC4","orthogonal_sum")""",
2180
+ """C3xC3:branching_rule("C6","C3xC3","orthogonal_sum")"""]
2181
+ elif CartanType(ct) == CartanType("C7"):
2182
+ rul = ["""A6:branching_rule("C7","A6","levi")""",
2183
+ """A1:branching_rule("C7","A1","symmetric_power")""",
2184
+ """A1xB3:branching_rule("C7","C1xB3","tensor")*branching_rule("C1xB3","A1xB3",[branching_rule("C1","A1","isomorphic"),"identity"])""",
2185
+ """A1xC6:branching_rule("C7","C1xC6","orthogonal_sum")*branching_rule("C1xC6","A1xC6",[branching_rule("C1","A1","isomorphic"),"identity"])""",
2186
+ """C2xC5:branching_rule("C7","C2xC5","orthogonal_sum")""",
2187
+ """C3xC4:branching_rule("C7","C3xC4","orthogonal_sum")""",
2188
+ """C3:branching_rule("C7","C3(0,0,1)","plethysm") # overlooked by Patera and McKay"""]
2189
+ elif CartanType(ct) == CartanType("C8"):
2190
+ rul = ["""A7:branching_rule("C8","A7","levi")""",
2191
+ """A1:branching_rule("C8","A1","symmetric_power")""",
2192
+ """C2:branching_rule("C8","C2(1,1)","plethysm")""",
2193
+ """A1xD4:branching_rule("C8","C1xD4","tensor")*branching_rule("C1xD4","A1xD4",[branching_rule("C1","A1","isomorphic"),"identity"])""",
2194
+ """A1xC7:branching_rule("C8","C1xC7","orthogonal_sum")*branching_rule("C1xC7","A1xC7",[branching_rule("C1","A1","isomorphic"),"identity"])""",
2195
+ """C2xC6:branching_rule("C8","C2xC6","orthogonal_sum")""",
2196
+ """C3xC5:branching_rule("C8","C3xC5","orthogonal_sum")""",
2197
+ """C4xC4:branching_rule("C8","C4xC4","orthogonal_sum")"""]
2198
+ elif CartanType(ct) == CartanType("D4"):
2199
+ rul = ["""B3:branching_rule("D4","B3","symmetric")""",
2200
+ """A2:branching_rule("D4","A2(1,1)","plethysm")""",
2201
+ """A1xC2:branching_rule("D4","C1xC2","tensor")*branching_rule("C1xC2","A1xC2",[branching_rule("C1","A1","isomorphic"),"identity"])""",
2202
+ """A1xA1xA1xA1:branching_rule("D4","D2xD2","orthogonal_sum")*branching_rule("D2xD2","A1xA1xA1xA1",[branching_rule("D2","A1xA1","isomorphic"),branching_rule("D2","A1xA1","isomorphic")])"""]
2203
+ elif CartanType(ct) == CartanType("D5"):
2204
+ rul = ["""A4:branching_rule("D5","A4","levi")""",
2205
+ """B4:branching_rule("D5","B4","symmetric")""",
2206
+ """C2:branching_rule("D5","C2(2,0)","plethysm")""",
2207
+ """A1xA1xA3:branching_rule("D5","D2xD3","orthogonal_sum")*branching_rule("D2xD3","A1xA1xA3",[branching_rule("D2","A1xA1","isomorphic"),branching_rule("D3","A3","isomorphic")])""",
2208
+ """A1xA3:branching_rule("D5","B1xB3","orthogonal_sum")*branching_rule("B1xB3","A1xA3",[branching_rule("B1","A1","isomorphic"),"identity"])""",
2209
+ """B2xB2:branching_rule("D5","B2xB2","orthogonal_sum")"""]
2210
+ elif CartanType(ct) == CartanType("D6"):
2211
+ rul = ["""A5:branching_rule("D6","A5","levi")""",
2212
+ """B5:branching_rule("D6","B5","symmetric")""",
2213
+ """A1xA3:branching_rule("D6","C1xC3","tensor")*branching_rule("C1xC3","A1xA3",[branching_rule("C1","A1","isomorphic"),"identity"])""",
2214
+ """A1xA1xD4:branching_rule("D6","D2xD4","orthogonal_sum")*branching_rule("D2xD4","A1xA1xD4",[branching_rule("D2","A1xA1","isomorphic"),"identity"])""",
2215
+ """A3xA3:branching_rule("D6","D3xD3","orthogonal_sum")*branching_rule("D3xD3","A3xA3",[branching_rule("D3","A3","isomorphic"),branching_rule("D3","A3","isomorphic")])""",
2216
+ """A1xB4:branching_rule("D6","B1xB4","orthogonal_sum")*branching_rule("B1xB4","A1xB4",[branching_rule("B1","A1","isomorphic"),"identity"])""",
2217
+ """B2xB3:branching_rule("D6","B2xB3","orthogonal_sum")""",
2218
+ """A1xA1xA1:branching_rule("D6","B1xD2","tensor")*branching_rule("B1xD2","A1xA1xA1",[branching_rule("B1","A1","isomorphic"),branching_rule("D2","A1xA1","isomorphic")])"""]
2219
+ elif CartanType(ct) == CartanType("D7"):
2220
+ rul = ["""A6:branching_rule("D7","A6","levi")""",
2221
+ """B6:branching_rule("D7","B6","symmetric")""",
2222
+ """C3:branching_rule("D7","C3(0,1,0)","plethysm")""",
2223
+ """C2:branching_rule("D7","C2(0,2)","plethysm")""",
2224
+ """G2:branching_rule("D7","G2(0,1)","plethysm")""",
2225
+ """A1xA1xD5:branching_rule("D7","D2xD5","orthogonal_sum")*branching_rule("D2xD5","A1xA1xD5",[branching_rule("D2","A1xA1","isomorphic"),"identity"])""",
2226
+ """A3xD4:branching_rule("D7","D3xD4","orthogonal_sum")*branching_rule("D3xD4","A3xD4",[branching_rule("D3","A3","isomorphic"),"identity"])""",
2227
+ """A1xB5:branching_rule("D7","B1xB5","orthogonal_sum")*branching_rule("B1xB5","A1xB5",[branching_rule("B1","A1","isomorphic"),"identity"])""",
2228
+ """B2xB4:branching_rule("D7","B2xB4","orthogonal_sum")""",
2229
+ """B3xB3:branching_rule("D7","B3xB3","orthogonal_sum")"""]
2230
+ elif CartanType(ct) == CartanType("D8"):
2231
+ rul = ["""A7:branching_rule("D8","A7","levi")""",
2232
+ """B7:branching_rule("D8","B7","symmetric")""",
2233
+ """B4:branching_rule("D8","B4(0,0,0,1)","plethysm")""",
2234
+ """A1xC4:branching_rule("D8","C1xC4","tensor")*branching_rule("C1xC4","A1xC4",[branching_rule("C1","A1","isomorphic"),"identity"])""",
2235
+ """A1xA1xD6:branching_rule("D8","D2xD6","orthogonal_sum")*branching_rule("D2xD6","A1xA1xD6",[branching_rule("D2","A1xA1","isomorphic"),"identity"])""",
2236
+ """A3xD5:branching_rule("D8","D3xD5","orthogonal_sum")*branching_rule("D3xD5","A3xD5",[branching_rule("D3","A3","isomorphic"),"identity"])""",
2237
+ """D4xD4:branching_rule("D8","D4xD4","orthogonal_sum")""",
2238
+ """A1xB6:branching_rule("D8","B1xB6","orthogonal_sum")*branching_rule("B1xB6","A1xB6",[branching_rule("B1","A1","isomorphic"),"identity"])""",
2239
+ """B2xB5:branching_rule("D8","B2xB5","orthogonal_sum")""",
2240
+ """B3xB4:branching_rule("D8","B3xB4","orthogonal_sum")""",
2241
+ """C2xC2:branching_rule("D8","C2xC2","tensor")"""]
2242
+ elif CartanType(ct) == CartanType("G2"):
2243
+ rul = ["""A2:branching_rule("G2","A2","extended")""",
2244
+ """A1:branching_rule("G2","A1","i")""",
2245
+ """A1xA1:branching_rule("G2","A1xA1","extended")"""]
2246
+ elif CartanType(ct) == CartanType("F4"):
2247
+ rul = ["""B4:branching_rule("F4","B4","extended")""",
2248
+ """A1:branching_rule("F4","A1","ii")""",
2249
+ """A1xG2:branching_rule("F4","A1xG2","miscellaneous")""",
2250
+ """A1xC3:branching_rule("F4","A1xC3","extended")""",
2251
+ """A2xA2:branching_rule("F4","A2xA2","extended")"""]
2252
+ elif CartanType(ct) == CartanType("E6"):
2253
+ rul = ["""D5:branching_rule("E6","D5","levi")""",
2254
+ """C4:branching_rule("E6","C4","symmetric")""",
2255
+ """F4:branching_rule("E6","F4","symmetric")""",
2256
+ """A2:branching_rule("E6","A2","miscellaneous")""",
2257
+ """G2:branching_rule("E6","G2","miscellaneous")""",
2258
+ """A2xG2:branching_rule("E6","A2xG2","miscellaneous")""",
2259
+ """A1xA5:branching_rule("E6","A1xA5","extended")""",
2260
+ """A2xA2xA2:branching_rule("E6","A2xA2xA2","extended")"""]
2261
+ elif CartanType(ct) == CartanType("E7"):
2262
+ rul = ["""A7:branching_rule("E7","A7","extended")""",
2263
+ """E6:branching_rule("E7","E6","levi")""",
2264
+ """A2:branching_rule("E7","A2","miscellaneous")""",
2265
+ """A1:branching_rule("E7","A1","iii")""",
2266
+ """A1:branching_rule("E7","A1","iv")""",
2267
+ """A1xF4:branching_rule("E7","A1xF4","miscellaneous")""",
2268
+ """G2xC3:branching_rule("E7","G2xC3","miscellaneous")""",
2269
+ """A1xG2:branching_rule("E7","A1xG2","miscellaneous")""",
2270
+ """A1xA1:branching_rule("E7","A1xA1","miscellaneous")""",
2271
+ """A1xD6:branching_rule("E7","A1xD6","extended")""",
2272
+ """A5xA2:branching_rule("E7","A5xA2","extended")"""]
2273
+ elif CartanType(ct) == CartanType("E8"):
2274
+ rul = ["""A4xA4:branching_rule("E8","A4xA4","extended")""",
2275
+ """G2xF4:branching_rule("E8","G2xF4","miscellaneous")""",
2276
+ """E6xA2:branching_rule("E8","E6xA2","extended")""",
2277
+ """E7xA1:branching_rule("E8","E7xA1","extended")""",
2278
+ """D8:branching_rule("E8","D8","extended")""",
2279
+ """A8:branching_rule("E8","A8","extended")""",
2280
+ """B2:branching_rule("E8","B2","miscellaneous")""",
2281
+ """A1xA2:branching_rule("E8","A1xA2","miscellaneous")""",
2282
+ """A1:branching_rule("E8","A1","v")""",
2283
+ """A1:branching_rule("E8","A1","vi")""",
2284
+ """A1:branching_rule("E8","A1","vii")"""]
2285
+ else:
2286
+ raise ValueError("Argument must be an irreducible classical Cartan Type with rank less than or equal to 8")
2287
+ if mode == "print_rules":
2288
+ for line in rul:
2289
+ print(line)
2290
+ elif mode == "get_rule":
2291
+ d = {}
2292
+ for line in rul:
2293
+ [k, br] = line.split(":")
2294
+ br = eval(br)
2295
+ if k in d:
2296
+ if not isinstance(d[k], list):
2297
+ d[k] = [d[k]]
2298
+ d[k].append(br)
2299
+ else:
2300
+ d[k] = br
2301
+ return d