[GAP Forum] musings on the empty set

Laurent Bartholdi laurent.bartholdi at epfl.ch
Tue Mar 1 15:43:52 GMT 2005


hi,
i'm writing some code which occasionally constructs vector spaces of 
dimension 0, and i'm a bit surprised to see that these have to be handled 
specially. to wit:

gap> VectorSpace(GF(2),[]);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
...
gap> VectorSpace(GF(2),[Zero(r)]); # r is an (infinite-dimensional) ring over GF(2)
<vector space over GF(2), with 1 generators>

now, a bit worse:
gap> NullspaceMat([[0],[0]]); # zero map: Z^2 -> Z^1
[ [ 1, 0 ], [ 0, 1 ] ]
gap> NullspaceMat([[],[]]); # zero map: Z^2 -> Z^0
Error, no method found! For debugging hints type ?Recovery from NoMethodFound

i agree that there are simple workarounds for the above problems; it would 
just make my code shorter and simpler if they could be handled by GAP.

best, laurent

--
Laurent Bartholdi           \  laurent.bartholdi<at>epfl<dot>ch
EPFL, IGAT, Bâtiment BCH     \    Téléphone: +41 21-6930380
CH-1015 Lausanne, Switzerland \      Fax: +41 21-6930385


More information about the Forum mailing list