well, not my research, but close. here is the doctest that should pass
(modulo typos...):
sage: S = SymmetricFunctions(QQ)
sage: s = S.s()
sage: p = S.p()
sage: pp = tensor([p,p])
sage: t.<T> = PowerSeriesRing(pp,default_prec=5)
( WARNING: this will not work on sage-combinat the the moment, as pp
is not recognized as commutative, even after applying the patch I
wrote earlier in this thread. on my local sage, I have removed checks
when building up the power series to check that this is indeed
commutative (since pp is), but that's certainly not the right thing to
do in the long run. I can't patch sage myself without pointers from
others, since this involves the tensor and categories extensions,
which people are, as far as I understand, concurrently working on. )
sage: K = sum(pp(sum(tensor(( s[lambda],s[lambda] )) for
lambda in partitions_list(i)) * T^i for i in (1..4)) # The Cauchy
kernel
( WARNING: this won t work for two reasons...
* lambda is not a good word to use (OK, this is me, it just took
me so long to realize where the problem was...)
* as described earlier in this thread and in Nicolas' separate
post, this won't give the right result because of module conversions.
there is a workaround:
K = sum(sum(tensor(( p(s[lambda]),p(s[lambda]) )) for
lambda in partitions_list(i)) * T^i for i in (1..4))
but I think it should work as first written too. )
sage: logK = log(K)
( WARNING: this won't work because log is not implemented for general
power series. funny thing, exp works...)
sage: logK - sum(1/i* tensor(( p[i],p[i] )) * T^i for i in
(1..4))
O(T^5) # if i didn't mess up...
The power series is there to test the Cauchy identity up to a certain
degree only.
The reason I want to do similar things this without using actual
variables is because of course the complexity grows extremely fast...
To compute K up to exponent T^i, you need all partitions of weight up
to i and thus at least i variables (Note: it seems hopeless anyway to
use such basic code in Sage, as it is very slow in handling
expressions like this )
Paul
On Sep 4, 10:19 am, "Nicolas M. Thiery" <[email protected]>
wrote:
> Salut!
>
> On Wed, Sep 02, 2009 at 02:40:38PM -0700, Paul-Olivier Dehaye wrote:
> > for all that's worth, that won't do for what i am trying. the point is
> > to have the generality of alphabets.
>
> Ah, now this is interesting. What exactly do you mean by "generality"
> of alphabets? What would be very helpful would be a fake Sage session
> demonstrating the features you would need (without worrying about the
> syntactical details which we can figure out later).
>
>
>
> > There is some structure for my computation (matching degrees of the
> > polynomials over the two alphabets, which I was hoping to exploit with
> > the PowerSeriesRing idea). In any case, it's more symmetric and gives
> > a better presentation, so I am happier with this.
>
> > There are bugs however, as this will demonstrate:
>
> > S = SymmetricFunctions(QQ)
> > s = S.s()
> > p = S.p()
> > ss = tensor([s,s])
> > pp = tensor([p,p])
>
> > a = tensor((s[5],s[5]))
> > pp(a)
>
> > The answer given,
> > p[[5]] # p[[5]]
> > is not correct
>
> Yup. When I said "in the longer run, there will be support for mixed
> coercions", I also included those coercions :-)
>
> But yes, this should at least complain that the conversion is not
> (yet) possible instead of returning a mathematically wrong result!
>
> Thanks for pointing out this example which finishes to convince me
> that the current very tolerant conversions provided by
> CombinatorialFreeModule are *harmful*. See upcoming e-mail.
>
> Cheers,
> Nicolas
> --
> Nicolas M. Thiéry "Isil" <[email protected]>http://Nicolas.Thiery.name/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-combinat-devel" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-combinat-devel?hl=en
-~----------~----~----~----~------~----~------~--~---