Here we demonstrate the PolyMake wrappers Polytope
and SimplicialComplex
.
To use the Polytope
domain we need to say
fricas
)lib STRCNV READFILE POLYTOPE
StringConversions is now explicitly exposed in frame initial
StringConversions will be automatically loaded when needed from
/var/aw/var/LatexWiki/STRCNV.NRLIB/STRCNV
ReadFile is now explicitly exposed in frame initial
ReadFile will be automatically loaded when needed from
/var/aw/var/LatexWiki/READFILE.NRLIB/READFILE
Polytope is now explicitly exposed in frame initial
Polytope will be automatically loaded when needed from
/var/aw/var/LatexWiki/POLYTOPE.NRLIB/POLYTOPE
To create a cube of dimension 4 and look at its h-vector, we say
fricas
c5 := cube 5
Type: Polytope
fricas
h5 := hVector c5
>> Error detected within library code:
End of file
The idea is to factor the h-polynomial, for example:
fricas
factor reduce(+, [h5.(i+1) * t^i for i in 0..#h5-1])
There are 2 exposed and 2 unexposed library operations named #
having 1 argument(s) but none was determined to be applicable.
Use HyperDoc Browse, or issue
)display op #
to learn more about the available operations. Perhaps
package-calling the operation or using coercions on the arguments
will allow you to apply the operation.
Cannot find a definition or applicable library operation named #
with argument type(s)
Variable(h5)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
Of course, the cube is simple:
fricas
simple c5
>> Error detected within library code:
End of file
Here are its vertices:
fricas
vertices c5
>> Error detected within library code:
End of file
Here is a random polytope with 6 vertices on the 3-dimensional sphere
fricas
r5 := randSphere(3, 6)
Type: Polytope
Now vertices
spits out a matrix containing the coordinates of the vertices of the polytope:
fricas
vertices r5
>> Error detected within library code:
End of file