Monomial expansion of \((aX + bY)^i (cX + dY)^{j-i}\) - Modular Symbols

Skip to content
Back to top
View this page
Edit this page

# Monomial expansion of \((aX + bY)^i (cX + dY)^{j-i}\)

class sage.modular.modsym.apply.Apply

  Bases: `object`

sage.modular.modsym.apply.apply_to_monomial(i, j, a, b, c, d)

  Return a list of the coefficients of

  \[(aX + bY)^i (cX + dY)^{j-i},\]

  where \(0 \leq i \leq j\), and \(a\), \(b\), \(c\), \(d\) are integers.

  One should think of \(j\) as being \(k-2\) for the application to modular symbols.

  INPUT:

  - i, j, a, b, c, d – all ints

  OUTPUT:

  list of ints, which are the coefficients of \(Y^j, Y^{j-1}X, \ldots, X^j\), respectively.

  EXAMPLES:

  We compute that \((X+Y)^2(X-Y) = X^3 + X^2Y - XY^2 - Y^3\):

  Sage

      sage: from sage.modular.modsym.apply import apply_to_monomial
      sage: apply_to_monomial(2, 3, 1,1,1,-1)
      [-1, -1, 1, 1]
      sage: apply_to_monomial(5, 8, 1,2,3,4)
      [2048, 9728, 20096, 23584, 17200, 7984, 2304, 378, 27]
      sage: apply_to_monomial(6,12, 1,1,1,-1)
      [1, 0, -6, 0, 15, 0, -20, 0, 15, 0, -6, 0, 1]

  Python

      >>> from sage.all import *
      >>> from sage.modular.modsym.apply import apply_to_monomial
      >>> apply_to_monomial(Integer(2), Integer(3), Integer(1),Integer(1),Integer(1),-Integer(1))
      [-1, -1, 1, 1]
      >>> apply_to_monomial(Integer(5), Integer(8), Integer(1),Integer(2),Integer(3),Integer(4))
      [2048, 9728, 20096, 23584, 17200, 7984, 2304, 378, 27]
      >>> apply_to_monomial(Integer(6),Integer(12), Integer(1),Integer(1),Integer(1),-Integer(1))
      [1, 0, -6, 0, 15, 0, -20, 0, 15, 0, -6, 0, 1]