Skip to content

Instantly share code, notes, and snippets.

@TristanVaccon
TristanVaccon / UAGB.py
Created February 20, 2023 15:06
Implementation of the computation of Universal Analytic Gröbner Bases
load("mora3.py")
load("tropical_F5.py")
##################################
# Tools #
# #
##################################
def Single_Newton_Polytope(f,R):
@TristanVaccon
TristanVaccon / mora.py
Last active March 9, 2022 08:25
Mora_for_Tate_Algebras
from copy import*
##################################
# Tools #
# #
##################################
def Tate_LT(f,R,w):
r"""
@TristanVaccon
TristanVaccon / tate_fglm.py
Last active February 25, 2021 12:04
Tate FGLM
from copy import*
##################################
# Linear preliminary #
# #
##################################
def diagonalisable_in_glnZp_with_blocks_growing_valuation_random_eigenvalues(dim=6,blocks=[2,1,3],p=5,prec=10):
R = Zp(p,prec)
diag0 = [[R.random_element() for i in range(blocks[u])] for u in range(len(blocks))]
r"""
This module implements the tropicalF5+FGLM technique to compute lex basis over fields with valuation.
REFERENCES:
.. [F02] Jean-Charles Faugère. *A new efficient algorithm for computing Gröbner bases without reduction to zero (F5)*. In Proceedings of the 2002 international symposium on Symbolic and algebraic computation, ISSAC '02, pages 75-83, New York, NY, USA, 2002. ACM.
@TristanVaccon
TristanVaccon / toy_F4_Tate.pyx
Created January 24, 2019 13:31
Toy implementation of the F4 algorithm for Tate algebra in Cython
#%cython
#This module implements a variant of the F4 algorithm to compute (approximate)
#Groebner bases for Tate algebras.
#AUTHOR:
#- Tristan Vaccon (2018)
@TristanVaccon
TristanVaccon / toy_F4_Tate.py
Created January 24, 2019 13:30
Toy implementation of the F4 algorithm for Tate algebras in Sagemath
#This module implements a variant of the F4 algorithm to compute (approximate)
#Groebner bases for Tate algebras.
#AUTHOR:
#- Tristan Vaccon (2018-2019)
#*****************************************************************************
# Copyright (C) 2018-2019 Tristan Vaccon <tristan.vaccon@unilim.fr>
r"""
Educational Versions of the F5 Algorithm to compute tropical Groebner bases.
We have followed [F02], [AP11] [EF17] and [VY17].
No attempt was made to optimize the algorithm as the emphasis of
these implementations is to obtain an as clean and easy presentation as possible. To compute a
Groebner basis in Sage efficiently use the
:meth:`sage.rings.polynomial.multi_polynomial_ideal.MPolynomialIdeal.groebner_basis()`
r"""
Educational Versions of the F5 Algorithm to compute tropical Groebner bases.
We have followed [F02], [AP11] [EF17] and [VY17].
No attempt was made to optimize the algorithm as the emphasis of
these implementations is to obtain an as clean and easy presentation as possible. To compute a
Groebner basis in Sage efficiently use the
:meth:`sage.rings.polynomial.multi_polynomial_ideal.MPolynomialIdeal.groebner_basis()`
##################################################
# Matrix tools #
##################################################
def Make_Macaulay_Matrix_sparse_dict(list_poly, monom):
r"""
Build the Macaulay matrix for the polynomials of degree d in list_poly. It is represented as a couple of a matrix and the list of the signatures of its rows, assuming compatibility.
The matrix is sparse.
@TristanVaccon
TristanVaccon / toy_MF5.py
Last active January 9, 2017 14:55
Toy implementation of the adaptation of the Matrix-F5 algorithm for computation of Groebner bases over polynomial rings over the p-adics
"""
This module implements Groebner bases computation via Matrix-F5 algorithm.
Computations over finite-precision complete discrete valuation field are available with the option "weak" in F5M.
Computations of tropical Groebner bases are available via the tropical option of F5M.
AUTHOR:
- Tristan Vaccon (2013-07)
"""