Ask Your Question

error in Posets examples (order ideal function)

asked 2013-08-30 17:01:58 +0200

Shariff gravatar image

updated 2015-01-13 18:03:58 +0200

FrédéricC gravatar image


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')
 [[], [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/ in sage.structure.parent.Parent.__getattr__ (sage/structure/parent.c:5969)()

/Applications/sage/local/lib/python2.7/site-packages/sage/structure/ 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:

Help! Thanks!

edit retag flag offensive close merge delete


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.

Bétréma gravatar imageBétréma ( 2013-09-03 10:45:28 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2013-08-30 19:32:01 +0200

Luca gravatar image

Works for me. Your sage version is rather old, update to a recent version (5.11 is the latest stable version).

edit flag offensive delete link more


Indeed, it is ancient. Take it from a developper : considering the amount of bugs we fix day after day, I'd be scared to use a version of Sage which is not the latest ;-)

Nathann gravatar imageNathann ( 2013-09-01 07:07:03 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-08-30 17:01:58 +0200

Seen: 331 times

Last updated: Aug 30 '13