1 | initial version |

The error in your math is that the group and ring structures on F9 are not the same as those on Z/9Z. As you know, Z/nZ is a field only when n is prime.

The error in your code comes from calling GF(9). You get the same error by just this:

```
sage: GF(9)
...
ValueError: parameter 'conway' is required if no name given
```

Instead, you need to define the generator at the time you instantiate GF(9). Do this:

```
sage: F.<a> = GF(9)
```

Then `F`

is defined, with `a`

as a generator (over `Z/3Z`

).
You can check its minimal polynomial:

```
sage: p = a.minpoly()
sage: p
x^2 + 2*x + 2
sage: p.parent()
Univariate Polynomial Ring in x over Finite Field of size 3
```

The rest of your code should work from there.

```
sage: R.<x> = PolynomialRing(F)
sage: f = x^4 + x^2 - 1
sage: f in R
True
sage: f.factor()
(x^2 + a) * (x^2 + 2*a + 1)
```

2 | No.2 Revision |

The error in your math is that the group and ring structures on F9 are not the same as those on Z/9Z. As you know, Z/nZ is a field only when n is prime.

The error in your code comes from calling GF(9). You get the same error by just this:

```
sage: GF(9)
...
ValueError: parameter 'conway' is required if no name given
```

Instead, you need to define the generator at the time you instantiate GF(9). Do this:

```
sage: F.<a> = GF(9)
```

Then `F`

is defined, with `a`

as a generator (over `Z/3Z`

).
You can check its minimal polynomial:

```
sage: p = a.minpoly()
sage: p
x^2 + 2*x + 2
sage: p.parent()
Univariate Polynomial Ring in x over Finite Field of size 3
```

The rest of your code should work from there.

```
sage: R.<x> = PolynomialRing(F)
sage: f = x^4 + x^2 - 1
sage: f in R
True
sage: f.factor()
(x^2 + a) * (x^2 + 2*a + 1)
```

Edit: In Sage 7.2 you can call `GF(9)`

without specifying a polynomial,
and Sage will pick one for you.

3 | No.3 Revision |

The error in your math is that the group and ring structures on F9 are not the same as those on Z/9Z. As you know, Z/nZ is a field only when n is prime.

The error in your code comes from calling GF(9). You get the same error by just this:

```
sage: GF(9)
...
ValueError: parameter 'conway' is required if no name given
```

Instead, you need to define the generator at the time you instantiate GF(9). Do this:

```
sage: F.<a> = GF(9)
```

Then `F`

is defined, with `a`

as a generator (over `Z/3Z`

).
You can check its minimal polynomial:

```
sage: p = a.minpoly()
sage: p
x^2 + 2*x + 2
sage: p.parent()
Univariate Polynomial Ring in x over Finite Field of size 3
```

The rest of your code should work from there.

```
sage: R.<x> = PolynomialRing(F)
sage: f = x^4 + x^2 - 1
sage: f in R
True
sage: f.factor()
(x^2 + a) * (x^2 + 2*a + 1)
```

Edit: In Sage 7.2 you can call `GF(9)`

without specifying a ~~polynomial,
and ~~generator name
or a polynomial. Your original code works in Sage ~~will pick one for you.~~

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.