Description
This is demo of how to construct a function which creates an lcalc Lfunction object demo.py has sample files.
L-function is assumed to satisfy the following function equation.
\Lambda(s) = \omega \overline{\Lambda(1-\bar s)}
where
\Lambda(s) = Q^s \prod_{j=1}^k {\Gamma(\gamma_j s +\lambda_j)} L(s).
Note that there is a typo in Lfunction_C documentation of the demo worksheet.
Download this file
Make sure you have demo.py in the directory from where you invoke the sage command below
Getting into sage environment
pathToSage/sage -sh
Run Ipython
ipython
First couple of lines. The order is important
In [1]: from sage import all as sage In [2]: import demo
In [3]: E=sage.EllipticCurve([1,1]) In [4]: L=demo.Lfunction_from_elliptic_curve(E) In [5]: L.find_zeros_via_N(10) Out[5]: [0.000000000000000, 2.27669243827908, 3.65808391543662, 4.74813565311889, 5.57476376575799, 7.12335236325282, 7.96370743269930, 8.33306194711412, 9.56801749546317, 10.8562725628737] #Create a sage complex number 1.0 + I and find the value of above L-function at the point In [6]: L.value( sage.CC(1,1) ) Out[6]: 1.17987989000315 + 0.33328909824226 # # Below is a demo for Dirichlet L-function # In [7]: D=sage.DirichletGroup(15) In [8]: C=D[3] In [9]: L2=demo.Lfunction_from_character(C) Out[9]: L-function with complex Dirichlet coefficients In [10]: L2.find_zeros_via_N(12) Out[10]: [2.73460370911883, 5.24301049275449, 8.41468524980490, 10.1876027276453, 11.9073724765466, 13.3373958554156, 15.3661395764978, 17.7723902492167, 18.9769996500883, 20.6276317759696, 21.8839730242089, 23.3384800177599]
