Ask Your Question

nd's profile - activity

2019-10-10 03:00:49 -0500 received badge  Popular Question (source)
2017-04-14 09:15:59 -0500 answered a question Compute elementary Symmetrical functions on roots of a polynomial

To compute the elem. sym pol. on some (calculated) roots y1,...,y6, I create the ring R=PolynomialRing(ZZ,6,'y') and RR.<T>=R[]. I can assign some calculated values to these yi's. Then one forms the the polynomial P=(T-y1)*...*(T-y6) and then:

[e(SymmetricFunctions(RR.base_ring().from_polynomial(P.coefficients()[i])) for i in range(0,P.degree()+1)]

withe=SymmetricFunctions().elementary()

then these coefficients appear in the form of a sum of elementary functions e[4,2,1..]=e[4]*e[2]*e[1]...

Then I identify "by hand" the e[i]'s

2017-04-14 04:38:00 -0500 received badge  Associate Editor (source)
2017-04-14 03:44:00 -0500 answered a question How to find the multiplicative order of an element in a quotient ring over finite field ?

You have (X+1)^2k = X^2k + 1 + 2(...) so ( X+1 )^2k = 0 mod ( X^2k +1 , 2 )

In other words (X+1)^n is nilpotent in any ring F2[X]/(X^n+1) when n is even, so it remains to concentrate on odd values of n

try something like this (N rather small...)

for i in range(2,10):

A=R.quo(x^(2*i+1)+1);j=2 while A((x+1)^j)<>A(x+1): j=j+1

2017-04-13 16:17:12 -0500 received badge  Commentator
2017-04-13 13:56:00 -0500 commented answer Compute elementary Symmetrical functions on roots of a polynomial

Yes but this is not only symbolic computation as I have some calculated values for a,b,c.., say a=u1*u2 and b=u3*u4 and c=u5*u6. Then how to assign them to the e's? (and the ui's can be complicated !

e[2].expand(3) = ab+ac+bc=(u1*u2)*(u3*u4)+(u1*u2)*(u5*u6)+(u3*u4)*(u5*u6)

2017-04-13 09:57:55 -0500 asked a question Compute elementary Symmetrical functions on roots of a polynomial

How to compute the elementary symmetric functions e[1,1,..]'s of given variables a,b,c,..., typically computing "elements" on roots of a polynomial? This seems such a basic question, but I can't find anywhere.

2016-02-13 05:56:43 -0500 answered a question Constraints on polynomial coefficients

When I use several ideals, I don't have commutativity. Is this normal?

R.<x,a,b>=QQ[]

P1=(X-a)*(X-b)

I=R.ideal(a+b)

J=R.ideal(a*b)

A=P.mod(I).mod(J) => X^2 - b^2

B=P.mod(J).mod(I) => X^2

A==B; => False

2016-02-13 05:41:44 -0500 commented answer Constraints on polynomial coefficients

When I use several ideals, I don't have commutativity. Is this normal?

R.<x,a,b>=QQ[]

P1=(X-a)*(X-b)

I=R.ideal(a+b)

J=R.ideal(a*b)

A=P.mod(I).mod(J) => X^2 - b^2

B=P.mod(J).mod(I) => X^2

A==B; => False

2016-02-12 04:30:13 -0500 answered a question Constraints on polynomial coefficients

I still have 2 concerns if you can help!

Q.<x,a>=QQ[];

P = 5 * X^2 + 3 * a^2 * X + 5 - a^2

If: I=Q.ideal(a^2-5)

=> 5X^2 + 15X # OK

However, this doesn't work modulo any integer:

P.mod(n) = 0 whatever n.

Merci!

Secondly, when I use several ideals, I don't have commutativity. Is this normal?

R.<x,a,b>=QQ[]

P1=(X-a)*(X-b)

I=R.ideal(a+b)

J=R.ideal(a*b)

A=P.mod(I).mod(J) => X^2 - b^2

B=P.mod(J).mod(I) => X^2

A==B; => False

2016-02-12 04:28:39 -0500 answered a question Variables in a polynomial

I still have one concern if you can help!

Q.<x,a>=QQ[];

P = 5 * X^2 + 3 * a^2 * X + 5 - a^2

If: I=Q.ideal(a^2-5)

=> 5X^2 + 15X # OK

However, this doesn't work modulo any integer:

P.mod(n) = 0 whatever n.

Merci!

2016-02-11 12:07:04 -0500 commented answer Constraints on polynomial coefficients

Yes, you are perfectly right. I answered this because I was using coefficients defined on a number field, and the "mod" didn't work because I firstly defined the number field and then the ring. I discovered that if instead you define the ring and then the number field as an extension, the method works, at least for what I tried so far. I didn't have time to explain more my comment in between, and I thank you for your help.

2016-02-11 09:12:25 -0500 answered a question Variables in a polynomial

Perhaps this example might be more understandable. Take a field " E " generated by " r " (here, "r" is a root of X^3 - 2 ) and 3 variables " b0 , b1 , b2 ".

I produce the element " A = b0 + r * b1 + r^2 * b2 " and it's square:

A^2 = b0^2 + (2r) * b0 * b1 + (r^2) * b1^2 + (2r^2) * b0 * b2 + 4 * b1 * b2 + (2*r) * b2^2

Notice that "r" is in a number field. I want to express A and A^2 in terms of the basis "( 1 , r , r^2 )" so that the result becomes:

A^2 = r^2 ( b1^2 + 2 b0 * b2 ) + r ( 2 b0 * b1 + 2 b2^2 ) + ( b0^2 + b2^2 + b1 * b2 )

I edit as I seem to have found a solution. I need to define the number field as an extension of the ring of coefficients and the other way round! Good.

B=PolynomialRing(E,3,'b');

v=B.gens()

E.<r>=B.extension(x^3-2)

A^2=sum( [v[i] * r^i for i in range(3) ] )

gives me the solution:

(b1^2 + 2b0b2)r^2 + (2b0b1 + 2b2^2)r + b0^2 + 4b1*b2

result expressed in terms of powers of "r".

2016-02-11 03:44:44 -0500 commented answer Variables in a polynomial

Perhaps this example might be more understandable. Take a field " E " generated by " r " (here, "r" is a root of X^3 - 2 ) and 3 variables " b0 , b1 , b2 ".

I produce the element " A = b0 + r * b1 + r^2 * b2 " and it's square:

A^2 = b0^2 + (2r) * b0 * b1 + (r^2) * b1^2 + (2r^2) * b0 * b2 + 4 * b1 * b2 + (2*r) * b2^2

I want to express A and A^2 in terms of the basis "( 1 , r , r^2 )" so that the result becomes:

A^2 = r^2 ( b1^2 + 2 b0 * b2 ) + r ( 2 b0 * b1 + 2 b2^2 ) + ( b0^2 + b2^2 + b1 * b2 )

I haven't found a method so far.

E.<r>=NumberField(x^3-2)

B=PolynomialRing(E,3,'b');v=B.gens()

A=sum( [v[i] * r^i for i in range(3) ] )

2016-02-11 02:24:16 -0500 commented answer Constraints on polynomial coefficients

Perhaps I wasn't clear at all. I have a polynomial where the coefficients are parameters. I take the example of

P = ( X - a0) * (X -a1) = X^2 + (-a0 - a1)*X + a0 * a1

I want to impose an equation on the parameters who belong to a field ("QQ" here), say "a0 + a1 = 0".

The result must be:

P = X^2 + a0 * a1

A=PolynomialRing(QQ,2,'a')

v=B.gens()

R.<x>=PolynomialRing(A)

P=R( ( X - v[0] ) * ( X - v[1] ) ) ; # P = ( X - a0) * (X -a1)

2016-02-10 14:29:23 -0500 answered a question Constraints on polynomial coefficients

Observe that the result is " X^2 - b^2 " while in case of " a+b=0", you should obtain " X^2 - a*b ".

Am still trying !

2016-02-09 12:24:49 -0500 asked a question Constraints on polynomial coefficients

Given a polynomial P=(X-a)(X-b)(X-c) over Q[a,b,c][X] , how can I force the coefficients to fullfill constraints such as elementary symetric function a+b+c=0 or abc=2, some polynomial constraint on coefficients.

It is a bit like using coefficients on a number field with the constraint of a minimal polynomial but with different constraints here.

A simple example: if P = ( X - a ) ( X - b ) and a + b = 0 then I want to find P = X^2 - ab

2016-02-08 08:16:29 -0500 answered a question Variables in a polynomial

modified below

2016-02-08 06:48:10 -0500 asked a question Variables in a polynomial

I edited my question and put the answer I found, so this solves my problem!

My problem was: take a field " E " generated by " r " (here, "r" is a root of X^3 - 2 ) and 3 variables " b0 , b1 , b2 ".

I want to produce the element " A = b0 + r * b1 + r^2 * b2 " and it's square:

A^2 = b0^2 + (2r) * b0 * b1 + (r^2) * b1^2 + (2r^2) * b0 * b2 + 4 * b1 * b2 + (2*r) * b2^2

and express A and A^2 in terms of the basis "( 1 , r , r^2 )" so that the result becomes:

A^2 = r^2 ( b1^2 + 2 b0 * b2 ) + r ( 2 b0 * b1 + 2 b2^2 ) + ( b0^2 + b2^2 + b1 * b2 )

The solution was simply to define the number field as an extension of the ring of coefficients and the other way round! Good!

B=PolynomialRing(E,3,'b');

v=B.gens()

E.<r>=B.extension(x^3-2)

A^2=sum( [v[i] * r^i for i in range(3) ] )

gives me the solution:

(b1^2 + 2b0b2)r^2 + (2b0b1 + 2b2^2)r + b0^2 + 4b1*b2

result expressed in terms of powers of "r".

2015-12-16 18:57:53 -0500 commented question multiplication matrix in number field

Sorry for late response. Very interresting too & thanks as I alos need this approach for different usage. I might come back!

2015-11-02 14:28:32 -0500 received badge  Scholar (source)
2015-11-02 14:28:17 -0500 answered a question multiplication matrix in number field

Great & thanks for your prompt answer! Indeed, Sage kept using the primitive element z of K instead of k.gens() within an order as defined on L, and I couldn't go around that. I will have a closer look to the number field element page and the .matrix(). to understand your answer.

2015-11-02 12:52:13 -0500 received badge  Student (source)
2015-11-02 12:36:58 -0500 edited question multiplication matrix in number field

Hello Given two integral numbers, say a and b such that a^3=2 and b^2=3, I want to check "by hand" that a+b is again integral over Z. To do that, I want to build the matrix of the linear transform "m: multiplication by a+b on the number field Q(a,b)

since a+b is obviously an eigenvalue, i.e. root of it's caracteristic polynomial which then SAGE can compute for me). Then I can check that (a+b).minpoly() gives the same result as P(X)=(M-XI).determinant() and then after coercision within Q.<x>=QQ[], P=Q(P), check P.is_irreducible(), meaning a+b integral.

Thus, given a basis (1,a,a²,b,ab,a²b) for Q(a,b), one can determine the matrix "by hand": each column is the image of each element times a+b: (transpose the vectors bellow)

  • 1st is:(a+b).1=[0,1,0,1,0,0],
  • 2d is (a+b).a=[0,0,1,0,1,0],
  • 3d is (a+b).a²=[2,0,0,0,0,1],
  • 4th is (a+b).b=[3,0,0,0,1,0],
  • 5th is (a+b).ab=[0,3,0,0,0,1],
  • 6th is (a+b).a²b=[0,0,3,2,0,0]

One can define the extension k.<a,b>=NumberField([x³-2,x²-3]), isomorphic to z⁶-9*z⁴-4*z³+27*z²-36*z-23 (via k.absolute_field() . Then, I don't know how to do these calculations automatically within SAGE:

=> for example: how make the vector a²=[0,0,1,0,0,0] become (a+b).a²=2+a²b=[2,0,0,,0,1] after multiplication of by a+b given the relations a³=2 and b²=3? ?