Skip to content

Commit cee9d0c

Browse files
committed
doc, rerurn valuation in QQ instead of ZZ
1 parent 32a0c08 commit cee9d0c

File tree

2 files changed

+47
-6
lines changed

2 files changed

+47
-6
lines changed

src/sage/functions/hypergeometric_algebraic.py

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ def _repr_(self):
158158
return s
159159

160160
def _latex_(self):
161+
r"""
162+
EXAMPLES::
163+
164+
sage: S.<x> = QQ[]+
165+
sage: f = hypergeometric([1/3, 2/3], [1/2], x)
166+
sage: f._latex_()
167+
'\\,_{2} F_{1} \\left(\\begin{matrix} \\frac{1}{3},\\frac{2}{3}\\\\\\frac{1}{2}\\end{matrix}; x \\right)'
168+
"""
161169
if self._parameters is None:
162170
return "0"
163171
scalar = self._scalar
@@ -1330,14 +1338,31 @@ def polynomial(self):
13301338
raise NotImplementedError
13311339

13321340
def is_algebraic(self):
1341+
# I am convinced that this is true, but strictly speaking we only have
1342+
# a statement for almost all primes in the literature.
1343+
r"""
1344+
Return whether this hypergeometric function is algebraic.
1345+
1346+
EXAMPLES::
1347+
1348+
sage: S.<x> = GF(19)
1349+
sage: f = hypergeometric([1/5, 2/5, 3/5, 1/11], [1/2, 1/7], x)
1350+
sage: f.is_algebraic()
1351+
True
1352+
1353+
ALGORITHM:
1354+
1355+
Every hypergeometric function that can be reduced modulo ``p`` is
1356+
algebraic modulo ``p``.
1357+
"""
13331358
return True
13341359

13351360
def p_curvature(self):
13361361
r"""
13371362
Return the matrix of the `p`-curvature of the associated differential
13381363
operator, in the standard basis.
13391364
1340-
EXAMLES::
1365+
EXAMPLES::
13411366
13421367
sage: S.<x> = GF(5)[]
13431368
sage: f = hypergeometric ([1/9, 4/9, 5/9], [1/3, 1], x)
@@ -1373,6 +1398,22 @@ def p_curvature(self):
13731398

13741399
def p_curvature_corank(self): # maybe p_curvature_rank is preferable?
13751400
# TODO: check if it is also correct when the parameters are not balanced
1401+
r"""
1402+
Return the corant of the ``p``-curvature matrix.
1403+
1404+
EXAMPLES::
1405+
1406+
sage: S.<x> = GF(5)[]
1407+
sage: f = hypergeometric([1/9, 4/9, 5/9], [1/3, 1], x)
1408+
sage: f.p_curvature_corank()
1409+
2
1410+
1411+
ALGORITHM:
1412+
1413+
We use [CFV2025]_, Thm. 3.1.17 and the fact that the corank of the
1414+
p-curvature agrees with the number of solutions of the hypergeometric
1415+
differential equation.
1416+
"""
13761417
return self._parameters.q_interlacing_number(self._char)
13771418

13781419
def dwork_relation(self):
@@ -1386,8 +1427,8 @@ def dwork_relation(self):
13861427
sage: S.<x> = GF(3)[]
13871428
sage: f = hypergeometric([7/8, 9/8, 11/8], [3/2, 7/4], x)
13881429
sage: f.dwork_relation()
1389-
{hypergeometric((3/8, 5/8, 9/8), (1/2, 5/4), x): 1,
1390-
hypergeometric((1, 21/8, 25/8, 27/8), (3, 13/4, 7/2), x): 2*x^7}
1430+
{hypergeometric((1, 21/8, 25/8, 27/8), (3, 13/4, 7/2), x): 2*x^7,
1431+
hypergeometric((3/8, 5/8, 9/8), (1/2, 5/4), x): 1}
13911432
"""
13921433
parameters = self._parameters
13931434
if not parameters.is_balanced():
@@ -1514,7 +1555,7 @@ def is_lucas(self):
15141555
EXAMPLES::
15151556
15161557
sage: S.<x> = QQ[]
1517-
sage: f = hypergeom([1/5, 4/5], [1], x)
1558+
sage: f = hypergeometric([1/5, 4/5], [1], x)
15181559
sage: g = f % 19
15191560
sage: g.is_lucas()
15201561
True

src/sage/functions/hypergeometric_parameters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ def valuation_position(self, p, drift=0):
688688
if q > bound:
689689
valuation, position, _ = signature[0]
690690
if drift > 2*thresold and all(signature[i][0] > valuation + thresold for i in range(1, n)):
691-
return ZZ(valuation), ZZ(position), r
691+
return QQ(valuation), ZZ(position), r
692692
if growth == 0:
693693
if count < order:
694694
TM = TMr * TM
@@ -700,7 +700,7 @@ def valuation_position(self, p, drift=0):
700700
return -infinity, None, r
701701
valfinal = min(TM[0, j].lift() + signature[j][0] for j in range(n))
702702
if valuation == valfinal:
703-
return ZZ(valuation), ZZ(position), r
703+
return QQ(valuation), ZZ(position), r
704704

705705
# We update the values for the next r
706706
q = pq

0 commit comments

Comments
 (0)