[sage-support] Re: Using Sage on Windows

2008-10-28 Thread William Stein

On Mon, Oct 27, 2008 at 7:26 PM, Jason Grout
[EMAIL PROTECTED] wrote:

 Justin C. Walker wrote:

 On Oct 27, 2008, at 17:32 , Jason Grout wrote:

 Justin C. Walker wrote:
 Thanks, William,

 On Oct 27, 2008, at 4:26 PM, William Stein wrote:
 On Mon, Oct 27, 2008 at 4:23 PM, Justin C. Walker [EMAIL PROTECTED]
 wrote:
 I am helping someone who has a Windows system, and wants to use
 Sage.

 She has the VMWare gizmo set up and working fine.  I have a silly
 problem, due to my long history of Windows Rejection: I have a file
 on Windows that I want to attach in the Sage notebook.  Can
 that be
 done?  The obvious doesn't work (/home/user/D:/Documents/... not
 found).
 It's possible but you have to set up some sort of sharing
 between Windows and VMware.  I.e., the Windows filesystem
 (or some subset of it) has to be made available to vmware.
 This is I think very easy in VMware Workstation via menus.  I don't
 know
 if it is easy or not in VMware player.  I don't actually have access
 to a windows machine right now, so i can't give step-by-step
 directions.  I hope somebody else can promptly respond to
 this email who can.
 I'll poke at VMWare when I see her next.  If anyone has some good
 ideas, I'd love to hear `em.

 Can't you upload the file as a data file and then attach it from
 there?  That way everything is done from the notebook.

 I wasn't sure that would work.  It was not clear to me where the
 upload/download commands were operating.  I will give that a shot.

 I believe that it will be uploaded/downloaded to the $DATA directory, so
 it could be attached with:

 attach $DATA/filename.sage

 I haven't tried, it, though.

You can upload a file just like an image into a given worksheet,
and it appears in the data directory.  Then I think you can do

   attach filename.sage

(without the $DATA).  I'm pretty sure that works in
recent versions of Sage.

 -- William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Bug in GP conversion?

2008-10-28 Thread John Cremona

2008/10/28 John Cremona [EMAIL PROTECTED]:
 It should not be difficult to convert the power series over GF(p) to
 pari.  If you do

 sage: R.x=PowerSeriesRing(GF(5),x)
 sage: f = x^2+1

 and then

 sage: f._pari_??

 you will see the comment that converson of power series from Sage to
 pari is currently only implemented over QQ and ZZ.  And that
 implementation is rather crude, as it goes via the string
 representation.  It would be better to be able to convert power series
 over any ring which itself can be converted.


This is now trac ticket #4376.

 John Cremona

 2008/10/28 salmanhb [EMAIL PROTECTED]:


 Hi,

 I've got a (truncated) matrix over a power series ring over a finite
 field that I want to convert to a GP matrix so that I can take its
 kernel. Since the matrix is truncated, it can be viewed as just being
 over a univariate polynomial ring. I want to take its kernel, but the
 echelon form over a univariate polynomial ring over a finite field is
 not yet implemented. I knew GP can do this, so I was going to send the
 matrix to GP and have GP compute the kernel. But if I send the matrix
 as a matrix over the power series ring, the coefficients are not sent
 as being over a finite field. On the other hand, if I redefine the
 matrix over the polynomial ring, the coefficients are treated as being
 over a finite field. I could reconstruct all of my matrices as being
 over the polynomial ring once I truncate my series, but that seems
 like a silly hack -- GP understands power series rings over a finite
 field, so the conversion shouldn't be a problem. I'm running SAGE
 v3.0.2.

 Thanks,
 Salman

 Here is the code and output:

 sage: R.x=PowerSeriesRing(GF(5),x)
 sage: m=matrix(R,2,[2+x, 1+x, 2+3*x,1+2*x])
 sage: m.kernel()
 ---
 NotImplementedError   Traceback (most recent call
 last)

 /Users/salmanhb/Documents/work/research/computations/sage/ipython
 console in module()

 /Users/salmanhb/Documents/work/research/computations/sage/matrix2.pyx
 in sage.matrix.matrix2.Matrix.left_kernel (sage/matrix/matrix2.c:7985)
 ()

 /Users/salmanhb/Documents/work/research/computations/sage/matrix2.pyx
 in sage.matrix.matrix2.Matrix.echelon_form (sage/matrix/matrix2.c:
 15292)()

 /Users/salmanhb/Documents/work/research/computations/sage/matrix2.pyx
 in sage.matrix.matrix2.Matrix.echelonize (sage/matrix/matrix2.c:15092)
 ()

 /Users/salmanhb/Documents/work/research/computations/sage/matrix2.pyx
 in sage.matrix.matrix2.Matrix._echelonize_ring (sage/matrix/matrix2.c:
 14807)()

 NotImplementedError: echelon form over Power Series Ring in x over
 Finite Field of size 5 not yet implemented
 sage: gp(m)
 [x + 2, x + 1; 3*x + 2, 2*x + 1]
 sage: R.x=PolynomialRing(GF(5),x)
 sage: m=matrix(R,2,[2+x, 1+x, 2+3*x,1+2*x])
 sage: m.kernel()
 ---
 NotImplementedError   Traceback (most recent call
 last)

 /Users/salmanhb/Documents/work/research/computations/sage/ipython
 console in module()

 /Users/salmanhb/Documents/work/research/computations/sage/matrix2.pyx
 in sage.matrix.matrix2.Matrix.left_kernel (sage/matrix/matrix2.c:7985)
 ()

 /Users/salmanhb/Documents/work/research/computations/sage/matrix2.pyx
 in sage.matrix.matrix2.Matrix.echelon_form (sage/matrix/matrix2.c:
 15292)()

 /Users/salmanhb/Documents/work/research/computations/sage/matrix2.pyx
 in sage.matrix.matrix2.Matrix.echelonize (sage/matrix/matrix2.c:15092)
 ()

 /Users/salmanhb/Documents/work/research/computations/sage/matrix2.pyx
 in sage.matrix.matrix2.Matrix._echelonize_ring (sage/matrix/matrix2.c:
 14807)()

 NotImplementedError: echelon form over Univariate Polynomial Ring in x
 over Finite Field of size 5 not yet implemented
 sage: gp(m)
 [Mod(1, 5)*x + Mod(2, 5), Mod(1, 5)*x + Mod(1, 5); Mod(3, 5)*x +
 Mod(2, 5), Mod(2, 5)*x + Mod(1, 5)]
 



--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: radius of convergence and inequalities

2008-10-28 Thread Stan Schymanski


Hi Jason,

This is most interesting, as the web page claimed it was a pre-
compiled binary! I did what you said, renamed the 'README' to
'install' and executed it, but I got quite a few error messages,
starting with 'tcsh: /bin/ls: No match.' I put them up at
ftp://ftp.bgc-jena.mpg.de/ftp/pub/outgoing/sschym/qepcad_errors1. If
you or anyone else has an idea what they might mean or how to apply a
fix, please let me know.

Cheers
Stan


On Oct 27, 5:47 pm, Jason Grout [EMAIL PROTECTED] wrote:

 The tbz archive has a README, which is a script that apparently compiles
 the package, though.

 So downloading the package at the link you gave, untarring it, and doing
 sh README seems like it should work.  You might have the change the
 first statement in the README.

 side note: Interestingly, the README is a shell script.  So apparently,
 in this case, the code has become the documentation!

 Thanks,

 Jason
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: FiniteField_ext_pari fetch_int equivalent

2008-10-28 Thread David Møller Hansen

Thank you for you answer Robert

Just the alternative to fetch_int I needed.
The problem was that if you try to use fetch_int on a field of larger
size than GF(5^5) e.g. GF(3^42), then SAGE will switch to PARI finite
field objects and then the fetch_int will not work. But you small
alternative sum do.

Thanks!

/David

On Oct 23, 4:54 pm, Robert Bradshaw [EMAIL PROTECTED]
wrote:
 On Oct 23, 2008, at 4:51 AM, David Møller Hansen wrote:



  Is there a function for FiniteField_ext_pari objects that in the same
  way as fetch_int for the FiniteField_givaro objects can give me the
  field element representation of an integer?

 I'm not seeing which fetch_int you're referring to for  
 FiniteField_givaro objects, but you can do the same with

 sage: K.a = GF(5^5)
 sage: K.fetch_int(159)
 a^3 + a^2 + a + 4
 sage: sum([a^k*c for k, c in enumerate(159.digits(K.characteristic()))])
 a^3 + a^2 + a + 4

 - Robert
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: solve, integrate, series

2008-10-28 Thread Stan Schymanski

Just to add another view, I can never remember all the different
function names, so I find it very convenient to have namespace
pollution as Martin Rubey calls it. If I look for a certain plot
function, I would like to be able to type plot and then hit the tab
button to see all the possible variations. Much better than having to
remember that it was called parametric_plot. On the other hand, it
would be a bit unfair to break people's previous code where they used
parametric_plot because we decide to replace parametric_plot by
plot_parametric. Backwards compatibility is a big issue in my opinion
and I don't quite understand the problem about having different names
for doing the same thing until we run out of letters to create new
functions. :)

Stan



On Oct 27, 9:02 pm, Martin Rubey [EMAIL PROTECTED] wrote:

 Well, the problem is namespace pollution.  Already now, if I hit tab after x, 
 I
 get roughly 100 possible completions.  In a strongly typed environment, this 
 is
 unnecessary.  I do not see any benefit in having more than onenameto do one
 thing.  Of course, if the argument types are the same you will probably need 
 to
 have several functions.

 Martin
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: solve, integrate, series

2008-10-28 Thread John Cremona

2008/10/28 Stan Schymanski [EMAIL PROTECTED]:

 Just to add another view, I can never remember all the different
 function names, so I find it very convenient to have namespace
 pollution as Martin Rubey calls it. If I look for a certain plot
 function, I would like to be able to type plot and then hit the tab
 button to see all the possible variations. Much better than having to
 remember that it was called parametric_plot. On the other hand, it
 would be a bit unfair to break people's previous code where they used
 parametric_plot because we decide to replace parametric_plot by
 plot_parametric. Backwards compatibility is a big issue in my opinion
 and I don't quite understand the problem about having different names
 for doing the same thing until we run out of letters to create new
 functions. :)


sage: [com for com in dir() if 'plot' in com]

['contour_plot',
 'eulers_method_2x2_plot',
 'gnuplot',
 'gnuplot_console',
 'implicit_plot',
 'list_plot',
 'list_plot3d',
 'matrix_plot',
 'networkx_plot',
 'parametric_plot',
 'parametric_plot3d',
 'plot',
 'plot3d',
 'plot_slope_field',
 'plot_vector_field',
 'plotkin_bound_asymp',
 'plotkin_upper_bound',
 'polar_plot']

John Cremona


 Stan



 On Oct 27, 9:02 pm, Martin Rubey [EMAIL PROTECTED] wrote:

 Well, the problem is namespace pollution.  Already now, if I hit tab after 
 x, I
 get roughly 100 possible completions.  In a strongly typed environment, this 
 is
 unnecessary.  I do not see any benefit in having more than onenameto do one
 thing.  Of course, if the argument types are the same you will probably need 
 to
 have several functions.

 Martin
 


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How to detect memory leaks?

2008-10-28 Thread Simon King

Dear team,

On Oct 27, 12:15 pm, Simon King [EMAIL PROTECTED] wrote:
snip
 So, it seems to me that theleakmight come from other compiled
 components.
 Libsingular? This is what I'm using most frequently.

Now i am sure that the leak is in libsingular.

I produced an F5 version that thoroughly uses Singular via pexpect,
but makes no use of libsingular. That's the only change. See
http://sage.math.washington.edu/home/SimonKing/f5/f5S.pyx

I know that I use the pexpect interface in a very inefficient way. So
it is very slow -- but there is no leak!

However, as my knowledge of libsingular, guppy and valgrind tends to
zero, I doubt that I will be able to solve the problem.

Cheers
   Simon

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Porting Sage to AIX

2008-10-28 Thread mabshoff



On Oct 27, 10:42 pm, William Stein [EMAIL PROTECTED] wrote:
 On Mon, Oct 27, 2008 at 9:15 PM, Sameer [EMAIL PROTECTED] wrote:
  Hi,
     I am trying to port sage 3.1.1 to an IBM Power5 AIX system. After
  I install gap (in 32 bits), I get:

So how far did you get building Sage? If GAP is the problem it sounds
like you get next to the end.

From the error messages above it also seems like it could be a pexpect
issue. If GAP by itself starts up cleanly I would assume that the
problem is in pexpect.

 Just out of curiosity, is this a machine you could give some (any?)
 of the Sage developers accounts on?  We would love to officially
 support AIX.  So far, none of us have ever been able to get access to
 an AIX box.

+1

 William

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: radius of convergence and inequalities

2008-10-28 Thread Jason Grout

Stan Schymanski wrote:
 
 Hi Jason,
 
 This is most interesting, as the web page claimed it was a pre-
 compiled binary! I did what you said, renamed the 'README' to
 'install' and executed it, but I got quite a few error messages,
 starting with 'tcsh: /bin/ls: No match.' I put them up at
 ftp://ftp.bgc-jena.mpg.de/ftp/pub/outgoing/sschym/qepcad_errors1. If
 you or anyone else has an idea what they might mean or how to apply a
 fix, please let me know.


I can't access this file.  The URL above seems to be an empty directory 
according to firefox.

Thanks,

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: substitutions and save_session

2008-10-28 Thread Stan Schymanski

UPDATE:

The command 'y.subs(a)' as used above does not do what I thought. It
just substitutes the variable that comes first in the alphabet with
the definition for a!!!
In this case it did the right thing coincidentally, but not in the
below case:

--
| SAGE Version 3.1.4, Release Date: 2008-10-20   |
| Type notebook() for the GUI, and license() for information.|
--

sage:  var('a b c')
(a, b, c)
sage:  y = a*x^2 + b*x + c
sage:  b = 2*a
sage: y.subs(b)
2*a*x^2 + b*x + c
sage: y.subs({'b': b})
a*x^2 + 2*a*x + c

The .subs() command expects a dictionary such as {'b': b}.

Substitution y(b=b) achieves the same result with much less effort,
but it causes errors in save_session and load_session. Is this a bug?

Cheers
Stan
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: radius of convergence and inequalities

2008-10-28 Thread Jason Grout

Stan Schymanski wrote:
 Hi Jason,
 
 Sorry about this. For some reasons, it didn't work for me, either, but
 now I re-applied the permissions and it seems to work again. Could you
 try it again? ftp://ftp.bgc-jena.mpg.de/pub/outgoing/sschym/qepcad_errors1
 
 If it doesn't work, try the base address and click through. If a
 directory is missing, it may appear if you do a reload in Firefox.


I see it now.  Hmm...I think I might have to defer to someone that has 
an OSX box to figure out what's going on.

Thanks,

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: radius of convergence and inequalities

2008-10-28 Thread Jason Grout

Stan Schymanski wrote:
 Hi Jason,
 
 Sorry about this. For some reasons, it didn't work for me, either, but
 now I re-applied the permissions and it seems to work again. Could you
 try it again? ftp://ftp.bgc-jena.mpg.de/pub/outgoing/sschym/qepcad_errors1


You could also try emailing Chris Brown (the current author of QEPCADB) 
directly and asking him to help.  I can imagine that he would like to 
see the software running on a mac.  I know he's a busy person, though.

Thanks,

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: radius of convergence and inequalities

2008-10-28 Thread William Stein

On Tue, Oct 28, 2008 at 8:24 AM, Stan Schymanski [EMAIL PROTECTED] wrote:

 Hi Jason,

 Thanks for trying to help. I suppose that Chris Brown is in a similar
 situation as you and does not have an osx box to compile his code. It
 would probably be more efficient if someone with an osx box and with a
 developer background (unlike me) asked him for specific advice. Also, I
 have to get on with my work and I am not even sure if qepcad would solve
 my problem. Sorry to bail here.

 Thanks again,
 Stan

I can give you an account on sage.math.washington.edu (a linux box),
where it is easy to install qepcad.  Then you can test out whether it
works for you or not.

You could also install qepcad into the vmware version of Sage,
I suppose.

I'm also setting up a replacement for sagenb.org, and will install
qepcad into that too.

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] problems with FriCAS interface

2008-10-28 Thread Martin Rubey

I get the following very weird result:

sage: A=axiom.series(z,z=0)
sage: A

sage: A
z
sage: B = (1/(1-A^2))
sage: B

   246810  11
  1 + z  + z  + z  + z  + z   + O(z  )
sage: A

   246810  11
  1 + z  + z  + z  + z  + z   + O(z  )
sage: A
z
sage: B
z

Since this does not happen in FriCAS itself, I wonder what the reason could be?

Many thanks,

Martin


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: [fricas-devel] Re: problems with FriCAS interface

2008-10-28 Thread Martin Rubey

Bill Page [EMAIL PROTECTED] writes:
   Expect.__init__(self,
   name = 'axiom',
   prompt = '\([0-9]+\) - ',
   command = sh -c 'axiom -nox -noclef | cat',

Apart from modifying axiom.py, do I have to do anything else?  Compiling, 
installing?

Martin


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: problems with FriCAS interface

2008-10-28 Thread mabshoff

On Oct 28, 9:31 am, Martin Rubey [EMAIL PROTECTED] wrote:

Hi Martin,

 Bill Page [EMAIL PROTECTED] writes:
        Expect.__init__(self,
                        name = 'axiom',
                        prompt = '\([0-9]+\) - ',
                        command = sh -c 'axiom -nox -noclef | cat',

 Apart from modifying axiom.py, do I have to do anything else?  Compiling, 
 installing?

After changing axiom.py in the $SAGE_ROOT/devel/sage tree run ./sage -
b from $SAGE_ROOT. Note that you are changing the main Sage library
and that the repo then has outstanding uncommitted changes. Upgrading
such an install requires some understanding on hg.

 Martin

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: problems with FriCAS interface

2008-10-28 Thread mabshoff



On Oct 28, 9:55 am, Martin Rubey [EMAIL PROTECTED] wrote:

SNIP

  After changing axiom.py in the $SAGE_ROOT/devel/sage tree run ./sage -
  b from $SAGE_ROOT. Note that you are changing the main Sage library
  and that the repo then has outstanding uncommitted changes. Upgrading
  such an install requires some understanding on hg.

 Tried, doesn't fix the problem.

 thanks anyway.  Oh dear, there will be some more chaos tomorrow.

Judging from your post on fricas-devel you are using not the
fricas-1.0.3.spkg. Can you try installing it and see if that fixes the
problem? In my experience changing underlying lisps for example for
Maxima changes the behavior of Maxima enough to make certain doctests
fail.

 Martin

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: problems with FriCAS interface

2008-10-28 Thread mabshoff



On Oct 28, 10:06 am, Martin Rubey [EMAIL PROTECTED] wrote:
 mabshoff [EMAIL PROTECTED] writes:
  On Oct 28, 9:55 am, Martin Rubey [EMAIL PROTECTED] wrote:

  SNIP

After changing axiom.py in the $SAGE_ROOT/devel/sage tree run ./sage -
b from $SAGE_ROOT. Note that you are changing the main Sage library
and that the repo then has outstanding uncommitted changes. Upgrading
such an install requires some understanding on hg.

   Tried, doesn't fix the problem.

   thanks anyway.  Oh dear, there will be some more chaos tomorrow.

  Judging from your post on fricas-devel you are using not the
  fricas-1.0.3.spkg. Can you try installing it and see if that fixes the
  problem?

 Hm, not really.  For my students, it's a site wide installation (and I'm not
 root) and it was already quite an effort to get sage running in the first
 place.

All you need to do is

 ./sage -i fricas-1.0.3.p0

This doesn't touch anything outside $SAGE_ROOT. I really hope that you
aren't running sage as the root user, too.

  On my laptop, it's actually better to be close to my students
 installation.

Ok. As stated above the optinal fricas.spkg touches nothing and does
not interfere with any other FriCAS installed on the system.

 I guess I should have tested sage more thoroughly before embarking on this
 adventure.

 Still, many many thanks for your support,

No problem. Let us know if you run into any trouble.

 Martin

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: problems with FriCAS interface

2008-10-28 Thread Martin Rubey

mabshoff [EMAIL PROTECTED] writes:

 On Oct 28, 9:55 am, Martin Rubey [EMAIL PROTECTED] wrote:
 
 SNIP
 
   After changing axiom.py in the $SAGE_ROOT/devel/sage tree run ./sage -
   b from $SAGE_ROOT. Note that you are changing the main Sage library
   and that the repo then has outstanding uncommitted changes. Upgrading
   such an install requires some understanding on hg.
 
  Tried, doesn't fix the problem.
 
  thanks anyway.  Oh dear, there will be some more chaos tomorrow.
 
 Judging from your post on fricas-devel you are using not the
 fricas-1.0.3.spkg. Can you try installing it and see if that fixes the
 problem? 

Hm, not really.  For my students, it's a site wide installation (and I'm not
root) and it was already quite an effort to get sage running in the first
place.  On my laptop, it's actually better to be close to my students
installation.

I guess I should have tested sage more thoroughly before embarking on this
adventure.

Still, many many thanks for your support,

Martin


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: problems with FriCAS interface

2008-10-28 Thread Martin Rubey

mabshoff [EMAIL PROTECTED] writes:

  Hm, not really.  For my students, it's a site wide installation (and I'm not
  root) and it was already quite an effort to get sage running in the first
  place.
 
 All you need to do is
 
  ./sage -i fricas-1.0.3.p0
 
 This doesn't touch anything outside $SAGE_ROOT. I really hope that you
 aren't running sage as the root user, too.
Huh?  I said I'm not root.

[EMAIL PROTECTED]:~ sage -i fricas-1.0.3.p0
Installing fricas-1.0.3.p0
Calling sage-spkg on fricas-1.0.3.p0
tee: ../install.log: Keine Berechtigung
You must set the SAGE_ROOT environment variable or
run this script from the SAGE_ROOT or
SAGE_ROOT/local/bin/ directory.
fricas-1.0.3.p0
Machine:
Linux rp17 2.6.18.8-0.10-default #1 SMP Wed Jun 4 15:46:34 UTC 2008 x86_64
x86_64 x86_64 GNU/Linux
Deleting directories from past builds of previous/current versions of
fricas-1.0.3.p0
/opt/local/sage-3.1.2/local/bin/sage-spkg: file fricas-1.0.3.p0 does not exist
Attempting to download it.
mkdir: kann Verzeichnis „optional“ nicht anlegen: Keine Berechtigung
/opt/local/sage-3.1.2/local/bin/sage-spkg: line 164: cd: optional: Datei oder
Verzeichnis nicht gefunden


Martin


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: problems with FriCAS interface

2008-10-28 Thread mabshoff



On Oct 28, 10:23 am, Martin Rubey [EMAIL PROTECTED] wrote:
 mabshoff [EMAIL PROTECTED] writes:
   Hm, not really.  For my students, it's a site wide installation (and I'm 
   not
   root) and it was already quite an effort to get sage running in the first
   place.

  All you need to do is

   ./sage -i fricas-1.0.3.p0

  This doesn't touch anything outside $SAGE_ROOT. I really hope that you
  aren't running sage as the root user, too.

 Huh?  I said I'm not root.

Well, your above statement could be interpreted that you cannot change
anything about the Sage install since you are not root. Hence my
remark.

 [EMAIL PROTECTED]:~ sage -i fricas-1.0.3.p0
 Installing fricas-1.0.3.p0
 Calling sage-spkg on fricas-1.0.3.p0
 tee: ../install.log: Keine Berechtigung
 You must set the SAGE_ROOT environment variable or
 run this script from the SAGE_ROOT or
 SAGE_ROOT/local/bin/ directory.
 fricas-1.0.3.p0
 Machine:
 Linux rp17 2.6.18.8-0.10-default #1 SMP Wed Jun 4 15:46:34 UTC 2008 x86_64
 x86_64 x86_64 GNU/Linux
 Deleting directories from past builds of previous/current versions of
 fricas-1.0.3.p0
 /opt/local/sage-3.1.2/local/bin/sage-spkg: file fricas-1.0.3.p0 does not exist
 Attempting to download it.
 mkdir: kann Verzeichnis „optional“ nicht anlegen: Keine Berechtigung
 /opt/local/sage-3.1.2/local/bin/sage-spkg: line 164: cd: optional: Datei oder
 Verzeichnis nicht gefunden

You need to have write permission to the $SAGE_ROOT tree to install
any spkg.

 Martin

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: solve, integrate, series

2008-10-28 Thread Robert Bradshaw

On Oct 27, 2008, at 1:02 PM, Martin Rubey wrote:

 David Joyner [EMAIL PROTECTED] writes:

 On Mon, Oct 27, 2008 at 1:59 PM, Martin Rubey  
 [EMAIL PROTECTED] wrote:

 Dear William,

 thanks for your quick answer, even though it doesn't make me too  
 happy.  I'm
 having a hard time here, I must admit.

One thing to keep in mind is that Sage is not just a CAS. In fact,  
this is one of the areas that needs the most work, so thanks for your  
feedback in making things better.

 So far I thought that sage would do
 most things out of the box, and it's only inconsistent (eg.,  
 arguments to plot,
 plot3d and integrate vary wildly.  There are several functions  
 plot, plot3d,
 contour_plot, parametric_plot, etc. and not only one that decides  
 on the type


 I don't see the problem in having more than one function name for  
 plotting.

 Well, the problem is namespace pollution.  Already now, if I hit  
 tab after x, I
 get roughly 100 possible completions.  In a strongly typed  
 environment, this is
 unnecessary.  I do not see any benefit in having more than one name  
 to do one
 thing.  Of course, if the argument types are the same you will  
 probably need to
 have several functions.

 Actually I think I agree with you about one (easily fixed)  
 problem, since the
 various plot functions might be hard to find. It would be nice for  
 all
 plotting functions to start with plot (eg, plot_parametric could  
 be an alias
 for parametric_plot), so the variations can be found by tab  
 completion.

 Oh no, more namespace pollution :-)

I think that namespace pollution is an issue, but having the plot_xxx  
options actually helps. It's a question of how easily one can use the  
tab key to get the command one wants.


 Is there a way to obtain a power series solution to a  
 differential equation?

 David Harvey implemented something for 1st order linear DEs of the  
 form
 y'=ay+b:

 sage: R.t = PowerSeriesRing(QQ, default_prec=10)
 sage: a = 2 - 3*t + 4*t^2 + O(t^10)
 sage: b = 3 - 4*t^2 + O(t^7)
 sage: a.solve_linear_de(prec=5, b=b, f0=3/5)
 3/5 + 21/5*t + 33/10*t^2 - 38/15*t^3 + 11/24*t^4 + O(t^5)

 Is there a way to solve an ODE?

 (ideally, without resorting to maxima or fricas syntax...)

 Yes, in the 1st or 2nd order linear cases, but the methods call  
 Maxima:

 sage: x = var('x')
 sage: y = function('y', x)
 sage: desolve(diff(y,x) + y - 1, y)
 e^(-x)*(e^x + c)
 sage: f = desolve(diff(y,x) + y - 1, y, ics=[10,2]); f
 e^(-x)*(e^x + e^10)
 sage: plot(f)

 See calculus/desolvers for more details/examples. Hats off to
 Robert Bradshaw for this.

 Ah, great.  That's exactly what I was looking for (except, why is  
 it called
 desolve and not solve, so I can find it...?)  And why is it a  
 function?

Solve means something different. It would be odd to change the  
behavior of solve to be solve this diff eq rather than solve for  
this variable whenever a derivative is present.

We should probably make this a method as well. The desolve would  
check to see if such method exists on its first argument. Sometimes,  
especially for calculus-like applications, functional notation is  
more natural.

- Robert



--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: problems with FriCAS interface

2008-10-28 Thread Martin Rubey

mabshoff [EMAIL PROTECTED] writes:

 You need to have write permission to the $SAGE_ROOT tree to install
 any spkg.

Would be really nice, if this could be changed in future.  Suppose university
provides sage, but without package SupiDupi, which is really super trooper.
Then I need to install all of sage again

Martin


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: problems with FriCAS interface

2008-10-28 Thread mabshoff



On Oct 28, 10:44 am, Martin Rubey [EMAIL PROTECTED] wrote:
 mabshoff [EMAIL PROTECTED] writes:
  You need to have write permission to the $SAGE_ROOT tree to install
  any spkg.

 Would be really nice, if this could be changed in future.  Suppose university
 provides sage, but without package SupiDupi, which is really super trooper.
 Then I need to install all of sage again

Yep, it would be nice and has been suggested and discussed before. But
it can introduce a number of subtle bugs when several user install
various versions of the same package and so on. As is one cannot
develop with the Sage library in a multi user setting either [at
least not in an elegant way].

 Martin

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Project Euler

2008-10-28 Thread Robert Bradshaw

On Oct 27, 2008, at 2:15 PM, cesarnda wrote:

 is there a way to do that in a fancy way in pure cython?

No, the cartesian_product_iterator will still work in the context of  
Sage though, as will Georg's solution.

If I needed to do this loop super fast for an arbitrary number of k,  
I might either implement it as a map ZZ - {-2,...,2}^n and iterate  
over ZZ, or implement a manual add and carry.


 On Oct 26, 4:02 pm, Georg [EMAIL PROTECTED] wrote:
 Hi Roland,

 2.  Is there a more elegant way for:
 for k1 in range(-2,3):
  for k2 in range(-2,3):
   for k3 in range(-2,3):
for k4 in range(-2,3):
 for k5 in range(-2,3):
  for k6 in range(-2,3):
   for k7 in range(-2,3): ?

 Roland

 if you want to stay in pure python do this:

 Python 2.4.4 (#2, Apr 15 2008, 23:43:20)
 [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
 Type help, copyright, credits or license for more  
 information. for x in [(k1,k2) for k1 in range(-2,3) for k2 in  
 range(-2,3)]:

 ... print x

 Georg
 


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Project Euler

2008-10-28 Thread John Cremona

2008/10/28 Robert Bradshaw [EMAIL PROTECTED]:

 On Oct 27, 2008, at 2:15 PM, cesarnda wrote:

 is there a way to do that in a fancy way in pure cython?

 No, the cartesian_product_iterator will still work in the context of
 Sage though, as will Georg's solution.

 If I needed to do this loop super fast for an arbitrary number of k,
 I might either implement it as a map ZZ - {-2,...,2}^n and iterate
 over ZZ, or implement a manual add and carry.

Here's a similar alternative:

sage: A = AbelianGroup([2]*3); A
Multiplicative Abelian Group isomorphic to C2 x C2 x C2
sage: for a in A:
print [[5,6][i] for i in a.list()]
:
[5, 5, 5]
[5, 5, 6]
[5, 6, 5]
[5, 6, 6]
[6, 5, 5]
[6, 5, 6]
[6, 6, 5]
[6, 6, 6]

John



 On Oct 26, 4:02 pm, Georg [EMAIL PROTECTED] wrote:
 Hi Roland,

 2.  Is there a more elegant way for:
 for k1 in range(-2,3):
  for k2 in range(-2,3):
   for k3 in range(-2,3):
for k4 in range(-2,3):
 for k5 in range(-2,3):
  for k6 in range(-2,3):
   for k7 in range(-2,3): ?

 Roland

 if you want to stay in pure python do this:

 Python 2.4.4 (#2, Apr 15 2008, 23:43:20)
 [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
 Type help, copyright, credits or license for more
 information. for x in [(k1,k2) for k1 in range(-2,3) for k2 in
 range(-2,3)]:

 ... print x

 Georg
 


 


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Project Euler

2008-10-28 Thread Robert Bradshaw

On Oct 28, 2008, at 12:38 PM, John Cremona wrote:

 2008/10/28 Robert Bradshaw [EMAIL PROTECTED]:

 On Oct 27, 2008, at 2:15 PM, cesarnda wrote:

 is there a way to do that in a fancy way in pure cython?

 No, the cartesian_product_iterator will still work in the context of
 Sage though, as will Georg's solution.

 If I needed to do this loop super fast for an arbitrary number of k,
 I might either implement it as a map ZZ - {-2,...,2}^n and iterate
 over ZZ, or implement a manual add and carry.

 Here's a similar alternative:

 sage: A = AbelianGroup([2]*3); A
 Multiplicative Abelian Group isomorphic to C2 x C2 x C2
 sage: for a in A:
 print [[5,6][i] for i in a.list()]
 :
 [5, 5, 5]
 [5, 5, 6]
 [5, 6, 5]
 [5, 6, 6]
 [6, 5, 5]
 [6, 5, 6]
 [6, 6, 5]
 [6, 6, 6]

This would work too, though I was thinking in terms of manipulating c  
ints alone for cython-like speed.

- Robert


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: solve, integrate, series

2008-10-28 Thread Martin Rubey

Jason Grout [EMAIL PROTECTED] writes:

 var(t)
 y=function('y',t)
 solve(diff(y,t,2)-2*diff(y,t)+diff(y,t)==3, y(t))
 
 to solve for y(t).
 
 Doesn't Axiom work this way?

Yes.  (well, FriCAS is what I'm developing) Actually, one thing which is really
nice about FriCAS is that it's very consistent.  (Of course, there are places
where this is not the case at all, but in general it's true) Possibly this is
due to the type model of SPAD/Aldor, which relieves the developer of a lot of
decisions.  But I'd think that Sage could learn a lot with respect to that
point.

Martin

(1) - y := operator 'y

   (1)  y
  Type: BasicOperator
(2) - eq := D(y t,t,2)-2*D(y t,t)+y t=3

 ,,,
   (2)  y  (t) - 2y (t) + y(t)= 3

  Type: Equation(Expression(Integer))
(3) - solve(eq, y, t)

 t t
   (3)  [particular= 3,basis= [%e ,t %e ]]
Type: Union(Record(particular: Expression(Integer),basis: 
List(Expression(Integer))),...)
(4) - solve(eq, y, t=0, [1])

 t
   (4)  - 2%e  + 3
 Type: Union(Expression(Integer),...)
(5) - solve(eq, y, t=0, [1,3])

  t
   (5)  (5t - 2)%e  + 3
 Type: Union(Expression(Integer),...)
(6) - eval(lhs eq, y, %% 4, t)
   Compiling function %E with type Expression(Integer) - Expression(
  Integer) 

   (6)  3
Type: Expression(Integer)
(7) - eval(lhs eq, y, %% 5, t)
   Compiling function %F with type Expression(Integer) - Expression(
  Integer) 

   (7)  3
Type: Expression(Integer)


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: problem with installing packages

2008-10-28 Thread nostart

Silly me!
I used
sudo ./sage  -optional
and  everything work fines.

It was all about write permissions.

Thanks for your answers


On 28 Οκτ, 03:06, nostart [EMAIL PROTECTED] wrote:
 On 28 Οκτ, 02:45, mabshoff [EMAIL PROTECTED]



 dortmund.de wrote:
  On Oct 27, 5:44 pm, nostart [EMAIL PROTECTED] wrote:

   Hello,

  Hi,

   when I am trying to perform the commands
   sage -standard or -optional
   I get the error message

   Using SAGE 
   Serverhttp://www.sagemath.org//packageshttp://www.sagemath.org//packages/st...
/opt/sage-3.1.4-
   debian32-IntelXeon-x86-i686-Linux/tmp/list
   [Errno socket error] (-2, 'Name or service not known')

  This looks like a name resolution error when Sage attempts to download
  the current list of standard or optional packages. Can you 
  resolvewww.sagemath.orgfromthat computer? Are you using any http proxy or
  anything like that?

 nslookup works forwww.sagemath.org

 As far as I can see, not http proxy is used.

 -- Elias
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Fwd: Bug in ploting odd roots?

2008-10-28 Thread William Stein

-- Forwarded message --
From: pong [EMAIL PROTECTED]
Date: Tue, Oct 28, 2008 at 9:42 PM
Subject: Re: Bug in ploting odd roots?
To: William Stein [EMAIL PROTECTED]


Hi William,

I have a similar problem and found this old post. Is there a less
complicated solution by now?

By the way, why the function RDF in capitol letters? Isn't it the
convention of SAGE that function names are in lower case?

Also, looks like after a certain period of time, one can only
reply to the author instead of just reply in google, is that
right?

Thanks
Pong

On Oct 20 2007, 11:06 am, William Stein [EMAIL PROTECTED] wrote:
 On 10/20/07, Nikos Apostolakis [EMAIL PROTECTED] wrote:





  Hello group,

  even though

  sage: (-8)^(1/3)
  -2

  when I try to plot x^(1/3) I get:

  sage: plot(x^(1/3), -27, 27).show()
  WARNING: When plotting, failed to evaluate function at 100 points.
  Last error message: 'negative number cannot be raised to a
 fractionalpower'

  and the plot shown has only for positive x.  Is this a bug?

 The problem is that when you write (-8)^(1/3) maxima is doing
 the simplification with -8 and integer.  When you do the plot,
 what happens is Python floats are substituted in and raised
 to thepower1/3, which causes the problem.  Python has this
 rule regarding powers:

 sage: float(-1)**float(0.333)
 ---
 type 'exceptions.ValueError'Traceback (most recent call last)

 /home/was/ipython console in module()

 type 'exceptions.ValueError': negative number cannot be raised to 
 afractionalpower

 Here is a ridiculously complicated work-around (all on one line):

 sage: plot(lambda x:  (-1 if x  0 else 1)*abs(RDF(x))^(1/3), -27,
 27).show(ymax=3)


-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---