Page 1 of 1

Problems on equal_bases()

Posted: 28 Jul 2014, 09:46
by ChoF
I've noticed that equal_bases($M1,$M2) does not work when the first matrix $M1 has the null space of zero dimension. For example,

polytope > $a = new Matrix([[1,0],[0,1]]);

polytope > print equal_bases($a,$a);

polymake: ERROR: operator*(GenericMatrix,GenericMatrix) - dimension mismatch at /usr/local/share/polymake/apps/common/rules/algebraic_types line 466.

The line #466 of "algebraic_types" says:

return $M1->rows==$M2->rows && is_zero(null_space($M1) * transpose($M2));

If the null space of $M1 is {0}, the command null_space($M1) returns nothing.

So it seems that an additional code is required, which checks whether both of the two matrices have the same null space {0}.

Re: Problems on equal_bases()

Posted: 28 Jul 2014, 10:05
by joswig
That's a very valid complaint. Thanks for pointing this out. We will look into this and come back with a fix soon.

Re: Problems on equal_bases()

Posted: 30 Jul 2014, 10:48
by blorenz
Hi,

thanks for the report and we have fixed the issue in our development branch. We will create a new beta snapshot that contains the fix in the next days.

Benjamin