check for an algebraic function in RootOf or radical notation

Parameters

 expr - expression K - type name; for coefficient domain such as rational or anything V - (optional) name or list or set of names; variable(s)

Description

 • An expression expr is of type radalgfun if it is an expression in the variable(s) V over the domain K extended by (polynomial) RootOfs or radicals.
 • The domain specification K must be a type name, such as rational or anything.  If K is omitted, then it defaults to type constant.
 • The optional argument V is an indeterminate or a list or set of indeterminates.  If V is not specified, then all the indeterminates of expr, which are names, are used.  That is, expr must be an algebraic function in all of its variables.

Examples

 > $\mathrm{type}\left(\frac{x}{1-x},\mathrm{radalgfun}\left(\mathrm{rational},x\right)\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\frac{\sqrt{x}}{1-\mathrm{RootOf}\left({z}^{3}+z+x,z\right)},\mathrm{radalgfun}\left(\mathrm{rational},x\right)\right)$
 ${\mathrm{true}}$ (2)
 > $f≔1+2\mathrm{RootOf}\left({x}^{3}-2+\sqrt{y},x\right)+yz$
 ${f}{≔}{1}{+}{2}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{2}{+}\sqrt{{y}}\right){+}{y}{}{z}$ (3)
 > $\mathrm{type}\left(f,\mathrm{radalgfun}\left(\mathrm{anything}\right)\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{type}\left(f,\mathrm{radalgfun}\left(\mathrm{rational}\right)\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{type}\left(f,\mathrm{radalgfun}\left(\mathrm{rational},y\right)\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{type}\left(f,\mathrm{radalgfun}\left(\mathrm{rational},\left[y,z\right]\right)\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{type}\left(f,\mathrm{algfun}\left(\mathrm{rational},\left[y,z\right]\right)\right)$
 ${\mathrm{false}}$ (8)
 > $g≔{\left(2+\mathrm{RootOf}\left({x}^{5}+x+y,x\right)\right)}^{-\frac{2}{3}}$
 ${g}{≔}\frac{{1}}{{\left({2}{+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{5}}{+}{\mathrm{_Z}}{+}{y}\right)\right)}^{{2}}{{3}}}}$ (9)
 > $\mathrm{type}\left(g,\mathrm{radalgfun}\left(\mathrm{rational},y\right)\right)$
 ${\mathrm{true}}$ (10)
 > $\mathrm{type}\left(g,\mathrm{algfun}\left(\mathrm{rational},y\right)\right)$
 ${\mathrm{false}}$ (11)
 > $\mathrm{type}\left(g,\mathrm{radfun}\left(\mathrm{rational},y\right)\right)$
 ${\mathrm{false}}$ (12)