additive_multivariate_generating_series
#
Additive rational multivariate functions
This module implements the algebra generated by rational functions of the form
\[\frac{P}{\prod L_i^{d_i}}\]
where the L_i are linear forms (ie homogeneous degree one) and d_i are positive integers.
- class surface_dynamics.misc.additive_multivariate_generating_series.AdditiveMultivariateGeneratingSeries(parent, data, allow_multiple=False, check=True)#
EXAMPLES:
sage: from surface_dynamics.misc.additive_multivariate_generating_series import AdditiveMultivariateGeneratingSeriesRing sage: A = AdditiveMultivariateGeneratingSeriesRing('x', 3)
- factor()#
Group all the partial fractions into a unique fraction.
EXAMPLES:
sage: from surface_dynamics.misc.additive_multivariate_generating_series import AdditiveMultivariateGeneratingSeriesRing sage: A = AdditiveMultivariateGeneratingSeriesRing('x', 3) sage: f = A.term(1, [([1,3,0],1),([1,0,-1],1)]) sage: g = A.term(1, [([1,1,0],1),([1,0,-1],2)]) sage: (f + g).factor() (x0^2 + x0*x1 - x0*x2 - x1*x2 + x0 + 3*x1)/((x0 - x2)^2*(x0 + x1)*(x0 + 3*x1))
Simplification:
sage: x0, x1, x2 = A.polynomial_ring().gens() sage: f1 = A.term(1, [([1,0,0],1)]) sage: f2 = A.term(1, [([0,1,0],1)]) sage: f3 = A.term(x0 + x1, [([1,0,0],1), ([0,1,0],1)]) sage: (f1 + f2 - f3).factor() 0 sage: f1 + f2 == f3 # indirect doctest True
- integral_sum_as_mzv()#
Make the sum over all possible positive integers and express the result as a linear combination of multiple zeta values.
EXAMPLES:
sage: from surface_dynamics.misc.additive_multivariate_generating_series import AdditiveMultivariateGeneratingSeriesRing sage: A = AdditiveMultivariateGeneratingSeriesRing('x', 3) sage: f = A.term(1, [((1,0,0),2), ((0,1,0),2), ((0,0,1),2)]) sage: f.integral_sum_as_mzv() 36*ζ(1,1,4) + 24*ζ(1,2,3) + 12*ζ(1,3,2) + 12*ζ(2,1,3) + 6*ζ(2,2,2)
- subs(*args, **kwds)#
Variable substitution by linear forms.
EXAMPLES:
sage: from surface_dynamics.misc.additive_multivariate_generating_series import AdditiveMultivariateGeneratingSeriesRing sage: A = AdditiveMultivariateGeneratingSeriesRing('x', 2) sage: R = A.polynomial_ring() sage: x0, x1 = R.gens() sage: f = A.term(x0 - x1, [((1,0), 1), ((1,1),2)]) + A.term(2, [((1,0), 2), ((1,2),3)]) sage: f (x0 - x1)/((x0)*(x0 + x1)^2) + (2)/((x0)^2*(x0 + 2*x1)^3) sage: f.subs(x0=x0+x1) (x0)/((x0 + x1)*(x0 + 2*x1)^2) + (2)/((x0 + x1)^2*(x0 + 3*x1)^3) sage: f.subs(x1=x0) (2)/((x0)^2*(3*x0)^3) sage: f.subs(x0=1) Traceback (most recent call last): ... ValueError: only homogeneous degree 1 substitution are allowed sage: f.subs(x0=x0*x1) Traceback (most recent call last): ... ValueError: only homogeneous degree 1 substitution are allowed
- to_rational_function(R=None)#
Return the multivariate rational function corresponding to this element.
EXAMPLES:
sage: from surface_dynamics.misc.additive_multivariate_generating_series import AdditiveMultivariateGeneratingSeriesRing sage: A = AdditiveMultivariateGeneratingSeriesRing('x', 3) sage: x0, x1, x2 = A.polynomial_ring().gens() sage: f1 = A.term(1, [((1,0,0),2), ((0,1,0),2), ((0,0,1),2)]) sage: f2 = A.term(x0*x1 - 1, [((1,1,1),3)]) sage: g = (f1 + f2).to_rational_function() sage: g (x0^3*x1^3*x2^2 - x0^2*x1^2*x2^2 + x0^3 + 3*x0^2*x1 + 3*x0*x1^2 + x1^3 + 3*x0^2*x2 + 6*x0*x1*x2 + 3*x1^2*x2 + 3*x0*x2^2 + 3*x1*x2^2 + x2^3)/(x0^5*x1^2*x2^2 + 3*x0^4*x1^3*x2^2 + 3*x0^3*x1^4*x2^2 + x0^2*x1^5*x2^2 + 3*x0^4*x1^2*x2^3 + 6*x0^3*x1^3*x2^3 + 3*x0^2*x1^4*x2^3 + 3*x0^3*x1^2*x2^4 + 3*x0^2*x1^3*x2^4 + x0^2*x1^2*x2^5) sage: f1.to_rational_function() + f2.to_rational_function() == g True
- class surface_dynamics.misc.additive_multivariate_generating_series.AdditiveMultivariateGeneratingSeriesRing(poly_ring)#
- Element#
alias of
AdditiveMultivariateGeneratingSeries