[sage-support] Re: Which python for sage?
On Jul 3, 8:33 am, William Stein wrote: > Sage can't switch to Python 3 until every single Python package in > Sage is ported to Python 3. > This is far from done. It's possible that for some packages, nobody > is even working on doing a port. In such cases, our only hope is to > either do the port ourselves or remove the package from Sage, which > may both be incredibly difficult. I've heard Twisted may be an > example of such a package, but there might be others. Even numpy > hasn't been ported to Python 3 yet, though at least there work is > rumored to be in progress. Of course, you understand these issues better than I do. I didn't even consider that Sage has so many third-party libraries at the Python level. So yeah, I can see that it could take a long time to do such a conversion. Even so, I would suggest a more developed policy than just that you can't do it right now. Certainly at first glance, Python 3 looks a really good idea. Maybe at second glance, the conversion cost is very high for many projects and you could estimate that it will take many years for the world to switch. (But note that the same was true of a really great editor called NEdit and Unicode, and the result in the long run was that it hurt NEdit a lot.) In any case the all-or-nothing answer cannot be completely true. After all, you have interface support for packages written entirely in C or whatever other language. So how could it be that if you were in Python 3, then Python 2.* would be the one language that you can't support at all? What would you do if you wanted to support a Python 3 package? -- 0 Greg Kuperberg 01234 Professor of Mathematics 02413 University of California, Davis 03142 http://www.math.ucdavis.edu/~greg/ 04321 g...@math.ucdavis.edu -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Which python for sage?
On May 26, 3:06 pm, William Stein wrote: > No. Sage uses python 2.6, and will for at least the next year. You can add my support for changing Sage to Python 3. I know that it would be a ton of work to switch and I also don't mean to ask impatiently. But I think that it will just get more and more important over time. Python 3 has a lot of long overdue simplifications to Python. Guido van Rossum is still on top of his game. -- 00000 Greg Kuperberg 01234 Professor of Mathematics 02413 University of California, Davis 03142 http://www.math.ucdavis.edu/~greg/ 04321 g...@math.ucdavis.edu -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Strange construction in autogenerated Python
On Mar 27, 1:39 pm, simon.k...@uni-jena.de wrote: > Side note: In order to change to the latest sage version, it is not > needed to compile from scratch again. Just do > sage -upgrade > on the command line. Provided that you are connected with internet, it > will retrieve the changes from sage 3.2.3 to the latest version and re- > compile (only) the necessary bits. So, this is much faster than > compiling from scratch. That's a good suggestion. But I just did that, and it still took 90 minutes, although starting the process was trivial. On the bright side, in Sage 3.4, the Integer(Integer(n)) bug is fixed. --~--~-~--~~~---~--~~ 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: Strange construction in autogenerated Python
1) I am using sage 3.2.3, which was current when I installed it in January. It was convenient for me to compile it from scratch, but it then takes a long time to install. 2) Here is my sage code. The program estimates the probability of ever getting a 6-way tie if you repeatedly roll a die and count the number of times that you get each result. n = 100 s = 0. for k in xrange(1,n+1): t = float(factorial(6*k)/factorial(k)^6/6^(6*k)) s += t print k,s,float(t),t*float(k)^(2.5) c = sqrt(6.)*float(2*pi)^(-2.5) print "Limit by Stirling's approx:",c tu = 2*c/3.*float(n)^(-1.5) print "Tail upper bound:",tu s += tu print "Total upper bound:",s print "Estimate for chance ever:",s/(1.+s) --~--~-~--~~~---~--~~ 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] Strange construction in autogenerated Python
Hi. I see that when I make file called foo.sage, sage precompiles it into another file called foo.py. The code statement in this file is: _sage_const_2 = Integer(Integer(2)) Surely this is wrong? Maybe it does not matter if this Python code is only executed once. But still it looks strange. --~--~-~--~~~---~--~~ 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: MatrixGroup bug or feature?
But it already computed that the group is not infinite! You have to call this a bug. --~--~-~--~~~---~--~~ 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: Generating a Lie algebra over a univariate polynomial ring
On Feb 11, 8:10 am, William Stein wrote: > By echelon form do you mean Hermite Normal Form over that base ring, > or do you mean echelon form over the fraction field? If you just want > the dimension, is their any chance you can specialize one of the variables and > compute the rank there -- if you do this for enough values it's likely > to give you the correct rank, and of course is very fast. Yes, I meant Hermite Normal Form. The code that I have now basically specializes the (lone) variable d. I make 14x14 matrices e[0] through e[6] and then the last two lines of the code are this: L = gap.LieAlgebra('Rationals',e) print 'Dimension:',gap.Dimension (L) What I really wanted to say in the paper is that L is the full 14x14 matrix algebra for all real values of d with |d| >= 2. I was already 90% sure that this is true. I wanted to use SAGE to provide a computational proof, because if I worked out a human proof then I would have to digress into a topic for a later paper. The problem, I realized, is that with this code SAGE cannot provide a proof for all relevant d, only for specific values of d. (Moreover there exist algebraic values of d for which L is smaller.) In truth, SAGE is missing two things for what I wanted. First, there is no equivalent of gap.LieAlgebra. Second, the submodule method of the FreeModule class is not implemented for Euclidean domains, even though it is implemented for ZZ. Of course, if gap.LieAlgebra worked over a Euclidean domain, that would also solve the problem, but I don't think that it does. --~--~-~--~~~---~--~~ 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: Generating a Lie algebra over a univariate polynomial ring
On Feb 11, 2:11 am, daveloeffler wrote: > Yes, as William points out, I wrote a generic Smith normal form > implementation which has been in Sage since version 3.2.2 a couple of > months back. Oh okay, cool. Yes, my matrices would be sparse. > I didn't 100% follow what it was that you wanted to do, so I'm not > quite sure if this answers your question. Did you just want Smith form > of one matrix, or were you after some sort of simultaneous Smith form > of multiple matrices? I am generating a Lie algebra inside 14 x 14 matrices, and I want to know its dimension for different specializations of the ground ring's variable d. So one way to do this is to flatten matrices in the Lie algebra so that they become vectors of length 196. Then you can stack these vectors to make a matrix which is 196 x (something), and then find the SNF of that matrix. 196 x 196 is a lot though. Actually even better than SNF, or good in addition to SNF, would be echelon form. --~--~-~--~~~---~--~~ 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] Generating a Lie algebra over a univariate polynomial ring
For a certain reason, I am interested in the Lie algebra generated by the generators of the Temperley-Lieb algebra, in its natural Catalan- dimensional representation. In other words given the T-L algebra with 2n strands, I am looking at a C_n x C_n matrix algebra quotient, where C_n is the nth Catalan number. Then in this quotient, the 2n-1 Temperley-Lieb generators also generate a Lie algebra. I only need 8 strands for the problem that I am studying. Thus it's a question in 14 x 14 matrices. I wrote a SAGE/Python program to compute the matrices of the Temperley- Lieb generators, and then I gave them to GAP from SAGE. It isn't all that fast, because GAP does not use the fact that the matrices are sparse, but it works. Sort of. The problem is that the Temperley- Lieb algebra has a parameter d, and I want to know the answer for all d. My code can give me the answer for a specific d working over QQ. But if I want the answer for all d, I should be working over the polynomial ring QQ[d]. Note that it is not hard to rephrase the question as a module question in R^(14^2), where R is the ground ring. I can write down the Lie adjoint action of the Temperley-Lieb generators on 14 x 14 matrices expressed as vectors. I can generate an invariant submodule, and I am then interested in the Smith Normal Form of this submodule, or equivalently the isomorphism type of the quotient module. I have to think a bit about keeping the number of generators of the module under control, but maybe there is a way. My impression is that both GAP and SAGE can easily understand the question when it is posed over a field, but not over a univariate polynomial ring as I actually want. Am I wrong and is there a reasonable way to do this? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---