Okay, I think I might have a minimal example worked out - and might have discovered a second bug (related to this one):

When the set-theoretic-intersection is empty, I get a

Code: Select all

`polymake: ERROR: Invalid chart coordinate`

The "special" thing about the example is that both hypersurfaces have lineality spaces, in particular the first one has one whose generator is *not* normalized w.r.t tropical homogeneity (which I think is fine?):

Code: Select all

```
tropical > print $V1->LINEALITY_SPACE;
0 1 1 -2 -2 1
```

Now, as long as all vertices and lin space generators are normalized, this bug won't occur: The additional tropical dimension just doesn't factor into the intersection since everything lives at x_0=0 anyway. Now if the lineality space is *not* normalized, things go awry.

For my minimal example, first of all note the following:

Code: Select all

```
tropical > $line1 = new Cycle<Max>(VERTICES=>[[1,0,0,0,0],[0,0,1,1,0],[0,0,0,-1,0],[0,0,-1,0,0]],MAXIMAL_POLYTOPES=>[[0,1],[0,2],[0,3]],WEIGHTS=>[1,1,1]);
tropical > $line2 = new Cycle<Max>(VERTICES=>[[1,0,0,0,1],[0,0,1,1,0],[0,0,0,-1,0],[0,0,-1,0,0]],MAXIMAL_POLYTOPES=>[[0,1],[0,2],[0,3]],WEIGHTS=>[1,1,1]);
tropical > print set_theoretic_intersection($line1,$line2);
polymake: ERROR: Invalid chart coordinate
```

These are two tropical lines in threespace that don't intersect. I suspect that the error occurs when trying to dehomogenize the empty ray matrix at the end? I think this should be fixed automatically by putting the dehomogenization in the proper place. In any case it should definitely be a test case.

In any case, assuming that an empty intersection is indicated by an error message, let's look at the following:

Code: Select all

```
tropical > $line1 = new Cycle<Max>(VERTICES=>[[1,0,0,0,0],[0,0,1,1,0],[0,0,0,-1,0],[0,0,-1,0,0]],MAXIMAL_POLYTOPES=>[[0,1],[0,2],[0,3]],WEIGHTS=>[1,1,1]);
tropical > $line2 = new Cycle<Max>(VERTICES=>[[1,0,0,0,1],[0,0,1,1,0],[0,0,0,-1,0],[0,0,-1,0,0]],MAXIMAL_POLYTOPES=>[[0,1],[0,2],[0,3]],WEIGHTS=>[1,1,1], LI
NEALITY_SPACE=>[[0,0,0,0,1]]);
tropical > print set_theoretic_intersection($line1,$line2)->DIM;
1
```

This works fine, the lineality space is normalized. Let's try this with a non-normalized version:

Code: Select all

```
tropical > $line1 = new Cycle<Max>(VERTICES=>[[1,0,0,0,0],[0,0,1,1,0],[0,0,0,-1,0],[0,0,-1,0,0]],MAXIMAL_POLYTOPES=>[[0,1],[0,2],[0,3]],WEIGHTS=>[1,1,1]);
tropical > $line2 = new Cycle<Max>(VERTICES=>[[1,0,0,0,1],[0,0,1,1,0],[0,0,0,-1,0],[0,0,-1,0,0]],MAXIMAL_POLYTOPES=>[[0,1],[0,2],[0,3]],WEIGHTS=>[1,1,1], LI
NEALITY_SPACE=>[[0,1,1,1,2]]);
tropical > print set_theoretic_intersection($line1,$line2)->DIM;
polymake: ERROR: Invalid chart coordinate
```

So, all in all, I think my initial assumption was correct: The set-theoretic intersection needs non-homogenous coordinates to work and we didn't notice it until now because we were always being good little tropical geometers and using nicely homogenized coordinates