Skip to content

Commit 4ba400e

Browse files
author
Release Manager
committed
gh-40334: minor fixes in a pyx file in quadratic_forms - using python style for the `for` loops - adding a reference to the master reference file, and cleaning a bit around there ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. URL: #40334 Reported by: Frédéric Chapoton Reviewer(s): David Coudert, Frédéric Chapoton
2 parents f24be38 + 382146d commit 4ba400e

File tree

3 files changed

+33
-30
lines changed

3 files changed

+33
-30
lines changed

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

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3297,22 +3297,23 @@ REFERENCES:
32973297
32983298
.. [HaHo2017] Nate Harman and Sam Hopkins,
32993299
*Quantum integer-valued polynomials*,
3300-
J. Alg. Comb. 2017, :doi:`10.1007/s10801-016-0717-3`
3300+
\J. Alg. Comb. 2017, :doi:`10.1007/s10801-016-0717-3`
33013301
33023302
.. [Hai1989] M.D. Haiman, *On mixed insertion, symmetry, and shifted
33033303
Young tableaux*. Journal of Combinatorial Theory, Series
33043304
A Volume 50, Number 2 (1989), pp. 196-225.
3305+
:doi:`10.1016/0097-3165(89)90015-0`
33053306
33063307
.. [Hai1992] Mark D. Haiman,
33073308
*Dual equivalence with applications, including a conjecture of Proctor*,
33083309
Discrete Mathematics 99 (1992), 79-113,
3309-
http://www.sciencedirect.com/science/article/pii/0012365X9290368P
3310+
:doi:`10.1016/0012-365X(92)90368-P`
33103311
33113312
.. [Haj2000] \M. Hajiaghayi, *Consecutive Ones Property*, 2000.
33123313
https://web.archive.org/web/20040401033532/http://www-math.mit.edu/~hajiagha/pp11.ps
33133314
33143315
.. [HAM1985] Hoffman, Alan J., Anthonius Wilhelmus Johannes Kolen, and Michel Sakarovitch.
3315-
Totally-balanced and greedy matrices.
3316+
*Totally-balanced and greedy matrices*.
33163317
SIAM Journal on Algebraic Discrete Methods 6.4 (1985): 721-730.
33173318
33183319
.. [Han2016] \G.-N. Han, *Hankel continued fraction and its applications*,
@@ -3325,16 +3326,18 @@ REFERENCES:
33253326
1960
33263327
https://web.archive.org/web/20141206163905/http://cms.math.ca/cjm/v12/cjm1960v12.0145-0157.pdf
33273328
3329+
.. [Hanke2004] Jonathan Hanke. *Local densities and explicit bounds
3330+
for representability by a quadratic form.*
3331+
Duke Math. J. 124, No. 2, 351-388 (2004).
3332+
:doi:`10.1215/S0012-7094-04-12424-8`
3333+
33283334
.. [Har1962] Frank Harary. *The determinant of the adjacency matrix of a graph*.
33293335
SIAM Review 4 (1962), pp. 202-210.
33303336
:doi:`10.1137/1004057`
33313337
3332-
.. [Har1969] Frank Harary, *Graph Theory*,
3333-
Addison-Wesley, 1969.
3334-
3335-
.. [Har1977] \R. Hartshorne. Algebraic Geometry. Springer-Verlag, New York, 1977.
3338+
.. [Har1969] Frank Harary, *Graph Theory*, Addison-Wesley, 1969.
33363339
3337-
.. [Har1994] Frank Harary. *Graph Theory*. Reading, MA: Addison-Wesley, 1994.
3340+
.. [Har1977] \R. Hartshorne. *Algebraic Geometry*. Springer-Verlag, New York, 1977.
33383341
33393342
.. [Har2009] Harvey, David. *Efficient computation of p-adic heights*.
33403343
LMS J. Comput. Math. **11** (2008), 40–59.
@@ -3343,8 +3346,8 @@ REFERENCES:
33433346
case of Kontsevich's symplectic derivation Lie algebra*.
33443347
Preprint, 2020, :arxiv:`2006.06064`.
33453348
3346-
.. [HarPri] F. Harary and G. Prins. The block-cutpoint-tree of
3347-
a graph. Publ. Math. Debrecen 13 1966 103-107.
3349+
.. [HarPri] F. Harary and G. Prins. *The block-cutpoint-tree of
3350+
a graph*. Publ. Math. Debrecen 13 1966 103-107.
33483351
33493352
.. [Harv2007] David Harvey. *Kedlaya's algorithm in larger characteristic*,
33503353
:arxiv:`math/0610973`.
@@ -3354,15 +3357,15 @@ REFERENCES:
33543357
Cartier-Manin operator*, SIAM Journal on Computing 36 (2007), no. 6,
33553358
1777-1806
33563359
3357-
.. [Hat2002] Allen Hatcher, "Algebraic Topology", Cambridge University
3360+
.. [Hat2002] Allen Hatcher, *Algebraic Topology*, Cambridge University
33583361
Press (2002).
33593362
33603363
.. [Hayashi1990] \T. Hayashi. `q`-*analogues of Clifford and Weyl algebras -
33613364
spinor and oscillator representations of quantum enveloping
33623365
algebras*. Comm. Math. Phys. **127** (1990) pp. 129-144.
33633366
3364-
.. [HC2006] Mark van Hoeij and John Cremona, Solving Conics over
3365-
function fields. J. Théor. Nombres Bordeaux, 2006.
3367+
.. [HC2006] Mark van Hoeij and John Cremona, *Solving Conics over
3368+
function fields*. J. Théor. Nombres Bordeaux, 2006.
33663369
33673370
.. [He2006] Pinar Heggernes. *Minimal triangulations of graphs: A survey*.
33683371
Discrete Mathematics, 306(3):297-317, 2006.
@@ -3372,14 +3375,14 @@ REFERENCES:
33723375
Cryptanalysis* ; 2002' available at
33733376
http://www.engr.mun.ca/~howard/PAPERS/ldc_tutorial.pdf
33743377
3375-
.. [Hes2004] Florian Hess, "Computing relations in divisor class groups of
3376-
algebraic curves over finite fields," Preprint, 2004.
3378+
.. [Hes2004] Florian Hess, *Computing relations in divisor class groups of
3379+
algebraic curves over finite fields*, Preprint, 2004.
33773380
3378-
.. [Hes2002] Florian Hess, "Computing Riemann-Roch spaces in algebraic
3379-
function fields and related topics," J. Symbolic
3381+
.. [Hes2002] Florian Hess, *Computing Riemann-Roch spaces in algebraic
3382+
function fields and related topics*, J. Symbolic
33803383
Comput. 33 (2002), no. 4, 425--445.
33813384
3382-
.. [Hes2002b] Florian Hess, "An algorithm for computing Weierstrass points,"
3385+
.. [Hes2002b] Florian Hess, *An algorithm for computing Weierstrass points*,
33833386
International Algorithmic Number Theory Symposium (pp. 357-371).
33843387
Springer Berlin Heidelberg, 2002.
33853388
@@ -3393,19 +3396,19 @@ REFERENCES:
33933396
In: Recent Developments in Algebra and Related Areas, ALM vol. 8,
33943397
pp. 129--153. International Press, Somerville (2009).
33953398
3396-
.. [Hig2002] Nicholas J. Higham. Accuracy and Stability of Numerical Algorithms,
3399+
.. [Hig2002] Nicholas J. Higham. *Accuracy and Stability of Numerical Algorithms*,
33973400
Second Edition. Society for Industrial and Applied Mathematics,
33983401
Philadelphia, 2002.
33993402
3400-
.. [Hig2008] \N. J. Higham, "Functions of matrices: theory and computation",
3403+
.. [Hig2008] \N. J. Higham, *Functions of matrices: theory and computation*,
34013404
Society for Industrial and Applied Mathematics (2008).
34023405
34033406
.. [HIK2011] R. Hammack, W. Imrich, S. Klavzar,
34043407
*Handbook of Product Graphs*,
34053408
CRC press, 2011
34063409
3407-
.. [HJ2004] Tom Hoeholdt and Joern Justesen, A Course In
3408-
Error-Correcting Codes, EMS, 2004
3410+
.. [HJ2004] Tom Hoeholdt and Joern Justesen, *A Course In
3411+
Error-Correcting Codes*, EMS, 2004
34093412
34103413
.. [HK2002a] Holme, P. and Kim, B.J. *Growing scale-free networks
34113414
with tunable clustering*, Phys. Rev. E (2002). vol 65, no 2, 026107.

src/sage/graphs/generators/smallgraphs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2093,7 +2093,7 @@ def DesarguesGraph():
20932093
"""
20942094
Return the Desargues graph.
20952095
2096-
PLOTTING: The layout chosen is the same as on the cover of [Har1994]_.
2096+
PLOTTING: The layout chosen is the same as on the cover of [Har1969]_.
20972097
20982098
EXAMPLES::
20992099

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)