Re: freeof...



--- Richard Fateman  wrote:

> About freeof... it was, I think,
> originally intended to be the purely syntactic
> version of depending on one or more variables.
> 
> Without looking at free/bound variables etc.
> 
> That is, freeof(x,exp) simply looked at exp as
> a lisp expression and searched for $x  anywhere in it.
> 
> It was intended for  matching   a*x^2+b*x+c   where
> a,b,c  were free of x.
> 
> We could implement it and explain it that way,  and
> then have some other program  depends_on ??  that
> does the more complicated dependency analysis here..

Well, I think we're pretty close to having an improved
freeof, so I guess we don't need to punt. I suppose the 
present-day analysis of lambda, sum, etc is the result of
feature creep over the decades.

freeof is used in various places in the code at present,
notably in integrate. Here's something to think about:

 (1) integrate (lambda ([x], x^2), x)  => x lambda ([x], x^2)

because freeof (x, lambda ([x], x^2))  => T
Yet
  
 (2) integrate (lambda ([x], x^2)(x), x)  => x^3/3

I'm inclined to consider these both as correct.

For what it's worth,
Robert Dodier


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250