MathGroup Archive 2000

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

Search the Archive

Re: selfdefined operators

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23015] Re: [mg22989] selfdefined operators
  • From: Carl Woll <carlw at u.washington.edu>
  • Date: Tue, 11 Apr 2000 23:18:33 -0400 (EDT)
  • References: <200004090545.BAA13108@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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