1. Introduction
To start up the tool, do "Run CaminoReal". You will see four rows of buttons.
At any point in time, CaminoReal has the concept of a "current structure". You use CaminoReal by building the current structure you want, then reading in elements of that structure and operating on them.
Bug one of the Ints, BigRats, Reals, or Complexes buttons to set the current structure to the corresponding number domain. Each time the current structure is reset, a message appears. For example, if we bug BigRats, we get a message
Global Structure is (Field) BigRats
The format for complex numbers is illustrated by this example: (-38368.0 + 22976.0 i ).
The remaining buttons in the first row are for constructing a new structure that is the ring of polynomials in specified variables, whose coefficients are elements of the current structure. First set the current "variable sequence" (see section on this below), then bug PolyRing. For example, setting variable sequence to (x) produces the message
and if we now bug PolyRing now, we get the message
Global Structure is (Ring) Polynomials in (x) over BigRats
See the section below on IO representation of polynomials for required format for elements of polynomial rings. The PolynomialDiff button is differentiation.
Let's talk now about the last row of buttons. CaminoReal keeps two variables, denoted XXX and YYY. Bugging one of these means you want to read in an element of the current structure, a valid external representation for which is assumed to be the current selection. The remaining buttons in this row are arithmetic ops on XXX and YYY. Binary ops have the semantics XXX ← XXX op YYY, unary ops are XXX ← op XXX. The SetScalar button only has meaning if the current structure is a matrix ring or an extension field. Bugging it then trys to read a valid scalar from the current selection. Having set a scalar, bugging ScalarMult will multiply XXX by it and assign the result to XXX.
You will notice that output is rather one-dimensional. This at least has the virtue that we can support the principle that anything produced as output can subsequently be selected as input.
The second row of buttons is for creating a new structure that is the ring of square matrices of specified size, whose entries are elements of the current structure. First set a (
CARDINAL-valued) matrix size by bugging MatrixSize, then bug MatrixRing to reset the current structure. For example, if current structure is Polynomials in (x) over Complexes, and if we have specified 2 x 2 matrices, then bugging MatrixRing produces the message
Global Structure is (Ring) 2 x 2 Matrices over Polynomials in (x) over Complexes
The following illustrates the external format of such a matrix:
[ [ x $, (1.0 + 1.0 i ) x^12 + (0.0 - 1.0 i ) $] , [ x^3 $, x $] ]
MatrixTranspose, MatrixDeterminant, and MatrixInvert operate on XXX.
The third row of buttons is for extension fields. Let's create the complex numbers as an extension of BigRats. First set current structure to polynomials in i over BigRats:
Global Structure is (Ring) Polynomials in (i) over BigRats
Now set XXX to i^2 + 1:
i^2 + 1 $
Now bug GenAlgNum. This creates the algebraic number i, i.e. the square root of -1. Now bug GenExtField. This creates the algebraic number field Q(I):
Global Structure is (Division Algebra) Extension of BigRats by root of i^2 + 1 $
Now we can enter and manipulate complex numbers, as polynomials in i. For example, if we input the polynomial [ i^7 + 33/16 i^6 - 3 i + 1 ] (note that elements of algebraic number fields are polynomials enclosed in square brackets without a dollar sign), we get:
[ - 4 i - 17/16 ]
which is the canonical representation of this complex number.
Let us create the real algebraic number field Q(sqrt(2)), where sqrt(2) denotes the positive root. We set current structure to polynomials in x over BigRats:
Global Structure is (Ring) Polynomials in (x) over BigRats
Now set XXX to x^2 - 2:
x^2 - 2 $
Now set an isolating interval for the positive square root of two. This is an interval with rational endpoints containing the root we want, for example: ( 9/8, 15/8 ). Now bug RealAlgNum, to create the algebraic number. This produces the printout:
x^2 - 2 $
( 9/8 , 15/8 )
Now bugging RealExtField creates the number field:
Global Structure is (Division Algebra) Extension of BigRats by the unique root of x^2 - 2 $ in ( 9/8 , 15/8 )
3. IO (external) representation of polynomials
Once a variable
sequence is established, a polynomial is written as a sequence of terms in the variables of that list, terminated by a " $" (leave a blank before the $). Order of terms doesn't matter. Multiplication is implicit (whitespace between coefficients and variables). Exponentiation is indicated by either "^" or "**". Order of occurrence of variables in a term doesn't matter (no duplicate monomials allowed, however). For example, with variable
sequence "(x,y,z)", the following is a legal polynomial with BigRat coefficients:
x z^33 - 92837498279872983749734 / 33 y**23 + x y z - 1 $
Error if a variable not in the variable sequence occurs, but not all variables in the list need occur in any given polynomial. Case matters in variables. Order of occurrence of variables in a term doesn't matter.
No simplification currently supported in input.