'solve' doesn't work!



(%i1) eqs:[d0 = c0 + b0, d1 = c1 + b1, d2 = c2 + b2, h0 = g0 + f0 - e0,
h1 = g1 + f1 - e1, h2 = g2 + f2 - e2, f0 = e0 + b0, f1 = e1 + b1,
f2 = e2 + b2, g0 = e0 + c0, g1 = e1 + c1, g2 = e2 + c2]$
(%i2) solve(eqs,[d0,d1,d2]);
(%o2) []

 We define:
(%i3)
 SOLVE(eqs,vars):=block([e],
sublist(eqs,lambda([e],not funmake(freeof,append(vars,[e])))),
solve(%%,vars))$

(%i4) SOLVE(eqs,[d0,d1,d2]);
(%o4) [[d0=c0+b0,d1=c1+b1,d2=c2+b2]]

 Other example:
(%i5) sist:[x+y=3,x-y=1,a=b];
(%o5) [y+x=3,x-y=1,a=b]
(%i6) solve(sist,[x,y]);
(%o6) []
(%i7) SOLVE(sist,[x,y]);
(%o7) [[x=2,y=1]]

best regads

Aleksas D