[sage-support] Re: Options for the Sage expand function

2014-06-14 Thread JBB
On 6/14/14, 6:22 PM, William Stein wrote: On Sat, Jun 14, 2014 at 6:12 PM, wrote: Dima writes: "there is nothing wrong with using a bit of pure mathematics for applied problems; e.g. cryptographers do this all the time... " Agreed. My formal education was from a time when fields, groups, and

[sage-support] Re: Options for the Sage expand function

2014-06-14 Thread JBB
On 6/14/14, 7:04 PM, leif wrote: jeanbigbo...@gmail.com wrote: Excuse the top-posting, the google groups UI is not as convenient for excerpting as emacs and a good Usenet server... A couple of Sage groups (including this) are available on/through gmane.org as well (gmane.comp.mathematics.sage.

[sage-support] Re: Options for the Sage expand function

2014-06-14 Thread leif
jeanbigbo...@gmail.com wrote: Excuse the top-posting, the google groups UI is not as convenient for excerpting as emacs and a good Usenet server... A couple of Sage groups (including this) are available on/through gmane.org as well (gmane.comp.mathematics.sage.*). -leif -- () The ASCII Rib

Re: [sage-support] Options for the Sage expand function

2014-06-14 Thread William Stein
On Sat, Jun 14, 2014 at 6:12 PM, wrote: > Dima writes: > "there is nothing wrong with using a bit of pure mathematics for > applied problems; e.g. cryptographers do this all the time... " > > Agreed. My formal education was from a time when fields, groups, and such > were not common undergraduat

Re: [sage-support] Options for the Sage expand function

2014-06-14 Thread jeanbigboute
On Saturday, June 14, 2014 4:55:37 PM UTC-7, William wrote: > > On Sat, Jun 14, 2014 at 3:53 PM, > > wrote: > >> > >> > > > > This is very helpful, thanks. > > > > In Sympy, I did the following: > > var('A B C D u v', real=True) > > qi = 1/(u - I*v) > > qf = (A + B/qi)/(C + D/qi) > > e

[sage-support] Re: LaTeX rendering problem in a local installation of the sage notebook server

2014-06-14 Thread Keir Lockridge
UPDATE: I switched to 6.1.1 and the problem went away. On Friday, June 13, 2014 5:29:59 PM UTC-5, Keir Lockridge wrote: > > Hi, > > I have Sage v6.2 installed 'in the cloud' (Amazon). The OS is RHEL. I have > used Sage for a couple of years without incident, but I am suddenly having > a problem

Re: [sage-support] Options for the Sage expand function

2014-06-14 Thread William Stein
On Sat, Jun 14, 2014 at 3:53 PM, wrote: >> >> > > This is very helpful, thanks. > > In Sympy, I did the following: > var('A B C D u v', real=True) > qi = 1/(u - I*v) > qf = (A + B/qi)/(C + D/qi) > expand(1/qf, > complex=True)A2+2ABu+B2u2+B2v2+ADuA2+2ABu+B2u2+B2v2-iADvA2+2ABu+B2u2+B2v2+BCuA2+2ABu+

[sage-support] Re: weil_pairing never returns

2014-06-14 Thread Alberto Garcia
SAGE version: 'Sage Version 6.1.1, Release Date: 2014-02-04' in MacOS X. El domingo, 15 de junio de 2014 01:17:06 UTC+2, Alberto Garcia escribió: > > Hello, > > > I'm trying to calculate a pairing with the SAGE weil_pairing() function > while using a distortion map, but the weil_pairing() func

[sage-support] weil_pairing never returns

2014-06-14 Thread Alberto Garcia
Hello, I'm trying to calculate a pairing with the SAGE weil_pairing() function while using a distortion map, but the weil_pairing() function never returns and it seems like is eating all the computer memory. Here is the code I'm using: sage: p = 293779600266612700060489507 sage: F = GF(p) s

Re: [sage-support] Options for the Sage expand function

2014-06-14 Thread jeanbigboute
On Saturday, June 14, 2014 2:04:18 PM UTC-7, Michael Orlitzky wrote: > > On 06/14/2014 12:43 AM, jeanbi...@gmail.com wrote: > > I am coming up to speed on Python, Sympy, and Sage by doing some simple > > problems on all three. Sympy has an option for its expand function, > > complex=True, th

Re: [sage-support] Options for the Sage expand function

2014-06-14 Thread Michael Orlitzky
On 06/14/2014 12:43 AM, jeanbigbo...@gmail.com wrote: > I am coming up to speed on Python, Sympy, and Sage by doing some simple > problems on all three. Sympy has an option for its expand function, > complex=True, that has made some of my expressions easier to read/use. > I'm working with quotient

[sage-support] Re: Options for the Sage expand function

2014-06-14 Thread Volker Braun
If you don't need provably correct answers then just work over CDF or ComplexField with a precision that you'd like. If you want to prove something you can use CIF (floating-point complex interval arithmetic) or QQbar (exact numbers). The difference between pure mathematics and applications is

[sage-support] Re: Options for the Sage expand function

2014-06-14 Thread Dima Pasechnik
On 2014-06-14, jeanbigbo...@gmail.com wrote: > > > On Saturday, June 14, 2014 6:28:02 AM UTC-7, Volker Braun wrote: >> >> On Saturday, June 14, 2014 5:43:39 AM UTC+1, jeanbi...@gmail.com wrote: >>> >>> I'm working with quotients of complex numbers. >>> >> >> The fraction field of the complex numbe

Re: [sage-support] Re: Defining a Variable so that its Conjugate always Equals Itself

2014-06-14 Thread Chris Maness
Thank you. Chris On Sat, Jun 14, 2014 at 4:47 AM, P Purkayastha wrote: > sage: bool(x.conjugate() == x) > False > sage: assume(x, 'real') > sage: bool(x.conjugate() == x) > True > > > > > On Saturday, June 14, 2014 6:12:06 AM UTC+8, Chris Maness wrote: >> >> Is there a way that I can define my v

[sage-support] Re: Options for the Sage expand function

2014-06-14 Thread jeanbigboute
On Saturday, June 14, 2014 6:28:02 AM UTC-7, Volker Braun wrote: > > On Saturday, June 14, 2014 5:43:39 AM UTC+1, jeanbi...@gmail.com wrote: >> >> I'm working with quotients of complex numbers. >> > > The fraction field of the complex numbers are the complex numbers. > > For any serious computati

Re: [sage-support] Re: LaTeX rendering problem in a local installation of the sage notebook server

2014-06-14 Thread Keir Lockridge
I downloaded and complied the sources tarball for 6.0 and had been using sage -upgrade since then. I found these files in the sage directory tree (where the 'sage' executable is), and both are non-empty: ./local/lib/python2.7/site-packages/sagenb-0.10.7.2-py2.7.egg/sagenb/data/sage/js/mathjax_s

Re: [sage-support] Re: LaTeX rendering problem in a local installation of the sage notebook server

2014-06-14 Thread P Purkayastha
Is your sagenb installation complete? This file is present and distributed with the notebook: https://github.com/sagemath/sagenb/blob/master/sagenb/data/sage/js/mathjax_sage.js On Sat, Jun 14, 2014 at 10:14 PM, Keir Lockridge wrote: > I was finally quick enough to highlight and copy the MathJax e

[sage-support] Re: LaTeX rendering problem in a local installation of the sage notebook server

2014-06-14 Thread Keir Lockridge
I was finally quick enough to highlight and copy the MathJax error: File failed to load: https://sage.x.org/javascript/mathjax/config/../../dynamic/mathjax_sage.js But, I am having trouble actually finding this file. When I load the URL in my browser, I get a blank page ('view source' lea

[sage-support] Re: Options for the Sage expand function

2014-06-14 Thread Volker Braun
On Saturday, June 14, 2014 5:43:39 AM UTC+1, jeanbi...@gmail.com wrote: > > I'm working with quotients of complex numbers. > The fraction field of the complex numbers are the complex numbers. For any serious computation you should probably figure out the smallest field you are really working in;

[sage-support] Re: Defining a Variable so that its Conjugate always Equals Itself

2014-06-14 Thread P Purkayastha
sage: bool(x.conjugate() == x) False sage: assume(x, 'real') sage: bool(x.conjugate() == x) True On Saturday, June 14, 2014 6:12:06 AM UTC+8, Chris Maness wrote: > > Is there a way that I can define my variables to be real, so that when I > take square the modulus, I don't get variables with b

[sage-support] Re: LaTeX rendering problem in a local installation of the sage notebook server

2014-06-14 Thread P Purkayastha
Latex in the notebook shouldn't be broken. It was completely broken for 6.1 but was fixed in 6.1.1. There has been no (released) upgrades of the notebook since then. I just checked and inline equations work fine here in 6.1.1 and 6.3.beta3. Sorry, I don't have 6.2 to test. On Saturday, June 14

Re: [sage-support] How to convert a symbolic expression to a finite field element?

2014-06-14 Thread John Cremona
Avoid using symbolic expressions together with real algebra. This works fine: sage: Fq. = GF(3^10) sage: (2*a^9 + 2*a^8 + a^4 +1)/(a^5+2*a+2) a^9 + a^8 + a^7 + a^5 + 2*a^4 + a^3 + 2*a^2 + 2*a The a here was defined in the first line to be the generator of your field: sage: type(a) sage: a.par