MathGroup Archive 1998

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

Search the Archive

Re: Adding equations

  • To: mathgroup at
  • Subject: [mg14403] Re: Adding equations
  • From: Paul Abbott <paul at>
  • Date: Sun, 18 Oct 1998 15:10:08 -0400
  • Organization: University of Western Australia
  • References: <703u1n$>
  • Sender: owner-wri-mathgroup at

Lawrence Walker wrote:

> Is there a way to elegantly add (sub, mult, div) two equations?  Also is
> there an elegant way to add (sub, mult, div) an expression to both
> sides of an equation?

If you modify Equal as follows (as suggested by Roman Maeder) then any
Listable operations are automatically applied to both sides of any


listableQ[f_] := MemberQ[Attributes[f], Listable]

Equal/: lhs:(f_Symbol)?listableQ[___, _Equal, ___] := 
   Thread[Unevaluated[lhs], Equal]



Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia            Nedlands WA  6907       
mailto:paul at  AUSTRALIA              

            God IS a weakly left-handed dice player

  • Prev by Date: Re: Adding equations
  • Next by Date: Re: Routines inside Epilog
  • Previous by thread: Re: Adding equations
  • Next by thread: Re: Adding equations