This is a multi-part message in MIME format.
--------------0F6D52C7F9312ECDBAD9008E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Dear Gap - Forum,
I think there is a bug in BlistList :
if the second argument is a range, then you might get
a wrong result (see example).
Another problem concerning boolean lists :
if IsBlist recognizes a given list as a boolean list,
it will (at least) not necessary be converted to
compact Blist representation, contrary to the
description of the respective function in the
reference manual.
(At least if the results of SHALLOW_SIZE
are correct, see example).
Best regards,
Stefan Kohl
--------------0F6D52C7F9312ECDBAD9008E
Content-Type: text/plain; charset=us-ascii; name="Blist.log"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="Blist.log"
gap> even := [4,6..20]; [ 4, 6 .. 20 ] gap> l := BlistList([1..20],even); [ false, false, false, true, true, true, true, true, true, true, true, true, false, false, false, false, false, false, false, false ] # serious nonsense, I think gap> even[1] := 3; # To convert the list from range representation 3 # to 'ordinary' representation gap> even[1] := 4; 4 gap> even; [ 4, 6, 8, 10, 12, 14, 16, 18, 20 ] gap> l := BlistList([1..20],even); [ false, false, false, true, false, true, false, true, false, true, false, true, false, true, false, true, false, true, false, true ] # correct, as expected gap> b := List([1..1000],i->true);; gap> SHALLOW_SIZE(b); 132 gap> b[1] := 0; 0 gap> SHALLOW_SIZE(b); 4004 gap> b[1] := false; false gap> SHALLOW_SIZE(b); 4004 gap> IsBlist(b); true gap> SHALLOW_SIZE(b); # Why does GAP not convert b back 4004 # to compact Blist representation ? --------------0F6D52C7F9312ECDBAD9008E--