[sage-support] Re: Error inserting new cell

2009-02-06 Thread Jason Grout

kcrisman wrote:
> 
>>> After using the sage notebook for a few days with TinyMCE I got the 
>>> impression
>>> that the Sage notebook is almost pointless without it :-).
> 
> Yes.
> 
>> Yeah, it is one of those features where once you have it you cannot
>> understand why we ever though we didn't need it, so a big giant thanks
>> to Jason for making this happen.
> 
> Yes!


And an even bigger thanks to the TinyMCE guys.  They did all the hard work.

Seriously, that's the edge that we have over other (commercial) systems. 
  We can leverage community work, like jmol, tinymce, numpy, etc., to 
grow by leaps and bounds while we are still small.  I'm really glad that 
the Sage leadership realizes this and actively seeks to work with other 
software projects.


> 
>> I am glad that
>> good ideas I would have not even considered worthy a second look make
>> it from ideas to actual implementation quickly and without the need to
>> fight political battles.
> 
> Yes.
> 
> And what better way to celebrate that than with a call to sage-support
> with two new reproducible bugs!
> 
> 1. Backspacing when there is one character left in the TinyMCE cell
> gets you out of it completely, and you have to click back in the
> cell.  Tabbing doesn't help.  Backspacing twice apparently acts like
> backwards browser navigation, at least in Safari.  (Perhaps a side
> effect of Shift-Enter closing cell?)  This didn't happen on
> sagenb.org, which is 3.3.alpha3.

This doesn't happen on my 3.3.alpha3 either (firefox 3, ubuntu).



> 
> 2. Open a TinyMCE cell.  Try any math expression ending in  instance, $a it bold.  E.g., "I like the inequality $a then make 'because' bold.  Save this, and click the Edit button.
> Save.  Note that  school  tag.  This persists throughout the whole page until there
> is a > sign, and if you do enough things like this TinyMCE and/or the
> browser gets confused and replaces everything with the  tag.
> (This ate a significant chunk of my lecture notes on Friday ten
> minutes before class.)  I think it might also happen with  other symbols x, but this is the only one I could easily reproduce.
> This *does* occur on sagenb.org.


I've posted a patch to #4245 which solves this issue.  This patch needs 
to be reviewed.  I've marked it critical, but it probably ought to be 
marked blocker if it threw away stuff on you.  It's a simple one-line fix.


Thanks,

Jason


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: does Sage work for finfing Groebner basis for a very large system?

2009-02-06 Thread Adela

> It would also be interesting to know how much RAM your system has and
> if the computation you run over night ever hit swap since it is
> basically game over once you hit swap in a GB computation :)
>


I have a brand new system with 4 GB RAM so I guess should be enough.

On the other hand, I discovered that the computations that lead my to
that ideal were somehow wrong because I discovered that the Grobner
Base using DegRevLex  is 1(it seems that for Lex, it took very long
and never finished but with DegRevLex, in said 1 in 5 seconds)  ,
which means there is no solution for my system of nonlinear equations,
and this is wrong. I'm sure I have solutions, so I have to check again
some calculations!


Thank you very much for your advice! I will be back very soon!



--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: does Sage work for finfing Groebner basis for a very large system?

2009-02-06 Thread Adela

> It would also be interesting to know how much RAM your system has and
> if the computation you run over night ever hit swap since it is
> basically game over once you hit swap in a GB computation :)
>


I have a brand new system with 4 GB RAM so I guess should be enough.

On the other hand, I discovered that the computations that lead my to
that ideal were somehow wrong because I discovered that the Grobner
Base using DegRevLex  is 1(it seems that for Lex, it took very long
and never finished but with DegRevLex, in said 1 in 5 seconds)  ,
which means there is no solution for my system of nonlinear equations,
and this is wrong. I'm sure I have solutions, so I have to check again
some calculations!


Thank you very much for your advice! I will be back very soon!



--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: does Sage work for finfing Groebner basis for a very large system?

2009-02-06 Thread Adela



> Well, to be honest 4 GB isn't much these days and GBasis computations
> tend to be rather large, especially if you use Lex. I often ran out of
> memory on a 24 GB system three years ago doing rather large-ish GB
> computations and none of those ideals were the size you posted. That
> was over various F_p and not boolean rings, so the amount of memory
> needed is different and PolyBoRi is extremely efficient storing
> boolean polynomials.

Wow, this is impressive. When I bought the system, I thought that 4 GB
RAM would be enough because usually I don't need that much. But soon
after that, the problem with GBasis arose and I discover that it's not
enough. To be honest, I never imagined that I needed more.

PolyBoRi is automatically used by Sage for GB computations?


On the other hand I calculated my new ideal and I wonder why it takes
so long for SAGE to evaluate just the ideal and not to compute the GB.
As I said in my previous posts, I only introduced the ideal, pressed
evaluate, waited all night long and nothing. So I didn't even got in
to the GB computation phase.

Is this normal?

And another last question: should I use SAGE via web or installe it on
my system? Which one do you think is faster? Does it matter?

Many thanks!

> > On the other hand, I discovered that the computations that lead my to
> > that ideal were somehow wrong because I discovered that the Grobner
> > Base using DegRevLex  is 1(it seems that for Lex, it took very long
> > and never finished but with DegRevLex, in said 1 in 5 seconds)  ,
> > which means there is no solution for my system of nonlinear equations,
> > and this is wrong. I'm sure I have solutions, so I have to check again
> > some calculations!
>
> Ok. In theory you can compute the GBasis in Lex for zero dimensional
> ideals by first computing it in some other term ordering like
> DegRevLex and then use FGLM which worst case complexity is much better
> than the GB computation. Other helpful tricks are homogenization, but
> I am not sure if PolyBoRi is doing so internally.
>
> > Thank you very much for your advice! I will be back very soon!
>
> Let us know if you have any more questions.
>
> Cheers,
>
> Michael
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: does Sage work for finfing Groebner basis for a very large system?

2009-02-06 Thread Martin Albrecht

> PolyBoRi is automatically used by Sage for GB computations?

If you construct a BooleanPolynomialRing. See

http://www.sagemath.org/hg/sage-main/file/b0aa7ef45b3c/sage/rings/polynomial/pbori.pyx

> On the other hand I calculated my new ideal and I wonder why it takes
> so long for SAGE to evaluate just the ideal and not to compute the GB.
> As I said in my previous posts, I only introduced the ideal, pressed
> evaluate, waited all night long and nothing. So I didn't even got in
> to the GB computation phase.
>
> Is this normal?

No, it should be instant. I assume you're talking about the call

B.ideal([x1*x2 + ..., x2 + ..., ...]) ?

> And another last question: should I use SAGE via web or installe it on
> my system? Which one do you think is faster? Does it matter?

If you run a potentially large calculation it is better *not* to use the 
public notebook:
 * the public notebook is for evaluating Sage and not for serious research.
 * it might put a strain on the system which would be not nice for the other 
users of the public notebook
 * there is no guarantee that the server won't be rebooted while your 
calculation is running
 * there is no guarantee that your data is preserved, although we try.

Cheers,
Martin

-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://www.informatik.uni-bremen.de/~malb
_jab: martinralbre...@jabber.ccc.de


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: does Sage work for finfing Groebner basis for a very large system?

2009-02-06 Thread Marshall Hampton

I believe there are memory (and time?) limitations for each user on
sagenb, so a tough GB calculation would likely get stopped.

Seems strange that just defining the ideal would take that long.

-M. Hampton

On Feb 6, 1:35 pm, Martin Albrecht 
wrote:
> > PolyBoRi is automatically used by Sage for GB computations?
>
> If you construct a BooleanPolynomialRing. See
>
> http://www.sagemath.org/hg/sage-main/file/b0aa7ef45b3c/sage/rings/pol...
>
> > On the other hand I calculated my new ideal and I wonder why it takes
> > so long for SAGE to evaluate just the ideal and not to compute the GB.
> > As I said in my previous posts, I only introduced the ideal, pressed
> > evaluate, waited all night long and nothing. So I didn't even got in
> > to the GB computation phase.
>
> > Is this normal?
>
> No, it should be instant. I assume you're talking about the call
>
> B.ideal([x1*x2 + ..., x2 + ..., ...]) ?
>
> > And another last question: should I use SAGE via web or installe it on
> > my system? Which one do you think is faster? Does it matter?
>
> If you run a potentially large calculation it is better *not* to use the
> public notebook:
>  * the public notebook is for evaluating Sage and not for serious research.
>  * it might put a strain on the system which would be not nice for the other
> users of the public notebook
>  * there is no guarantee that the server won't be rebooted while your
> calculation is running
>  * there is no guarantee that your data is preserved, although we try.
>
> Cheers,
> Martin
>
> --
> name: Martin Albrecht
> _pgp:http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
> _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
> _www:http://www.informatik.uni-bremen.de/~malb
> _jab: martinralbre...@jabber.ccc.de
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: does Sage work for finfing Groebner basis for a very large system?

2009-02-06 Thread mabshoff

[CCing Michael B. and Alexander D. since they seem to be unaware of
this discussion involving PolyBoRi]

On Feb 6, 3:35 am, Martin Albrecht 
wrote:

Hi,

> > PolyBoRi is automatically used by Sage for GB computations?
>
> If you construct a BooleanPolynomialRing. See
>
> http://www.sagemath.org/hg/sage-main/file/b0aa7ef45b3c/sage/rings/pol...
>
> > On the other hand I calculated my new ideal and I wonder why it takes
> > so long for SAGE to evaluate just the ideal and not to compute the GB.
> > As I said in my previous posts, I only introduced the ideal, pressed
> > evaluate, waited all night long and nothing. So I didn't even got in
> > to the GB computation phase.
>
> > Is this normal?
>
> No, it should be instant. I assume you're talking about the call
>
> B.ideal([x1*x2 + ..., x2 + ..., ...]) ?
>
> > And another last question: should I use SAGE via web or installe it on
> > my system? Which one do you think is faster? Does it matter?
>
> If you run a potentially large calculation it is better *not* to use the
> public notebook:
>  * the public notebook is for evaluating Sage and not for serious research.
>  * it might put a strain on the system which would be not nice for the other
> users of the public notebook

Indeed, there are rather tight memory and CPU time limits on a per
account basis that you are very likely to run into when doing GBasis
computation work.

>  * there is no guarantee that the server won't be rebooted while your
> calculation is running
>  * there is no guarantee that your data is preserved, although we try.
>
> Cheers,
> Martin

Cheers,

Michael
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: does Sage work for finfing Groebner basis for a very large system?

2009-02-06 Thread Adela

Thank you to everyone!

You really help me with your answers!





> >I assume you're talking about the call
> > B.ideal([x1*x2 + ..., x2 + ..., ...]) ?



Yes, about this call I'm talking about! I can see the sandals when
scrolling over there..I guess the feedback from  SAge is that has
finished computations when a new space for introducing commands
appears.



--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: does Sage work for finfing Groebner basis for a very large system?

2009-02-06 Thread mabshoff



On Feb 6, 4:06 am, Adela  wrote:
> Thank you to everyone!
>
> You really help me with your answers!
>
> > >I assume you're talking about the call
> > > B.ideal([x1*x2 + ..., x2 + ..., ...]) ?
>
> Yes, about this call I'm talking about! I can see the sandals when
> scrolling over there..I guess the feedback from  SAge is that has
> finished computations when a new space for introducing commands
> appears.

Yes.

Could you send the simplest, self contained example that exhibits the
problem for you as an attachment to the list? We would be interested
to see if you have hit some bug and/or scalability issue. Sending it
as an attachment prevents the groups from mangling it. You could also
post the Sage code on some website and give us the URL.

Cheers,

Michael
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: does Sage work for finfing Groebner basis for a very large system?

2009-02-06 Thread Michael Brickenstein

Hi!
If I didn't made an error converting this input, PolyBoRi returns an
answer immediately.
Indeed [1].
And of course it is the GB for all orderings.
Regarding "seeing, what is going" use "prot=True".

Michael


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Sagetex issues

2009-02-06 Thread Samuel DM

Yes, it seems they were not generated. I thought running pdflatex on
the file with the shell-escape option was enough though.
The rendered pdf is full of "??" so my guess is that sage commands
don't work when being called by latex.
Is there a way to solve that?

Samuel DM

On 6 fév, 13:54, Harald Schilly  wrote:
> On Feb 6, 1:50 pm, Samuel DM  wrote:
>
> > I have MacTeX (TL 2008) and tlmgr has installed sagetex so there
> > should be no problem, but when I run pdflatex on the example.tex file,
> > the log file mentions that it couldn't find the graphic files.
>
> Well, are there graphic files in subdirectories? They are generated
> once you run the extracted sage-code! The only reason I can think of
> is, that they are not generated or generated at the wrong place or
> something like that ...
>
> H
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Sagetex issues

2009-02-06 Thread Harald Schilly



On Feb 6, 2:06 pm, Samuel DM  wrote:
> Yes, it seems they were not generated. I thought running pdflatex on
> the file with the shell-escape option was enough though.
> The rendered pdf is full of "??" so my guess is that sage commands
> don't work when being called by latex.
> Is there a way to solve that?

What's the shell escape option? According to §3 of the manual, you
have to "typeset your document, you need to run
LATEX, then run Sage (on the .sage file, you get a .sout), then run
LATEX again."

h
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: computations to obtain GBasis for an ideal

2009-02-06 Thread William Stein

On Fri, Feb 6, 2009 at 5:58 AM, Adela Mihaita  wrote:
> Hello!
>
>
> I attached to this message a file with the commands I introduced in Sage to
> prepare my ideal for the GB computation. The first one works ok, but after
> introducing the ideal and pressing, I have to wait and wait, and never get a
> result.
>
> Thank you!

There is nothing attached to this message.

William

--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Sagetex issues

2009-02-06 Thread Jason Grout

Harald Schilly wrote:
> 
> 
> On Feb 6, 2:06 pm, Samuel DM  wrote:
>> Yes, it seems they were not generated. I thought running pdflatex on
>> the file with the shell-escape option was enough though.
>> The rendered pdf is full of "??" so my guess is that sage commands
>> don't work when being called by latex.
>> Is there a way to solve that?
> 
> What's the shell escape option? According to §3 of the manual, you
> have to "typeset your document, you need to run
> LATEX, then run Sage (on the .sage file, you get a .sout), then run
> LATEX again."


Harald's right.  You're missing a step.  You have to run sage on the 
generated .sage file.

Harald: the shell-escape option lets tex run outside programs (shell 
programs).  Here is an example of what is possible: 
http://www.texample.net/weblog/2008/oct/24/embedding-python-latex/  That 
is similar to sagetex, in that it lets you run python programs and embed 
the output in tex.

That said, Dan, what do you think of using the shell-escape option to 
run Sage directly?

Jason


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: computations to obtain GBasis for an ideal

2009-02-06 Thread Martin Albrecht

On Friday 06 February 2009, Adela Mihaita wrote:
> Hello!
>
>
> I attached to this message a file with the commands I introduced in Sage to
> prepare my ideal for the GB computation. The first one works ok, but after
> introducing the ideal and pressing, I have to wait and wait, and never get
> a result.

Fails with:

AttributeError: 'sage.rings.polynomial.pbori.BooleanPolynomialRing' object has 
no attribute 'Ideal'

after fixing that it works in < 20 seconds (inkl. Sage startup).

Martin

-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://www.informatik.uni-bremen.de/~malb
_jab: martinralbre...@jabber.ccc.de


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: computations to obtain GBasis for an ideal

2009-02-06 Thread Adela



>
> Fails with:
>
> AttributeError: 'sage.rings.polynomial.pbori.BooleanPolynomialRing' object has
> no attribute 'Ideal'
>
> after fixing that it works in < 20 seconds (inkl. Sage startup).
>


I never got this message because after introducing the ideal, it keeps
thinking and never ending. I don' t know why this happens. Anyway, if,
despite of this, I try to compute the groebner base by the call
I.groebner_basis()  I get an error  AttributeError: 'I_class' object
has no attribute 'groebner_basis'.

Can you tell me when do you obtain that error you mentioned how do you
fix it?

I don't understand what happens, why I get different messages.

Thank you very much for helping!
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How can you read a .txt/csv file in Sage?

2009-02-06 Thread Marshall Hampton

Sometimes its convenient to use the DATA directory, which will be
packaged with the worksheet if you save it (as a .sws file).  So for
example you could copy the file to the DATA directory doing something
like:

os.system('cp /full/path/to/list2.txt ' + DATA + 'list2.txt')

and then

f = open(DATA + 'list2.txt')

should work, and would still work if you saved a worksheet copy and
moved it to another computer.

I am tempted to open a ticket in trac for some sort of read_csv
command, which might behave like the following (NOTE: this is just
wishful thinking at this point):

data_list = read_csv('my_file.csv') # data_list would be a list of
lists of row data, converted to numerical types if possible
data_list = read_csv('my_file.csv', seperator = '\t')  #split lines by
a tab character instead
data_list = read_csv('my_file.csv', fields = [int,int,string])
#perhaps useful to have more explicit field conversions

Does something like that already exist?  Seems very common as a task.
Of course its not that hard to do ad-hoc, but it would make things
more user-friendly for lots of people I think.

Marshall Hampton

On Feb 5, 10:10 pm, Fall In Love with Sage 
wrote:
> Thank you!
> It works now :)
>
> On Feb 5, 9:54 pm, David Joyner  wrote:
>
> > On Thu, Feb 5, 2009 at 2:48 PM, Fall In Love with Sage
>
> >  wrote:
>
> > > Thank you for your response!
>
> > > The problem is now in the following codes:
> > > 1.
> > >   f = open("list2.txt")
> > >   l1 = f.readline()
> > >   ls1 = l1.split("  ")
> > >   l1
>
> > > gives:
> > >   Traceback (click to the left for traceback)
> > >   ...
> > >   IOError: [Errno 2] No such file or directory: 'list2.txt'
>
> > > Similarly, the eval function, eval(ls1), in (1) and the following code
> > > (2) causes the previous error.
>
> > > 2.
> > >   f = open('list2.txt')
> > >   varList = [x.split(' // ') for x in f.readlines()]
>
> > > I have the file list2.txt at SageRoot.
>
> > Does it help to give it the abs path?
>
> > f = open("/full/path/to/list2.txt")
>
> > > On Feb 5, 9:28 pm, David Joyner  wrote:
> > >> Possibly I'm not understanding your English.
> > >> Python can read in any text file, for example csv.
> > >> So, the answer to your question seems to be in the
> > >> thread you cited.
>
> > >> Also, if you want to know which directory Sageroot is,
> > >> type SAGE_ROOT. For example:
>
> > >> sage: SAGE_ROOT
> > >> '/home/wdj/sagefiles/sage-3.3.alpha1'
>
> > >> Hope this helps.
>
> > >> On Thu, Feb 5, 2009 at 2:11 PM, Fall In Love with Sage
>
> > >>  wrote:
>
> > >> > My .txt/csv -file looks like in Vim:
> > >> > 1,4
> > >> > 2,5
> > >> > 3,6
> > >> > I can have both filetypes. I am not sure, which one Sage supports.
>
> > >> > Open two columns in Sage:
> > >> > - I know that the file needs be at Sageroot. My Sage is installed at ~/
> > >> > apps/Sage in Mac.
> > >> > Where in ~/apps/Sage do I need to put the file?
>
> > >> > This question is based on the following discussions:
> > >> > 1.http://groups.google.com/group/sage-support/browse_thread/thread/4600...
> > >> > 2.http://stackoverflow.com/questions/494116/how-can-you-move-a-list-fro...
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] computations to obtain GBasis for an ideal

2009-02-06 Thread Adela Mihaita
Hello!


I attached to this message a file with the commands I introduced in Sage to
prepare my ideal for the GB computation. The first one works ok, but after
introducing the ideal and pressing, I have to wait and wait, and never get a
result.

Thank you!

--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: does Sage work for finfing Groebner basis for a very large system?

2009-02-06 Thread mabshoff



On Feb 6, 1:36 am, Adela  wrote:
> > It would also be interesting to know how much RAM your system has and
> > if the computation you run over night ever hit swap since it is
> > basically game over once you hit swap in a GB computation :)
>
> I have a brand new system with 4 GB RAM so I guess should be enough.

Well, to be honest 4 GB isn't much these days and GBasis computations
tend to be rather large, especially if you use Lex. I often ran out of
memory on a 24 GB system three years ago doing rather large-ish GB
computations and none of those ideals were the size you posted. That
was over various F_p and not boolean rings, so the amount of memory
needed is different and PolyBoRi is extremely efficient storing
boolean polynomials.

> On the other hand, I discovered that the computations that lead my to
> that ideal were somehow wrong because I discovered that the Grobner
> Base using DegRevLex  is 1(it seems that for Lex, it took very long
> and never finished but with DegRevLex, in said 1 in 5 seconds)  ,
> which means there is no solution for my system of nonlinear equations,
> and this is wrong. I'm sure I have solutions, so I have to check again
> some calculations!

Ok. In theory you can compute the GBasis in Lex for zero dimensional
ideals by first computing it in some other term ordering like
DegRevLex and then use FGLM which worst case complexity is much better
than the GB computation. Other helpful tricks are homogenization, but
I am not sure if PolyBoRi is doing so internally.

> Thank you very much for your advice! I will be back very soon!

Let us know if you have any more questions.

Cheers,

Michael
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Sagetex issues

2009-02-06 Thread Samuel DM

Hello,
I have a couple of problems trying to use sagetex. I am basically
trying to compile the example.tex file in the latex_embed folder of
the example directory.

I have MacTeX (TL 2008) and tlmgr has installed sagetex so there
should be no problem, but when I run pdflatex on the example.tex file,
the log file mentions that it couldn't find the graphic files.

I have tried to install sagetex manually in my texmf directory but
that doesn't solve anything.

I should also mention that sage runs perfectly fine in either bash or
notebook mode.

I thank you in advance for your help.
Best regards,
Samuel DM

--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Sagetex issues

2009-02-06 Thread Harald Schilly



On Feb 6, 1:50 pm, Samuel DM  wrote:
> I have MacTeX (TL 2008) and tlmgr has installed sagetex so there
> should be no problem, but when I run pdflatex on the example.tex file,
> the log file mentions that it couldn't find the graphic files.
>

Well, are there graphic files in subdirectories? They are generated
once you run the extracted sage-code! The only reason I can think of
is, that they are not generated or generated at the wrong place or
something like that ...

H
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How can you read a .txt/csv file in Sage?

2009-02-06 Thread Marshall Hampton

Thanks Jason, I'm surprised this never showed up on my radar before.

-Marshall

On Feb 6, 12:45 pm, Jason Grout  wrote:
> Marshall Hampton wrote:
> > Sometimes its convenient to use the DATA directory, which will be
> > packaged with the worksheet if you save it (as a .sws file).  So for
> > example you could copy the file to the DATA directory doing something
> > like:
>
> > os.system('cp /full/path/to/list2.txt ' + DATA + 'list2.txt')
>
> > and then
>
> > f = open(DATA + 'list2.txt')
>
> > should work, and would still work if you saved a worksheet copy and
> > moved it to another computer.
>
> > I am tempted to open a ticket in trac for some sort of read_csv
> > command, which might behave like the following (NOTE: this is just
> > wishful thinking at this point):
>
> > data_list = read_csv('my_file.csv') # data_list would be a list of
> > lists of row data, converted to numerical types if possible
> > data_list = read_csv('my_file.csv', seperator = '\t')  #split lines by
> > a tab character instead
> > data_list = read_csv('my_file.csv', fields = [int,int,string])
> > #perhaps useful to have more explicit field conversions
>
> > Does something like that already exist?  Seems very common as a task.
> > Of course its not that hard to do ad-hoc, but it would make things
> > more user-friendly for lots of people I think.
>
> Yes, python has a very nice CSV module.  
> Seehttp://www.python.org/doc/2.5.2/lib/module-csv.html
>
> Thanks,
>
> Jason
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How can you read a .txt/csv file in Sage?

2009-02-06 Thread Jason Grout

Marshall Hampton wrote:
> Sometimes its convenient to use the DATA directory, which will be
> packaged with the worksheet if you save it (as a .sws file).  So for
> example you could copy the file to the DATA directory doing something
> like:
> 
> os.system('cp /full/path/to/list2.txt ' + DATA + 'list2.txt')
> 
> and then
> 
> f = open(DATA + 'list2.txt')
> 
> should work, and would still work if you saved a worksheet copy and
> moved it to another computer.
> 
> I am tempted to open a ticket in trac for some sort of read_csv
> command, which might behave like the following (NOTE: this is just
> wishful thinking at this point):
> 
> data_list = read_csv('my_file.csv') # data_list would be a list of
> lists of row data, converted to numerical types if possible
> data_list = read_csv('my_file.csv', seperator = '\t')  #split lines by
> a tab character instead
> data_list = read_csv('my_file.csv', fields = [int,int,string])
> #perhaps useful to have more explicit field conversions
> 
> Does something like that already exist?  Seems very common as a task.
> Of course its not that hard to do ad-hoc, but it would make things
> more user-friendly for lots of people I think.

Yes, python has a very nice CSV module.  See 
http://www.python.org/doc/2.5.2/lib/module-csv.html

Thanks,

Jason


--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] How set UTF8 on the sage Notebook published page automatically?

2009-02-06 Thread NoSyu

Hello~

I test the sage on the sage Notebook homepage.

http://www.sagenb.org

So I wrote the code and comments and published it.

http://www.sagenb.org/home/pub/209/


I'm Korean and I want to show my code to my friends.

So I wrote the comments in Korean.

Sage support UTF-8, So I can see the comments.


But there is one problem.

Web browser's default encoding is EUC-KR not UTF-8.

In EUC-KR encoding, I can't read the comments cause it's broken.

So everytime my friends change the encoding manually.

Does any other solution about this problems?

--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: does Sage work for finfing Groebner basis for a very large system?

2009-02-06 Thread Adela

I sent a new message with the attachment required.

Thank you!

On 6 Feb, 14:35, mabshoff 
wrote:
> On Feb 6, 4:06 am, Adela  wrote:
>
> > Thank you to everyone!
>
> > You really help me with your answers!
>
> > > >I assume you're talking about the call
> > > > B.ideal([x1*x2 + ..., x2 + ..., ...]) ?
>
> > Yes, about this call I'm talking about! I can see the sandals when
> > scrolling over there..I guess the feedback from  SAge is that has
> > finished computations when a new space for introducing commands
> > appears.
>
> Yes.
>
> Could you send the simplest, self contained example that exhibits the
> problem for you as an attachment to the list? We would be interested
> to see if you have hit some bug and/or scalability issue. Sending it
> as an attachment prevents the groups from mangling it. You could also
> post the Sage code on some website and give us the URL.
>
> Cheers,
>
> Michael
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] trouble with modular forms in SAGE

2009-02-06 Thread beppe

Hello,
I'm novice in SAGE but I have a strange problem:
I have to compute some eigenvalues for the set of cuspidal newforms
for the group Gamma0(15), weight 4 and Legendre character chi of
conductor 5, so I type in SAGE the following set of instruction:

SAGE: chi=DirichletGroup(11,QQ).1
SAGE: m=numerical_eigenforms(chi,4); m
   Numerical Hecke eigenvalues for [1,-1] of weight 4
SAGE: m.ap(2)

This instruction produces a crash: in notebook the system answers:
   /usr/local/sage/local/bin/sage-sage: line 352:  4080 Illegal
instruction
   python "$@"

In SAGE command line mode this set of instructions produces a similar
crash.
Some could help me? I thank you in advance,
Beppe



--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: trouble with modular forms in SAGE

2009-02-06 Thread William Stein

On Fri, Feb 6, 2009 at 8:58 AM, beppe  wrote:
>
> Hello,
> I'm novice in SAGE but I have a strange problem:
> I have to compute some eigenvalues for the set of cuspidal newforms
> for the group Gamma0(15), weight 4 and Legendre character chi of
> conductor 5, so I type in SAGE the following set of instruction:
>
> SAGE: chi=DirichletGroup(11,QQ).1
> SAGE: m=numerical_eigenforms(chi,4); m
>   Numerical Hecke eigenvalues for [1,-1] of weight 4
> SAGE: m.ap(2)
>
> This instruction produces a crash: in notebook the system answers:
>   /usr/local/sage/local/bin/sage-sage: line 352:  4080 Illegal
> instruction
>   python "$@"
>
> In SAGE command line mode this set of instructions produces a similar
> crash.
> Some could help me? I thank you in advance,
> Beppe
>

You downloaded the wrong binary.   Fixes:

(1) download the right binary, if there is one available, or

(2) use the public sage notebook server (sagenb.org), or

(3) build sage from source.

Second your code contains a bug:

chi=DirichletGroup(11,QQ).1
should be
chi=DirichletGroup(11,QQ).0

since the indexing in sage is 0 based.

Third, that space as dimension 0.  But if you
chi=DirichletGroup(11,QQ).0^2
you get something of dimension 4.

Here's some examples of how things were when you have a binary for the
right machine:

sage: chi=DirichletGroup(11,QQ).0^2
sage: m=numerical_eigenforms(chi,4); m
sage: m.ap(2)
[9.0, 9.0 + 2.77555756156e-17*I, 2.73205080757 + 1.23504195035e-16*I,
-0.732050807569 - 2.08519811694e-15*I]
sage: dimension_modular_forms(chi^2,4)
4
sage: m.ap(3)
[28.0, 28.0 - 1.66533453694e-16*I, -7.92820323028 +
3.91694614232e-15*I, 5.92820323028 - 5.96234312405e-16*I]
sage: ModularForms(chi,4)
Modular Forms space of dimension 4 for Congruence Subgroup Gamma0(11)
of weight 4 over Rational Field
sage: ModularForms(chi,4).basis()
[
q + 3*q^3 - 6*q^4 - 7*q^5 + O(q^6),
q^2 - 4*q^3 + 2*q^4 + 8*q^5 + O(q^6),
1 + O(q^6),
q + 9*q^2 + 28*q^3 + 73*q^4 + 126*q^5 + O(q^6)
]




 -- William

--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: computations to obtain GBasis for an ideal

2009-02-06 Thread William Stein

On Fri, Feb 6, 2009 at 7:50 AM, Adela  wrote:
>
>
>
>>
>> Fails with:
>>
>> AttributeError: 'sage.rings.polynomial.pbori.BooleanPolynomialRing' object 
>> has
>> no attribute 'Ideal'
>>
>> after fixing that it works in < 20 seconds (inkl. Sage startup).
>>
>
>
> I never got this message because after introducing the ideal, it keeps
> thinking and never ending. I don' t know why this happens. Anyway, if,
> despite of this, I try to compute the groebner base by the call
> I.groebner_basis()  I get an error  AttributeError: 'I_class' object
> has no attribute 'groebner_basis'.
>
> Can you tell me when do you obtain that error you mentioned how do you
> fix it?
>
> I don't understand what happens, why I get different messages.
>
> Thank you very much for helping!

You should type

I = B.ideal(...)

instead of

I = B.Ideal(...)

!!

--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: trouble with modular forms in SAGE

2009-02-06 Thread giuseppe.molteni1

Dear William,
I thank you for your very prompt replay!
Actually ther is a missprint in my post: the my group
is Gamma0(15), not Gamma0(11), so the first line of
my code was

SAGE: chi=DirichletGroup(15,QQ).1

so that the dimension of the eigenforms space is 4.
I have just tried the code on the public notebook server
without any crash: as you suggest me the origin of my
problem is evidently in my binary (I'm using windows
with VMware Player). In next days I will download a
different version.
Thank you again,
Beppe



William Stein ha scritto:
> On Fri, Feb 6, 2009 at 8:58 AM, beppe  wrote:
>   
>> Hello,
>> I'm novice in SAGE but I have a strange problem:
>> I have to compute some eigenvalues for the set of cuspidal newforms
>> for the group Gamma0(15), weight 4 and Legendre character chi of
>> conductor 5, so I type in SAGE the following set of instruction:
>>
>> SAGE: chi=DirichletGroup(11,QQ).1
>> SAGE: m=numerical_eigenforms(chi,4); m
>>   Numerical Hecke eigenvalues for [1,-1] of weight 4
>> SAGE: m.ap(2)
>>
>> This instruction produces a crash: in notebook the system answers:
>>   /usr/local/sage/local/bin/sage-sage: line 352:  4080 Illegal
>> instruction
>>   python "$@"
>>
>> In SAGE command line mode this set of instructions produces a similar
>> crash.
>> Some could help me? I thank you in advance,
>> Beppe
>>
>> 
>
> You downloaded the wrong binary.   Fixes:
>
> (1) download the right binary, if there is one available, or
>
> (2) use the public sage notebook server (sagenb.org), or
>
> (3) build sage from source.
>
> Second your code contains a bug:
>
> chi=DirichletGroup(11,QQ).1
> should be
> chi=DirichletGroup(11,QQ).0
>
> since the indexing in sage is 0 based.
>
> Third, that space as dimension 0.  But if you
> chi=DirichletGroup(11,QQ).0^2
> you get something of dimension 4.
>
> Here's some examples of how things were when you have a binary for the
> right machine:
>
> sage: chi=DirichletGroup(11,QQ).0^2
> sage: m=numerical_eigenforms(chi,4); m
> sage: m.ap(2)
> [9.0, 9.0 + 2.77555756156e-17*I, 2.73205080757 + 1.23504195035e-16*I,
> -0.732050807569 - 2.08519811694e-15*I]
> sage: dimension_modular_forms(chi^2,4)
> 4
> sage: m.ap(3)
> [28.0, 28.0 - 1.66533453694e-16*I, -7.92820323028 +
> 3.91694614232e-15*I, 5.92820323028 - 5.96234312405e-16*I]
> sage: ModularForms(chi,4)
> Modular Forms space of dimension 4 for Congruence Subgroup Gamma0(11)
> of weight 4 over Rational Field
> sage: ModularForms(chi,4).basis()
> [
> q + 3*q^3 - 6*q^4 - 7*q^5 + O(q^6),
> q^2 - 4*q^3 + 2*q^4 + 8*q^5 + O(q^6),
> 1 + O(q^6),
> q + 9*q^2 + 28*q^3 + 73*q^4 + 126*q^5 + O(q^6)
> ]
>
>
>
>
>  -- William
>
> >
>
>   

--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] attach works in command line but not in notebook

2009-02-06 Thread ricardomayerb

Dear all,

  I'm trying to attach a python script. I'm probably doing somethign
wrong, but the weird thing is that what I do works for the command
line but not from the notebook. Let me show you.

This works:
--
| Sage Version 3.2.3, Release Date: 2009-01-05   |
| Type notebook() for the GUI, and license() for information.|
--
sage: os.getcwd()
'/home/ricardo/sage-3.2.2'
sage: os.chdir('/media/disk/thesiswork/thesis2009/sage/src/
sympy_files')
sage: os.getcwd
()
'/media/disk/thesiswork/thesis2009/sage/src/sympy_files'
sage: attach thesis_sympy_2009.py

So no problem there.

but this doesn't:

sage: notebook()
The notebook files are stored in: /home/ricardo/.sage//sage_notebook

os.chdir('/media/disk/thesiswork/thesis2009/sage/src/sympy_files')

attach thesis_sympy_2009.py
--->Error attaching /home/ricardo/.sage/thesis_sympy_2009.py -- file
not
found

os.getcwd()
--->'/home/ricardo/.sage/sage_notebook/worksheets/admin/4/cells/3'

...so obviously os.chdir didn't change the dir where the notebook
looks for files (mybe is not supposed to...). Thus, I tried using an
absolute path instead:

attach /media/disk/thesiswork/thesis2009/sage/src/sympy_files/
thesis_sympy_2009.py
---> Syntax Error:
attach
/media/disk/thesiswork/thesis2009/sage/src/sympy_files/
thesis_sympy_2009\
.py

how could I use absolute paths with attach inside a notebook? Is there
a workaround?

I also tried setting the variable DIR to /media/disk/thesiswork/
thesis2009/sage/src/sympy_files/ and then using attach
thesis_sympy_2009.py but it didn't work either

thanks in advance for your help

Ricardo

--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: attach works in command line but not in notebook

2009-02-06 Thread adrian

You need to give the full path if you are in the notebook.
If you strongly need to not to give the full path you could run the
command
$mkdir (where your files are)/sagenotebook
$sage -notebook directory="Where your files are/sagenotebook"

The disadvantage is that this will create another server, and you
won't be able to see the worksheets you had in .sage/notebook

this was the discussion in
http://groups.google.com/group/sage-support/browse_thread/thread/37795251481402a1/552ac0654c85f4ec?lnk=gst&q=attach#552ac0654c85f4ec

This kind of behaviour is the reason for the ticket in
http://trac.sagemath.org/sage_trac/ticket/5169

Hope this helps

-Adrian.

On Feb 6, 10:40 am, ricardomayerb  wrote:
> Dear all,
>
>   I'm trying to attach a python script. I'm probably doing somethign
> wrong, but the weird thing is that what I do works for the command
> line but not from the notebook. Let me show you.
>
> This works:
> --
> | Sage Version 3.2.3, Release Date: 2009-01-05                       |
> | Type notebook() for the GUI, and license() for information.        |
> --
> sage: os.getcwd()
> '/home/ricardo/sage-3.2.2'
> sage: os.chdir('/media/disk/thesiswork/thesis2009/sage/src/
> sympy_files')
> sage: os.getcwd
> ()
> '/media/disk/thesiswork/thesis2009/sage/src/sympy_files'
> sage: attach thesis_sympy_2009.py
>
> So no problem there.
>
> but this doesn't:
>
> sage: notebook()
> The notebook files are stored in: /home/ricardo/.sage//sage_notebook
>
> os.chdir('/media/disk/thesiswork/thesis2009/sage/src/sympy_files')
>
> attach thesis_sympy_2009.py
> --->Error attaching /home/ricardo/.sage/thesis_sympy_2009.py -- file
> not
> found
>
> os.getcwd()
> --->'/home/ricardo/.sage/sage_notebook/worksheets/admin/4/cells/3'
>
> ...so obviously os.chdir didn't change the dir where the notebook
> looks for files (mybe is not supposed to...). Thus, I tried using an
> absolute path instead:
>
> attach /media/disk/thesiswork/thesis2009/sage/src/sympy_files/
> thesis_sympy_2009.py
> ---> Syntax Error:
> attach
> /media/disk/thesiswork/thesis2009/sage/src/sympy_files/
> thesis_sympy_2009\
> .py
>
> how could I use absolute paths with attach inside a notebook? Is there
> a workaround?
>
> I also tried setting the variable DIR to /media/disk/thesiswork/
> thesis2009/sage/src/sympy_files/ and then using attach
> thesis_sympy_2009.py but it didn't work either
>
> thanks in advance for your help
>
> Ricardo
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: trouble with modular forms in SAGE

2009-02-06 Thread William Stein

On Fri, Feb 6, 2009 at 9:37 AM, giuseppe.molteni1
 wrote:
>
> Dear William,
> I thank you for your very prompt replay!
> Actually ther is a missprint in my post: the my group
> is Gamma0(15), not Gamma0(11), so the first line of
> my code was
>
> SAGE: chi=DirichletGroup(15,QQ).1
>
> so that the dimension of the eigenforms space is 4.
> I have just tried the code on the public notebook server
> without any crash: as you suggest me the origin of my
> problem is evidently in my binary (I'm using windows
> with VMware Player). In next days I will download a
> different version.
> Thank you again,
> Beppe

Unfortunately, there is no different version to download.

We're currently working on making it so the sage vmware player will
work even on older computers that don't have sse3 instructions.   I hope
this happens soon.  In the meantime, please feel free to use sagenb.org
as much as you want.

William

--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Sagetex issues

2009-02-06 Thread Harald Schilly

On Feb 6, 4:16 pm, Jason Grout  wrote:
>
> That said, Dan, what do you think of using the shell-escape option to
> run Sage directly?
>

The whole idea behind the design of this additional file in sagetex
is, that the sage-calculations could take some time! And at least I
don't want to wait for them when I just change a letter or something
else trivial ;)
But of course, maybe it is possible to create some kind of intelligent
Makefile that runs latex, compares the generated sage file with the
previous one. if there are changes, runs sage on the sage-file and
repeats with step one, if not, just finishes. Then you would have a
one-shot command that has the benefits of caching the sage-
calculations.

h
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: computations to obtain GBasis for an ideal

2009-02-06 Thread Adela

One more question.

Did you use the command line in WM or Firefox?

I used Firefox and I still have the problem of looong waiting; nothing
changed even when  I modified that problem with the ideal.

On 6 Feb, 19:12, William Stein  wrote:
> On Fri, Feb 6, 2009 at 7:50 AM, Adela  wrote:
>
> >> Fails with:
>
> >> AttributeError: 'sage.rings.polynomial.pbori.BooleanPolynomialRing' object 
> >> has
> >> no attribute 'Ideal'
>
> >> after fixing that it works in < 20 seconds (inkl. Sage startup).
>
> > I never got this message because after introducing the ideal, it keeps
> > thinking and never ending. I don' t know why this happens. Anyway, if,
> > despite of this, I try to compute the groebner base by the call
> > I.groebner_basis()  I get an error  AttributeError: 'I_class' object
> > has no attribute 'groebner_basis'.
>
> > Can you tell me when do you obtain that error you mentioned how do you
> > fix it?
>
> > I don't understand what happens, why I get different messages.
>
> > Thank you very much for helping!
>
> You should type
>
> I = B.ideal(...)
>
> instead of
>
> I = B.Ideal(...)
>
> !!
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Solving a 2nd order linear ODE with initial conditions

2009-02-06 Thread Robert Bradshaw

On Feb 1, 2009, at 3:42 PM, David Joyner wrote:

> On Sun, Feb 1, 2009 at 5:34 PM, Christophe Deroulers
>  wrote:
>>
>
>>
>>  When one looks at what Sage sends to Maxima when "desolve(diff(y,x,
>> 2)+y(x)==0,y,[0,3,2])" is called, it turns out that Maxima receives
>> something like
>>
>> my_ode: diff('y(x),x,2) + 'y(x) = 0;
>> my_sol: ode2(my_ode, 'y(x), x);
>> ic2(my_sol, x=0, 'y(x)=2, diff('y(x),x)=3);
>>
>> and then Maxima returns "y(x) = 3 sin(x) + y(0) cos(x)", whereas the
>> documentation of Maxima's ode2 seems to expect that one should type:
>>
>> my_ode: 'diff(y,x,2) + y = 0;
>> my_sol: ode2(my_ode, y, x);
>> ic2(my_sol, x=0, y=2, 'diff(y,x)=3);
>>
>> in which case Maxima returns "y = 3 sin(x) + 2 cos(x)" (the expected
>> answer).
>>
>
> Thanks, this is very interesting.
>
>
> In this case, it seems that the subfunction
>
> def to_eqns(lhs, exprs):
> eqns = []
> for lhs, expr in zip(lhs, exprs):
> if isinstance(expr, SymbolicEquation):
> eqns.append(expr)
> else:
> if lhs == dvar and len(exprs) == 2:
> ivar_ic = exprs[0] # figure this out...
> lhs = lhs._f(ivar_ic)
> eqns.append(lhs == expr)
>
> in desolver needs to be modified somehow. It sets the
> syntax of the initial conditions passed to maxima.
>
>
>
>> Therefore, one could think of:
>>
> ...
>>
>> (3) Patching Sage so that it checks that there is no y(0) left in the
>> solution and, if any, eliminates it by calling solve and  
>> substituting.
>>
>> (4) Modifying Sage to that it sends to Maxima's ode2 and ic2  
>> functions
>> what they actually expect (i.e. an O.D.E. and I.C. with y, not 'y 
>> (x)).
>>
>
>
> I think this is the most natural way to go but I don't see how to  
> do it.

For sure this is the way to do it. I'm not sure what maxima expects,  
but it shouldn't be too hard (I wrote the above code quickly one  
morning for a demo, knowing nothing about Maxima's DE solvers  
beforehand, and didn't have time to flush it out fully).

- Robert



--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Iterators in compiled code?

2009-02-06 Thread Robert Bradshaw

On Jan 31, 2009, at 3:23 AM, Alasdair wrote:

>
> Well I tried
>
> v = iter(Permutations(range(n)))
>
> and the code compiled fine - but still ran slow.  To test the Petersen
> graph (10 vertices), the compiled code took a wall time of  524.23 s,
> and the uncompiled code, using
>
> v=(p for p in Permutations(range(n)))
>
> took a wall time of 492.22 s.  The CPU times were pretty much the same
> for both.  I was hoping for a great speed up in the compiled code, but
> I haven't got it yet.

Depending on what you're doing with the permutations, all your time  
may be spent elsewhere, and compiling your snippet may not help.  
Specifically, if you don't "cdef" anything I'd be surprised to see a  
big speedup, but if you cimport permutation group elements directly  
you could probably be 100x faster.

- Robert



--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Segmentation fault

2009-02-06 Thread Timothy Clemans

Hi,

On both the command line and in the notebook (my computer and
sagenb.org) with 3.3.alpha5 Sage closes after executing the following:

{{{
from jinja import Environment
env = Environment()

s = """{% for i in a %}
{{ i }}
{% endfor %}"""

tmpl = env.from_string(s)
print tmpl.render(a=[1,2,3])
}}}

In the notebook the error is
/home/sage/sage/local/bin/sage-sage: line 355: 19626 Segmentation fault
python "$@"
Connection to localhost closed.

If the Notebook looses connection to Sage should it automatically
restart Sage? Right now executing anything in the worksheet after the
error just comes back blank.

--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Segmentation fault

2009-02-06 Thread mabshoff



On Feb 6, 1:52 pm, Timothy Clemans  wrote:
> Hi,

Hi Timothy,

> On both the command line and in the notebook (my computer and
> sagenb.org) with 3.3.alpha5 Sage closes after executing the following:
>
> {{{
> from jinja import Environment
> env = Environment()
>
> s = """{% for i in a %}
> {{ i }}
> {% endfor %}"""
>
> tmpl = env.from_string(s)
> print tmpl.render(a=[1,2,3])
>
> }}}
>
> In the notebook the error is
> /home/sage/sage/local/bin/sage-sage: line 355: 19626 Segmentation fault
> python "$@"
> Connection to localhost closed.

This does not cause any issue in pure Python:

mabsh...@geom:/scratch/mabshoff/sage-3.3.alpha6$ ./sage -python
Python 2.5.2 (r252:60911, Feb  3 2009, 19:30:41)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from jinja import Environment
>>> env = Environment()
>>> s = """{% for i in a %}
... {{ i }}
... {% endfor %}"""
>>> s
'{% for i in a %}\n{{ i }}\n{% endfor %}'
>>> tmpl = env.from_string(s)
>>> print tmpl.render(a=[1,2,3])

1

2

3

>>>

Please open a ticket.

> If the Notebook looses connection to Sage should it automatically
> restart Sage? Right now executing anything in the worksheet after the
> error just comes back blank.

Well, wouldn't we also have to reevaluate all cells? Please make this
a different ticket than the above crash.

Cheers,

Michael
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: computations to obtain GBasis for an ideal

2009-02-06 Thread William Stein

On Fri, Feb 6, 2009 at 1:24 PM, Adela  wrote:
>
> One more question.
>
> Did you use the command line in WM or Firefox?
>
> I used Firefox and I still have the problem of looong waiting; nothing
> changed even when  I modified that problem with the ideal.

I just tried it with Ideal --> ideal in the notebook, and it did indeed seem
to "hang forever" (actually > 5 minutes) for me.  So there is
something funny going on.

 -- William

--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Which Version of Sage to Use?

2009-02-06 Thread mrotsliah

sage-2.8.15 is on there now.  It doesn't even start.  I talked with
the old administrator today, and he said he had some trouble with it
when the program was working.  I don't think anybody has really needed
to use it since he tried to put it on there.  It all just got put on
the back burner.



On Feb 5, 6:49 pm, mabshoff  wrote:
> On Feb 5, 12:26 pm, mrotsliah  wrote:
>
> > The machine is a server, and I am now the one that takes care of it.
> > I kind of just got handed the job.  A few users wanted an updated
> > version of Sage for research purposes.  
>
> Out of curiosity a followup: Which Sage release are you running since
> Sage has not been buildable with gccs prior to gcc 3.4 since FLINT was
> merged. This curiosity is mostly rooted in the fact that we are seeing
> more and more people who tend not to be active on the mailing list or
> via other communication channels run quite old Sage releases and given
> the current development pace I would not want to run anything pre Sage
> 3.2 in production since numerous issues have been fixed and even more
> numerous improvements have since been merged.
>
> Cheers,
>
> Michael
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Iterators in compiled code?

2009-02-06 Thread kcrisman

>
> Depending on what you're doing with the permutations, all your time  
> may be spent elsewhere, and compiling your snippet may not help.  
> Specifically, if you don't "cdef" anything I'd be surprised to see a  
> big speedup, but if you cimport permutation group elements directly  
> you could probably be 100x faster.

Could you be more specific (e.g. give a toy example of how to
"cimport" Permutations(n) and then use it to do something trivial, for
someone who is still very new at using Cython)?  I assume this is the
sort of thing that could be %cython'ed in the notebook.

As to the iterators, I essentially used exactly the same ideas for my
summer research student in enumerating some combinatorial data, and it
was *painfully* slow - but I assumed it just had to be that slow.  I
will try rewriting it with this iterator construction.

So my question: Unlike the OP, I constructed a Python generator object
for my stuff, rather than a list comprehension, thinking it wouldn't
have to iterate all the way to the last point each time, and so my
poor little computer would be spared having to create the whole list I
needed ahead of time.  Was I incorrect about that - do generators not
"cache the last value", as William says?  I guess I would rather not
use generators (yield) if they don't actually save any computation
time or memory, since lists are so much easier to write.

Thanks for any ideas!
- 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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---