[sage-support] About collect-function

2012-11-01 Thread Jori Mantysalo

For example

(x^5 + x^2+ (5*a)*x^3).collect(x)

returns

x^5 + 5*a*x^3 + x^2

as I expected, but

(x^5 + x^2+ (5*a)*x^3 + (10*a^2 + 6*a + 5)*x).collect(x)

returns

x^5 + 5*a*x^3 + (10*a^2 + 6*a + 5)*x + x^2

How to order polynomial as normal, i.e. descending exponents of x?

 * * *

Documentation for collect-function is also almost missing, there is no 
explanation at all.


--
Jori Mäntysalo

--
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-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: AttributeError: 'sage.rings.polynomial.pbori.BooleanPolynomial' object has no attribute 'lc'

2012-11-01 Thread V
Maybe this is not the problem, because as far as I can see libc6-dev is 
installed:

$ dpkg -l |grep libc6-dev
ii  libc6-dev2.11.3-4   
Embedded GNU C Library: Development Libraries and Header Files
$

Any other suggestions?

On Wednesday, October 31, 2012 8:49:03 PM UTC+1, Dima Pasechnik wrote:

 On 2012-10-31, V vesselin@gmail.com javascript: wrote: 
  --=_Part_281_17041689.1351705746629 
  Content-Type: text/plain; charset=ISO-8859-1 
  Content-Transfer-Encoding: quoted-printable 
  
  
  Sorry, I was not able to attach the full log file gcc-4.6.3.log. 
 Please=20 
  find below the most relevant parts of it. 

 it looks like you need to install libc library headers, i.e. dpkg named 
 libc6-dev 



-- 
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-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: AttributeError: 'sage.rings.polynomial.pbori.BooleanPolynomial' object has no attribute 'lc'

2012-11-01 Thread Dima Pasechnik
On 2012-11-01, V vesselin.velich...@gmail.com wrote:
 --=_Part_80_29635451.1351758463692
 Content-Type: text/plain; charset=ISO-8859-1

 Maybe this is not the problem, because as far as I can see libc6-dev is 
 installed:

 $ dpkg -l |grep libc6-dev
 ii  libc6-dev2.11.3-4   
 Embedded GNU C Library: Development Libraries and Header Files
 $

 Any other suggestions?
well, I just looked at this error:

/usr/include/gnu/stubs.h:9:27: fatal error: gnu/stubs-64.h: No such file
or directory 

and (presuming your hardware is amd64, the file stubs-64.h should be
in libc6-dev

http://packages.debian.org/search?searchon=contentskeywords=stubs-64.hmode=exactfilenamesuite=stablearch=any

maybe you don't have it?
Then look at the above like and try to figure out which dpkg needs to be
installed...

HTH,
Dmitrii

-- 
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-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Indexed variables/functions

2012-11-01 Thread Jotace
Hi all,

How do I create a family of variables. I would need to create, say x_i for 
i \in N, or at least to have the possibility to use variables x_i for 
arbitrari i's

If it's too complex, it would be enough to create a fixed rannge of 
variables, say x_i for i in range(100). What I need to do is to create a 
famili of polynomials p_i, each of whicj is a polynomial in x_1, x_2, 
x_{i+2}.

Thanks 

JC

-- 
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-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: AttributeError: 'sage.rings.polynomial.pbori.BooleanPolynomial' object has no attribute 'lc'

2012-11-01 Thread V
Thanks! The missing library was libc6-dev-amd64. I installed it and this 
fixed the stubs-64.h error. Now the compilation breaks with the  error:

/usr/bin/ld: cannot find -lmpc

A more detailed log:

/usr/bin/ld: skipping incompatible /tmp/sage-5.3/local/lib/libmpc.a when 
searching for -lmpc
/usr/bin/ld: cannot find -lmpc
collect2: ld returned 1 exit status
make[5]: *** [cc1] Error 1
make[5]: Leaving directory 
`/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build/gcc'
make[4]: *** [all-stage2-gcc] Error 2
make[4]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build'
make[3]: *** [stage2-bubble] Error 2
make[3]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build'

real20m42.735s
user20m1.815s
sys 0m29.186s

Error installing package gcc-4.6.3


...

make[1]: *** [installed/gcc-4.6.3] Error 1
make[1]: Leaving directory `/tmp/sage-5.3/spkg'

I can see that I have the library libmpc installed:

$ dpkg -l |grep mpc
ii  libmpc-dev   0.8.2-1+b1 
multiple precision complex floating-point library development package
ii  libmpc2  0.8.2-1+b1 
multiple precision complex floating-point library

Any ideas? 

Thanks!

V.





On Thursday, November 1, 2012 12:38:19 PM UTC+1, Dima Pasechnik wrote:

 On 2012-11-01, V vesselin@gmail.com javascript: wrote: 
  --=_Part_80_29635451.1351758463692 
  Content-Type: text/plain; charset=ISO-8859-1 
  
  Maybe this is not the problem, because as far as I can see libc6-dev is 
  installed: 
  
  $ dpkg -l |grep libc6-dev 
  ii  libc6-dev2.11.3-4   
 
  Embedded GNU C Library: Development Libraries and Header Files 
  $ 
  
  Any other suggestions? 
 well, I just looked at this error: 

 /usr/include/gnu/stubs.h:9:27: fatal error: gnu/stubs-64.h: No such file 
 or directory 

 and (presuming your hardware is amd64, the file stubs-64.h should be 
 in libc6-dev 


 http://packages.debian.org/search?searchon=contentskeywords=stubs-64.hmode=exactfilenamesuite=stablearch=any
  

 maybe you don't have it? 
 Then look at the above like and try to figure out which dpkg needs to be 
 installed... 

 HTH, 
 Dmitrii 
 I


-- 
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-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Sage Crash Report - Sagecell2 in sage-5.4.rc1

2012-11-01 Thread Brandon Curtis
I am attempting to follow the instructions here to install Sage Cell Server
2 on Sage 5.4-rc1: https://github.com/sagemath/sagecell/issues/344

Here is my complete list of commands on a fresh install of Ubuntu 12.10 x64
(I'm having the identical problem on a second machine with an old install
of Ubuntu 12.04 x64):

*sudo apt-get install build-essential m4 gfortran perl dpkg-dev make tar
dvipng ffmpeg imagemagick openssh-client texlive texlive-latex-extra xpdf
xdvi libssl-dev libssl0.9.8 tk8.5-dev tk8.5-doc bzr git mercurial uuid-dev
python ipython*
*cp sage-5.4.rc1.tar /opt/sage/
*
*cd /opt/sage/
*
*tar -xvf sage-5.4.rc1.tar
*
*cd sage-5.4.rc1/*
*export MAKE=make -j4
*
*make*

# from Sage Trac #12719 (http://trac.sagemath.org/sage_trac/ticket/12719):

*./sage --hg qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_ROOT_configuration_files.patch
./sage --hg qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-ipythondir013.patch
./sage --hg -R local/bin qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-scripts.patch
./sage --hg -R local/bin qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_remove_sage_gdb_ipython.patch
./sage --hg -R local/bin qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-test-displayhook.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-5.1beta1.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-move_to_preparser_rebased.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_ipython_fixes.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_dedent.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-crash.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-cellmagics013.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-newipython-take2.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-displayhook.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-fix-transformer.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-5.4rc1.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-remove-plugin.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-displayhook-library.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-pager.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-preparse-doctest.patch
./sage -i http://sage.math.washington.edu/home/jason/ipython-0.13.1.spkg*
*./sage -br*

This last step fails. and spits out Sage_crash_report.txt:
http://pastebin.com/Qy2f7UPd
The crash traceback states: KeyError  Python 2.7.3:
/opt/sage/sage-5.4.rc1/local/bin/python

from *./sage -advanced* I see that the '-br' flag is supposed to build and
run the selected Sage branch.
If I just use *./sage -b* instead, it completes successfully, but crashes
with the error above when I try to run Sage.
If I ignore this and continue the Sage Cell 2 installation instructions...

*./sage -sh -c easy_install
https://github.com/ipython/ipython/zipball/master*
# appears to successfully install ipython 0.14.dev; if *./sage -br* is run,
still crashes

*./sage -i
http://sage.math.washington.edu/home/jason/sagecell-spkg/sagecell-2012-09-25.spkg
*
# appears to successfully install the Sage Cell 2 spkg; *./sage -br* still
crashes

*cd devel/sagecell
cp config_default.py config.py
nano config.py*
# change sage, host, and username variables to allow passwordless localhost
SSH'ing

*../../sage -sh -c make -B*
# appears to complete successfully

*../../sage web_server.py*
# the Sage Cell Server page can now be visited at localhost:

basic algebra works, but if I try to plot something or use any advanced
functionality I get 'Internal Python errors': http://pastebin.com/phirVuKF
I have over 5GB of free memory on this machine.

I figure this must have something to do with my Python install, maybe
because I have python and ipython installed globally.  I tried some
alternative ipython installation instructions:

*cd ~/repo
git clone git://github.com/ipython/ipython.git
cd ipython
/opt/sage/sage-5.4.rc1/sage setup.py install*
# completes successfully, but sage still crashes and the contents of

[sage-support] Re: Sage Crash Report - Sagecell2 in sage-5.4.rc1

2012-11-01 Thread Jason Grout

On 11/1/12 7:01 PM, Brandon Curtis wrote:

I am attempting to follow the instructions here to install Sage Cell
Server 2 on Sage 5.4-rc1: https://github.com/sagemath/sagecell/issues/344

Here is my complete list of commands on a fresh install of Ubuntu 12.10
x64 (I'm having the identical problem on a second machine with an old
install of Ubuntu 12.04 x64):

*sudo apt-get install build-essential m4 gfortran perl dpkg-dev make tar
dvipng ffmpeg imagemagick openssh-client texlive texlive-latex-extra
xpdf xdvi libssl-dev libssl0.9.8 tk8.5-dev tk8.5-doc bzr git mercurial
uuid-dev python ipython*
*cp sage-5.4.rc1.tar /opt/sage/
*
*cd /opt/sage/
*
*tar -xvf sage-5.4.rc1.tar
*
*cd sage-5.4.rc1/*
*export MAKE=make -j4
*
*make*

# from Sage Trac #12719 (http://trac.sagemath.org/sage_trac/ticket/12719):

*./sage --hg qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_ROOT_configuration_files.patch
./sage --hg qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-ipythondir013.patch
./sage --hg -R local/bin qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-scripts.patch
./sage --hg -R local/bin qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_remove_sage_gdb_ipython.patch
./sage --hg -R local/bin qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-test-displayhook.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-5.1beta1.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-move_to_preparser_rebased.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_ipython_fixes.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_dedent.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-crash.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-cellmagics013.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-newipython-take2.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-displayhook.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-fix-transformer.patch
./sage --hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-5.4rc1.patch


Are you sure this patch got applied?  It should have deleted the line 
about os.chdir(os.environ[CUR]) that is complaining in your traceback.


Can you check to see if the two lines deleted by this patch [1] are 
actually deleted in devel/sage/sage/misc/interpreter.py?


Thanks,

Jason


[1] 
http://trac.sagemath.org/sage_trac/attachment/ticket/12719/12719-5.4rc1.patch


--
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-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.