Dear Kazek,
   This is actually the correct behavior due to incorrect input. You should 
pass in a list of vertices, not a list of faces to remove (the name of the 
method only says it will remove 1 face, not multiple). Now returning a 
non-None object is sort of the indicator that nothing is done (by looking 
at the source code), but I'm not convinced of having the different return 
types. Instead, what I believe you want is this:

sage: Z = SimplicialComplex([[0,1,2,3]]);Z
Simplicial complex with vertex set (0, 1, 2, 3) and facets {(0, 1, 2, 3)}
sage: Z.remove_face([0,1])
sage: Z.faces()
{-1: {()},
 0: {(0,), (1,), (2,), (3,)},
 1: {(0, 2), (0, 3), (1, 2), (1, 3), (2, 3)},
 2: {(0, 2, 3), (1, 2, 3)}}

Although there probably should be a remove_faces() method too...

Best,
Travis


On Saturday, February 10, 2018 at 3:16:43 PM UTC-6, Kazimierz Kurz wrote:
>
> The following code gives incorrect result.
>
> I  create simplicial complex Z.
>
> Z = SimplicialComplex([[0,1,2,3]]);Z
>
> Simplicial complex with vertex set (0, 1, 2, 3) and facets {(0, 1, 2, 3)}
>
>
> It has correct faces: 
>
> Z.faces()
>
> {0: set([(3,), (0,), (1,), (2,)]), 1: set([(2, 3), (0, 2), (1, 3), (1, 2), 
> (0, 3), (0, 1)]), 2: set([(0, 2, 3), (0, 1, 2), (1, 2, 3), (0, 1, 3)]), 3: 
> set([(0, 1, 2, 3)]), -1: set([()])}
>
>
> X1=Z.remove_face([(0,1)]);X1
>
> Simplicial complex with vertex set (0, 1, 2, 3) and facets {(0, 1, 2, 3)}
>
>
> X1.faces()
>
> {0: set([(3,), (0,), (1,), (2,)]), 1: set([(2, 3), (0, 2), (1, 3), (1, 2), 
> (0, 3), (0, 1)]), 2: set([(0, 2, 3), (0, 1, 2), (1, 2, 3), (0, 1, 3)]), 3: 
> set([(0, 1, 2, 3)]), -1: set([()])}
>
> After face removal it is still there.
> It was very old bug in Sage 5.6
> My code doesn work correctly both in my Sage 6.8 and in Cocalc Internet 
> platform: 
>
> https://cocalc.com/share/52e64765-ec22-4637-9821-6528d33ab85e/2018-02-10-220535.sagews?viewer=share
>
>
> Best Regards
> Kazek Kurz
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to