g_h

8 Reputation

2 Badges

13 years, 173 days

MaplePrimes Activity


These are answers submitted by g_h

Hello,

 

As I mentioned, the 'multilinear' statement makes the operator to be distributive over +, there is no other things to do for that.

The fact that a &* b &* 1 &* c is not simplified makes me wonder if there is a way to define an operator which is "natural" for Maple.

That's why I tried to define '&*' based on '.' in my last post, but it is impossible to inherit the properties of '.' AND adding distributivity.

Moreover, I've just seen that in Maple 5, a &* b &* 1 is simplified into a &* b, but this is not the case in Maple 12... !

 

The way I found :

 

define('`&*`', flat, identity=1, multilinear);

`expand/&*`:= proc()
   if nargs = 1 then
      RETURN(expand(args[1]));
   elif nargs > 2 then
      RETURN(expand(args[1]) &* `expand/&*`(args[2..nargs]));
   else
      RETURN(expand(args[1]) &* expand(args[2]));
   fi;
end:
 

A call to expand will now simplify correctly an expression based on '&*', but I don't like this solution... according to me, such an operator has to be implemented in Maple without doing any disgusting cook !

I tried this :

 

`&*` := proc(x) option operator;

return `.`(_passed);

end proc;
 

and :

definemore('`&*`', multilinear);


BUT : Error, (in definemore) nothing known about `&*`

 

`&*` := `.`; works too but it's impossible to "build" the distributivity.

 

how to write a thing like that ?

define('`&*`', `&*`(x) = `.`(x), multilinear); (it doesn't work too)

 

This is incredible how such a basic thing can be complicated...

Thank you a lot for any help
 

I don't see anything interesting in ?LieAlgebras :/

 

Non commutative but associative product is a quite basic feature, isn't it ? It should be simple !

Page 1 of 1