# Creating Galois Representations

## `ZeroRepresentation(K): FldPad -> GalRep`

Galois representation $0$ over a $p$-adic field $K$. It is 0-dimensional, and $0+A=A$, $0\otimes A=0$ for every Galois representation $A$.

## `Example: Galrep Zerorepresentation (ex-153a0b)`

```magma
> K:=pAdicField(3,20);
> zero:=ZeroRepresentation(K);
> zero;
Galois representation 0 with G=C1, I=C1 over Q3[20]
> zero + CyclotomicCharacter(K) eq CyclotomicCharacter(K);
true
> zero*CyclotomicCharacter(K) eq zero;
true

```

## `PrincipalCharacter(K): FldPad -> GalRep`

Principal character $1$ of the absolute Galois group of $K$, as a Galois representation. It is a 1-dimensional unramified representation, same as `UnramifiedCharacter(K,1)`. Thus $1\otimes A=1$ for every Galois representation $A$.

## `Example: Galrep Principalcharacter (ex-48649a)`

Take $K={\mathbb{Q}}_3$, and $F/K$ the unramified extension of degree 4, so that $G=\mathop{\rm Gal}\nolimits(F/K)\cong C_4$. The 4 irreducible representations of $G$ can be viewed as Galois representations, and the first one of these is the principal character (for any group).

```magma
> K:=pAdicField(3,20);
> one:=PrincipalCharacter(K);
> one;
1-dim trivial Galois representation 1 over Q3[20]
> F:=ext<K|4>;
> A1,A2,A3,A4:=Explode(GaloisRepresentations(F,K));
> A1 eq one;
true

```

## `CyclotomicCharacter(K): FldPad -> GalRep`

Cyclotomic character over $K$. It is an unramified character (trivial on inertia) and takes the value $q$, the size of the residue field of $K$, on any Frobenius element.

## `Example: Galrep Cyclotomiccharacter (ex-4a5d9f)`

```magma
> K:=pAdicField(3,20);
> chi:=CyclotomicCharacter(K);
> chi,EulerFactor(chi);
1-dim unramified Galois representation Unr(1/3) over Q3[20]
-1/3*x + 1
> chi^3,EulerFactor(chi^3);
1-dim unramified Galois representation Unr(1/27) over Q3[20]
-1/27*x + 1

```

## `UnramifiedCharacter(K, c): FldPad, Any -> GalRep`

Galois representation over $K$ given by an unramified character that sends the arithmetic Frobenius element $\mathop{\rm Frob}\nolimits_K\mapsto c^{-1}$ (and, so, the geometric Frobenius element $\mathop{\rm Frob}\nolimits_K^{-1}\mapsto c$.) The parameter $c$ must be a non-zero complex number.

## `Example: Galrep Unramifiedcharacter (ex-6bab13)`

```magma
> K:=pAdicField(3,20);
> assert UnramifiedCharacter(K,1) eq PrincipalCharacter(K);
> assert UnramifiedCharacter(K,1/3) eq CyclotomicCharacter(K);
> C<i>:=ComplexField();
> UnramifiedCharacter(K,2+i);
1-dim unramified Galois representation Unr(2+i) over Q3[20]

```

## `UnramifiedRepresentation(K, CharPoly): FldPad, RngUPolElt -> GalRep`

Unique unramified Galois representation $\rho$ over $K$ with Euler factor $\det(1-\mathop{\rm Frob}\nolimits_K^{-1}|\rho)={\rm CharPoly}$.

## `Example: Galrep Unramifiedrepresentation (ex-b1231d)`

```magma
> K:=pAdicField(37,20);
> R<x>:=PolynomialRing(Rationals());
> rho:=UnramifiedRepresentation(K,(1-37*x)*(1-3*x));
> rho;
2-dim unramified Galois representation Unr(1-40*x+111*x^2) over Q37[20]
> rho eq CyclotomicCharacter(K)^(-1)+UnramifiedCharacter(K,3);
true

```

## `UnramifiedRepresentation({K,dim,}{dimcomputed,CharPoly}): FldPad, RngIntElt, RngIntElt, RngUPolElt -> GalRep`

Unramified Galois representation over $K$ of dimension *dim*, with Euler factor *CharPoly* computed up to and inclusive degree *dimcomputed*.

## `Example: Galrep Notfullycomputed (ex-f653e8)`

Consider the hyperelliptic curve $C: y^2=x^5+x+1$ over the $p$-adic field ${\mathbb{Q}}_{10007}$.

```magma
> _<x>:=PolynomialRing(Rationals());
> p:=10007;
> K:=pAdicField(p,20);
> _<X>:=PolynomialRing(K);
> C:=HyperellipticCurve(X^5+X+1); C;
Hyperelliptic Curve defined by y^2 = x^5 + O(10007^20)*x^4 + O(10007^20)*x^3 +
   O(10007^20)*x^2 + x + 1 + O(10007^20) over pAdicField(10007, 20)

```

The Galois representation $A$ associated to $H^1(C)$ is unramified, of dimension 4, and could be defined by

`UnramifiedRepresentation(K,1-ap*x+bp*x^2-p*ap+p^2);`

if we find $a_p$ and $b_p$ by counting points of $C$ over ${\mathbb{F}}_p$ and ${\mathbb{F}}_{p^2}$. The coefficient $a_p$ can be computed very quickly:

```magma
> k:=ResidueClassField(Integers(K));
> _<X>:=PolynomialRing(k);
> Ck:=HyperellipticCurve(X^5+X+1);
> ap:=p+1-#Ck; ap;
-21

```

However, $b_p$ would take a long time. If we are only interested in working with $A$ up to degree 1 (e.g. to compute $L$-series of $C/{\mathbb{Q}}$ with $<10^8$ terms), there is no reason to compute it. Instead, we can define an unramified Galois representation of degree 4, which is known to be computed only up to degree 1:

```magma
> A:=UnramifiedRepresentation(K,4,1,1-ap*x);
> A;
4-dim unramified Galois representation Unr(1+21*x+O(x^2)) over Q10007[20]

```

One can still take direct sums, and tensor products of such representations with (possibly ramified) Galois representations, and the Euler factors will still be correct up to degree 1:

```magma
> A*A;
16-dim unramified Galois representation Unr(1-441*x+O(x^2)) over Q10007[20]
> EulerFactor(A*A+1/CyclotomicCharacter(K));
-10448*x + 1

```

## `SP(K, n): FldPad, RngIntElt -> GalRep`

The $n$-dimensional indecomposable Galois representation `SP(n)` over a $p$-adic field $K$; see §[Notation and Printing](overview.md#galrep-printing) for its description.

## `Example: Galrep Sp (ex-8d3d78)`

```magma
> K:=pAdicField(3,20);
> SP(K,1) eq PrincipalCharacter(K);
true
> rho:=SP(K,2); rho;
2-dim Galois representation SP(2) over Q3[20]
> Degree(rho);
2
> Semisimplification(rho);
2-dim unramified Galois representation Unr(1-4/3*x+1/3*x^2) over Q3[20]
> $1 eq PrincipalCharacter(K)+CyclotomicCharacter(K);
true
> InertiaInvariants(rho);
1-dim unramified Galois representation Unr(1/3) over Q3[20]
> EulerFactor(rho);
-1/3*x + 1

```

## `SP(K, f, n): FldPad, RngUPolElt, RngIntElt -> GalRep`

Unramified twist $\psi\otimes{\hbox{\tt SP}(n)}$ over a $p$-adic field $K$, with $\psi$ specified by its Euler factor $f$.

## `Example: Galrep Sp 1 (ex-3bd7e7)`

```magma
> K:=pAdicField(2,20);
> R<x>:=PolynomialRing(Rationals());
> SP(K,1-x^2,2);
4-dim Galois representation Unr(1-x^2)*SP(2) over Q2[20]
> $1*$1;     // Tensor product with itself
16-dim Galois representation Unr(1-1/2*x^2+1/16*x^4) + Unr(1-2*x^2+x^4)*SP(3)
   over Q2[20]

```

## Representations from Finite Extensions

### `GaloisRepresentations(F, K): FldPad, FldPad -> SeqEnum[GalRep]`

For a $p$-adic extension $F/K$, compute all irreducible Galois representations that factor through the (Galois closure of) $F/K$.

### `Example: Galrep Galoisrepresentations 1 (ex-314f0e)`

We take $F$ to be a degree 16 dihedral extension of $K={\mathbb{Q}}_2$, and compute the irreducible characters of $\mathop{\rm Gal}\nolimits(F/K)$, viewed as Galois representations over $K$.

```magma
> K:=pAdicField(2,20);
> R<x>:=PolynomialRing(K);
> F:=ext<K|x^8+2>;
> list:=GaloisRepresentations(F,K);
> list;
[
1-dim trivial Galois representation 1 over Q2[20],
1-dim Galois representation (1,1,-1,-1,1,1,1) with G=D8, I=D8, conductor 2^2
   over Q2[20],
1-dim Galois representation (1,1,-1,1,1,-1,-1) with G=D8, I=D8, conductor 2^3
   over Q2[20],
1-dim Galois representation (1,1,1,-1,1,-1,-1) with G=D8, I=D8, conductor 2^3
   over Q2[20],
2-dim Galois representation (2,2,0,0,-2,0,0) with G=D8, I=D8, conductor 2^8
   over Q2[20],
2-dim Galois representation (2,-2,0,0,0,-zeta(8)_8^3+zeta(8)_8,
   zeta(8)_8^3-zeta(8)_8) with G=D8, I=D8, conductor 2^10 over Q2[20],
2-dim Galois representation (2,-2,0,0,0,zeta(8)_8^3-zeta(8)_8,
   -zeta(8)_8^3+zeta(8)_8) with G=D8, I=D8, conductor 2^10 over Q2[20]
]

```

The first 5 characters are not faithful, and we can descend them to smaller quotients of $\mathop{\rm Gal}\nolimits(F/K)$.

```magma
> min:=[Minimize(rho): rho in list | not IsFaithful(Character(rho))];
> min;
[
1-dim trivial Galois representation 1 over Q2[20],
1-dim Galois representation (1,-1) with G=C2, I=C2, conductor 2^2 over Q2[20],
1-dim Galois representation (1,-1) with G=C2, I=C2, conductor 2^3 over Q2[20],
1-dim Galois representation (1,-1) with G=C2, I=C2, conductor 2^3 over Q2[20],
2-dim Galois representation (2,-2,0,0,0) with G=D4, I=D4, conductor 2^8
   over Q2[20]
]

```

### `GaloisRepresentations(f): RngUPolEltFldPad -> SeqEnum[GalRep]`

For a polynomial $f$ over a $p$-adic field $K$ and splitting field $F$, returns irreducible representations of $\mathop{\rm Gal}\nolimits(F/K)$.

### `Example: Galrep Galoisrepresentations (ex-da3085)`

We construct 4 one-dimensional characters of ${\mathbb{Q}}_2(\zeta_8)/{\mathbb{Q}}_2$.

```magma
> K:=pAdicField(2,20);
> R:=PolynomialRing(K);
> GaloisRepresentations(R!CyclotomicPolynomial(8));
[
1-dim trivial Galois representation 1 over Q2[20],
1-dim Galois representation (1,-1,1,-1) with G=C2^2, I=C2^2, conductor 2^3
   over Q2[20],
1-dim Galois representation (1,1,-1,-1) with G=C2^2, I=C2^2, conductor 2^2
   over Q2[20],
1-dim Galois representation (1,-1,-1,1) with G=C2^2, I=C2^2, conductor 2^3
   over Q2[20]
]

```

### `PermutationCharacter(F, K): FldPad, FldPad -> GalRep`

For a $p$-adic extension $F/K$, compute ${\mathbb{C}}[\mathop{\rm Gal}\nolimits(\bar{K}/K)/\mathop{\rm Gal}\nolimits(\bar{K}/F)]$ as a Galois representation over $K$ of degree $[F:K]$.

### `Example: Galrep Permutationcharacter (ex-ba722b)`

Take $K={\mathbb{Q}}_2$ and $F={\mathbb{Q}}_2(\root 3 \of 2)$. Then `PermutationCharacter(F,K)` is a 3-dimensional representation which is the trivial representation plus a 2-dimensional irreducible one.

```magma
> K:=pAdicField(2,20);
> R<x>:=PolynomialRing(K);
> F:=ext<K|x^3-2>;
> PermutationCharacter(F,K);
3-dim Galois representation (3,1,0) with G=S3, I=C3, conductor 2^2 over Q2[20]
> $1 - PrincipalCharacter(K);
2-dim Galois representation (2,0,-1) with G=S3, I=C3, conductor 2^2 over Q2[20]

```

### `A !! chi: GalRep, AlgChtrElt -> GalRep`

### `A !! chi: GalRep, SeqEnum -> GalRep`

Change a Galois representation by a finite representation with character $\chi$, which must be a character of `Group(A)`, or a list of values that determine such a character.

### `Example: Galrep Smash (ex-b9793f)`

Take $K={\mathbb{Q}}_2$ and $F={\mathbb{Q}}_2(\root 3 \of 2)$, so that $G=\mathop{\rm Gal}\nolimits(F/K)\cong S_3$. Using `!!` we can start with any Galois representation whose finite part comes from this Galois group, and replace it by any other character of $G$.

```magma
> K:=pAdicField(2,20);
> R<x>:=PolynomialRing(K);
> F:=ext<K|x^3-2>;
> rho:=PermutationCharacter(F,K);
> rho!![1,1,1];
1-dim trivial Galois representation 1 over Q2[20]
> rho!![6,0,0];
6-dim Galois representation (6,0,0) with G=S3, I=C3, conductor 2^4 over Q2[20]
> rho!![0,0,0];   // but not [-1,0,0] - may not be virtual
Galois representation 0 with G=S3, I=C3 over Q2[20]

```

## Local Representations of Global Objects

### `GaloisRepresentation(chi, p): GrpDrchElt, RngIntElt -> GalRep`

```magma
Precision: RngIntElt                    Default: 40
```

Local Galois representation at $p$ of a Dirichlet character $\chi$.

### `Example: Galrep Dirichlet (ex-a9f044)`

Local components of a Dirichet character $\chi$ of order 6 at $p=2,3,7$.

```magma
> G<chi>:=FullDirichletGroup(7);
> GaloisRepresentation(chi,2);
1-dim unramified Galois representation (1,-zeta(3)_3-1,zeta(3)_3)
   with G=C3, I=C1 over Q2[40]
> GaloisRepresentation(chi,3);
1-dim unramified Galois representation (1,-1,-zeta(3)_3-1,zeta(3)_3,-zeta(3)_3,
   zeta(3)_3+1) with G=C6, I=C1 over Q3[40]
> GaloisRepresentation(chi,7);
1-dim Galois representation (1,-1,-zeta(3)_3-1,zeta(3)_3,-zeta(3)_3,zeta(3)_3+1)
   with G=C6, I=C6, conductor 7^1 over Q7[40]

```

By our convention, the character $\chi$, the associated Artin representation, and the Galois representations associated to them all have the same Euler factors.

```magma
> loc1:=EulerFactor(chi,2);
> loc2:=EulerFactor(ArtinRepresentation(chi),2);
> loc3:=EulerFactor(GaloisRepresentation(chi,2));
> loc4:=EulerFactor(GaloisRepresentation(ArtinRepresentation(chi),2));
> [PolynomialRing(ComplexField(5))| loc1,loc2,loc3,loc4];
[
(0.50000 - 0.86603*$.1)*$.1 + 1.0000,
(0.50000 - 0.86603*$.1)*$.1 + 1.0000,
(0.50000 - 0.86603*$.1)*$.1 + 1.0000,
(0.50000 - 0.86603*$.1)*$.1 + 1.0000
]

```

### `GaloisRepresentation(A, p): ArtRep, RngIntElt -> GalRep`

```magma
Precision: RngIntElt                    Default: 40
Minimize : BoolElt                      Default: false
```

Local Galois representation at $p$ of an Artin representation $A$. This is the representation of a decomposition group at $p$ of $\mathop{\rm Gal}\nolimits(\bar {\mathbb{Q}}/{\mathbb{Q}})$ on the *dual* vector space of $A$. (The reason for the dual is that, by our convention, the global and the local Euler factors agree; see §[Conventions](overview.md#galrep-conventions) and Example [Example: Galrep Dirichlet](#example-ex-a9f044).) If `Minimize` is `true`, choose the field through which it factors to be as small as possible (automatic for faithful representations).

### `Example: Galrep Artin (ex-e01700)`

Local components of an Artin representation. We take the Trinks’ polynomial $x^7-7x-3$ with Galois group PSL$(2,7)$ over ${\mathbb{Q}}$, one of its 7-dimensional representations $A$ of conductor $3^87^8$, and compute its local components over ${\mathbb{Q}}_2$, ${\mathbb{Q}}_3$, ${\mathbb{Q}}_5$ and ${\mathbb{Q}}_7$.

```magma
> R<x>:=PolynomialRing(Rationals());
> K:=NumberField(x^7-7*x-3);
> GroupName(GaloisGroup(K));
PSL(2,7)
> A:=ArtinRepresentations(K)[5];
> GaloisRepresentation(A,2);
7-dim unramified Galois representation (7,0,0,0,0,0,0) with G=C7, I=C1
   over Q2[40]
> GaloisRepresentation(A,3);
7-dim Galois representation (7,-1,1) with G=S3, I=S3, conductor 3^8 over Q3[40]
> GaloisRepresentation(A,5);
7-dim unramified Galois representation (7,0,0,0,0,0,0) with G=C7, I=C1
   over Q5[40]
> GaloisRepresentation(A,7);
7-dim Galois representation (7,1,1,0,0) with G=C7:C3, I=C7:C3, conductor 7^8
   over Q7[40]
> Conductor(A) eq 3^8*7^8;
true

```

### `GaloisRepresentation(E): CrvEll -> GalRep`

```magma
Minimize: BoolElt                    Default: true
```

Local Galois representation of (the first $l$-adic étale cohomology group of) an elliptic curve over a $p$-adic field. If `Minimize` is `true` (default), choose the field through which it factors to be as small as possible.

### `Example: Galrep E (ex-29c470)`

Take an elliptic curve $E/{\mathbb{Q}}_5$, with additive (potentially good) reduction of type II.

```magma
> K:=pAdicField(5,20);
> E:=EllipticCurve([K|0,5]);
> E;
Elliptic Curve defined by y^2 = x^3 + O(5^20)*x + (5 + O(5^21))
   over pAdicField(5, 20)
> loc:=LocalInformation(E); loc;
<5 + O(5^21), 2, 2, 1, II, true>

```

Its Galois representation is an unramified twist of a representation with finite image that factors through the dihedral extension ${\mathbb{Q}}_5(\zeta_6,{\root 6\of 5})$ of ${\mathbb{Q}}_5$.

```magma
> A:=GaloisRepresentation(E); A;
2-dim Galois representation Unr(sqrt(5)*i)*(2,-2,0,0,-1,1) with G=D6, I=C6,
   conductor 5^2 over Q5[20]
> Field(A);
Totally ramified extension defined by the polynomial x^6 - 5
 over Unramified extension defined by the polynomial x^2 + 4*x + 2
 over 5-adic field mod 5^20

```

### `GaloisRepresentation(E, p): CrvEll, RngIntElt -> GalRep`

```magma
Precision: RngIntElt                    Default: 40
Minimize : BoolElt                      Default: true
```

Local Galois representation of (the first $l$-adic étale cohomology group of) an elliptic curve over ${\mathbb{Q}}$ at $p$. If `Minimize` is `true` (default), choose the field through which it factors to be as small as possible.

### `Example: Galrep E P (ex-94d575)`

We take the elliptic curve 20a1 over ${\mathbb{Q}}$ and compute its local Galois representation at a prime $p=3$ of good reduction, $p=5$ of (non-split) multiplicative reduction and $p=2$ of additive reduction.

```magma
> E:=EllipticCurve("20a1");
> GaloisRepresentation(E,3);
2-dim unramified Galois representation Unr(1+2*x+3*x^2) over Q3[40]
> GaloisRepresentation(E,5);
2-dim Galois representation Unr(-5)*SP(2) over Q5[40]
> GaloisRepresentation(E,2);
2-dim Galois representation Unr(sqrt(2)*i)*(2,0,-1) with G=S3, I=C3, conductor
   2^2 over Q2[40]
> EulerFactor($3),EulerFactor($2),EulerFactor($1);
3*x^2 + 2*x + 1
x + 1
1

```

### `GaloisRepresentation(E, P): CrvEll, RngOrdIdl -> GalRep`

```magma
Precision: RngIntElt                    Default: 40
Minimize : BoolElt                      Default: true
```

Local Galois representation of (the first $l$-adic étale cohomology group of) an elliptic curve $E$ over a number field $F$ at a given prime ideal $P$. If `Minimize` is `true` (default), choose the field through which it factors to be as small as possible.

### `Example: Galrep E P (ex-f7aec3)`

```magma
> K:=CyclotomicField(5);
> E:=BaseChange(EllipticCurve("75a1"),K);
> P:=Ideal(Decomposition(K,5)[1,1]);
> GaloisRepresentation(E,P);
2-dim Galois representation Unr(sqrt(5)*i)*(2,0,-1) with G=S3, I=C3, conductor
   pi^2 over ext<Q5[10]|x^4-15*x^3-40*x^2-90*x-45>

```

### `GaloisRepresentation(C): CrvHyp[FldPad] -> GalRep`

```magma
Degree  : RngIntElt                    Default: Infinity()
Minimize: BoolElt                      Default: false
```

Galois representation associated to ($H^1$ of) a hyperelliptic curve $C$ over a $p$-adic field. `Degree` specifies that Euler factors of unramified pieces should only be computed up to that degree. (See Example [Example: Galrep Notfullycomputed](#example-ex-f653e8).) Setting `Minimize:=true` forces the representation to be minimized. (See [`Minimize`](fields.md#function-minimize).)

### `Example: Galrep Crvhyp Qp (ex-1fdb67)`

We take a curve $C$ over $K={\mathbb{Q}}_{23}$ of conductor $23^2$ and compute its Galois representation.

```magma
> K:=pAdicField(23,20);
> R<x>:=PolynomialRing(K);
> C:=HyperellipticCurve(-x,x^3+x^2+1);    // genus 2, conductor 23^2
> A:=GaloisRepresentation(C); A;
4-dim Galois representation Unr(1-46*x+529*x^2)*SP(2) over Q23[20]

```

If $F/K$ is a finite extension, then the base change of $A$ to $F$ is the same as the Galois representation of $C/F$:

```magma
> F:=ext<K|2>;
> BaseChange(A,F);
4-dim Galois representation Unr(1-1058*x+279841*x^2)*SP(2) over ext<Q23[20]|2>
> GaloisRepresentation(BaseChange(C,F));
4-dim Galois representation Unr(1-1058*x+279841*x^2)*SP(2) over ext<Q23[20]|2>

```

### `GaloisRepresentation(C, p): CrvHyp[FldRat], RngIntElt -> GalRep`

```magma
Degree  : RngIntElt                    Default: Infinity()
Minimize: BoolElt                      Default: false
```

Galois representation associated to ($H^1$ of) a hyperelliptic curve $C/{\mathbb{Q}}$ at $p$. `Degree` specifies that Euler factors of unramified pieces should only be computed up to that degree. (See Example [Example: Galrep Notfullycomputed](#example-ex-f653e8).) Setting `Minimize:=true` forces the representation to be minimized. (See [`Minimize`](fields.md#function-minimize).)

### `Example: Galrep Crvhyp Q (ex-1f2ef0)`

```magma
> R<x>:=PolynomialRing(Rationals());
> C:=HyperellipticCurve((x^2+5)*(x+1)*(x+2)*(x+3));
> GaloisRepresentation(C,5);   // bad reduction
4-dim Galois representation Unr(1+2*x+5*x^2) + Unr(5)*SP(2) over Q5[20]
> GaloisRepresentation(C,11);  // good reduction
4-dim unramified Galois representation Unr(1-2*x+6*x^2-22*x^3+121*x^4)
   over Q11[5]
> GaloisRepresentation(C,997: Degree:=1);  // don't count pts over GF(997^2)
4-dim unramified Galois representation Unr(1+26*x+O(x^2)) over Q997[5]

```

### `GaloisRepresentation(C, P): CrvHyp[FldNum], RngOrdIdl -> GalRep`

```magma
Degree  : RngIntElt                    Default: Infinity()
Minimize: BoolElt                      Default: false
```

Galois representation associated to ($H^1$ of) a hyperelliptic curve $C$ over a number field at a prime ideal $P$. `Degree` specifies that Euler factors of unramified pieces should only be computed up to that degree. (See Example [Example: Galrep Notfullycomputed](#example-ex-f653e8).) Setting `Minimize:=true` forces the representation to be minimized. (See [`Minimize`](fields.md#function-minimize).)

### `Example: Galrep Crvhyp Nf (ex-e4e4fd)`

We take a curve of genus 4 over ${\mathbb{Q}}(\zeta_{11})$ and compute its Galois representation at a unique prime $P$ above 11.

```magma
> K<zeta>:=CyclotomicField(11);
> R<x>:=PolynomialRing(K);
> C:=HyperellipticCurve(x^9+x^2+(zeta-1));
> P:=Ideal(Decomposition(K,11)[1,1]);
> GaloisRepresentation(C,P);
8-dim Galois representation Unr(1-44*x^3+1331*x^6) + Unr(11)*SP(2)
   over ext<Q11[2]|x^10+22*x^9+55*x^8+44*x^7-33*x^6-22*x^5-22*x^4-33*x^3+44*x^2+
   55*x+11>

```

### `GaloisRepresentation(f, p): ModFrmElt, RngIntElt -> GalRep`

```magma
Precision: RngIntElt                    Default: 40
```

Local Galois representation at $p$ of a modular form $f$. Currently only implemented when $p^2$ does not divide the level.

### `Example: Galrep F P (ex-e7791f)`

We take a rational modular form of weight 4 and level 5, and compute its Galois representations at $p=3$ (unramified principal series) and $p=5$ (Steinberg).

```magma
> f:=Newforms("5k4")[1,1];
> GaloisRepresentation(f,3);
2-dim unramified Galois representation Unr(1-2*x+27*x^2) over Q3[40]
> GaloisRepresentation(f,5);
2-dim Galois representation Unr(-25)*SP(2) over Q5[40]

```
