## Posts filed under ‘software’

### Mathkaba : my tool for managing bibliography

I recently decided to systematically conserve a backup copy of articles I am downloading. But what if I want to use these backup copy: I usually only remember the title of the article, or the name of the author. If I was not really working on the article, I may forget the author, or even the title, if I only remember that “somewhere it is written that…”. You may know Mendeley: I tried to use it for some time, but it is not open source, has too many features for what I need, and could be better suited to a mathematical use, by supporting, for example, the MSC classification, or by having specific interfaces with MathSciNet or zentralBlatt.

Hence I decided writing my own program to do the job. For the moment, it may probably crash at any time, and seriously lack essential features, but it satisfies my daily purposes, which are:

• have a quick overview of the articles I have on my computer
• have a way of opening them without having to know where it is
• in case it is not stored on my computer, open a suitable URL without having to search through MathSciNet

The result is called Mathkaba, and is hosted on GitHub. For the moment, it works by reading metadata which is not stored in a database as usual (I hate databases), but in plain text files along with the PDF files, which should have the same syntax as the ASCII output of ZentralBlatt. MathSciNet can also output entries in the endNote format, which seems equally interesting. Any comments are welcome.

### Creating executables for Windows from a Linux box

When writing a program, especially a graphical one, you may feel some compassion towards Windows users and wonder whether it would be possible to give them a chance of using it. Famous toolkits like GTK and Qt provide good support for Windows and an abstraction layer for OS-dependent vital functions, so it becomes easier to write OS-independant code.

Next you need a cross-compiler: it’s just a compiler, except that instead of creating executable files you could run, it creates executables in another format (e.g. Win32 .exe files). But since Windows is very different from GNU/Linux, some code or one of its dependencies has to use Windows-specific functions: so you need source headers, and maybe additional libraries.
(more…)

Mikael Vejdemo Johansson, who was at the Operads conference in Luminy (which I also attended), wrote in only one week a Haskell module computing Gröbner bases for operads. Nice work !

### Computing Gröbner bases in Haskell

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]

### Experimental algebraic geometry I : the grassmannian

I just began playing with Macaulay 2 to see how it could help doing algebraic geometry without manual tedious computations. Let’s try with the grassmannian: fortunately, the program comes with lots of pre-written functions, including the generation of Grassmanians.

Macaulay provides a command-line interface using the readline library (like many other command-line programs) : here is what input/output looks like

i1 : V = Grassmannian(1,3)
o1 = ideal(p   p    - p   p    + p   p   )
1,2 0,3    0,2 1,3    0,1 2,3
o1 : Ideal of ZZ[p   , p   , p   , p   , p   , p   ]
0,1   0,2   1,2   0,3   1,3   2,3


When I type a command at i1, I get an output o1 with a value $\mathrm{ideal}(p_{1,2} p_{0,3} - p_{0,2} p_{1,3} + p_{0,1} p_{2,3})$ and a type: this output is an ideal of the ring $\mathbb{Z}[p_{0,1}, p_{0,2}, p_{1,2}, p_{0,3}, p_{1,3}, p_{2,3}]$. Many features of the Grassmannian as an algebraic variety are available: first define

i1 : V = Grassmannian(1,3,CoefficientRing => QQ);
o1 : Ideal of QQ[p   , p   , p   , p   , p   , p   ]
0,1   0,2   1,2   0,3   1,3   2,3
i2 : X = Proj(ring V / V)
o2 = X
o2 : ProjectiveVariety


the projective variety X over $\mathbb Q$ defined by the homogeneous ideal V : here ring V denotes the ambient ring of V. We see that $V$ is a non-singular quadric in 5-dimensional projective space, and check several well-known facts (more…)