(* :Title: make equations behave like lists *) (* :Author: Roman E. Maeder *) (* :Summary: make listable functions thread over equations as they do over lists. Allows for easy manipulation of equations. *) (* :Context: EqualThread` *) (* :Package Version: 1.1 *) (* :Copyright: © Copyright 1997, Roman E. Maeder. Permission is granted to use and distribute this file for any purpose except for inclusion in commercial software or program collections. This copyright notice must remain intact. *) (* :History: Version 1.1 for mathgroup and MathSource, January 1998. Version 1.0 for DMUG (German Mathematica User Group), January 1998. *) (* :Keywords: Equal, equation solving, threading *) (* :Warning: Adds definitions to the built-in symbol System`Equal. *) (* :Mathematica Version:3.0 *) BeginPackage["EqualThread`"] (* no exports *) Begin["`Private`"] listableQ[f_] := MemberQ[Attributes[f], Listable] protected = Unprotect[Equal] Equal/: lhs:f_Symbol?listableQ[___, _Equal, ___] := Thread[ Unevaluated[lhs], Equal ] Protect[Evaluate[protected]] End[] EndPackage[]