Skip to content

Commit 9b1e020

Browse files
authored
Merge pull request #9 from fchapoton/some_typos_found
fixing some typos
2 parents 7c23eaf + 747ff78 commit 9b1e020

15 files changed

+131
-127
lines changed

darmonpoints/Fdoms/fdom.gp

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ addhelp(fdom, "This package can be used to compute fundamental domains for Shimu
115115
install("enum_successrate","GGGLD0,G,p","enum_successrate","libfdom.so");
116116
addhelp(enum_successrate,"Inputs A, p, C, Ntests, {R=0}: quaternion algebra A corresponding to a Shimura curve, upper half plane point p, positive real number C, positive integer Ntests, positive real R.\n Computes the small norm 1 elements of A (<=C) Ntests times, where we pick z_1=0 and z_2 a random point in the hyperbolic disc of radius R. If R=0, we auto-set R to be the same R as the algfdom method. We output the pair [obs, exp], of the number of found norm 1 elements, and the expected number.");
117117
install("enum_successrate_range","GGGGLLD0,G,DsD1,L,D1,L,p","enum_successrate_range","libfdom.so");
118-
addhelp(enum_successrate_range,"Inputs A, p, Cmin, Cmax, ntrials, Ntests, {R=0}, {fname=NULL}, {compile=1}, {WSL=1}: q-alg A corresp. to a Shimura curve, upper half plane point p, 0<Cmin<Cmax, ntrials>1 and Ntests>0 integers, R>=0, fname=file name, compile and WSL=0, 1.\n Runs enum_successrate on ntrials trials of C between Cmin and Cmax. This prints the results to the file pltos/build/fname.dat, and retuns [A, B, R^2], where the expected trend line is A+B*C, and R^2 is the R^2 value of this trendline with the data. If compile=1, we create and compile a LaTeX (pgfplots) of the curve. If WSL=1, we also display said plot, assuming we are using Windows Subsystem for Linux.");
118+
addhelp(enum_successrate_range,"Inputs A, p, Cmin, Cmax, ntrials, Ntests, {R=0}, {fname=NULL}, {compile=1}, {WSL=1}: q-alg A corresp. to a Shimura curve, upper half plane point p, 0<Cmin<Cmax, ntrials>1 and Ntests>0 integers, R>=0, fname=file name, compile and WSL=0, 1.\n Runs enum_successrate on ntrials trials of C between Cmin and Cmax. This prints the results to the file pltos/build/fname.dat, and returns [A, B, R^2], where the expected trend line is A+B*C, and R^2 is the R^2 value of this trendline with the data. If compile=1, we create and compile a LaTeX (pgfplots) of the curve. If WSL=1, we also display said plot, assuming we are using Windows Subsystem for Linux.");
119119
install("enum_time","GGGD300,L,p","enum_time","libfdom.so");
120120
addhelp(enum_time,"Inputs A, p, Cset, {mintesttime=300}: quaternion algebra A corresponding to a Shimura curve, upper half plane point p, vector of positive real numbers, mintesttime positive integer.\n This computes how long the call to algsmallnorm1elts(A, p, C, z1, z2) takes for all C in Cset, and returns a column vector of the timings. This does NOT take into account time spent initializing things related to the algebra (e.g. cholesky of the norm form), since this can be computed once and reused many times. If the time taken is <mintesttime (in milliseconds), we repeat the test K times until we have taken at least mintesttime, and divide the final result by K. A larger value of mintesttime will produce more accurate results, but will take longer.");
121121
install("enum_time_range","GGGGLD300,L,DsD1,L,D1,L,p","enum_time_range","libfdom.so");
@@ -131,7 +131,7 @@ addhelp(fdom, "This package can be used to compute fundamental domains for Shimu
131131

132132
\\REGRESSIONS & PLOTS
133133
install("OLS","GGD1,L,","OLS","libfdom.so");
134-
addhelp(OLS,"Inputs X, y, {retrsqr=1}: m*n matrix X with top row being all 1's, length n column vector y, retrsqr=0, 1.\n Performs ordinary least squares regression on the data, where the n inputs are the columns of X, and the outputs are the entries of y. We must include a constant term, hence why the first row of X must be all 1's. If retrsqr=1, returns [pararms, R^2], and otherwise returns params, where params is the length m column vector of best fit parameters.");
134+
addhelp(OLS,"Inputs X, y, {retrsqr=1}: m*n matrix X with top row being all 1's, length n column vector y, retrsqr=0, 1.\n Performs ordinary least squares regression on the data, where the n inputs are the columns of X, and the outputs are the entries of y. We must include a constant term, hence why the first row of X must be all 1's. If retrsqr=1, returns [params, R^2], and otherwise returns params, where params is the length m column vector of best fit parameters.");
135135
install("OLS_nointercept","GGD1,L,","OLS_nointercept","libfdom.so");
136136
addhelp(OLS_nointercept,"Inputs X, y, {retrsqr=1}: vector X, column vector y (of same length), retrsqr=0, 1.\n Performs ordinary least squares regression on the data assuming that y[i]=c*X[i], i.e. the y-intercept is 0. Returns c if retrsqr=0, or [c, R^2] otherwise.");
137137
install("OLS_single","GGD1,L,","OLS_single","libfdom.so");

darmonpoints/arithgroup.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,15 @@ def intersect_geodesic_arcs(x1, x2, y1, y2):
121121
r"""
122122
TESTS::
123123
124-
sage: from darmonpoints.arithgroup import intersect_geodesic_arcs
125-
sage: intersect_geodesic_arcs(1,3,2,4)
126-
1/2*I*sqrt(3) + 5/2
127-
sage: print(intersect_geodesic_arcs(-1, 1, 0, AA(-1).sqrt()))
128-
None
129-
sage: intersect_geodesic_arcs(-1, 1, 0, 2*AA(-1).sqrt())
130-
I
131-
sage: intersect_geodesic_arcs(-3, 3, 2*AA(-1).sqrt(), Infinity)
132-
3*I
124+
sage: from darmonpoints.arithgroup import intersect_geodesic_arcs
125+
sage: intersect_geodesic_arcs(1,3,2,4)
126+
1/2*I*sqrt(3) + 5/2
127+
sage: print(intersect_geodesic_arcs(-1, 1, 0, AA(-1).sqrt()))
128+
None
129+
sage: intersect_geodesic_arcs(-1, 1, 0, 2*AA(-1).sqrt())
130+
I
131+
sage: intersect_geodesic_arcs(-3, 3, 2*AA(-1).sqrt(), Infinity)
132+
3*I
133133
"""
134134
# verbose('Entering intersect_geodesic_arcs')
135135
e1 = geodesic_circle(x1, x2)
@@ -1810,7 +1810,7 @@ def compute_quadratic_embedding(self, D, return_generator=False, **kwargs):
18101810
try:
18111811
_, iota = self.magma.Embed(OK_magma, O_magma, nvals=2)
18121812
except RuntimeError:
1813-
print("An error ocurred!")
1813+
print("An error occurred!")
18141814
print("OK_magma = %s" % OK_magma)
18151815
print("O_magma =" % O_magma)
18161816
raise RuntimeError("Error while computing quadratic embedding")
@@ -2538,7 +2538,7 @@ def __init__(
25382538
}
25392539
verbose("Done computing coset reps.")
25402540
## compute the generators of H
2541-
verbose("Computing the auxiliar data...")
2541+
verbose("Computing the auxiliary data...")
25422542
(
25432543
self._gens_dict_auxiliary,
25442544
self._gens_matrices_auxiliary,
@@ -2744,14 +2744,14 @@ def _get_word_rep_auxiliary(self, h, check=False):
27442744
27452745
Firstly, we write this as h = 1.h. Then we write h = gh', where g in Gens(G) (so we must be
27462746
able to solve the word problem for G). Then write 1.g = zp', so that
2747-
h = z * p' * h'. Now iterate. We will end up with z_1 z_2 ... z_t p_0, where p_0 = id rep.
2747+
h = z * p' * h'. Now iterate. We will end up with z_1 z_2 ... z_t p_0, where p_0 = id rep.
27482748
27492749
OUTPUT:
27502750
27512751
- a list of integers in {-t,-t+1,...,t-1,t}, where the output of _generators_auxiliary is
27522752
[a_1,...,a_t].
27532753
2754-
For example,
2754+
For example::
27552755
27562756
h = abc in H, a,b,c in Gens(G)
27572757
h = 1.abc

darmonpoints/arithgroup_element.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(self, parent, word_rep=None, quaternion_rep=None, check=False):
4646
INPUT:
4747
4848
- a list of the form [(g1,a1),(g2,a2),...,(gn,an)] where the gi are indices
49-
refering to fixed generators, and the ai are integers, or
49+
referring to fixed generators, and the ai are integers, or
5050
an element of the quaternion algebra ``self.parent().quaternion_algebra()``.
5151
5252
"""
@@ -281,7 +281,7 @@ def find_bounding_cycle(self, G, npow=1):
281281
# If a < 0 use the relation g^a = -g^(-a) + del(g^a|g^(-a))
282282
ans.extend([(npow, [gaq**-1], ga)] if a < 0 else [])
283283
# By the above line we have to deal with g^a with -g^abs(a) if a <0
284-
# We add the corresponding boundaries, which we will substract if a > 0 and add if a < 0
284+
# We add the corresponding boundaries, which we will subtract if a > 0 and add if a < 0
285285
ans.extend(
286286
[(-sgn(a) * npow, [gq**j for j in range(1, abs(a))], g)]
287287
if abs(a) > 1

darmonpoints/arithgroup_generic.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ def decompose_into_commutators(self, x):
526526
commutator_list = []
527527
for i in range(len(self.gens())):
528528
while True:
529-
# Find the first occurence of generator i
529+
# Find the first occurrence of generator i
530530
try:
531531
idx = [x[0] for x in oldword[1:]].index(i) + 1
532532
except ValueError:
@@ -638,7 +638,7 @@ def compute_cusp_stabiliser(self, cusp_matrix):
638638
We know the stabiliser of infinity is given by matrices of form
639639
(u, a; 0, u^-1), so a finite index subgroup is generated by (1, alpha; 0, 1)
640640
and (1, 1; 0, 1) for K = Q(alpha). Given the cusp, we use a matrix
641-
sending infinty to that cusp, and the conjugate by it, before taking powers
641+
sending infinity to that cusp, and the conjugate by it, before taking powers
642642
to ensure the result is integral and lies in Gamma_0(N).
643643
644644
Input:
@@ -662,7 +662,7 @@ def compute_cusp_stabiliser(self, cusp_matrix):
662662
infinity_gens = [matrix([[1, 1], [0, 1]])]
663663
N_ideal = ZZ.ideal(P.N())
664664

665-
## Initilise (empty) list of generators of Stab_Gamma(cusp)
665+
## Initialise (empty) list of generators of Stab_Gamma(cusp)
666666
cusp_gens = []
667667

668668
## Loop over all the generators of stab at infinity, conjugate into stab at cusp
@@ -689,12 +689,13 @@ def cusp_reduction_table(self):
689689
690690
Takes as input the object representing P^1(O_F/N), where F is a number field
691691
(that is possibly Q), and N is some ideal in the field. Runs the following algorithm:
692-
- take a remaining element C = (c:d) of P^1(O_F/N);
693-
- add this to the set of cusps, declaring it to be our chosen rep;
694-
- run through every translate C' = (c':d') of C under the stabiliser of infinity, and
695-
remove this translate from the set of remaining elements;
696-
- store the matrix T in the stabiliser such that C' * T = C (as elements in P^1)
697-
in the dictionary, with key C'.
692+
693+
- take a remaining element C = (c:d) of P^1(O_F/N);
694+
- add this to the set of cusps, declaring it to be our chosen rep;
695+
- run through every translate C' = (c':d') of C under the stabiliser of infinity, and
696+
remove this translate from the set of remaining elements;
697+
- store the matrix T in the stabiliser such that C' * T = C (as elements in P^1)
698+
in the dictionary, with key C'.
698699
"""
699700
P = self.get_P1List()
700701
if hasattr(P.N(), "number_field"):

darmonpoints/cohomology_arithmetic.py

+13-12
Original file line numberDiff line numberDiff line change
@@ -468,18 +468,19 @@ def BI(self, h, j=None): # Returns \int_{h \Z_p} z^j \Phi\{0 \to \infy\}
468468
Input a 2x2 matrix h in SL2(OK) (which embeds as an element of Sigma_0(p)), and a value j.
469469
470470
Options for j:
471-
- classical case: specify a non-negative integer j. Then returns the value
472-
BI_{h,j} := Int_{h.Zp} z^j . d Phi{0 --> infty},
473-
that is, the value of the distribution Phi{0 --> infty} at the function z^j x
474-
the indicator function of the open set h.Zp.
475-
476-
- Bianchi case: specify a tuple (k,l). Then returns the value
477-
BI_{h,j} := Int_{h.(Zp x Zp)} x^k y^l . d Phi{0 --> infty},
478-
that is, the value of the distribution Phi{0 --> infty} at the function x^k y^l x
479-
the indicator function of the open set h.(Zp x Zp).
480-
481-
- do not specify j. Then returns the the distribution mu whose moments are
482-
BI_{h,j}.
471+
472+
- classical case: specify a non-negative integer j. Then returns the value
473+
BI_{h,j} := Int_{h.Zp} z^j . d Phi{0 --> infty},
474+
that is, the value of the distribution Phi{0 --> infty} at the function z^j x
475+
the indicator function of the open set h.Zp.
476+
477+
- Bianchi case: specify a tuple (k,l). Then returns the value
478+
BI_{h,j} := Int_{h.(Zp x Zp)} x^k y^l . d Phi{0 --> infty},
479+
that is, the value of the distribution Phi{0 --> infty} at the function x^k y^l x
480+
the indicator function of the open set h.(Zp x Zp).
481+
482+
- do not specify j. Then returns the the distribution mu whose moments are
483+
BI_{h,j}.
483484
484485
"""
485486
V = self.parent().coefficient_module() ## Module V in H^1(G,V)

darmonpoints/darmonpoints.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -178,28 +178,28 @@ def darmon_point(
178178
179179
We first need to import the module::
180180
181-
sage: from darmonpoints.darmonpoints import darmon_point
181+
sage: from darmonpoints.darmonpoints import darmon_point
182182
183183
A first example (Stark--Heegner point)::
184184
185-
sage: from darmonpoints.darmonpoints import darmon_point
186-
sage: darmon_point(7,EllipticCurve('35a1'),41,20, cohomological=False, use_magma=False, use_ps_dists = True)[0]
187-
Starting computation of the Darmon point
188-
...
189-
-70*alpha + 449
185+
sage: from darmonpoints.darmonpoints import darmon_point
186+
sage: darmon_point(7,EllipticCurve('35a1'),41,20, cohomological=False, use_magma=False, use_ps_dists = True)[0]
187+
Starting computation of the Darmon point
188+
...
189+
-70*alpha + 449
190190
191191
A quaternionic (Greenberg) point::
192192
193-
sage: darmon_point(13,EllipticCurve('78a1'),5,20) # long time # optional - magma
193+
sage: darmon_point(13,EllipticCurve('78a1'),5,20) # long time # optional - magma
194194
195195
A Darmon point over a cubic (1,1) field::
196196
197-
sage: F.<r> = NumberField(x^3 - x^2 - x + 2)
198-
sage: E = EllipticCurve([-r -1, -r, -r - 1,-r - 1, 0])
199-
sage: N = E.conductor()
200-
sage: P = F.ideal(r^2 - 2*r - 1)
201-
sage: beta = -3*r^2 + 9*r - 6
202-
sage: darmon_point(P,E,beta,20) # long time # optional - magma
197+
sage: F.<r> = NumberField(x^3 - x^2 - x + 2)
198+
sage: E = EllipticCurve([-r -1, -r, -r - 1,-r - 1, 0])
199+
sage: N = E.conductor()
200+
sage: P = F.ideal(r^2 - 2*r - 1)
201+
sage: beta = -3*r^2 + 9*r - 6
202+
sage: darmon_point(P,E,beta,20) # long time # optional - magma
203203
204204
"""
205205
# global G, Coh, phiE, Phi, dK, J, J1, cycleGn, nn, Jlist

darmonpoints/darmonvonk.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,11 @@ def darmon_vonk_point(
292292
r"""
293293
EXAMPLES ::
294294
295-
sage: from darmonpoints.darmonvonk import darmon_vonk_point
296-
sage: J = darmon_vonk_point(5, 1, 3, 13, 60, parity='+', recognize_point='algdep',magma=magma) # optional - magma
297-
#### Starting computation of the Darmon-Vonk point ####
298-
...
299-
f = 7*x^2 + 11*x + 7
295+
sage: from darmonpoints.darmonvonk import darmon_vonk_point
296+
sage: J = darmon_vonk_point(5, 1, 3, 13, 60, parity='+', recognize_point='algdep',magma=magma) # optional - magma
297+
#### Starting computation of the Darmon-Vonk point ####
298+
...
299+
f = 7*x^2 + 11*x + 7
300300
"""
301301
if magma is None:
302302
from sage.interfaces.magma import Magma

darmonpoints/findcurve.py

+17-17
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,29 @@ def find_curve(
4141
4242
First example::
4343
44-
sage: from darmonpoints.findcurve import find_curve
45-
sage: find_curve(5,6,30,20) # long time # optional - magma
46-
# B = F<i,j,k>, with i^2 = -1 and j^2 = 3
47-
...
48-
'(1, 0, 1, -289, 1862)'
44+
sage: from darmonpoints.findcurve import find_curve
45+
sage: find_curve(5,6,30,20) # long time # optional - magma
46+
# B = F<i,j,k>, with i^2 = -1 and j^2 = 3
47+
...
48+
'(1, 0, 1, -289, 1862)'
4949
5050
A second example, now over a real quadratic::
5151
52-
sage: from darmonpoints.findcurve import find_curve
53-
sage: F.<r> = QuadraticField(5)
54-
sage: P = F.ideal(3/2*r + 1/2)
55-
sage: D = F.ideal(3)
56-
sage: find_curve(P,D,P*D,30,ramification_at_infinity = F.real_places()[:1]) # long time # optional - magma
57-
...
52+
sage: from darmonpoints.findcurve import find_curve
53+
sage: F.<r> = QuadraticField(5)
54+
sage: P = F.ideal(3/2*r + 1/2)
55+
sage: D = F.ideal(3)
56+
sage: find_curve(P,D,P*D,30,ramification_at_infinity = F.real_places()[:1]) # long time # optional - magma
57+
...
5858
5959
Now over a cubic of mixed signature::
6060
61-
sage: from darmonpoints.findcurve import find_curve
62-
sage: F.<r> = NumberField(x^3 -3)
63-
sage: P = F.ideal(r-2)
64-
sage: D = F.ideal(r-1)
65-
sage: find_curve(P,D,P*D,30) # long time # optional - magma
66-
...
61+
sage: from darmonpoints.findcurve import find_curve
62+
sage: F.<r> = NumberField(x^3 -3)
63+
sage: P = F.ideal(r-2)
64+
sage: D = F.ideal(r-1)
65+
sage: find_curve(P,D,P*D,30) # long time # optional - magma
66+
...
6767
6868
"""
6969
config = configparser.ConfigParser()

darmonpoints/integrals.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,11 @@ def riemann_sum(G, phi, hc, depth=1, mult=False, progress_bar=False, K=None):
436436
if hce == 0:
437437
continue
438438
# verbose('hc = %s'%hce)
439-
te = sample_point(G, e, prec)
440-
if te == Infinity:
439+
t_e = sample_point(G, e, prec)
440+
if t_e == Infinity:
441441
continue
442442
if mult:
443-
res *= phi(K(te)) ** hce
443+
res *= phi(K(t_e)) ** hce
444444
else:
445-
res += phi(K(te)) * hce
445+
res += phi(K(t_e)) * hce
446446
return res

darmonpoints/limits.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
##########################################################################################
22-
# now the new functions that we need...they follow pretty close the article we're writting
22+
# now the new functions that we need...they follow pretty close the article we're writing
2323
##########################################################################################
2424
def factorize_matrix(m, M):
2525
# assert is_in_Gamma_1(m,M,determinant_condition = False)

darmonpoints/my_p1list_nf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def list(self):
190190

191191
def normalize(self, c, d, with_scalar=False):
192192
r"""
193-
[We have gutted this function from its orginal state!]
193+
[We have gutted this function from its original state!]
194194
[Note: there is now no check!]
195195
196196
Return a normalized element of (a canonical representative of an element

darmonpoints/ocbianchi.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def _an_element_(self):
9494

9595
def _element_constructor_(self, first, second):
9696
r"""
97-
Element constructor. Takes as input tuple (g,h) of elments
97+
Element constructor. Takes as input tuple (g,h) of elements
9898
of Sigma_0(p) and represents the element (g,h) in the product.
9999
"""
100100
return Sigma0SquaredElement(self, (self._Sigma0(first), self._Sigma0(second)))
@@ -528,7 +528,7 @@ def evaluate_at_poly(self, P, R=None, depth=None):
528528
## For each monomial x^iy^j in the polynomial, multip] ly the coefficient of X^iY^j (in mu) by the
529529
## coefficient of x^iy^j (in f) and take the sum. This is our final value
530530
## --> P.coefficients is a dictionary which has monomials as keys; we generate monomials using exponents.
531-
## --> self._moments takes as input an index and spits out the cofficient. So generate the index from the exponent.
531+
## --> self._moments takes as input an index and spits out the coefficient. So generate the index from the exponent.
532532
coefficient_list = []
533533
for polx in P.padded_list(self._depth):
534534
coefficient_list.extend(polx.padded_list(self._depth))
@@ -624,7 +624,7 @@ class BianchiDistributions(Module, UniqueRepresentation):
624624

625625
def __init__(self, p, depth, act_on_left=False, adjuster=None):
626626
self._dimension = (
627-
0 ## Hack!! Dimension was being called before it was intialised
627+
0 ## Hack!! Dimension was being called before it was initialised
628628
)
629629
self._Rmod = ZpCA(p, depth - 1) ## create Zp
630630
Module.__init__(self, base=self._Rmod)

0 commit comments

Comments
 (0)