# Examples

## `Example: example1 (ex-e326da)`

We consider a newform of weight $5$ and level $7$, whose local representation at $7$ is principal series.

```magma
> S := CuspidalSubspace(ModularSymbols(Gamma1(7), 5, 1));
> newforms := NewformDecomposition(S);
> Eigenform(newforms[1], 15);
q + q^2 - 15*q^4 + 49*q^7 - 31*q^8 + 81*q^9 - 206*q^11 + 49*q^14 + O(q^15)
> pi := LocalComponent(newforms[1], 7);
> pi;
Ramified Principal Series Representation of GL(2,Q_7)
> chi := CentralCharacter(pi);
> Conductor(chi);
7
> parameters := PrincipalSeriesParameters(pi);

```

These are Dirichlet characters on ${\mathbb{Z}}/7{\mathbb{Z}}$ (the trivial character and the character of order $2$):

```magma
> Conductor(parameters[1]), Order(parameters[1]);
1 1
> Conductor(parameters[2]), Order(parameters[2]);
7 2

```

The principal series representation $\pi$ is the induction up to ${\operatorname{GL}}_2({\mathbb{Q}}_7)$ of a character of the Borel subgroup inflated from a character of the diagonal group ${\mathbb{Q}}_7^{\times} \times {\mathbb{Q}}_7^{\times}.$ The restriction of this character to ${\mathbb{Z}}_7^{\times} \times {\mathbb{Z}}_7^{\times}$ gives the pair of Dirichlet characters above. We now compute the Galois representation.

```magma
> rho := WeilRepresentation(pi); rho;
2-dim Galois representation (2,0) with G=C2, I=C2, conductor 7^1 over Q7[40]
> IsAbelian(Group(rho));
true

```

The Weil representation is simply the sum of the two characters above (up to unramified twists), considered as characters of the Galois group of ${\mathbb{Q}}_7$ via local class field theory.

```magma
> Decomposition(rho);
[
1-dim trivial Galois representation 1 over Q7[40],
1-dim Galois representation (1,-1) with G=C2, I=C2, conductor 7^1 over Q7[40]
]

```

## `Example: example2 (ex-298b2e)`

We consider a supercuspidal representation of conductor $121$, associated to a newform of weight $2$ and level $121.$

```magma
> S := CuspidalSubspace(ModularSymbols(Gamma0(121), 2, 1));
> newforms := NewformDecomposition(S);
> newforms;
[
Modular symbols space for Gamma_0(121) of weight 2 and dimension 1
   over Rational Field,
Modular symbols space for Gamma_0(121) of weight 2 and dimension 1
   over Rational Field,
Modular symbols space for Gamma_0(121) of weight 2 and dimension 1
   over Rational Field,
Modular symbols space for Gamma_0(121) of weight 2 and dimension 1
   over Rational Field,
Modular symbols space for Gamma_0(121) of weight 2 and dimension 2
   over Rational Field
]
> Eigenform(newforms[2], 11);
q + q^2 + 2*q^3 - q^4 + q^5 + 2*q^6 - 2*q^7 - 3*q^8 + q^9 + q^10 + O(q^11)
> pi := LocalComponent(newforms[2], 11);
> pi;
Supercuspidal Representation of GL(2,Q_11)

```

This means the representation of the Weil group associated to pi is irreducible.

```magma
> Conductor(pi);
121
> W := CuspidalInducingDatum(pi);
> W;
GModule W of dimension 10 over Rational Field

```

$W$ is a module over a group which is a quotient of ${\operatorname{GL}}_2({\mathbb{Z}}_{11}),$ namely ${\operatorname{GL}}_2({\mathbb{Z}}/{11{\mathbb{Z}}}).$ The representation $\pi$ is induced from some extension of $W$ to the open subgroup ${\mathbb{Q}}_{11}^{\times}{\operatorname{GL}}_2({\mathbb{Z}}_{11}).$

```magma
> Group(W);
MatrixGroup(2, IntegerRing(11)) of order 2^4 * 3 * 5^2 * 11
Generators:
[2 0]
[0 1]

[1 1]
[0 1]

[ 0 1]
[10 0]
> Group(W) eq GL(2, Integers(11));
true
> rho:=WeilRepresentation(pi);

```

This gives the full Weil representation attached to $\pi$. The leading factor `Unr(-I)` is the unramified twist by $-1$ from the Loeffler-Weinstein rectifier, which fixes the action of Frobenius.

```magma
> rho;
2-dim Galois representation Unr(-I)*(2,0,-1) with G=S3, I=C3, conductor 11^2
   over Q11[10]

```

Since the Frobenius action is now determined, the local root number is available.

```magma
> RootNumber(rho);
-1

```

## `Example: example3 (ex-3e3aa7)`

We consider a supercuspidal representation of conductor $3^3$, associated to a newform of weight $4$ and level $27$.

```magma
> S := CuspidalSubspace(ModularSymbols(Gamma0(27), 4, 1));
> newforms := NewformDecomposition(S);
> Eigenform(newforms[1], 13);
q + 3*q^2 + q^4 + 15*q^5 - 25*q^7 - 21*q^8 + 45*q^10 - 15*q^11 + O(q^13)
> pi:=LocalComponent(newforms[1], 3);
> pi;
Supercuspidal Representation of GL(2,Q_3)
> W:=CuspidalInducingDatum(pi);
> W;
GModule W of dimension 2 over Rational Field
> Group(W);
MatrixGroup(2, IntegerRing(9)) of order 2^2 * 3^5
Generators:
[1 1]
[0 1]

[2 0]
[0 1]

[1 0]
[0 2]

[1 0]
[3 1]

```

These matrices generate (topologically) the Iwahori subgroup of ${\operatorname{GL}}_2({\mathbb{Z}}_3)$ consisting of matrices which are upper-triangular modulo $3$. $W$ is an irreducible two-dimensional $G$-module. The representation $\pi$ is induced from some extension of $W$ to the normalizer of the Iwahori in ${\operatorname{GL}}_2({\mathbb{Q}}_3)$.

```magma
> E, chi:=AdmissiblePair(pi);
> E;
Totally ramified extension defined by the polynomial x^2 - 3
 over 3-adic ring mod 3^10
> E.1^2;
3
> chi(1+E.1);
-zeta_3 - 1

```

Note that `chi` can only be evaluated on units of $E$, so that `chi(E.1)` would result in an error.

```magma
> WeilRepresentation(pi);
2-dim Galois representation Unr(-1/3*sqrt(3)*i)*(2,0,-1) with G=S3, I=S3, conductor 3^3 over Q3[10]

```
