Re: Naming pieces of patterns

• To: mathgroup at smc.vnet.net
• Subject: [mg29837] Re: Naming pieces of patterns
• From: "Orestis Vantzos" <atelesforos at hotmail.com>
• Date: Fri, 13 Jul 2001 04:19:18 -0400 (EDT)
• Organization: National Technical University of Athens, Greece
• References: <9ijhj3\$rhj\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```The Semantica package could help. It was in one of the issues of Mathematica
Journal, can't give any more details right now, sorry.
Orestis
"Cyril Fischer" <fischerc at itam.cas.cz> wrote in message
news:9ijhj3\$rhj\$1 at smc.vnet.net...
> How can I as simply as possible use "substitutions"
> 1.
> -(I/(2 a)) /. I/(2 a) -> A
> does not work, while
> (I/(2 a)) /. I/(2 a) -> A
> works well
>
> 2.
> {(a + b), -(a + b)}/. a + b -> e
> gives
> {e, -a - b}
>
> 3.
> {-Sqrt[a + b], 1/Sqrt[a + b]} /. Sqrt[a + b] -> e
> gives
> {-e,1/Sqrt[a + b]}
>
> 4.
> {I, 2 I, -I} /. I -> J
> gives
> {J, 2 \[ImaginaryI], -\[ImaginaryI]}
>
> I know _why_ these cases do not work, but I would like to know, if there
> is a possibilty to use a common pattern rule to substitute all
> occurences of an expression.
>
> Thank you,
> Cyril Fischer
>
>

```

• Prev by Date: Head found ;-)
• Next by Date: Re: Changing Pure Function in Module
• Previous by thread: Naming pieces of patterns
• Next by thread: Re: Naming pieces of patterns