.. _SectGrpLieOps:

.. _operations:

Operations on Groups of  Lie Type
=================================

Many of the basic operations for Coxeter groups are shortcuts for obtaining
information about the underlying root datum
(Chapter :ref:`ChapRootDtm`). Such functions are listed here; see
Sections :ref:`SectRDOp`, :ref:`SectRDProp`,
:ref:`SectRDRoot`, and :ref:`SectGrpPermCoxOp`
for more details and examples of their use.

G eq H : GrpLie, GrpLie -> BoolElt

Returns ``true`` iff the groups of Lie type :math:`G` and :math:`H` are equal.

G subset H : GrpLie, GrpLie -> BoolElt

Returns ``true`` iff the group of Lie type :math:`G` is a subset of :math:`H`.

IsAlgebraicallyIsomorphic(G, H) : GrpLie, GrpLie -> BoolElt, Map

Returns ``true`` if the semisimple groups :math:`G` and :math:`H` are isomorphic
as algebraic groups (i.e. they have the same base rings and isomorphic root
data). If ``true``, then the second value returned is an isomorphism.

IsIsogenous(G, H) : GrpLie, GrpLie -> BoolElt

Returns ``true`` if :math:`G` and :math:`H` are isogenous. The groups must be
semisimple and defined over the same field. If ``true``, the subsequent values
returned are: the corresponding adjoint group :math:`G_{ad}`, the homomorphisms
:math:`G_{ad}\to G` and :math:`G_{ad}\to H`, the corresponding simply connected
root datum :math:`G_{sc}`, and the homomorphisms :math:`G\to G_{sc}` and
:math:`H\to G_{sc}`.

IsCartanEquivalent(G, H) : GrpLie, GrpLie -> BoolElt

Returns ``true`` if, and only if, the groups of Lie type :math:`G` and :math:`H`
are Cartan equivalent, i.e. they have isomorphic Dynkin diagrams and defined
over the same ring.

BaseRing(G) : GrpLie -> Rng

CoefficientRing(G) : GrpLie -> Rng

The base ring :math:`k` of the group of Lie type :math:`G`.

BaseExtend(G, K) : GrpLie, Rng -> GrpLie, Map

Given a group of Lie type :math:`G` with base ring :math:`k` and a larger ring
:math:`K`, return the group :math:`G(K)` gotten by extending the base ring and
the injection :math:`G\to G(K)`.

ChangeRing(G, K) : GrpLie, Rng -> GrpLie

Given a group of Lie type :math:`G` and a ring :math:`K`, return the group with
the same root datum, but defined over a different ring.

Generators(G) : GrpLie ->

Generators for the group of Lie type :math:`G` as an abstract group. This is
currently only implemented when the base ring is a finite field.

NumberOfGenerators(G) : GrpLie -> RngIntElt

Ngens(G) : GrpLie -> RngIntElt

The number of generators for the group of Lie type :math:`G` as an abstract
group. This is currently only implemented when the base ring is a finite field.

AlgebraicGenerators(G) : GrpLie ->

A set of generators for the group of Lie type :math:`G` as an algebraic group.

NumberOfAlgebraicGenerators(G) : GrpLie -> RngIntElt

Nalggens(G) : GrpLie -> RngIntElt

The number of generators for the group of Lie type :math:`G` as an algebraic
group.

> k<z> := GF(4); > G := GroupOfLieType("A2", k : Normalising:=false); >
Generators(G); [ x1(1) , x4(1) , x1(z) , x4(z) , x2(1) , x5(1) , x2(z) , x5(z) ,
( z 1) , (1 z) ] > AlgebraicGenerators(G); [ x1(1) , x2(1) , x4(1) , x5(1) , ( z
1) , ( 1 z) ]

Order(G) : GrpLie -> RngIntElt

# G : GrpLie -> RngIntElt

The order of the group of Lie type :math:`G`.

FactoredOrder(G) : GrpLie -> RngIntElt

The factored order of the group of Lie type :math:`G`.

Dimension(G) : GrpLie -> RngIntElt

The dimension of the group of Lie type :math:`G`, considered as an algebraic
variety.

> G := GroupOfLieType("G2", 3); > Order(G); 4245696 > FactoredOrder(G); [ <2,
8>, <13, 1>, <3, 6>, <7, 1> ] > G := GroupOfLieType("G2", Rationals()); >
Order(G); Infinity > Dimension(G); 14

CartanName(G) : GrpLie -> Mtrx

The Cartan name of the group of Lie type :math:`G`.

RootDatum(G) : GrpLie -> RootDtm

The root datum of the group of Lie type :math:`G`.

DynkinDiagram(G) : GrpLie ->

Print the Dynkin diagram of the group of Lie type :math:`G`.

CoxeterDiagram(G) : GrpLie ->

Print the Coxeter diagram of the group of Lie type :math:`G`.

CoxeterMatrix(G) : GrpLie -> AlgMatElt

The Coxeter matrix of the group of Lie type :math:`G`.

CoxeterGraph(G) : GrpLie -> GrphUnd

The Coxeter graph of the group of Lie type :math:`G`.

CartanMatrix(G) : GrpLie -> GrphUnd

The Cartan matrix of the group of Lie type :math:`G`.

DynkinDigraph(G) : GrpLie -> GrphUnd

The Dynkin digraph of the group of Lie type :math:`G`.

Rank(G) : GrpLie -> RngIntElt

ReductiveRank(G) : GrpLie -> RngIntElt

The reductive rank of the group of Lie type :math:`G`, i.e. the dimension of the
underlying root datum.

SemisimpleRank(G) : GrpLie -> RngIntElt

The semisimple rank of the group of Lie type :math:`G`, i.e. the rank of the
underlying root datum.

CoxeterNumber(G) : GrpLie -> RngIntElt

The Coxeter number of the group of Lie type :math:`G`, i.e. the order of the
Coxeter element in the Weyl group of :math:`G`.

WeylGroup(G) : GrpLie -> GrpPermCox

WeylGroup(GrpPermCox, G) : Cat, GrpLie -> GrpPermCox

The Weyl group of the group of Lie type :math:`G` as a permutation Coxeter
group. This is a crystallographic Coxeter group, see
Chapter :ref:`ChapGrpPermCox`.

WeylGroup(GrpFPCox, G) : Cat, GrpLie -> GrpFPCox

The Weyl group of the group of Lie type :math:`G` as a finitely presented
Coxeter group. This is a crystallographic Coxeter group, see
Chapter :ref:`ChapGrpFPCox`.

WeylGroup(GrpMat, G) : Cat, GrpLie -> GrpMat

The Weyl group of the group of Lie type :math:`G` as a reflection group. This is
a crystallographic Coxeter group, see Chapter :ref:`ChapGrpRfl`.

FundamentalGroup(G) : GrpLie -> GrpAb, Map

The fundamental group of the group of Lie type :math:`G`, together with the
projection of the weight lattice onto the fundamental group.

IsogenyGroup(G) : GrpLie -> GrpAb, Map

The isogeny group of the group of Lie type :math:`G`, together with its
injection into the fundamental group.

CoisogenyGroup(G) : GrpLie -> GrpAb, Map

The coisogeny group of the group of Lie type :math:`G`, together with its
projection onto the fundamental group.

element-properties
==================

Properties of Groups of Lie Type.

IsFinite(G) : GrpLie -> BoolElt

Return ``true`` if and only if the group of Lie type :math:`G` is finite.

IsAbelian(G) : GrpLie -> BoolElt

Returns ``true`` if the group of Lie type :math:`G` is abelian.

IsSimple(G) : GrpLie -> BoolElt

Returns ``true`` if the group of Lie type :math:`G` is a simple group as an
algebraic group, ie, :math:`G` has no proper *connected* normal subgroups. This
is true if, and only if, the underlying root datum is irreducible. Note that
this does not usually mean that :math:`G` is simple as an abstract group. In
previous releases of Magma this function was incorrectly called
``IsIrreducible``.

IsSimplyLaced(G) : GrpLie-> BoolElt

Returns ``true`` if the group of Lie type :math:`G` is simply laced, i.e. its
Dynkin diagram contains no multiple bonds.

IsSemisimple(G) : GrpLie-> BoolElt

Returns ``true`` if the group of Lie type :math:`G` is semisimple.

(G) : GrpLie -> BoolElt

Returns ``true`` if, and only if, the group of Lie type :math:`G` is adjoint
(i.e. the isogeny group is trivial).

IsWeaklyAdjoint(G) : GrpLie -> BoolElt

Returns ``true`` if, and only if, the group of Lie type :math:`G` is weakly
adjoint, i.e. its isogeny group is isomorphic to :math:`{\mathbb{Z}}^n`, where
:math:`n` is the difference between the rank and the semisimple rank of
:math:`G`. Note that if :math:`G` is semisimple then this function is identical
to .

(G) : GrpLie -> BoolElt

Returns ``true`` if, and only if, the group of Lie type :math:`G` is simply
connected (i.e. the isogeny group is equal to the fundamental group, i.e. the
coisogeny group is trivial).

IsWeaklySimplyConnected(G) : GrpLie -> BoolElt

Returns ``true`` if, and only if, the group of Lie type :math:`G` is weakly
simply connected, i.e. its coisogeny group is isomorphic to
:math:`{\mathbb{Z}}^n`, where :math:`n` is the difference between the rank and
the semisimple rank of :math:`G`. Note that if :math:`G` is semisimple then this
function is identical to .

IsSplit(G) : GrpLie -> BoolElt

Returns ``true`` if and only if the group of Lie type :math:`G` is split.

IsTwisted(G) : GrpLie -> BoolElt

Returns ``true`` if and only if the group of Lie type :math:`G` is twisted.

element-construction
====================

Constructing Elements.

elt<G \| L> : GrpLie, List -> GrpMatElt

Given a group of Lie type :math:`G` over the ring :math:`R` and a list :math:`L`
of appropriate objects, construct an element of :math:`G`. Suppose the
underlying root datum has dimension :math:`d`, rank :math:`n`, and roots
:math:`\alpha_1,\dots,\alpha_{2N}`. Each entry in the list can be one of the
following:

1. A tuple :math:`<r,t>` where :math:`r=1,\dots,2N` and :math:`t\in R`. This
corresponds to the unipotent term :math:`x_r(t)`.

2. A sequence of tuples as in item (1).

3. A sequence :math:`[t_1,\dots,t_N]` of elements of :math:`R`. This is stored
internally as :math:`[t_1,\dots,t_N]` but it represents the unipotent element
:math:`x_{i_1}(t_{i_1})\cdots x_{i_N}(t_{i_N})`, where :math:`i_1`, :math:`i_2`,
…, :math:`i_N` is either :math:`1,2,\dots, N` or the additive order of the
positive roots of :math:`G`. (See below for more details.)

4. An integer :math:`r=1,\dots,2N`. This corresponds to the Weyl group
representative :math:`n_r`.

5. A Weyl group element :math:`w`, either as a word or as a permutation. This
corresponds to the Weyl group representative :math:`\overdot w`.

6. A vector :math:`v\in R^d` with each entry invertible. This corresponds to an
element of the torus.

7. An element of :math:`G`, either previously constructed or (recursively) given
as a list of terms of the forms 1 to 7.

Internally a unipotent component of an element of :math:`G` is stored as a
sequence :math:`[t_1,\dots,t_N]` of field (or ring) elements. This sequence
represents the **sequence** :math:`[x_1(t_1),\dots,x_N(t_N)]` of root elements.
However, its interpretation as a unipotent element depends on the collection
method chosen for the multiplication. If the collection method is
``SymbolicFromOutside`` or ``CollectionFromOutside`` the sequence represents the
product :math:`x_{i_1}(t_{i_1})\cdots x_{i_N}(t_{i_N})` where
:math:`i_1, i_2, \dots, i_N` is ``AdditiveOrder(G)`` (i.e., the Papi order of
the longest element of the Weyl group); for all other collection methods it
represents :math:`x_1(t_1) \cdots x_N(t_N)`.

``CollectionFromOutside`` is the default for non-sparse root data.

Identity(G) : GrpLie -> GrpLieElt

Id(G) : GrpLie -> GrpLieElt

G ! 1 : GrpLie, RngIntElt -> GrpLieElt

elt< G \| > : GrpLie -> GrpLieElt

The identity element of the group of Lie type :math:`G`.

> G := GroupOfLieType("A5", Rationals() : Normalising := false); > V :=
VectorSpace(Rationals(), 5); > NumPosRoots(G); 15 > elt< G \| <5,1/2>, 1,3,2,
[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15], > V![6,1/3,-1,3,2/3] >; x5(1/2) n1 n3 n2
x1(1) x6(6) x10(10) x13(13) x15(15) x2(2) x7(7) x11(11) x14(14) x3(3) x8(8)
x12(12) x4(4) x9(9) x5(5) ( 6 1/3 -1 3 2/3)

TorusTerm(G, r, t) : GrpLie, RngIntElt, RngElt -> GrpLieElt

The torus term :math:`h_r(t)=\alpha_r^\star\otimes t` in the group of Lie type
:math:`G`, where :math:`r` is the index of the coroot :math:`\alpha_r^\star` and
:math:`t` an element of the base ring of :math:`G`.

CoxeterElement(G) : GrpLie -> GrpPermElt

The Coxeter element of the group of Lie type :math:`G`, i.e. the representative
of the Coxeter element in the Weyl group of :math:`G`.

Random(G) : GrpLie -> GrpLieElt

Uniform : BoolElt : ``true``

An element of the (twisted or untwisted) finite group of Lie type :math:`G`
chosen at random. The base ring of :math:`G` must be finite. If the optional
parameter ``Uniform`` is set to ``true``, the random elements to be distributed
uniformly. If the optional parameter ``Uniform`` is set to ``false``, this
function is much faster but the random elements are not distributed uniformly.
Instead each double coset of the Borel subgroup occurs with equal frequency, and
the elements are uniformly distributed within each double coset.

Eltlist(g) : GrpLieElt -> List

The list corresponding to the element :math:`g` of a group of Lie type.

CentrePolynomials(G) : GrpLie ->

CenterPolynomials(G) : GrpLie ->

A set of polynomials which are satisfied by the coordinates of a torus element
:math:`h` of the group of Lie type :math:`G` if, and only if, :math:`h` is in
the centre of :math:`G`.

The centre of a semisimple group is finite, so the centre polynomials can be
used to find all central elements. > G := GroupOfLieType("B3", Rationals() :
Isogeny:="SC"); > pols := CentrePolynomials(G); > pols; -h[2] + h[3]^2, h[1]^2 -
h[2], -h[1]*h[3]^2 + h[2]^2 > S := Scheme(AffineSpace(Rationals(), 3),
Setseq(pols)); > pnts := RationalPoints(S); > pnts; @ (0, 0, 0), (1, 1, -1), (1,
1, 1) @ The rational points of :math:`S` can be converted into elements of
:math:`G`, taking care to eliminate any point which has a coordinate equal to
zero: > V := VectorSpace(Rationals(), 3); > [ elt< G \| V!Eltseq(pnt) > : pnt in
pnts \| &*Eltseq(pnt) ne 0 ]; [ (1 1 -1) , 1 ]

element-operators
=================

Operations on Elements.

.. _element-operators-1:

element-operators
-----------------

Basic Operations.

g \* h : GrpLieElt, GrpLieElt -> GrpLieElt

The product of two elements of a group of Lie type. If the
:ref:`GrpLie:Normalising` flag is set for the group, then
the product is normalised using the algorithms of
:cite:`CohenMurrayTaylor,ComputUnipGrps`. Otherwise, the words are
just concatenated.

If the ``Normalising`` flag is set, the product is normalised, otherwise
multiplication is just concatenation. > G := GroupOfLieType("G2", GF(3) :
Normalising:=false ); > V := VectorSpace(GF(3),2); > g := elt< G \| 1,2,1,2,
V![2,2], <1,2>,<5,1> >; > h := elt< G \| <3,2>, V![1,2], 1 >; > g*h; n1 n2 n1 n2
(2 2) x1(2) x5(1) x3(2) (1 2) n1 > H := GroupOfLieType("G2", GF(3) :
Normalising:=true ); > g := elt< H \| 1,2,1,2, V![2,2], <1,2>,<5,1> >; > h :=
elt< H \| <3,2>, V![1,2], 1 >; > g*h; x2(1) x3(1) (1 2) n1 n2 n1 n2 n1 x4(1)

g -̂1 : GrpLieElt -> GrpLieElt

Inverse(G) : GrpLieElt -> GrpLieElt

The inverse of the element :math:`g` of a group of Lie type.

g n̂ : GrpLieElt, RngIntElt -> GrpLieElt

The :math:`n`\ th power of the element :math:`g` of a group of Lie type.

g ĥ : GrpLieElt, GrpLieElt -> GrpLieElt

The conjugate :math:`h^{-1}gh`, where :math:`g` and :math:`h` are elements of a
group of Lie type.

(g, h) : GrpLieElt, GrpLieElt -> GrpLieElt

Commutator(g, h) : GrpLieElt, GrpLieElt -> GrpLieElt

The commutator :math:`g^{-1}h^{-1}gh` of :math:`g` and :math:`h`, where
:math:`g` and :math:`h` are elements of a group of Lie type.

Normalise(~g) : GrpLieElt ->

Normalize(~g) : GrpLieElt ->

Normalise(g) : GrpLieElt -> GrpLieElt

Normalize(g) : GrpLieElt -> GrpLieElt

Normalise the element :math:`g` of a group of Lie type :math:`G`. The procedural
form is slightly more efficient than the functional form. If the ``Normalise``
flag is set for :math:`G`, this operation has no effect. This uses the
algorithms of :cite:`CohenMurrayTaylor,ComputUnipGrps`.

Arithmetic in groups of Lie type. > k<z> := GF(4); > G := GroupOfLieType("C3",
k); > V := VectorSpace(k, 3); > g := elt< G \| 1,2,3, <3,z>,<4,z^2>, V![1,z^2,1]
>; > g; x7(z^2) x8(z^2) ( z 1 z) n1 n2 n3 x3(z) x6(z^2) > h := elt< G \|
[0,1,z,1,0,z^2,1,1,z] >; > h; x3(z) x7(1) x6(z^2) x8(1) x9(z) x2(1) x4(1) > g \*
h^-1; x3(z) x7(z^2) x6(z) x8(1) ( z 1 z) n1 n2 n3 x5(z) x6(z) > g^3; x3(z) x5(z)
x7(z^2) x8(z^2) (z^2 z^2 z^2) n1 n2 n1 n3 n2 n1 n3 n2 n3 x3(z) x5(z^2) x7(z)
x6(1) x8(z^2) x2(z) x4(1) x1(z)

decompositions
--------------

Decompositions.

Bruhat(g) : GrpLieElt -> GrpLieElt, GrpLieElt, GrpLieElt, GrpLieElt

Given an element :math:`g` of a group of Lie type the Bruhat decomposition of
:math:`g` is returned. The function returns elements :math:`u`, :math:`h`,
:math:`\overdot w`, :math:`u'` with the properties described in
Subsection :ref:`SubsectGrpLieBruhat` and so that
:math:`g=uh\overdot wu'`.

> k<z> := GF(4); > G := GroupOfLieType("C3", k); > V := VectorSpace(k, 3); > g
:= elt< G \| 1,2,3, <3,z>,<4,z^2>, V![1,z^2,1] >; > Normalise(g); x7(z^2)
x8(z^2) ( z 1 z) n1 n2 n3 x3(z) x6(z^2) > u, h, w, up := Bruhat(g); > u; h; w;
up; x7(z^2) x8(z^2) ( z 1 z) n1 n2 n3 x3(z) x6(z^2)

MultiplicativeJordanDecomposition(x)

MultiplicativeJordanDecomposition(x) : GrpLieElt -> GrpLieElt, GrpLieElt

The multiplicative Jordan decomposition of the element :math:`x` of the group of
Lie type.

conjugacy-cohomology
--------------------

Conjugacy and Cohomology.

ConjugateIntoTorus(g) : GrpLieElt -> GrpLieElt, GrpLieElt

Given a semisimple element :math:`g` in a finite group of Lie type, return a
torus element :math:`t` and conjugator :math:`x` such that :math:`t=xgx^{-1}`.
The elements returned may be defined over a larger field than the input element.

ConjugateIntoBorel(g) : GrpLieElt -> GrpLieElt, GrpLieElt

Given a semisimple element :math:`g` in a finite group of Lie type, return a
Borel element :math:`b` and conjugator :math:`x` such that :math:`b=xgx^{-1}`.
The elements returned may be defined over a larger field that the input element.
Although any element of a group of Lie type can be conjugated into the Borel
subgroup, this function is currently only implemented for semisimple elements.

Lang(c, q) : GrpLieElt, RngIntElt -> GrpLieElt

Given an element :math:`c` in a finite group of Lie type and :math:`q` a power
of the characteristic, return a solution :math:`a` of the Lang equation
:math:`c = a^{-F} a`. Here :math:`F` is the Frobenius automorphism gotten by
taking :math:`q`\ th powers in the field.

more-element-operators
======================

Properties of Elements.

IsSemisimple(x) : GrpLieElt -> BoolElt

Return ``true`` if, and only if, the element :math:`x` of the group of Lie type
is semisimple.

IsUnipotent(x) : GrpLieElt -> BoolElt

Return ``true`` if, and only if, the element :math:`x` of the group of Lie type
is unipotent.

IsCentral(x) : GrpLieElt -> BoolElt

Return ``true`` if, and only if, the element :math:`x` of the group of Lie type
is in the centre of its parent group.

roots-coroots-weights
=====================

Roots, Coroots and Weights.

The roots are stored as an indexed set

.. math:: \{@\; \alpha_1,\dots,\alpha_N,\alpha_{N+1},\dots,\alpha_{2N} \; @\},

where :math:`\alpha_1,\dots,\alpha_N` are the positive roots in an order
compatible with height; and :math:`\alpha_{N+1},\dots,\alpha_{2N}` are the
corresponding negative roots (i.e. :math:`\alpha_{i+N}=-\alpha_i`). The simple
roots are :math:`\alpha_1,\dots,\alpha_n` where :math:`n` is the rank.

Many of these functions have an optional argument ``Basis`` which may take one
of the following values

1. ``"Standard"``: the standard basis for the (co)root space. This is the
default.

2. ``"Root"``: the basis of simple (co)roots.

3. ``"Weight"``: the basis of fundamental (co)weights (see
Subsection :ref:`SubsectRDRootWeight` below).

.. _SubsectGrpLieRootAccess:

.. _access:

Accessing Roots and Coroots
---------------------------

.. magma:function:: RootSpace(G)
   :input_types: GrpLie
   :output_types: Lat
   :label: RootSpace_GrpLie

.. magma:function:: CorootSpace(G)
   :input_types: GrpLie
   :output_types: Lat
   :label: CorootSpace_GrpLie

   The lattice containing the (co)roots of the group of Lie type :math:`G`.

.. magma:function:: SimpleRoots(G)
   :input_types: GrpLie
   :output_types: Mtrx
   :label: SimpleRoots_GrpLie

.. magma:function:: SimpleCoroots(G)
   :input_types: GrpLie
   :output_types: Mtrx
   :label: SimpleCoroots_GrpLie

   The simple (co)roots of the group of Lie type :math:`G` as the rows of a matrix.

.. magma:function:: NumberOfPositiveRoots(G)
   :input_types: GrpLie
   :output_types: RngIntElt
   :label: NumberOfPositiveRoots_GrpLie

.. magma:function:: NumPosRoots(G)
   :input_types: GrpLie
   :output_types: RngIntElt
   :label: NumPosRoots_GrpLie

   The number of positive roots of the group of Lie type :math:`G`.

.. magma:function:: Roots(G)
   :input_types: GrpLie
   :output_types: $\{@@\}$
   :label: Roots_GrpLie

.. magma:function:: Coroots(G)
   :input_types: GrpLie
   :output_types: $\{@@\}$
   :label: Coroots_GrpLie

Basis : MonStgElt : “Standard"

An indexed set containing the (co)roots of the group of Lie type :math:`G`.

.. magma:function:: PositiveRoots(G)
   :input_types: GrpLie
   :output_types: $\{@@\}$
   :label: PositiveRoots_GrpLie

.. magma:function:: PositiveCoroots(G)
   :input_types: GrpLie
   :output_types: $\{@@\}$
   :label: PositiveCoroots_GrpLie

Basis : MonStgElt : “Standard"

An indexed set containing the positive (co)roots of the group of Lie type
:math:`G`.

.. magma:function:: Root(G, r)
   :input_types: GrpLie, RngIntElt
   :output_types: $\{@@\}$
   :label: Root_GrpLie_RngIntElt

.. magma:function:: Coroot(G, r)
   :input_types: GrpLie, RngIntElt
   :output_types: $\{@@\}$
   :label: Coroot_GrpLie_RngIntElt

Basis : MonStgElt : “Standard"

The :math:`r`\ th (co)root of the group of Lie type :math:`G`.

.. magma:function:: RootPosition(G, v)
   :input_types: GrpLie, .
   :output_types: $\{@@\}$
   :label: RootPosition_GrpLie

.. magma:function:: CorootPosition(G, v)
   :input_types: GrpLie, .
   :output_types: $\{@@\}$
   :label: CorootPosition_GrpLie

Basis : MonStgElt : “Standard"

If :math:`v` is a (co)root of the group of Lie type :math:`G`, this returns its
position; otherwise it returns 0.

.. magma:example:: Example: Roots Coroots
   :label: RootsCoroots

   .. code-block:: magma

      > G := GroupOfLieType("A3", 25 : Isogeny := 2);
      > Roots(G);
      {@
      \    (1 0 0),
      \    (0 1 0),
      \    (1 0 2),
      \    (1 1 0),
      \    (1 1 2),
      \    (2 1 2),
      \    (-1  0  0),
      \    (0 -1  0),
      \    (-1  0 -2),
      \    (-1 -1  0),
      \    (-1 -1 -2),
      \    (-2 -1 -2)
      @}
      > PositiveCoroots(G);
      {@
      \    (2 -1 -1),
      \    (-1  2  0),
      \    (0 -1  1),
      \    (1  1 -1),
      \    (-1  1  1),
      \    (1 0 0)
      @}
      > #Roots(G) eq 2*NumPosRoots(G);
      true
      %%a> assert $1;
      > Coroot(G, 4);
      (1  1 -1)
      > Coroot(G, 4 : Basis := "Root");
      (1 1 0)
      > CorootPosition(G, [1,1,-1]);
      4
      %%a> assert $1 eq 4;
      > CorootPosition(G, [1,1,0] : Basis := "Root");
      4
      %%a> assert $1 eq 4;

.. magma:function:: HighestRoot(G)
   :input_types: GrpLie
   :output_types: LatElt
   :label: HighestRoot_GrpLie

.. magma:function:: HighestLongRoot(G)
   :input_types: GrpLie
   :output_types: LatElt
   :label: HighestLongRoot_GrpLie
   :parameters: Basis : MonStgElt : ``Standard"

   The unique (long) root of greatest height in the root datum of the group of Lie
   type :math:`G`.

.. magma:function:: HighestShortRoot(G)
   :input_types: GrpLie
   :output_types: LatElt
   :label: HighestShortRoot_GrpLie
   :parameters: Basis : MonStgElt : ``Standard"

   The unique short root of greatest height in the root datum of the group of Lie
   type :math:`G`.

.. magma:example:: Example: Heighest Roots
   :label: HeighestRoots

   .. code-block:: magma

      > G := GroupOfLieType("G2", RealField());
      > HighestRoot(G);
      (3 2)
      > HighestLongRoot(G);
      (3 2)
      > HighestShortRoot(G);
      (2 1)

.. _SubectGrpLieRootAction:

.. _rootrefl:

Reflections
-----------

The reflections in the Weyl group have representatives in the group of Lie type.

.. magma:function:: Reflections(G)
   :input_types: GrpLie
   :output_types: GrpLieElt
   :label: Reflections_GrpLie

   The sequence of representatives of reflections in the group of Lie type
   :math:`G`.

.. magma:function:: Reflection(G, r)
   :input_types: GrpLie, RngIntElt
   :output_types: GrpLieElt
   :label: Reflection_GrpLie_RngIntElt

   The representative of the reflections in the :math:`r`\ th root in the group of
   Lie type :math:`G`.

.. magma:example:: Example: Reflections
   :label: Reflections

   .. code-block:: magma

      > G := GroupOfLieType("A2", Rationals());
      > Reflections(G);
      [ n1 , n2 , n1 n2 n1  ]

.. _SubsectRDRootOp:

.. _ops-root-coroot:

Operations and Properties for Root and Coroot Indices
-----------------------------------------------------

.. magma:function:: RootHeight(G, r)
   :input_types: GrpLie, RngIntElt
   :output_types: RngIntElt
   :label: RootHeight_GrpLie_RngIntElt

.. magma:function:: CorootHeight(G, r)
   :input_types: GrpLie, RngIntElt
   :output_types: RngIntElt
   :label: CorootHeight_GrpLie_RngIntElt

   The height of the :math:`r`\ th (co)root of the group of Lie type :math:`G`,
   i.e. the sum of the coefficients of :math:`\alpha_r`
   (resp. :math:`\alpha_r^\star`) with respect to the simple (co)roots.

.. magma:function:: RootNorms(G)
   :input_types: GrpLie
   :output_types: [RngIntElt]
   :label: RootNorms_GrpLie

.. magma:function:: CorootNorms(G)
   :input_types: GrpLie
   :output_types: [RngIntElt]
   :label: CorootNorms_GrpLie

   The sequence of squares of the lengths of the (co)roots of the group of Lie type
   :math:`G`.

.. magma:function:: RootNorm(G, r)
   :input_types: GrpLie, RngIntElt
   :output_types: RngIntElt
   :label: RootNorm_GrpLie_RngIntElt

.. magma:function:: CorootNorm(G, r)
   :input_types: GrpLie, RngIntElt
   :output_types: RngIntElt
   :label: CorootNorm_GrpLie_RngIntElt

   The square of the length of the :math:`r`\ th (co)root of the group of Lie type
   :math:`G`.

.. magma:function:: IsLongRoot(G, r)
   :input_types: GrpLie, RngIntElt
   :output_types: BoolElt
   :label: IsLongRoot_GrpLie_RngIntElt

   Returns ``true`` if, and only if, the :math:`r`\ th root of the group of Lie
   type :math:`G` is long, i.e. the :math:`r`\ th coroot is short.

.. magma:function:: IsShortRoot(G, r)
   :input_types: GrpLie, RngIntElt
   :output_types: BoolElt
   :label: IsShortRoot_GrpLie_RngIntElt

   Returns ``true`` if, and only if, the :math:`r`\ th root of the group of Lie
   type :math:`G` is short, i.e. the :math:`r`\ th coroot is long.

.. magma:function:: AdditiveOrder(G)
   :input_types: GrpLie
   :output_types: SeqEnum
   :label: AdditiveOrder_GrpLie

   The additive order on the positive roots of the group of Lie type :math:`G`
   equal to the Papi order of the longest word :math:`w_0` of the Weyl group of
   :math:`G`; it corresponds to the order of roots in a reduced expression for
   :math:`w_0`. If :math:`\alpha_r`, :math:`\alpha_s` and :math:`\alpha_t` are
   positive roots and :math:`\alpha_r+\alpha_s=\alpha_t`, then :math:`t` lies
   between :math:`r` and :math:`s`. It is computed using the techniques of
   :cite:`Papi`.

.. magma:example:: Example: Additive Order
   :label: AdditiveOrder

   .. code-block:: magma

      > G := GroupOfLieType("A5", GF(3));
      > a := AdditiveOrder(G);
      > Position(a, 2);
      6
      %%a> assert $1 eq 6;
      > Position(a, 3);
      10
      %%a> assert $1 eq 10;

.. _SubsectGrpLieRootWeight:

.. _weights:

Weights
-------

.. magma:function:: WeightLattice(G)
   :input_types: GrpLie
   :output_types: Lat
   :label: WeightLattice_GrpLie

.. magma:function:: CoweightLattice(G)
   :input_types: GrpLie
   :output_types: Lat
   :label: CoweightLattice_GrpLie

   The (co)weight lattice of the group of Lie type :math:`G`.

.. magma:function:: FundamentalWeights(G)
   :input_types: GrpLie
   :output_types: Mtrx
   :label: FundamentalWeights_GrpLie

.. magma:function:: FundamentalCoweights(G)
   :input_types: GrpLie
   :output_types: Mtrx
   :label: FundamentalCoweights_GrpLie

Basis : MonStgElt : “Standard"

The fundamental (co)weights of the group of Lie type :math:`G` as the rows of a
matrix.

.. magma:function:: DominantWeight(G, v)
   :input_types: GrpLie, .
   :output_types: ModTupFldElt, GrpFPCoxElt
   :label: DominantWeight_GrpLie
   :parameters: Basis : MonStgElt : ``Standard"

   The unique dominant weight in the same :math:`W`-orbit as :math:`v`, where
   :math:`W` is the Weyl group of :math:`G` and :math:`v` is a weight given as a
   vector or a sequence representing a vector. The second value returned is a Weyl
   group element taking :math:`v` to the dominant weight.
