Computing Gröbner bases in Haskell

20 March 2009 at 7:47 pm Leave a comment

I wrote a small package to compute Gröbner bases in Haskell with the Buchberger algorithm (with applications to variable elimination). Performance is quite bad compared to specialised software like Macaulay, but it seems to work ! I put a Cabal package here. Maybe I’ll add several functions afterwards.

A testcase :
import Data.Polynomial
import Data.Ring
import Algebra.GroebnerBasis
import Algebra.Elimination
type R = Polynom QQ VarXYZ
[x,y,z,t,u,v] = map returnp [X,Y,Z,T,U,V] :: [R]
-- projection from a point on the intersection of quadrics
main = do
print $ step_eliminate [T] $ MakeIdeal
[x^2 - 3*y*z + z*t + 2*x*t,
z^2 + 5*y^2 + z*x - 2*t*z]

The output should be :
[x*y^2+2/5*x^2*z+1/2*y^2*z+3/10*x*z^2+-3/5*y*z^2+1/10*z^3]

Entry filed under: algebraic geometry, commutative algebra, english, software. Tags: , , , .

Schemes in algebraic geometry 3 : glued schemes and sheaves Cardboard dodecahedron

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Pages

Categories


%d bloggers like this: