// Functions used in paper 5: // _Computing with the analytic Jacobian of a genus 2 curve_ // by Paul B. van Wamelen // Section 2: Finding genus 2 CM curves defined over the rationals function inbase(basis, a) line := basis cat [ Universe(basis)!a ]; lst := LinearRelation(line : Al := "LLL"); if lst[#lst] eq 0 then return 0; else return [ lst[i]/lst[#lst] : i in [1..#lst-1] ]; end if; end function; // Section 3: Isogenies function MyPowerRelation(a, d) pol := PowerRelation(a, d : Al := "LLL"); if Degree(pol) le 0 or IsIrreducible(pol) then return pol; else fac := Factorization(pol); _,ind := Min([ Abs(Evaluate(f[1], a)) : f in fac ]); return fac[ind][1]; end if; end function; function xi2tau(xi, Ia, cc, pres) // This next line was not necessary in the text because Z had been // defined prior to the function definition. Z := Integers(); O := MaximalOrder(Parent(xi)); E := Matrix(Z, 4, 4, [ Trace(xi*cc(a)*b) : b in Basis(Ia), a in Basis(Ia) ]); _, C := FrobeniusFormAlternating(E); newb := ElementToSequence(Matrix(O, C)*Matrix(O, 4, 1, Basis(Ia))); C := ComplexField(pres); SetKantPrecision(O, pres); Phi := [ i : i in [1..4] | Im(Conjugate(xi, i)) gt 0 ]; PMat := Matrix(C, 2, 4, [ Conjugate(b, Phi[1]) : b in newb ] cat [ Conjugate(b, Phi[2]) : b in newb ]); return Submatrix(PMat, 1, 3, 2, 2)^-1 * Submatrix(PMat, 1, 1, 2, 2); end function;