ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 03 Jul 2015 21:51:15 +0200Linear codes over finite ringhttps://ask.sagemath.org/question/27254/linear-codes-over-finite-ring/I'd like to work over cyclic codes over chain rings. Now let R=F_2+uF_2+U^2F_2+u^3F_2, u^4=0. Consider C=(1+x+x^2+x^3+x^4) be a cyclic coder over R of length 5 . Give to me the codewords of C?Fri, 03 Jul 2015 10:45:26 +0200https://ask.sagemath.org/question/27254/linear-codes-over-finite-ring/Answer by dlucas for <p>I'd like to work over cyclic codes over chain rings. Now let R=F_2+uF_2+U^2F_2+u^3F_2, u^4=0. Consider C=(1+x+x^2+x^3+x^4) be a cyclic coder over R of length 5 . Give to me the codewords of C?</p>
https://ask.sagemath.org/question/27254/linear-codes-over-finite-ring/?answer=27256#post-id-27256Hello,
Finite chain rings are not (yet) supported in Sage. Someone posted a patch on it on the updtae system (see: http://trac.sagemath.org/ticket/13398).
I know it's not exactly the issue here, but for now you can try the following:
sage: F = GF(2)
sage: R.<x> = F[]
sage: g = 1+x+x^2+x^3+x^4
sage: C = codes.CyclicCode(5, g)
to build your code (sorry about the bad formatting). Of course, it's over GF(2), not over a chain ring...Fri, 03 Jul 2015 21:51:15 +0200https://ask.sagemath.org/question/27254/linear-codes-over-finite-ring/?answer=27256#post-id-27256