Newbie help, predicate confusion



Carl McTague wrote:
> Thanks to everyone for all the feedback on the predicate issues.  I
> certainly better appreciate the complexity of the situation now.
> 
> On Wed, Dec 11, 2002 at 10:37:23PM -0500, Stavros Macrakis wrote:
> 
>>In Maxima 5.5, the correct error message is given:
>>
>>   MACSYMA was unable to evaluate the predicate:
>>   a > 0
>>
>>Some bug must have been introduced since then....
> 
> 
> Yes, I'm sorry, it must have been omitted because I've been seduced by
> the beautiful imaxima!
> 
> 
>>>Say, do you happen to know how bad the symbolic eigenvectors will be?
>>
>>Try eigenvalues(matrix([a,b,c],[d,e,f],[g,h,i])) to get a taste.
> 
> 
> Wow!  And I guess the current implementation can't handle things like:
> 
>   eigenvalues(matrix([a,b,c,d,e],[f,g,h,i,j],[k,l,m,n,o],[p,q,r,s,t],[u,v,w,x,y]));
> 
> since its polynomial isn't generally solvable by radicals.  Say, does
> anybody know of any work within maxima for doing exact arithmetic with
> arbitrary algebraic numbers, via representations such as
> 
>   root(3, x, x^5-2*x^3-8*x-2)
> 
> to represent the 3rd root of this unsolvable polynomial?

Try algebraic:true;
  tellrat(a^5-2*a^3-8*a-2);
rat(a^6-1);
rat(1/a^8);
etc/

maybe not quite what you want, yet.  The 3rd root???  Historically
the roots have been represented by a pair: an interval and the
defining polynomial.
For polys of several variables (defining algebraic functions
rather than algebraic numbers) the algorithms are harder and
I think not in maxima.


> 
> 
>>>...I'd really like to curry it, so that I can pass around
>>>lpnorm(2) as a norm, without the receiver having a clue about the p
>>>parameter
>>
>>Maxima has dynamic binding, like almost all of its contemporary Lisp
>>systems.  So you can expect functional values to do what you want.  You
>>can, however, simulate static binding by a careful use of SUBSTITUTE.
> 
> 
> So is this an instance where scheme differs from most lisps?: In MIT
> Scheme:
> 
>   1 ]=> (((lambda (x) (lambda (y) (+ x y))) 1) 2)
> 
>   ;Value: 3
> 
> and in clisp:
> 
>   [6]> (((lambda (y) (lambda (x) (+ x y))) 1) 2)
> 
>   *** - EVAL: ((LAMBDA (Y) (LAMBDA (X) (+ X Y))) 1) is not a function name

This is not the difference.   In clisp  you probably have
to write #'(lambda ...)   instead of (lambda ...) and you
would get the same thing as in scheme.


   (setf x 23)
   (defun g(x)(h))
   (defun h()  x)

(g 200)  ;  dynamic scope returns 200, static scope (scheme-like) 
returns 23.




> 
> 
>>Try apply("+",[a,b,c]) -- is that what you have in mind?
> 
> 
> Perfect!
> 
> 
>>>PS: Suppose I wanted to set up a rewrite system for regular
>>>    expressions.  Would that be hard to do in maxima?
>>
>>Take a look at the pattern matching system for rewrite rules.  The
>>biggest problem you will have is probably guaranteeing termination....
> 
> 
> Beyond the standard confluence and termination issues?
> 
> Thanks,
>   Carl
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima