/**  XSol   **/
/*A: K McIsaac*/
/*S: University of Western Australia, Nedlands 6009, Australia*/
/*D: October 1986  */
/*K: Solve */
/*B: Solve does not remove always remove unconstrained parameters from the list
of variables to be solved for. Thus it concludes that the system is 
underdetermined. This has a simple fix. Some over determined systems can be
corrected with the second rule. Ideally solve should work!!!!!*/

/*: Fix Solve package */
Eq_:Ldist
SSol[$eqn,$var_=Len[$eqn]<Len[$var]] :: SSol[$eqn, Rel[Cont[$eqn,In[$1,$var]]]]
SSol[$eqn,$var_=Len[$eqn]>Len[$var]] :: SSol[Union[Ex[$eqn]], $var]
SSol[$eqn,$var] :: Sol[$eqn, $var]

/*E: These are trivial but smp fails
SMP 1.5.0   (May 14 1986)
Mon Nov  3 17:18:58 1986


#I[1]::  Sol[{x=3,x=3},{x}]

#O[1]:   Sol[{x = 3,x = 3},{x}]

#I[2]::  Sol[{x=3,y=2,x+y=5},{x,y}]

#O[2]:   Sol[{x = 3,y = 2,x + y = 5},{x,y}]

#I[3]::  Sol[{x=3,y=4},{z,x,y}] /*Why return the unaltered result in braces????*/

#O[3]:   {Sol[{-3 + x,-4 + y},{z,x,y}]}

#I[4]::  <XSol;

#I[5]::  SSol[{x=3,x=3},{x}]

#O[5]:   {x -> 3}

#I[6]::  Sol[{x=3,y=2,x+y=5},{x,y}]

#O[6]:   Sol[{x = 3,y = 2,x + y = 5},{x,y}]

#I[7]::  SSol[{x=3,y=4},{z,x,y}] 

#O[7]:   {{x -> 3,y -> 4}}

#I[8]::  <end>
*/
