4 /* constants and symbols */
21 map('first, map('to_poly, [false, true, %i, %phi, minf, inf]));
22 [[false],[true],[%i],[%phi],[minf],[inf]]$
40 first(elim_allbut(first(to_poly(sqrt(a)= b)),[a,b]));
43 first(elim_allbut(first(to_poly(sqrt(a)= sqrt(b))),[a,b]));
46 first(elim_allbut(first(to_poly(a^(1/3)= b)),[a,b]));
49 first(elim_allbut(first(to_poly(a^(1/42)=b)),[a,b]));
52 first(elim_allbut(first(to_poly(a^(1/4)=b^(1/3))),[a,b]));
57 first(elim_allbut(first(to_poly(abs(a) = b)),[a,b]));
60 first(elim_allbut(first(to_poly(abs(a) = abs(b))),[a,b]));
63 first(elim_allbut(first(to_poly(abs(1-abs(1-abs(a))))),[a]));
74 to_poly((x-1)*(x-2)*(x-3));
75 [[x^3-6*x^2+11*x-6],[],[]]$
77 expand(to_poly((x-1)*(x-sqrt(2))*(x-sqrt(3)),[x]));
78 [[x^3-sqrt(3)*x^2-sqrt(2)*x^2-x^2+sqrt(2)*sqrt(3)*x+sqrt(3)*x+sqrt(2)*x-sqrt(2)*sqrt(3)],[],[]]$
80 first(first(elim_allbut(first(to_poly((x-1)*(x-sqrt(2))*(x-sqrt(3)),[x,1])),[x])));
81 (x^2-3)*(x^3-x^2-2*x+2)$