Dynamic constructible closure is an Axiom constructor (i.e. a
domain-producing function) that provides parameters. It needs a
ground field
, which can be any field and produces a new
Field with additional operations. If
is a subfield of complex
numbers, the domain deals with complex parameters, that is parameters
that take a complex number as their value.
Figure 1: Three basic trees.
In Axiom, one builds the dynamic constructible closure of a field
in
the following way:
CL:= DynamicConstructibleClosure(K)
The result is a Field which also provides a function to introduce parameters:
newElement: Symbol -> CL
In addition, there are two functions to impose or forbid values for the introduced parameters, i.e. imposing constraints over the parameters:
areEqual: (CL,CL) -> Boolean
areDifferent: (CL,CL) -> Boolean
The boolean result of these operators says whether a new constraint is
compatible with the previous ones. Constraints over parameters express
the possible values for a parameter. At the moment of their
introduction, they are reduced into a standard form in a recursive
way, which reduces its presentation to the case of a parameter a
over the ground field
. The constraints on a are
in one of the following forms:
with
monic
univariate polynomials of positive degree with coefficients in
and
pairwise coprime (this means that a can take any value different from
any zero of any of the polynomials
)
The main point now is that parameters can take different values, so that it is in general impossible to answer true or false to an equality test over parameters. When both answers are possible, it is essential to distinguish the values of the parameters corresponding to true from the values corresponding to false. This is called a splitting, and it is detected using gcd computations.
RN:= Fraction Integer
CL:= DynamicConstructibleClosure(RN)
M := Matrix(CL)
dynamicRank():NonNegativeInteger ==
a:CL:= newElement('a)
m:M:= [[1,1],[1,a]]
rank m
allCases(dynamicRank)
In the first line we say that our ground field is the rational numbers, in the second we build its constructible closure, CL. CL is a field in Axiom sense, so it makes sense to build matrices over it. Next we write a function with the computation to be done. It starts with the introduction of the necessary parameters and after building the matrix, calls rank over it. Finally we call this function with allCases in order to get the full answer:
[value is 1 in case a = 1,
value is 2 in case a /= 1]
Time: 0.12 sec
We remark that rank is a function from Axiom. This function has no knowledge of dynamic evaluation, and is used without modification.