Re: Is there an "inverse" of ToRules?
- To: mathgroup at smc.vnet.net
- Subject: [mg31053] Re: Is there an "inverse" of ToRules?
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Sat, 6 Oct 2001 03:32:21 -0400 (EDT)
- References: <9pjgi4$3fr$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Mark, Two ideas: {a->b,{c:>d}}/.r:Rule|RuleDelayed -> Equal {a==b,{c==d}} ToEquations[(Rule|RuleDelayed)[x_,y_]]:= x==y; ToEquations[z_]:= z; ToEquations//@{a->b,{c:>d}} {a==b,{c==d}} You might want to flatten the outputs. -- Allan --------------------- Allan Hayes Mathematica Training and Consulting Leicester UK www.haystack.demon.co.uk hay at haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565 "Mark S. Coleman" <mcoleman at bondspace.com> wrote in message news:9pjgi4$3fr$1 at smc.vnet.net... > > Greetings, > > Is there an "inverse" to the ToRules function? That is, a function > that converts rules to equations (expressed in == form), which could > then be used in the Solve function? > > Thanks, > > Mark