MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Idempotence

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37780] Re: Idempotence
  • From: "Peltio" <peltio at twilight.zone>
  • Date: Tue, 12 Nov 2002 03:14:01 -0500 (EST)
  • References: <aqo05b$fpa$1@smc.vnet.net>
  • Reply-to: "Peltio" <peltioNOSP at Miname.com.invalid>
  • Sender: owner-wri-mathgroup at wolfram.com

"Tilo Schröder" wrote:

>I have to implement an algorithm which uses idempotence
>(e.g.: a*a=a, a^2*b^3=ab).

Mmmm... this is only a one minute thought but it looks like this could do:

    idemRule=Power[x_,n_Integer] -> x

Provided that you expand all of the terms before applying it.

    IdemSimplify[expr_] := Expand[expr] /. idemRule

Oh well, it's just my two cents.
Perhaps ExpandAll and a Simplify may help taking care of the more convoluted
expressions... Maybe you could set up a procedure that accept options to
trigger a deeper expansion and simplification. You could even specifiy the
variables for which you want to apply the idempotence property and pass them
as an argument or as an option.

Hope my tidbit helps, anyway.

Cheers,
Peltio
invalid address in reply, munged address to find out






  • Prev by Date: Re: Idempotence
  • Next by Date: Re: Idempotence
  • Previous by thread: Re: Idempotence
  • Next by thread: Re: Idempotence