Macaulay2 » Documentation
Packages » AssociativeAlgebras :: toRationalFunction
next | previous | forward | backward | up | index | toc

toRationalFunction -- Attempt to find a rational function representation.

Synopsis

Description

This function attempts to find a rational function representation of the (ordinary) generating function given by the list of integers input in coeffs. The return value is an ordered triple, given by the numerator of the rational function, the denominator of the rational function, and an expression representing the quotient of these two items.

If no rational representation could be found, null is returned.

i1 : toRationalFunction {1,3,6,10,15,21}
i2 : toRationalFunction {1,3,6,10,15,21,28}

                    2    3      1
o2 = (1, 1 - 3T + 3T  - T , --------)
                                   3
                            (1 - T)

o2 : Sequence
i3 : toRationalFunction apply(10, i -> binomial(i+3,3))

                    2     3    4      1
o3 = (1, 1 - 4T + 6T  - 4T  + T , --------)
                                         4
                                  (1 - T)

o3 : Sequence

This method is used in the ncHilbertSeries method, but may also be used to find rational expressions of Poincare series:

i4 : A = QQ[x,y]/ideal{x^2,x*y}

o4 = A

o4 : QuotientRing
i5 : kRes = res(coker vars A, LengthLimit => 10);
i6 : kBetti = apply(10, i -> numcols kRes.dd_i)

o6 = {1, 2, 3, 5, 8, 13, 21, 34, 55, 89}

o6 : List
i7 : toRationalFunction kBetti

                      2      1 + T
o7 = (1 + T, 1 - T - T , ------------)
                                   2
                         (1 - T - T )

o7 : Sequence

Ways to use toRationalFunction :

For the programmer

The object toRationalFunction is a method function.