I want to create the matrix which corresponds to multiplication with x^m %p for a given polynomial p. This means the matrix consists of the coefficients of the polynomials x^m%p, x^*(m+1)%p, etc. When I try the following in Sage, it fails because leading zeros in the vector are skipped:
ms2 = matrix(GF(2),[[vector(GF(2),x^8%p2)],[vector(GF(2),x^9%p2)], [vector(GF(2),x^10%p2)]]) Traceback (click to the left for traceback) ... ValueError: incorrect dimensions The vectors itself seem to have the correct values, but the length is wrong for some: [[vector(GF(2),x^8%p2)],[vector(GF(2),x^9%p2)],[vector(GF (2),x^10%p2)]] [[(0, 1)], [(0, 0, 1)], [(1, 1)]] Giving a length parameter to the vector did not work either: [vector(GF(2),3,x^8%p2)] Traceback (click to the left for traceback) ... TypeError: object of type 'sage.rings.polynomial.polynomial_gf2x.Polynomial_GF2X' has no len() I am a newby to sage, but have used other computer algebra systems before. Andreas --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
