本文整理汇总了Python中sage.combinat.root_system.cartan_type.CartanType.is_affine方法的典型用法代码示例。如果您正苦于以下问题:Python CartanType.is_affine方法的具体用法?Python CartanType.is_affine怎么用?Python CartanType.is_affine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.combinat.root_system.cartan_type.CartanType
的用法示例。
在下文中一共展示了CartanType.is_affine方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __classcall_private__
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_affine [as 别名]
def __classcall_private__(cls, cartan_type, r, s):
"""
Normalize the input arguments to ensure unique representation.
EXAMPLES::
sage: KRT1 = KirillovReshetikhinTableaux(CartanType(['A',3,1]), 2, 3)
sage: KRT2 = KirillovReshetikhinTableaux(['A',3,1], 2, 3)
sage: KRT1 is KRT2
True
"""
ct = CartanType(cartan_type)
assert ct.is_affine()
if ct.is_untwisted_affine():
if ct.letter == 'D':
if r == ct.n or r == ct.n - 1:
return KRTableauxSpin(ct, r, s)
return KRTableauxTypeVertical(ct, r, s)
if ct.letter == 'B':
if r == ct.n:
return KRTableauxBn(ct, r, s)
return KRTypeVertical(ct, r, s)
if ct.letter == 'A' or (ct.letter == 'C' and r == ct.n):
return KRTableauxRectangle(ct, r, s)
else:
if ct.dual().letter == 'B':
return KRTableauxTypeVertical(ct, r, s)
raise NotImplementedError
示例2: __classcall_private__
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_affine [as 别名]
def __classcall_private__(cls, arg0, cartan_type=None, kac_moody=True):
"""
Parse input to ensure a unique representation.
INPUT:
- ``arg0`` -- a simple Lie algebra or a base ring
- ``cartan_type`` -- a Cartan type
EXAMPLES::
sage: L1 = lie_algebras.Affine(QQ, ['A',4,1])
sage: cl = lie_algebras.sl(QQ, 5)
sage: L2 = lie_algebras.Affine(cl)
sage: L1 is L2
True
sage: cl.affine() is L1
True
"""
if isinstance(arg0, LieAlgebra):
ct = arg0.cartan_type()
if not ct.is_finite():
raise ValueError("the base Lie algebra is not simple")
cartan_type = ct.affine()
g = arg0
else:
# arg0 is the base ring
cartan_type = CartanType(cartan_type)
if not cartan_type.is_affine():
raise ValueError("the Cartan type must be affine")
g = LieAlgebra(arg0, cartan_type=cartan_type.classical())
if not cartan_type.is_untwisted_affine():
raise NotImplementedError("only currently implemented for untwisted affine types")
return super(AffineLieAlgebra, cls).__classcall__(cls, g, kac_moody)
示例3: __classcall_private__
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_affine [as 别名]
def __classcall_private__(cls, starting_weight, cartan_type = None, starting_weight_parent = None):
"""
Classcall to mend the input.
Internally, the
:class:`~sage.combinat.crystals.littlemann_path.CrystalOfLSPaths` code
works with a ``starting_weight`` that is in the weight space associated
to the crystal. The user can, however, also input a ``cartan_type``
and the coefficients of the fundamental weights as
``starting_weight``. This code transforms the input into the right
format (also necessary for UniqueRepresentation).
TESTS::
sage: crystals.LSPaths(['A',2,1],[-1,0,1])
The crystal of LS paths of type ['A', 2, 1] and weight -Lambda[0] + Lambda[2]
sage: R = RootSystem(['B',2,1])
sage: La = R.weight_space(extended=True).basis()
sage: C = crystals.LSPaths(['B',2,1],[0,0,1])
sage: B = crystals.LSPaths(La[2])
sage: B is C
True
"""
if cartan_type is not None:
cartan_type, starting_weight = CartanType(starting_weight), cartan_type
if cartan_type.is_affine():
extended = True
else:
extended = False
R = RootSystem(cartan_type)
P = R.weight_space(extended = extended)
Lambda = P.basis()
offset = R.index_set()[Integer(0)]
starting_weight = P.sum(starting_weight[j-offset]*Lambda[j] for j in R.index_set())
if starting_weight_parent is None:
starting_weight_parent = starting_weight.parent()
else:
# Both the weight and the parent of the weight are passed as arguments of init to be able
# to distinguish between crystals with the extended and non-extended weight lattice!
if starting_weight.parent() != starting_weight_parent:
raise ValueError("The passed parent is not equal to parent of the inputted weight!")
return super(CrystalOfLSPaths, cls).__classcall__(cls, starting_weight, starting_weight_parent = starting_weight_parent)
示例4: __classcall_private__
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_affine [as 别名]
def __classcall_private__(cls, cartan_type, La):
r"""
Normalize input to ensure a unique representation.
EXAMPLES::
sage: La = RootSystem(['E',8,1]).weight_lattice(extended=True).fundamental_weights()
sage: M = crystals.NakajimaMonomials(['E',8,1],La[0]+La[8])
sage: M1 = crystals.NakajimaMonomials(CartanType(['E',8,1]),La[0]+La[8])
sage: M2 = crystals.NakajimaMonomials(['E',8,1],M.Lambda()[0] + M.Lambda()[8])
sage: M is M1 is M2
True
"""
cartan_type = CartanType(cartan_type)
if cartan_type.is_affine():
La = RootSystem(cartan_type).weight_lattice(extended=True)(La)
else:
La = RootSystem(cartan_type).weight_lattice()(La)
return super(CrystalOfNakajimaMonomials, cls).__classcall__(cls, cartan_type, La)
示例5: __classcall_private__
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_affine [as 别名]
def __classcall_private__(cls, cartan_type, B):
"""
Normalize the input arguments to ensure unique representation.
EXAMPLES::
sage: T1 = crystals.TensorProductOfKirillovReshetikhinTableaux(CartanType(['A',3,1]), [[2,2]])
sage: T2 = crystals.TensorProductOfKirillovReshetikhinTableaux(['A',3,1], [(2,2)])
sage: T3 = crystals.TensorProductOfKirillovReshetikhinTableaux(['A',3,1], ((2,2),))
sage: T2 is T1, T3 is T1
(True, True)
"""
cartan_type = CartanType(cartan_type)
if not cartan_type.is_affine():
raise ValueError("The Cartan type must be affine")
# Standardize B input into a tuple of tuples
B = tuple(tuple(dim) for dim in B)
return super(TensorProductOfKirillovReshetikhinTableaux, cls).__classcall__(cls, cartan_type, B)
示例6: __classcall_private__
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_affine [as 别名]
def __classcall_private__(cls, starting_weight, cartan_type = None):
"""
Classcall to mend the input.
Internally, the CrystalOfLSPaths code works with a ``starting_weight`` that
is in the ``weight_space`` associated to the crystal. The user can, however,
also input a ``cartan_type`` and the coefficients of the fundamental weights
as ``starting_weight``. This code transforms the input into the right
format (also necessary for UniqueRepresentation).
TESTS::
sage: CrystalOfLSPaths(['A',2,1],[-1,0,1])
The crystal of LS paths of type ['A', 2, 1] and weight -Lambda[0] + Lambda[2]
sage: R = RootSystem(['B',2,1])
sage: La = R.weight_space().basis()
sage: C = CrystalOfLSPaths(['B',2,1],[0,0,1])
sage: B = CrystalOfLSPaths(La[2])
sage: B is C
True
"""
if cartan_type is not None:
cartan_type, starting_weight = CartanType(starting_weight), cartan_type
if cartan_type.is_affine():
extended = True
else:
extended = False
R = RootSystem(cartan_type)
P = R.weight_space(extended = extended)
Lambda = P.basis()
offset = R.index_set()[Integer(0)]
starting_weight = P.sum(starting_weight[j-offset]*Lambda[j] for j in R.index_set())
return super(CrystalOfLSPaths, cls).__classcall__(cls, starting_weight)
示例7: __classcall_private__
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_affine [as 别名]
def __classcall_private__(cls, cartan_type, La=None, c=None):
r"""
Normalize input to ensure a unique representation.
EXAMPLES::
sage: La = RootSystem(['E',8,1]).weight_lattice(extended=True).fundamental_weights()
sage: M = crystals.NakajimaMonomials(['E',8,1],La[0]+La[8])
sage: M1 = crystals.NakajimaMonomials(CartanType(['E',8,1]),La[0]+La[8])
sage: M2 = crystals.NakajimaMonomials(['E',8,1],M.Lambda()[0] + M.Lambda()[8])
sage: M is M1 is M2
True
"""
if La is None:
La = cartan_type
cartan_type = La.parent().cartan_type()
cartan_type = CartanType(cartan_type)
if cartan_type.is_affine():
La = RootSystem(cartan_type).weight_lattice(extended=True)(La)
else:
La = RootSystem(cartan_type).weight_lattice()(La)
n = len(cartan_type.index_set())
c = InfinityCrystalOfNakajimaMonomials._normalize_c(c, n)
return super(CrystalOfNakajimaMonomials, cls).__classcall__(cls, cartan_type, La, c)
示例8: __classcall__
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_affine [as 别名]
def __classcall__(cls, base_ring, cartan_type, level=None, twisted=False):
"""
Normalize arguments to ensure a unique representation.
EXAMPLES::
sage: Q1 = QSystem(QQ, ['A',4])
sage: Q2 = QSystem(QQ, 'A4')
sage: Q1 is Q2
True
Twisted Q-systems are different from untwisted Q-systems::
sage: Q1 = QSystem(QQ, ['E',6,2], twisted=True)
sage: Q2 = QSystem(QQ, ['E',6,2])
sage: Q1 is Q2
False
"""
cartan_type = CartanType(cartan_type)
if not is_tamely_laced(cartan_type):
raise ValueError("the Cartan type is not tamely-laced")
if twisted and not cartan_type.is_affine() and not cartan_type.is_untwisted_affine():
raise ValueError("the Cartan type must be of twisted type")
return super(QSystem, cls).__classcall__(cls, base_ring, cartan_type, level, twisted)
示例9: CrystalOfLSPaths
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_affine [as 别名]
class CrystalOfLSPaths(UniqueRepresentation, Parent):
r"""
Crystal graph of LS paths generated from the straight-line path to a given weight.
INPUT:
- ``cartan_type`` -- the Cartan type of a finite or affine root system
- ``starting_weight`` -- a weight given as a list of coefficients of the fundamental weights
The crystal class of piecewise linear paths in the weight space,
generated from a straight-line path from the origin to a given
element of the weight lattice.
OUTPUT: - a tuple of weights defining the directions of the piecewise linear segments
EXAMPLES::
sage: C = CrystalOfLSPaths(['A',2,1],[-1,0,1]); C
The crystal of LS paths of type ['A', 2, 1] and weight (-1, 0, 1)
sage: c = C.module_generators[0]; c
(-Lambda[0] + Lambda[2],)
sage: [c.f(i) for i in C.index_set()]
[None, None, (Lambda[1] - Lambda[2],)]
sage: R = C.R; R
Root system of type ['A', 2, 1]
sage: Lambda = R.weight_space().basis(); Lambda
Finite family {0: Lambda[0], 1: Lambda[1], 2: Lambda[2]}
sage: b=C(tuple([-Lambda[0]+Lambda[2]]))
sage: b==c
True
sage: b.f(2)
(Lambda[1] - Lambda[2],)
For classical highest weight crystals we can also compare the results with the tableaux implementation::
sage: C = CrystalOfLSPaths(['A',2],[1,1])
sage: list(set(C.list()))
[(-Lambda[1] - Lambda[2],), (-Lambda[1] + 1/2*Lambda[2], Lambda[1] - 1/2*Lambda[2]), (-Lambda[1] + 2*Lambda[2],),
(1/2*Lambda[1] - Lambda[2], -1/2*Lambda[1] + Lambda[2]), (Lambda[1] - 2*Lambda[2],), (-2*Lambda[1] + Lambda[2],),
(2*Lambda[1] - Lambda[2],), (Lambda[1] + Lambda[2],)]
sage: C.cardinality()
8
sage: B = CrystalOfTableaux(['A',2],shape=[2,1])
sage: B.cardinality()
8
sage: B.digraph().is_isomorphic(C.digraph())
True
TESTS::
sage: C = CrystalOfLSPaths(['A',2,1],[-1,0,1])
sage: TestSuite(C).run(skip=['_test_elements', '_test_elements_eq', '_test_enumerated_set_contains', '_test_some_elements'])
sage: C = CrystalOfLSPaths(['E',6],[1,0,0,0,0,0])
sage: TestSuite(C).run()
REFERENCES::
.. [L] P. Littelmann, Paths and root operators in representation theory. Ann. of Math. (2) 142 (1995), no. 3, 499-525.
"""
@staticmethod
def __classcall__(cls, cartan_type, starting_weight):
"""
cartan_type and starting_weight are lists, which are mutable. The class
UniqueRepresentation requires immutable inputs. The following code
fixes this problem.
TESTS::
sage: CrystalOfLSPaths.__classcall__(CrystalOfLSPaths,['A',2,1],[-1,0,1])
The crystal of LS paths of type ['A', 2, 1] and weight (-1, 0, 1)
"""
cartan_type = CartanType(cartan_type)
starting_weight = tuple(starting_weight)
return super(CrystalOfLSPaths, cls).__classcall__(cls, cartan_type, starting_weight)
def __init__(self, cartan_type, starting_weight):
"""
EXAMPLES::
sage: C = CrystalOfLSPaths(['A',2,1],[-1,0,1]); C
The crystal of LS paths of type ['A', 2, 1] and weight (-1, 0, 1)
sage: C.R
Root system of type ['A', 2, 1]
sage: C.weight
-Lambda[0] + Lambda[2]
sage: C.weight.parent()
Extended weight space over the Rational Field of the Root system of type ['A', 2, 1]
sage: C.module_generators
[(-Lambda[0] + Lambda[2],)]
"""
self._cartan_type = CartanType(cartan_type)
self.R = RootSystem(cartan_type)
self._name = "The crystal of LS paths of type %s and weight %s"%(cartan_type,starting_weight)
if self._cartan_type.is_affine():
self.extended = True
if all(i>=0 for i in starting_weight):
#.........这里部分代码省略.........
示例10: __classcall_private__
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_affine [as 别名]
def __classcall_private__(cls, R=None, arg0=None, arg1=None, names=None,
index_set=None, abelian=False, **kwds):
"""
Select the correct parent based upon input.
TESTS::
sage: LieAlgebra(QQ, abelian=True, names='x,y,z')
Abelian Lie algebra on 3 generators (x, y, z) over Rational Field
sage: LieAlgebra(QQ, {('e','h'): {'e':-2}, ('f','h'): {'f':2},
....: ('e','f'): {'h':1}}, names='e,f,h')
Lie algebra on 3 generators (e, f, h) over Rational Field
"""
# Parse associative algebra input
# -----
assoc = kwds.get("associative", None)
if assoc is not None:
return LieAlgebraFromAssociative(assoc, names=names, index_set=index_set)
# Parse input as a Cartan type
# -----
ct = kwds.get("cartan_type", None)
if ct is not None:
from sage.combinat.root_system.cartan_type import CartanType
ct = CartanType(ct)
if ct.is_affine():
from sage.algebras.lie_algebras.affine_lie_algebra import AffineLieAlgebra
return AffineLieAlgebra(R, cartan_type=ct,
kac_moody=kwds.get("kac_moody", True))
if not ct.is_finite():
raise NotImplementedError("non-finite types are not implemented yet, see trac #14901 for details")
rep = kwds.get("representation", "bracket")
if rep == 'bracket':
from sage.algebras.lie_algebras.classical_lie_algebra import LieAlgebraChevalleyBasis
return LieAlgebraChevalleyBasis(R, ct)
if rep == 'matrix':
from sage.algebras.lie_algebras.classical_lie_algebra import ClassicalMatrixLieAlgebra
return ClassicalMatrixLieAlgebra(R, ct)
raise ValueError("invalid representation")
# Parse the remaining arguments
# -----
if R is None:
raise ValueError("invalid arguments")
check_assoc = lambda A: (isinstance(A, (Ring, MatrixSpace))
or A in Rings()
or A in Algebras(R).Associative())
if arg0 in ZZ or check_assoc(arg1):
# Check if we need to swap the arguments
arg0, arg1 = arg1, arg0
# Parse the first argument
# -----
if isinstance(arg0, dict):
if not arg0:
from sage.algebras.lie_algebras.abelian import AbelianLieAlgebra
return AbelianLieAlgebra(R, names, index_set)
elif isinstance(next(iter(arg0.keys())), (list, tuple)):
# We assume it is some structure coefficients
arg1, arg0 = arg0, arg1
if isinstance(arg0, (list, tuple)):
if all(isinstance(x, str) for x in arg0):
# If they are all strings, then it is a list of variables
names = tuple(arg0)
if isinstance(arg0, str):
names = tuple(arg0.split(','))
elif isinstance(names, str):
names = tuple(names.split(','))
# Parse the second argument
if isinstance(arg1, dict):
# Assume it is some structure coefficients
from sage.algebras.lie_algebras.structure_coefficients import LieAlgebraWithStructureCoefficients
return LieAlgebraWithStructureCoefficients(R, arg1, names, index_set, **kwds)
# Otherwise it must be either a free or abelian Lie algebra
if arg1 in ZZ:
if isinstance(arg0, str):
names = arg0
if names is None:
index_set = list(range(arg1))
else:
if isinstance(names, str):
names = tuple(names.split(','))
if arg1 != 1 and len(names) == 1:
names = tuple('{}{}'.format(names[0], i)
for i in range(arg1))
if arg1 != len(names):
raise ValueError("the number of names must equal the"
" number of generators")
#.........这里部分代码省略.........
示例11: WeylGroup
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_affine [as 别名]
def WeylGroup(x, prefix=None):
"""
Returns the Weyl group of type ct.
INPUT:
- ``ct`` - a Cartan Type.
OPTIONAL:
- ``prefix`` - changes the representation of elements from matrices
to products of simple reflections
EXAMPLES: The following constructions yield the same result, namely
a weight lattice and its corresponding Weyl group::
sage: G = WeylGroup(['F',4])
sage: L = G.domain()
or alternatively and equivalently::
sage: L = RootSystem(['F',4]).ambient_space()
sage: G = L.weyl_group()
Either produces a weight lattice, with access to its roots and
weights.
::
sage: G = WeylGroup(['F',4])
sage: G.order()
1152
sage: [s1,s2,s3,s4] = G.simple_reflections()
sage: w = s1*s2*s3*s4; w
[ 1/2 1/2 1/2 1/2]
[-1/2 1/2 1/2 -1/2]
[ 1/2 1/2 -1/2 -1/2]
[ 1/2 -1/2 1/2 -1/2]
sage: type(w) == G.element_class
True
sage: w.order()
12
sage: w.length() # length function on Weyl group
4
The default representation of Weyl group elements is as matrices.
If you prefer, you may specify a prefix, in which case the
elements are represented as products of simple reflections.
::
sage: W=WeylGroup("C3",prefix="s")
sage: [s1,s2,s3]=W.simple_reflections() # lets Sage parse its own output
sage: s2*s1*s2*s3
s1*s2*s3*s1
sage: s2*s1*s2*s3 == s1*s2*s3*s1
True
sage: (s2*s3)^2==(s3*s2)^2
True
sage: (s1*s2*s3*s1).matrix()
[ 0 0 -1]
[ 0 1 0]
[ 1 0 0]
::
sage: L = G.domain()
sage: fw = L.fundamental_weights(); fw
Finite family {1: (1, 1, 0, 0), 2: (2, 1, 1, 0), 3: (3/2, 1/2, 1/2, 1/2), 4: (1, 0, 0, 0)}
sage: rho = sum(fw); rho
(11/2, 5/2, 3/2, 1/2)
sage: w.action(rho) # action of G on weight lattice
(5, -1, 3, 2)
TESTS::
sage: TestSuite(WeylGroup(["A",3])).run()
sage: TestSuite(WeylGroup(["A",3, 1])).run()
sage: W=WeylGroup(['A',3,1])
sage: s=W.simple_reflections()
sage: w=s[0]*s[1]*s[2]
sage: w.reduced_word()
[0, 1, 2]
sage: w=s[0]*s[2]
sage: w.reduced_word()
[2, 0]
"""
if x in RootLatticeRealizations:
return WeylGroup_gens(x, prefix=prefix)
ct = CartanType(x)
if ct.is_affine():
return WeylGroup_gens(ct.root_system().root_space(), prefix=prefix)
else:
return WeylGroup_gens(ct.root_system().ambient_space(), prefix=prefix)
示例12: FundamentalGroupOfExtendedAffineWeylGroup
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_affine [as 别名]
#.........这里部分代码省略.........
1 2 3
B3~
sage: F.special_nodes()
(0, 1)
sage: F = FundamentalGroupOfExtendedAffineWeylGroup("C2"); F
Fundamental group of type ['C', 2, 1]
sage: F.cartan_type().dynkin_diagram()
O=>=O=<=O
0 1 2
C2~
sage: F.special_nodes()
(0, 2)
sage: F = FundamentalGroupOfExtendedAffineWeylGroup("D4"); F
Fundamental group of type ['D', 4, 1]
sage: F.cartan_type().dynkin_diagram()
O 4
|
|
O---O---O
1 |2 3
|
O 0
D4~
sage: F.special_nodes()
(0, 1, 3, 4)
sage: (F(4), F(4)^2)
(pi[4], pi[0])
sage: F = FundamentalGroupOfExtendedAffineWeylGroup("D5"); F
Fundamental group of type ['D', 5, 1]
sage: F.cartan_type().dynkin_diagram()
0 O O 5
| |
| |
O---O---O---O
1 2 3 4
D5~
sage: F.special_nodes()
(0, 1, 4, 5)
sage: (F(5), F(5)^2, F(5)^3, F(5)^4)
(pi[5], pi[1], pi[4], pi[0])
sage: F = FundamentalGroupOfExtendedAffineWeylGroup("E6"); F
Fundamental group of type ['E', 6, 1]
sage: F.cartan_type().dynkin_diagram()
O 0
|
|
O 2
|
|
O---O---O---O---O
1 3 4 5 6
E6~
sage: F.special_nodes()
(0, 1, 6)
sage: F(1)^2
pi[6]
sage: F = FundamentalGroupOfExtendedAffineWeylGroup(['D',4,2]); F
Fundamental group of type ['C', 3, 1]^*
sage: F.cartan_type().dynkin_diagram()
O=<=O---O=>=O
0 1 2 3
C3~*
sage: F.special_nodes()
(0, 3)
We also implement a fundamental group for `GL_n`. It is defined to be the group of integers, which is the
covering group of the fundamental group Z/nZ for affine `SL_n`::
sage: F = FundamentalGroupOfExtendedAffineWeylGroup(['A',2,1], general_linear=True); F
Fundamental group of GL(3)
sage: x = F.an_element(); x
pi[5]
sage: x*x
pi[10]
sage: x.inverse()
pi[-5]
sage: wt = F.cartan_type().classical().root_system().ambient_space().an_element(); wt
(2, 2, 3)
sage: x.act_on_classical_ambient(wt)
(2, 3, 2)
sage: w = WeylGroup(F.cartan_type(),prefix="s").an_element(); w
s0*s1*s2
sage: x.act_on_affine_weyl(w)
s2*s0*s1
"""
cartan_type = CartanType(cartan_type)
if cartan_type.is_finite():
cartan_type = cartan_type.affine()
if not cartan_type.is_affine():
raise NotImplementedError("Cartan type is not affine")
if general_linear is True:
if cartan_type.is_untwisted_affine() and cartan_type.type() == "A":
return FundamentalGroupGL(cartan_type, prefix)
else:
raise ValueError("General Linear Fundamental group is untwisted type A")
return FundamentalGroupOfExtendedAffineWeylGroup_Class(cartan_type,prefix,finite=True)