The to_poly_solver introduces dummy variables using function new_variable.
The new_variable function automatically alters the global environment by
appending facts and by placing a symbol property onto each dummy variable.
The symbol property is what allows the function nicedummies to work.
Further some of the objects that the to_poly_solver creates (%union objects,
for example), have simplification properties. For these reasons, using
the output of to_poly_solve is much harder than simply parsing the output.
Unlike using ?gensym, the output of new_variable is a "normal" Maxima
variable (internally looks like $xxxx).
(%i1) load(to_poly_solver)$
Loading maxima-grobner $Revision: 1.6 $ $Date: 2009/06/02 07:49:4
(%i2) sol : %solve(sin(x)=1/2,x);
(%o2) %union([x=2*%pi*%z2+%pi/6],[x=2*%pi*%z3+(5*%pi)/6])
%z2 is a declared integer:
(%i3) facts(%z2);
(%o3) [kind(%z2,integer)]
Checking the solution works because Maxima knows that %z2 is an integer
(%i4) subst(first(sol), sin(x)=1/2);
(%o4) 1/2=1/2
The possible arguments to new_variable:
(%i12) new_variable('integer);
(%o12) %z21
(%i13) new_variable('real);
(%o13) %r21
(%i14) new_variable('complex);
(%o14) %c22
(%i15) new_variable('general);
(%o15) %g22
--Barton
-----maxima-bounces at math.utexas.edu wrote: -----
>Short?answer?is?that??g1234?etc?are?so-called?gensyms,
>that?is,?generated?Lisp?symbols.
>
>Looks?like??g1811?is?a?dummy?variable?in?the?Laplace?transform.
>On?the?face?of?it,?it?looks?correct,?but?desolve?could
>pick?a?less?confusing?name.
>
>best
>
>Robert?Dodier
>
>On?3/14/11,?Karl-Dieter?Crisman?<kcrisman at gmail.com>?wrote:
>>?I?know?that?sometimes?in?the?solving?code?(esp.?Barton's?stuff)?we?can
>>?get?temporary?integer?or?real?or?whatever?variables?that?look?like?i3
>>?or?r55.
>>
>>?But?what?the?heck?are?the?g?things?here????This?comes?from?Sage?ticket
>>?http://trac.sagemath.org/sage_trac/ticket/9825
>>
>>
>x1(t)=ilt(-((3*laplace(x2(t)^2,t,?g1811)-x1(0))*?g1811-3)/?g1811^2,?g1811,
>t)
>>
>>?This?comes?from?a?desolve?command,?but?tracking?down?exactly?what?Sage
>>?has?sent?to?Maxima?to?get?this?would?be?tedious.??Needless?to?say,
>>?trying?to?search?the?manuals?for?this?wasn't?so?helpful,?e.g.
>>?http://maxima.sourceforge.net/docs/manual/en/maxima_22.html?has
>>?examples?that?work,?not?ones?that?don't.
>>
>>?But?we'd?be?grateful?for?the?help?so?we?can?properly?parse?Maxima
>>?answers?even?more?accurately.??Thanks!
>>?_______________________________________________
>>?Maxima?mailing?list
>>?Maxima at math.utexas.edu
>>?http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>_______________________________________________
>Maxima?mailing?list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima