Re: Condition , FullSimplify
- To: mathgroup at smc.vnet.net
- Subject: [mg53179] Re: Condition , FullSimplify
- From: David Bailey <dave at Remove_Thisdbailey.co.uk>
- Date: Tue, 28 Dec 2004 06:30:21 -0500 (EST)
- References: <cqotbu$cj4$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
sebastian.cohen at gmail.com wrote:
> Wolfram Staff,
>
> I would like to know why the following class of statements don't work
> given
>
> expr /; condition // FullSimplify
>
> Although one may express them easily as
>
> FullSimplify[expr,cond]
>
> I find it useful and practical using the first notation.
>
> Is there a way to tell Mathematica at the end expressions both the
> conditions and to fullsimplify without having to write the whole
> fullsimplify function?
>
> Thanks in advance,
>
> Sebastian Cohen S
>
Hi,
It seems a little strange to invent a piece of syntax and then ask why
Mathematica does not support it! If you really need this functionality,
why not roll your own:
myFullSimplify[x_Condition]:=FullSimplify[x[[1]],x[[2]]];
myFullSimplify[x]:=FullSimplify[x]
With this definition you can write things like:
Sqrt[x^2] /; x > 0 // myFullSimplify
x
I hope that helps,
David Bailey
dbaileyconsultancy.co.uk