Skip to content

Commit a2cd297

Browse files
committed
minor fixes in a pyx file in quadratic_forms
1 parent 665a3fa commit a2cd297

File tree

2 files changed

+31
-25
lines changed

2 files changed

+31
-25
lines changed

src/doc/en/reference/references/index.rst

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3293,22 +3293,23 @@ REFERENCES:
32933293
32943294
.. [HaHo2017] Nate Harman and Sam Hopkins,
32953295
*Quantum integer-valued polynomials*,
3296-
J. Alg. Comb. 2017, :doi:`10.1007/s10801-016-0717-3`
3296+
\J. Alg. Comb. 2017, :doi:`10.1007/s10801-016-0717-3`
32973297
32983298
.. [Hai1989] M.D. Haiman, *On mixed insertion, symmetry, and shifted
32993299
Young tableaux*. Journal of Combinatorial Theory, Series
33003300
A Volume 50, Number 2 (1989), pp. 196-225.
3301+
:doi:`10.1016/0097-3165(89)90015-0`
33013302
33023303
.. [Hai1992] Mark D. Haiman,
33033304
*Dual equivalence with applications, including a conjecture of Proctor*,
33043305
Discrete Mathematics 99 (1992), 79-113,
3305-
http://www.sciencedirect.com/science/article/pii/0012365X9290368P
3306+
:doi:`10.1016/0012-365X(92)90368-P`
33063307
33073308
.. [Haj2000] \M. Hajiaghayi, *Consecutive Ones Property*, 2000.
33083309
https://web.archive.org/web/20040401033532/http://www-math.mit.edu/~hajiagha/pp11.ps
33093310
33103311
.. [HAM1985] Hoffman, Alan J., Anthonius Wilhelmus Johannes Kolen, and Michel Sakarovitch.
3311-
Totally-balanced and greedy matrices.
3312+
*Totally-balanced and greedy matrices*.
33123313
SIAM Journal on Algebraic Discrete Methods 6.4 (1985): 721-730.
33133314
33143315
.. [Han2016] \G.-N. Han, *Hankel continued fraction and its applications*,
@@ -3321,14 +3322,19 @@ REFERENCES:
33213322
1960
33223323
https://web.archive.org/web/20141206163905/http://cms.math.ca/cjm/v12/cjm1960v12.0145-0157.pdf
33233324
3325+
.. [Hanke2004] Jonathan Hanke. *Local densities and explicit bounds
3326+
for representability by a quadratic form.*
3327+
Duke Math. J. 124, No. 2, 351-388 (2004).
3328+
:doi:`10.1215/S0012-7094-04-12424-8`
3329+
33243330
.. [Har1962] Frank Harary. *The determinant of the adjacency matrix of a graph*.
33253331
SIAM Review 4 (1962), pp. 202-210.
33263332
:doi:`10.1137/1004057`
33273333
33283334
.. [Har1969] Frank Harary, *Graph Theory*,
33293335
Addison-Wesley, 1969.
33303336
3331-
.. [Har1977] \R. Hartshorne. Algebraic Geometry. Springer-Verlag, New York, 1977.
3337+
.. [Har1977] \R. Hartshorne. *Algebraic Geometry*. Springer-Verlag, New York, 1977.
33323338
33333339
.. [Har1994] Frank Harary. *Graph Theory*. Reading, MA: Addison-Wesley, 1994.
33343340
@@ -3339,8 +3345,8 @@ REFERENCES:
33393345
case of Kontsevich's symplectic derivation Lie algebra*.
33403346
Preprint, 2020, :arxiv:`2006.06064`.
33413347
3342-
.. [HarPri] F. Harary and G. Prins. The block-cutpoint-tree of
3343-
a graph. Publ. Math. Debrecen 13 1966 103-107.
3348+
.. [HarPri] F. Harary and G. Prins. *The block-cutpoint-tree of
3349+
a graph*. Publ. Math. Debrecen 13 1966 103-107.
33443350
33453351
.. [Harv2007] David Harvey. *Kedlaya's algorithm in larger characteristic*,
33463352
:arxiv:`math/0610973`.
@@ -3350,15 +3356,15 @@ REFERENCES:
33503356
Cartier-Manin operator*, SIAM Journal on Computing 36 (2007), no. 6,
33513357
1777-1806
33523358
3353-
.. [Hat2002] Allen Hatcher, "Algebraic Topology", Cambridge University
3359+
.. [Hat2002] Allen Hatcher, *Algebraic Topology*, Cambridge University
33543360
Press (2002).
33553361
33563362
.. [Hayashi1990] \T. Hayashi. `q`-*analogues of Clifford and Weyl algebras -
33573363
spinor and oscillator representations of quantum enveloping
33583364
algebras*. Comm. Math. Phys. **127** (1990) pp. 129-144.
33593365
3360-
.. [HC2006] Mark van Hoeij and John Cremona, Solving Conics over
3361-
function fields. J. Théor. Nombres Bordeaux, 2006.
3366+
.. [HC2006] Mark van Hoeij and John Cremona, *Solving Conics over
3367+
function fields*. J. Théor. Nombres Bordeaux, 2006.
33623368
33633369
.. [He2006] Pinar Heggernes. *Minimal triangulations of graphs: A survey*.
33643370
Discrete Mathematics, 306(3):297-317, 2006.
@@ -3368,14 +3374,14 @@ REFERENCES:
33683374
Cryptanalysis* ; 2002' available at
33693375
http://www.engr.mun.ca/~howard/PAPERS/ldc_tutorial.pdf
33703376
3371-
.. [Hes2004] Florian Hess, "Computing relations in divisor class groups of
3372-
algebraic curves over finite fields," Preprint, 2004.
3377+
.. [Hes2004] Florian Hess, *Computing relations in divisor class groups of
3378+
algebraic curves over finite fields*, Preprint, 2004.
33733379
3374-
.. [Hes2002] Florian Hess, "Computing Riemann-Roch spaces in algebraic
3375-
function fields and related topics," J. Symbolic
3380+
.. [Hes2002] Florian Hess, *Computing Riemann-Roch spaces in algebraic
3381+
function fields and related topics*, J. Symbolic
33763382
Comput. 33 (2002), no. 4, 425--445.
33773383
3378-
.. [Hes2002b] Florian Hess, "An algorithm for computing Weierstrass points,"
3384+
.. [Hes2002b] Florian Hess, *An algorithm for computing Weierstrass points*,
33793385
International Algorithmic Number Theory Symposium (pp. 357-371).
33803386
Springer Berlin Heidelberg, 2002.
33813387
@@ -3389,19 +3395,19 @@ REFERENCES:
33893395
In: Recent Developments in Algebra and Related Areas, ALM vol. 8,
33903396
pp. 129--153. International Press, Somerville (2009).
33913397
3392-
.. [Hig2002] Nicholas J. Higham. Accuracy and Stability of Numerical Algorithms,
3398+
.. [Hig2002] Nicholas J. Higham. *Accuracy and Stability of Numerical Algorithms*,
33933399
Second Edition. Society for Industrial and Applied Mathematics,
33943400
Philadelphia, 2002.
33953401
3396-
.. [Hig2008] \N. J. Higham, "Functions of matrices: theory and computation",
3402+
.. [Hig2008] \N. J. Higham, *Functions of matrices: theory and computation*,
33973403
Society for Industrial and Applied Mathematics (2008).
33983404
33993405
.. [HIK2011] R. Hammack, W. Imrich, S. Klavzar,
34003406
*Handbook of Product Graphs*,
34013407
CRC press, 2011
34023408
3403-
.. [HJ2004] Tom Hoeholdt and Joern Justesen, A Course In
3404-
Error-Correcting Codes, EMS, 2004
3409+
.. [HJ2004] Tom Hoeholdt and Joern Justesen, *A Course In
3410+
Error-Correcting Codes*, EMS, 2004
34053411
34063412
.. [HK2002a] Holme, P. and Kim, B.J. *Growing scale-free networks
34073413
with tunable clustering*, Phys. Rev. E (2002). vol 65, no 2, 026107.

src/sage/quadratic_forms/count_local_2.pyx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def count_modp__by_gauss_sum(n, p, m, Qdet):
1414
1515
REFERENCE:
1616
17-
These are defined in Table 1 on p363 of Hanke's "Local Densities..." paper.
17+
These are defined in Table 1 on page 363 of [Hanke2004]_.
1818
1919
INPUT:
2020
@@ -58,15 +58,15 @@ def count_modp__by_gauss_sum(n, p, m, Qdet):
5858
"""
5959
# Check that Qdet is non-degenerate
6060
if Qdet % p == 0:
61-
raise RuntimeError("Qdet must be nonzero.")
61+
raise RuntimeError("Qdet must be nonzero")
6262

6363
# Check that p is prime > 2
6464
if not is_prime(p) or p == 2:
65-
raise RuntimeError("p must be a prime number > 2.")
65+
raise RuntimeError("p must be a prime number > 2")
6666

6767
# Check that n >= 1
6868
if n < 1:
69-
raise RuntimeError("the dimension n must be >= 1.")
69+
raise RuntimeError("the dimension n must be >= 1")
7070

7171
# Compute the Gauss sum
7272
neg1 = -1
@@ -125,8 +125,8 @@ cdef CountAllLocalTypesNaive_cdef(Q, p, k, m, zvec, nzvec):
125125

126126
# Evaluate Q(v) quickly
127127
tmp_val = Mod(0, R)
128-
for a from 0 <= a < n:
129-
for b from a <= b < n:
128+
for a in range(n):
129+
for b in range(a, n):
130130
tmp_val += Q1[a, b] * v[a] * v[b]
131131

132132
# Sort the solution by it's type
@@ -252,7 +252,7 @@ cdef local_solution_type_cdef(Q, p, w, zvec, nzvec):
252252

253253
# Check if wS1 is zero or not
254254
wS1_nonzero_flag = False
255-
for i from 0 <= i < n:
255+
for i in range(n):
256256

257257
# Compute the valuation of each index, allowing for off-diagonal terms
258258
if Q[i, i] == 0:

0 commit comments

Comments
 (0)