Skip to main content

Euler Product perform number theorie of euler product

Project description

Test documentation Lint pages-build-deployment

Euler Product for SageMath

Computing Lattice Invariant Euler Products

The sage-euler-product package for SageMath adds functionality related to Number Theory. It is based on SageMath https://www.sagemath.org_ and relies heavily on:

  • gmp or mpir for arbitrary precision arithmetic
  • PARI/GP for number field computations

Prerequisites

Installing sage-euler-product requires a working Sage installation.

Installation from PyPI in an existing Sage installation built from source

The module is distributed on PyPI and is easily installed through the Python package manager pip. Switch to the source directory (SAGE_ROOT) of your Sage installation, and run the following command:

    $ sage -pip install sage-euler-product [--user]

The --user option is optional and allows to install the module in your user space (and does not require administrator rights).

If you use Debian or Ubuntu and you installed Sage through the operating system's package manager (that is, the package sagemath), run these two commands:

    $ source /usr/share/sagemath/bin/sage-env
    $ pip install sage-euler-product --user

If you use Arch Linux, you need to install from source (see next section).

Installation of the development version from GitHub in an existing Sage installation

This section provides detailed instructions on how to download, modify and install the development version of sage-euler-product. In all commands,

PIP has to be replaced by either pip, pip2, or sage -pip PYTHON has to be replaced by either python, python2 or sage -python If you are an Arch Linux user with the sagemath package installed, use PIP=pip2 and PYTHON=python2. If you downloaded SageMath as a tarball or installed it from source use PIP='sage -pip' and PYTHON='sage -python'.

You can install the latest development version in one line with:

    $ PIP install git+https://github.com/archimede-institut/sage-euler-product [--user]

As before, the --user option is optional and when specified will install the module in your user space.

You can also perform a two stage installation that will allow you to modify the source code. The first step is to clone the repository:

    $ git clone https://github.com/archimede-institut/sage-euler-product

The above command creates a repository sage-euler-product with the source code, documentation and miscellaneous files. You can then change to the directory thus created and install the surface dynamics module with:

    $ cd sage-euler-product
    $ PIP install . [--user]

Do not forget the . that refers to the current directory.

When you don't want to install the package or you are testing some modifications to the source code, a more convenient way of using sage-euler-prodct is to do everything locally. Once done, you can import the sage-euler-product module. To check that you are actually using the right module (i.e. the local one) you can do in a SageMath session:

	sage: import euler_product
	sage: euler_product.__path__        # random
	['/home/you/sage-euler-product/euler_product/']

The result of the command must correspond to the path of the repository created by the command git clone given above.

If you wish to install your custom version of sage-euler-product just use PIP as indicated before.

Installation in a virtual Python environment (no prior Sage installation required)

Create and activate a virtual environment:

    python3 -m venv venv-euler-product
    . venv-euler-product/bin/activate

Install the package in the virtual environment:

pip install "sage-euler-product[passagemath] @ git+https://github.com/archimede-institut/sage-euler-product

This automatically installs the modularized parts of the Sage library that are needed by the package. (These modularized distributions are provided by https://github.com/passagemath.)

Next, start Sage:

rehash
sage

At the Sage prompt, load a modularized top-level environment:

    sage: from sage.all__sagemath_schemes import *

Documentation

complete module documentation: https://archimede-institut.github.io/sage-euler-product/

Check

After installing sage-euler-product, check that it works by launching Sage and typing the following commands. You should get the same output as below.

   sage: from euler_product.all import *
   sage: from euler_product.lattice_invariant_euler_produ import get_euler_products
   sage: get_euler_products(3, 1, 1-x^2,1, 100)
   Computing the structural invariants ...  done.
   We have Delta  = 2 and beta = 2
   We use big_m = 310 , big_p = 300 and working prec = 653 .
   Computing the finite products for p < 300 ...  done.
   Computing C_A(K, m, F/H) ... -------------------
   For p+3ZZ in  frozenset({1})
   For F(x) = -x^2 + 1
   and H(x) = 1
   the product of F(1/p)/H(1/p) is between	0.9671040753637981066150556834173635260473412207450092130719978569438733967843271277395717230016746853806050215621235810749643636399725665325875376146914709362753787689855429317947529895445140974344
   and
	0.9671040753637981066150556834173635260473412207450092130719978569438733967843271277395717230016746853806050215621235810749643636399725665325875376146914709362753787689855429317947529895445140974475
   (Obtained:  193  correct decimal digits)
   -------------------
   For p+3ZZ in  frozenset({2})
   For F(x) = -x^2 + 1
   and H(x) = 1
   the product of F(1/p)/H(1/p) is between	0.7071813747951674302088659938984504109243584468119496848353517677901518159831128643782536704398941052120208041311403202957250160794697319584608281454011743387515885835706146696365506658500107821107
   and
	0.7071813747951674302088659938984504109243584468119496848353517677901518159831128643782536704398941052120208041311403202957250160794697319584608281454011743387515885835706146696365506658500107821228
   (Obtained:  193  correct decimal digits)
   Time taken:  1.920718120993115 seconds.
   ((frozenset({1}), frozenset({2})),
((0.9671040753637981066150556834173635260473412207450092130719978569438733967843271277395717230016746853806050215621235810749643636399725665325875376146914709362753787689855429317947529895445140974344,
	   0.9671040753637981066150556834173635260473412207450092130719978569438733967843271277395717230016746853806050215621235810749643636399725665325875376146914709362753787689855429317947529895445140974475),
	  (0.7071813747951674302088659938984504109243584468119496848353517677901518159831128643782536704398941052120208041311403202957250160794697319584608281454011743387515885835706146696365506658500107821107,
	   0.7071813747951674302088659938984504109243584468119496848353517677901518159831128643782536704398941052120208041311403202957250160794697319584608281454011743387515885835706146696365506658500107821228)))

https://github.com/archimede-institut/sage-euler-product Assuming you have the program git on your computer, you can install the development version with the command:

$ sage -pip install git+https://github.com/archimede-institut/sage-euler-product [--user]

Authors

Olivier Ramarè: see https://ramare-olivier.github.io/Maths/mcom3630.pdf for complete Mathematical references

Dominique Benielli: maintainerDeveloppement Cell, Institut Archimède Aix-Marseille Université

How to cite this project

If you have used this project for please cite us as described on our zenodo site.

Versions

The first release of sage-euler-product will appear soon as a sagemath spkg.

.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sage_euler_product-0.0.3.tar.gz (35.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sage_euler_product-0.0.3-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file sage_euler_product-0.0.3.tar.gz.

File metadata

  • Download URL: sage_euler_product-0.0.3.tar.gz
  • Upload date:
  • Size: 35.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for sage_euler_product-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5b8d640859ba07dfd1b7b28ce43749057fc14b6559e869bd8d64934a1eb72fe6
MD5 277c7a99d592ec385cf757ff77477424
BLAKE2b-256 cafbeabd43124202ba488985b0c684170e858a23c8b5c160a67255c074cc9a0c

See more details on using hashes here.

File details

Details for the file sage_euler_product-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for sage_euler_product-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2ea1ee41e22280868291a70e877cc97f12541f0905459be51ac9087e65402363
MD5 40b7ca50770f960bf232372fadf3a10d
BLAKE2b-256 090655a7b9e76a94a9764010fb8ca772f6cdba473cb8c9b063b98252ad1948dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page