|
From: Nicolas M. T. <Nic...@u-...> - 2007-09-27 05:27:05
|
Dear MuPAD-Combinat developers and users,
I have made just commited the following change which may be delicate,
but hopefully you will like it. Feedback more than welcome.
operators::tensor now accepts either domain elements (in which case it
returns and element of the tensor product of thedomains), domains, or
morphisms (it does not use the overloaded operator operators::tensor2).
So, now you can do things like:
operators::setTensorSymbol("#"):
S := examples::SymmetricFunctions():
// Building tensor elements:
>> S::s[3] # S::e[1] # S::p[4,2]
s[3] # e[1] # p[4, 2]
// Using tensor products of morphisms
>> (S::p::id # S::h::antipode) (S::p[2] # S::h[3])
- p[2] # h[1, 1, 1] + 2 p[2] # h[2, 1] - p[2] # h[3]
// Note: you can't just do:
>> (id # S::h::antipode) (S::p[2] # S::h[3])
Error: Wrong type of 1. argument (type 'Type::ListOf(DOM_DOMAIN)' expected,
// because # needs to know the source and image set of both morphisms.
// Checking a counit:
>> counit := S::p::mu @ (S::p::id # S::p::antipode) @ S::p::coproduct:
>> counit(S::p::one)
p[]
>> counit(S::p[3,2])
0
// Checking coassociativity
>> phi := (S::p::coproduct # S::p::id) @ S::p::coproduct
- (S::p::id # S::p::coproduct) @ S::p::coproduct:
>> phi(S::p[5,4,3])
0
// Conversions between tensor spaces
>> (S::s # S::s) (S::p[3] # S::p[4])
- s[1, 1, 1] # s[1, 1, 1, 1] + s[1, 1, 1] # s[2, 1, 1] -
...
// The bad news is that, you can't yet do:
>> (S::s # S::s) (S::p[3] # S::h[4])
Error: illegal arguments [(Dom:
// This would indeed require a conversion to be declared from
// S::p # S::h to S::s # S::s
// The good news is that you can nevertheless do:
>> (S::s@S::p::id # S::s@S::h::id) (S::p[3] # S::h[4])
s[1, 1, 1] # s[4] - s[2, 1] # s[4] + s[3] # s[4]
// In the later case, you are constructing the tensor product
// of two morphisms, and # is able to figure out that
// S::s @ S::p::id is a morphism from S::p to S::s, and
// deduce the source and image set of the result.
Cheers,
Nicolas
--
Nicolas M. Thiéry "Isil" <nt...@us...>
http://Nicolas.Thiery.name/
|