# Revision history [back]

### how to do arithmetic operation of elements in finite field?

Let us consider as example:

Var('x')
F.<x> = GF(13^2)


We consider two elements 2*x + 11, 3*x + 2 corresponding to the integers 37 and 41 respectively. Now we can operate them as

a=F.fetch_int(37)+F.fetch_int(41)
m=F.fetch_int(37)*F.fetch_int(41)


We have a=4*x + 10 , m= 4*x + 10

In reverse way we can get the corresponding integers as :

ai=a.integer_representation()
mi=m.integer_representation()


That is, ai=65, mi=62

How can I do the same for the field GF(251) using same function?

### how to do arithmetic operation of elements in finite field?

Let us consider as example:

Var('x')
F.<x> = GF(13^2)


We consider two elements 2*x + 11, 3*x + 2 corresponding to the integers 37 and 41 respectively. Now we can operate them as

a=F.fetch_int(37)+F.fetch_int(41)
m=F.fetch_int(37)*F.fetch_int(41)


We have a=4*x + 10 , m= 4*x + 10

In reverse way we can get the corresponding integers as :

ai=a.integer_representation()
mi=m.integer_representation()


That is, ai=65, mi=62

How can I do the same for the field GF(251) using same function?

### how to do arithmetic operation of elements in finite field?

Let us consider as example:

Var('x')
F.<x> = GF(13^2)


We consider two elements 2*x + 11, 3*x + 2 corresponding to the integers 37 and 41 respectively. Now we can operate them as

a=F.fetch_int(37)+F.fetch_int(41)
m=F.fetch_int(37)*F.fetch_int(41)


We have a=4*x + 10 , m= 4*x + 10

In reverse way we can get the corresponding integers as :

ai=a.integer_representation()
mi=m.integer_representation()


That is, ai=65, mi=62

How can I do the same for the field GF(251) using same function?

### how How to do arithmetic operation of elements in finite field?

Let us consider as an example:

Var('x')
F.<x> = GF(13^2)


We consider two elements 2*x + 11, 3*x + 2 corresponding to the integers 37 and 41 respectively. Now we can operate them as

a=F.fetch_int(37)+F.fetch_int(41)
m=F.fetch_int(37)*F.fetch_int(41)


We have a=4*x + 10 , m= 4*x + 10

In reverse way we can get the corresponding integers as :

ai=a.integer_representation()
mi=m.integer_representation()


That is, ai=65, mi=62

How can I do the same for the field GF(251) using same function?

### How to do arithmetic operation of elements in finite field?

Let us consider an example:

Var('x')
F.<x> = GF(13^2)


We consider two elements 2*x + 11, 3*x + 2 corresponding to the integers 37 and 41 respectively. Now we can operate them as

a=F.fetch_int(37)+F.fetch_int(41)
m=F.fetch_int(37)*F.fetch_int(41)


We have a=4*x + 10 , m= 4*x + 10

In reverse way we can get the corresponding integers as :

ai=a.integer_representation()
mi=m.integer_representation()


That is, ai=65, mi=62

How can I do the same for the field GF(251) using the same function?