Skip to content

Commit

Permalink
also fix some rst issues in the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Feb 29, 2024
1 parent e88541b commit ca36580
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 103 deletions.
22 changes: 11 additions & 11 deletions darmonpoints/arithgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ def intersect_geodesic_arcs(x1, x2, y1, y2):
r"""
TESTS::
sage: from darmonpoints.arithgroup import intersect_geodesic_arcs
sage: intersect_geodesic_arcs(1,3,2,4)
1/2*I*sqrt(3) + 5/2
sage: print(intersect_geodesic_arcs(-1, 1, 0, AA(-1).sqrt()))
None
sage: intersect_geodesic_arcs(-1, 1, 0, 2*AA(-1).sqrt())
I
sage: intersect_geodesic_arcs(-3, 3, 2*AA(-1).sqrt(), Infinity)
3*I
sage: from darmonpoints.arithgroup import intersect_geodesic_arcs
sage: intersect_geodesic_arcs(1,3,2,4)
1/2*I*sqrt(3) + 5/2
sage: print(intersect_geodesic_arcs(-1, 1, 0, AA(-1).sqrt()))
None
sage: intersect_geodesic_arcs(-1, 1, 0, 2*AA(-1).sqrt())
I
sage: intersect_geodesic_arcs(-3, 3, 2*AA(-1).sqrt(), Infinity)
3*I
"""
# verbose('Entering intersect_geodesic_arcs')
e1 = geodesic_circle(x1, x2)
Expand Down Expand Up @@ -2744,14 +2744,14 @@ def _get_word_rep_auxiliary(self, h, check=False):
Firstly, we write this as h = 1.h. Then we write h = gh', where g in Gens(G) (so we must be
able to solve the word problem for G). Then write 1.g = zp', so that
h = z * p' * h'. Now iterate. We will end up with z_1 z_2 ... z_t p_0, where p_0 = id rep.
h = z * p' * h'. Now iterate. We will end up with z_1 z_2 ... z_t p_0, where p_0 = id rep.
OUTPUT:
- a list of integers in {-t,-t+1,...,t-1,t}, where the output of _generators_auxiliary is
[a_1,...,a_t].
For example,
For example::
h = abc in H, a,b,c in Gens(G)
h = 1.abc
Expand Down
13 changes: 7 additions & 6 deletions darmonpoints/arithgroup_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,12 +689,13 @@ def cusp_reduction_table(self):
Takes as input the object representing P^1(O_F/N), where F is a number field
(that is possibly Q), and N is some ideal in the field. Runs the following algorithm:
- take a remaining element C = (c:d) of P^1(O_F/N);
- add this to the set of cusps, declaring it to be our chosen rep;
- run through every translate C' = (c':d') of C under the stabiliser of infinity, and
remove this translate from the set of remaining elements;
- store the matrix T in the stabiliser such that C' * T = C (as elements in P^1)
in the dictionary, with key C'.
- take a remaining element C = (c:d) of P^1(O_F/N);
- add this to the set of cusps, declaring it to be our chosen rep;
- run through every translate C' = (c':d') of C under the stabiliser of infinity, and
remove this translate from the set of remaining elements;
- store the matrix T in the stabiliser such that C' * T = C (as elements in P^1)
in the dictionary, with key C'.
"""
P = self.get_P1List()
if hasattr(P.N(), "number_field"):
Expand Down
25 changes: 13 additions & 12 deletions darmonpoints/cohomology_arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,18 +468,19 @@ def BI(self, h, j=None): # Returns \int_{h \Z_p} z^j \Phi\{0 \to \infy\}
Input a 2x2 matrix h in SL2(OK) (which embeds as an element of Sigma_0(p)), and a value j.
Options for j:
- classical case: specify a non-negative integer j. Then returns the value
BI_{h,j} := Int_{h.Zp} z^j . d Phi{0 --> infty},
that is, the value of the distribution Phi{0 --> infty} at the function z^j x
the indicator function of the open set h.Zp.
- Bianchi case: specify a tuple (k,l). Then returns the value
BI_{h,j} := Int_{h.(Zp x Zp)} x^k y^l . d Phi{0 --> infty},
that is, the value of the distribution Phi{0 --> infty} at the function x^k y^l x
the indicator function of the open set h.(Zp x Zp).
- do not specify j. Then returns the the distribution mu whose moments are
BI_{h,j}.
- classical case: specify a non-negative integer j. Then returns the value
BI_{h,j} := Int_{h.Zp} z^j . d Phi{0 --> infty},
that is, the value of the distribution Phi{0 --> infty} at the function z^j x
the indicator function of the open set h.Zp.
- Bianchi case: specify a tuple (k,l). Then returns the value
BI_{h,j} := Int_{h.(Zp x Zp)} x^k y^l . d Phi{0 --> infty},
that is, the value of the distribution Phi{0 --> infty} at the function x^k y^l x
the indicator function of the open set h.(Zp x Zp).
- do not specify j. Then returns the the distribution mu whose moments are
BI_{h,j}.
"""
V = self.parent().coefficient_module() ## Module V in H^1(G,V)
Expand Down
26 changes: 13 additions & 13 deletions darmonpoints/darmonpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,28 +178,28 @@ def darmon_point(
We first need to import the module::
sage: from darmonpoints.darmonpoints import darmon_point
sage: from darmonpoints.darmonpoints import darmon_point
A first example (Stark--Heegner point)::
sage: from darmonpoints.darmonpoints import darmon_point
sage: darmon_point(7,EllipticCurve('35a1'),41,20, cohomological=False, use_magma=False, use_ps_dists = True)[0]
Starting computation of the Darmon point
...
-70*alpha + 449
sage: from darmonpoints.darmonpoints import darmon_point
sage: darmon_point(7,EllipticCurve('35a1'),41,20, cohomological=False, use_magma=False, use_ps_dists = True)[0]
Starting computation of the Darmon point
...
-70*alpha + 449
A quaternionic (Greenberg) point::
sage: darmon_point(13,EllipticCurve('78a1'),5,20) # long time # optional - magma
sage: darmon_point(13,EllipticCurve('78a1'),5,20) # long time # optional - magma
A Darmon point over a cubic (1,1) field::
sage: F.<r> = NumberField(x^3 - x^2 - x + 2)
sage: E = EllipticCurve([-r -1, -r, -r - 1,-r - 1, 0])
sage: N = E.conductor()
sage: P = F.ideal(r^2 - 2*r - 1)
sage: beta = -3*r^2 + 9*r - 6
sage: darmon_point(P,E,beta,20) # long time # optional - magma
sage: F.<r> = NumberField(x^3 - x^2 - x + 2)
sage: E = EllipticCurve([-r -1, -r, -r - 1,-r - 1, 0])
sage: N = E.conductor()
sage: P = F.ideal(r^2 - 2*r - 1)
sage: beta = -3*r^2 + 9*r - 6
sage: darmon_point(P,E,beta,20) # long time # optional - magma
"""
# global G, Coh, phiE, Phi, dK, J, J1, cycleGn, nn, Jlist
Expand Down
10 changes: 5 additions & 5 deletions darmonpoints/darmonvonk.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,11 @@ def darmon_vonk_point(
r"""
EXAMPLES ::
sage: from darmonpoints.darmonvonk import darmon_vonk_point
sage: J = darmon_vonk_point(5, 1, 3, 13, 60, parity='+', recognize_point='algdep',magma=magma) # optional - magma
#### Starting computation of the Darmon-Vonk point ####
...
f = 7*x^2 + 11*x + 7
sage: from darmonpoints.darmonvonk import darmon_vonk_point
sage: J = darmon_vonk_point(5, 1, 3, 13, 60, parity='+', recognize_point='algdep',magma=magma) # optional - magma
#### Starting computation of the Darmon-Vonk point ####
...
f = 7*x^2 + 11*x + 7
"""
if magma is None:
from sage.interfaces.magma import Magma
Expand Down
34 changes: 17 additions & 17 deletions darmonpoints/findcurve.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,29 @@ def find_curve(
First example::
sage: from darmonpoints.findcurve import find_curve
sage: find_curve(5,6,30,20) # long time # optional - magma
# B = F<i,j,k>, with i^2 = -1 and j^2 = 3
...
'(1, 0, 1, -289, 1862)'
sage: from darmonpoints.findcurve import find_curve
sage: find_curve(5,6,30,20) # long time # optional - magma
# B = F<i,j,k>, with i^2 = -1 and j^2 = 3
...
'(1, 0, 1, -289, 1862)'
A second example, now over a real quadratic::
sage: from darmonpoints.findcurve import find_curve
sage: F.<r> = QuadraticField(5)
sage: P = F.ideal(3/2*r + 1/2)
sage: D = F.ideal(3)
sage: find_curve(P,D,P*D,30,ramification_at_infinity = F.real_places()[:1]) # long time # optional - magma
...
sage: from darmonpoints.findcurve import find_curve
sage: F.<r> = QuadraticField(5)
sage: P = F.ideal(3/2*r + 1/2)
sage: D = F.ideal(3)
sage: find_curve(P,D,P*D,30,ramification_at_infinity = F.real_places()[:1]) # long time # optional - magma
...
Now over a cubic of mixed signature::
sage: from darmonpoints.findcurve import find_curve
sage: F.<r> = NumberField(x^3 -3)
sage: P = F.ideal(r-2)
sage: D = F.ideal(r-1)
sage: find_curve(P,D,P*D,30) # long time # optional - magma
...
sage: from darmonpoints.findcurve import find_curve
sage: F.<r> = NumberField(x^3 -3)
sage: P = F.ideal(r-2)
sage: D = F.ideal(r-1)
sage: find_curve(P,D,P*D,30) # long time # optional - magma
...
"""
config = configparser.ConfigParser()
Expand Down
7 changes: 5 additions & 2 deletions darmonpoints/padicperiods.py
Original file line number Diff line number Diff line change
Expand Up @@ -1772,13 +1772,16 @@ def find_kadziela_matrices(M, T):
"""
The matrix M describes the relation between periods (A,B,D)^t
and the periods (A0,B0)^t, where (A,B,D) are the periods of
the Teitelbaum periods, and (A0,B0) are the Darmon ones.
the Teitelbaum periods, and (A0,B0) are the Darmon ones. ::
(A,B,D)^t = M * (A0,B0)^t
The matrix T describes the action of Hecke on homology.
That is, the first column of T describes the image of T
on the first basis vector.
The output are matrices X and Y such that
The output are matrices X and Y such that::
X * matrix(2,2,[A,B,B,D]) = matrix(2,2,[A0,B0,C0,D0]) * Y
"""
Expand Down
73 changes: 36 additions & 37 deletions darmonpoints/schottky.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,23 +666,22 @@ def theta(self, prec, a, b=None, **kwargs):
EXAMPLES ::
sage: from darmonpoints.schottky import *
sage: p = 3
sage: prec = 20
sage: working_prec = 200
sage: K = Qp(p,working_prec)
sage: g1 = matrix(K, 2, 2, [-5,32,-8,35])
sage: g2 = matrix(K, 2, 2, [-13,80,-8,43])
sage: G = SchottkyGroup(K, (g1, g2))
sage: a = 23
sage: b = 14
sage: z0 = K(8)
sage: m = 10
sage: Tg = G.theta_naive(m, z=z0, a=a,b=b)
sage: T = G.theta(prec, a, b).improve(m)
sage: (T(z0) / Tg - 1).valuation() > m
True
sage: from darmonpoints.schottky import *
sage: p = 3
sage: prec = 20
sage: working_prec = 200
sage: K = Qp(p,working_prec)
sage: g1 = matrix(K, 2, 2, [-5,32,-8,35])
sage: g2 = matrix(K, 2, 2, [-13,80,-8,43])
sage: G = SchottkyGroup(K, (g1, g2))
sage: a = 23
sage: b = 14
sage: z0 = K(8)
sage: m = 10
sage: Tg = G.theta_naive(m, z=z0, a=a,b=b)
sage: T = G.theta(prec, a, b).improve(m)
sage: (T(z0) / Tg - 1).valuation() > m
True
"""
if b is not None:
try:
Expand Down Expand Up @@ -771,26 +770,26 @@ def period(self, i, j, prec, **kwargs):
EXAMPLES ::
sage: from darmonpoints.schottky import *
sage: p = 3
sage: prec = 10
sage: working_prec = 200
sage: K = Qp(p,working_prec)
sage: h1 = matrix(K, 2, 2, [-5,32,-8,35])
sage: h2 = matrix(K, 2, 2, [-13,80,-8,43])
sage: G = SchottkyGroup(K, (h1,h2))
sage: q00g = G.period_naive(0, 0, prec)
sage: q01g = G.period_naive(0, 1, prec)
sage: q11g = G.period_naive(1, 1, prec)
sage: q00 = G.period(0,0, prec)
sage: q01 = G.period(0,1, prec)
sage: q11 = G.period(1,1, prec)
sage: (q00g/q00-1).valuation() > prec
True
sage: (q01g/q01-1).valuation() > prec
True
sage: (q11g/q11-1).valuation() > prec
True
sage: from darmonpoints.schottky import *
sage: p = 3
sage: prec = 10
sage: working_prec = 200
sage: K = Qp(p,working_prec)
sage: h1 = matrix(K, 2, 2, [-5,32,-8,35])
sage: h2 = matrix(K, 2, 2, [-13,80,-8,43])
sage: G = SchottkyGroup(K, (h1,h2))
sage: q00g = G.period_naive(0, 0, prec)
sage: q01g = G.period_naive(0, 1, prec)
sage: q11g = G.period_naive(1, 1, prec)
sage: q00 = G.period(0,0, prec)
sage: q01 = G.period(0,1, prec)
sage: q11 = G.period(1,1, prec)
sage: (q00g/q00-1).valuation() > prec
True
sage: (q01g/q01-1).valuation() > prec
True
sage: (q11g/q11-1).valuation() > prec
True
"""
g = len(self.generators())
if i in ZZ:
Expand Down

0 comments on commit ca36580

Please sign in to comment.