Ask Your Question
1

Free nilpotent Lie algebra of step 3 with 11 generators

asked 2018-12-09 16:51:13 -0500

rburing gravatar image

updated 2019-01-04 13:45:07 -0500

tmonteil gravatar image

This works:

S = LieAlgebra(QQ, 10, step=3, names='X', naming='linear')

and this works:

S = LieAlgebra(QQ, 11, step=2, names='X', naming='linear')

but this doesn't work:

S = LieAlgebra(QQ, 11, step=3, names='X', naming='linear')

though it should?

Traceback:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-79-8672234ea66b> in <module>()
----> 1 S = LieAlgebra(QQ, Integer(11), step=Integer(3), names='X', naming='linear')

/opt/sagemath-8.4/local/lib/python2.7/site-packages/sage/misc/classcall_metaclass.pyx in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1640)()
    327         """
    328         if cls.classcall is not None:
--> 329             return cls.classcall(cls, *args, **kwds)
    330         else:
    331             # Fast version of type.__call__(cls, *args, **kwds)

/opt/sagemath-8.4/local/lib/python2.7/site-packages/sage/algebras/lie_algebras/lie_algebra.pyc in __classcall_private__(cls, R, arg0, arg1, names, index_set, abelian, nilpotent, category, **kwds)
    439                 from sage.algebras.lie_algebras.nilpotent_lie_algebra import FreeNilpotentLieAlgebra
    440                 del kwds["step"]
--> 441                 return FreeNilpotentLieAlgebra(R, arg1, step, names=names, **kwds)
    442             elif nilpotent:
    443                 raise ValueError("free nilpotent Lie algebras must have a"

/opt/sagemath-8.4/local/lib/python2.7/site-packages/sage/misc/classcall_metaclass.pyx in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1640)()
    327         """
    328         if cls.classcall is not None:
--> 329             return cls.classcall(cls, *args, **kwds)
    330         else:
    331             # Fast version of type.__call__(cls, *args, **kwds)

/opt/sagemath-8.4/local/lib/python2.7/site-packages/sage/algebras/lie_algebras/nilpotent_lie_algebra.pyc in __classcall_private__(cls, R, r, s, names, naming, category, **kwds)
    325         return super(FreeNilpotentLieAlgebra, cls).__classcall__(
    326             cls, R,r, s, names=tuple(names), naming=naming,
--> 327             category=category, **kwds)
    328 
    329     def __init__(self, R, r, s, names, naming, category, **kwds):

/opt/sagemath-8.4/local/lib/python2.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.CachedFunction.__call__ (build/cythonized/sage/misc/cachefunc.c:6301)()
   1003                 return self.cache[k]
   1004         except KeyError:
-> 1005             w = self.f(*args, **kwds)
   1006             self.cache[k] = w
   1007             return w

/opt/sagemath-8.4/local/lib/python2.7/site-packages/sage/structure/unique_representation.py in __classcall__(cls, *args, **options)
   1025             True
   1026         """
-> 1027         instance = typecall(cls, *args, **options)
   1028         assert isinstance( instance, cls )
   1029         if instance.__class__.__reduce__ == CachedRepresentation.__reduce__:

/opt/sagemath-8.4/local/lib/python2.7/site-packages/sage/misc/classcall_metaclass.pyx in sage.misc.classcall_metaclass.typecall (build/cythonized/sage/misc/classcall_metaclass.c:2090)()
    494             TypeError: Argument 'cls' has incorrect type (expected type, got classobj)
    495     """
--> 496     return (<PyTypeObject*>type).tp_call(cls, args, kwds)
    497 
    498 # Class for timing::

/opt/sagemath-8.4/local/lib/python2.7/site-packages/sage/algebras/lie_algebras/nilpotent_lie_algebra.pyc in __init__(self, R, r, s, names, naming, category, **kwds)
    398                     for X_ind, X in basis_by_deg[dx]:
    399                         for Y_ind, Y in basis_by_deg[dy]:
--> 400                             Z = L[X, Y]
    401                             if not Z.is_zero():
    402                                 s_coeff[(X_ind, Y_ind)] = {W_ind: Z[W.leading_support()]

/opt/sagemath-8.4/local/lib/python2.7/site-packages/sage/algebras/lie_algebras/lie_algebra.pyc in __getitem__(self, x)
    573                 return x[1].ideal(x[0])
    574             # Otherwise it is the bracket of two elements
--> 575             return self(x[0])._bracket_(self(x[1]))
    576         return super(LieAlgebra, self).__getitem__(x)
    577 

/opt/sagemath-8.4/local/lib/python2.7/site-packages/sage/algebras/lie_algebras/lie_algebra_element.pyx in sage.algebras.lie_algebras.lie_algebra_element.FreeLieAlgebraElement._bracket_ (build/cythonized/sage/algebras/lie_algebras/lie_algebra_element.c:19132)()
   1452                     a, b = mr, ml
   1453                     cr = -cr
-> 1454                 for b_elt, coeff in self.parent()._rewrite_bracket(a, b).iteritems():
   1455                     d[b_elt] = d.get(b_elt, zero) + cl * cr * coeff
   1456                     if d[b_elt] == zero:

/opt/sagemath-8.4/local/lib/python2.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.CachedMethodCaller.__call__ (build/cythonized/sage/misc/cachefunc.c:10824)()
   1951                 return cache[k]
   1952         except KeyError:
-> 1953             w = self._instance_call(*args, **kwds)
   1954             cache[k] = w
   1955             return w

/opt/sagemath-8.4/local/lib/python2.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.CachedMethodCaller._instance_call (build/cythonized/sage/misc/cachefunc.c:10280)()
   1827             True
   1828         """
-> 1829         return self.f(self._instance, *args, **kwds)
   1830 
   1831     cdef fix_args_kwds(self, tuple args, dict kwds):

/opt/sagemath-8.4/local/lib/python2.7/site-packages/sage/algebras/lie_algebras/free_lie_algebra.pyc in _rewrite_bracket(self, l, r)
    690             # For a similar reason, we have b >= c.
    691             # Compute the left summand
--> 692             for m, inner_coeff in iteritems(self._rewrite_bracket(l._right, r)):
    693                 if l._left == m:
    694                     continue

AttributeError: 'sage.algebras.lie_algebras.lie_algebra_element.Lie' object has no attribute '_right'
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-01-04 08:10:55 -0500

rburing gravatar image

updated 2019-03-14 09:25:29 -0500

This has been submitted as trac ticket #27018 and subsequently it was fixed.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-12-09 16:51:13 -0500

Seen: 145 times

Last updated: Mar 14