Points(subspace)

Issue #13 resolved
Ferdinand Ihringer created an issue

Maybe this is WAD, but I always thought that the following behavior is a bit unexpected.

gap> q := 3;
3
gap> ps := HyperbolicQuadric(3, q);
Q+(3, 3)
gap> pl := Random(Hyperplanes(AmbientSpace(ps)));
<a plane in ProjectiveSpace(3, 3)>
gap> TypeOfSubspace(ps, pl);
"parabolic"
gap> lns := AsSet(Lines(ps));;
gap> Size(Filtered(lns, x -> Meet(x, lns[1]) in Points(ps)));
4
gap> Size(Filtered(lns, x -> Meet(x, lns[1]) in Points(pl)));
4
gap> Size(Filtered(lns, x -> Meet(x, lns[1]) in pl and Meet(x, lns[1]) in Points(ps)));
1
gap> Meet(lns[3], lns[1]);
<a point in Q+(3, 3)>
gap> Meet(lns[1], lns[3]) in pl;
false
gap> Meet(lns[1], lns[3]) in Points(pl);
true

Comments (2)

  1. Jan De Beule repo owner

    You can call this a bug (and not "unexpected behavior") ;-) I localized the bug in the method for \in in projectivespace.gi line 329. when <dom> is the collection of points of a projective space (not just the list of points, but the object representing e.g. the set of points of a plane), and for <p> a point, this method just checks whether the ambient geometries match, and then simply return true. This is wrong when <dom> is e.g. a collection of shadow points. See the following easy and obviously wrong example

    gap> pg := PG(3,3);
    ProjectiveSpace(3, 3)
    gap> pl := Random(Planes(pg));
    <a plane in ProjectiveSpace(3, 3)>
    gap> p := First(Points(pg),x->not x in pl);
    <a point in ProjectiveSpace(3, 3)>
    gap> p in pl;
    false
    gap> p in Points(pl);
    true
    

    I will adapt the code, and find out if more instances of this wrong code are occurring in fining.

  2. Log in to comment