ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 24 Apr 2023 04:01:02 +0200rational weights of (affine) Lie algebrahttps://ask.sagemath.org/question/67562/rational-weights-of-affine-lie-algebra/I am studying affine Lie algebra with non-integral level and weights.
However, multiplying a rational number, like -3/4, to the affine fundamental weights will cause an error `TypeError: unsupported operand parent(s) for *: 'Rational Field' and 'Extended weight lattice of the Root system of type ['A', 2, 1]'`.
**I wonder how to work with rationals?**Fri, 14 Apr 2023 16:51:20 +0200https://ask.sagemath.org/question/67562/rational-weights-of-affine-lie-algebra/Answer by FrédéricC for <p>I am studying affine Lie algebra with non-integral level and weights.</p>
<p>However, multiplying a rational number, like -3/4, to the affine fundamental weights will cause an error <code>TypeError: unsupported operand parent(s) for *: 'Rational Field' and 'Extended weight lattice of the Root system of type ['A', 2, 1]'</code>.</p>
<p><strong>I wonder how to work with rationals?</strong></p>
https://ask.sagemath.org/question/67562/rational-weights-of-affine-lie-algebra/?answer=67593#post-id-67593Like this
sage: R = RootSystem(['A',2,1])
sage: L = R.weight_space().basis()
sage: 3/4*L[0]
3/4*Lambda[0]
Sat, 15 Apr 2023 13:14:58 +0200https://ask.sagemath.org/question/67562/rational-weights-of-affine-lie-algebra/?answer=67593#post-id-67593Comment by lelouch for <p>Like this</p>
<pre><code>sage: R = RootSystem(['A',2,1])
sage: L = R.weight_space().basis()
sage: 3/4*L[0]
3/4*Lambda[0]
</code></pre>
https://ask.sagemath.org/question/67562/rational-weights-of-affine-lie-algebra/?comment=67851#post-id-67851Thanks! I'll have a try.Mon, 24 Apr 2023 04:01:02 +0200https://ask.sagemath.org/question/67562/rational-weights-of-affine-lie-algebra/?comment=67851#post-id-67851