error in Posets examples (order ideal function)
Hi!
I am very new here! :) I am trying to use sage to work with posets and lower sets (order ideal I think it is the same). My sage version is 5.4.1. I want all the lower sets of a Poset P, for example. I found in an example this:
P = Poset((divisors(12), attrcall("divides")), facade=True)
A = P.directed_subsets('up')
sorted(list(A))
[[], [1, 2, 4, 3, 6, 12], [2, 4, 3, 6, 12], [2, 4, 6, 12], [3, 6, 12], [4, 3, 6, 12], [4, 6, 12], [4, 12], [6, 12], [12]]
That looks like what I want! BUT, when I run the example in my sage it gives me an error!:
sage: P = Poset((divisors(12), attrcall("divides")), facade=True)
sage: A = P.directed_subsets('up')
AttributeError Traceback (most recent call last)
/Users/edwardo/<ipython console> in <module>()
/Applications/sage/local/lib/python2.7/site-packages/sage/structure/parent.so in sage.structure.parent.Parent.__getattr__ (sage/structure/parent.c:5969)()
/Applications/sage/local/lib/python2.7/site-packages/sage/structure/misc.so in sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1427)()
AttributeError: 'FinitePoset_with_category' object has no attribute 'directed_subsets'
It looks like 'directedsubsets' does not work... Why it does not work?? How I can fix this? I have to download a library or something?? Here is the link to the example:
http://www.sagemath.org/doc/reference/categories/sage/categories/finite_posets.html
Help! Thanks!
In such a situation, look at *your* documentation, to see if this example exists in *your* version of Sage; it does'nt for Sage 5.8 (my version), hence it's a recent feature.