On Sunday, 4 December 2011 21:34:20 UTC+8, Nicolas M. Thiéry wrote: > > On Sun, Dec 04, 2011 at 03:56:39AM -0800, Dima Pasechnik wrote: > > unless I missed something, > > your > http://combinat.sagemath.org/doc/thematic_tutorials/demo-symmetric-functions.html > > lacks any information as to how to take any symmetric polynomial, and > > expand it in some basis of symmetric functions. > > Indeed: this tutorial is very incomplete. Someone should stand up and > take the time to gather all the bits of docs from here and there, and > merge a nice and clean tutorial on Symmetric functions into Sage. > > > Is it even possible with the combinat functionality? > > It definitely is. Here is a story without subtitles (please ask for > those if needed: > > sage: S = SymmetricFunctions(QQ) > sage: m = S.m() > sage: e = S.e() > sage: f = e[3,2,1] > sage: f_as_poly = f.expand(3); f_as_poly > x0^3*x1^2*x2 + x0^2*x1^3*x2 + x0^3*x1*x2^2 + 3*x0^2*x1^2*x2^2 + > x0*x1^3*x2^2 + x0^2*x1*x2^3 + x0*x1^2*x2^3 > sage: f_as_poly.parent() > Multivariate Polynomial Ring in x0, x1, x2 over Rational Field > > sage: f_in_m = m.from_polynomial(f_as_poly); f_in_m > 3*m[2, 2, 2] + m[3, 2, 1] > > sage: f_in_e = e(f_in_m) > sage: f_in_e > e[3, 2, 1] - 3*e[4, 1, 1] - 2*e[4, 2] + 13*e[5, 1] - 18*e[6] > > Oops, but we don't get the original symmetric function f! Actually > this is perfectly correct since we lost information by only expanding > in 3 variables: > > sage: f_in_e.expand(3) == f.expand(3) > > If one kills all terms with parts larger than 3 (since > e_4=e_5=e_6=...=0 in three variables). > Thanks, it's really useful, and really must make its way into the docs ASAP...
> > It's often suggested that in practice Groebner-basis based > > methods are more efficient... > > Really? A proof by benchmark is welcome :-) > I probably meant a (rather naive?) algorithm implemented in Symmetrica, which is known to be unable to expand (x+y+z)^3. So this one is easy to beat with anything, I guess. > I guess it depends a lot on what kind of polynomials are being fed in > (degree, number of variables), and in particular if one is interested > in symmetric functions (on an infinite number of variables) or > symmetric polynomials (on a, typically small, finite number of > variables). > by the way, how about settings when more than one bunch of symmetric polynomials (or functions). E.g. I have a polynomial expression P in roots of a polynomial f(x), and in roots of the complex conjugate of f(x), and it is symmetric (via the natural bijection between the roots of f and the roots its conjugate). (Example: take a general quadratic polynomial, then the distance between its roots in the complex plane is such an expression.) And I would like to express P in some symmetric functions of the coefficients of f and its conjugate. Is it easy to do? Or here one would need a Groebner basis anyway? Thanks, Dima > Best, > Nicolas > -- > Nicolas M. Thi�ry "Isil" <nth...@users.sf.net> > http://Nicolas.Thiery.name/ > > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org