Assume we are given two polyheda, N and P, such that there exists a positive integer k such that kP contains N. Take the minimun k with this prpoerty. Asumme P has p+1 lattice points, this is length latticePoints P = p+1. Now denote with T_0 ... T_p the lattice points of P, and consider the ring QQ[T_0..T_p]. The method 'teLatticePotintsFromHomothethicPolytope(N,P)' gives a 1-column matrix with entries homogeneous elements of QQ[T_0..T_p] of degree k. The i-th row has the information of how the ih point in N can be written as a product of k T's, this is, as a sum of k points of P.
i1 : needsPackage "Polyhedra"
o1 = Polyhedra
o1 : Package
|
i2 : S = QQ[s,t];
|
i3 : f0 = s^2+s^3*t;
|
i4 : f1 = s^3*t^6+1;
|
i5 : f2 = s*t^2+2*s^3*t^5;
|
i6 : f3 = s^2+s^3*t^6;
|
i7 : l = {f0,f1,f2,f3};
|
i8 : P = convexHull(matrix{{0,0,1},{0,1,0}});
|
i9 : rNP = teLatticePotintsFromHomothethicPolytope(polynomialsToPolytope(l),P)
o9 = | T_0^9 |
| T_0^8T_2 |
| T_0^7T_1T_2 |
| T_0^6T_1^2T_2 |
| T_0^7T_2^2 |
| T_0^6T_1T_2^2 |
| T_0^5T_1^2T_2^2 |
| T_0^4T_1^3T_2^2 |
| T_0^3T_1^4T_2^2 |
| T_0^5T_1T_2^3 |
| T_0^4T_1^2T_2^3 |
| T_0^3T_1^3T_2^3 |
| T_0^2T_1^4T_2^3 |
| T_0T_1^5T_2^3 |
| T_1^6T_2^3 |
15 1
o9 : Matrix (QQ[T , T , T ]) <--- (QQ[T , T , T ])
0 1 2 0 1 2
|
For the programmer: we use a simiular algorithm of that used in 'Pennies, Nickels, Dimes and Quarters (Computations in algebraic geometry with Macaulay 2 Editors: D. Eisenbud, D. Grayson,M. Stillman, and B. Sturmfels)'