[sage-support] Dealing with algebraic elements and rational functions

2009-03-20 Thread luisfe
Hi all, I am wondering how to make some computations with rather specific field extensions. I cannot figure out how to solve the following on SAGE. Mathematically, I have the following field: Q(x,y,z,t,a) Where x,y,z,t are indeterminates and "a" is an algebraic number over the rationals (lets s

[sage-support] Re: Dealing with algebraic elements and rational functions

2009-03-22 Thread luisfe
On 20 mar, 14:07, Mike Hansen wrote: > The best way to work with this object is to do like you did: > > sage: K.=NumberField(x^4+x+1) > sage: R.=K['x,y,z,t'] > > Then, we can construct some elements of this field: > > sage: f = (a^2*x + y)*(z+a*t); f > (a^2)*x*z + y*z + (a^3)*x*t + (a)*y*t > sa

[sage-support] Re: Fwd: sage bug report

2009-12-17 Thread luisfe
On 17 dic, 11:48, "ma...@mendelu.cz" wrote: > And another observation: > > maxima returns answer immediatelly (with a lag necessary to start > maxima) > m is the original matrix from x.py > > sage: m._maxima_().determinant().expand().sage() > x0^2*x2^2*x3^2*x7^2 - 2*x0*x1*x2*x3*x4*x5*x6*x7 + x1^

[sage-support] Re: How to convert a symbolic expression to a multivariate polynomial efficiently?

2013-02-23 Thread luisfe
I think you have more chances if you work in QQ['a']['t1,t2']. In any case, it seems that it is better to convert to your ring using P(f.polynomial(QQ)) than performing substitutions. sage: K=QQ['a']['t1,t2'] sage: K1=SR['t1,t2'] sage: f=SR(K.random_elemen

[sage-support] Re: sage 5.7 interface

2013-03-06 Thread luisfe
The thing is with the sage windows appliance as has been said. In order to keep the ova file to the minimum most programs has been erased, including gedit. I think that in your case your best bet would be to download a virtualbox image of a linux distibution that is supported by sage (fedora or

Re: [sage-support] Can I change QQ[sqrt(a),sqrt(b)] to QQ[\alpha] ?

2013-12-12 Thread luisfe
> > > Nevermind, I found it. > > Call K2.structure() for the maps. > > Thank you! > > Moreover, you can register these isomorphisms as coercions. I do not recommend the following for noninteractive scripts. But I find it very convenient: sage: K=QQ[sqrt(2),sqrt(3)] sage: s2,s3=K.gens() sage:

[sage-support] Re: groebner bases of polynomials with complex coefficients

2014-02-17 Thread luisfe
On Monday, February 17, 2014 6:39:38 PM UTC+1, sahi...@gmail.com wrote: > > OK, I tried the following: > > S. = PolynomialRing(QQ,order='lex') > I = ideal(i^2+1,(1+i)*x+y,x+(1-i)*y-(1-i)) > G = I.groebner_basis() > G > > would give me > > [i - x - 1, x^2 + 2*x + 2, y - 2] > > which are the result

Re: [sage-support] segmentation fault computing discriminants

2014-03-26 Thread luisfe
On Wednesday, March 26, 2014 10:34:35 AM UTC+1, John Cremona wrote: > > Looking at the code used, it uses the resultant formula which in turn > evaluates a determinant. I agree with you that for small degrees it > would be better (almost certainly in a lot of cases) be better to > substitute in

[sage-support] Re: numerator has a funny parent() -- intentional ?

2010-03-02 Thread luisfe
On 1 mar, 20:46, Pierre wrote: > oooh wait wait wait. I've said something totally confusing. > > My previous two posts apply to rational fractions... for which indeed, > the numerator method gives the 'correct' answer ! The issue I raised > in my original post is the 'funny' behaviour when you a

[sage-support] Re: numerator has a funny parent() -- intentional ?

2010-03-02 Thread luisfe
> -For the denominator: if there is a denominator function for the > coefficients and these denominators have a lcm function, then return > the lcm of the coefficients. This is an element of K, not K[x1,...,xn] ooops This sould read an element of wherever the denominator of elements in K live. --

[sage-support] cython cimport problems

2010-03-21 Thread luisfe
.3.3/devel/sage-luisfe/sage/libs/ntl/ntl_ZZ.pxd":4 * include "decl.pxi" * * cdef class ntl_ZZ: # <<<<<<<<<<<<<< * cdef ZZ_c x * cdef public int get_as_int(ntl_ZZ self) */ str

[sage-support] Re: p-adic implementation in SAGE

2010-03-24 Thread luisfe
On 24 mar, 06:13, Barukh Ziv wrote: > Dear all, > > I would like to ask you about a problem I am encountering while using > NTL library for p-adic numbers manipulation. Sometimes, I get the > following internal error from NTL function: > > "can't grow this _ntl_gbigint" Are you using ntl_ZZ_p o

[sage-support] Re: p-adic implementation in SAGE

2010-03-24 Thread luisfe
On 24 mar, 12:53, Barukh Ziv wrote: > Guys, > > Thank you for the quick reply. I will answer to both questions: > > > Are you using ntl_ZZ_p or ntl_ZZ_pE? I have experienced the same type > > of errors with the latter (due to bad manipulations of > > ntl_ZZ_pEContext by myself. > > Yes, I experi

[sage-support] Re: Conversion from number field to polynomial

2010-04-19 Thread luisfe
On 19 abr, 12:07, "samuele.anni" wrote: > Hello, > I'm trying to implement an algorithm for complete my thesis work about > congruence between modular forms and Galois representation. > A step of the algorithm I am working on consists in replacing a > generator of the number field with a fixed v

[sage-support] Possible bug in relative number fields homomorphisms

2010-07-02 Thread luisfe
I found the following: {{{ sage: N. = NumberField([x^2-2, x^2-3, x^2-5],'s2,s3,s5') sage: M = N.absolute_field('gamma') sage: N_to_M = M.structure()[1] sage: phi = N.hom([N_to_M(s2)]) sage: phi(s2) == N_to_M(s2) True sage: phi(s3) == N_to_M(s3) True sage: phi(s5) == N_to_M(s5) False sage: phi(s5)

[sage-support] Re: why does constructing this ring take forever?

2010-07-07 Thread luisfe
On Jul 7, 2:21 am, dmharvey wrote: > sage: R. = PolynomialRing(Integers(16219299585*2^16612 - 1)) > > Maybe not literally forever, but I got sick of waiting. Should be > instantaneous. > > david When constructing a polynomial ring over Z/nZ sage distingishes between prime modulus or not. Moreov

[sage-support] Re: Factoring denominator of a rational function

2010-09-04 Thread luisfe
On Sep 4, 5:54 am, Cary Cherng wrote: > I have a rational function P(x)/Q(x) with numerators and denominators > of very large degree. From the context I know that a certain > polynomial p(x) should divide the denominator. If I multiply the > numerator by p(x) giving p(x)*P(x)/Q(x) how do I get

[sage-support] Re: Testing if polynomial is in ideal

2010-09-08 Thread luisfe
On Sep 8, 2:49 am, Cary Cherng wrote: > This works but is too slow for more complicated examples. Is there a > way to speed up "x in I" for much bigger examples? Or does this > already use the fastest algorithm based on groebner basis or something > else. Blind checking if a polynomial is in an

[sage-support] Re: common devisor

2010-09-27 Thread luisfe
On Sep 27, 3:34 pm, Johannes wrote: > Hi list, > is there a way to get a sum of fraction to a common devisor? or even > better into a product of a fraction like \frac{1}{something here} and a > sum of integers? > and my next step would be this, i dont have a single value, which i want > to get as

[sage-support] Re: Lot of segfaults...

2010-10-20 Thread luisfe
On Oct 16, 1:59 pm, Thierry Dumont wrote: > Hello, > > On our Sage server, we have a lot a students doing simple computer algebra. > Our version of Sage is 4.5.3 on Debian Lenny. > > We have a lot of segfaults in maxima: Could you post more information of the problem? Did you install sage from

[sage-support] Re: sage won't simplify something that is clearly 0

2010-11-04 Thread luisfe
On 2 nov, 17:00, "Rob H." wrote: > Hi, > > so here is some sample code: > > var('chi,k') > R.=SR[] > I=R.ideal(x^2) > Rbar.=R.quotient_ring(I) > expr=Rbar(epsilon-(chi^(k-1))^5+chi^(2*k-2)*(chi^(k-1))^3) > view(expr) > print (expr) For the kind of operations you are doing, you should work in QQ[]

[sage-support] Polyhedron from inequalities

2010-11-04 Thread luisfe
Suppose that I define a set of equalities and inequalities {{{ sage: var('x,y,z,t') (x, y, z, t) sage: L = [x==y+z, x>=t-z, x+3*y<=0] }}} Is there an easy way to construct the Polhyedron of the solutions of this system? The constructor of Polyhedron does not seem very user- friendly for Hrepresen

[sage-support] Re: Bug in Group Algebra

2010-11-04 Thread luisfe
On 28 oct, 18:05, VictorMiller wrote: > Using sagenb.org: > > sage: G = SymmetricGroup(5) > sage GA = G.algebra(QQ) > sage: GA.gens() > > Traceback (click to the left of this block for traceback) > ... > RuntimeError: Free module generated by SymmetricGroup(5) over Rational This is a known issue

[sage-support] Re: Ring homomorphism bug?

2010-11-04 Thread luisfe
On 14 oct, 22:07, "D. Monarres" wrote: > Hello all, > > Just wondering if I am doing everything correctly or if I have > stumbled onto a bug (or something that needs to be implemented) > > I am writing a tutorial for students using Sage in an introductory > abstract algebra course and the follow

[sage-support] Re: elimination of variables

2010-11-06 Thread luisfe
On 5 nov, 21:45, andrew ewart wrote: > i want to write a polynomial p of variables x and y such that > p(x,y)=0 > > i also have that x and y can be expressed in terms of a variable u > such that >  2x=2u^2+2u-1 and > -y^2=u^4+2u^3-2u-1 > > how to write code to eliminate u, hence finding p You cou

[sage-support] Re: radical ideals check

2010-11-08 Thread luisfe
On 8 nov, 19:34, andrew ewart wrote: > I want to write code  that does the following > Given ideals I,J in CC[x1,...,xn] > check if Radical(I+J)=Radical(I)+Radical(J) > also maybe throw in an example of yes and no just to see it working > > Radical(I)={f:there is an m such that f^m is in I} (f i

[sage-support] Re: Bug in genus of an ideal

2010-11-22 Thread luisfe
On Nov 21, 6:22 am, VictorMiller wrote: > sage: T. = QQ[] > sage: TJ = Ideal([t1^2 + u1^2 - 1,t2^2 + u2^2 - 1, (t1-t2)^2 + (u1- > u2)^2 -1]) > sage: TJ.genus() > 4294967295 > sage: TJ.dimension() > 1 Yes, there is a bug in the code. If I try Sage 32 bits, the answer to TJ.genus() is -1. Is I us

[sage-support] Re: multi(?) polynomial ring question

2010-12-05 Thread luisfe
In this case, I tend to agree with Palmieri. On Dec 4, 10:27 pm, William Stein wrote: > I very strongly disagree. What's wrong with making a polynomial ring > with two distinct variables whose *print* names you happen to set to > be the same?The variables are different. It's just that they

[sage-support] Re: newbie working in polynomial quotient rings

2010-12-05 Thread luisfe
On Dec 5, 1:58 pm, eggartmumie wrote: > Hi, > I am a newbie working in polynomial quotient rings: > I want to implement the Patterson algorithm to decode Goppa Codes. > Therefore, I need to split a polynomial p in a quotient ring in its > even part p0 and its odd part p1 > such that p(z) = p0^2(z)

[sage-support] Re: intersection of ideals

2010-12-07 Thread luisfe
On Dec 7, 5:03 pm, andrew ewart wrote: > I have the following code > > P. = PolynomialRing(QQ,order='degrevlex') > I = Ideal(x0^4-y0,x0^3*x1-y1,x0*x1^3-y2,x1^4-y3) > print I > R. = PolynomialRing(QQ,order='degrevlex') > I1=Ideal(1) > J=I.intersection(I1) > print J > but gives error > File "/usr/lo

[sage-support] Re: Hermite Normal Form

2010-12-28 Thread luisfe
On Dec 28, 5:27 pm, Santanu Sarkar wrote: > Is there any faster method to compute Hermite Normal Form > of a matrix A and corresponding transformation matrix? I use > A.hermite_form(transformation=true). However it is very slow. > > Also is there any transformation matrix corresponding to the L

[sage-support] Re: Hermite Normal Form

2010-12-28 Thread luisfe
On Dec 28, 6:23 pm, Santanu Sarkar wrote: > Size of my matrix is (90, 36) with entries are around 2^1000. What is the > fastest > method to compute Hermite Normal Form? In that case, the fastest may be the default one you are already using. Note that computing the Hermite form is fast, the hard

[sage-support] Re: simplify ans sqrt

2011-01-26 Thread luisfe
On Jan 26, 8:42 am, Loïc wrote: > Hello list, > > Version: sage 4.6.1 > I'm quite a newbie with Sage but I'm really impressed this powerful > software. > Since an hour, I'm on a stupid problem: > > sage: sqrt(2)*sqrt(3) > sqrt(2)*sqrt(3) > sage: sqrt(2)*sqrt(3)-sqrt(6) > sqrt(2)*sqrt(3)-sqrt(6) >

[sage-support] parallel map

2011-02-12 Thread luisfe
I thought I have already asked this. But I do not see it on the history of the group. Apologize for multiple posting. Is there an equivalent in Sage to ParallelMap in mathematica? I am looking a method that applies a given function to a list of objects for a small presentation of Sage I am prepa

[sage-support] Re: Error in using PolynomialRing(QQ, vars) and elimination_ideal()

2011-02-14 Thread luisfe
The first method creates the ring AND add the variables so that they are available to the user by tipping their name. for instance: sage: R.=QQ[] sage: x x sage: type(x) Note that this is not python, but a sage-specific shortcut. However, the second creation of R only creates a polynomial ring

[sage-support] Re: Isolating real roots of exact univariate polynomial

2011-02-18 Thread luisfe
Just for the record. The problem seems to be related to RIF. For the inexact ring RR, it works: len(e.roots(ring=RR)) 13 len(e.real_roots()) 13 numeric approximations of the two missing roots are: 0.953956769342757, 0.957223630414975 This pair of roots is exactly the pair of most close roots am

[sage-support] Re: Intersection of complex Ideals

2011-03-01 Thread luisfe
Robert, You have been answered how to solve the problem. But I would like to remark Volker's advice. Do not use ideals over CC. CC is an inexact ring, so most operations will fail. Work instead over the rationals. R. = PolynomialRing(QQ,2) or if you need complex numbers, you may try with a numb

[sage-support] Re: Intersection of complex Ideals

2011-03-01 Thread luisfe
No, it is not an exact computation over the complex, they are gauss rationals a+b*I where a and b are rationals. As far as I know there is no exact complex field implementation that is good for working with ideals. What kind of generators of ideals are you dealing with? Note that even if the inpu

[sage-support] Re: Intersection of complex Ideals

2011-03-01 Thread luisfe
On Mar 1, 12:59 pm, Robert Goss wrote: > > What kind of generators of ideals are you dealing with? > > For reference all the input generators are in QQ. > > Robert Then, definitely you should work in PolynomialRing(QQ,2) -- To post to this group, send email to sage-support@googlegroups.com To u

[sage-support] Re: full_simplify and trig_simplify

2011-03-09 Thread luisfe
hi Jose Luis, By the error do you mean a NameError? There are no such global functions defined in Sage. I would rather use simplify_full and simplify_trig because there would be easier to discover by a user writing simpl and pressing tab. On the one hand it is true that for newcomers simplify_fu

[sage-support] Re: Decomposing polynomials from other polynomials using Gröbner bases

2011-04-05 Thread luisfe
On Apr 5, 2:10 pm, "Johan S. R. Nielsen" wrote: > Oops, continuing: > > more precisely, we wish to find a q in Q[Y1, Y2] such that q(f1, f2) = > g. In this case, we have > q(Y1, Y2) = Y1^2 + Y1*Y2 - Y2 > as a solution, as > f1^2 + f1*f2 - f2 = g This is an elimination problem. Note that it is n

[sage-support] Re: Polynomials Mod 7

2011-07-15 Thread luisfe
On Jul 14, 3:23 am, Mel wrote: > Hi, > > I've been having an issue with a program I've written in sage. I need > to calculate a polynomial mod 7. When I do this using the command > line, I don't have any trouble. Example: > > sage: x = var('x') > sage: y = var('y') > sage: IntegerPolyRing. = ZZ

[sage-support] Re: How to calculate the affine coordinats of a point

2011-07-18 Thread luisfe
On Jul 16, 1:33 am, Johannes wrote: > a very easy example would be this: > > sage: p1 = vector([-3,1,1]) > sage: p2 = vector([1,-3,1]) > sage: p = vector([0,-2,1]) > > #now i'm looking for some x,y such that > #x * p1 + y * p1 == p > > x,y = var('x,y') > sage: assume(x > 0) > sage: assume(y > 0) >

[sage-support] Re: How to calculate the affine coordinats of a point

2011-07-18 Thread luisfe
On Jul 18, 3:48 pm, Johhannes wrote: > thnx. > > I see that the problem can be also formulated as marix problem. but > the way i did it is in this case the more natural one for me. > is there any reason why it only works this way and solve does not lead > to any result? For me it looks like:

[sage-support] Re: Bug in pari/gp or sage? Any fixes?

2011-09-13 Thread luisfe
On Sep 13, 9:11 am, vasu wrote: > Hi all > I am trying to run a particular piece of code and it gives an error > saying there is a bug in Pari/gp. It turns out that the bug is not > present in previous versions of Pari like 2.3.4 (on Windows at least). > And if I understand correctly that Sage shi

[sage-support] Re: Bug in pari/gp or sage? Any fixes?

2011-09-16 Thread luisfe
On Sep 15, 12:43 pm, Amir wrote: > Hi > > I have the same problem. I am using sage 4.6 installed on windows > vista. This is part of code I have written in sage. Is there anyway I > can catch this error and make an exception? > > Thanks An exception is not the way to dela with this error. We n

[sage-support] Problem with VirtualBox image

2011-09-23 Thread luisfe
Hi list, I have downloaded the virtualbox sage image to run under windows to make a presentation of the capabilities of Sage. I wanted to try in windows and an old machine to try to force things. So I took my five- years good old laptop. The problem is that sage in virtualbox does not run. Sage c

[sage-support] Re: Problem with VirtualBox image

2011-09-23 Thread luisfe
On Sep 23, 7:06 pm, Volker Braun wrote: > I'll look into lowering the processor requirements. Though SSE3 has been out > for a looong time... > > You can rebuild Sage inside the virtual machine. Just interrupt the notebook > server (Ctrl-C), go to the Sage directory, run "make distclean" and the

[sage-support] Re: Increasing memory limit?

2011-10-17 Thread luisfe
> On Oct 17, 2:51 pm, Eric wrote: > Does anyone know how to enlarge the memory limits set by sage? > > I get the following message when running a certain computation that > involves computing large determinants. > > Memory limit reached. Please jump to an outer pointer, quit program > and enlarge

[sage-support] Re: Question about minimal polynomial to build GF

2011-12-12 Thread luisfe
> sage: > F.=GF(2^8,name='x',modulus=z^8+z^4+z^3+z^2+1,check_irreducible=False) > sage: F > Finite Field in x of size 2^8 > sage: F.polynomial() > x^8 + x^4 + x^3 + x^2 + 1 > > Andrzej Chrzeszczyk In this case sage does not complaint, but check_irreducible is not intended for this use, but to avoi

[sage-support] Re: Question about scoping

2012-01-17 Thread luisfe
On Jan 16, 5:53 pm, Ed Scheinerman wrote: > I'm confused by the fact that variables defined inside functions can > "leak out" and become global variables. Here's what I've noticed. The problem is twith the function var. According to its documentation: (var?) "The new variable is both returned

[sage-support] rotation of a scene and tachyon

2012-06-07 Thread luisfe
I have a problem to set an animation. I have the following: sage: L1 = sphere((0,0,0),5) sage: L2 = L1.rotateZ(pi/3) sage: L1.save('one.png',aspect_ratio=[1,1,1],frame=False) sage: L2.s

[sage-support] Re: 2nd try: Integer solutions for systems of linear equations

2012-09-13 Thread luisfe
On Thursday, September 13, 2012 9:46:38 AM UTC+2, moritz wrote: > > Note: The first time I tried to post this it didn't show on the google > groups UI, so I try again.. > --- > > Let's consider a system of linear equations with integer coefficients: > > What is the best way to find an inte

Re: [sage-support] Strange results with multivariate resultants

2012-09-20 Thread luisfe
On Wednesday, September 19, 2012 6:34:52 AM UTC+2, Georgi Guninski wrote: > > Hi, > > I may be missing something, but the resultant = 1 confuses me. > According to wikipedia [1] > the multivariate resultant or Macaulay's resultant of n homogeneous > polynomials in n variables is a polynomial

Re: [sage-support] Strange results with multivariate resultants

2012-09-20 Thread luisfe
On Thursday, September 20, 2012 1:05:56 PM UTC+2, Georgi Guninski wrote: > > pari disagrees with sage and maxima agrees with it. > > which way is it? > > maxima session: > (%i12) p1:(x2)*(x3-x4);p2:x2*(x3-2*x4); > (%i14) resultant(p1,p2,x1); > (%o14) 1 > In

[sage-support] Re: sage disagrees with magma for the genus of a curve over number field

2012-10-01 Thread luisfe
Maple agrees with magma here and says that the genus is one. Moreover, it computes a parametrization of the curve sage: P=(((v + 2)*x^10 + (v - 2))/x^5, ((1/2*v - 3/2))/x^3) sage: p(x=P[0],y=P[1]) 0 The problem seems to be in singular. sage: I = Ideal(p) sage: I.genus() 10 If one looks at th

[sage-support] Re: Floating point exception when factoring over QQ['x,y']

2012-11-28 Thread luisfe
I can confirm the problem with sage 5.4, I cannot reproduce it with sage 5.3 -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-

[sage-support] Re: Floating point exception when factoring over QQ['x,y']

2012-11-29 Thread luisfe
On Wednesday, November 28, 2012 9:27:58 PM UTC+1, Simon King wrote: > > Hi Georgi, > > On 2012-11-28, Georgi Guninski > > wrote: > > Probably the problem is in Singular. > > Probably not. If I am not mistaken, Singular is involved in polynomial > factorisation over *finite* fields. > I agree

[sage-support] Re: differences between the "image()" and "column_space()" commands on a matrix

2017-05-09 Thread &#x27;luisfe' via sage-support
Sage interprets that matrices M acts on row vectors v on the left, v*M so in fact the method image corresponds to row_space >From the help of image: Return the image of the homomorphism on *rows* defined by this matrix. -- You received this message because you are subscribed to the Google Gro

Re: [sage-support] surface normal vector of polyhedron face

2019-02-27 Thread &#x27;luisfe' via sage-support
On Wednesday, February 27, 2019 at 2:52:36 PM UTC+1, Daniel Krenn wrote: > > I suppose in non-full-dimensional case you still can use > > P.inequalities() as above, > > projecting them on the affine hull of P. > > Yes, this is the interesting case. The problem then is going back from > the p

Re: [sage-support] The behavior of empty sums

2019-06-17 Thread &#x27;luisfe' via sage-support
On Monday, June 17, 2019 at 2:12:58 PM UTC+2, Peter Luschny wrote: As I see it the problem is that the sum runs over (0..n-1). > Thus for n = 0 it returns by convention the integer 0 for the > empty sum (is this correct?) which of course has no list. > > But shouldn't it return the null polynomia

Re: [sage-support] The behavior of empty sums

2019-06-17 Thread &#x27;luisfe' via sage-support
On Monday, June 17, 2019 at 2:12:58 PM UTC+2, Peter Luschny wrote: As I see it the problem is that the sum runs over (0..n-1). > Thus for n = 0 it returns by convention the integer 0 for the > empty sum (is this correct?) which of course has no list. > > But shouldn't it return the null polynomi

Re: [sage-support] The behavior of empty sums

2019-06-25 Thread &#x27;luisfe' via sage-support
On Tuesday, June 25, 2019 at 10:03:03 AM UTC+2, Peter Luschny wrote: > > How that? Look at the output above. Sage *knows* that the terms of the sum > are polynomials. So it should return the zero of that ring, which is the > null polynomial. > > Not in the first case, look at what are you passi

[sage-support] Re: Homomorphism from power series ring to residue field

2015-06-09 Thread &#x27;luisfe' via sage-support
Within a specific interactive session, you could do the following, when creating the rings: sage: R = PowerSeriesRing(GF(2),'t') sage: F = R.residue_field() sage: phi = R.hom([0], F) sage: F.register_coercion(phi) This way, you are indicating that the morphism phi should be considered a coercio

[sage-support] Re: elements of a field extensions

2015-06-09 Thread &#x27;luisfe' via sage-support
Have you tried using elimination ideals? K=QQ['s,t,a0,a1,a2'] K.inject_variables() I = Ideal( a0-s^2, a1-t^2, a2 - (s^2+t^2)) I.elimination_ideal([s,t]) Ideal (a0 + a1 - a2) of Multivariate Polynomial Ring in s, t, a0, a1, a2 over Rational Field So a2 = a0 + a1 The elimination ideal tells you wh

[sage-support] Re: elements of a field extensions

2015-06-10 Thread &#x27;luisfe' via sage-support
On Tuesday, June 9, 2015 at 5:36:01 PM UTC+2, black...@gmx.de wrote: > > Thank you, > > and i already tried this. In this case it obiously does work but in case i > have denominators, can u explain me how to solve it? > for example: K(s/(s+t),s^2*t^2) then i have to calculate the elimination >

[sage-support] Re: About finding roots of polynomials in specific domains

2015-06-12 Thread &#x27;luisfe' via sage-support
On Thursday, June 11, 2015 at 5:26:28 PM UTC+2, Phoenix wrote: > I have two polynomials $p(x)$ and $q(x)$ and I want to know if there are > roots of the equation $\frac{p'}{p} = \frac{q'}{q}$ in the domain > $(a,\infinity)$ - where $a = max \{ roots(p),roots(q) \}$ > > This is the same as asking

[sage-support] Re: Expression to polynomial

2015-06-12 Thread &#x27;luisfe' via sage-support
On Friday, June 12, 2015 at 11:17:37 AM UTC+2, Néstor wrote: > Hello, > > I've got a rational expression in sage and I would like to convert it to a > polynomial with coefficients in some fraction field. > > More precisely, I've got something like this: > > a , x = var( 'a , x' ) ; > P = x/a ; >

[sage-support] Re: Computing Grobner Basis for general coefficients denoted by some variables.

2014-09-20 Thread &#x27;luisfe' via sage-support
In general, I prefer to put the parameters a_i as variables and then interpret the results. Another approach you may try is to work in the field: GF(2^d)['a_1,a_2,a_3'].fraction_field()['x_1,x_2,x_3'] but then you may encounter specialiation problems with denominators, another problem is that

[sage-support] Re: Typo in provided documentation

2014-10-02 Thread &#x27;luisfe' via sage-support
It looks right to me. I am not a native English speaker so I could be (very) wrong, but I understand that the comparison x<2 is evaluated, which is completely true, independently if the condition is evaluated as True or False. In fact, next lines tell why x<2 is evaluated False and that h(x) re