2016-08-26 32 views
1

我試圖用Sage工作一些羣理論。Sage沒有在排列元素上找到cycle_type()屬性

特別是我試圖學習與對稱組有關的基本命令。

我的輸入是

G=SymmetricGroup(6) 

sigma=G('(1,3,5)(4,6)') 

然後我使用sigma.cycle_type()並根據該文檔,我應該得到作爲輸出與以遞減順序形成σ週期的長度的列表,在這種情況下我應該得到像[3,2]一樣。相反,我得到一個「AttributeError」:

--------------------------------------------------------------------------- 
AttributeError       Traceback (most recent call last) 
<ipython-input-25-94f73ca80516> in <module>() 
----> 1 sigma.cycle_type() 

/home/sage/sage-7.2/src/sage/structure/element.pyx in sage.structure.element.Element.__getattr__ (/home/sage/sage-7.2/src/build/cythonized/sage/structure/element.c:4649)() 
    411    dummy_error_message.name = name 
    412    raise dummy_attribute_error 
--> 413   return getattr_from_other_class(self, P._abstract_element_class, name) 
    414 
    415  def __dir__(self): 

/home/sage/sage-7.2/src/sage/structure/misc.pyx in sage.structure.misc.getattr_from_other_class (/home/sage/sage-7.2/src/build/cythonized/sage/structure/misc.c:1870)() 
    257   dummy_error_message.cls = type(self) 
    258   dummy_error_message.name = name 
--> 259   raise dummy_attribute_error 
    260  if isinstance(attribute, methodwrapper): 
    261   dummy_error_message.cls = type(self) 

AttributeError: 'sage.groups.perm_gps.permgroup_element.SymmetricGroupElement' object has no attribute 'cycle_type' 

我在做什麼錯?

回答

1

可能你只需要更新版本的Sage?在7.3公測後期,我得到:

sage: sigma.cycle_type() 
[3, 2, 1] 

我要指出的是,在SageMathCloud版本顯得太老了這種目前,如果這是你的平臺......

+0

好吧,那一定是,我正在運行sage 7.2和SageMathCloud。會在7.3中檢查它。謝謝你,對於沉悶的問題感到抱歉 –

+0

沒有什麼枯燥的說Sage增加了功能! – kcrisman

+1

請注意,[SageMathCloud已於2016年9月初更新爲Sage 7.3](https://groups.google.com/d/topic/sage-cloud/xiffMzP6vZw/discussion)。 –