# Computation of the Frobenius polynomial using Newton’s identities#

sage.schemes.cyclic_covers.charpoly_frobenius.charpoly_frobenius(frob_matrix, charpoly_prec, p, weight, a=1, known_factor=[1])[source]#

Return the characteristic polynomial of the given Frobenius matrix.

INPUT:

• frob_matrix – a matrix representing the Frobenius matrix up to some precision

• charpoly_prec – a vector ai, such that, frob_matrix.change_ring(ZZ).charpoly()[i] will be correct mod $$p^ai$$, this can be easily deduced from the Hodge numbers and knowing the q-adic precision of frob_matrix

• p – prime $$p$$

• weight – weight of the motive

• a$$p = q^a$$

• known_factor – the list of coefficients of the known factor

OUTPUT:

A list of integers corresponding to the characteristic polynomial of the Frobenius action.

EXAMPLES:

sage: from sage.schemes.cyclic_covers.charpoly_frobenius import charpoly_frobenius
sage: M = Matrix([[O(17), 8 + O(17)], [O(17), 15 + O(17)]])
sage: charpoly_frobenius(M, [2, 1, 1], 17, 1, 1)
[17, 2, 1]

sage: R = Zq(17**2, names=('a',))
sage: M = Matrix(R, [[8*17 + 16*17**2 + O(17**3), 8 + 11*17 + O(17**2)],
....:                [7*17**2 + O(17**3), 15 + 8*17 + O(17**2)]])
sage: charpoly_frobenius(M*M, [3, 2, 2], 17, 1, 2)
[289, 30, 1]

sage: M = Matrix([[8*31 + 8*31**2 + O(31**3), O(31**3), O(31**3), O(31**3)],
....:             [O(31**3), 23*31 + 22*31**2 + O(31**3), O(31**3), O(31**3)],
....:             [O(31**3), O(31**3), 27 + 7*31 + O(31**3), O(31**3)],
....:             [O(31**3), O(31**3), O(31**3), 4 + 23*31 + O(31**3)]])
sage: charpoly_frobenius(M, [4, 3, 2, 2, 2], 31, 1, 1)
[961, 0, 46, 0, 1]

sage: M = Matrix([(4*43^2 + O(43^3), 17*43 + 11*43^2 + O(43^3), O(43^3), O(43^3), 17 + 37*43 + O(43^3), O(43^3)),
....:             (30*43 + 23*43^2 + O(43^3), 5*43 + O(43^3), O(43^3), O(43^3), 3 + 38*43 + O(43^3), O(43^3)),
....:             (O(43^3), O(43^3), 9*43 + 32*43^2 + O(43^3), 13 + 25*43 + O(43^3), O(43^3), 17 + 18*43 + O(43^3)),
....:             (O(43^3), O(43^3), 22*43 + 25*43^2 + O(43^3), 11 + 24*43 + O(43^3), O(43^3), 36 + 5*43 + O(43^3)),
....:             (42*43 + 15*43^2 + O(43^3), 22*43 + 8*43^2 + O(43^3), O(43^3), O(43^3), 29 + 4*43 + O(43^3), O(43^3)),
....:             (O(43^3), O(43^3), 6*43 + 19*43^2 + O(43^3), 8 + 24*43 + O(43^3), O(43^3), 31 + 42*43 + O(43^3))])
sage: charpoly_frobenius(M, [5, 4, 3, 2, 2, 2, 2], 43, 1, 1)
[79507, 27735, 6579, 1258, 153, 15, 1]

sage: M = Matrix([(1 + O(4999), O(4999), 0, 0),
....:             (O(4999), 4860 + O(4999), 0, 0),
....:             (0, 0, O(4999), O(4999)),
....:             (0, 0, O(4999), 1 + O(4999))])
sage: charpoly_frobenius(M, [2, 1, 1], 4999, 1, 1, [1, -2, 1])
[4999, 139, 1]
>>> from sage.all import *
>>> from sage.schemes.cyclic_covers.charpoly_frobenius import charpoly_frobenius
>>> M = Matrix([[O(Integer(17)), Integer(8) + O(Integer(17))], [O(Integer(17)), Integer(15) + O(Integer(17))]])
>>> charpoly_frobenius(M, [Integer(2), Integer(1), Integer(1)], Integer(17), Integer(1), Integer(1))
[17, 2, 1]

>>> R = Zq(Integer(17)**Integer(2), names=('a',))
>>> M = Matrix(R, [[Integer(8)*Integer(17) + Integer(16)*Integer(17)**Integer(2) + O(Integer(17)**Integer(3)), Integer(8) + Integer(11)*Integer(17) + O(Integer(17)**Integer(2))],
...                [Integer(7)*Integer(17)**Integer(2) + O(Integer(17)**Integer(3)), Integer(15) + Integer(8)*Integer(17) + O(Integer(17)**Integer(2))]])
>>> charpoly_frobenius(M*M, [Integer(3), Integer(2), Integer(2)], Integer(17), Integer(1), Integer(2))
[289, 30, 1]

>>> M = Matrix([[Integer(8)*Integer(31) + Integer(8)*Integer(31)**Integer(2) + O(Integer(31)**Integer(3)), O(Integer(31)**Integer(3)), O(Integer(31)**Integer(3)), O(Integer(31)**Integer(3))],
...             [O(Integer(31)**Integer(3)), Integer(23)*Integer(31) + Integer(22)*Integer(31)**Integer(2) + O(Integer(31)**Integer(3)), O(Integer(31)**Integer(3)), O(Integer(31)**Integer(3))],
...             [O(Integer(31)**Integer(3)), O(Integer(31)**Integer(3)), Integer(27) + Integer(7)*Integer(31) + O(Integer(31)**Integer(3)), O(Integer(31)**Integer(3))],
...             [O(Integer(31)**Integer(3)), O(Integer(31)**Integer(3)), O(Integer(31)**Integer(3)), Integer(4) + Integer(23)*Integer(31) + O(Integer(31)**Integer(3))]])
>>> charpoly_frobenius(M, [Integer(4), Integer(3), Integer(2), Integer(2), Integer(2)], Integer(31), Integer(1), Integer(1))
[961, 0, 46, 0, 1]

>>> M = Matrix([(Integer(4)*Integer(43)**Integer(2) + O(Integer(43)**Integer(3)), Integer(17)*Integer(43) + Integer(11)*Integer(43)**Integer(2) + O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3)), Integer(17) + Integer(37)*Integer(43) + O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3))),
...             (Integer(30)*Integer(43) + Integer(23)*Integer(43)**Integer(2) + O(Integer(43)**Integer(3)), Integer(5)*Integer(43) + O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3)), Integer(3) + Integer(38)*Integer(43) + O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3))),
...             (O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3)), Integer(9)*Integer(43) + Integer(32)*Integer(43)**Integer(2) + O(Integer(43)**Integer(3)), Integer(13) + Integer(25)*Integer(43) + O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3)), Integer(17) + Integer(18)*Integer(43) + O(Integer(43)**Integer(3))),
...             (O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3)), Integer(22)*Integer(43) + Integer(25)*Integer(43)**Integer(2) + O(Integer(43)**Integer(3)), Integer(11) + Integer(24)*Integer(43) + O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3)), Integer(36) + Integer(5)*Integer(43) + O(Integer(43)**Integer(3))),
...             (Integer(42)*Integer(43) + Integer(15)*Integer(43)**Integer(2) + O(Integer(43)**Integer(3)), Integer(22)*Integer(43) + Integer(8)*Integer(43)**Integer(2) + O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3)), Integer(29) + Integer(4)*Integer(43) + O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3))),
...             (O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3)), Integer(6)*Integer(43) + Integer(19)*Integer(43)**Integer(2) + O(Integer(43)**Integer(3)), Integer(8) + Integer(24)*Integer(43) + O(Integer(43)**Integer(3)), O(Integer(43)**Integer(3)), Integer(31) + Integer(42)*Integer(43) + O(Integer(43)**Integer(3)))])
>>> charpoly_frobenius(M, [Integer(5), Integer(4), Integer(3), Integer(2), Integer(2), Integer(2), Integer(2)], Integer(43), Integer(1), Integer(1))
[79507, 27735, 6579, 1258, 153, 15, 1]

>>> M = Matrix([(Integer(1) + O(Integer(4999)), O(Integer(4999)), Integer(0), Integer(0)),
...             (O(Integer(4999)), Integer(4860) + O(Integer(4999)), Integer(0), Integer(0)),
...             (Integer(0), Integer(0), O(Integer(4999)), O(Integer(4999))),
...             (Integer(0), Integer(0), O(Integer(4999)), Integer(1) + O(Integer(4999)))])
>>> charpoly_frobenius(M, [Integer(2), Integer(1), Integer(1)], Integer(4999), Integer(1), Integer(1), [Integer(1), -Integer(2), Integer(1)])
[4999, 139, 1]