       Re: Q: Is there an "inverse" of ToRules?

• To: mathgroup at smc.vnet.net
• Subject: [mg31067] Re: [mg31038] Q: Is there an "inverse" of ToRules?
• From: Tomas Garza <tgarza01 at prodigy.net.mx>
• Date: Sat, 6 Oct 2001 03:33:00 -0400 (EDT)
• References: <200110050522.BAA03519@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```You may define your own. Example:

In:=
b = Solve[x^2 - 2 == 0, x]
Out=
{{x -> -Sqrt}, {x -> Sqrt}}
In:=
ToExpression[StringReplace[ToString[b], "->" -> "=="]]
Out=
{{x == -Sqrt}, {x == Sqrt}}

But I think it is better to stick to the solution expressed in terms of
rules. It takes a while to get used to it, but it pays. The rule has a
definite meaning which can be used in a ReplaceAll operation, whereas
something like the last output, with two "Equal" functions for the same x,

Tomas Garza
Mexico City

----- Original Message -----
From: "Mark S. Coleman" <mcoleman at bondspace.com>
To: mathgroup at smc.vnet.net
Subject: [mg31067] [mg31038] Q: Is there an "inverse" of ToRules?

>
> 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

```

• Prev by Date: Re: Possible Incorrect Summation
• Next by Date: Re: Urgent but simple problem III
• Previous by thread: Q: Is there an "inverse" of ToRules?
• Next by thread: Re: Q: Is there an "inverse" of ToRules?