## Fields

Algebraic structure on which basic math can be performed.

Algebraic closure $Kˉ$ of field $K$ is an algebraic extension of $K$ that is algebraically closed. For example: fundamental theorem of algebra states that algebraic closure of field of real numbers is field of complex numbers.

Algebraic extension of a field $L/K$ refers to a field $L$ such that every element is a root to a non-zero polynomial with coefficients in $K$, in other words, every element of field $K$ is algebraic over small field.

A

fieldis algebraically closed if every non-constant polynomial $F[x]$ has a root in $F$.

### Properties

- Abelian group under addition
- Non-zero numbers form abelian group under multiplication
- multiplicative distribution over addition

## Finite Fields (Galois Fields)

Fields defined on a number and the result is in the set.

- Closed
- Associative: $a∗(b∗c)=(a∗b)∗c$
- Identity: $a∗1=1$
- Inverse: $a∗a_{−1}=1$
- Commutative

It has $p_{m}$ elements in it, where p = prime, and m is an integer.

$GF(p_{m})$ are defined as the finite fields with notation:

- m = 1: prime fields
- m > 1: extension fields

Note: $F_{∗}$ are defined as finite fields without 0 as it doesn’t have an inverse.

**Prime fields** can be defined on any integer and include number from 0 till that number. All of the operations are done modulo that number.

Example: $F_{5}={0,1,2,3,4}$ is a field defined on prime number 5 and include these numbers.

**Extension fields** are polynomials and take the form: $F(m>1)=a_{m−1}X_{m−1}+⋯+a_{1}X_{1}+a_{0}$

Example: $GF(2_{3})$‘s elements are

### Properties

- Every element of a GF(q) are roots of the polynomial $x_{q}−x=0$. Generally, every element in GF(p^n) satisfies the polynomial equation $x_{p_{n}}−x=0$.
- every field has a
**characteristic**$p$ which is p for which np=0 and is used to find identity of the field. - Non-zero elements of a finite field form a
**multiplicative cyclic subgroup**. This means, all non-zero elements can be expressed as powers of a single element. This element is called**primitive element**. - All fields generated in GF(q) are isomorphic.

### Roots of Unity in Finite Fields

- Every non-zero element of $F_{q}$ is a root of unity.
- Def: Primitive RoU: $x_{n}=1$, but $x_{m}=1∀m<n$.
- $F_{q}$ has a nth primitive RoU iff n divides q-1.

### Quadratic Residue

If $a$ and $m$ are co-prime, then $a$ is called *quadratic residue modulo m* if $x_{2}≡amodm$ has a solution. Vice Versa, $a$ is called quadratic non-residue if it does not have a solution.

Find the quadratic residues mod 11.

- $0_{2}$ mod 11 = 0
- $1_{2}$ mod 11 = 1
- $2_{2}$ mod 11 = 4
- $3_{2}$ mod 11 = 9
- $4_{2}$ mod 11 = 5
- $5_{2}$ mod 11 = 3
- $6_{2}$ mod 11 = 3
- $7_{2}$ mod 11 = 5
- $8_{2}$ mod 11 = 9
- $9_{2}$ mod 11 = 4
- $10_{2}$ mod 11 = 1
0, 1, 3, 9, 5, 4 are quadratic residues.

2, 6, 7, 8, 10 are quadratic non-residues modulo 11.

Total quadratic residues of a prime $p=(p−1)/2$, excluding 0, if p is odd, and $(p+1)/2$, if p is even.

Prove above statement.

In a field, $x_{2}$ and $(p−x)_{2}$ is same. Thus, the square modulo are symmetric around $p/2$.

#### Legendre Symbol

Easier notation used to denote the relationship between $a$ and $n$. Can be easily encoded in a functional form to be used in cryptographic operations.

Let $a$ and $p$ be integers, and $p=2$,

$(pa )=⎩⎨⎧ 01−1 whenadividespifais quadratic residue ofpifais quadratic non-residue ofp $### Computing sqrt

### Extension Fields

### Adicity

Something which is referenced very often when creating various fields for proving systems is the 2-adicity of the field.

Adicity refers to the largest size of the subgroup that can be formed in the field. All the other subgroups are smaller than the largest subgroup and thus, to create snarks that can prove large computation, it is required to take fields with high 2-adicity value.

## Interesting fields

Field element is the most granular entity in a SNARK which require operations like MSM, NTT to perform actions on a polynomial. Many interesting fields have been invented to perform efficient arithmetic inside the field.

### Goldilocks

$p:φ_{2}−φ+1$`+1`

in the modulus means that field will have high 2-powers root of unity which are used in computing large NTTs in SNARKs. Originally, introduced in Ham15 which satisfied golden ratio: $φ_{2}−φ−1$, `-1`

meant not having high 2-adicity, thus was modified to $φ_{2}−φ+1$ by Plonky2 team.

Pros:

- 64 bit implying field arithmetic can be done efficiently on 64-bit machines
- fast modulo reduction from 128 bits. explained really well in recmo’s article.
- NTT trick

Cons:

- non-native arithmetic can’t be emulated efficiently