Ask Your Question
0

error in Posets examples (order ideal function)

asked 2013-08-30 10:01:58 -0500

Shariff gravatar image

updated 2015-01-13 11:03:58 -0500

FrédéricC gravatar image

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!

edit retag flag offensive close merge delete

Comments

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 03:45:28 -0500 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2013-08-30 12:32:01 -0500

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

Comments

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 00:07:03 -0500 )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

Stats

Asked: 2013-08-30 10:01:58 -0500

Seen: 163 times

Last updated: Aug 30 '13