login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Here we demonstrate the PolyMake wrappers Polytope and SimplicialComplex.

To use the Polytope domain we need to say

fricas
(1) -> )lib STRCNV READFILE POLYTOPE
>> System error: The value 1954 is not of type LIST

To create a cube of dimension 4 and look at its h-vector, we say

fricas
c5 := cube 5
There are no library operations named cube Use HyperDoc Browse or issue )what op cube to learn if there is any operation containing " cube " in its name.
Cannot find a definition or applicable library operation named cube with argument type(s) PositiveInteger
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

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
There are no library operations named simple Use HyperDoc Browse or issue )what op simple to learn if there is any operation containing " simple " in its name.
Cannot find a definition or applicable library operation named simple with argument type(s) Variable(c5)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

Here are its vertices:

fricas
vertices c5
There are no library operations named vertices Use HyperDoc Browse or issue )what op vertices to learn if there is any operation containing " vertices " in its name.
Cannot find a definition or applicable library operation named vertices with argument type(s) Variable(c5)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

Here is a random polytope with 6 vertices on the 3-dimensional sphere

fricas
r5 := randSphere(3, 6)
There are no library operations named randSphere Use HyperDoc Browse or issue )what op randSphere to learn if there is any operation containing " randSphere " in its name.
Cannot find a definition or applicable library operation named randSphere with argument type(s) PositiveInteger PositiveInteger
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

Now vertices spits out a matrix containing the coordinates of the vertices of the polytope:

fricas
vertices r5
There are no library operations named vertices Use HyperDoc Browse or issue )what op vertices to learn if there is any operation containing " vertices " in its name.
Cannot find a definition or applicable library operation named vertices with argument type(s) Variable(r5)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.




  Subject:   Be Bold !!
  ( 15 subscribers )  
Please rate this page: