The explanation can be found in the documentation for QuotientRing
:
ASSUMPTION:
I
has a methodI.reduce(x)
returning the normal form of elements x∈R. In other words, it is required thatI.reduce(x)==I.reduce(y)
⟺x−y∈I, andx-I.reduce(x) in I
, for all x,y∈R.
That is, elements of a QuotientRing
are represented by normal forms (usually obtained by polynomial division).
We can see that (2)⊂Z[x] in Sage does not possess such a method:
R.<x> = ZZ[]
I = R.ideal(2)
I.reduce??
This shows the source code of I.reduce
which is the default implementation lambda f: return f
, which doesn't satisfy the property that QuotientRing
assumes: e.g. I.reduce(2) != I.reduce(0)
but 2∈I.
The implementation of I.reduce
is the same for I = R.ideal(2,x)
which explains your last result.
Note that Z[x] is not a Euclidean ring because not every ideal is principal (e.g. the ideal (2,x) is a non-principal), so it is impossible to have a normal form for elements in a quotient via polynomial division in Z[x] in general. Also Z[x] is not the type of ring where one can have a Groebner basis.
Of course not all is lost, because the ideals you consider are nice enough, e.g. Z[x]/(2)≅F2[x] and Z[x]/(2,x)≅F2[x]/(x)≅F2 and the objects on the right-hand sides can be represented easily in Sage:
sage: (2*t1 + a*t2).change_ring(GF(2)[a])
a*t2
sage: (2*t1 + a*t2).change_ring(GF(2)[a].quotient(a))
0
Or, if you prefer the name abar
for the image of a
in the quotient:
sage: S.<abar> = GF(2)[]
sage: (2*t1 + a*t2).change_ring(S)
abar*t2
sage: (2*t1 + a*t2).change_ring(S.quotient(abar))
0
![]() | 2 | No.2 Revision |
The explanation can be found in the documentation for QuotientRing
:
ASSUMPTION:
I
has a methodI.reduce(x)
returning the normal form of elements x∈R. In other words, it is required thatI.reduce(x)==I.reduce(y)
⟺x−y∈I, andx-I.reduce(x) in I
, for all x,y∈R.
That is, elements of a QuotientRing
are represented by normal forms (usually obtained by polynomial division).
We can see that (2)⊂Z[x] in Sage does not possess such a method:
R.<x> = ZZ[]
I = R.ideal(2)
I.reduce??
This shows the source code of I.reduce
which is the default implementation lambda f: return f
, which doesn't satisfy the property that QuotientRing
assumes: e.g. I.reduce(2) != I.reduce(0)
but 2∈I.
The implementation of I.reduce
is the same for I = R.ideal(2,x)
which explains your last result.
Note that Z[x] is not a Euclidean ring because not every ideal is principal (e.g. the ideal (2,x) is a non-principal), so it is impossible to have a normal form for elements in a quotient via polynomial division in Z[x] in general. Also Z[x] is not the type of ring where one can have a There is a theory of Groebner basis.bases for polynomial rings over PIDs which would apply to Z[x], but it doesn't seem to be implemented in Sage.
Of course not all is lost, because the ideals you consider are nice enough, e.g. Z[x]/(2)≅F2[x] and Z[x]/(2,x)≅F2[x]/(x)≅F2 and the objects on the right-hand sides can be represented easily in Sage:
sage: (2*t1 + a*t2).change_ring(GF(2)[a])
a*t2
sage: (2*t1 + a*t2).change_ring(GF(2)[a].quotient(a))
0
Or, if you prefer the name abar
for the image of a
in the quotient:
sage: S.<abar> = GF(2)[]
sage: (2*t1 + a*t2).change_ring(S)
abar*t2
sage: (2*t1 + a*t2).change_ring(S.quotient(abar))
0
![]() | 3 | No.3 Revision |
The explanation can be found in the documentation for QuotientRing
:
ASSUMPTION:
I
has a methodI.reduce(x)
returning the normal form of elements x∈R. In other words, it is required thatI.reduce(x)==I.reduce(y)
⟺x−y∈I, andx-I.reduce(x) in I
, for all x,y∈R.
That is, elements of a QuotientRing
are represented by normal forms (usually obtained by polynomial division).
We can see that (2)⊂Z[x] in Sage does not possess such a method:
R.<x> = ZZ[]
I = R.ideal(2)
I.reduce??
This shows the source code of I.reduce
which is the default implementation lambda f: return f
, which doesn't satisfy the property that QuotientRing
assumes: e.g. I.reduce(2) != I.reduce(0)
but 2∈I.
The implementation of I.reduce
is the same for I = R.ideal(2,x)
which explains your last result.
Note that Z[x] is not a Euclidean ring because not every ideal is principal (e.g. the ideal (2,x) is a non-principal), so it is impossible to have a normal form for elements in a quotient via polynomial division in Z[x] in general. There is a theory of Groebner bases for univariate polynomial rings over PIDs which would apply to Z[x], but it doesn't seem to be implemented in Sage.
Of course not all is lost, because the ideals you consider are nice enough, e.g. Z[x]/(2)≅F2[x] and Z[x]/(2,x)≅F2[x]/(x)≅F2 and the objects on the right-hand sides can be represented easily in Sage:
sage: (2*t1 + a*t2).change_ring(GF(2)[a])
a*t2
sage: (2*t1 + a*t2).change_ring(GF(2)[a].quotient(a))
0
Or, if you prefer the name abar
for the image of a
in the quotient:
sage: S.<abar> = GF(2)[]
sage: (2*t1 + a*t2).change_ring(S)
abar*t2
sage: (2*t1 + a*t2).change_ring(S.quotient(abar))
0
![]() | 4 | No.4 Revision |
The explanation can be found in the documentation for QuotientRing
:
ASSUMPTION:
I
has a methodI.reduce(x)
returning the normal form of elements x∈R. In other words, it is required thatI.reduce(x)==I.reduce(y)
⟺x−y∈I, andx-I.reduce(x) in I
, for all x,y∈R.
That is, elements of a QuotientRing
are represented by normal forms (usually obtained by polynomial division).
We can see that (2)⊂Z[x] in Sage does not possess such a method:
R.<x> = ZZ[]
I = R.ideal(2)
I.reduce??
This shows the source code of I.reduce
which is the default implementation lambda f: return f
, which doesn't satisfy the property that QuotientRing
assumes: e.g. I.reduce(2) != I.reduce(0)
but 2∈I.
The implementation of I.reduce
is the same for I = R.ideal(2,x)
which explains your last result.
Note that Z[x] is not a Euclidean ring because not every ideal is principal (e.g. the ideal (2,x) is a non-principal), so it is impossible to have a normal form for elements in a quotient via naive polynomial division in Z[x] Z[x], in general. There is a theory of Groebner bases for univariate polynomial rings over PIDs which would apply to Z[x], but it doesn't seem to be implemented in Sage.
Of course not all is lost, because the ideals you consider are nice enough, e.g. Z[x]/(2)≅F2[x] and Z[x]/(2,x)≅F2[x]/(x)≅F2 and the objects on the right-hand sides can be represented easily in Sage:
sage: (2*t1 + a*t2).change_ring(GF(2)[a])
a*t2
sage: (2*t1 + a*t2).change_ring(GF(2)[a].quotient(a))
0
Or, if you prefer the name abar
for the image of a
in the quotient:
sage: S.<abar> = GF(2)[]
sage: (2*t1 + a*t2).change_ring(S)
abar*t2
sage: (2*t1 + a*t2).change_ring(S.quotient(abar))
0