Processing math: 100%
Ask Your Question
0

how to make an Macaulay matrix from polynoms over GF(2)

asked 7 years ago

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I have a PolynomialRing(GF(2),'x1,x2,x3') and over it two polynomials x1*x2 + x1*x3 + x1, x1+x2+1 and I would like to rewrite it in Macaulay matrix in order x1x1, x1x2, x2x2, x1x3, x2x3, x3x3,x1,x2,x3, absolute term so it should be

0 1 0 1 0 0 1 0 0 0 
0 0 0 0 0 0 1 1 0 1

Is there something in sage ?

Preview: (hide)

Comments

It seems that the only related function is R.macaulay_resultant(...) if R is your polynomial ring, that takes a list of n homogeneous polynomials (if n is the number of variable) and computes their Macaulay resultant. You can inspect the code (using for instance R.macaulay_resultant??) and copy the parts that are useful for your needs.

B r u n o gravatar imageB r u n o ( 7 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 7 years ago

dan_fulea gravatar image

I suppose that the question wants to build the corresponding matrix in the peculiar order of all monomials of degree 2 given above, that works for all (not so many) possible polynomials of degree 2 in the given ring. The hint MacCaulay was actively ignored in my following answer / sample code, since i considered the task as a task of identifying coefficients of polynomials.

F = GF(2)
R.<x1,x2,x3> = PolynomialRing( F )
p, q = x1*x2 + x1*x3 + x1, x1 + x2 + 1

degrees = ( (2,0,0),
            (1,1,0),
            (0,2,0),
            (1,0,1),
            (0,1,1),
            (0,0,2),
            (1,0,0),
            (0,1,0),
            (0,0,1),
            (0,0,0), )
d = len(degrees)

print matrix( F, 2, d, [ [ pol.coefficient( dict( zip( (x1,x2,x3) , degtuple ) ) )
                                            for degtuple in degrees ]
                         for pol in ( p, q ) ] )

This gives:

[0 1 0 1 0 0 1 0 0 0]
[0 0 0 0 0 0 1 1 0 1]
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 7 years ago

Seen: 572 times

Last updated: Nov 07 '17