New algebraic features in Mathematica 5.0

Adam Strzebonski

Abstarct

Algebraic features of Mathematica have been extended in the new version 5.0 in several directions. The exact solving capabilities now include finding solutions of systems of equations and inequalities over specified numeric domains, like Complexes, Reals, and Integers. The systems can contain quantifiers and transcendental functions. Exact global optimization functionality has been improved. Mathematica 5.0 has new functionality for working with assumptions. It can evaluate symbolic expressions making automatic simplifications based on the specifed assumptions. Common assumptions can now be specified for a whole block of Mathematica code. This way one can write code which makes use of external symbolic assumptions. Mathematica 5.0 contains functionality for computation in algebraic number fields. A new format for representing algebraic numbers as elements of a number field has been introduced. It allows for doing fast algebraic number arithmetic within a fixed number field. The new functionality includes also computation of several objects and properties related to algebraic number fields.
I will present the new functionality, show examples, and briefly comment on the algorithms used.

Solving equations and inequalities over specified domains

Mathematica 5.0 contains functions allowing to solve a variety of problems related to finding solutions of (possibly quantified) systems of equations and inequalities with domain restrictions on the variables.

Reduce[system, vars, domain] gives an explicit, parametrized description of the solution set of system over domain.

Reduce[(Subscript[∃ , z])((x^2) + (y^2) < (z^2) && 
            x + y + 2 z == 1), {x, y}, Reals]

Resolve[system, domain] gives a quantifier free, but possibly implicit description of the solution set of system over domain.

Resolve[(Subscript[∃ , z])((x^2) + (y^2) < (z^2) && 
            x + y + 2 z == 1), Reals]

FindInstance[system, vars, domain] gives an instance of vars that makes system True.

FindInstance[(x^2) - 2 (y^2) == 1 && x > (10^6), {x, y}, 
      Integers]

Reduce

The domains currently supported in Reduce are Complexes, Reals, Algebraics, Rationals, Integers, Primes, and integers modulo m (which can be specified using the Modulus option). Here are some of the classes of systems Reduce can solve.

Systems of polynomial equations and inequations in complex variables

Reduce uses Groebner bases here and can solve arbitrary quantified systems.

Reduce[
      (x^2) + (y^2) + (z^2) == 1 && x y z == 1, {x, y, 
        z}]

This gives a condition for a quartic to have all roots equal.

Reduce[(Subscript[∃ , x, (x^4) + a (x^3) + b (x^2) + c x + d == 0])((Subscript[∀ , y, (y^4) + a (y^3) + b (y^2) + c y + d == 0])x == y), {a, b, 
        c, d}]

Systems of polynomial equations and inequalities in real variables

Reduce uses cylindrical algebraic decomposition here and can solve arbitrary quantified systems.

Reduce[
      (x^2) + (y^2) == 1 && (x | y) ∈ Reals, {x, y}]

This gives a condition for a cubic to have a positive root.

Reduce[(Subscript[∃ , x, x > 0])(x^3) + a (x^2) + b x + c == 
          0, {a, b, c}, Reals]

Mixed real and complex polynomial systems

Systems containing real and complex variables can be transformed to systems in real variables by replacing complex variables with their real and imaginary part.

Reduce[(Subscript[∃ , x, x ∈ Reals])(y^4) == x, y]

Without specified domain variables are assumed to be complex, unless they appear in inequalities on the algebraic level, in which case they are assumed to be real.

Reduce[(x^2) + (y^2) < 1, {x, y}]

Domain specification Complexes all variables unrestricted by Element statements are assumed to be Complex.

Reduce[(x^2) + (y^2) < 1, {x, y}, Complexes]

Systems of linear equations and inequalities in integer, real, or complex variables

Reduce uses several algorithms here, depending on the domain of variables and on whether inequalities are present.

Reduce[
      2 x + 3 y - 5 z == 1 && x - 3 y + 4 z == 2, {x, y, 
        z}]

Reduce[2 x + 3 y - 5 z == 1 && x - 3 y + 4 z > 2, {x, y, z}, 
      Reals]

Reduce[
      2 x + 3 y - 5 z == 1 && x - 3 y + 4 z == 2, {x, y, z}, 
      Integers]

Reduce[2 x + 3 y - 5 z == 1 && x - 3 y + 4 z > 2, {x, y, z}, 
      Integers]

Reduce[
      2 x + 3 y - 5 z == 1 && x - 3 y + 4 z == 2, {x, y, z}, 
      Modulus -> 777]

Diophantine equations and inequalities

Polynomial systems in integer variables are not solvable in general (by Matiyasevich's solution of Hilbert's 10th problem), however Reduce has algorithms and heursitics for solving certain classes of such systems.

Systems of linear equations and inequalities

For systems of linear Diophantine equations we get solutions parametrized by new integer parameters.

Reduce[
      x + 2 y + 3 z - 4 t == 5 && -3 x + 5 y - 2 z + t == 
          3 && (x | y | z | t) ∈ Integers, {x, y, z, 
        t}]

For systems of linear Diophantine equations and inequalities we get solutions parametrized by new nonnegative integer parameters.

Reduce[
      2 x - 3 y + 5 z == 1 && 
        3 x - y + z > 7 && (x | y | z) ∈ Integers, {x, y, 
        z}]

Univariate polynomial equations

Reduce can solve sparse univariate equations of degrees to high even for square-free factoring.

f = 
        Expand[(1234 (x^9999999) - 9876 (x^7777777) - 1221) (x - 
                12)];

Reduce[f == 0 && x ∈ Integers, x] // Timing

Exponent[f, x]

f = (x^123456) - 98765 (x^34567) + 212121 (x^777);
biginteger = 
        f /. x -> 1234567890;

Reduce[f == biginteger && x ∈ Integers, x] // 
      Timing

N[biginteger]

Binary quadratic equations

Parabolic type (Δ==0).

Reduce[
      (x^2) + 2 x y + (y^2) - 3 x + 4 y - 7 == 0 && (x | y) ∈ 
          Integers, {x, y}]

Elliptic type (Δ<0).

Reduce[
      (x^2) - x y + (y^2) - 1280292621682670451 == 0 && (x | y) ∈ 
          Integers, {x, y}]

Hyperbolic Pell type (Δ>0 and not a square).

Reduce[
      4 (x^2) - 3 x y - 4 (y^2) - x - y == 4 && (x | y) ∈ 
          Integers, {x, y}]

Reduce[4 (x^2) - 3 x y - 4 (y^2) - x - y == 
            4 && (x | y) ∈ Integers  && 
        0 ≤ x ≤ 10^20 && 
        0 ≤ y ≤ 10^20, {x, y}]

Hyperbolic non-Pell type (Δ>0 and a square).

Reduce[
      5 x + 2 (x^2) - y - 5 x y + 2 (y^2) == 
          7 && (x | y) ∈ Integers, {x, y}]

A reducible equation.

Reduce[
      5 x + 2 (x^2) - y - 5 x y + 2 (y^2) == 
          3 && (x | y) ∈ Integers, {x, y}]

Thue equations

Thue equations are equations of the form f(x, y)==c, where f is an irreducible homogenous form of degree >=3. Any Thue equation has a finite number of solutions.

Reduce[
      (x^3) - 4 x (y^2) + (y^3) == 1 && (x | y) ∈ Integers, {x, 
        y}]

The most difficult part of solving a Thue equation is finding a reasonably small bound on the size of solutions. If such a bound follows from the inequalities supplied to Reduce the equation can be solved much faster.

Reduce[
      (x^7) - 3 x (y^6) + 5 (y^7) == 3061061 && (x | y) ∈ 
          Integers && 0 < y < (10^100), {x, y}]

Sums of squares

Reduce[
      (x^2) + 4 (y^2) + 9 (z^2) + 16 (t^2) == 
          125 && (x | y | z | t) ∈ Integers && 
        x ≥ 0 && y ≥ 0 && z ≥ 0 && 
        t ≥ 0, {x, y, z, t}]

Systems with empty or bounded and small sets of real solutions

Reduce[
      (x^8) + (y^8) + (z^8) < 0 && (x | y | z) ∈ Integers, {x, y, 
        z}]

Reduce[
      (x^2) + 2 (y^4) + 3 (z^8) == 21 && (x | y | z) ∈ 
          Integers, {x, y, z}]

Systems with a finite number of complex solutions

Reduce[x^2 + 2  x y + 3  z^2 == 64 && 
          x - 2  y + z^2 == 12 && 
          2  y + 5 x z == 46 && (x | y | z) ∈ 
          Integers, {x, y, z}]

Systems of equations and inequalities which have no solutions modulo a small prime

Reduce[
      (x^5) - 2 (y^7) + 4 (z^4) + 3 x - 1 == 0 && (x | y | z) ∈ 
          Integers, {x, y, z}]

Systems of equations and inequalities with all variables existentially quantified, which have small solutions

Reduce[(Subscript[∃ , {x, y, z}, (x | y | z) ∈ Integers])((x^11) + 3 x (z^7) - 2 (y^2) + 4 == 0 && x ≥ 0 && 
            (x^2) + (z^2) ≤ y)]

Equations of the form c x==f(y).

Reduce[
      2423425 x == 
          1342455 + 53466 y + 352111 (y^2) + 
            45123344 (y^3) && (x | y) ∈ Integers, {x, 
        y}]

Systems that can be solved by various heuristics based on factoring, divisibility etc.

This equation factors.

Reduce[(x - 2 y + 3 z) ((x^2) - 2 (y^2) - 1) == 0 && 
        x ≥ 0 && 
        y ≥ 0 && (x | y | z) ∈ Integers, {x, y, 
        z}]

Here the nonconstant part of the equation factors.

Reduce[(x - 2 (y^2) - 3 (x^2) y) ((x^2) - 2 (y^2) - x y) == 
          4 && (x | y) ∈ Integers, {x, y}]

To solve this we use a heuristics based on divisibility.

Reduce[-(x^2) + y + x (y^3) == 0 && x > 0 && 
        y > 0 && (x | y) ∈ Integers, {x, y}]

Transcendental systems

Reduce can solve several classes of transcendental systems, using various heuristics in order to reduce the problem to solving algebraic systems and simple transcendental equations and inequalities.

Reduce[Cos[x] == (1/2), x]

Reduce[(3^((x^2) + 2 x - 7)) == (a^2) - 1, x]

Reduce[(E^(5 x)) == 
          (1/(E^(2 x))) + a && (x | a) ∈ Reals, 
      x]

Reduce[1 < Tan[x] < (Sqrt[3]) && x ∈ Reals, x]

Reduce[(E^Sin)[x] == 2, x]

Reduce[Sinh[x] == a && (E^x) == b, x]

Reduce[-1 < Log[x] < 5 && x ∈ Integers, x]

Reduce[(x^2) (2^x) == 3, x]

From L. Bernardin's benchmarks

Reduce[(E^(x + 3 y - 2)) == 7 && 
        (3^(2 x - y + 4)) == 2, {x, y}]

The benchmark gives a 1-parameter solution (without C[1]).

FullSimplify[(E^(x + 3 y - 2)) == 7 && 
          (3^(2 x - y + 4)) == 2 /. 
        ToRules[Drop[%,  1]], %[[1]]]

Reduce[(((x + 1))^(x + a)) == (((x + 1))^3), x, Reals]

The benchmark gives x==0 or x==-1 or x==3-a, no conditions on a, and no last family of solutions.

A combination of transcendental solver and Diophantine solver.

Reduce[(E^((x^2) - 5 (y^2) + 1)) + (x^2) - 5 (y^2) == 
          0 && (x | y) ∈ Integers, {x, y}]

Polynomial equations in integers modulo m

Reduce in principle can solve arbitrary quantified systems of polynomial equations and inequations in integers modulo m, using Groebner bases, and exhaustive search to find solutions of the Groebner basis polynomials with the least number of variables (however there are built in bounds on how large exhaustive search can be attempted).

Reduce[
      (x^2) + (y^2) + (z^2) == 14 && (x^3) - 2 y - (z^2) == 3 && 
        x ≠ y, {x, y, z}, Modulus -> 5]

Reduce[(Subscript[∀ , x, 3 x ≠ 0])((Subscript[∃ , y]) 
                x y == a), Modulus -> 21]

Reduce[(Subscript[∃ , x])((x^2) - 3 (y^2) - 9 x z == 4984359602099 && 
            (z^2) + 5 (y^3) + 7 x y == 1780431462965 && 
            (x^3) - 12 (z^3) - 3 (y^2) + z == 4585397367278), 
      Modulus -> 5072012170009]

Resolve

Resolve can eliminate quantifiers from arbitrary polynomial systems in complex or real variables, using the same methods as Reduce.  If obtaining an implicit quantifier free form of the system is easier than computing explicit solutions (for instance for complex systems, or real systems that can be handled using linear quantifier elimination) Resolve returns the implicit form. Resolve can eliminate quantifiers involving Boolean variables.

Resolve[
      Exists[z,  
        x^2 + y^2 + z^2 == 1  &&  
          x y z == x + y + z]]

Resolve[
      Exists[{x, y}, 
        x^2 + y^2 + z^2 == 1 && x y z == x + y + z], 
      Reals]

Resolve[
      ForAll[a, Exists[b, Implies[a && (b || c),  c && d]]]]

FindInstance

FindInstance gives the requested number (default 1) of different solutions.

FindInstance[(x^2) + (y^2) == 1, {x, y}, Reals, 3]

If the system has less solutions than the requested number, FindInstance gives all solutions.

FindInstance[(x^2) + (y^2) == 1 && x y == 1, {x, y}, 
      5]

FindInstance works for all problems Reduce can fully solve. It may also be able to find instances in some problems Reduce cannot solve, and for some classes of problems finding an instance may be faster than finding the whole solution.

Here finding an instance is much faster than finding the full solution.

FindInstance[
        (x^2) + 2 (y^2) + 3 (z^2) < 4 && 5 (x^3) + 6 y z > 7, {x, y, z}, 
        Reals] // Timing

Reduce[
        (x^2) + 2 (y^2) + 3 (z^2) < 4 && 5 (x^3) + 6 y z > 7, {x, y, z}, 
        Reals];  // Timing

Here we can find an instance, even though Reduce gives only a partially solved answer.

FindInstance[
      (x^7) + 2 (y^7) + 3 (z^7) + 4 (t^7) == 10, {x, y, z, t}, 
      Integers]

Reduce[(x^7) + 2 (y^7) + 3 (z^7) + 4 (t^7) == 10, {x, y, z, t}, 
      Integers]

Exact global optimization

Minimize[{f, constr}, vars] or Minimize[f, constr, vars] find the minimum value of f on the set of values of vars satisfying constraints constr, and a point at which the minimum is attained.

Maximize[{f, constr}, vars] or Maximize[f, constr, vars] find the maximum value of f on the set of values of vars satisfying constraints constr, and a point at which the maximum is attained.

Experimental`Infimum[{f, constr}, vars] or Experimental`Infimum[f, constr, vars] find the infimum of values of f on the set of values of vars satisfying constraints constr.

Experimental`Supermum[{f, constr}, vars] or Experimental`Supremum[f, constr, vars] find the supremum of values of f on the set of values of vars satisfying constraints constr.

Maximize[x - y, (x^2) + (y^2) ≤ 1, {x, y}]

If the supremum or infimum is not attained at any point satisfying the constraints Maximize and Minimize attempt to find a point on the boundary of the constraint set at which it is attained.

Maximize[x - y, (x^2) + (y^2) < 1, {x, y}]

However, such point may not exist, even if the infimum or supremum is finite and the constraint set is closed.

Minimize[x,  
      x y == 1  &&  x ≥ 0,  {x,  y}]

In nonlinear case Minimize uses cylindrical algebraic decomposition, so the number of variables it can handle is very limited. Its advantage is that it can handle problems that are badly conditioned numerically.

Minimize[{((4 (x - y) (x - 1))/(((y - 1))^2)), (y - 
                  1) (z^9) == 1 && z ≥ 100}, {x, y, 
        z}]

NMinimize[{((4 (x - y) (x - 1))/(((y - 1))^2)), (y - 
                  1) (z^9) == 1 && z ≥ 100}, {x, y, 
        z}]

If all we need is the optimum value we can use Infimum and Supremum to find it. In some cases (for instance when all constraints are strict inequalities)  Infimum and Supremum are significantly faster than Minimize and Maximize.

Minimize[{(x^2) - 2 x y + z - 1, 
          (x^2) y < z && x - (z^2) > y + 2 && x + y + z > 1}, {x, y, z}] // 
      Timing

Experimental`Infimum[{(x^2) - 2 x y + z - 1, 
          (x^2) y < z && x - (z^2) > y + 2 && x + y + z > 1}, {x, y, z}] // 
      Timing

The exact optimization functions generally work with polynomial input, however they can handle some transcendental inputs.

Here Maximize is able to decompose the objective function into a composition of a monotonic function and a polynomial.

Maximize[
      Erf[3 ArcTan[(E^ProductLog)[(Sqrt[x + 2  y + 2]) - 2] + 1]^3], (x^2) + (y^2) ≤ 1, {x, y}]

Minimize has additional methods for solving univariate problems.

Minimize[Sin[x], Cos[x] ≥ (1/2), x]

Evaluation with assumptions

$Assumptions is the default value of Assumptions option in functions like Refine, Simplify, Integrate etc.

Refine[expr]  re-evaluate expr using assumptions specified by the value of Assumptions option (default $Assumptions).

Refine[expr, assum] re-evaluate expr using assumptions assum, as well as assumptions specified by the value of Assumptions option (default $Assumptions).

Assuming[assum, code] evaluates code with assum added to $Assumptions.

Refine re-evaluates expressions using additional transformations. The transformations are based on transformations used in the evaluation. If evaluator uses a transformation on constants satisfying certain conditions, then Refine  uses this transformation on symbolic expressions which are assumed to satisfy these conditions.

For positive numeric quantities a and b, Log[(a^b)]  evaluates to b Log[a].

Log[(2^π)]

Refine uses the same rule for symbolic a and b, assumed to be positive.

Refine[Log[(a^b)], a > 0 && b > 0]

Sin[k π]  evaluates to zero for integer k.

Sin[12345 π]

The same rule is used in Refine for symbolic k, assumed to be an integer.

Refine[Sin[k π], k ∈ Integers]

For Boolean valued functions, Refine attempts to deduce the value of the function from the assumptions.

Here Refine proves the inequality (x^2) ≥ 0 using the assumption that x is real.

Refine[(x^2) >= 0, x ∈ Reals]

This shows that, under the given assumptions, BesselJ[(2^n), Log[x]] is real.

Refine[BesselJ[(2^n), Log[x]] ∈ Reals, 
      n ∈ Integers && n >= 0 && x > 0]

Assumptions can be passed to functions within a block of code using Assuming construct. Assuming locally adds the given assumptions to $Assumptions.

Assuming[(x | y | z | n) ∈ Integers && x != 0 && y != 0 && 
        z != 0, {Refine[Cos[2  n Pi]], 
        FullSimplify[(x^n) + (y^n) == (z^n), n > 2]}]

With the default option setting Assumptions:>$Assumptions, Refine uses assumptions from all surrounding Assuming constructs as well as assumptions supplied to Refine as an argument.

e = (Sqrt[x (y^2) (z^4)]);
Assuming[
      x > 0, {{e, Refine[e]}, 
        Assuming[y < 0,  {Refine[e], Refine[e,  z > 0]}]}]

Refine can be used to write Mathematica code designed to work with external assumptions.

Let us define a function which automatically pulls out factors which are positive under the current assumptions.

h[a_?(Refine[# > 0] &) x_] := a h[x]

Without external assumptions, f pulls out positive numeric factors, but when used inside Assuming, f also pulls out symbolic factors which are assumed to be positive.

{h[3 π a (E^b) x y], 
      Assuming[a > 0 && b ∈ Reals, 
        h[3 π a (E^b) x y]]}

Algebraic number fields

Algebraic[f, {(Subscript[c, 0]), ..., (Subscript[c, l])}, k]  represents the algebraic number (Subscript[c, 0])+(Subscript[c, 1])r+(Subscript[c, 2])(r^2)+...+(Subscript[c, l]) (r^l), where r=Root[f, k].

Algebraic objects represent algebraic numbers as elements of a  finite algebraic extension of rationals. Performing arithmetic within a fixed finite extension is much faster then doing arithmetic in the field of all algebraic numbers.

a = Root[#(1^5) - 3 #1 + 1 &, 1]; 
b = (Sqrt[7]); 
c = 2 + 3 I; 
f = ((2 (x^3) + 3 (x^2) y (z^4) - 11 x (y^7) (z^5))/(-3 (z^5) + 12 x y z - 17 x y (z^2)));

Finding the value of f/.{x->a,y->b,z->c} by performing arithmetic operations within the field of all algebraic numbers takes more than an hour.

TimeConstrained[
      Timing[RootReduce[
          f /. {x -> a, y -> b, z -> c}]], 
      3600]

If there are relatively few different algebraic numbers involved and many arithmetic operations to perform, the computation can be done much faster by finding a finite extension of rationals containing all the algebraic numbers involved and performing arithmetic within this extension.

This represents a, b, and c in a common finite extension.

({aa, bb, cc} = ToCommonField[{a, b, c}]) // Timing

Arithmetic operations within a fixed number field are performed automatically

(g = f /. {x -> aa, y -> bb, z -> cc}) // 
      Timing

RootReduce converts a resulting Algebraic object to a Root object.

RootReduce[g] // Timing

Mathematica 5.0 contains functions for computation of various algebraic number field quantities.

IntegralBasis[#(1^7) - 8 &, 1]

Here is the full set of new algebraic number field functions.

Algebraic[f, {(Subscript[c, 0]), ..., (Subscript[c, l])}, k]  represents the algebraic number (Subscript[c, 0])+(Subscript[c, 1])r+(Subscript[c, 2])(r^2)+...+(Subscript[c, l]) (r^l), where r=Root[f, k].
MinimalPolynomial[a] gives the minimal polynomial (over the integers) of the algebraic number a, written as a pure function.
MinimalPolynomial[a,  x] gives the minimal polynomial (over the integers) of the algebraic number a, written as a polynomial in x.
ToNumberFieldElement[a, f, k] writes the algebraic number a as Algebraic[f, coeffs, k], provided a belongs to ℚ(Root[f, k]).
ToCommonField[{(Subscript[a, 1]),..., (Subscript[a, n])}] writes each of the algebraic numbers (Subscript[a, i])as Algebraic[f, (Subscript[coeffs, i]), k], with the same  f and k for all  1 ≤ i ≤ n.
NumberFieldSignature[f], for an irreducible polynomial function f with rational coefficients, gives a pair of integers {s, t}, where s is the number of real roots of f, and t is the number of pairs of complex roots of f.
NumberFieldSignature[a], for an algebraic number a, gives a pair of integers {s, t}, where s is the number of real embeddings of Q(a) and t is the number of pairs of conjugate complex embeddings of ℚ(a).
NumberFieldDiscriminant[f], for an irreducible polynomial function f with rational coefficients, gives the discriminant of the number field generated by a root of f (it does not depend on the choice of root).
NumberFieldDiscriminant[a], for an algebraic number a, gives the discriminant of ℚ(a).
NumberFieldRegulator[f], for an irreducible polynomial function f with rational coefficients, gives the regulator of the number field generated by a root of f (it does not depend on the choice of root).
NumberFieldRegulator[a], for an algebraic number a, gives the regulator of ℚ(a). 
IntegralBasis[f, k], for an irreducible polynomial function f with rational coefficients and an integer 1≤k≤degree(f), gives a list of Algebraic objects forming a basis of the Z-module of algebraic integers in the field ℚ(Root[f, k]).
IntegralBasis[a], for an algebraic number a, gives a list of Algebraic objects forming a basis of the Z-module of algebraic integers in the field ℚ(a).
RootsOfUnity[f, k], for an irreducible polynomial function f with rational coefficients and an integer 1≤k≤degree(f), gives a list of all roots of unity in the field ℚ(Root[f, k]), represented as Algebraic objects.
RootsOfUnity[a], for an algebraic number a, gives a list of all roots of unity in the field ℚ(a), represented as Algebraic objects.
FundamentalUnits[f, k], for an irreducible polynomial function f with rational coefficients and an integer 1≤k≤degree(f), gives a list of fundamental units in the field ℚ(Root[f, k]), represented as Algebraic objects.
FundamentalUnits[a], for an algebraic number a, gives a list of fundamental units in the field ℚ(a), represented as Algebraic objects. 
NormRepresentatives[m, f, k], for a positive integer m, an irreducible polynomial function f with rational coefficients, and an integer 1≤k≤degree(f), gives a list of representatives of classes of elements of norm m in the field ℚ(Root[f, k]) up to multiplication by a unit, represented as Algebraic objects.
NormRepresentatives[m, a], for a positive integer m and an algebraic number a, gives a list of representatives of classes of elements of norm m in the field ℚ(a) up to multiplication by a unit, represented as Algebraic objects.
NumberFieldCharacteristicPolynomial[a] gives the characteristic polynomial of the Algebraic object a , relative to its number field, written as a pure function.
NumberFieldCharacteristicPolynomial[a, x] gives the characteristic polynomial of the Algebraic object a, relative to its number field, written as a polynomial in x.
NumberFieldTrace[a] gives the trace of the Algebraic object a, relative to its number field.
NumberFieldNorm[a] gives the norm of the Algebraic object a, relative to its number field.
AlgebraicNumberTrace[a] gives the trace of the algebraic number a.
AlgebraicNumberNorm[a] gives the norm of the algebraic number a.
AlgebraicNumberDenominator[a] gives the smallest positive integer n such that n a is an algebraic integer.
AlgebraicIntegerQ[a] whether algebraic number a is an algebraic integer.
AlgebraicUnitQ[a] whether algebraic number a is a unit.
RootOfUnityQ[a] whether algebraic number a is a root of unity.