Do you mean something like:

R.<Xbar> = PR.quotient(PR.ideal(p))
# change your formulas to Xbar instead of X
A \ b
# ==> (a^3 + a, a^2, (a^3 + a^2)*Xbar^2 + (a + 1)*Xbar + a^3 + a)

-Ivan

On Oct 23, 2013, at 1:14 PM, Juan Grados <[email protected]> wrote:

> Yes, but p(x) is fixed polynomial here my code
> 
> m = 4;delta = 3;N = 2^m
> K_.<a> = GF(2);
> F.<a> = GF(2^m)
> PR = PolynomialRing(F,'X')
> X = PR.gen()
> a11 = (a^2)*(X^3)+(a^11)*(X^2)+1
> a12 = (a)*(X^4)+(a^13)*(X^3)+X+1
> a13 = X^2+(a^13)*(X^3)+a*(X^2)+1
> a21 = X^3
> a22 = X+a
> a23 = X^2+X^3+a*X
> a31 = (a^12)*X+a*(X^2)
> a32 = (a^8)*(X^2)+X^2+X^3
> a33 = a*X + (a^2)*(X^3)
> A = matrix([[a11,a12,a13],[a21,a22,a23],[a31,a32,a33]])
> b = 
> vector([(a^6)*(X^14)+X^13+X,a*(X^2)+(X^3)*(a^11)+X^2+X+a^12,(a^8)*(X^7)+a*(X^2)+(a^12)*(X^13)+X^3+X^2+X+1])
> p = (a^2 + a)*X^3 + (a + 1)*X^2 + (a^2 + 1)*X + 1
> 
> I need 
> 
> matrix(PolynomialModRing(p),A)\vector(PolynomialModRing(p),b)
> 
> but PolynomialModRing not exist ...
> 
> 
> 2013/10/23 John Cremona <[email protected]>
> On 23 October 2013 19:50, Juan Grados <[email protected]> wrote:
> > Is there in sage, any instruction to solve a linear system equations
> > module p(x) (polynomial over finite field), where the system coefficients
> > are polynomials over finite field?. I know that for integers exists, example
> > (thanks Purkayastha)
> >
> > sage: I6 = IntegerModRing(6)
> > sage: M = random_matrix(I6, 4, 4)
> > sage: v = random_vector(I6, 4)
> > sage: M \ v
> > (4, 0, 2, 1)
> >
> 
> You could try doing exactly the same thing, and it works:
> 
> sage: R.<x> = PolynomialRing(GF(17))
> sage: M = random_matrix(R, 4, 4)
> sage: v = random_vector(R,4)
> sage: M \ v
> ((12*x^8 + 10*x^7 + 11*x^6 + 7*x^5 + 10*x^4 + 16*x^3 + 11*x^2 + 6*x +
> 13)/(x^8 + 15*x^7 + 8*x^6 + 5*x^5 + 15*x^4 + 14*x^3 + x^2 + 4*x),
> (2*x^8 + 8*x^7 + 2*x^6 + 11*x^5 + 12*x^4 + 15*x^3 + 5*x^2 + 3*x +
> 5)/(x^8 + 15*x^7 + 8*x^6 + 5*x^5 + 15*x^4 + 14*x^3 + x^2 + 4*x),
> (12*x^8 + 3*x^7 + 12*x^6 + 10*x^5 + 14*x^4 + 7*x^3 + 7*x^2 + 7*x +
> 10)/(x^8 + 15*x^7 + 8*x^6 + 5*x^5 + 15*x^4 + 14*x^3 + x^2 + 4*x),
> (14*x^8 + 6*x^7 + 12*x^6 + 13*x^5 + 4*x^4 + 13*x^3 + 8*x^2 + 5*x +
> 3)/(x^8 + 15*x^7 + 8*x^6 + 5*x^5 + 15*x^4 + 14*x^3 + x^2 + 4*x))
> 
> John Cremona
> 
> > thanks
> >
> > --
> > ---------------------------------------------------------------------
> > MSc. Juan del Carmen Grados Vásquez
> > Laboratório Nacional de Computação Científica
> > Tel: +55 24 2233-6260
> > (http://www.lncc.br/)
> > http://juaninf.blogspot.com
> > ---------------------------------------------------------------------
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "sage-support" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > To post to this group, send email to [email protected].
> > Visit this group at http://groups.google.com/group/sage-support.
> > For more options, visit https://groups.google.com/groups/opt_out.
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 
> -- 
> ---------------------------------------------------------------------
> MSc. Juan del Carmen Grados Vásquez
> Laboratório Nacional de Computação Científica 
> Tel: +55 24 2233-6260
> (http://www.lncc.br/)
> http://juaninf.blogspot.com
> ---------------------------------------------------------------------
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to