# Revision history [back]

### Referring to elements of a polynomial ring as integers.

Suppose I create a polynomial ring:

F.a = GF(2^4)
R.x = PolynomialRing(F)


The syntax above is slightly incorrect, I couldn't figure out how to preserve the brackets around the 'a' and 'x'.

For the work I'm doing the references typically refer to elements of the ring in 4 different manners (within the same reference). An example of this is the BBC white paper, "Reed-Solomon Error Correction" by C. K. P. Clarke.

They use index form:

a^11

They use polynomial form:

a^3 + a^2 + a

They use binary form:

1110

They use decimal form:

14

I would like to map what they call decimal form to the polynomial form, because it's very convenient. For instance in the previously mentioned paper they encode a message: x^10 + 2x^9 + 3x^9 + ... 10*x + 11.

In sagemath this would be:

x^10 + ax^9 + a^4x^8 + ... a^9*x + a^7

The decimal form is very helpful for me. My eventual goal is to use sagemath to implement a Reed-Solomon encoder/decoder, and write code that parses that implementation and creates System Verilog code that gets implemented in an ASIC (application specific integrated circuit)

 2 None tmonteil 25058 ●29 ●177 ●467 http://wiki.sagemath.o...

### Referring to elements of a polynomial ring as integers.

Suppose I create a polynomial ring:

F.a F.<a> = GF(2^4)
R.x R.<x> = PolynomialRing(F)


The syntax above is slightly incorrect, I couldn't figure out how to preserve the brackets around the 'a' and 'x'.

For the work I'm doing the references typically refer to elements of the ring in 4 different manners (within the same reference). An example of this is the BBC white paper, "Reed-Solomon Error Correction" by C. K. P. Clarke.

They use index form:

a^11

They use polynomial form:

a^11


They use polynomial form:

a^3 + a^2 + aa


They use binary form:

1110

1110


They use decimal form:

14

14


I would like to map what they call decimal form to the polynomial form, because it's very convenient. For instance in the previously mentioned paper they encode a message: x^10 + 2x^9 + 3x^9 + ... 10*x + 11.

In sagemath this would be:

x^10 + ax^9 + a^4x^8 a*x^9 + a^4*x^8 + ... a^9*x + a^7a^7


The decimal form is very helpful for me. My eventual goal is to use sagemath to implement a Reed-Solomon encoder/decoder, and write code that parses that implementation and creates System Verilog code that gets implemented in an ASIC (application specific integrated circuit)