Apart from that, I think the last bit I need to do is to make the 
TensorProductFunctor inherit from MultivariateConstructionFunctor, to make 
coercion work for things like

sage: h = SymmetricFunctions(ZZ).h()
sage: T = tensor([h, h])
sage: T.base_ring()
Integer Ring
sage: 1/2*T.an_element()

(which currently raises TypeError: unsupported operand parent(s) for *: 
'Rational Field' and 'Symmetric Functions over Integer Ring in the 
homogeneous basis # Symmetric Functions over Integer Ring in the 
homogeneous basis')

Am I on the right track?

Martin
On Sunday 11 February 2024 at 12:34:44 UTC+1 Martin R wrote:

> At https://github.com/sagemath/sage/pull/37220, I implemented a (simple 
> minded) construction functor for symmetric functions.
>
> The only major user visible change should be that
>
> sage: sZ = SymmetricFunctions(ZZ).s()
> sage: sQ = SymmetricFunctions(QQ).s()
> sage: sZ[1,1] + sQ[2]
> s[1,1] + s[2]
>
> now works.  This, and a little bit more, is what I need for my lazy 
> symmetric functions project.
>
> Under the hood, the pull request replaces `corresponding_basis_over` with 
> a proper construction functor which, however, follows the same spirit: 
> every basis of symmetric functions has to provide a description on how to 
> create it, by storing the appropriate method names.
>
> There is a todo note by Darij Grinberg from 2013 that this is an ugly 
> hack, and I agree, but nobody came up with anything better in the last 11 
> years, so we might as well go with the idea which is working, at least for 
> the moment.
>
> There is one more uglyness I have to mention: I describe the functor as a 
> functor on the category of commutative rings, which is not true in 
> general.  For example, for Macdonald polynomials, the functor really is 
> from the category of commutative rings with two distinguished elements.  I 
> am guessing that creating a category RingsWithDistinguishedElements is a 
> bit much, and I wouldn't know how to do it.
>
> Comments (and, of course, also a review) would be greatly appreciated!
>
> Martin
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/15903b84-d2ce-4d04-bbe1-7eaeb92de627n%40googlegroups.com.

Reply via email to