How can I add simplification rule depending relation between two factors?
Subject: How can I add simplification rule depending relation between two factors?
From: Richard Fateman
Date: Fri, 01 Jul 2011 17:18:15 -0700
On 7/1/2011 5:12 PM, ICHIKAWA, Yuji wrote:
> Hi,
>
> I am trying to make simplification rules for divisor function divsum.
>
> 1. divsum(p^n) = (p^(n+1)-1)/(p-1) when p is prime.
> defrule was great to implement this rule though I was happier if there is a feature of "prime".
>
> (example)
> matchdeclare(pp, primep, nn, lambda([x], (integerp(x) or featurep(x, integer)) and x> 0))$
> defrule(sigma_simp1, divsum(pp^nn, 1), (pp^(nn + 1) - 1)/(pp - 1))$
>
> declare(n, integer)$
> assume(n> 0)$
> sigma_simp1(divsum(3^n));
> => (3^(n+1)-1)/2
>
> 2. divsum(a*b) = divsum(a)*divsum(b) if a and b are relatively prime.
>
> I lost my way for this simplification.
> Are there any manners to let Maxima check if two variables are relatively prime?
>
> Thanks,
> -
> Yuji
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
a. gcd(R,S) will be 1 if R and S are relatively prime.
b. You will probably never see a*b in Maxima if a, b are numbers.
They will be multiplied together.
c. You will probably never see a^b in Maxima if a, b are numbers, either.
d. There is no reliable way to attach a condition for matching that
involves 2 parameters in the match.
RJF