Function 'EHRHART_QUASI_POLYNOMIAL'
Posted: 03 Mar 2026, 14:11
I want to investigate rational dilates of rational polytopes. I am aware that the Ehrhart-Polynomial of such polytopes is a quasipolynomial, i.e. the coefficients are periodic functions c_i(lambda), depending on the (rational) scaling factor lambda. Below the output for the function EHRHART_QUASI_POLYNOMIAL called on the interval P = [1.5,2.5] scaled by 1/15.
For this specific scaling factor lambda I was expecting one single polynomial, where the coefficients are the periodic function values c_i(1/15).
However it seems polymake gives me somehow the whole periodic function. There are 30 (=2*15=2*codenominator of P) polynomials printed out, hinting towards the known rational Ehrhart theory. Unfortunately I can't make much more sense of what I'm looking at. Some more insight on what the function is doing and how to interpret the output would be very much appreciated.
Thanks in advance, Richard
In[]: $p_ex0 = new Polytope<Rational>(VERTICES=>[[1,3/2],[1,5/2]]);
$p_ex1 = scale($p_ex0,1/15);
print join("\n",@{$p_ex1>EHRHART_QUASI_POLYNOMIAL});
Out[]: 1/15*x + 1
1/15*x -1/15
1/15*x -2/15
1/15*x -1/5
1/15*x -4/15
1/15*x -1/3
1/15*x + 3/5
1/15*x + 8/15
1/15*x + 7/15
1/15*x + 2/5
1/15*x + 1/3
1/15*x -11/15
1/15*x + 1/5
1/15*x + 2/15
1/15*x + 1/15
1/15*x
1/15*x -1/15
1/15*x -2/15
1/15*x + 4/5
1/15*x + 11/15
1/15*x + 2/3
1/15*x -2/5
1/15*x -7/15
1/15*x -8/15
1/15*x + 2/5
1/15*x + 1/3
1/15*x + 4/15
1/15*x + 1/5
1/15*x + 2/15
1/15*x + 1/15
For this specific scaling factor lambda I was expecting one single polynomial, where the coefficients are the periodic function values c_i(1/15).
However it seems polymake gives me somehow the whole periodic function. There are 30 (=2*15=2*codenominator of P) polynomials printed out, hinting towards the known rational Ehrhart theory. Unfortunately I can't make much more sense of what I'm looking at. Some more insight on what the function is doing and how to interpret the output would be very much appreciated.
Thanks in advance, Richard
In[]: $p_ex0 = new Polytope<Rational>(VERTICES=>[[1,3/2],[1,5/2]]);
$p_ex1 = scale($p_ex0,1/15);
print join("\n",@{$p_ex1>EHRHART_QUASI_POLYNOMIAL});
Out[]: 1/15*x + 1
1/15*x -1/15
1/15*x -2/15
1/15*x -1/5
1/15*x -4/15
1/15*x -1/3
1/15*x + 3/5
1/15*x + 8/15
1/15*x + 7/15
1/15*x + 2/5
1/15*x + 1/3
1/15*x -11/15
1/15*x + 1/5
1/15*x + 2/15
1/15*x + 1/15
1/15*x
1/15*x -1/15
1/15*x -2/15
1/15*x + 4/5
1/15*x + 11/15
1/15*x + 2/3
1/15*x -2/5
1/15*x -7/15
1/15*x -8/15
1/15*x + 2/5
1/15*x + 1/3
1/15*x + 4/15
1/15*x + 1/5
1/15*x + 2/15
1/15*x + 1/15