Re: ordering a group of symbolic operators

• To: mathgroup at smc.vnet.net
• Subject: [mg128324] Re: ordering a group of symbolic operators
• From: Michael Weyrauch <michael.weyrauch at gmx.de>
• Date: Sun, 7 Oct 2012 01:30:34 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: l-mathgroup@wolfram.com
• Delivered-to: mathgroup-newout@smc.vnet.net
• Delivered-to: mathgroup-newsend@smc.vnet.net
• References: <k4ohr0\$i7h\$1@smc.vnet.net>

```Hello,

I would give the expression implementing the operator (dot)
the attribute Orderless. Then Mathematica
sorts according to the built-in rules when eevaluating, which would be
alphabethically in this case, so I would rename the phis into aphis
and so they would always be in front of the deltas.

But note: You cannot use an underscores in your symbol names. The
underscore is reserved for pattern.  Also it would be good to always
post actual code you have implemented and tried. Then one can help
much more to the actual point.

Michael

Am 06.10.2012 08:07, schrieb Yaj:
> Appreciate any help with the following (newbie to Mathemtica)
>
> I have a following expression, consisting of groups/strings of symbolic operators
>
> phi_c.delta_a.phi_b.delta_c + delta_c.phi_c.delta_f.phi_c + ...
>
> Need to rearrange the above such that all the phi-s are on the left and all the deltas are on the right, i.e. REWRITE the above as
>
> phi_c.phi_b.delta_a.delta_c + phi_c.phi_c.delta_c.delta_f + ....
>
> The order of the (phi)s i.e. whether phi_c is to the left of phi_b doesn't matter, but all the (phi)s must be towards the left of all (delta)s in each string.
>
> Please note that the (dots) are not necessarily multiplication.
>

```

• Prev by Date: Re: List manipulation?
• Next by Date: Re: Assuming and Integrate
• Previous by thread: ordering a group of symbolic operators
• Next by thread: Re: List manipulation?