Re: Modifying equations
- To: mathgroup at smc.vnet.net
- Subject: [mg59179] Re: Modifying equations
- From: Konstantin <no.email at no.email>
- Date: Sun, 31 Jul 2005 01:30:49 -0400 (EDT)
- References: <dcf38r$lfr$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Unprotect[Equal]; Equal /: Plus[Equal[a_, b_], Equal[c_, d_]] := Equal[a + c, b + d]; Equal /: Plus[Equal[a_, b_], c_] := Equal[a + c, b + c]; Equal /: Times[Equal[a_, b_], c_] := Equal[a*c, b*c]; Protect[Equal]; Note, however, that unprotecting system symbols is generally not a good idea as you can mess up a lot of things. Kalle Rutanen wrote: > Hello > > My intention is to write a mathematical paper which derives results step by > step. So here is my first question: > > Given the equations > eqn1 = a == b > eqn2 = c == d > > How can I combine these to form (for example) > a + c == b + d ? > > I tried the obvious eqn1 + eqn2, but that does not seem to work... > > Second question: > > Given this: > Sum[a_i, {i, 0, n}] + Sum[b_i, {i, 0, n}] > How can I make Mathematica combine the sums giving: > Sum[a_i + b_i, {i, 0, n}] ? > > Thanks. > >