Farey Symbol for arithmetic subgroups of
AUTHORS:
based on the KFarey package by Chris Kurth. Implemented as C++ module for speed.
Bases: object
A class for calculating Farey symbols of arithmetics subgroups of
. The arithmetic subgroup can be either any of
the congruence subgroups implemented in Sage, i.e. Gamma, Gamma0,
Gamma1 and GammaH or a subgroup of
which is
given by a user written helper class defining membership in that
group.
REFERENCES:
INPUTS:
EXAMPLES:
Create a Farey symbol for the group :
sage: f = FareySymbol(Gamma0(11)); f
FareySymbol(Congruence Subgroup Gamma0(11))
Calculate the generators:
sage: f.generators()
[
[1 1] [ 7 -2] [ 8 -3] [-1 0]
[0 1], [11 -3], [11 -4], [ 0 -1]
]
Pickling the FareySymbol and recovering it:
sage: f == loads(dumps(f))
True
Calculate the index of in
via FareySymbol:
sage: FareySymbol(GammaH(33, [2, 5])).index()
48
Calculate the generators of :
sage: FareySymbol(Gamma1(4)).generators()
[
[1 1] [-3 1]
[0 1], [-4 1]
]
Calculate the generators of the example of an index 10 arithmetic subgroup given by Tim Hsu:
sage: from sage.modular.arithgroup.arithgroup_perm import HsuExample10
sage: FareySymbol(HsuExample10()).generators()
[
[1 2] [-2 1] [ 4 -3]
[0 1], [-7 3], [ 3 -2]
]
Calculate the generators of the group using a helper class to define group membership:
sage: class GPrime:
... def __contains__(self, M):
... return M in Gamma0(8) and M in Gamma1(4)
...
sage: FareySymbol(GPrime()).generators()
[
[1 1] [ 5 -1] [ 5 -2]
[0 1], [16 -3], [ 8 -3]
]
Calculate cusps of arithmetic subgroup defined via permutation group:
sage: L = SymmetricGroup(4)('(1, 2, 3)')
sage: R = SymmetricGroup(4)('(1, 2, 4)')
sage: FareySymbol(ArithmeticSubgroup_Permutation(L, R)).cusps()
[-1, Infinity]
Calculate the left coset representation of :
sage: FareySymbol(GammaH(8, [3])).coset_reps()
[
[1 0] [ 4 -1] [ 3 -1] [ 2 -1] [ 1 -1] [ 3 -1] [ 2 -1] [-1 0]
[0 1], [ 1 0], [ 1 0], [ 1 0], [ 1 0], [ 4 -1], [ 3 -1], [ 3 -1],
[ 1 -1] [-1 0] [ 0 -1] [-1 0]
[ 2 -1], [ 2 -1], [ 1 -1], [ 1 -1]
]
Left coset of the arithmetic group of the FareySymbol.
EXAMPLES:
Calculate the left coset of :
sage: FareySymbol(Gamma0(6)).coset_reps()
[
[1 0] [ 3 -1] [ 2 -1] [ 1 -1] [ 2 -1] [ 3 -2] [ 1 -1] [-1 0]
[0 1], [ 1 0], [ 1 0], [ 1 0], [ 3 -1], [ 2 -1], [ 2 -1], [ 2 -1],
[ 1 -1] [ 0 -1] [-1 0] [-2 1]
[ 3 -2], [ 1 -1], [ 1 -1], [ 1 -1]
]
Cusp class of a cusp in the FareySymbol.
EXAMPLES:
sage: FareySymbol(Gamma0(12)).cusp_class(Cusp(1, 12))
5
Cusps widths of the FareySymbol.
EXAMPLES:
sage: FareySymbol(Gamma0(6)).cusp_widths()
[6, 2, 3, 1]
Cusps of the FareySymbol.
EXAMPLES:
sage: FareySymbol(Gamma0(6)).cusps()
[0, 1/3, 1/2, Infinity]
Fractions of the FareySymbol.
EXAMPLES:
sage: FareySymbol(Gamma(4)).fractions()
[0, 1/2, 1, 3/2, 2, 5/2, 3, 7/2, 4]
Plot a fundamental domain of an arithmetic subgroup of
corresponding to the Farey symbol.
OPTIONS:
fill – boolean (default True) fill the fundamental domain
linestyle – string (default: ‘solid’) The style of the line, which is one of ‘dashed’, ‘dotted’, ‘solid’, ‘dashdot’, or ‘–’, ‘:’, ‘-‘, ‘-.’, respectively
color for odd part of Dedekind tesselation.
show_pairing – boolean (default: True) flag for pairing
hyperbolic tesselation which is one of ‘coset’, ‘Dedekind’ or None respectively
tesselation (default ‘white’); ignored for other tesselations
thickness – float (default: ) the thickness of the line
ymax – float (default: ) maximal height
EXAMPLES:
For example, to plot the fundamental domain of
with pairings use the following command:
sage: FareySymbol(Gamma0(11)).fundamental_domain()
indicating that side 1 is paired with side 3 and side 2 is paired with side 4, see also paired_sides().
To plot the fundamental domain of without pairings
use the following command:
sage: FareySymbol(Gamma(3)).fundamental_domain(show_pairing=False)
Plot the fundamental domain of showing the left
coset representatives:
sage: FareySymbol(Gamma0(23)).fundamental_domain(tesselation='coset')
The same as above but with a custom linestyle:
sage: FareySymbol(Gamma0(23)).fundamental_domain(tesselation='coset', linestyle=':', thickness='2')
Minmal set of generators of the group of the FareySymbol.
EXAMPLES:
Calculate the generators of :
sage: FareySymbol(Gamma0(6)).generators()
[
[1 1] [ 5 -1] [ 7 -3] [-1 0]
[0 1], [ 6 -1], [12 -5], [ 0 -1]
]
Calculate the generators of :
sage: FareySymbol(SL2Z).generators()
[
[ 0 -1] [ 0 -1]
[ 1 0], [ 1 -1]
]
The unique index 2 even subgroup and index 4 odd subgroup each get handled correctly:
sage: FareySymbol(ArithmeticSubgroup_Permutation(S2="(1,2)", S3="()")).generators()
[
[ 0 1] [-1 1]
[-1 -1], [-1 0]
]
sage: FareySymbol(ArithmeticSubgroup_Permutation(S2="(1,2, 3, 4)", S3="(1,3)(2,4)")).generators()
[
[ 0 1] [-1 1]
[-1 -1], [-1 0]
]
Return the genus of the arithmetic group of the FareySymbol.
EXAMPLES:
sage: [FareySymbol(Gamma0(n)).genus() for n in range(16, 32)]
[0, 1, 0, 1, 1, 1, 2, 2, 1, 0, 2, 1, 2, 2, 3, 2]
Return the index of the arithmetic group of the FareySymbol
in .
EXAMPLES:
sage: [FareySymbol(Gamma0(n)).index() for n in range(1, 16)]
[1, 3, 4, 6, 6, 12, 8, 12, 12, 18, 12, 24, 14, 24, 24]
Return the level of the arithmetic group of the FareySymbol.
EXAMPLES:
sage: [FareySymbol(Gamma0(n)).level() for n in range(1, 16)]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
Return the number of elliptic points of order two.
EXAMPLES:
sage: [FareySymbol(Gamma0(n)).nu2() for n in range(1, 16)]
[1, 1, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0]
Return the number of elliptic points of order three.
EXAMPLES:
sage: [FareySymbol(Gamma0(n)).nu3() for n in range(1, 16)]
[1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0]
Pairs of index of the sides of the fundamental domain of the Farey symbol of the arithmetic group. The sides of the hyperbolic polygon are numbered 0, 1, ... from left to right.
EXAMPLES:
sage: FareySymbol(Gamma0(11)).paired_sides()
[(0, 5), (1, 3), (2, 4)]
indicating that the side 0 is paired with 5, 1 with 3 and 2 with 4.
Pairing matrices of the sides of the fundamental domain. The sides of the hyperbolic polygon are numbered 0, 1, ... from left to right.
EXAMPLES:
sage: FareySymbol(Gamma0(6)).pairing_matrices()
[
[1 1] [ 5 -1] [ 7 -3] [ 5 -3] [ 1 -1] [-1 1]
[0 1], [ 6 -1], [12 -5], [12 -7], [ 6 -5], [ 0 -1]
]
Pairings of the sides of the fundamental domain of the Farey symbol of the arithmetic group. The sides of the hyperbolic polygon are numbered 0, 1, ... from left to right. Conventions: even pairings are denoted by -2, odd pairings by -3 while free pairings are denoted by an integer number greater than zero.
EXAMPLES:
Odd pairings:
sage: FareySymbol(Gamma0(7)).pairings()
[1, -3, -3, 1]
Even and odd pairings:
FareySymbol(Gamma0(13)).pairings()
[1, -3, -2, -2, -3, 1]
Only free pairings:
sage: FareySymbol(Gamma0(23)).pairings()
[1, 2, 3, 5, 3, 4, 2, 4, 5, 1]
Transformation of a rational number to cusp representative.
EXAMPLES:
sage: FareySymbol(Gamma0(12)).reduce_to_cusp(5/8)
[ 5 -3]
[12 -7]
Reduce 11/17 to a cusp of for HsuExample10():
sage: from sage.modular.arithgroup.arithgroup_perm import HsuExample10
sage: f = FareySymbol(HsuExample10())
sage: f.reduce_to_cusp(11/17)
[14 -9]
[-3 2]
sage: _.acton(11/17)
1
sage: f.cusps()[f.cusp_class(11/17)]
1