Metadata-Version: 2.4
Name: sage-euler-product
Version: 0.0.3
Summary: Euler Product perform number theorie of euler product
Home-page: https://github.com/archimede-institut/sage-euler-product
Author: Olivier Ramaré, Dominique Benielli
Author-email: dominique.benielli@univ-amu.fr
License: GPLv3.0
Keywords: SageMath Euler Product Number Theory
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Programming Language :: Python :: 3.8
Description-Content-Type: text/markdown
Provides-Extra: passagemath
Requires-Dist: passagemath-repl; extra == "passagemath"
Requires-Dist: passagemath-schemes; extra == "passagemath"
Requires-Dist: passagemath-symbolics; extra == "passagemath"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: provides-extra
Dynamic: summary

[![Test](https://github.com/archimede-institut/sage-euler-product/actions/workflows/tests.yml/badge.svg)](https://github.com/archimede-institut/sage-euler-product/actions/workflows/tests.yml)
[![documentation](https://github.com/archimede-institut/sage-euler-product/actions/workflows/manual.yml/badge.svg)](https://github.com/archimede-institut/sage-euler-product/actions/workflows/manual.yml)
[![Lint](https://github.com/archimede-institut/sage-euler-product/actions/workflows/lint.yml/badge.svg)](https://github.com/archimede-institut/sage-euler-product/actions/workflows/lint.yml)
[ ![pages-build-deployment](https://github.com/archimede-institut/sage-euler-product/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/archimede-institut/sage-euler-product/actions/workflows/pages/pages-build-deployment.yml)

  
# 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.

```text

   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.

. 
