For a PyPI package that integrates most of controlled-reduction into SageMath, see pycontrolledreduction.
An implementation of the controlled reduction method for computing the Hasse-Weil zeta functions of smooth projective hypersurfaces over finite fields. Explicitly, by computing a p-adic approximation of Frobenius action on p-adic cohomology (Monsky-Washnizter) with sufficient precision and then lifting its characteristic polynomial to the integers. An overview of the method can be found in:
- "Computing zeta functions of nondegenerate projective hypersurfaces over finite fields", (under preparation) by Edgar Costa and David Harvey.
- "Effective computations of Hasse-Weil zeta functions", by Edgar Costa
It majorly depends on:
Which depend on:
- GMP: GNU Multiple Precision Arithmetic Library (for NTL and FLINT)
- MPFR: GNU Multiple Precision Floating-Point Reliably (for FLINT)
However, SageMath comes with all this libraries.
There are 4 options:
- Figuring out where
SageMathis installed. We recommend doing this and storing in an environmental variable by doing:
SAGE_ROOT=$(sage -c "print(SAGE_ROOT)")
Alternatively, in Sage do print(SAGE_ROOT) and on the unix terminal:
SAGE_ROOT=<the line printed in Sage>
- Download controlled reduction
git clone https://github.com/edgarcosta/controlledreduction.git
- Change your working directory and run the configure file
cd controlledreduction && ./configure --with-ntl=$SAGE_ROOT/local
- Compile everything by doing
make
- Set up the variable
$LD_LIBRARY_PATH, so the executables can find the libraries at run time. One can do this for the current terminal by doing:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SAGE_ROOT/local/lib
and for this line to be ran at the start of every session one can do
echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SAGE_ROOT/local/lib >> ~/.bashrc
- You can optionaly run some tests by doing
make check
or check out some of the examples
build/examples/K3_dwork
-
make sure you have the dependencies (see the source of the script
build_dependenciesif you would prefer to build them manually), if they are installed in a non-standard path, be sure to set$LD_LIBRARY_PATHaccordingly. -
./configureto generate the makefile.To link against the libaries by SageMath it should be sufficient to run
./configure --with-ntl=<SAGE_DIR>/local/.Run
./configure --helpfor more options. -
maketo build everything -
make checkto run some tests.
- Install dependencies (FLINT >= 3.0.1):
brew install flint ntl gmp mpfr libomp
- Run configure (auto-detects Homebrew prefixes by default):
./configure
- Build and test:
make
make check
If libomp is not available, configure will disable OpenMP automatically; you can also pass --disable-openmp.
- Install dependencies (FLINT >= 3.0.1):
sudo apt-get update
sudo apt-get install -y yasm libomp-dev libntl-dev libflint-dev libgmp-dev
- Run configure and build:
./configure
make
make check