# Correct way to construct a field with i adjoined?

Hello,

I'm an undergrad maths student looking to understand how I successfully adjoin elements to a finite field in sagemath, to explore some of my university topics.

I can construct a base field, for example:

```
B = GF(2**3-1)
```

and I can construct an extension to this by adjoining I, which is equivalent to using the minimum polynomial x^2+1 like so:

```
reset('i') # make sure we haven't clobbered the imaginary constant
E = B[i]
```

This does what I want (I think), creating a field E that is an extension of B. We can even list the elements:

[e for e in enumerate(E)]

and this looks correct. However, things get messy when I try to use a larger field, for example:

```
C = GF(2**127-1)
F = C[i]
```

This gives the error:

I already exists with incompatible valence

I haven't tried to redefine i at all, so far as I can tell, so, my questions are:

- How do I correctly extend a given finite field ?
Following on from this, I tried the following:

`A = GF(2**3-1) B = A[i] C = A.extension(x^2+1, 'i') B==C`

So it appears I can't successfully adjoin 'i' using a minimum irr poly either. Printing B and C give:

`sage: B Finite Field in I of size 7^2 sage: C Finite Field in i of size 7^2`

which would explain why they aren't equal... except i and I should be equal.

In short, I would like to construct the quotient field PRIME BASE FIELD[x]/x^2-1 and have the arbitrary x treated as complex values ("adjoining sqrt(-1)") but I'm unclear from sage's documentation on how to achieve this.

I see the notation

`R.<x> = GF(blah)`

quite a lot. Can someone please explain it? I can't find anything in the documentation that might help me understand what this is and why it is necessary.

You can assume I understand most of an undergraduate galois theory course and have a basic understanding of algebraic number theory - what I don't understand is how this maps into sage.