I've had this problem too. The bug is actually that posets determine whether there is a top element by converting the element returned by ._hasse_diagram.top() to a boolean. If that element has boolean value False (as is the case in your example), then Poset.top() returns None.
I filed a ticket for this recently, but haven't gotten around to fixing it (it will be very easy): http://trac.sagemath.org/sage_trac/ticket/10776 best, Niles On Mar 6, 12:36 am, Andrey Novoseltsev <novos...@gmail.com> wrote: > Hello, > > I have discovered that a fan consisting only of the origin cannot > compute its cone lattice due to the following behaviour: > > sage: G = DiGraph(1) > sage: print G > Digraph on 1 vertex > sage: P = Poset(G) > sage: print P > Finite poset containing 1 elements > sage: print P.bottom() > 0 > sage: print P.top() > None > > Is it a bug? It seems to me that 0 in this case is both top and bottom > and the minimal and the maximal element. > > Thank you! > Andrey -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To post to this group, send email to sage-combinat-devel@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.