# 81.1 Hecke

`Hecke( W , [parameter(s), [sqrtparameter(s)]] )`

`Hecke( rec )`

Constructs the Iwahori-Hecke algebra H of the given Coxeter group. parameters can be either a vector of length `W.semisimpleRank`, giving the parameter for each fundamental reflection, or a single value which is taken as the common parameter. Similarly, if given, sqrtparameter specifies the list of the roots of the parameters, or is a single value which specifies the root of the single value given as a parameter. If parameters are not given, they are assumed to be equal to 1. The Iwahori-Hecke algebra then degenerates to the group algebra of the Coxeter group.

The reason sqrtparameter may have to be given is that certain operations on the algebra require taking such square roots (like the character values of algebras of type E_7, E_8, or two-parameter G_2). Moreover, even if we had wanted to make a standard choice of a square root this would have been impossible because GAP is unable to take the square root of an arbitrary value (such as an indeterminate).

The second form takes as an argument a record which has a field `hecke` and returns the value of this field. This is used to return the Hecke algebra of objects derived from Hecke algebras, such as Hecke elements in various bases.

```    gap> W := CoxeterGroup( "B", 3 );
CoxeterGroup("B", 3)
gap> u := X( Rationals );; u.name := "u";;```

One parameter algebra without and with specifying square roots:

```    gap> H := Hecke( W, u );
Hecke(CoxeterGroup("B", 3),[ u, u, u ],[  ])
gap> H := Hecke( W, u^2, u );
Hecke(CoxeterGroup("B", 3),[ u^2, u^2, u^2 ],[ u, u, u ])
gap> H := Hecke( W, [ u^6, u^4, u^4 ], [ u^3, -u^2, -u^2 ] );
Hecke(CoxeterGroup("B", 3),[ u^6, u^4, u^4 ],[ u^3, -u^2, -u^2 ])```

The parameters do not have to be indeterminates:

```    gap> H := Hecke( W, 9, 3 );
Hecke(CoxeterGroup("B", 3),[ 9, 9, 9 ],[ 3, 3, 3 ])
gap> H := Hecke( W, [ u^6, u^4, u^8] );
Error, Hecke algebra parameters should be equal for conjugate
reflections in Hecke( W, [ u^6, u^4, u^8 ] )) called from main loop
brk> ```

This function requires the package "chevie" (see RequirePackage).

GAP 3.4.4
April 1997