Re: Adding equations

*To*: mathgroup at smc.vnet.net*Subject*: [mg14399] Re: [mg14342] Adding equations*From*: Jurgen Tischer <jtischer at col2.telecom.com.co>*Date*: Sun, 18 Oct 1998 15:10:04 -0400*Organization*: Universidad del Valle*References*: <199810150428.AAA18222@smc.vnet.net.>*Sender*: owner-wri-mathgroup at wolfram.com

Hi Lawrence, without checking for inconsistencies! Try these definitions CircleTimes[a_,b_]:=Thread[Times[a,b],Equal] CirclePlus[a_,b_]:=Thread[Plus[a,b],Equal] Colon[a_,b_]:=Thread[Divide[a,b],Equal] You can use the symbols (I can not show it in this damned ascii format) which correspond to the names, and WR made them infix already. The nice thing is that those definitions solve your quest for applying expressions also. You can even use them for simply add, sub and so on numbers. Plus and Times work with multiple equations (I mean like a==b==c). The respective aliases are Esc c * Esc, Esc c + Esc, Esc : Esc. If you think you need them such a lot that it becomes a nuisance to type all the time those aliases you could think in defining your own (shorter) aliases, for example Esc 8 Esc and Esc = Esc are unused. You could change to Backslash for Colon and had the easy alias Esc \ Esc, but you loose the easy definition for division. I found Backslash[a_,b_]:=Divide@@#&/@Thread[List[a,b],Equal] will work, but less nice than Colon (for example 2\3 gives {2,3}). Jurgen Lawrence Walker wrote: > > Group: > > I've been trying to add two equations as follows: > > In[4]:= > a==b; > In[5]:= > c==d; > In[6]:= > %4+%5 > Out[6]= > (a==b)+(c==d) > > The result I was looking for is (a+c)==(b+d). The following works but it > seems clumsy. In[7]:= > %4[[1]]+%5[[1]]==%4[[2]]+%5[[2]] Out[7]= > a+c==b+d > 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? > > Lawrence Walker

**References**:**Adding equations***From:*Lawrence Walker <lwalker701@earthlink.net>