## Exercises 16.11 Sage Exercises

### 1.

Define the two rings \({\mathbb Z}_{11}\) and \({\mathbb Z}_{12}\) with the commands `R = Integers(11)`

and `S = Integers(12)`

. For each ring, use the relevant command to determine: if the ring is finite, if it is commutative, if it is an integral domain and if it is a field. Then use single Sage commands to find the order of the ring, list the elements, and output the multiplicative identity (i.e. \(1\text{,}\) if it exists).

### 2.

Define `R`

to be the ring of integers, \({\mathbb Z}\text{,}\) by executing `R = ZZ`

or `R = Integers()`

. A command like `R.ideal(4)`

will create the principal ideal \(\langle 4\rangle\text{.}\) The same command can accept more than one generator, so for example, `R.ideal(3, 5)`

will create the ideal \(\{a\cdot 3+ b\cdot 5\mid a,b\in{\mathbb Z}\}\text{.}\) Create several ideals of \({\mathbb Z}\) with two generators and ask Sage to print each as you create it. Explain what you observe and then create code that will test your observation for thousands of different examples.

### 3.

Create a finite field \(F\) of order 81 with `F.<t>=FiniteField(3^4)`

.

List the elements of \(F\text{.}\)

Obtain the generators of \(F\) with

`F.gens()`

.Obtain the first generator of \(F\) and save it as

`u`

with`u = F.0`

(alternatively,`u = F.gen(0)`

).Compute the first 80 powers of

`u`

and comment.The generator you have worked with above is a root of a polynomial over \({\mathbb Z}_3\text{.}\) Obtain this polynomial with

`F.modulus()`

and use this observation to explain the entry in your list of powers that is the fourth power of the generator.

### 4.

Build and analyze a quotient ring as follows:

Use

`P.<z>=Integers(7)[]`

to construct a ring \(P\) of polynomials in \(z\) with coefficients from \({\mathbb Z}_7\text{.}\)Use

`K = P.ideal(z^2+z+3)`

to build a principal ideal \(K\) generated by the polynomial \(z^2+z+3\text{.}\)Use

`H = P.quotient(K)`

to build \(H\text{,}\) the quotient ring of \(P\) by \(K\text{.}\)Use Sage to verify that \(H\) is a field.

As in the previous exercise, obtain a generator and examine the proper collection of powers of that generator.