Projections of polyhedral fans

Questions and problems about using polymake go here.
ren
Posts: 38
Joined: 03 May 2011, 15:21

Projections of polyhedral fans

Postby ren » 13 May 2019, 15:09

I am trying to compute the projection of a tropical hypersurface using fan::projection (trying to get a decomposition of Trop(PGL(3)) depending on its action on a plane quadric):

Code: Select all

use application "tropical"; my $mQuadric = [ [2,0,0,2,0,0,0,0,0,0,0,0], [1,1,0,1,1,0,0,0,0,0,0,0], [0,2,0,0,2,0,0,0,0,0,0,0], [1,0,1,1,0,1,0,0,0,0,0,0], [0,1,1,0,1,1,0,0,0,0,0,0], [0,0,2,0,0,2,0,0,0,0,0,0], [2,0,0,1,0,0,1,0,0,0,0,0], [1,1,0,0,1,0,1,0,0,0,0,0], [1,0,1,0,0,1,1,0,0,0,0,0], [2,0,0,0,0,0,2,0,0,0,0,0], [1,1,0,1,0,0,0,1,0,0,0,0], [0,2,0,0,1,0,0,1,0,0,0,0], [0,1,1,0,0,1,0,1,0,0,0,0], [1,1,0,0,0,0,1,1,0,0,0,0], [0,2,0,0,0,0,0,2,0,0,0,0], [1,0,1,1,0,0,0,0,1,0,0,0], [0,1,1,0,1,0,0,0,1,0,0,0], [0,0,2,0,0,1,0,0,1,0,0,0], [1,0,1,0,0,0,1,0,1,0,0,0], [0,1,1,0,0,0,0,1,1,0,0,0], [0,0,2,0,0,0,0,0,2,0,0,0], [2,0,0,1,0,0,0,0,0,1,0,0], [1,1,0,0,1,0,0,0,0,1,0,0], [1,0,1,0,0,1,0,0,0,1,0,0], [2,0,0,0,0,0,1,0,0,1,0,0], [1,1,0,0,0,0,0,1,0,1,0,0], [1,0,1,0,0,0,0,0,1,1,0,0], [2,0,0,0,0,0,0,0,0,2,0,0], [1,1,0,1,0,0,0,0,0,0,1,0], [0,2,0,0,1,0,0,0,0,0,1,0], [0,1,1,0,0,1,0,0,0,0,1,0], [1,1,0,0,0,0,1,0,0,0,1,0], [0,2,0,0,0,0,0,1,0,0,1,0], [0,1,1,0,0,0,0,0,1,0,1,0], [1,1,0,0,0,0,0,0,0,1,1,0], [0,2,0,0,0,0,0,0,0,0,2,0], [1,0,1,1,0,0,0,0,0,0,0,1], [0,1,1,0,1,0,0,0,0,0,0,1], [0,0,2,0,0,1,0,0,0,0,0,1], [1,0,1,0,0,0,1,0,0,0,0,1], [0,1,1,0,0,0,0,1,0,0,0,1], [0,0,2,0,0,0,0,0,1,0,0,1], [1,0,1,0,0,0,0,0,0,1,0,1], [0,1,1,0,0,0,0,0,0,0,1,1], [0,0,2,0,0,0,0,0,0,0,0,2]]; my $cQuadric = [1,2,1,2,2,1,0,0,0,1,0,0,0,2,1,0,0,0,2,2,1,0,0,0,0,0,0,1,0,0,0,0,0,0,2,1,0,0,0,0,0,0,2,2,1]; my $Tf = new Hypersurface<Min>(MONOMIALS=>$mQuadric, COEFFICIENTS=>$cQuadric); use application "fan"; my $TTf = new PolyhedralFan(INPUT_RAYS=>$Tf->VERTICES, INPUT_CONES=>$Tf->MAXIMAL_POLYTOPES); my $TfProj = projection($TTf,[0,4,5,6,7,8,9,10,11,12]);
But I run into following error:

Code: Select all

polymake: ERROR: "/Applications/polymake.app/Contents/Resources/polymake/share/polymake/apps/fan/rules/common.rules", line 385: projection: LINEAR_SPAN_NORMALS has wrong number of rows
Am I using the function correctly?

lkastner
Developer
Posts: 12
Joined: 27 May 2012, 23:35

Re: Projections of polyhedral fans

Postby lkastner » 03 Jun 2019, 23:01

The error you are running into comes from apps/polytope/src/projection.cc:

Code: Select all

const int ambient_dim = p_in.give(object_prefix + "_AMBIENT_DIM"); const int dim = p_in.give(object_prefix + "_DIM"); const int codim = ambient_dim-dim; const Matrix<Scalar> linear_span = p_in.give(linear_span_name); if (codim != linear_span.rows()) throw std::runtime_error("projection: " + linear_span_name + " has wrong number of rows");
For your fan you have

Code: Select all

fan > $LSN = $TTf->LINEAR_SPAN_NORMALS; fan > print $LSN->rows; 239 fan > $dim = $TTf->FAN_DIM; fan > $amb = $TTf->FAN_AMBIENT_DIM; fan > $codim = $amb-$dim; fan > print $codim; 5
Fixing this function is ticket 749, I will add a link to this thread and bump the urgency. Lets discuss alternatives that you can use until a fix has been provided tomorrow.


Return to “Helpdesk”