[sage-support] power series --> rational function conversion?
I have a power series f(x) in F[[x]] (where F is a finite field) which I know to be a rational function p(x)/q(x) where p,q in F[x] have degree at most n, and I want to find p and q. There is an algorithm for this, like "rational reconstruction" to go from a real to a rational using continued fraction. I could not find this implemented though there are quite a lot of power series utilities and I might not recognise this if it has an unfamiliar name. Does any one know if it is implemented? John Cremona -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: decomposition of fractional ideals (converting PARI to SAGE)
Hi All, I am now at the SAGE22 workshop and directly asked William Stein concerning this. He showed me a line proof.number_field(False) Then we can turn off the certification process and the decomposition may work. Thanks, Chan-Ho On May 7, 10:20 am, Chan-Ho wrote: > Hi All, > > This is a continuation of the > questionhttp://www.mail-archive.com/sage-support@googlegroups.com/msg16973.html > > I am trying to decompose a fractional ideal into primes in a number > field (I use online SAGE.) > > I have a Number Field in a2 with defining polynomial > x^6 - 15*x^5 - 514*x^4 + 5312*x^3 + 83552*x^2 - 422208*x - 4272768 > and want to decompose Fractional ideal (3). > (SAGE can check this is not a prime ideal.) > However, "factor()" or "prime_above()" did not work because of the > Minkowski bound error. > > Thus, I tried to compute this using the following code: > > K_f2_bnf = gp(K_f2.pari_bnf()) ; K_f2_bnf ; > ideal = K_f2_bnf.idealprimedec(3) ; ideal ; > ideal1 = K_f2_bnf.idealprimedec(3)[1] ; ideal1 ; > ideal2 = K_f2_bnf.idealprimedec(3)[2] ; ideal2 ; > ideal3 = K_f2_bnf.idealprimedec(3)[3] ; ideal3 ; > ideal4 = K_f2_bnf.idealprimedec(3)[4] ; ideal4 > > I think that this code does not make errors, and the output was the > following. > > [3, [215, 8, 2, 2, 0, 2]~, 1, 2, [0, -1, -1, -1, 0, -1]~] > > To change this output (PARI ideals) to SAGE (SAGE ideals), I used > > from sage.rings.number_field.number_field_ideal import > convert_from_idealprimedec_form ; > convert_from_idealprimedec_form(K_f2, ideal1) > > But the Minkowski error occured again here. > This means that the Minkowski error comes from the translation between > PARI and SAGE? > Is there a better method to compute this in SAGE? > > Cheers, > > Chan-Ho > > -- > To post to this group, send email to sage-support@googlegroups.com > To unsubscribe from this group, send email to > sage-support+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/sage-support > URL:http://www.sagemath.org -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Simplification / Latex question
> I've noticed too about how maxima continues to ask things that > (it would seem) you have already told it. I guess it would be > in my best interests to learn more about maxima. > If you are serious about doing symbolic manipulation that you can control from within Sage, yes. That said, various people will note that things it would seem you told it are often things that are provably undecidable or something like that. Good luck! - kcrisman -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
Re: [sage-support] Re: Simplification / Latex question
On 06/24/2010 06:15:52 AM, kcrisman wrote: > > > sage: n=var('n') > > > sage: f=e^(i*x*pi*n-i*2*pi*n) > > > sage: f.simplify_full() > > > e^(I*pi*n*x - 2*I*pi*n) > > > > # Is there a way I can get this to simplify? > > > This apparently isn't even that easy in Maxima. > > > Maxima 5.21.1http://maxima.sourceforge.net > > using Lisp ECL 10.4.1 > > Distributed under the GNU Public License. See the file COPYING. > > Dedicated to the memory of William Schelter. > > The function bug_report() provides bug reporting information. > > (%i5) radcan(%e^(%pi*n-2*%pi)); > > %pi n - 2 %pi > > (%o5) %e > > (%i6) expand(%e^(%pi*n-2*%pi)); > > %pi n - 2 %pi > > (%o6) %e > > > There are several Maxima experts on the list, though, who may know > > about a flag to set in such a case to factor the exponent first. I > > couldn't find one in the simplification documentation for Maxima, but > > it may be elsewhere. > > Well, I hope to hear from one of these Maxima experts! > > > Of course, you can do this ahead of time: > > > sage: e^((n*pi-pi*2).factor()) > > e^((n - 2)*pi) > > > but this is probably not what you want. > > Right. This crops up in the middle of a more complicated > expression. If I could figure out how to break the expression > up in the right way, then I guess I could search for parts > that are exponential functions, take the log of those, and > then simplify the logs. I know how to ultimately find all > the pieces of the function with .operands(), but I don't > then know any way to put them back together with the > proper operators. Maybe there's a way to access the parsed I believe there is, but I can't figure out how to do it without going through fast_callable, which doesn't seem right. This information is in Pynac, but I can't find a method or underscore method that accesses it. This is now http://trac.sagemath.org/sage_trac/ticket/9329 . > tree of the expression? But of course that's crazy. > There must be a "normal" way to simplify it! > I don't know about that. Many other discussions about 'obvious' simplifications have led me to agree that this is a much harder problem than one thinks. On the other hand, it can be hard to find references to additional packages in Maxima that might do this; it turns out that lots of things one wants to do are not automatically available. Try http://maxima.sourceforge.net/docs/manual/en/maxima_71.html#SEC298 for ways you might be able to do this directly in Maxima, though I couldn't see for sure if that is part of its functionality. sage: maxima_console() (%i4) demo("facexp"); Annoyingly, it continues this thing of asking whether 2*%pi is an integer which one often sees... I hope this helps. - kcrisman This is all good information, thanks. It helps to at least know that I'm not missing something obvious. It's the combination with that latex issue that results in some really ugly output. I've noticed too about how maxima continues to ask things that (it would seem) you have already told it. I guess it would be in my best interests to learn more about maxima. Thanks again, -Mike -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Simplification / Latex question
> > > sage: n=var('n') > > > sage: f=e^(i*x*pi*n-i*2*pi*n) > > > sage: f.simplify_full() > > > e^(I*pi*n*x - 2*I*pi*n) > > > > # Is there a way I can get this to simplify? > > > This apparently isn't even that easy in Maxima. > > > Maxima 5.21.1http://maxima.sourceforge.net > > using Lisp ECL 10.4.1 > > Distributed under the GNU Public License. See the file COPYING. > > Dedicated to the memory of William Schelter. > > The function bug_report() provides bug reporting information. > > (%i5) radcan(%e^(%pi*n-2*%pi)); > > %pi n - 2 %pi > > (%o5) %e > > (%i6) expand(%e^(%pi*n-2*%pi)); > > %pi n - 2 %pi > > (%o6) %e > > > There are several Maxima experts on the list, though, who may know > > about a flag to set in such a case to factor the exponent first. I > > couldn't find one in the simplification documentation for Maxima, but > > it may be elsewhere. > > Well, I hope to hear from one of these Maxima experts! > > > Of course, you can do this ahead of time: > > > sage: e^((n*pi-pi*2).factor()) > > e^((n - 2)*pi) > > > but this is probably not what you want. > > Right. This crops up in the middle of a more complicated > expression. If I could figure out how to break the expression > up in the right way, then I guess I could search for parts > that are exponential functions, take the log of those, and > then simplify the logs. I know how to ultimately find all > the pieces of the function with .operands(), but I don't > then know any way to put them back together with the > proper operators. Maybe there's a way to access the parsed I believe there is, but I can't figure out how to do it without going through fast_callable, which doesn't seem right. This information is in Pynac, but I can't find a method or underscore method that accesses it. This is now http://trac.sagemath.org/sage_trac/ticket/9329 . > tree of the expression? But of course that's crazy. > There must be a "normal" way to simplify it! > I don't know about that. Many other discussions about 'obvious' simplifications have led me to agree that this is a much harder problem than one thinks. On the other hand, it can be hard to find references to additional packages in Maxima that might do this; it turns out that lots of things one wants to do are not automatically available. Try http://maxima.sourceforge.net/docs/manual/en/maxima_71.html#SEC298 for ways you might be able to do this directly in Maxima, though I couldn't see for sure if that is part of its functionality. sage: maxima_console() (%i4) demo("facexp"); Annoyingly, it continues this thing of asking whether 2*%pi is an integer which one often sees... I hope this helps. - kcrisman -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Using the simple server API
Hi! I know this thread is a little old but running the Simple Sage Server API is also important for me. I fixed the bugs mentioned and opened a trac ticket for it: http://trac.sagemath.org/sage_trac/ticket/9327 greetings, David Poetzsch-Heffter from http://www.mail-archive.com/sage-support@googlegroups.com/msg16537.html -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org