Abstract Algebra: Theory and Applications · Problem 22.8.6

Galois Theory — Thomas Judson

Mathematics — Abstract Algebra · finite-fields-sage-sum-of-squares

Problem

Exercise 22.4.15 suggests that every element of a finite field may be written (expressed) as a sum of squares. This exercise suggests computational experiments which might help you formulate a proof for the exercise. (a) Construct two small, but not too small, finite fields, one with p=2p = 2 and the other with an odd prime. Repeat the following for each field, FF. (b) Choose a ``random'' element of the field, say a∈Fa \in F. Construct the sets {x2∣x∈F}{a−x2∣x∈F}\{x^2 \mid x \in F\} \qquad \{a - x^2 \mid x \in F\} using Sage sets with the Set()\texttt{Set}() constructor. (Be careful: set() is a Python command which behaves differently in fundamental ways.) (c) Examine the size of the two sets and the size of their intersection (.intersection()). Try different elements for aa, perhaps writing a loop to try all possible values. Note that p=2p = 2 will behave quite differently. (d) Suppose you have an element of the intersection. (You can get one with .an\_element().) How does this lead to the sum of squares proposed in the exercise? (e) Can you write a Python function that accepts a finite field whose order is a power of an odd prime and then lists each element as a sum of squares?

Related theory

Browse the problem library