Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I'm not sure what you're trying to do here. Groebner bases make sense for ideals in polynomial rings over a field. Your R is not a polynomial ring, but is itself a field, so I is either the zero ideal $(0)$ (if all random elements happen to be zero) or the unit ideal $(1) = R$. Maybe you intended to define

R.<x> = PolynomialRing(PolynomialRing(GF(2),name="a").quotient(p))

Or with more variables (when Groebner bases are more interesting):

R.<x,y,z> = PolynomialRing(PolynomialRing(GF(2),name="a").quotient(p), 3)

Since the quotient $\mathbb{F}_2[r]/(p)$ is a field, it is more efficient to construct it as follows:

R.<x,y,z> = PolynomialRing(GF(2^e, name='a', modulus=p), 3)

I'm not sure what you're trying to do here. Groebner bases make sense for ideals in polynomial rings over a field. Your R is not a polynomial ring, but is itself a field, so I is either the zero ideal $(0)$ (if all random elements happen to be zero) or the unit ideal $(1) = R$. Maybe you intended to define

R.<x> = PolynomialRing(PolynomialRing(GF(2),name="a").quotient(p))

Or with more variables (when Groebner bases are more interesting):

R.<x,y,z> = PolynomialRing(PolynomialRing(GF(2),name="a").quotient(p), 3)

Since the quotient $\mathbb{F}_2[r]/(p)$ is a field, field $\cong \mathbb{F}_{2^e}$, it is more efficient to construct it as follows:

R.<x,y,z> = PolynomialRing(GF(2^e, name='a', modulus=p), 3)

I'm not sure what you're trying to do here. Groebner bases make sense for ideals in polynomial rings over a field. Your R is not a polynomial ring, but is itself a field, so I is either the zero ideal $(0)$ (if all random elements happen to be zero) or the unit ideal $(1) = R$. Maybe you intended to define

R.<x> = PolynomialRing(PolynomialRing(GF(2),name="a").quotient(p))

Or with more variables (when Groebner bases are more interesting):

R.<x,y,z> = PolynomialRing(PolynomialRing(GF(2),name="a").quotient(p), 3)

Since the quotient $\mathbb{F}_2[r]/(p)$ is a field $\cong \mathbb{F}_{2^e}$, it is more efficient to construct it as follows:

R.<x,y,z> = PolynomialRing(GF(2^e, name='a', modulus=p), 3)

An element y of GF(2^e) can be written as a polynomial of degree less than $e$ as follows:

K.<a> = GF(2^e, modulus=p)
R.<x> = PolynomialRing(GF(2))
y = a^48 + a^27 + 1
vy = vector(y)
sum(vy[d]*x^d for d in range(e))

I'm not sure what you're trying to do here. Groebner bases make sense for ideals in polynomial rings over a field. Your R is not a polynomial ring, but is itself a field, so I is either the zero ideal $(0)$ (if all random elements happen to be zero) or the unit ideal $(1) = R$. Maybe you intended to define

R.<x> = PolynomialRing(PolynomialRing(GF(2),name="a").quotient(p))

Or with more variables (when Groebner bases are more interesting):

R.<x,y,z> = PolynomialRing(PolynomialRing(GF(2),name="a").quotient(p), 3)

Since the quotient $\mathbb{F}_2[r]/(p)$ is a field $\cong \mathbb{F}_{2^e}$, it is more efficient to construct it as follows:

R.<x,y,z> = PolynomialRing(GF(2^e, name='a', modulus=p), 3)

An element y of GF(2^e) can be written as a polynomial of degree less than $e$ as follows:

K.<a> = GF(2^e, modulus=p)
R.<x> = PolynomialRing(GF(2))
y = a^48 + a^27 + 1
vy = vector(y)
sum(vy[d]*x^d for d in range(e))

By the way, this can be done with Groebner bases as well (for one variable, just polynomial division):

R.ideal(p).reduce(x^48 + x^27 + 1)

That is, the normal form of a polynomial w.r.t. a Groebner basis of $(p)$ is the one of degree less than $e$ as well.

I'm not sure what you're trying to do here. Groebner bases make sense for ideals in polynomial rings over a field. Your R is not a polynomial ring, but is itself a field, so I is either the zero ideal $(0)$ (if all random elements happen to be zero) or the unit ideal $(1) = R$. Maybe you intended to define

R.<x> = PolynomialRing(PolynomialRing(GF(2),name="a").quotient(p))

Or with more variables (when Groebner bases are more interesting):

R.<x,y,z> = PolynomialRing(PolynomialRing(GF(2),name="a").quotient(p), 3)

Since the quotient $\mathbb{F}_2[r]/(p)$ is a field $\cong \mathbb{F}_{2^e}$, it is more efficient to construct it as follows:

R.<x,y,z> = PolynomialRing(GF(2^e, name='a', modulus=p), 3)

An element y of GF(2^e) can be written as a polynomial of degree less than $e$ as follows:

K.<a> = GF(2^e, modulus=p)
R.<x> = PolynomialRing(GF(2))
y = a^48 + a^27 + 1
vy = vector(y)
sum(vy[d]*x^d for d in range(e))

By the way, this can be done with Groebner bases as well (for one variable, just polynomial division):

R.ideal(p).reduce(x^48 + x^27 + 1)

That is, the normal form of a polynomial w.r.t. a the Groebner basis $[p]$ of $(p)$ is the one of degree less than $e$ as well.

I'm not sure what you're trying to do here. Groebner bases make sense for ideals in polynomial rings over a field. Your R is not a polynomial ring, but is itself a field, so I is either the zero ideal $(0)$ (if all random elements happen to be zero) or the unit ideal $(1) = R$. Maybe you intended to define

R.<x> = PolynomialRing(PolynomialRing(GF(2),name="a").quotient(p))

Or with more variables (when Groebner bases are more interesting):

R.<x,y,z> = PolynomialRing(PolynomialRing(GF(2),name="a").quotient(p), 3)

Since the quotient $\mathbb{F}_2[r]/(p)$ is a field $\cong \mathbb{F}_{2^e}$, it is more efficient to construct it as follows:

R.<x,y,z> = PolynomialRing(GF(2^e, name='a', modulus=p), 3)

An element y of GF(2^e) can be written as a polynomial of degree less than $e$ as follows:

K.<a> = GF(2^e, modulus=p)
R.<x> = PolynomialRing(GF(2))
y = a^48 + a^27 + 1
vy = vector(y)
sum(vy[d]*x^d for d in range(e))

By the way, this can be done with Groebner bases as well (for one variable, just polynomial division):division with remainder):

R.ideal(p).reduce(x^48 + x^27 + 1)

That is, the normal form of a polynomial w.r.t. the Groebner basis $[p]$ of $(p)$ is the one of degree less than $e$ as well.

I'm not sure what you're trying to do here. Groebner bases make sense for ideals in polynomial rings over a field. Your R is not a polynomial ring, but is itself a field, so I is either the zero ideal $(0)$ (if all random elements happen to be zero) or the unit ideal $(1) = R$. Maybe you intended to define

R.<x> = PolynomialRing(PolynomialRing(GF(2),name="a").quotient(p))

Or with more variables (when Groebner bases are more interesting):

R.<x,y,z> = PolynomialRing(PolynomialRing(GF(2),name="a").quotient(p), 3)

Since the quotient $\mathbb{F}_2[r]/(p)$ is a field $\cong \mathbb{F}_{2^e}$, it is more efficient to construct it as follows:

R.<x,y,z> = PolynomialRing(GF(2^e, name='a', modulus=p), 3)

An element y of GF(2^e) can be written as a polynomial of degree less than $e$ as follows:

K.<a> = GF(2^e, modulus=p)
R.<x> = PolynomialRing(GF(2))
y = a^48 + a^27 + 1
vy = vector(y)
sum(vy[d]*x^d for d in range(e))

By the way, this can be done with Groebner bases as well (for one variable, just polynomial division with remainder):

R.ideal(p).reduce(x^48 + x^27 + 1)

That is, a Groebner basis of $(p) \subset \mathbb{F}_2[x]$ as well. Namely, the normal form of a polynomial w.r.t. the Groebner basis $[p]$ of $(p)$ is the one of degree less than $e$ as well.

well:

R.ideal(p).reduce(x^48 + x^27 + 1)

In this one-variable situation, the normal form is just the remainder after polynomial division.