symfn¶
A library for computing with symmetric functions, built on a Rust core: the six classical bases and every transition between them, the Hall–Littlewood, Macdonald, LLT, and Jack families above them, and Schubert polynomials.
>>> from symfn import s, h, macdonald, jack
>>> s([2, 1]) * s([1])
s[2,1,1] + s[2,2] + s[3,1]
>>> h([2, 1]).to("s")
s[2,1] + s[3]
>>> macdonald.P([2]).at(q=5, t=5) == s([2]).to("m")
True
>>> jack.P([2]).to("m")
2/(alpha + 1)*m[1,1] + m[2]
Every value is exact or the call fails: coefficients are Python int of any
size and Fraction where a denominator exists, nothing is rounded, and a
computation that cannot be exact raises rather than approximating.
The test suite checks computed values against reference output from
independent software — fixtures produced by Sage and lrcalc,
committed to the tree.
Two interface layers¶
The convenience layer is what most users want and provides a more
usable high-level interface at the expense of some overhead. The
primary class is Sym representing a symmetric function that knows
which basis it is written in.
The contract layer is the low-level compiled module underneath:
whole-object entry points which use plain (partition, coefficient)
pairs. Use this if you are marshalling objects in bulk, or building
another library on top of this. This layer changes slowly and
deliberately.
The computation uses the same compiled kernel either way — the convenience layer only shapes arguments and wraps results — so the two layers agree on every value, and the contract layer just skips the object construction.
Guide
Reference
- The convenience layer
- The parameter families
- The contract layer
PartitionPartitionArgLltShapeArgPermutationPermutationArgElementElementArgRationalElementMonomialsIndexedElementSchubertElementSchubertElementArgTCoefficientQtCoefficientQtCoefficientArgTCoefficientArgTElementTElementArgQtElementQtElementArgMacdonaldElementMacdonaldElementArgQtAtomsQtAtomsArgHtElementHtElementArgRatQtCoefficientRatQtElementRatMacdonaldElementRatHtElementAlphaAtomsJackCellJackElementJackElementArgBTableEdgeshall_littlewood()hall_littlewood_table()kostka_foulkes()kostka_foulkes_column()kostka_foulkes_table()hall_littlewood_p()hall_littlewood_p_table()schur_to_hall_littlewood_p()schur_to_hall_littlewood_qp()hall_littlewood_p_to_schur()hall_littlewood_qp_to_schur()macdonald_p()macdonald_q()macdonald_j()schur_in_macdonald_j()schur_to_macdonald_j()monomial_to_macdonald_p()monomial_to_macdonald_q()macdonald_p_to_monomial()macdonald_q_to_monomial()macdonald_j_to_monomial()macdonald_element_add()macdonald_element_scale()jack_p()jack_q()jack_j()monomial_to_jack_p()monomial_to_jack_q()monomial_to_jack_j()jack_p_to_monomial()jack_q_to_monomial()jack_j_to_monomial()jack_element_add()jack_element_scale()jack_table()jack_j_powersum()jack_norm_j()jack_scalar()jack_structure_constant()stanley_table()zonal()gj_connection_tables()class_algebra_coefficient()qt_kostka()qt_kostka_column()qt_kostka_table()macdonald_ht()schur_to_macdonald_ht()macdonald_ht_to_schur()macdonald_ht_element_add()macdonald_ht_element_scale()nabla_e()delta_prime_e()nabla()nabla_power()delta_ek()delta_prime_ek()theta_ek()big_pi()delta_conjecture_side()llt_gtilde()llt_h()llt_h_tilde()llt_g_lt()llt_h_table()monomial_in_llt_h_table()monomial_in_llt_h_tilde_table()llt_gtilde_table()llt_schur()llt_g()llt_min_inv()llt_fundamental()llt_kl_column()llt_graph()chromatic_from_llt()llt_e_expansion()htilde_by_llt()nabla_e_by_path()k_core_quotient()clear_caches()cache_stats()cache_budget()set_cache_budget()schur_multiply()st_multiply()reduced_kronecker_product()reduced_kronecker()schur_to_st()st_to_schur()ht_multiply()schur_to_ht()ht_to_schur()lr_coefficient()schur_to_homogeneous()schur_to_elementary()schur_to_monomial()schur_to_forgotten()to_power()homogeneous_to_schur()elementary_to_schur()monomial_to_schur()forgotten_to_schur()power_to_schur()plethysm()kostka_number()evaluate_schur()expand_alphabet()monomial_multiply()semistandard_tableaux()dimension()principal_specialization()principal_specialization_q()character_value()internal_product()partitions()kronecker_coefficient()convert_indexed()convert_terms()convert_qt_terms()schur_multiply_qt()schur_multiply_macdonald()schur_multiply_jack()schur_multiply_ht()omega_qt_terms()antipode_qt_terms()omega_macdonald_terms()antipode_macdonald_terms()omega_jack_terms()antipode_jack_terms()omega_ht_terms()antipode_ht_terms()skew_by_qt()skew_by_macdonald()skew_by_jack()skew_by_ht()hall_inner_product_qt()hall_inner_product_macdonald()hall_inner_product_jack()hall_inner_product_ht()scalar_t()scalar_qt()scalar_qt_ht()coproduct_qt()coproduct_macdonald()coproduct_jack()coproduct_ht()expand_qt()expand_macdonald()expand_jack()expand_ht()evaluate_qt()evaluate_macdonald()evaluate_jack()evaluate_ht()dimension_qt()dimension_macdonald()dimension_jack()dimension_ht()principal_specialization_qt()principal_specialization_macdonald()principal_specialization_jack()principal_specialization_ht()principal_specialization_q_qt()principal_specialization_at_qt()principal_specialization_at_macdonald()principal_specialization_at_jack()principal_specialization_at_ht()internal_product_qt()internal_product_macdonald()internal_product_jack()internal_product_ht()plethysm_qt()plethysm_macdonald()plethysm_jack()plethysm_ht()convert_macdonald_terms()convert_jack_terms()convert_ht_terms()to_power_qt()to_power_macdonald()to_power_jack()to_power_ht()character_table()kostka_table()omega()hall_inner_product()skew_schur()skew_by()coproduct()antipode()schubert_multiply()schubert_multiply_variable()schubert_divided_difference()schubert_divided_difference_perm()schubert_expand()polynomial_to_schubert()schubert_pairing()schubert_scalar_product()schubert_dimension()schubert_coefficient()schubert_monomial_mass()schubert_to_stanley_schur()