Re: [sage-support] Re: Cartesian n-product of set for given n
On Sun, 17 Aug 2014, Nathann Cohen wrote: Please, be respectful of other people's work and focus your hate on Sage's categories. The rest is quite fine :-P OK, I'll try to remember this. :=) And if you want the product of more complicated things (with sets of different size) you can use the trick that was first proposed above, i.e.: product(* [range(x) for x in [2,2,2,3,3,3,2,3]] ) Ah, seems to be quite a compact form! But after two days of wondering I don't know how to generate all lower triangular matrices with non-zero elements taken from, say, [0,1]. For all matrices it seems simple: N=3; v=[0,1]; p=product(product(v, repeat=N), repeat=N) print matrix(ZZ, p.next()) print matrix(ZZ, p.next()) . . . P.S. : Sage is open source: when you hate something, come and change it. It's not always possible. Or what_to_do to DifferentNamingStyles like KleinFourGroup vs. is_isomorphic? -- Jori Mäntysalo -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Poset.show() and inherited parameters
How should one find out what paremeters can be given to Poset.show()? Manual page http://www.sagemath.org/doc/reference/combinat/sage/combinat/posets/posets.html says nothing about, for example, figsize. And http://www.sagemath.org/doc/reference/plotting/sage/plot/plot.html says The default figsize is 4. but actually it seems that figsize=8 is default for posets. -- Jori Mäntysalo -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: Cartesian n-product of set for given n
Yo ! Ah, seems to be quite a compact form! Yeah, but it only does what you want. Nothing involving more complicated objects like category functions do. But after two days of wondering I don't know how to generate all lower triangular matrices with non-zero elements taken from, say, [0,1]. For all matrices it seems simple: Try to understand how that works then: from itertools import product n = 3 S = [-1,1] for m in product(*[S if i=j else [0] for i in range(n) for j in range(n)]): m = Matrix(n,n,m) print m.str() N=3; v=[0,1]; p=product(product(v, repeat=N), repeat=N) print matrix(ZZ, p.next()) print matrix(ZZ, p.next()) . . . P.S. : Sage is open source: when you hate something, come and change it. It's not always possible. Or what_to_do to DifferentNamingStyles like KleinFourGroup vs. is_isomorphic? -- Jori Mäntysalo -- You received this message because you are subscribed to a topic in the Google Groups sage-support group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-support/OqnJVbY7NRU/unsubscribe. To unsubscribe from this group and all its topics, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: Cartesian n-product of set for given n
Yo ! Ah, seems to be quite a compact form! Yeah, but it only does what you want. Nothing involving more complicated objects like category functions do. But after two days of wondering I don't know how to generate all lower triangular matrices with non-zero elements taken from, say, [0,1]. For all matrices it seems simple: Try to understand how that works then: from itertools import product n = 3 S = [-1,1] for m in product(*[S if i=j else [0] for i in range(n) for j in range(n)]): m = Matrix(n,n,m) print m.str() print '-'*20 P.S. : Sage is open source: when you hate something, come and change it. It's not always possible. Or what_to_do to DifferentNamingStyles like KleinFourGroup vs. is_isomorphic? Believe me: this is the kind of stuff that frequent developpers do not see anymore on sage-devel, and if you don't bring it up it will never change. My answer, which is just a description of what is going on, is that you will see upper case in functions which create a mathematical object, i.e. a group, a graph, that sort of things, while the methods applied to them are in lower case. But basically I was not even conscious of that, even though I have been applying it for years. So write to sage-devel whenever something feels wrong. This CartesianProduct AND cartesian_product should be removed. But that's categories, so you never know when that will happen. Have fn ! Nathann -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: sage-6.3-x86_64-Darwin-OSX_10.6_x86_64-app.dmg won't be built?
On Monday, August 18, 2014 10:45:02 PM UTC+1, kcrisman wrote: Maybe you want to review this ticket: http://trac.sagemath.org/ticket/16796 What Volker means by this is that he doesn't have access to a 10.6 buildbot to try this out. Apparently the machine that was there gave up the ghost... ? (Volker, did anyone get back to you on the status of bsd?) No, I don't know what the status of bsd is. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] sage-6.3-x86_64-Darwin-OSX_10.6_x86_64-app.dmg won't be built?
On Tuesday, August 19, 2014, Volker Braun vbraun.n...@gmail.com wrote: On Monday, August 18, 2014 10:45:02 PM UTC+1, kcrisman wrote: Maybe you want to review this ticket: http://trac.sagemath.org/ ticket/16796 What Volker means by this is that he doesn't have access to a 10.6 buildbot to try this out. Apparently the machine that was there gave up the ghost... ? (Volker, did anyone get back to you on the status of bsd?) No, I don't know what the status of bsd is. It's an old desktop in my office. It may have hung due to heat (I have a fan blowing at it and a window open, but...). I will check today. -- William Stein Professor of Mathematics University of Washington http://wstein.org wst...@uw.edu -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Symmetric polynomials over a ring of polynomials
Le samedi 24 mai 2014 16:29:38 UTC+2, Tom Harris a écrit : Now I have some code to generate the polynomial which I am interested in, I store it as p: p = (output of some functions) ( p is ((x1^3 - 2*x1*x2 + x3)*c1^2 - (x1*x2 - x3)*c1 + x3)*c2^2 + x1^3 + c1^2*x3 - (x1*x2 - x3)*c1 - ((x1*x2 - x3)*c1^2 - (x1^3 - x1*x2 + x3)*c1 + x1*x2 - x3)*c2 - 2*x1*x2 + x3) Now the curious thing: p is (naively at least) symmetric in c1 and c2, but calling ElemSym(p) returns an error: ValueError: x0 + 2*x1 + x2 is not a symmetric polynomial but if I copy the polynomial itself and call ElemSym(((x1^3 - 2*x1*x2 + x3)*c1^2 - (x1*x2 - x3)*c1 + x3)*c2^2 + x1^3 + c1^2*x3 - (x1*x2 - x3)*c1 - ((x1*x2 - x3)*c1^2 - (x1^3 - x1*x2 + x3)*c1 + x1*x2 - x3)*c2 - 2*x1*x2 + x3)), then it works and I get (x1^3-2*x1*x2+x3)*e[] + (-x1*x2+x3)*e[1] + x3*e[1, 1] + (x1^3-x1*x2-x3)*e[2] + (-x1*x2+x3)*e[2, 1] + (x1^3-2*x1*x2+x3)*e[2, 2] + (3*x1*x2-3*x3)*e[3] + (-2*x1^3+4*x1*x2-2*x3)*e[3, 1] + (2*x1^3-4*x1*x2+2*x3)*e[4] as expected. Can somebody help me understand what is going on here? Maybe the output of your function does not live in C? Instead of ElemSym(p), you could try: ElemSym(C(p)) or p = C(p) ElemSym(p) -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Overflow creating finite field element
That seems to be it. Thanks! -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.