Ep elements

Morphism functionalities.

AUTHORS:

  • Anna Somoza (2021-22): initial implementation

class avisogenies_sage.ep_elements.EpElement(sign=1, power=0, numer={}, denom={})

Bases: avisogenies_sage.ep_elements.EpElement

The element of E as defined in Definition 5.1.3 in [Coss], where the roots sqrt(a_i - a_j) are expressed in terms of theta constants and sqrt(a_1 - a_0).

Note

The indexes are shifted to start at 0 with respect to the reference.

EXAMPLES:

In order to see the vector representation of the keys in \(numer\) and \(denom\) one can use the \(str\) or \(print\) methods

sage: from avisogenies_sage.ep_elements import EpElement
sage: from collections import Counter
sage: x = EpElement(sign=-1, power=1, numer=Counter({662: 1, 694: 1, 573: 1}), denom=Counter({663: 1, 607: 1, 725: 1}))
sage: print(x)
sign=-1,
power=1,
numer={
    [0, 1, 1, 0, 1, 0, 0, 1, 0, 1]: 1,
    [0, 1, 1, 0, 1, 1, 0, 1, 0, 1]: 1,
    [1, 0, 1, 1, 1, 1, 0, 0, 0, 1]: 1
},
denom={
    [1, 0, 1, 0, 1, 0, 1, 1, 0, 1]: 1,
    [1, 1, 1, 0, 1, 0, 0, 1, 0, 1]: 1,
    [1, 1, 1, 1, 1, 0, 1, 0, 0, 1]: 1
}
clean_common()

Clean the common factors in the numerator and denominator of an element of Ep.

EXAMPLES

sage: from avisogenies_sage.ep_elements import EpElement
sage: from collections import Counter
sage: x = EpElement(numer=Counter([1,2,3]), denom=Counter([1,1,2,4])); x
EpElement(sign=1, power=0, numer=Counter({1: 1, 2: 1, 3: 1}), denom=Counter({1: 2, 2: 1, 4: 1}))
sage: x.clean_common()
EpElement(sign=1, power=0, numer=Counter({3: 1}), denom=Counter({1: 1, 4: 1}))
evaluate(a, thc, rac=None)

Let self be an element of Ep. Evaluate self.

INPUT:

  • self - an EpElement.

  • a - list of x-coordinates of the Weierstrass points.

  • thc - the theta null point associated to the jacobian of the curve.

  • rac - a root of <a_1 - a_0>

EXAMPLES

sage: from avisogenies_sage import KummerVariety
sage: from avisogenies_sage.morphisms_aux import compatible_sqrt
sage: g = 2; A = KummerVariety(GF(331), 2, [328 , 213 , 75 , 1])
sage: thc = A.with_theta_basis('F(2,2)^2')
sage: a = [0,1,4,6,7]
sage: f = compatible_sqrt(g, 4, 2)
sage: (f*f).evaluate(a, thc)
249

Eta maps

Half-integer characteristics and computations of sign with half-integer characteristics

AUTHORS:

  • Anna Somoza (2021-22): initial implementation

avisogenies_sage.eta_maps.eta_prime(g, L, normalized=False)

Following a definition analogous to that in [VanW, page 3089]_, returns eta_prime as a vector in ZZ^g.

INPUT:

  • g – an Integer; the length of eta_prime.

  • L – an Integer or a list of integers; if it is a list, it returns the sum of eta_prime for all elements in the list.

  • normalized (default: False) - a boolean; it returns the vector reduced mod 2ZZ^g, that is, with entries 0 or 1.

Note

The indexes are shifted to start at 0 with respect to the reference

EXAMPLES

sage: from avisogenies_sage.eta_maps import eta_prime
sage: eta_prime(4, 6)
(0, 0, 0, 1)
sage: x = eta_prime(4,6) + eta_prime(4, 7)
sage: y = eta_prime(4, [6, 7]); y
(0, 0, 0, 2)
sage: x == y
True
sage: eta_prime(4, [6, 7], normalized=True)
(0, 0, 0, 0)
avisogenies_sage.eta_maps.eta_second(g, L, normalized=False)

Following a definition analogous to that in [VanW, page 3089]_, returns eta_second as a vector in ZZ^g.

INPUT:

  • g - an Integer. The length of eta_second.

  • L - an Integer or a list of integers. If it is a list, it returns the sum of eta_second for all elements in the list.

  • normalized (default: False) - a boolean. It returns the vector reduced mod 2ZZ^g, that is, with entries 0 or 1.

Note

The indexes are shifted to start at 0 with respect to the reference

EXAMPLES

sage: from avisogenies_sage.eta_maps import eta_second
sage: eta_second(4, 6)
(1, 1, 1, 0)
sage: x = eta_second(4,6) + eta_second(4, 7)
sage: y = eta_second(4, [6, 7]); y
(2, 2, 2, 1)
sage: x == y
True
sage: eta_second(4, [6, 7], normalized=True)
(0, 0, 0, 1)
avisogenies_sage.eta_maps.eta(g, L, normalized=False, idx=False)

Following a definition analogous to that in [VanW, page 3089]_, returns eta as a vector in ZZ^(2*g).

INPUT:

  • g – an Integer. The half-length of eta.

  • L – an Integer or a list of integers. If it is a list, it returns the sum of eta_second

    for all elements in the list.

  • normalized (default: False) – a boolean. It returns the vector reduced mod 2ZZ^g, that is, with entries 0 or 1.

  • idx (default: False) – a boolean. If both normalize and idx are True, then eta computes the integer with base-2 representation given by eta.

Note

The indexes are shifted to start at 0 with respect to the reference

EXAMPLES

sage: from avisogenies_sage.eta_maps import eta
sage: eta(4, 6)
(0, 0, 0, 1, 1, 1, 1, 0)
sage: x = eta(4,6) + eta(4, 7)
sage: y = eta(4, [6, 7]); y
(0, 0, 0, 2, 2, 2, 2, 1)
sage: x == y
True
sage: eta(4, [6, 7], normalized=True)
(0, 0, 0, 0, 0, 0, 0, 1)

If normalized=True and idx=True, returns the integer with base-2 representation given by the eta vector

sage: eta(4, [6,7], normalized=True, idx=True)
128
avisogenies_sage.eta_maps.normalize_eta(v)

It returns the vector \(v\) reduced mod 2ZZ^g, that is, with entries 0 or 1.

EXAMPLES

sage: from avisogenies_sage.eta_maps import eta, eta_second, normalize_eta
sage: x = eta(4, [0,1,2,3]); x
(2, 2, 0, 0, 3, 1, 0, 0)
sage: normalize_eta(x)
(0, 0, 0, 0, 1, 1, 0, 0)
sage: x = eta_second(3, [0,1,2,3]); x
(3, 1, 0)
sage: normalize_eta(x)
(1, 1, 0)
avisogenies_sage.eta_maps.sign_theta_normalized(*data)

Computes the sign difference between theta constant with characteristic \(e\) and the theta constant with characteristic \(normalized_eta(e)\).

See [VanW, Equation (8)]_ for more information on the quasi-periodicity of theta constants.

It accepts both eta vectors and a tuple (g, L) that defines an acceptable input for \(eta\).

EXAMPLES

sage: from avisogenies_sage.eta_maps import eta, sign_theta_normalized
sage: x = eta(4, [0,1,3,4]); x
(2, 1, 1, 0, 3, 2, 0, 0)
sage: sign_theta_normalized(x)
-1
sage: sign_theta_normalized(4, [0,1,3,4])
-1
avisogenies_sage.eta_maps.e_star(e)

Computes e_star as defined in [VanW, page 3090].

EXAMPLES

sage: from avisogenies_sage.eta_maps import eta, e_star
sage: x = eta(4, [0,1,3,4]); x
(2, 1, 1, 0, 3, 2, 0, 0)
sage: e_star(x)
1
avisogenies_sage.eta_maps.e_2(g, A1, A2)

Compute e_2(eta(A1),eta(A2)) as defined in [VanW, page 3090].

EXAMPLES

sage: from avisogenies_sage.eta_maps import e_2
sage: e_2(5, [0,1], [5,6])
1

Morphisms

Auxiliary functions

Morphism functionalities.

AUTHORS:

  • Anna Somoza (2021-22): initial implementation

avisogenies_sage.morphisms_aux.compatible_sqrt(g, i, j)

Return the numerator and the denominator of sqrt(a_i - a_j) given by Definition 2 in [VanW, page 3093] as an element of Ep.

\[\sqrt{\langle a_0 - a_j\rangle} = \sqrt{\langle a_0 - a_1\rangle} \frac{\theta[\eta_{U \circ V \circ \{j, \infty\}}]\theta[\eta_{U \circ V \circ \{0, 1\}}]}{\theta[\eta_{U \circ V \circ \{1, \infty\}}]\theta[\eta_{U \circ V \circ \{0, j\}}]}\]
\[\sqrt{\langle a_j - a_i\rangle} = \sqrt{\langle a_j - a_0\rangle} \frac{\theta[\eta_{U \circ V \circ \{i, \infty\}}]\theta[\eta_{U \circ V \circ \{0, j\}}]}{\theta[\eta_{U \circ V \circ \{0, \infty\}}]\theta[\eta_{U \circ V \circ \{i, j\}}]}\]

EXAMPLES

sage: from avisogenies_sage.morphisms_aux import compatible_sqrt
sage: compatible_sqrt(5, 6, 3)
EpElement(sign=-1, power=1, numer=Counter({662: 1, 694: 1, 573: 1}), denom=Counter({663: 1, 607: 1, 725: 1}))
avisogenies_sage.morphisms_aux.constant_f(g, A, C)

Return the expression of f_A as an element of Ep, as defined by Definition 3 in [VanW, page 3095].

INPUT:

EXAMPLES

sage: from avisogenies_sage.morphisms_aux import constant_f
sage: g = 5; A = set([1, 2, 3]); C = set([5, 6, 7])
sage: fA = constant_f(g, A, C); fA
EpElement(sign=1, power=-4, numer=Counter({607: 4, 694: 2, 911: 2, 843: 2, 415: 2, 347: 2, 723: 2, 850: 2, 484: 1, 637: 1, 626: 1, 561: 1, 950: 1, 638: 1, 724: 1, 573: 1, 595: 1, 978: 1, 330: 1}), denom=Counter({699: 5, 606: 4, 725: 2, 910: 2, 414: 2, 826: 1, 661: 1, 980: 1, 594: 1, 662: 1, 942: 1, 446: 1, 567: 1, 918: 1, 674: 1, 178: 1, 722: 1, 571: 1, 418: 1}))
sage: print(fA)
sign=1,
power=-4,
numer={
    [0, 0, 1, 0, 0, 1, 1, 1, 1]: 1,
    [0, 0, 1, 0, 1, 0, 1, 1, 0, 1]: 1,
    [0, 1, 0, 0, 1, 0, 1, 0, 1, 1]: 2,
    [0, 1, 0, 0, 1, 0, 1, 1, 1, 1]: 1,
...
    [1, 0, 1, 0, 1, 0, 1, 1, 0, 1]: 2,
    [1, 1, 0, 1, 1, 1, 0, 0, 0, 1]: 1,
    [1, 1, 0, 1, 1, 1, 0, 1, 0, 1]: 5,
    [1, 1, 1, 0, 1, 1, 0, 0, 0, 1]: 1
}
avisogenies_sage.morphisms_aux.choice_of_C_Cosset(g, A)

Make a choice for the constant C as in Definition 5.1.5 of [Coss].

INPUT:

  • g - an Integer, the dimension.

  • A - a set.

EXAMPLES

sage: from avisogenies_sage.morphisms_aux import choice_of_C_Cosset
sage: choice_of_C_Cosset(5, {0,1,2})
{3, 4}
avisogenies_sage.morphisms_aux.choice_of_all_C_Cosset(g)

Make a choice for all the constants C as in Definition 5.1.5 of [Coss].

INPUT:

  • g - an Integer, the dimension.

EXAMPLES

sage: from avisogenies_sage.morphisms_aux import choice_of_all_C_Cosset
sage: g = 5; C = choice_of_all_C_Cosset(g)
sage: C[frozenset({1,3,4})]
{0, 5}
sage: B = frozenset(range(2*g + 1))
sage: C[B.difference({1,3,4})]
{0, 5}
avisogenies_sage.morphisms_aux.sign_s_A(g, A, C)

Compute the sign of s_A as defined in Section 5.1.4 of [Coss].

INPUT:

EXAMPLES

sage: from avisogenies_sage.morphisms_aux import choice_of_all_C_Cosset, sign_s_A
sage: g = 5; C = choice_of_all_C_Cosset(g)
sage: sign_s_A(g, [1, 2, 3], C)
1
avisogenies_sage.morphisms_aux.IgusaTheorem(A, TH)

Apply Igusa theorems to the theta with characteristic given in the list A The theta in the summation are taken from TH #FIXME: Add reference

INPUT:

  • A - A list with 4 eta vectors.

  • TH - A list of 4 analytic theta points.

EXAMPLES

sage: from avisogenies_sage import KummerVariety
sage: from avisogenies_sage.morphisms_aux import IgusaTheorem
sage: from avisogenies_sage.eta_maps import eta
sage: g = 2; A = KummerVariety(GF(331), 2, [328 , 213 , 75 , 1])
sage: P = A([255 , 89 , 30 , 1])
sage: thc = A.with_theta_basis('F(2,2)^2')
sage: thp = thc(P)
sage: thO = thc(0)
sage: IgusaTheorem([eta(g,{2*x for x in range(g+1)})]*4, [thp,thO,thO,thO])
56

Todo

Add reference, see FIXME.

avisogenies_sage.morphisms_aux.constant_f2_level2(a, thc, A, C)

Compute the constant f_S^2 from the theta constant of level 2

INPUT:

EXAMPLES

sage: from avisogenies_sage import KummerVariety
sage: from avisogenies_sage.morphisms_aux import constant_f2_level2, choice_of_C_Cosset
sage: g = 2; A = KummerVariety(GF(331), 2, [328 , 213 , 75 , 1])
sage: thc = A.with_theta_basis('F(2,2)^2')
sage: a = [0,1,4,6,7]
sage: A = {3,4}; constant_f2_level2(a, thc, A, choice_of_C_Cosset(g, A))
170
avisogenies_sage.morphisms_aux.YS_fromMumford_Generic(g, a, S, points)

Compute Y_S(P) for P a preimage of a point D in Jac(C)Theta as defined in Equation (5.1) in [Coss].. D can be writen as D = sum_1^g P_i - g P_infty.

INPUT:

  • g - an integer. The genus of the curve.

  • a - list of x-coordinates of the Weierstrass points.

  • S - an iterable.

  • points - a list of coordinates (x,y) (as tuples) of the points P_i in D. Assume that all P_i are distinct.

EXAMPLES

sage: from avisogenies_sage.morphisms_aux import YS_fromMumford_Generic
sage: g = 2; a = [0,1,4,6,7]; S = [0,2,3]
sage: points = [(2, 4), (3, 8)]
sage: YS_fromMumford_Generic(g, a, S, points)
92
avisogenies_sage.morphisms_aux.YS_fromMumford_Delta(g, a, S, points, F)

Let D be a point in Jac(C)Theta. D can be writen as D = sum_1^g P_i - g P_infty Assume that there exists i <=> j such that P_i = P_j but the other P_k are distinct Let points be the list of coordinates (x,y) (as tuples) of P_i Let a be the x-coordinate of the Weierstrass points of the curve

return the function Y_S

See page 117 in [Coss].

EXAMPLES

sage: from avisogenies_sage.morphisms_aux import YS_fromMumford_Delta
sage: F = GF(331); g = 2; a = [0, 1, 2, 3, 4]; S = [0,2,3]
sage: points = [(F(5), F(38))]*2
sage: YS_fromMumford_Delta(g, [F(el) for el in a], S, points, F)
64

Todo

Test against Magma (minus the possible mistake)!

avisogenies_sage.morphisms_aux.prodYp_fromMumford_with2torsion(g, a, S, points, V, C, F)

Let D be a point in Jac(C)Theta. D can be writen as D = sum_1^g P_i - g P_infty Let points be the list of coordinates (x,y) (as tuples) of P_i Let a be the x-coordinate of th Weierstrass points of the curve Let S = [S1, S2, S3, S4] with S1 ^ S2 ^ S3 ^ S4 == {} Let C be the choice of sets in the definition of the f_A

Assume that all P_i are distinct.

Compute the function prod Y_Si’ / prod a_l where the second product is over l in V counted twice iff it appears in all Si

EXAMPLES

sage: from avisogenies_sage.morphisms_aux import choice_of_all_C_Cosset, prodYp_fromMumford_with2torsion
sage: F = GF(331); g = 2; a = list(map(F, [0, 1, 2, 3, 4]))
sage: S = [{0,2,3},{0},{2,4}, {3,4}]; V = {1}
sage: points = [(F(1), F(0)), (F(8), F(10))]
sage: C = choice_of_all_C_Cosset(g)
sage: prodYp_fromMumford_with2torsion(g, a, S, points, V, C, F)
187

Todo

Address FIXME.

avisogenies_sage.morphisms_aux.Y_fromMumford_with2torsion(g, a, S, points, V)

Let D be a point in Jac(C)Theta. D can be writen as D = sum_1^g P_i - g P_infty Let points be the list of coordinates (x,y) (as tuples) of P_i Let a be the x-coordinate of th Weierstrass points of the curve

Assume that all P_i are distinct. Assume that the first P_i are [a[l],0] with l in V Assume that V is a subset of S

Compute the function Y_S^2 / prod a_l where the product is over l in V

EXAMPLES

sage: from avisogenies_sage.morphisms_aux import Y_fromMumford_with2torsion
sage: F = GF(331); g = 2; a = list(map(F, [0, 1, 2, 3, 4]))
sage: S = {0,2,3,4}; V = {0,2}
sage: points = [(F(0), F(0)), (F(2), F(0))]
sage: Y_fromMumford_with2torsion(g,a,S,points,V)
307

TESTS:

sage: from avisogenies_sage.morphisms_aux import Y_fromMumford_with2torsion
sage: F = GF(331); g = 2; a = list(map(F, [0, 1, 2, 3, 4]))
sage: S = {0,2,3,4}; V = {0}
sage: points = [(F(0), F(0)), (F(8), F(10))]
sage: Y_fromMumford_with2torsion(g,a,S,points,V)
300

Todo

Address FIXME.

Level-2 conversions

Morphism functionalities.

AUTHORS:

  • Anna Somoza (2021-22): initial implementation

avisogenies_sage.morphisms_level2.MumfordToTheta_2_Generic(a, thc2, points)

Let D be a point in Jac(C)Theta. D can be writen as D = sum_1^g P_i - g P_infty Let points be the list of coordinates (x,y) (as tuples) of P_i Let a be the x-coordinate of th Weierstrass points of the curve Let thc2 be the theta constant of level 2

Return the theta functions of level 2 associated to points

EXAMPLES

sage: from avisogenies_sage import KummerVariety
sage: from avisogenies_sage.morphisms_level2 import MumfordToTheta_2_Generic
sage: F = GF(331); g = 2; n = 2
sage: a = list(map(F, [0, 1, 2, 3, 4]))
sage: points = [(F(7), F(62)), (F(8), F(10))]
sage: A = KummerVariety(F, g, [328 , 213 , 75 , 1], check=True)
sage: thc =  A.with_theta_basis('F(2,2)^2')
sage: MumfordToTheta_2_Generic(a, thc, points)._coords #FIXME change when _repr_ is done
(92, 265, 295, 308, 319, 261, 303, 111, 89, 193, 275, 12, 262, 214, 46, 70)

Todo

  • Test against Magma in the case that uses YS_fromMumford_Delta

  • Address FIXME.

avisogenies_sage.morphisms_level2.MumfordToLevel2ThetaPoint(a, thc2, points)

Let D be a point in Jac(C)Theta. D can be writen as D = sum_1^d P_i - g P_infty Let points be the list of coordinates [x,y] of P_i Let a be the x-coordinates of the Weierstrass points of the curve Let thc2 be the theta constant of level 2

Assume that all P_i are distinct if the divisor is either theta or has a ramification point in its support.

Return the theta functions of level 2 associated to points

EXAMPLES

sage: from avisogenies_sage import KummerVariety
sage: from avisogenies_sage.morphisms_level2 import MumfordToLevel2ThetaPoint
sage: F = GF(331); g = 2; n = 2
sage: a = list(map(F, [0, 1, 2, 3, 4]))
sage: points = [(F(7), F(62)), (F(8), F(10))]
sage: A = KummerVariety(F, g, [328 , 213 , 75 , 1], check=True)
sage: thc =  A.with_theta_basis('F(2,2)^2')
sage: MumfordToLevel2ThetaPoint(a, thc, points)._coords #FIXME change when _repr_ is done
(92, 265, 295, 308, 319, 261, 303, 111, 89, 193, 275, 12, 262, 214, 46, 70)


sage: from avisogenies_sage import KummerVariety
sage: from avisogenies_sage.morphisms_level2 import MumfordToLevel2ThetaPoint
sage: F = GF(331); g = 2; n = 2
sage: a = list(map(F, [0, 1, 2, 3, 4]))
sage: points = [(F(7), F(62))]
sage: A = KummerVariety(F, g, [328 , 213 , 75 , 1], check=True)
sage: thc = A.with_theta_basis('F(2,2)^2')
sage: MumfordToLevel2ThetaPoint(a, thc, points)._coords #FIXME change when _repr_ is done, Magma output
(288, 101, 184, 91, 289, 74, 111, 10, 106, 54, 12, 0, 292, 48, 113, 243)

Todo

  • Add tests that cover the missing cases.

  • Address FIXME.

  • We might want to change the input to take an actual mumford representation, we can compute the point list later!

avisogenies_sage.morphisms_level2.ThetaToMumford_2_Generic(a, th2)

Let D be a point in Jac(C)Theta D is represented by the theta functions th2 of level 2 Let a be the x-coordinate of th Weierstrass points of the curve Let thc2 be the theta constants of level 2

Compute the Mumford polynomials (u,v^2) associated to D

EXAMPLES

sage: from avisogenies_sage import KummerVariety
sage: from avisogenies_sage.morphisms_level2 import ThetaToMumford_2_Generic
sage: F = GF(331); A = KummerVariety(F, 2, [328 , 213 , 75 , 1])
sage: P = A([255 , 89 , 30 , 1])
sage: thc = A.with_theta_basis('F(2,2)^2')
sage: thp = thc(P)
sage: a = list(map(F, [0, 1, 2, 3, 4]))
sage: ThetaToMumford_2_Generic(a, thp)
(139*x^2 + 117*x + 157, 57*x^2 + 70*x + 210)

Todo

Address FIXME.

avisogenies_sage.morphisms_level2.ThetaToMumford_2_algclose(a, th2)

Let D be a point in Jac(C). D is represented by the theta functions th2 of level 2 Let a be the x-coordinate of th Weierstrass points of the curve

Assume that the base field is algebraically closed

Compute the Mumford polynomials (u,v^2) associated to D

Todo

  • Difference with funcion above? Do we need this or can we join them somehow?

  • Test against Magma, add examples

avisogenies_sage.morphisms_level2.Level2ThetaPointToMumford(a, th2)

Let D be a point in Jac(C). D is represented by the theta functions th2 of level 2 Let a be the x-coordinate of th Weierstrass points of the curve

Note

We use an extension field of degree 2

Compute the Mumford polynomials (u,v^2) associated to D

Todo

Test against Magma, add examples

Level-4 conversions

Conversion between Mumford coordinates and theta points for level 4.

Based on the algorithms from [Coss].

AUTHORS:

  • Anna Somoza (2021-22): initial implementation

REFERENCES:

VanW

P. Van Wamelen. Equations for the Jacobian of a hyperelliptic curve. Trans. Am. Math. Soc, 350(8), pp.3083-3106, 1998.

Coss

R. Cosset. Applications des fonctions thêta à la cryptographie sur courbes hyperelliptiques. PhD thesis, Université Henri Poincaré – Nancy 1, 2011.

Todo

  • Sort documentation by source (to maintain layout)

avisogenies_sage.morphisms_level4.MumfordToTheta_4_Generic(a, rac, thc, points)

Let D be a point in Jac(C)Theta. D can be writen as D = sum_1^g P_i - g P_infty Let points be the list of coordinates [x,y] of P_i Let a be the x-coordinate of th Weierstrass points of the curve Let thc be the theta constant of level 4 associated to the curve C

Assume that all P_i are distinct.

Return the theta functions of level 4 associated to points.

Todo

  • Test against Magma, add examples

  • Address FIXME.

avisogenies_sage.morphisms_level4.MumfordToLevel4ThetaPoint(a, rac, thc, points)

Let D be a point in Jac(C)Theta. D can be writen as D = sum_1^d P_i - g P_infty Let points be the list of coordinates [x,y] of P_i Let a be the x-coordinates of the Weierstrass points of the curve Let thc be the theta constant of level 4

Assume that all P_i are distinct if the divisor is either theta or has a ramification point in its support.

Return the theta functions of level 4 associated to points

EXAMPLES

sage: from avisogenies_sage.analytic_theta_point import AnalyticThetaNullPoint
sage: from avisogenies_sage.morphisms_level4 import MumfordToLevel4ThetaPoint
sage: F = GF(83^2); z, = F.gens(); Fx.<X> = PolynomialRing(F)
sage: g = 2; a = [F(0), 1, 3, 15, 20]; rac = sqrt(a[1] - a[0])
sage: thc = [1,  37,  56, 57, 34*z + 43, 0, 50*z + 73, 0, 30, 2*z + 82, 0, 0, 16*z + 37, 0, 0, 61*z + 21]
sage: thc = AnalyticThetaNullPoint(F, 4, g, thc)
sage: u = (X-43)*(X-10); v = z^954*X + z^2518
sage: points = sum(([(x, v(x))]*mult for x, mult in u.roots()), [])
sage: th = MumfordToLevel4ThetaPoint(a, rac, thc, points); th
(78*z2 + 13 : 77*z2 + 26 : 43*z2 + 3 : 54*z2 + 67 : 77*z2 + 61 : 35*z2 + 2 : 31*z2 + 8 :
19*z2 + 38 : 25*z2 + 9 : z2 + 65 : 17*z2 + 75 : 18*z2 + 38 : 50*z2 + 17 : 41*z2 + 6 : 18*z2 + 48 : 39*z2 + 73)

Todo

  • Check question in code.

  • Address FIXME.

avisogenies_sage.morphisms_level4.Ylm_fromTheta(a, rac, l, m, th, C)

Let D be a point in Jac(C)Theta D is represented by the theta functions th of level 4 Let a be the x-coordinate of th Weierstrass points of the curve Let rac be a root of a_1 - a_0 Let C be the choice of sets in the definition of the f_A

Compute the function Y_{l,m}

Todo

  • Test against Magma, add examples.

  • Address FIXME.

avisogenies_sage.morphisms_level4.ThetaToMumford_4_Generic(a, rac, th)

Let D be a point in Jac(C)Theta D is represented by the theta functions th of level 4 Let a be the x-coordinate of th Weierstrass points of the curve Let rac be a root of a_2-a_1 Let thc be the theta constants of level 4

Compute the Mumford polynomials associated to D

Todo

  • Test against Magma, add examples

  • Address FIXME.

avisogenies_sage.morphisms_level4.Level4ThetaPointToMumford(a, rac, th)

Let D be a point in Jac(C) D is represented by the theta functions th of level 4 Let a be the x-coordinate of th Weierstrass points of the curve Let rac be a root of a_1 - a_0

Compute the Mumford polynomials associated to D

Todo

Test against Magma, add examples