MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: selfdefined operators


Roland,

Since your definition for CirclePlus satisfies associativity,

(x \[CirclePlus] y) \[CirclePlus] z = x \[CirclePlus] (y \[CirclePlus]
z)

you can just use the attribute Flat. So the simplest solution is to just
give CirclePlus the attributes Flat and OneIdentity, as in

SetAttributes[CirclePlus, {Flat, OneIdentity}]
x_ \[CirclePlus] y_ := x y/(x+y)

Carl

Roland Koppenberger wrote:

> I have defined the operator \[CirclePlus] in the following way:
>
> x_ \[CirclePlus] y_ := x y /(x + y)
>
> When type in
>
> 1 \[CirclePlus] 2
>
> I get 2/3 as the right result. But when I try to compute
>
> 1 \[CirclePlus] 2 \[CirclePlus] 3
>
> the result will not be computed. How can I specify the operator in a
> general way?



  • Prev by Date: Mathematica Training
  • Next by Date: Re: Trying to define: Fractional Derivatives & Leibniz' display form for output and templates
  • Previous by thread: Re: Re: selfdefined operators
  • Next by thread: Re: selfdefined operators