Skip to content

schubmult.symbolic.symmetric_polynomials.functions

Expression-level utilities for symbolic elementary symmetric polynomials.

The accessors genvars/coeffvars/degree/numvars see through SymEngine PyFunction wrappers; split_out_vars/pull_out_vars map the corresponding E methods over a whole expression tree; canonicalize_elem_syms rewrites products of E factors into a normal form (each factor of full degree p == k, grouped by first coefficient variable).

genvars

def genvars(obj)

obj.genvars, unwrapping a SymEngine PyFunction if needed.

coeffvars

def coeffvars(obj)

obj.coeffvars, unwrapping a SymEngine PyFunction if needed.

degree

def degree(obj)

The degree p of an elementary symmetric atom (unwrapping if needed).

numvars

def numvars(obj)

The variable count k of an elementary symmetric atom (unwrapping if needed).

canonicalize_elem_syms

def canonicalize_elem_syms(expr, combine_equal=False)

Normal form for expressions in FactorialElemSym: split every factor with p < k in half until all factors have p == k, then within each product regroup factors sharing a first coefficient variable (merging them into one factor if combine_equal).

canonicalize_elem_syms_coeff

def canonicalize_elem_syms_coeff(expr, combine_equal=False)

canonicalize_elem_syms splitting on coefficient variables instead of generators.

split_out_vars

def split_out_vars(expr, vars1, vars2)

Apply split_out_vars(vars1, vars2) to every elementary symmetric atom in expr.

pull_out_vars

def pull_out_vars(expr, var1, var2, min_degree=1)

Apply pull_out_vars(var1, var2, min_degree) to every elementary symmetric atom in expr.

elem_sym_unify

def elem_sym_unify(expr, arg=None)

Recursively walk expr (currently a structural no-op; the pattern-based unification is commented out).