Re: A little simplification problem

"Bill Page" <[email protected]> Fri, 1 Aug 2008 10:43:44 -0400
Newsgroups gmane.comp.mathematics.axiom.user
Message-ID <[email protected]>
On Fri, Aug 1, 2008 at 10:18 AM, Alasdair McAndrew wrote:

> f(n)==7^n
> f(n+1)-7*f(n)
> simplify(%)
>
> What do I need to do to enable the final statement to produce 0?
>

You might use a pattern like this:

(1) -> f(n)==7^n
                                                    Type: Void
(2) -> f(n+1)-7*f(n)

         n + 1      n
   (2)  7      - 7 7
                                                     Type: Expression Integer

(3) -> expandPowers := rule x^(n+1) == x*x^n

         n + 1       n
   (3)  x      == x x
                        Type: RewriteRule(Integer,Integer,Expression Integer)

(4) -> expandPowers( %% 2)

   (4)  0
                                                     Type: Expression Integer

---------

Regards,
Bill Page.