Lisp level interaction questions



>>>>> "CY" == C Y  writes:

    CY> Hi all.  I have what are probably a couple silly questions:

    CY> Given a maxima object, is there a way to view the lisp level
    CY> composition of the object?  e.g:

    CY> lispstructure(a*b/(c*d));

I usually just do something like:

(%i4) a*b/(c*d)$

(%i5) :lisp $%o4

((MTIMES SIMP) $A $B ((MEXPT SIMP) $C -1) ((MEXPT SIMP) $D -1))

There are probably other ways.

    CY> Probably on a related note, if I define some objects in toplevel
    CY> Maxima:

    CY> a1 : a*b/(c*d);
    CY> b1 : [a,b,c,d,[e,f]];

    CY> and then enter into lisp via the to-lisp method:

    CY>  

    CY> How do I interact with a1 and b1 defined in Maxima?  What are they
    CY> named, for example?  How do I display their structure here?

(%i5) a1 : a*b/(c*d)$

(%i6) to_lisp();

Type (to-maxima) to restart, ($quit) to quit Maxima.

MAXIMA> $a1
((MTIMES SIMP) $A $B ((MEXPT SIMP) $C -1) ((MEXPT SIMP) $D -1))

All maxima variables can be accessed in Lisp by prepending a $.

Ray