Code: Select all
application "tropical";
$f1 = toTropicalPolynomial("min(33+x1,72+x2)",qw( w x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 ));
$f2 = toTropicalPolynomial("min(31+x2+x4,33+x1+w,57+x2+w,54+x3+w,2+x14+w)",qw( w x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 ));
$f3 = toTropicalPolynomial("min(37+x3+x6,57+x2+w,54+x3+w,29+x15+w)",qw( w x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 ));
$f4 = toTropicalPolynomial("min(31+x2+x4,42+x4+x10,27+x14+w,87+x16+w,40+x18+w)",qw( w x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 ));
$f5 = toTropicalPolynomial("min(72+x5+x8,12+x5+w,31+x7+w,2+x14+w,28+x16+w)",qw( w x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 ));
$T1 = new Hypersurface<Min>(POLYNOMIAL=>$f1);
$T2 = new Hypersurface<Min>(POLYNOMIAL=>$f2);
$T3 = new Hypersurface<Min>(POLYNOMIAL=>$f3);
$T4 = new Hypersurface<Min>(POLYNOMIAL=>$f4);
$T5 = new Hypersurface<Min>(POLYNOMIAL=>$f5);
$T12 = intersect($T1,$T2);
$T123 = intersect($T12,$T3);
$T1234 = intersect($T123,$T4);
$T12345 = intersect($T1234,$T5);
Code: Select all
application "polytope";
$c = new Cone(INEQUALITIES=>[], EQUATIONS=>$T1234->LINEALITY_SPACE/$T5->LINEALITY_SPACE);
print $c->DIM;