Arithmetic group elements

Initialize self. See help(type(self)) for accurate signature.

class darmonpoints.arithgroup_element.ArithGroupElement(parent, word_rep=None, quaternion_rep=None, check=False)[source]

Bases: MultiplicativeGroupElement

Initialize.

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 an element of the quaternion algebra self.parent().quaternion_algebra().

acton(x)[source]
check_consistency(q=None, wd=None, txt='')[source]
conjugate_by(w)[source]
embed(prec)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
find_bounding_cycle(G, npow=1)[source]

Use recursively that: - x^a g = a x + g - del(x^a|g) - del(x|(x + x^2 + … + x^(a-1))) - x^(-a) g = -a x + g + del(1|1) + del(x^(a)|(x^-a)) - del(x^(-a)|g) + del(x|(x + x^2 + … + x^(a-1)))

is_one()[source]
is_scalar()[source]
is_trivial_in_abelianization()[source]
matrix(prec=-1)[source]
quaternion_rep()[source]

Returns the quaternion representation.

size()[source]
word_rep()[source]

Returns a word in the generators of Gamma representing the given quaternion x.

Non-split Cartan

Initialize self. See help(type(self)) for accurate signature.

class darmonpoints.arithgroup_nscartan.ArithGroup_nscartan(q, level, info_magma=None, grouptype=None, magma=None, compute_presentation=True)[source]

Bases: ArithGroup_generic

Element

alias of ArithGroupElement

element_of_norm(N, use_magma=False, return_all=False, radius=None, max_elements=None, local_condition=None)[source]
embed_order(p, K, prec, outfile=None, return_all=False)[source]
generate_wp_candidates(p, ideal_p, **kwargs)[source]
get_word_rep(delta)[source]
non_positive_unit()[source]
darmonpoints.arithgroup_nscartan.lift(A, N)[source]

Lift a matrix A from SL_m(Z/NZ) to SL_m(Z).

Follows Shimura, Lemma 1.38, p21.

Arithmetic group

Initialize self. See help(type(self)) for accurate signature.

class darmonpoints.arithgroup.ArithGroup_fuchsian_generic(**kwargs)[source]

Bases: ArithGroup_generic

draw_mat_list(x0, g1, mlist, color='blue')[source]
find_fundom_rep(z0_H, v0=None, return_alternative=False, max_iters=100)[source]

Returns t0 and g such that g * t0 = z0_H, and t0 is in the fundamental domain

fundamental_domain()[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self):
....:         return self._x^2
sage: a = Foo(2)
sage: print(a.f.cache)
None
sage: a.f()
4
sage: a.f.cache
4
fundamental_domain_data()[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self):
....:         return self._x^2
sage: a = Foo(2)
sage: print(a.f.cache)
None
sage: a.f()
4
sage: a.f.cache
4
fundamental_domain_interior_data()[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self):
....:         return self._x^2
sage: a = Foo(2)
sage: print(a.f.cache)
None
sage: a.f()
4
sage: a.f.cache
4
get_archimedean_embedding(prec)[source]

Returns an embedding of the quaternion algebra into the algebra of 2x2 matrices with coefficients in RR.

INPUT:

  • prec – Integer. The precision of the splitting.

get_embgquats_twisted(P=None)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
get_word_rep(delta, P=None)[source]
is_in_fundom(z)[source]
is_in_fundom_boundary(z, tol=None)[source]
is_in_fundom_exterior(z, tol=None)[source]
is_in_fundom_interior(z, tol=None)[source]
magma_word_problem(Gm, x)[source]

Given a quaternion x, finds its decomposition in terms of the generators

INPUT: x can be a list/vector of integers (giving the quaternion in terms of the basis for the order, or x can be a quaternion, in which case the conversion is done in the function.

OUTPUT: A list representing a word in the generators

mat_list(x1, x2, check_fundom=True)[source]

Returns a list S of matrices such that the geodesic (x1, x2) is contained in the union of the translates s*D (with s in S) of the standard fundamental domain D.

plot_fundamental_domain()[source]
class darmonpoints.arithgroup.ArithGroup_nf_fuchsian(base, a, b, level, info_magma=None, grouptype='PSL2', magma=None, timeout=0, compute_presentation=True, **kwargs)[source]

Bases: ArithGroup_nf_generic, ArithGroup_fuchsian_generic

class darmonpoints.arithgroup.ArithGroup_nf_generic(base, a, b, level, info_magma=None, grouptype='PSL2', magma=None, timeout=0, compute_presentation=True, **kwargs)[source]

Bases: ArithGroup_generic

compute_quadratic_embedding(D, return_generator=False, **kwargs)[source]
element_of_norm(N, use_magma=True, return_all=False, radius=-1, max_elements=-1)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
element_of_prime_norm(max_norm, radius=-1)[source]
embed_order(p, D, prec, outfile=None, return_all=False, extra_conductor=1, F_to_Qp=None, **kwargs)[source]
non_positive_unit(radius=-1)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
class darmonpoints.arithgroup.ArithGroup_nf_kleinian(base, a, b, level, info_magma=None, grouptype='PSL2', magma=None, timeout=0, compute_presentation=True, **kwargs)[source]

Bases: ArithGroup_nf_generic

fundamental_domain()[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self):
....:         return self._x^2
sage: a = Foo(2)
sage: print(a.f.cache)
None
sage: a.f()
4
sage: a.f.cache
4
get_word_rep(gamma)[source]
class darmonpoints.arithgroup.ArithGroup_nf_matrix(base, a, b, level, info_magma=None, grouptype='PSL2', magma=None, timeout=0, compute_presentation=True, **kwargs)[source]

Bases: ArithGroup_nf_kleinian, ArithGroup_matrix_generic

element_of_norm(N, use_magma=False, return_all=False, radius=None, max_elements=None)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
generate_wp_candidates(p, ideal_p, **kwargs)[source]
matrix_basis()[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self):
....:         return self._x^2
sage: a = Foo(2)
sage: print(a.f.cache)
None
sage: a.f()
4
sage: a.f.cache
4
matrix_to_quaternion(x)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
non_positive_unit()[source]
quaternion_to_matrix(x)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
class darmonpoints.arithgroup.ArithGroup_nf_matrix_new(base, level, level0=None, info_magma=None, grouptype='PSL2', magma=None, timeout=0, compute_presentation=None, **kwargs)[source]

Bases: ArithGroup_nf_generic, ArithGroup_matrix_generic

get_word_rep(x)[source]
level

Compute generators of the subgroup Gamma_0(N), where N is the specified level.

Write down representatives of the cosets for Gamma_0(N) in Gamma(1), which we identify with P^1(O_F/N). We already have code to compute with this: namely, cusp_reduction_table does precisely this.

ALGORITHM :

Retrieve the cusp reduction table. Recall that this is a dictionary with keys given by tuples (a,c) representing the element (a:c) in P^1(O_F/N). The entries are C, A, where c is the corresponding cusp (from cusp_set) and A is a matrix taking C to a matrix with bottom row (a:c). Generate the coset representatives: this is given by taking A*C as we range over all (A,C) in the values of cusp_reduction_table coset_reps is now a dictionary: keys are elements of P^1(O_F/N), and values are matrices which are coset reps for Gamma_0(N) in Gamma(1) cor. to these elements.

matrix_basis()[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self):
....:         return self._x^2
sage: a = Foo(2)
sage: print(a.f.cache)
None
sage: a.f()
4
sage: a.f.cache
4
matrix_to_quaternion(x)[source]
quaternion_to_matrix(x)[source]
class darmonpoints.arithgroup.ArithGroup_rationalmatrix(level, info_magma=None, grouptype=None, magma=None, compute_presentation=True, **kwargs)[source]

Bases: ArithGroup_matrix_generic

element_of_norm(N, use_magma=False, return_all=False, radius=None, max_elements=None)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
embed_order(p, D, prec, orientation=None, use_magma=True, outfile=None, return_all=False, extra_conductor=1, **kwargs)[source]
embed_order_legacy(p, D, prec, outfile=None, return_all=False)[source]
find_fundom_rep(tau, v0=None)[source]

Returns t0 and g such that g*t0 = tau, and t0 is in the fundamental domain

fundamental_domain()[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self):
....:         return self._x^2
sage: a = Foo(2)
sage: print(a.f.cache)
None
sage: a.f()
4
sage: a.f.cache
4
fundamental_domain_data()[source]

Returns a list of triples (v_i, v_{i+1}, g_i), where the v_i are vertices of a fundamental domain D, and the g_i are matrices, such that (g_i * D) cap D = (v_i, v_{i+1}).

generate_wp_candidates(p, ideal_p, **kwargs)[source]
get_archimedean_embedding(prec=None)[source]

Returns an embedding of the quaternion algebra into the algebra of 2x2 matrices with coefficients in QQ_p.

INPUT:

  • prec – Integer. The precision of the splitting.

get_word_rep(delta)[source]
is_in_fundom(t, v0=None)[source]
mat_list(x1, x2, v0=None, check_fundom=True, debug=False)[source]

Returns a list S of matrices such that the geodesic (x1, x2) is contained in the union of the translates s*D (with s in S) of the standard fundamental domain D.

non_positive_unit()[source]
class darmonpoints.arithgroup.ArithGroup_rationalquaternion(discriminant, level, info_magma=None, grouptype=None, magma=None, compute_presentation=True, **kwargs)[source]

Bases: ArithGroup_fuchsian_generic

compute_quadratic_embedding(D, **kwargs)[source]
element_of_norm(N, use_magma=True, return_all=False, radius=-1, max_elements=-1)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
embed_order(p, D, prec, outfile=None, return_all=False, extra_conductor=1, **kwargs)[source]

sage: from darmonpoints.sarithgroup import ArithGroup sage: G = ArithGroup(QQ,6,magma=Magma()) # optional - magma sage: f = G.embed_order(23,20) # optional - magma

non_positive_unit(radius=-1)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
darmonpoints.arithgroup.angle_sign(left, right)[source]

Return the angle between any two given completed geodesics if they intersect.

darmonpoints.arithgroup.geodesic_circle(alpha, beta, return_equation=True)[source]

From a picture (pg 79) in “Hyperbolic Geometry”, in an article Cannon, Floyd, Kenyon, Parry

darmonpoints.arithgroup.hyperbolic_distance(alpha, beta)[source]
darmonpoints.arithgroup.intersect_geodesic_arcs(x1, x2, y1, y2)[source]

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

darmonpoints.arithgroup.is_in_open_interval(x, a, b, eps=1e-10)[source]
darmonpoints.arithgroup.moebius_transform(A, z)[source]

Given a matrix A in GL(2, CC) and a point z in the complex plane return the Moebius transformation action of A on z.

INPUT:

  • A – a 2 times 2 invertible matrix over the complex numbers

  • z – a complex number or infinity

OUTPUT:

  • a complex number or infinity

darmonpoints.arithgroup.perturb_point_on_arc(x1, x2, z, r)[source]
darmonpoints.arithgroup.sorted_ideal_endpoints(geodesic)[source]

Determine the ideal (boundary) endpoints of the complete hyperbolic geodesic corresponding to geodesic.

OUTPUT:

  • a list of 2 boundary points

S-arithmetic group

Initialize self. See help(type(self)) for accurate signature.

darmonpoints.sarithgroup.ArithGroup(base, discriminant, abtuple=None, level=1, magma=None, **kwargs)[source]
class darmonpoints.sarithgroup.BTEdge(reverse, gamma)[source]

Bases: SageObject

A BTEdge is represented by an element gamma, and then a flag called reverse. The flag reverse indicates whether we refer to the opposite edge of the one represented by gamma.

darmonpoints.sarithgroup.BigArithGroup(p, quat_data, level, base=None, grouptype=None, seed=None, use_sage_db=False, magma=None, logfile=None, **kwargs)[source]
class darmonpoints.sarithgroup.BigArithGroup_class(base, p, discriminant, abtuple=None, level=1, outfile=None, magma=None, character=None, **kwargs)[source]

Bases: AlgebraicGroup

This class holds information about the group Gamma: a finite presentation for it, a solution to the word problem,…

Initializes the group attached to a ZZ[1/p]-order of the rational quaternion algebra of discriminant discriminant and level n.

TESTS:

sage: from darmonpoints.sarithgroup import BigArithGroup sage: GS = BigArithGroup(7,6,1,outfile=’/tmp/darmonpoints.tmp’,use_shapiro=False) # optional - magma sage: G = GS.small_group() # optional - magma sage: a = G([2,2,1,1,1,-3]) # optional - magma sage: b = G([2,2,2]) # optional - magma sage: c = G([3]) # optional - magma sage: print(a * b) # random # optional - magma -236836769/2 + 120098645/2*i - 80061609/2*j - 80063439/2*k sage: b.quaternion_rep # random # optional - magma 846 - 429*i + 286*j + 286*k

Gpn_Obasis()[source]
Gpn_denominator(x)[source]
base_field()[source]
base_ring_local_embedding(prec=None)[source]
clear_cache()[source]
clear_local_splitting()[source]
construct_edge_reps(depth)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
coset_reps()[source]
do_tilde(g, wp=None)[source]
edge_from_quaternion(gamma)[source]
edges_entering_odd_vertex(gamma)[source]
edges_leaving_even_vertex(gamma)[source]
embed(q, prec)[source]
embed_wp(prec)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
get_BT_reps()[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self):
....:         return self._x^2
sage: a = Foo(2)
sage: print(a.f.cache)
None
sage: a.f()
4
sage: a.f.cache
4
get_BT_reps_twisted()[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self):
....:         return self._x^2
sage: a = Foo(2)
sage: print(a.f.cache)
None
sage: a.f()
4
sage: a.f.cache
4
get_Up_reps()[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self):
....:         return self._x^2
sage: a = Foo(2)
sage: print(a.f.cache)
None
sage: a.f()
4
sage: a.f.cache
4
get_Up_reps_bianchi(pi, pi_bar)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
get_Zp_covering(depth)[source]
get_amalgam_reps()[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self):
....:         return self._x^2
sage: a = Foo(2)
sage: print(a.f.cache)
None
sage: a.f()
4
sage: a.f.cache
4
get_coset_ti(x)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
get_covering(depth)[source]
get_edges_upto(depth)[source]
get_embedding(prec)[source]

Returns an embedding of the quaternion algebra into the algebra of 2x2 matrices with coefficients in QQ_p.

INPUT:

  • prec – Integer. The precision of the splitting.

get_gis()[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self):
....:         return self._x^2
sage: a = Foo(2)
sage: print(a.f.cache)
None
sage: a.f()
4
sage: a.f.cache
4
get_gis_local(prec)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
get_gitildes()[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self):
....:         return self._x^2
sage: a = Foo(2)
sage: print(a.f.cache)
None
sage: a.f()
4
sage: a.f.cache
4
get_gitildes_local(prec)[source]

EXAMPLES:

sage: class Foo:
....:     def __init__(self, x):
....:         self._x = x
....:     @cached_method
....:     def f(self,*args):
....:         return self._x^2
sage: a = Foo(2)
sage: a.f.cache
{}
sage: a.f()
4
sage: a.f.cache
{((), ()): 4}
is_in_Gpn_order(x)[source]
large_group()[source]
local_splitting(prec)[source]

Finds an embedding of the definite quaternion algebra into the algebra of 2x2 matrices with coefficients in QQ_p.

INPUT:

  • prec – Integer. The precision of the splitting.

OUTPUT:

  • Matrices I, J, K giving the splitting.

EXAMPLES:

sage: from darmonpoints.sarithgroup import BigArithGroup
sage: X = BigArithGroup(13,2*3,1,outfile='/tmp/darmonpoints.tmp') #  optional - magma
sage: One, II, JJ, KK = X.local_splitting(10) #  optional - magma
sage: B = X.Gn.B    #  optional - magma
sage: II**2 == QQ(B.gen(0)**2) #  optional - magma
True
prime()[source]
quaternion_algebra()[source]
reduce_in_amalgam(x, return_word=False, check=False)[source]
save_to_db()[source]
set_wp(wp)[source]
small_group()[source]
subdivide(edgelist, parity, depth)[source]
use_shapiro()[source]
wp(**kwargs)[source]
darmonpoints.sarithgroup.MatrixArithGroup(base=None, level=1, **kwargs)[source]
darmonpoints.sarithgroup.attach_kleinian_code(magma)[source]
darmonpoints.sarithgroup.is_page_initialized(magma)[source]