Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Ues GF(4) (finite field) rather Zmod(4) (fonite ring not known to be a field) :

sage: reset()
sage: R.<x>=Zmod(4)[]
sage: Q.<a>=R.quotient((x^2,2*x))
sage: len(list(Q))
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
Input In [242], in <cell line: 1>()
----> 1 len(list(Q))

File /usr/local/sage-9/src/sage/rings/ring.pyx:220, in sage.rings.ring.Ring.__iter__()
    218         NotImplementedError: object does not support iteration
    219     """
--> 220     raise NotImplementedError("object does not support iteration")
    221 
    222 def __len__(self):

NotImplementedError: object does not support iteration

But :

sage: R.<x>=GF(4)[]
sage: Q.<a>=R.quotient((x^2,2*x))
sage: len(list(Q))
16
sage: list(Q)
[0,
 z2,
 z2 + 1,
 1,
 z2*a,
 z2*a + z2,
 z2*a + z2 + 1,
 z2*a + 1,
 (z2 + 1)*a,
 (z2 + 1)*a + z2,
 (z2 + 1)*a + z2 + 1,
 (z2 + 1)*a + 1,
 a,
 a + z2,
 a + z2 + 1,
 a + 1]

HTH,

Ues Use GF(4) (finite field) rather Zmod(4) (fonite (finite ring not explicitely known to be a field) :

sage: reset()
sage: Zmod(4).is_field()
False
sage: GF(4).is_field()
True
sage: R.<x>=Zmod(4)[]
sage: Q.<a>=R.quotient((x^2,2*x))
sage: len(list(Q))
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
Input In [242], in <cell line: 1>()
----> 1 len(list(Q))

File /usr/local/sage-9/src/sage/rings/ring.pyx:220, in sage.rings.ring.Ring.__iter__()
    218         NotImplementedError: object does not support iteration
    219     """
--> 220     raise NotImplementedError("object does not support iteration")
    221 
    222 def __len__(self):

NotImplementedError: object does not support iteration

But :

sage: R.<x>=GF(4)[]
sage: Q.<a>=R.quotient((x^2,2*x))
sage: len(list(Q))
16
sage: list(Q)
[0,
 z2,
 z2 + 1,
 1,
 z2*a,
 z2*a + z2,
 z2*a + z2 + 1,
 z2*a + 1,
 (z2 + 1)*a,
 (z2 + 1)*a + z2,
 (z2 + 1)*a + z2 + 1,
 (z2 + 1)*a + 1,
 a,
 a + z2,
 a + z2 + 1,
 a + 1]

HTH,