Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Not getting correct output while computing posets with some conditions on 6 elements.

I want to compute finite posets on 6 elements. Also, I want the following conditions on the posets: 2 covers 0, 4 covers 2, 3 covers 1, 5 covers 3. Also, 0, 1 are incomparable and 4, 5 are incomparable. For that I am giving the following commands:

P = Posets(6)
for p in P:
    if p.covers(0, 2) and p.covers(2, 4) and p.covers(1, 3) and p.covers(3, 5) and p.compare_elements(1, 0) is None and p.compare_elements(4, 5) is None:

The output I am getting is not correct. There is only one element in sage output but that is not true. Is there any issue with my code?