Hypergeometric motives

This is largely a port of the corresponding package in Magma. One important conventional difference: the motivic parameter \(t\) has been replaced with \(1/t\) to match the classical literature on hypergeometric series. (E.g., see [BeukersHeckman])

The computation of Euler factors is currently only supported for primes \(p\) of good or tame reduction.

AUTHORS:

  • Frédéric Chapoton

  • Kiran S. Kedlaya

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(cyclotomic=([30], [1,2,3,5]))
sage: H.alpha_beta()
([1/30, 7/30, 11/30, 13/30, 17/30, 19/30, 23/30, 29/30],
 [0, 1/5, 1/3, 2/5, 1/2, 3/5, 2/3, 4/5])
sage: H.M_value() == 30**30 / (15**15 * 10**10 * 6**6)
True
sage: H.euler_factor(2, 7)
T^8 + T^5 + T^3 + 1
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(cyclotomic=([Integer(30)], [Integer(1),Integer(2),Integer(3),Integer(5)]))
>>> H.alpha_beta()
([1/30, 7/30, 11/30, 13/30, 17/30, 19/30, 23/30, 29/30],
 [0, 1/5, 1/3, 2/5, 1/2, 3/5, 2/3, 4/5])
>>> H.M_value() == Integer(30)**Integer(30) / (Integer(15)**Integer(15) * Integer(10)**Integer(10) * Integer(6)**Integer(6))
True
>>> H.euler_factor(Integer(2), Integer(7))
T^8 + T^5 + T^3 + 1
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(cyclotomic=([30], [1,2,3,5]))
H.alpha_beta()
H.M_value() == 30**30 / (15**15 * 10**10 * 6**6)
H.euler_factor(2, 7)

REFERENCES:

class sage.modular.hypergeometric_motive.HypergeometricData(cyclotomic=None, alpha_beta=None, gamma_list=None)[source]

Bases: object

Creation of hypergeometric motives.

INPUT:

Three possibilities are offered, each describing a quotient of products of cyclotomic polynomials.

  • cyclotomic – a pair of lists of nonnegative integers, each integer \(k\) represents a cyclotomic polynomial \(\Phi_k\)

  • alpha_beta – a pair of lists of rationals, each rational represents a root of unity

  • gamma_list – a pair of lists of nonnegative integers, each integer \(n\) represents a polynomial \(x^n - 1\)

In the last case, it is also allowed to send just one list of signed integers where signs indicate to which part the integer belongs to.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: Hyp(cyclotomic=([2], [1]))
Hypergeometric data for [1/2] and [0]

sage: Hyp(alpha_beta=([1/2], [0]))
Hypergeometric data for [1/2] and [0]
sage: Hyp(alpha_beta=([1/5,2/5,3/5,4/5], [0,0,0,0]))
Hypergeometric data for [1/5, 2/5, 3/5, 4/5] and [0, 0, 0, 0]

sage: Hyp(gamma_list=([5], [1,1,1,1,1]))
Hypergeometric data for [1/5, 2/5, 3/5, 4/5] and [0, 0, 0, 0]
sage: Hyp(gamma_list=([5,-1,-1,-1,-1,-1]))
Hypergeometric data for [1/5, 2/5, 3/5, 4/5] and [0, 0, 0, 0]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> Hyp(cyclotomic=([Integer(2)], [Integer(1)]))
Hypergeometric data for [1/2] and [0]

>>> Hyp(alpha_beta=([Integer(1)/Integer(2)], [Integer(0)]))
Hypergeometric data for [1/2] and [0]
>>> Hyp(alpha_beta=([Integer(1)/Integer(5),Integer(2)/Integer(5),Integer(3)/Integer(5),Integer(4)/Integer(5)], [Integer(0),Integer(0),Integer(0),Integer(0)]))
Hypergeometric data for [1/5, 2/5, 3/5, 4/5] and [0, 0, 0, 0]

>>> Hyp(gamma_list=([Integer(5)], [Integer(1),Integer(1),Integer(1),Integer(1),Integer(1)]))
Hypergeometric data for [1/5, 2/5, 3/5, 4/5] and [0, 0, 0, 0]
>>> Hyp(gamma_list=([Integer(5),-Integer(1),-Integer(1),-Integer(1),-Integer(1),-Integer(1)]))
Hypergeometric data for [1/5, 2/5, 3/5, 4/5] and [0, 0, 0, 0]
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
Hyp(cyclotomic=([2], [1]))
Hyp(alpha_beta=([1/2], [0]))
Hyp(alpha_beta=([1/5,2/5,3/5,4/5], [0,0,0,0]))
Hyp(gamma_list=([5], [1,1,1,1,1]))
Hyp(gamma_list=([5,-1,-1,-1,-1,-1]))
E_polynomial(vars=None)[source]

Return the E-polynomial of self.

This is a bivariate polynomial.

The algorithm is taken from [FRV2019].

INPUT:

  • vars – (optional) pair of variables (default: \(u,v\))

REFERENCES:

[FRV2019]

Fernando Rodriguez Villegas, Mixed Hodge numbers and factorial ratios, arXiv 1907.02722

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData
sage: H = HypergeometricData(gamma_list=[-30, -1, 6, 10, 15])
sage: H.E_polynomial()
8*u*v + 7*u + 7*v + 8

sage: p, q = polygens(QQ,'p,q')
sage: H.E_polynomial((p, q))
8*p*q + 7*p + 7*q + 8

sage: H = HypergeometricData(gamma_list=(-11, -2, 1, 3, 4, 5))
sage: H.E_polynomial()
5*u^2*v + 5*u*v^2 + u*v + 1

sage: H = HypergeometricData(gamma_list=(-63, -8, -2, 1, 4, 16, 21, 31))
sage: H.E_polynomial()
21*u^3*v^2 + 21*u^2*v^3 + u^3*v + 23*u^2*v^2 + u*v^3 + u^2*v + u*v^2 + 2*u*v + 1
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData
>>> H = HypergeometricData(gamma_list=[-Integer(30), -Integer(1), Integer(6), Integer(10), Integer(15)])
>>> H.E_polynomial()
8*u*v + 7*u + 7*v + 8

>>> p, q = polygens(QQ,'p,q')
>>> H.E_polynomial((p, q))
8*p*q + 7*p + 7*q + 8

>>> H = HypergeometricData(gamma_list=(-Integer(11), -Integer(2), Integer(1), Integer(3), Integer(4), Integer(5)))
>>> H.E_polynomial()
5*u^2*v + 5*u*v^2 + u*v + 1

>>> H = HypergeometricData(gamma_list=(-Integer(63), -Integer(8), -Integer(2), Integer(1), Integer(4), Integer(16), Integer(21), Integer(31)))
>>> H.E_polynomial()
21*u^3*v^2 + 21*u^2*v^3 + u^3*v + 23*u^2*v^2 + u*v^3 + u^2*v + u*v^2 + 2*u*v + 1
from sage.modular.hypergeometric_motive import HypergeometricData
H = HypergeometricData(gamma_list=[-30, -1, 6, 10, 15])
H.E_polynomial()
p, q = polygens(QQ,'p,q')
H.E_polynomial((p, q))
H = HypergeometricData(gamma_list=(-11, -2, 1, 3, 4, 5))
H.E_polynomial()
H = HypergeometricData(gamma_list=(-63, -8, -2, 1, 4, 16, 21, 31))
H.E_polynomial()
H_value(p, f, t, ring=None)[source]

Return the trace of the Frobenius, computed in terms of Gauss sums using the hypergeometric trace formula.

INPUT:

  • p – a prime number

  • f – integer such that \(q = p^f\)

  • t – a rational parameter

  • ring – (default: UniversalCyclotomicfield)

The ring could be also ComplexField(n) or QQbar.

OUTPUT: integer

Warning

This is apparently working correctly as can be tested using ComplexField(70) as the value ring.

Using instead UniversalCyclotomicfield, this is much slower than the \(p\)-adic version padic_H_value().

Unlike in padic_H_value(), tame and wild primes are not supported.

EXAMPLES:

With values in the UniversalCyclotomicField (slow):

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(alpha_beta=([1/2]*4, [0]*4))
sage: [H.H_value(3,i,-1) for i in range(1,3)]
[0, -12]
sage: [H.H_value(5,i,-1) for i in range(1,3)]
[-4, 276]
sage: [H.H_value(7,i,-1) for i in range(1,3)]  # not tested
[0, -476]
sage: [H.H_value(11,i,-1) for i in range(1,3)]  # not tested
[0, -4972]
sage: [H.H_value(13,i,-1) for i in range(1,3)]  # not tested
[-84, -1420]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(alpha_beta=([Integer(1)/Integer(2)]*Integer(4), [Integer(0)]*Integer(4)))
>>> [H.H_value(Integer(3),i,-Integer(1)) for i in range(Integer(1),Integer(3))]
[0, -12]
>>> [H.H_value(Integer(5),i,-Integer(1)) for i in range(Integer(1),Integer(3))]
[-4, 276]
>>> [H.H_value(Integer(7),i,-Integer(1)) for i in range(Integer(1),Integer(3))]  # not tested
[0, -476]
>>> [H.H_value(Integer(11),i,-Integer(1)) for i in range(Integer(1),Integer(3))]  # not tested
[0, -4972]
>>> [H.H_value(Integer(13),i,-Integer(1)) for i in range(Integer(1),Integer(3))]  # not tested
[-84, -1420]
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(alpha_beta=([1/2]*4, [0]*4))
[H.H_value(3,i,-1) for i in range(1,3)]
[H.H_value(5,i,-1) for i in range(1,3)]
[H.H_value(7,i,-1) for i in range(1,3)]  # not tested
[H.H_value(11,i,-1) for i in range(1,3)]  # not tested
[H.H_value(13,i,-1) for i in range(1,3)]  # not tested

With values in ComplexField:

sage: [H.H_value(5,i,-1, ComplexField(60)) for i in range(1,3)]
[-4, 276]
>>> from sage.all import *
>>> [H.H_value(Integer(5),i,-Integer(1), ComplexField(Integer(60))) for i in range(Integer(1),Integer(3))]
[-4, 276]
[H.H_value(5,i,-1, ComplexField(60)) for i in range(1,3)]

Check issue from Issue #28404:

sage: H1 = Hyp(cyclotomic=([1,1,1], [6,2]))
sage: H2 = Hyp(cyclotomic=([6,2], [1,1,1]))
sage: [H1.H_value(5,1,i) for i in range(2,5)]
[1, -4, -4]
sage: [H2.H_value(5,1,QQ(i)) for i in range(2,5)]
[-4, 1, -4]
>>> from sage.all import *
>>> H1 = Hyp(cyclotomic=([Integer(1),Integer(1),Integer(1)], [Integer(6),Integer(2)]))
>>> H2 = Hyp(cyclotomic=([Integer(6),Integer(2)], [Integer(1),Integer(1),Integer(1)]))
>>> [H1.H_value(Integer(5),Integer(1),i) for i in range(Integer(2),Integer(5))]
[1, -4, -4]
>>> [H2.H_value(Integer(5),Integer(1),QQ(i)) for i in range(Integer(2),Integer(5))]
[-4, 1, -4]
H1 = Hyp(cyclotomic=([1,1,1], [6,2]))
H2 = Hyp(cyclotomic=([6,2], [1,1,1]))
[H1.H_value(5,1,i) for i in range(2,5)]
[H2.H_value(5,1,QQ(i)) for i in range(2,5)]

REFERENCES:

M_value()[source]

Return the \(M\) coefficient that appears in the trace formula.

OUTPUT: a rational

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(alpha_beta=([1/6,1/3,2/3,5/6], [1/8,3/8,5/8,7/8]))
sage: H.M_value()
729/4096
sage: Hyp(alpha_beta=(([1/2,1/2,1/2,1/2], [0,0,0,0]))).M_value()
256
sage: Hyp(cyclotomic=([5], [1,1,1,1])).M_value()
3125
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(alpha_beta=([Integer(1)/Integer(6),Integer(1)/Integer(3),Integer(2)/Integer(3),Integer(5)/Integer(6)], [Integer(1)/Integer(8),Integer(3)/Integer(8),Integer(5)/Integer(8),Integer(7)/Integer(8)]))
>>> H.M_value()
729/4096
>>> Hyp(alpha_beta=(([Integer(1)/Integer(2),Integer(1)/Integer(2),Integer(1)/Integer(2),Integer(1)/Integer(2)], [Integer(0),Integer(0),Integer(0),Integer(0)]))).M_value()
256
>>> Hyp(cyclotomic=([Integer(5)], [Integer(1),Integer(1),Integer(1),Integer(1)])).M_value()
3125
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(alpha_beta=([1/6,1/3,2/3,5/6], [1/8,3/8,5/8,7/8]))
H.M_value()
Hyp(alpha_beta=(([1/2,1/2,1/2,1/2], [0,0,0,0]))).M_value()
Hyp(cyclotomic=([5], [1,1,1,1])).M_value()
alpha()[source]

Return the first tuple of rational arguments.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: Hyp(alpha_beta=([1/2], [0])).alpha()
[1/2]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> Hyp(alpha_beta=([Integer(1)/Integer(2)], [Integer(0)])).alpha()
[1/2]
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
Hyp(alpha_beta=([1/2], [0])).alpha()
alpha_beta()[source]

Return the pair of lists of rational arguments.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: Hyp(alpha_beta=([1/2], [0])).alpha_beta()
([1/2], [0])
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> Hyp(alpha_beta=([Integer(1)/Integer(2)], [Integer(0)])).alpha_beta()
([1/2], [0])
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
Hyp(alpha_beta=([1/2], [0])).alpha_beta()
beta()[source]

Return the second tuple of rational arguments.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: Hyp(alpha_beta=([1/2], [0])).beta()
[0]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> Hyp(alpha_beta=([Integer(1)/Integer(2)], [Integer(0)])).beta()
[0]
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
Hyp(alpha_beta=([1/2], [0])).beta()
canonical_scheme(t=None)[source]

Return the canonical scheme.

This is a scheme that contains this hypergeometric motive in its cohomology.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(cyclotomic=([3], [4]))
sage: H.gamma_list()
[-1, 2, 3, -4]
sage: H.canonical_scheme()
Spectrum of Quotient of Multivariate Polynomial Ring
in X0, X1, Y0, Y1 over Fraction Field of Univariate Polynomial Ring
in t over Rational Field by the ideal
(X0 + X1 - 1, Y0 + Y1 - 1, (-t)*X0^2*X1^3 + 27/64*Y0*Y1^4)

sage: H = Hyp(gamma_list=[-2, 3, 4, -5])
sage: H.canonical_scheme()
Spectrum of Quotient of Multivariate Polynomial Ring
in X0, X1, Y0, Y1 over Fraction Field of Univariate Polynomial Ring
in t over Rational Field by the ideal
(X0 + X1 - 1, Y0 + Y1 - 1, (-t)*X0^3*X1^4 + 1728/3125*Y0^2*Y1^5)
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(cyclotomic=([Integer(3)], [Integer(4)]))
>>> H.gamma_list()
[-1, 2, 3, -4]
>>> H.canonical_scheme()
Spectrum of Quotient of Multivariate Polynomial Ring
in X0, X1, Y0, Y1 over Fraction Field of Univariate Polynomial Ring
in t over Rational Field by the ideal
(X0 + X1 - 1, Y0 + Y1 - 1, (-t)*X0^2*X1^3 + 27/64*Y0*Y1^4)

>>> H = Hyp(gamma_list=[-Integer(2), Integer(3), Integer(4), -Integer(5)])
>>> H.canonical_scheme()
Spectrum of Quotient of Multivariate Polynomial Ring
in X0, X1, Y0, Y1 over Fraction Field of Univariate Polynomial Ring
in t over Rational Field by the ideal
(X0 + X1 - 1, Y0 + Y1 - 1, (-t)*X0^3*X1^4 + 1728/3125*Y0^2*Y1^5)
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(cyclotomic=([3], [4]))
H.gamma_list()
H.canonical_scheme()
H = Hyp(gamma_list=[-2, 3, 4, -5])
H.canonical_scheme()

REFERENCES:

[Kat1991], section 5.4

cyclotomic_data()[source]

Return the pair of tuples of indices of cyclotomic polynomials.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: Hyp(alpha_beta=([1/2], [0])).cyclotomic_data()
([2], [1])
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> Hyp(alpha_beta=([Integer(1)/Integer(2)], [Integer(0)])).cyclotomic_data()
([2], [1])
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
Hyp(alpha_beta=([1/2], [0])).cyclotomic_data()
defining_polynomials()[source]

Return the pair of products of cyclotomic polynomials.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: Hyp(alpha_beta=([1/4,3/4], [0,0])).defining_polynomials()
(x^2 + 1, x^2 - 2*x + 1)
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> Hyp(alpha_beta=([Integer(1)/Integer(4),Integer(3)/Integer(4)], [Integer(0),Integer(0)])).defining_polynomials()
(x^2 + 1, x^2 - 2*x + 1)
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
Hyp(alpha_beta=([1/4,3/4], [0,0])).defining_polynomials()
degree()[source]

Return the degree.

This is the sum of the Hodge numbers.

See also

hodge_numbers()

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: Hyp(alpha_beta=([1/2], [0])).degree()
1
sage: Hyp(gamma_list=([2,2,4], [8])).degree()
4
sage: Hyp(cyclotomic=([5,6], [1,1,2,2,3])).degree()
6
sage: Hyp(cyclotomic=([3,8], [1,1,1,2,6])).degree()
6
sage: Hyp(cyclotomic=([3,3], [2,2,4])).degree()
4
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> Hyp(alpha_beta=([Integer(1)/Integer(2)], [Integer(0)])).degree()
1
>>> Hyp(gamma_list=([Integer(2),Integer(2),Integer(4)], [Integer(8)])).degree()
4
>>> Hyp(cyclotomic=([Integer(5),Integer(6)], [Integer(1),Integer(1),Integer(2),Integer(2),Integer(3)])).degree()
6
>>> Hyp(cyclotomic=([Integer(3),Integer(8)], [Integer(1),Integer(1),Integer(1),Integer(2),Integer(6)])).degree()
6
>>> Hyp(cyclotomic=([Integer(3),Integer(3)], [Integer(2),Integer(2),Integer(4)])).degree()
4
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
Hyp(alpha_beta=([1/2], [0])).degree()
Hyp(gamma_list=([2,2,4], [8])).degree()
Hyp(cyclotomic=([5,6], [1,1,2,2,3])).degree()
Hyp(cyclotomic=([3,8], [1,1,1,2,6])).degree()
Hyp(cyclotomic=([3,3], [2,2,4])).degree()
euler_factor(t, p, deg=None, cache_p=False)[source]

Return the Euler factor of the motive \(H_t\) at prime \(p\).

INPUT:

  • t – rational number, not 0

  • p – prime number of good reduction

  • deg – integer or None

OUTPUT: a polynomial

See [Benasque2009] for explicit examples of Euler factors.

For odd weight, the sign of the functional equation is +1. For even weight, the sign is computed by a recipe found in Section 11.1 of [Watkins].

If deg is specified, then the polynomial is only computed up to degree deg (inclusive).

The prime \(p\) may be tame, but not wild. When \(v_p(t-1)\) is nonzero and even, the Euler factor includes a linear term described in Section 11.2 of [Watkins].

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(alpha_beta=([1/2]*4, [0]*4))
sage: H.euler_factor(-1, 5)
15625*T^4 + 500*T^3 - 130*T^2 + 4*T + 1

sage: H = Hyp(gamma_list=[-6,-1,4,3])
sage: H.weight(), H.degree()
(1, 2)
sage: t = 189/125
sage: [H.euler_factor(1/t,p) for p in [11,13,17,19,23,29]]
[11*T^2 + 4*T + 1,
13*T^2 + 1,
17*T^2 + 1,
19*T^2 + 1,
23*T^2 + 8*T + 1,
29*T^2 + 2*T + 1]

sage: H = Hyp(cyclotomic=([6,2], [1,1,1]))
sage: H.weight(), H.degree()
(2, 3)
sage: [H.euler_factor(1/4,p) for p in [5,7,11,13,17,19]]
[125*T^3 + 20*T^2 + 4*T + 1,
 343*T^3 - 42*T^2 - 6*T + 1,
 -1331*T^3 - 22*T^2 + 2*T + 1,
 -2197*T^3 - 156*T^2 + 12*T + 1,
 4913*T^3 + 323*T^2 + 19*T + 1,
 6859*T^3 - 57*T^2 - 3*T + 1]

sage: H = Hyp(alpha_beta=([1/12,5/12,7/12,11/12], [0,1/2,1/2,1/2]))
sage: H.weight(), H.degree()
(2, 4)
sage: t = -5
sage: [H.euler_factor(1/t,p) for p in [11,13,17,19,23,29]]
[-14641*T^4 - 1210*T^3 + 10*T + 1,
 -28561*T^4 - 2704*T^3 + 16*T + 1,
 -83521*T^4 - 4046*T^3 + 14*T + 1,
 130321*T^4 + 14440*T^3 + 969*T^2 + 40*T + 1,
 279841*T^4 - 25392*T^3 + 1242*T^2 - 48*T + 1,
 707281*T^4 - 7569*T^3 + 696*T^2 - 9*T + 1]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(alpha_beta=([Integer(1)/Integer(2)]*Integer(4), [Integer(0)]*Integer(4)))
>>> H.euler_factor(-Integer(1), Integer(5))
15625*T^4 + 500*T^3 - 130*T^2 + 4*T + 1

>>> H = Hyp(gamma_list=[-Integer(6),-Integer(1),Integer(4),Integer(3)])
>>> H.weight(), H.degree()
(1, 2)
>>> t = Integer(189)/Integer(125)
>>> [H.euler_factor(Integer(1)/t,p) for p in [Integer(11),Integer(13),Integer(17),Integer(19),Integer(23),Integer(29)]]
[11*T^2 + 4*T + 1,
13*T^2 + 1,
17*T^2 + 1,
19*T^2 + 1,
23*T^2 + 8*T + 1,
29*T^2 + 2*T + 1]

>>> H = Hyp(cyclotomic=([Integer(6),Integer(2)], [Integer(1),Integer(1),Integer(1)]))
>>> H.weight(), H.degree()
(2, 3)
>>> [H.euler_factor(Integer(1)/Integer(4),p) for p in [Integer(5),Integer(7),Integer(11),Integer(13),Integer(17),Integer(19)]]
[125*T^3 + 20*T^2 + 4*T + 1,
 343*T^3 - 42*T^2 - 6*T + 1,
 -1331*T^3 - 22*T^2 + 2*T + 1,
 -2197*T^3 - 156*T^2 + 12*T + 1,
 4913*T^3 + 323*T^2 + 19*T + 1,
 6859*T^3 - 57*T^2 - 3*T + 1]

>>> H = Hyp(alpha_beta=([Integer(1)/Integer(12),Integer(5)/Integer(12),Integer(7)/Integer(12),Integer(11)/Integer(12)], [Integer(0),Integer(1)/Integer(2),Integer(1)/Integer(2),Integer(1)/Integer(2)]))
>>> H.weight(), H.degree()
(2, 4)
>>> t = -Integer(5)
>>> [H.euler_factor(Integer(1)/t,p) for p in [Integer(11),Integer(13),Integer(17),Integer(19),Integer(23),Integer(29)]]
[-14641*T^4 - 1210*T^3 + 10*T + 1,
 -28561*T^4 - 2704*T^3 + 16*T + 1,
 -83521*T^4 - 4046*T^3 + 14*T + 1,
 130321*T^4 + 14440*T^3 + 969*T^2 + 40*T + 1,
 279841*T^4 - 25392*T^3 + 1242*T^2 - 48*T + 1,
 707281*T^4 - 7569*T^3 + 696*T^2 - 9*T + 1]
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(alpha_beta=([1/2]*4, [0]*4))
H.euler_factor(-1, 5)
H = Hyp(gamma_list=[-6,-1,4,3])
H.weight(), H.degree()
t = 189/125
[H.euler_factor(1/t,p) for p in [11,13,17,19,23,29]]
H = Hyp(cyclotomic=([6,2], [1,1,1]))
H.weight(), H.degree()
[H.euler_factor(1/4,p) for p in [5,7,11,13,17,19]]
H = Hyp(alpha_beta=([1/12,5/12,7/12,11/12], [0,1/2,1/2,1/2]))
H.weight(), H.degree()
t = -5
[H.euler_factor(1/t,p) for p in [11,13,17,19,23,29]]

This is an example of higher degree:

sage: H = Hyp(cyclotomic=([11], [7, 12]))
sage: H.euler_factor(2, 13)
371293*T^10 - 85683*T^9 + 26364*T^8 + 1352*T^7 - 65*T^6 + 394*T^5 - 5*T^4 + 8*T^3 + 12*T^2 - 3*T + 1
sage: H.euler_factor(2, 13, deg=4)
-5*T^4 + 8*T^3 + 12*T^2 - 3*T + 1
sage: H.euler_factor(2, 19) # long time
2476099*T^10 - 651605*T^9 + 233206*T^8 - 77254*T^7 + 20349*T^6 - 4611*T^5 + 1071*T^4 - 214*T^3 + 34*T^2 - 5*T + 1
>>> from sage.all import *
>>> H = Hyp(cyclotomic=([Integer(11)], [Integer(7), Integer(12)]))
>>> H.euler_factor(Integer(2), Integer(13))
371293*T^10 - 85683*T^9 + 26364*T^8 + 1352*T^7 - 65*T^6 + 394*T^5 - 5*T^4 + 8*T^3 + 12*T^2 - 3*T + 1
>>> H.euler_factor(Integer(2), Integer(13), deg=Integer(4))
-5*T^4 + 8*T^3 + 12*T^2 - 3*T + 1
>>> H.euler_factor(Integer(2), Integer(19)) # long time
2476099*T^10 - 651605*T^9 + 233206*T^8 - 77254*T^7 + 20349*T^6 - 4611*T^5 + 1071*T^4 - 214*T^3 + 34*T^2 - 5*T + 1
H = Hyp(cyclotomic=([11], [7, 12]))
H.euler_factor(2, 13)
H.euler_factor(2, 13, deg=4)
H.euler_factor(2, 19) # long time

This is an example of tame primes:

sage: H = Hyp(cyclotomic=[[4,2,2], [3,1,1]])
sage: H.euler_factor(8, 7)
-7*T^3 + 7*T^2 - T + 1
sage: H.euler_factor(50, 7)
-7*T^3 + 7*T^2 - T + 1
sage: H.euler_factor(7, 7)
-T + 1
sage: H.euler_factor(1/7^2, 7)
T + 1
sage: H.euler_factor(1/7^4, 7)
7*T^3 + 7*T^2 + T + 1
>>> from sage.all import *
>>> H = Hyp(cyclotomic=[[Integer(4),Integer(2),Integer(2)], [Integer(3),Integer(1),Integer(1)]])
>>> H.euler_factor(Integer(8), Integer(7))
-7*T^3 + 7*T^2 - T + 1
>>> H.euler_factor(Integer(50), Integer(7))
-7*T^3 + 7*T^2 - T + 1
>>> H.euler_factor(Integer(7), Integer(7))
-T + 1
>>> H.euler_factor(Integer(1)/Integer(7)**Integer(2), Integer(7))
T + 1
>>> H.euler_factor(Integer(1)/Integer(7)**Integer(4), Integer(7))
7*T^3 + 7*T^2 + T + 1
H = Hyp(cyclotomic=[[4,2,2], [3,1,1]])
H.euler_factor(8, 7)
H.euler_factor(50, 7)
H.euler_factor(7, 7)
H.euler_factor(1/7^2, 7)
H.euler_factor(1/7^4, 7)

This is an example with \(t = 1\):

sage: H = Hyp(cyclotomic=[[4,2], [3,1]])
sage: H.euler_factor(1, 7)
-T^2 + 1
sage: H = Hyp(cyclotomic=[[5], [1,1,1,1]])
sage: H.euler_factor(1, 7)
343*T^2 - 6*T + 1
>>> from sage.all import *
>>> H = Hyp(cyclotomic=[[Integer(4),Integer(2)], [Integer(3),Integer(1)]])
>>> H.euler_factor(Integer(1), Integer(7))
-T^2 + 1
>>> H = Hyp(cyclotomic=[[Integer(5)], [Integer(1),Integer(1),Integer(1),Integer(1)]])
>>> H.euler_factor(Integer(1), Integer(7))
343*T^2 - 6*T + 1
H = Hyp(cyclotomic=[[4,2], [3,1]])
H.euler_factor(1, 7)
H = Hyp(cyclotomic=[[5], [1,1,1,1]])
H.euler_factor(1, 7)

REFERENCES:

euler_factor_tame_contribution(t, p, mo, deg=None)[source]

Return a contribution to the Euler factor of the motive \(H_t\) at a tame prime.

The output is only nontrivial when \(t\) has nonzero \(p\)-adic valuation. The algorithm is described in Section 11.4.1 of [Watkins].

INPUT:

  • t – rational number, not 0 or 1

  • p – prime number of good reduction

  • mo – integer

  • deg – integer (optional)

OUTPUT: a polynomial

If deg is specified, the output is truncated to that degree (inclusive).

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(cyclotomic=[[3,7], [4,5,6]])
sage: H.euler_factor_tame_contribution(11^2, 11, 4)
1
sage: H.euler_factor_tame_contribution(11^20, 11, 4)
1331*T^2 + 1
sage: H.euler_factor_tame_contribution(11^20, 11, 4, deg=1)
1
sage: H.euler_factor_tame_contribution(11^20, 11, 5)
1771561*T^4 + 161051*T^3 + 6171*T^2 + 121*T + 1
sage: H.euler_factor_tame_contribution(11^20, 11, 5, deg=3)
161051*T^3 + 6171*T^2 + 121*T + 1
sage: H.euler_factor_tame_contribution(11^20, 11, 6)
1
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(cyclotomic=[[Integer(3),Integer(7)], [Integer(4),Integer(5),Integer(6)]])
>>> H.euler_factor_tame_contribution(Integer(11)**Integer(2), Integer(11), Integer(4))
1
>>> H.euler_factor_tame_contribution(Integer(11)**Integer(20), Integer(11), Integer(4))
1331*T^2 + 1
>>> H.euler_factor_tame_contribution(Integer(11)**Integer(20), Integer(11), Integer(4), deg=Integer(1))
1
>>> H.euler_factor_tame_contribution(Integer(11)**Integer(20), Integer(11), Integer(5))
1771561*T^4 + 161051*T^3 + 6171*T^2 + 121*T + 1
>>> H.euler_factor_tame_contribution(Integer(11)**Integer(20), Integer(11), Integer(5), deg=Integer(3))
161051*T^3 + 6171*T^2 + 121*T + 1
>>> H.euler_factor_tame_contribution(Integer(11)**Integer(20), Integer(11), Integer(6))
1
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(cyclotomic=[[3,7], [4,5,6]])
H.euler_factor_tame_contribution(11^2, 11, 4)
H.euler_factor_tame_contribution(11^20, 11, 4)
H.euler_factor_tame_contribution(11^20, 11, 4, deg=1)
H.euler_factor_tame_contribution(11^20, 11, 5)
H.euler_factor_tame_contribution(11^20, 11, 5, deg=3)
H.euler_factor_tame_contribution(11^20, 11, 6)
gamma_array()[source]

Return the dictionary \(\{v: \gamma_v\}\) for the expression

\[\prod_v (T^v - 1)^{\gamma_v}\]

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: Hyp(alpha_beta=([1/2], [0])).gamma_array()
{1: -2, 2: 1}
sage: Hyp(cyclotomic=([6,2], [1,1,1])).gamma_array()
{1: -3, 3: -1, 6: 1}
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> Hyp(alpha_beta=([Integer(1)/Integer(2)], [Integer(0)])).gamma_array()
{1: -2, 2: 1}
>>> Hyp(cyclotomic=([Integer(6),Integer(2)], [Integer(1),Integer(1),Integer(1)])).gamma_array()
{1: -3, 3: -1, 6: 1}
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
Hyp(alpha_beta=([1/2], [0])).gamma_array()
Hyp(cyclotomic=([6,2], [1,1,1])).gamma_array()
gamma_list()[source]

Return a list of integers describing the \(x^n - 1\) factors.

Each integer \(n\) stands for \((x^{|n|} - 1)^{\operatorname{sgn}(n)}\).

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: Hyp(alpha_beta=([1/2], [0])).gamma_list()
[-1, -1, 2]

sage: Hyp(cyclotomic=([6,2], [1,1,1])).gamma_list()
[-1, -1, -1, -3, 6]

sage: Hyp(cyclotomic=([3], [4])).gamma_list()
[-1, 2, 3, -4]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> Hyp(alpha_beta=([Integer(1)/Integer(2)], [Integer(0)])).gamma_list()
[-1, -1, 2]

>>> Hyp(cyclotomic=([Integer(6),Integer(2)], [Integer(1),Integer(1),Integer(1)])).gamma_list()
[-1, -1, -1, -3, 6]

>>> Hyp(cyclotomic=([Integer(3)], [Integer(4)])).gamma_list()
[-1, 2, 3, -4]
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
Hyp(alpha_beta=([1/2], [0])).gamma_list()
Hyp(cyclotomic=([6,2], [1,1,1])).gamma_list()
Hyp(cyclotomic=([3], [4])).gamma_list()
gauss_table(p, f, prec)[source]

Return (and cache) a table of Gauss sums used in the trace formula.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(cyclotomic=([3], [4]))
sage: H.gauss_table(2, 2, 4)
(4, [1 + 2 + 2^2 + 2^3, 1 + 2 + 2^2 + 2^3, 1 + 2 + 2^2 + 2^3])
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(cyclotomic=([Integer(3)], [Integer(4)]))
>>> H.gauss_table(Integer(2), Integer(2), Integer(4))
(4, [1 + 2 + 2^2 + 2^3, 1 + 2 + 2^2 + 2^3, 1 + 2 + 2^2 + 2^3])
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(cyclotomic=([3], [4]))
H.gauss_table(2, 2, 4)
gauss_table_full()[source]

Return a dict of all stored tables of Gauss sums.

The result is passed by reference, and is an attribute of the class; consequently, modifying the result has global side effects. Use with caution.

See also

gauss_table()

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(cyclotomic=([3], [4]))
sage: H.euler_factor(2, 7, cache_p=True)
7*T^2 - 3*T + 1
sage: H.gauss_table_full()[(7, 1)]
(2, array('l', [-1, -29, -25, -48, -47, -22]))
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(cyclotomic=([Integer(3)], [Integer(4)]))
>>> H.euler_factor(Integer(2), Integer(7), cache_p=True)
7*T^2 - 3*T + 1
>>> H.gauss_table_full()[(Integer(7), Integer(1))]
(2, array('l', [-1, -29, -25, -48, -47, -22]))
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(cyclotomic=([3], [4]))
H.euler_factor(2, 7, cache_p=True)
H.gauss_table_full()[(7, 1)]

Clearing cached values:

sage: H = Hyp(cyclotomic=([3], [4]))
sage: H.euler_factor(2, 7, cache_p=True)
7*T^2 - 3*T + 1
sage: d = H.gauss_table_full()
sage: d.clear() # Delete all entries of this dict
sage: H1 = Hyp(cyclotomic=([5], [12]))
sage: d1 = H1.gauss_table_full()
sage: len(d1.keys()) # No cached values
0
>>> from sage.all import *
>>> H = Hyp(cyclotomic=([Integer(3)], [Integer(4)]))
>>> H.euler_factor(Integer(2), Integer(7), cache_p=True)
7*T^2 - 3*T + 1
>>> d = H.gauss_table_full()
>>> d.clear() # Delete all entries of this dict
>>> H1 = Hyp(cyclotomic=([Integer(5)], [Integer(12)]))
>>> d1 = H1.gauss_table_full()
>>> len(d1.keys()) # No cached values
0
H = Hyp(cyclotomic=([3], [4]))
H.euler_factor(2, 7, cache_p=True)
d = H.gauss_table_full()
d.clear() # Delete all entries of this dict
H1 = Hyp(cyclotomic=([5], [12]))
d1 = H1.gauss_table_full()
len(d1.keys()) # No cached values
has_symmetry_at_one()[source]

If True, the motive H(t=1) is a direct sum of two motives.

Note that simultaneous exchange of (t,1/t) and (alpha,beta) always gives the same motive.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: Hyp(alpha_beta=[[1/2]*16, [0]*16]).has_symmetry_at_one()
True
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> Hyp(alpha_beta=[[Integer(1)/Integer(2)]*Integer(16), [Integer(0)]*Integer(16)]).has_symmetry_at_one()
True
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
Hyp(alpha_beta=[[1/2]*16, [0]*16]).has_symmetry_at_one()

REFERENCES:

hodge_function(x)[source]

Evaluate the Hodge polygon as a function.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(cyclotomic=([6,10], [3,12]))
sage: H.hodge_function(3)
2
sage: H.hodge_function(4)
4
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(cyclotomic=([Integer(6),Integer(10)], [Integer(3),Integer(12)]))
>>> H.hodge_function(Integer(3))
2
>>> H.hodge_function(Integer(4))
4
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(cyclotomic=([6,10], [3,12]))
H.hodge_function(3)
H.hodge_function(4)
hodge_numbers()[source]

Return the Hodge numbers.

See also

degree(), hodge_polynomial(), hodge_polygon()

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(cyclotomic=([3], [6]))
sage: H.hodge_numbers()
[1, 1]

sage: H = Hyp(cyclotomic=([4], [1,2]))
sage: H.hodge_numbers()
[2]

sage: H = Hyp(gamma_list=([8,2,2,2], [6,4,3,1]))
sage: H.hodge_numbers()
[1, 2, 2, 1]

sage: H = Hyp(gamma_list=([5], [1,1,1,1,1]))
sage: H.hodge_numbers()
[1, 1, 1, 1]

sage: H = Hyp(gamma_list=[6,1,-4,-3])
sage: H.hodge_numbers()
[1, 1]

sage: H = Hyp(gamma_list=[-3]*4 + [1]*12)
sage: H.hodge_numbers()
[1, 1, 1, 1, 1, 1, 1, 1]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(cyclotomic=([Integer(3)], [Integer(6)]))
>>> H.hodge_numbers()
[1, 1]

>>> H = Hyp(cyclotomic=([Integer(4)], [Integer(1),Integer(2)]))
>>> H.hodge_numbers()
[2]

>>> H = Hyp(gamma_list=([Integer(8),Integer(2),Integer(2),Integer(2)], [Integer(6),Integer(4),Integer(3),Integer(1)]))
>>> H.hodge_numbers()
[1, 2, 2, 1]

>>> H = Hyp(gamma_list=([Integer(5)], [Integer(1),Integer(1),Integer(1),Integer(1),Integer(1)]))
>>> H.hodge_numbers()
[1, 1, 1, 1]

>>> H = Hyp(gamma_list=[Integer(6),Integer(1),-Integer(4),-Integer(3)])
>>> H.hodge_numbers()
[1, 1]

>>> H = Hyp(gamma_list=[-Integer(3)]*Integer(4) + [Integer(1)]*Integer(12))
>>> H.hodge_numbers()
[1, 1, 1, 1, 1, 1, 1, 1]
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(cyclotomic=([3], [6]))
H.hodge_numbers()
H = Hyp(cyclotomic=([4], [1,2]))
H.hodge_numbers()
H = Hyp(gamma_list=([8,2,2,2], [6,4,3,1]))
H.hodge_numbers()
H = Hyp(gamma_list=([5], [1,1,1,1,1]))
H.hodge_numbers()
H = Hyp(gamma_list=[6,1,-4,-3])
H.hodge_numbers()
H = Hyp(gamma_list=[-3]*4 + [1]*12)
H.hodge_numbers()

REFERENCES:

hodge_polygon_vertices()[source]

Return the vertices of the Hodge polygon.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(cyclotomic=([6,10], [3,12]))
sage: H.hodge_polygon_vertices()
[(0, 0), (1, 0), (3, 2), (5, 6), (6, 9)]
sage: H = Hyp(cyclotomic=([2,2,2,2,3,3,3,6,6], [1,1,4,5,9]))
sage: H.hodge_polygon_vertices()
[(0, 0), (1, 0), (4, 3), (7, 9), (10, 18), (13, 30), (14, 35)]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(cyclotomic=([Integer(6),Integer(10)], [Integer(3),Integer(12)]))
>>> H.hodge_polygon_vertices()
[(0, 0), (1, 0), (3, 2), (5, 6), (6, 9)]
>>> H = Hyp(cyclotomic=([Integer(2),Integer(2),Integer(2),Integer(2),Integer(3),Integer(3),Integer(3),Integer(6),Integer(6)], [Integer(1),Integer(1),Integer(4),Integer(5),Integer(9)]))
>>> H.hodge_polygon_vertices()
[(0, 0), (1, 0), (4, 3), (7, 9), (10, 18), (13, 30), (14, 35)]
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(cyclotomic=([6,10], [3,12]))
H.hodge_polygon_vertices()
H = Hyp(cyclotomic=([2,2,2,2,3,3,3,6,6], [1,1,4,5,9]))
H.hodge_polygon_vertices()
hodge_polynomial()[source]

Return the Hodge polynomial.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(cyclotomic=([6,10], [3,12]))
sage: H.hodge_polynomial()
(T^3 + 2*T^2 + 2*T + 1)/T^2
sage: H = Hyp(cyclotomic=([2,2,2,2,3,3,3,6,6], [1,1,4,5,9]))
sage: H.hodge_polynomial()
(T^5 + 3*T^4 + 3*T^3 + 3*T^2 + 3*T + 1)/T^2
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(cyclotomic=([Integer(6),Integer(10)], [Integer(3),Integer(12)]))
>>> H.hodge_polynomial()
(T^3 + 2*T^2 + 2*T + 1)/T^2
>>> H = Hyp(cyclotomic=([Integer(2),Integer(2),Integer(2),Integer(2),Integer(3),Integer(3),Integer(3),Integer(6),Integer(6)], [Integer(1),Integer(1),Integer(4),Integer(5),Integer(9)]))
>>> H.hodge_polynomial()
(T^5 + 3*T^4 + 3*T^3 + 3*T^2 + 3*T + 1)/T^2
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(cyclotomic=([6,10], [3,12]))
H.hodge_polynomial()
H = Hyp(cyclotomic=([2,2,2,2,3,3,3,6,6], [1,1,4,5,9]))
H.hodge_polynomial()
is_primitive()[source]

Return whether this data is primitive.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: Hyp(cyclotomic=([3], [4])).is_primitive()
True
sage: Hyp(gamma_list=[-2, 4, 6, -8]).is_primitive()
False
sage: Hyp(gamma_list=[-3, 6, 9, -12]).is_primitive()
False
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> Hyp(cyclotomic=([Integer(3)], [Integer(4)])).is_primitive()
True
>>> Hyp(gamma_list=[-Integer(2), Integer(4), Integer(6), -Integer(8)]).is_primitive()
False
>>> Hyp(gamma_list=[-Integer(3), Integer(6), Integer(9), -Integer(12)]).is_primitive()
False
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
Hyp(cyclotomic=([3], [4])).is_primitive()
Hyp(gamma_list=[-2, 4, 6, -8]).is_primitive()
Hyp(gamma_list=[-3, 6, 9, -12]).is_primitive()
lattice_polytope()[source]

Return the associated lattice polytope.

This uses the matrix defined in section 3 of [RRV2022] and section 3 of [RV2019].

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(gamma_list=[-5, -2, 3, 4])
sage: P = H.lattice_polytope(); P
2-d lattice polytope in 2-d lattice M
sage: P.polyhedron().f_vector()
(1, 4, 4, 1)
sage: len(P.points())
7
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(gamma_list=[-Integer(5), -Integer(2), Integer(3), Integer(4)])
>>> P = H.lattice_polytope(); P
2-d lattice polytope in 2-d lattice M
>>> P.polyhedron().f_vector()
(1, 4, 4, 1)
>>> len(P.points())
7
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(gamma_list=[-5, -2, 3, 4])
P = H.lattice_polytope(); P
P.polyhedron().f_vector()
len(P.points())

The Chebyshev example from [RV2019]:

sage: H = Hyp(gamma_list=[-30, -1, 6, 10, 15])
sage: P = H.lattice_polytope(); P
3-d lattice polytope in 3-d lattice M
sage: len(P.points())
19
sage: P.polyhedron().f_vector()
(1, 5, 9, 6, 1)
>>> from sage.all import *
>>> H = Hyp(gamma_list=[-Integer(30), -Integer(1), Integer(6), Integer(10), Integer(15)])
>>> P = H.lattice_polytope(); P
3-d lattice polytope in 3-d lattice M
>>> len(P.points())
19
>>> P.polyhedron().f_vector()
(1, 5, 9, 6, 1)
H = Hyp(gamma_list=[-30, -1, 6, 10, 15])
P = H.lattice_polytope(); P
len(P.points())
P.polyhedron().f_vector()
lfunction(t, prec=53)[source]

Return the \(L\)-function of self.

The result is a wrapper around a PARI \(L\)-function.

INPUT:

  • prec – precision (default: 53)

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(cyclotomic=([3], [4]))
sage: L = H.lfunction(1/64); L
PARI L-function associated to Hypergeometric data for [1/3, 2/3] and [1/4, 3/4]
sage: L(4)
0.997734256321692
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(cyclotomic=([Integer(3)], [Integer(4)]))
>>> L = H.lfunction(Integer(1)/Integer(64)); L
PARI L-function associated to Hypergeometric data for [1/3, 2/3] and [1/4, 3/4]
>>> L(Integer(4))
0.997734256321692
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(cyclotomic=([3], [4]))
L = H.lfunction(1/64); L
L(4)
padic_H_value(p, f, t, prec=None, cache_p=False)[source]

Return the \(p\)-adic trace of Frobenius, computed using the Gross-Koblitz formula.

If left unspecified, \(prec\) is set to the minimum \(p\)-adic precision needed to recover the Euler factor.

If \(cache_p\) is True, then the function caches an intermediate result which depends only on \(p\) and \(f\). This leads to a significant speedup when iterating over \(t\).

INPUT:

  • p – a prime number

  • f – integer such that \(q = p^f\)

  • t – a rational parameter

  • prec – precision (optional)

  • cache_p – boolean

OUTPUT: integer

EXAMPLES:

From Benasque report [Benasque2009], page 8:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(alpha_beta=([1/2]*4, [0]*4))
sage: [H.padic_H_value(3,i,-1) for i in range(1,3)]
[0, -12]
sage: [H.padic_H_value(5,i,-1) for i in range(1,3)]
[-4, 276]
sage: [H.padic_H_value(7,i,-1) for i in range(1,3)]
[0, -476]
sage: [H.padic_H_value(11,i,-1) for i in range(1,3)]
[0, -4972]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(alpha_beta=([Integer(1)/Integer(2)]*Integer(4), [Integer(0)]*Integer(4)))
>>> [H.padic_H_value(Integer(3),i,-Integer(1)) for i in range(Integer(1),Integer(3))]
[0, -12]
>>> [H.padic_H_value(Integer(5),i,-Integer(1)) for i in range(Integer(1),Integer(3))]
[-4, 276]
>>> [H.padic_H_value(Integer(7),i,-Integer(1)) for i in range(Integer(1),Integer(3))]
[0, -476]
>>> [H.padic_H_value(Integer(11),i,-Integer(1)) for i in range(Integer(1),Integer(3))]
[0, -4972]
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(alpha_beta=([1/2]*4, [0]*4))
[H.padic_H_value(3,i,-1) for i in range(1,3)]
[H.padic_H_value(5,i,-1) for i in range(1,3)]
[H.padic_H_value(7,i,-1) for i in range(1,3)]
[H.padic_H_value(11,i,-1) for i in range(1,3)]

From [Roberts2015] (but note conventions regarding \(t\)):

sage: H = Hyp(gamma_list=[-6,-1,4,3])
sage: t = 189/125
sage: H.padic_H_value(13,1,1/t)
0
>>> from sage.all import *
>>> H = Hyp(gamma_list=[-Integer(6),-Integer(1),Integer(4),Integer(3)])
>>> t = Integer(189)/Integer(125)
>>> H.padic_H_value(Integer(13),Integer(1),Integer(1)/t)
0
H = Hyp(gamma_list=[-6,-1,4,3])
t = 189/125
H.padic_H_value(13,1,1/t)

REFERENCES:

primitive_data()[source]

Return a primitive version.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(cyclotomic=([3], [4]))
sage: H2 = Hyp(gamma_list=[-2, 4, 6, -8])
sage: H2.primitive_data() == H
True
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(cyclotomic=([Integer(3)], [Integer(4)]))
>>> H2 = Hyp(gamma_list=[-Integer(2), Integer(4), Integer(6), -Integer(8)])
>>> H2.primitive_data() == H
True
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(cyclotomic=([3], [4]))
H2 = Hyp(gamma_list=[-2, 4, 6, -8])
H2.primitive_data() == H
primitive_index()[source]

Return the primitive index.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: Hyp(cyclotomic=([3], [4])).primitive_index()
1
sage: Hyp(gamma_list=[-2, 4, 6, -8]).primitive_index()
2
sage: Hyp(gamma_list=[-3, 6, 9, -12]).primitive_index()
3
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> Hyp(cyclotomic=([Integer(3)], [Integer(4)])).primitive_index()
1
>>> Hyp(gamma_list=[-Integer(2), Integer(4), Integer(6), -Integer(8)]).primitive_index()
2
>>> Hyp(gamma_list=[-Integer(3), Integer(6), Integer(9), -Integer(12)]).primitive_index()
3
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
Hyp(cyclotomic=([3], [4])).primitive_index()
Hyp(gamma_list=[-2, 4, 6, -8]).primitive_index()
Hyp(gamma_list=[-3, 6, 9, -12]).primitive_index()
sign(t, p)[source]

Return the sign of the functional equation for the Euler factor of the motive \(H_t\) at the prime \(p\).

For odd weight, the sign of the functional equation is +1. For even weight, the sign is computed by a recipe found in Section 11.1 of [Watkins] (when 0 is not in alpha).

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(cyclotomic=([6,2], [1,1,1]))
sage: H.weight(), H.degree()
(2, 3)
sage: [H.sign(1/4,p) for p in [5,7,11,13,17,19]]
[1, 1, -1, -1, 1, 1]

sage: H = Hyp(alpha_beta=([1/12,5/12,7/12,11/12], [0,1/2,1/2,1/2]))
sage: H.weight(), H.degree()
(2, 4)
sage: t = -5
sage: [H.sign(1/t,p) for p in [11,13,17,19,23,29]]
[-1, -1, -1, 1, 1, 1]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(cyclotomic=([Integer(6),Integer(2)], [Integer(1),Integer(1),Integer(1)]))
>>> H.weight(), H.degree()
(2, 3)
>>> [H.sign(Integer(1)/Integer(4),p) for p in [Integer(5),Integer(7),Integer(11),Integer(13),Integer(17),Integer(19)]]
[1, 1, -1, -1, 1, 1]

>>> H = Hyp(alpha_beta=([Integer(1)/Integer(12),Integer(5)/Integer(12),Integer(7)/Integer(12),Integer(11)/Integer(12)], [Integer(0),Integer(1)/Integer(2),Integer(1)/Integer(2),Integer(1)/Integer(2)]))
>>> H.weight(), H.degree()
(2, 4)
>>> t = -Integer(5)
>>> [H.sign(Integer(1)/t,p) for p in [Integer(11),Integer(13),Integer(17),Integer(19),Integer(23),Integer(29)]]
[-1, -1, -1, 1, 1, 1]
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(cyclotomic=([6,2], [1,1,1]))
H.weight(), H.degree()
[H.sign(1/4,p) for p in [5,7,11,13,17,19]]
H = Hyp(alpha_beta=([1/12,5/12,7/12,11/12], [0,1/2,1/2,1/2]))
H.weight(), H.degree()
t = -5
[H.sign(1/t,p) for p in [11,13,17,19,23,29]]

We check that Issue #28404 is fixed:

sage: H = Hyp(cyclotomic=([1,1,1], [6,2]))
sage: [H.sign(4,p) for p in [5,7,11,13,17,19]]
[1, 1, -1, -1, 1, 1]
>>> from sage.all import *
>>> H = Hyp(cyclotomic=([Integer(1),Integer(1),Integer(1)], [Integer(6),Integer(2)]))
>>> [H.sign(Integer(4),p) for p in [Integer(5),Integer(7),Integer(11),Integer(13),Integer(17),Integer(19)]]
[1, 1, -1, -1, 1, 1]
H = Hyp(cyclotomic=([1,1,1], [6,2]))
[H.sign(4,p) for p in [5,7,11,13,17,19]]
swap_alpha_beta()[source]

Return the hypergeometric data with alpha and beta exchanged.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(alpha_beta=([1/2], [0]))
sage: H.swap_alpha_beta()
Hypergeometric data for [0] and [1/2]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(alpha_beta=([Integer(1)/Integer(2)], [Integer(0)]))
>>> H.swap_alpha_beta()
Hypergeometric data for [0] and [1/2]
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(alpha_beta=([1/2], [0]))
H.swap_alpha_beta()
trace(p, f, t, prec=None, cache_p=False)[source]

Return the \(p\)-adic trace of Frobenius, computed using the Gross-Koblitz formula.

If left unspecified, \(prec\) is set to the minimum \(p\)-adic precision needed to recover the Euler factor.

If \(cache_p\) is True, then the function caches an intermediate result which depends only on \(p\) and \(f\). This leads to a significant speedup when iterating over \(t\).

INPUT:

  • p – a prime number

  • f – integer such that \(q = p^f\)

  • t – a rational parameter

  • prec – precision (optional)

  • cache_p – boolean

OUTPUT: integer

EXAMPLES:

From Benasque report [Benasque2009], page 8:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(alpha_beta=([1/2]*4, [0]*4))
sage: [H.padic_H_value(3,i,-1) for i in range(1,3)]
[0, -12]
sage: [H.padic_H_value(5,i,-1) for i in range(1,3)]
[-4, 276]
sage: [H.padic_H_value(7,i,-1) for i in range(1,3)]
[0, -476]
sage: [H.padic_H_value(11,i,-1) for i in range(1,3)]
[0, -4972]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(alpha_beta=([Integer(1)/Integer(2)]*Integer(4), [Integer(0)]*Integer(4)))
>>> [H.padic_H_value(Integer(3),i,-Integer(1)) for i in range(Integer(1),Integer(3))]
[0, -12]
>>> [H.padic_H_value(Integer(5),i,-Integer(1)) for i in range(Integer(1),Integer(3))]
[-4, 276]
>>> [H.padic_H_value(Integer(7),i,-Integer(1)) for i in range(Integer(1),Integer(3))]
[0, -476]
>>> [H.padic_H_value(Integer(11),i,-Integer(1)) for i in range(Integer(1),Integer(3))]
[0, -4972]
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(alpha_beta=([1/2]*4, [0]*4))
[H.padic_H_value(3,i,-1) for i in range(1,3)]
[H.padic_H_value(5,i,-1) for i in range(1,3)]
[H.padic_H_value(7,i,-1) for i in range(1,3)]
[H.padic_H_value(11,i,-1) for i in range(1,3)]

From [Roberts2015] (but note conventions regarding \(t\)):

sage: H = Hyp(gamma_list=[-6,-1,4,3])
sage: t = 189/125
sage: H.padic_H_value(13,1,1/t)
0
>>> from sage.all import *
>>> H = Hyp(gamma_list=[-Integer(6),-Integer(1),Integer(4),Integer(3)])
>>> t = Integer(189)/Integer(125)
>>> H.padic_H_value(Integer(13),Integer(1),Integer(1)/t)
0
H = Hyp(gamma_list=[-6,-1,4,3])
t = 189/125
H.padic_H_value(13,1,1/t)

REFERENCES:

twist()[source]

Return the twist of this data.

This is defined by adding \(1/2\) to each rational in \(\alpha\) and \(\beta\).

This is an involution.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(alpha_beta=([1/2], [0]))
sage: H.twist()
Hypergeometric data for [0] and [1/2]
sage: H.twist().twist() == H
True

sage: Hyp(cyclotomic=([6], [1,2])).twist().cyclotomic_data()
([3], [1, 2])
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(alpha_beta=([Integer(1)/Integer(2)], [Integer(0)]))
>>> H.twist()
Hypergeometric data for [0] and [1/2]
>>> H.twist().twist() == H
True

>>> Hyp(cyclotomic=([Integer(6)], [Integer(1),Integer(2)])).twist().cyclotomic_data()
([3], [1, 2])
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(alpha_beta=([1/2], [0]))
H.twist()
H.twist().twist() == H
Hyp(cyclotomic=([6], [1,2])).twist().cyclotomic_data()
weight()[source]

Return the motivic weight of this motivic data.

EXAMPLES:

With rational inputs:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: Hyp(alpha_beta=([1/2], [0])).weight()
0
sage: Hyp(alpha_beta=([1/4,3/4], [0,0])).weight()
1
sage: Hyp(alpha_beta=([1/6,1/3,2/3,5/6], [0,0,1/4,3/4])).weight()
1
sage: H = Hyp(alpha_beta=([1/6,1/3,2/3,5/6], [1/8,3/8,5/8,7/8]))
sage: H.weight()
1
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> Hyp(alpha_beta=([Integer(1)/Integer(2)], [Integer(0)])).weight()
0
>>> Hyp(alpha_beta=([Integer(1)/Integer(4),Integer(3)/Integer(4)], [Integer(0),Integer(0)])).weight()
1
>>> Hyp(alpha_beta=([Integer(1)/Integer(6),Integer(1)/Integer(3),Integer(2)/Integer(3),Integer(5)/Integer(6)], [Integer(0),Integer(0),Integer(1)/Integer(4),Integer(3)/Integer(4)])).weight()
1
>>> H = Hyp(alpha_beta=([Integer(1)/Integer(6),Integer(1)/Integer(3),Integer(2)/Integer(3),Integer(5)/Integer(6)], [Integer(1)/Integer(8),Integer(3)/Integer(8),Integer(5)/Integer(8),Integer(7)/Integer(8)]))
>>> H.weight()
1
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
Hyp(alpha_beta=([1/2], [0])).weight()
Hyp(alpha_beta=([1/4,3/4], [0,0])).weight()
Hyp(alpha_beta=([1/6,1/3,2/3,5/6], [0,0,1/4,3/4])).weight()
H = Hyp(alpha_beta=([1/6,1/3,2/3,5/6], [1/8,3/8,5/8,7/8]))
H.weight()

With cyclotomic inputs:

sage: Hyp(cyclotomic=([6,2], [1,1,1])).weight()
2
sage: Hyp(cyclotomic=([6], [1,2])).weight()
0
sage: Hyp(cyclotomic=([8], [1,2,3])).weight()
0
sage: Hyp(cyclotomic=([5], [1,1,1,1])).weight()
3
sage: Hyp(cyclotomic=([5,6], [1,1,2,2,3])).weight()
1
sage: Hyp(cyclotomic=([3,8], [1,1,1,2,6])).weight()
2
sage: Hyp(cyclotomic=([3,3], [2,2,4])).weight()
1
>>> from sage.all import *
>>> Hyp(cyclotomic=([Integer(6),Integer(2)], [Integer(1),Integer(1),Integer(1)])).weight()
2
>>> Hyp(cyclotomic=([Integer(6)], [Integer(1),Integer(2)])).weight()
0
>>> Hyp(cyclotomic=([Integer(8)], [Integer(1),Integer(2),Integer(3)])).weight()
0
>>> Hyp(cyclotomic=([Integer(5)], [Integer(1),Integer(1),Integer(1),Integer(1)])).weight()
3
>>> Hyp(cyclotomic=([Integer(5),Integer(6)], [Integer(1),Integer(1),Integer(2),Integer(2),Integer(3)])).weight()
1
>>> Hyp(cyclotomic=([Integer(3),Integer(8)], [Integer(1),Integer(1),Integer(1),Integer(2),Integer(6)])).weight()
2
>>> Hyp(cyclotomic=([Integer(3),Integer(3)], [Integer(2),Integer(2),Integer(4)])).weight()
1
Hyp(cyclotomic=([6,2], [1,1,1])).weight()
Hyp(cyclotomic=([6], [1,2])).weight()
Hyp(cyclotomic=([8], [1,2,3])).weight()
Hyp(cyclotomic=([5], [1,1,1,1])).weight()
Hyp(cyclotomic=([5,6], [1,1,2,2,3])).weight()
Hyp(cyclotomic=([3,8], [1,1,1,2,6])).weight()
Hyp(cyclotomic=([3,3], [2,2,4])).weight()

With gamma list input:

sage: Hyp(gamma_list=([8,2,2,2], [6,4,3,1])).weight()
3
>>> from sage.all import *
>>> Hyp(gamma_list=([Integer(8),Integer(2),Integer(2),Integer(2)], [Integer(6),Integer(4),Integer(3),Integer(1)])).weight()
3
Hyp(gamma_list=([8,2,2,2], [6,4,3,1])).weight()
wild_primes()[source]

Return the wild primes.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: Hyp(cyclotomic=([3], [4])).wild_primes()
[2, 3]
sage: Hyp(cyclotomic=([2,2,2,2,3,3,3,6,6], [1,1,4,5,9])).wild_primes()
[2, 3, 5]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> Hyp(cyclotomic=([Integer(3)], [Integer(4)])).wild_primes()
[2, 3]
>>> Hyp(cyclotomic=([Integer(2),Integer(2),Integer(2),Integer(2),Integer(3),Integer(3),Integer(3),Integer(6),Integer(6)], [Integer(1),Integer(1),Integer(4),Integer(5),Integer(9)])).wild_primes()
[2, 3, 5]
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
Hyp(cyclotomic=([3], [4])).wild_primes()
Hyp(cyclotomic=([2,2,2,2,3,3,3,6,6], [1,1,4,5,9])).wild_primes()
zigzag(x, flip_beta=False)[source]

Count alpha’s at most x minus beta’s at most x.

This function is used to compute the weight and the Hodge numbers. With \(flip_beta\) set to True, replace each \(b\) in \(\beta\) with \(1-b\).

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
sage: H = Hyp(alpha_beta=([1/6,1/3,2/3,5/6], [1/8,3/8,5/8,7/8]))
sage: [H.zigzag(x) for x in [0, 1/3, 1/2]]
[0, 1, 0]
sage: H = Hyp(cyclotomic=([5], [1,1,1,1]))
sage: [H.zigzag(x) for x in [0,1/6,1/4,1/2,3/4,5/6]]
[-4, -4, -3, -2, -1, 0]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
>>> H = Hyp(alpha_beta=([Integer(1)/Integer(6),Integer(1)/Integer(3),Integer(2)/Integer(3),Integer(5)/Integer(6)], [Integer(1)/Integer(8),Integer(3)/Integer(8),Integer(5)/Integer(8),Integer(7)/Integer(8)]))
>>> [H.zigzag(x) for x in [Integer(0), Integer(1)/Integer(3), Integer(1)/Integer(2)]]
[0, 1, 0]
>>> H = Hyp(cyclotomic=([Integer(5)], [Integer(1),Integer(1),Integer(1),Integer(1)]))
>>> [H.zigzag(x) for x in [Integer(0),Integer(1)/Integer(6),Integer(1)/Integer(4),Integer(1)/Integer(2),Integer(3)/Integer(4),Integer(5)/Integer(6)]]
[-4, -4, -3, -2, -1, 0]
from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
H = Hyp(alpha_beta=([1/6,1/3,2/3,5/6], [1/8,3/8,5/8,7/8]))
[H.zigzag(x) for x in [0, 1/3, 1/2]]
H = Hyp(cyclotomic=([5], [1,1,1,1]))
[H.zigzag(x) for x in [0,1/6,1/4,1/2,3/4,5/6]]
sage.modular.hypergeometric_motive.alpha_to_cyclotomic(alpha)[source]

Convert from a list of rationals arguments to a list of integers.

The input represents arguments of some roots of unity.

The output represent a product of cyclotomic polynomials with exactly the given roots. Note that the multiplicity of \(r/s\) in the list must be independent of \(r\); otherwise, a ValueError will be raised.

This is the inverse of cyclotomic_to_alpha().

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import alpha_to_cyclotomic
sage: alpha_to_cyclotomic([0])
[1]
sage: alpha_to_cyclotomic([1/2])
[2]
sage: alpha_to_cyclotomic([1/5, 2/5, 3/5, 4/5])
[5]
sage: alpha_to_cyclotomic([0, 1/6, 1/3, 1/2, 2/3, 5/6])
[1, 2, 3, 6]
sage: alpha_to_cyclotomic([1/3, 2/3, 1/2])
[2, 3]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import alpha_to_cyclotomic
>>> alpha_to_cyclotomic([Integer(0)])
[1]
>>> alpha_to_cyclotomic([Integer(1)/Integer(2)])
[2]
>>> alpha_to_cyclotomic([Integer(1)/Integer(5), Integer(2)/Integer(5), Integer(3)/Integer(5), Integer(4)/Integer(5)])
[5]
>>> alpha_to_cyclotomic([Integer(0), Integer(1)/Integer(6), Integer(1)/Integer(3), Integer(1)/Integer(2), Integer(2)/Integer(3), Integer(5)/Integer(6)])
[1, 2, 3, 6]
>>> alpha_to_cyclotomic([Integer(1)/Integer(3), Integer(2)/Integer(3), Integer(1)/Integer(2)])
[2, 3]
from sage.modular.hypergeometric_motive import alpha_to_cyclotomic
alpha_to_cyclotomic([0])
alpha_to_cyclotomic([1/2])
alpha_to_cyclotomic([1/5, 2/5, 3/5, 4/5])
alpha_to_cyclotomic([0, 1/6, 1/3, 1/2, 2/3, 5/6])
alpha_to_cyclotomic([1/3, 2/3, 1/2])
sage.modular.hypergeometric_motive.capital_M(n)[source]

Auxiliary function, used to describe the canonical scheme.

INPUT:

  • n – integer

OUTPUT: a rational

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import capital_M
sage: [capital_M(i) for i in range(1, 8)]
[1, 4, 27, 64, 3125, 432, 823543]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import capital_M
>>> [capital_M(i) for i in range(Integer(1), Integer(8))]
[1, 4, 27, 64, 3125, 432, 823543]
from sage.modular.hypergeometric_motive import capital_M
[capital_M(i) for i in range(1, 8)]
sage.modular.hypergeometric_motive.characteristic_polynomial_from_traces(traces, d, q, i, sign, deg=None, use_fe=True)[source]

Given a sequence of traces \(t_1, \dots, t_k\), return the corresponding characteristic polynomial with Weil numbers as roots.

The characteristic polynomial is defined by the generating series

\[P(T) = \exp\left(- \sum_{k\geq 1} t_k \frac{T^k}{k}\right)\]

and should have the property that reciprocals of all roots have absolute value \(q^{i/2}\).

INPUT:

  • traces – list of integers \(t_1, \dots, t_k\)

  • d – the degree of the characteristic polynomial

  • q – power of a prime number

  • i – integer; the weight in the motivic sense

  • sign – integer; the sign

  • deg – integer or None

  • use_fe – boolean (default: True)

OUTPUT: a polynomial

If deg is specified, only the coefficients up to this degree (inclusive) are computed.

If use_fe is False, we ignore the local functional equation.

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import characteristic_polynomial_from_traces
sage: characteristic_polynomial_from_traces([1, 1], 1, 3, 0, -1)
-T + 1
sage: characteristic_polynomial_from_traces([25], 1, 5, 4, -1)
-25*T + 1

sage: characteristic_polynomial_from_traces([3], 2, 5, 1, 1)
5*T^2 - 3*T + 1
sage: characteristic_polynomial_from_traces([1], 2, 7, 1, 1)
7*T^2 - T + 1

sage: characteristic_polynomial_from_traces([20], 3, 29, 2, 1)
24389*T^3 - 580*T^2 - 20*T + 1
sage: characteristic_polynomial_from_traces([12], 3, 13, 2, -1)
-2197*T^3 + 156*T^2 - 12*T + 1

sage: characteristic_polynomial_from_traces([36, 7620], 4, 17, 3, 1)
24137569*T^4 - 176868*T^3 - 3162*T^2 - 36*T + 1
sage: characteristic_polynomial_from_traces([-4, 276], 4, 5, 3, 1)
15625*T^4 + 500*T^3 - 130*T^2 + 4*T + 1
sage: characteristic_polynomial_from_traces([4, -276], 4, 5, 3, 1)
15625*T^4 - 500*T^3 + 146*T^2 - 4*T + 1
sage: characteristic_polynomial_from_traces([22, 484], 4, 31, 2, -1)
-923521*T^4 + 21142*T^3 - 22*T + 1

sage: characteristic_polynomial_from_traces([22], 4, 31, 2, -1, deg=1)
-22*T + 1
sage: characteristic_polynomial_from_traces([22, 484], 4, 31, 2, -1, deg=4)
-923521*T^4 + 21142*T^3 - 22*T + 1
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import characteristic_polynomial_from_traces
>>> characteristic_polynomial_from_traces([Integer(1), Integer(1)], Integer(1), Integer(3), Integer(0), -Integer(1))
-T + 1
>>> characteristic_polynomial_from_traces([Integer(25)], Integer(1), Integer(5), Integer(4), -Integer(1))
-25*T + 1

>>> characteristic_polynomial_from_traces([Integer(3)], Integer(2), Integer(5), Integer(1), Integer(1))
5*T^2 - 3*T + 1
>>> characteristic_polynomial_from_traces([Integer(1)], Integer(2), Integer(7), Integer(1), Integer(1))
7*T^2 - T + 1

>>> characteristic_polynomial_from_traces([Integer(20)], Integer(3), Integer(29), Integer(2), Integer(1))
24389*T^3 - 580*T^2 - 20*T + 1
>>> characteristic_polynomial_from_traces([Integer(12)], Integer(3), Integer(13), Integer(2), -Integer(1))
-2197*T^3 + 156*T^2 - 12*T + 1

>>> characteristic_polynomial_from_traces([Integer(36), Integer(7620)], Integer(4), Integer(17), Integer(3), Integer(1))
24137569*T^4 - 176868*T^3 - 3162*T^2 - 36*T + 1
>>> characteristic_polynomial_from_traces([-Integer(4), Integer(276)], Integer(4), Integer(5), Integer(3), Integer(1))
15625*T^4 + 500*T^3 - 130*T^2 + 4*T + 1
>>> characteristic_polynomial_from_traces([Integer(4), -Integer(276)], Integer(4), Integer(5), Integer(3), Integer(1))
15625*T^4 - 500*T^3 + 146*T^2 - 4*T + 1
>>> characteristic_polynomial_from_traces([Integer(22), Integer(484)], Integer(4), Integer(31), Integer(2), -Integer(1))
-923521*T^4 + 21142*T^3 - 22*T + 1

>>> characteristic_polynomial_from_traces([Integer(22)], Integer(4), Integer(31), Integer(2), -Integer(1), deg=Integer(1))
-22*T + 1
>>> characteristic_polynomial_from_traces([Integer(22), Integer(484)], Integer(4), Integer(31), Integer(2), -Integer(1), deg=Integer(4))
-923521*T^4 + 21142*T^3 - 22*T + 1
from sage.modular.hypergeometric_motive import characteristic_polynomial_from_traces
characteristic_polynomial_from_traces([1, 1], 1, 3, 0, -1)
characteristic_polynomial_from_traces([25], 1, 5, 4, -1)
characteristic_polynomial_from_traces([3], 2, 5, 1, 1)
characteristic_polynomial_from_traces([1], 2, 7, 1, 1)
characteristic_polynomial_from_traces([20], 3, 29, 2, 1)
characteristic_polynomial_from_traces([12], 3, 13, 2, -1)
characteristic_polynomial_from_traces([36, 7620], 4, 17, 3, 1)
characteristic_polynomial_from_traces([-4, 276], 4, 5, 3, 1)
characteristic_polynomial_from_traces([4, -276], 4, 5, 3, 1)
characteristic_polynomial_from_traces([22, 484], 4, 31, 2, -1)
characteristic_polynomial_from_traces([22], 4, 31, 2, -1, deg=1)
characteristic_polynomial_from_traces([22, 484], 4, 31, 2, -1, deg=4)
sage.modular.hypergeometric_motive.cyclotomic_to_alpha(cyclo)[source]

Convert a list of indices of cyclotomic polynomials to a list of rational numbers.

The input represents a product of cyclotomic polynomials.

The output is the list of arguments of the roots of the given product of cyclotomic polynomials.

This is the inverse of alpha_to_cyclotomic().

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import cyclotomic_to_alpha
sage: cyclotomic_to_alpha([1])
[0]
sage: cyclotomic_to_alpha([2])
[1/2]
sage: cyclotomic_to_alpha([5])
[1/5, 2/5, 3/5, 4/5]
sage: cyclotomic_to_alpha([1, 2, 3, 6])
[0, 1/6, 1/3, 1/2, 2/3, 5/6]
sage: cyclotomic_to_alpha([2, 3])
[1/3, 1/2, 2/3]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import cyclotomic_to_alpha
>>> cyclotomic_to_alpha([Integer(1)])
[0]
>>> cyclotomic_to_alpha([Integer(2)])
[1/2]
>>> cyclotomic_to_alpha([Integer(5)])
[1/5, 2/5, 3/5, 4/5]
>>> cyclotomic_to_alpha([Integer(1), Integer(2), Integer(3), Integer(6)])
[0, 1/6, 1/3, 1/2, 2/3, 5/6]
>>> cyclotomic_to_alpha([Integer(2), Integer(3)])
[1/3, 1/2, 2/3]
from sage.modular.hypergeometric_motive import cyclotomic_to_alpha
cyclotomic_to_alpha([1])
cyclotomic_to_alpha([2])
cyclotomic_to_alpha([5])
cyclotomic_to_alpha([1, 2, 3, 6])
cyclotomic_to_alpha([2, 3])
sage.modular.hypergeometric_motive.cyclotomic_to_gamma(cyclo_up, cyclo_down)[source]

Convert a quotient of products of cyclotomic polynomials to a quotient of products of polynomials \(x^n - 1\).

INPUT:

  • cyclo_up – list of indices of cyclotomic polynomials in the numerator

  • cyclo_down – list of indices of cyclotomic polynomials in the denominator

OUTPUT:

a dictionary mapping an integer \(n\) to the power of \(x^n - 1\) that appears in the given product

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import cyclotomic_to_gamma
sage: cyclotomic_to_gamma([6], [1])
{2: -1, 3: -1, 6: 1}
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import cyclotomic_to_gamma
>>> cyclotomic_to_gamma([Integer(6)], [Integer(1)])
{2: -1, 3: -1, 6: 1}
from sage.modular.hypergeometric_motive import cyclotomic_to_gamma
cyclotomic_to_gamma([6], [1])
sage.modular.hypergeometric_motive.enumerate_hypergeometric_data(d, weight=None)[source]

Return an iterator over parameters of hypergeometric motives (up to swapping).

INPUT:

  • d – the degree

  • weight – (optional) integer; specifies the motivic weight

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import enumerate_hypergeometric_data as enum
sage: l = [H for H in enum(6, weight=2) if H.hodge_numbers()[0] == 1]
sage: len(l)
112
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import enumerate_hypergeometric_data as enum
>>> l = [H for H in enum(Integer(6), weight=Integer(2)) if H.hodge_numbers()[Integer(0)] == Integer(1)]
>>> len(l)
112
from sage.modular.hypergeometric_motive import enumerate_hypergeometric_data as enum
l = [H for H in enum(6, weight=2) if H.hodge_numbers()[0] == 1]
len(l)
sage.modular.hypergeometric_motive.gamma_list_to_cyclotomic(galist)[source]

Convert a quotient of products of polynomials \(x^n - 1\) to a quotient of products of cyclotomic polynomials.

INPUT:

  • galist – list of integers, where an integer \(n\) represents the power \((x^{|n|} - 1)^{\operatorname{sgn}(n)}\)

OUTPUT:

a pair of list of integers, where \(k\) represents the cyclotomic polynomial \(\Phi_k\)

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import gamma_list_to_cyclotomic
sage: gamma_list_to_cyclotomic([-1, -1, 2])
([2], [1])

sage: gamma_list_to_cyclotomic([-1, -1, -1, -3, 6])
([2, 6], [1, 1, 1])

sage: gamma_list_to_cyclotomic([-1, 2, 3, -4])
([3], [4])

sage: gamma_list_to_cyclotomic([8, 2, 2, 2, -6, -4, -3, -1])
([2, 2, 8], [3, 3, 6])
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import gamma_list_to_cyclotomic
>>> gamma_list_to_cyclotomic([-Integer(1), -Integer(1), Integer(2)])
([2], [1])

>>> gamma_list_to_cyclotomic([-Integer(1), -Integer(1), -Integer(1), -Integer(3), Integer(6)])
([2, 6], [1, 1, 1])

>>> gamma_list_to_cyclotomic([-Integer(1), Integer(2), Integer(3), -Integer(4)])
([3], [4])

>>> gamma_list_to_cyclotomic([Integer(8), Integer(2), Integer(2), Integer(2), -Integer(6), -Integer(4), -Integer(3), -Integer(1)])
([2, 2, 8], [3, 3, 6])
from sage.modular.hypergeometric_motive import gamma_list_to_cyclotomic
gamma_list_to_cyclotomic([-1, -1, 2])
gamma_list_to_cyclotomic([-1, -1, -1, -3, 6])
gamma_list_to_cyclotomic([-1, 2, 3, -4])
gamma_list_to_cyclotomic([8, 2, 2, 2, -6, -4, -3, -1])
sage.modular.hypergeometric_motive.possible_hypergeometric_data(d, weight=None)[source]

Return the list of possible parameters of hypergeometric motives (up to swapping).

INPUT:

  • d – the degree

  • weight – (optional) integer; specifies the motivic weight

EXAMPLES:

sage: from sage.modular.hypergeometric_motive import possible_hypergeometric_data as P
sage: [len(P(i,weight=2)) for i in range(1, 7)]
[0, 0, 10, 30, 93, 234]
>>> from sage.all import *
>>> from sage.modular.hypergeometric_motive import possible_hypergeometric_data as P
>>> [len(P(i,weight=Integer(2))) for i in range(Integer(1), Integer(7))]
[0, 0, 10, 30, 93, 234]
from sage.modular.hypergeometric_motive import possible_hypergeometric_data as P
[len(P(i,weight=2)) for i in range(1, 7)]