Skip to content

Commit

Permalink
fixing some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Feb 29, 2024
1 parent fc12a9c commit e88541b
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions darmonpoints/Fdoms/fdom.gp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ addhelp(fdom, "This package can be used to compute fundamental domains for Shimu
install("enum_successrate","GGGLD0,G,p","enum_successrate","libfdom.so");
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.");
install("enum_successrate_range","GGGGLLD0,G,DsD1,L,D1,L,p","enum_successrate_range","libfdom.so");
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.");
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.");
install("enum_time","GGGD300,L,p","enum_time","libfdom.so");
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.");
install("enum_time_range","GGGGLD300,L,DsD1,L,D1,L,p","enum_time_range","libfdom.so");
Expand All @@ -131,7 +131,7 @@ addhelp(fdom, "This package can be used to compute fundamental domains for Shimu

\\REGRESSIONS & PLOTS
install("OLS","GGD1,L,","OLS","libfdom.so");
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.");
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.");
install("OLS_nointercept","GGD1,L,","OLS_nointercept","libfdom.so");
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.");
install("OLS_single","GGD1,L,","OLS_single","libfdom.so");
Expand Down
4 changes: 2 additions & 2 deletions darmonpoints/arithgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,7 @@ def compute_quadratic_embedding(self, D, return_generator=False, **kwargs):
try:
_, iota = self.magma.Embed(OK_magma, O_magma, nvals=2)
except RuntimeError:
print("An error ocurred!")
print("An error occurred!")
print("OK_magma = %s" % OK_magma)
print("O_magma =" % O_magma)
raise RuntimeError("Error while computing quadratic embedding")
Expand Down Expand Up @@ -2538,7 +2538,7 @@ def __init__(
}
verbose("Done computing coset reps.")
## compute the generators of H
verbose("Computing the auxiliar data...")
verbose("Computing the auxiliary data...")
(
self._gens_dict_auxiliary,
self._gens_matrices_auxiliary,
Expand Down
4 changes: 2 additions & 2 deletions darmonpoints/arithgroup_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, parent, word_rep=None, quaternion_rep=None, check=False):
INPUT:
- a list of the form [(g1,a1),(g2,a2),...,(gn,an)] where the gi are indices
refering to fixed generators, and the ai are integers, or
referring to fixed generators, and the ai are integers, or
an element of the quaternion algebra ``self.parent().quaternion_algebra()``.
"""
Expand Down Expand Up @@ -281,7 +281,7 @@ def find_bounding_cycle(self, G, npow=1):
# If a < 0 use the relation g^a = -g^(-a) + del(g^a|g^(-a))
ans.extend([(npow, [gaq**-1], ga)] if a < 0 else [])
# By the above line we have to deal with g^a with -g^abs(a) if a <0
# We add the corresponding boundaries, which we will substract if a > 0 and add if a < 0
# We add the corresponding boundaries, which we will subtract if a > 0 and add if a < 0
ans.extend(
[(-sgn(a) * npow, [gq**j for j in range(1, abs(a))], g)]
if abs(a) > 1
Expand Down
6 changes: 3 additions & 3 deletions darmonpoints/arithgroup_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def decompose_into_commutators(self, x):
commutator_list = []
for i in range(len(self.gens())):
while True:
# Find the first occurence of generator i
# Find the first occurrence of generator i
try:
idx = [x[0] for x in oldword[1:]].index(i) + 1
except ValueError:
Expand Down Expand Up @@ -638,7 +638,7 @@ def compute_cusp_stabiliser(self, cusp_matrix):
We know the stabiliser of infinity is given by matrices of form
(u, a; 0, u^-1), so a finite index subgroup is generated by (1, alpha; 0, 1)
and (1, 1; 0, 1) for K = Q(alpha). Given the cusp, we use a matrix
sending infinty to that cusp, and the conjugate by it, before taking powers
sending infinity to that cusp, and the conjugate by it, before taking powers
to ensure the result is integral and lies in Gamma_0(N).
Input:
Expand All @@ -662,7 +662,7 @@ def compute_cusp_stabiliser(self, cusp_matrix):
infinity_gens = [matrix([[1, 1], [0, 1]])]
N_ideal = ZZ.ideal(P.N())

## Initilise (empty) list of generators of Stab_Gamma(cusp)
## Initialise (empty) list of generators of Stab_Gamma(cusp)
cusp_gens = []

## Loop over all the generators of stab at infinity, conjugate into stab at cusp
Expand Down
8 changes: 4 additions & 4 deletions darmonpoints/integrals.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,11 +436,11 @@ def riemann_sum(G, phi, hc, depth=1, mult=False, progress_bar=False, K=None):
if hce == 0:
continue
# verbose('hc = %s'%hce)
te = sample_point(G, e, prec)
if te == Infinity:
t_e = sample_point(G, e, prec)
if t_e == Infinity:
continue
if mult:
res *= phi(K(te)) ** hce
res *= phi(K(t_e)) ** hce
else:
res += phi(K(te)) * hce
res += phi(K(t_e)) * hce
return res
2 changes: 1 addition & 1 deletion darmonpoints/limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


##########################################################################################
# now the new functions that we need...they follow pretty close the article we're writting
# now the new functions that we need...they follow pretty close the article we're writing
##########################################################################################
def factorize_matrix(m, M):
# assert is_in_Gamma_1(m,M,determinant_condition = False)
Expand Down
2 changes: 1 addition & 1 deletion darmonpoints/my_p1list_nf.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def list(self):

def normalize(self, c, d, with_scalar=False):
r"""
[We have gutted this function from its orginal state!]
[We have gutted this function from its original state!]
[Note: there is now no check!]
Return a normalized element of (a canonical representative of an element
Expand Down
6 changes: 3 additions & 3 deletions darmonpoints/ocbianchi.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def _an_element_(self):

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

def __init__(self, p, depth, act_on_left=False, adjuster=None):
self._dimension = (
0 ## Hack!! Dimension was being called before it was intialised
0 ## Hack!! Dimension was being called before it was initialised
)
self._Rmod = ZpCA(p, depth - 1) ## create Zp
Module.__init__(self, base=self._Rmod)
Expand Down
8 changes: 4 additions & 4 deletions darmonpoints/padicperiods.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ def find_igusa_invariants(
parallelize=True,
):
fwrite("# Trying to recognize invariants...", outfile)
Pring = embedding.domain()
P_ring = embedding.domain()
if prec is None:
prec = a.parent().precision_cap()
Tlist = []
Expand All @@ -993,7 +993,7 @@ def find_igusa_invariants(
fwrite("# Doing matrix %s / %s ( = %s)" % (ii, len(Tlist), tt.list()), outfile)
Lp = a + b * tt
inp_vec = [
(Lp, ordmat, prec, Pring, cheatjs, embedding, 3, list_I10, Pgen, outfile)
(Lp, ordmat, prec, P_ring, cheatjs, embedding, 3, list_I10, Pgen, outfile)
for ordmat in all_possible_ordmats(Lp, 20)
]

Expand Down Expand Up @@ -1271,7 +1271,7 @@ def guess_equation(
F = QQ
P = Pgen
Pnrm = Pgen
Pring = QQ
P_ring = QQ
D = Dgen
Np = Npgen
Sinv_places = []
Expand All @@ -1287,7 +1287,7 @@ def guess_equation(
r = F.gen()
P = F.ideal(Pgen)
Pnrm = P.norm()
Pring = P.ring()
P_ring = P.ring()
D = F.ideal(Dgen)
Np = F.ideal(Npgen)
if Sinf is None:
Expand Down
4 changes: 2 additions & 2 deletions darmonpoints/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ def polynomial_roots_old(f, K):
rt = hensel_lift(f, r)
if f(rt).valuation() < K.precision_cap() // 2: # DEBUG!!
raise RuntimeError(
"Couln't reach target valuation (%s), got only %s"
"Could not reach target valuation (%s), got only %s"
% (K.precision_cap(), f(rt).valuation())
)
ans.append(rt)
Expand Down Expand Up @@ -2155,7 +2155,7 @@ def simplification_isomorphism(G, return_inverse=False):
To: Finitely presented group < | >
Defn: x |--> 1
ALGORITM:
ALGORITHM:
Uses GAP.
"""
Expand Down

0 comments on commit e88541b

Please sign in to comment.