---
title: "Examples"
canonical: "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModPGaloisRepresentations/Examples.html"
source: "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModPGaloisRepresentations/Examples.md"
part: "Representation Theory"
chapter: "Mod P Galois Representations"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Representation Theory", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/index-representation-theory.md"}
  - {"title": "Mod P Galois Representations", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModPGaloisRepresentations/index-mod-pgalois-representations.md"}
prev: {"title": "$\\varphi$-modules and Galois Representations in Magma", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModPGaloisRepresentations/modules-Galois-representations.md"}
next: {"title": "Group Representations", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/GroupRepresentations/index-group-representations.md"}
examples:
  - "ex-b604c9"
---

# Examples

<a id="example-ex-b604c9"></a>
## `Example: Slopes of a Direct Sum of Phi-Modules (ex-b604c9)`

We create two $\varphi$-modules $D_1, D_2$, build their direct sum, and compute its slopes and corresponding representation.

```magma
> k<e9> := GF(3,2);
> S<u> := LaurentSeriesRing(k,20);
> D1 := ElementaryPhiModule(S,3,2);
> D1;
Phi-module of dimension 3 over Laurent series field in u over GF(3^2)
with fixed relative precision 20 with matrix
[ O(u^20)         O(u^20)        u^2 + O(u^20)]
[ 1 + O(u^20)     O(u^20)             O(u^20) ]
[ O(u^20)        1 + O(u^20)          O(u^20) ] and Frobenius [1,3]
> M := Matrix(S,2,2,[0,k.1*u,1,0]);
> D2 := PhiModule(M);
> D2;
Phi-module of dimension 2 over Laurent series field in u over GF(3^2)
with fixed relative precision 20 with matrix
[ O(u^20)       e9*u^2 + O(u^20)]
[ 1 + O(u^20)            O(u^20) ] and Frobenius [1,3]
> D := DirectSum(D1,D2);
> Slopes(D);
[
  [2, 1],
  [3, 2]
]
> SSGaloisRepresentation(D);
Semisimple representation of the absolute Galois group of
Laurent series field in u over GF(3^2) with fixed relative
precision 20 with coefficients in Finite field of size 3 and
components [
[3, 18],
[2, 3]
]
```
