type/algext - Maple Programming Help

Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/algext

type/algext

check for an algebraic extension

 Calling Sequence type(expr, algext) type(expr, algext(K))

Parameters

 expr - any expression K - (optional) type name for the coefficient domain

Description

 • type(expr, algext) checks for an algebraic extension by determining if expr is a root of a univariate polynomial specified by a RootOf.
 • type(expr, algext(K)) checks whether expr is a RootOf of a univariate polynomial with coefficients in the domain K.  For example, K could be integer, rational, or a more complicated type like polynom(algnum).

Examples

 > $\mathrm{type}\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{2}+5\right),\mathrm{algext}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\mathrm{RootOf}\left(\mathrm{cos}\left(\mathrm{_Z}\right)-\mathrm{_Z}\right),\mathrm{algext}\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{type}\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{2}+5\right),\mathrm{algext}\left(\mathrm{integer}\right)\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-y\right),\mathrm{algext}\left(\mathrm{rational}\right)\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{type}\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-y\right),\mathrm{algext}\left(\mathrm{polynom}\left(\mathrm{ratpoly}\left(\mathrm{integer},y\right)\right)\right)\right)$
 ${\mathrm{true}}$ (5)