good point; I'm sorry about that, I should have read the documentation
for GCD. I do agree that it would be much clearer if this were called
something like polynomialGCD. It does make sense to interpret m and n
as degree-1 polynomials in the formal variables m and n and hence get
gcd=1. But they could also be interpreted as degree-0 polynomials in
some absent formal variable. The use of unbound variables can be very
ambiguous indeed! It seems as though it might make sense in this case
to specify to polynomialGCD which variables are to be interpreted as
formal, so that coefficients may contain other unbound variables. (I
actually haven't done very much intense computer work with
polynomials, yet (just playing around with Macaulay, where it is very
clear from your choice of ring which variables are formal) so don't
know whether that would actually be silly in practice).
On a related note, I recently read about the yacas approach to the
general problem of assumptions about free variables: by convention,
all unbound variables are treated as scalars (by which they mean
complex numbers); `incomplete types' are used other objects, e.g. if x
is meant to represent a vector, then Object("IsVector",x) is used
instead of x. Cf:
http://yacas.sourceforge.net/codingchapter3.html#c3
I'm not sure how math'a approaches this problem. Does Maxima have a
similar convention?
Carl
On Sat, Jun 14, 2003 at 10:01:04PM -0400, Stavros Macrakis wrote:
> The current GCD function computes polynomial GCDs. I think that is
> rather misleading--perhaps it should be called pgcd or something.
>
> Carl McTague points out that the current gcd gives gcd(m,n)=>1, which is
> of course incorrect in general. It also gives gcd(2^n,4^n)=>1 instead
> of 2^n (even if n is declared integer and >0); gcd(n!,m!)=>1 instead of
> min(n,m)!; etc.
>
> -s