9 Some Examples of Domains and Packages
9.38 KeyedAccessFile
The domain KeyedAccessFile(S) provides files which can be used
as associative tables. Data values are stored in these files and can
be retrieved according to their keys. The keys must be strings so
this type behaves very much like the StringTable(S) domain. The
difference is that keyed access files reside in secondary storage
while string tables are kept in memory. For more information on
table-oriented operations, see the description of Table.
Before a keyed access file can be used, it must first be opened.
A new file can be created by opening it for output.
ey: KeyedAccessFile(Integer) := open("/tmp/editor.year", "output")
Type: KeyedAccessFile Integer
Just as for vectors, tables or lists, values are saved in a keyed access file
by setting elements.
Type: PositiveInteger
Type: PositiveInteger
Type: PositiveInteger
Values are retrieved using application, in any of its syntactic forms.
Type: PositiveInteger
Type: PositiveInteger
Type: PositiveInteger
Attempting to retrieve a non-existent element in this way causes an error.
If it is not known whether a key exists, you should use the
searchsearchKeyedAccessFile operation.
Type: Union(Integer,...)
Type: Union("failed",...)
When an entry is no longer needed, it can be removed from the file.
Type: Union(Integer,...)
The keyskeysKeyedAccessFile operation returns a list of all the
keys for a given file.
Type: List String
The # #KeyedAccessFile operation gives the
number of entries.
Type: PositiveInteger
The table view of keyed access files provides safe operations. That
is, if the Axiom program is terminated between file operations, the
file is left in a consistent, current state. This means, however,
that the operations are somewhat costly. For example, after each
update the file is closed.
Here we add several more items to the file, then check its contents.
KE := Record(key: String, entry: Integer)
|
Type: Domain
Type: KeyedAccessFile Integer
If many items are to be added to a file at the same time, then
it is more efficient to use the writewriteKeyedAccessFile operation.
write!(ey, ["van Hulzen", 1983]$KE)
|
Type: Record(key: String,entry: Integer)
write!(ey, ["Calmet", 1982]$KE)
|
Type: Record(key: String,entry: Integer)
write!(ey, ["Wang", 1981]$KE)
Type: Record(key: String,entry: Integer)
Type: KeyedAccessFile Integer
The readreadKeyedAccessFile operation is also available
from the file view, but it returns elements in a random order. It is
generally clearer and more efficient to use the
keyskeysKeyedAccessFile operation and to extract elements
by key.
|
Type: List String
|
Type: List Integer
)system rm -r /tmp/editor.year
For more information on related topics, see
FileXmpPage ,
TextFileXmpPage , and
LibraryXmpPage .
9.39 LexTriangularPackage
The LexTriangularPackage package constructor provides an
implementation of the lexTriangular algorithm (D. Lazard
``Solving Zero-dimensional Algebraic Systems'', J. of Symbol. Comput.,
1992). This algorithm decomposes a zero-dimensional variety into
zero-sets of regular triangular sets. Thus the input system must have
a finite number of complex solutions. Moreover, this system needs to
be a lexicographical Groebner basis.
This package takes two arguments: the coefficient-ring R of the
polynomials, which must be a GcdDomain and their set of
variables given by ls a List Symbol. The type of the
input polynomials must be NewSparseMultivariatePolynomial(R,V)
where V is OrderedVariableList(ls). The abbreviation for
LexTriangularPackage is LEXTRIPK. The main operations are
lexTriangularlexTriangularLexTriangularPackage and
squareFreeLexTriangularsquareFreeLexTriangularLexTriangularPackage. The
later provide decompositions by means of square-free regular
triangular sets, built with the SREGSET constructor, whereas the
former uses the REGSET constructor. Note that these
constructors also implement another algorithm for solving algebraic
systems by means of regular triangular sets; in that case no
computations of Groebner bases are needed and the input system may
have any dimension (i.e. it may have an infinite number of solutions).
The implementation of the lexTriangular algorithm provided in
the LexTriangularPackage constructor differs from that reported
in ``Computations of gcd over algebraic towers of simple extensions'' by
M. Moreno Maza and R. Rioboo (in proceedings of AAECC11, Paris, 1995).
Indeed, the squareFreeLexTriangularsquareFreeLexTriangularLexTriangularPackage
operation removes all multiplicities of the solutions (i.e. the computed
solutions are pairwise different) and the
lexTriangularlexTriangularLexTriangularPackage operation may keep
some multiplicities; this later operation runs generally faster than
the former.
The interest of the lexTriangular algorithm is due to the
following experimental remark. For some examples, a triangular
decomposition of a zero-dimensional variety can be computed faster via
a lexicographical Groebner basis computation than by using a direct
method (like that of SREGSET and REGSET). This happens
typically when the total degree of the system relies essentially on
its smallest variable (like in the Katsura systems). When this
is not the case, the direct method may give better timings (like in
the Rose system).
Of course, the direct method can also be applied to a lexicographical
Groebner basis. However, the lexTriangular algorithm takes
advantage of the structure of this basis and avoids many unnecessary
computations which are performed by the direct method.
For this purpose of solving algebraic systems with a finite number of
solutions, see also the ZeroDimensionalSolvePackage. It allows
to use both strategies (the lexTriangular algorithm and the direct
method) for computing either the complex or real roots of a system.
Note that the way of understanding triangular decompositions is
detailed in the example of the RegularTriangularSet constructor.
Since the LEXTRIPK package constructor is limited to
zero-dimensional systems, it provides a
zeroDimensional?zeroDimensional?LexTriangularPackage operation to
check whether this requirement holds. There is also a
groebnergroebnerLexTriangularPackage operation to compute the
lexicographical Groebner basis of a set of polynomials with type NewSparseMultivariatePolynomial(R,V). The elimination ordering is
that given by ls (the greatest variable being the first element
of ls). This basis is computed by the FLGM algorithm
(Faugere et al. ``Efficient Computation of Zero-Dimensional Groebner
Bases by Change of Ordering'' , J. of Symbol. Comput., 1993)
implemented in the LinGroebnerPackage package constructor.
Once a lexicographical Groebner basis is computed,
then one can call the operations
lexTriangularlexTriangularLexTriangularPackage
and squareFreeLexTriangularsquareFreeLexTriangularLexTriangularPackage.
Note that these operations admit an optional argument
to produce normalized triangular sets.
There is also a zeroSetSplitzeroSetSplitLexTriangularPackage operation
which does all the job from the input system;
an error is produced if this system is not zero-dimensional.
Let us illustrate the facilities of the LEXTRIPK constructor
by a famous example, the cyclic-6 root system.
Define the coefficient ring.
Type: Domain
Define the list of variables,
ls : List Symbol := [a,b,c,d,e,f]
Type: List Symbol
and make it an ordered set.
|
Type: Domain
Define the polynomial ring.
|
Type: Domain
Define the polynomials.
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
p2: P := a*b*c*d*e +a*b*c*d*f +a*b*c*e*f +a*b*d*e*f +a*c*d*e*f +b*c*d*e*f
|
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
p3: P := a*b*c*d + a*b*c*f + a*b*e*f + a*d*e*f + b*c*d*e + c*d*e*f
|
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
p4: P := a*b*c + a*b*f + a*e*f + b*c*d + c*d*e + d*e*f
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
p5: P := a*b + a*f + b*c + c*d + d*e + e*f
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
p6: P := a + b + c + d + e + f
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
lp := [p1, p2, p3, p4, p5, p6]
|
Type: List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
Now call LEXTRIPK .
lextripack := LEXTRIPK(R,ls)
|
Type: Domain
Compute the lexicographical Groebner basis of the system.
This may take between 5 minutes and one hour, depending on your machine.
lg := groebner(lp)$lextripack
|
Type: List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
Apply lexTriangular to compute a decomposition into regular triangular sets.
This should not take more than 5 seconds.
lexTriangular(lg,false)$lextripack
|
Type: List RegularChain(Integer,[a,b,c,d,e,f])
Note that the first set of the decomposition is normalized (all
initials are integer numbers) but not the second one (normalized
triangular sets are defined in the description of the
NormalizedTriangularSetCategory constructor).
So apply now lexTriangular to produce normalized triangular sets.
lts := lexTriangular(lg,true)$lextripack
|
Type: List RegularChain(Integer,[a,b,c,d,e,f])
We check that all initials are constant.
[ [init(p) for p in (ts :: List(P))] for ts in lts]
|
Type: List List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
Note that each triangular set in lts is a lexicographical
Groebner basis. Recall that a point belongs to the variety associated
with lp if and only if it belongs to that associated with one
triangular set ts in lts.
By running the squareFreeLexTriangularsquareFreeLexTriangularLexTriangularPackage
operation, we retrieve the above decomposition.
squareFreeLexTriangular(lg,true)$lextripack
|
Type: List SquareFreeRegularTriangularSet(Integer,IndexedExponents OrderedVariableList [a,b,c,d,e,f],OrderedVariableList [a,b,c,d,e,f],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f]))
Thus the solutions given by lts are pairwise different.
We count them as follows.
reduce(+,[degree(ts) for ts in lts])
Type: PositiveInteger
We can investigate the triangular decomposition lts by using the
ZeroDimensionalSolvePackage.
This requires to add an extra variable (smaller than the others) as follows.
ls2 : List Symbol := concat(ls,new()$Symbol)
Type: List Symbol
Then we call the package.
zdpack := ZDSOLVE(R,ls,ls2)
|
Type: Domain
We compute a univariate representation of the variety associated with
the input system as follows.
concat [univariateSolve(ts)$zdpack for ts in lts]
|
Type: List Record(complexRoots: SparseUnivariatePolynomial Integer,coordinates: List Polynomial Integer)
Since the univariateSolveunivariateSolveZeroDimensionalSolvePackage
operation may split a regular set, it returns a list. This explains
the use of concatconcatList.
Look at the last item of the result. It consists of two parts. For
any complex root ? of the univariate polynomial in the first
part, we get a tuple of univariate polynomials (in a, ...,
f respectively) by replacing %A by ? in the second part.
Each of these tuples t describes a point of the variety
associated with lp by equaling to zero the polynomials in t.
Note that the way of reading these univariate representations is explained also
in the example illustrating the ZeroDimensionalSolvePackage constructor.
Now, we compute the points of the variety with real coordinates.
concat [realSolve(ts)$zdpack for ts in lts]
|
Type: List List RealClosure Fraction Integer
We obtain 24 points given by lists of elements in the RealClosure
of Fraction of R. In each list, the first value corresponds
to the indeterminate f, the second to e and so on. See
ZeroDimensionalSolvePackage to learn more about the
realSolverealSolveZeroDimensionalSolvePackage operation.
9.40 LazardSetSolvingPackage
The LazardSetSolvingPackage package constructor solves
polynomial systems by means of Lazard triangular sets. However one
condition is relaxed: Regular triangular sets whose saturated ideals
have positive dimension are not necessarily normalized.
The decompositions are computed in two steps. First the algorithm of
Moreno Maza (implemented in the RegularTriangularSet domain
constructor) is called. Then the resulting decompositions are
converted into lists of square-free regular triangular sets and the
redundant components are removed. Moreover, zero-dimensional regular
triangular sets are normalized.
Note that the way of understanding triangular decompositions
is detailed in the example of the RegularTriangularSet
constructor.
The LazardSetSolvingPackage constructor takes six arguments.
The first one, R, is the coefficient ring of the polynomials; it
must belong to the category GcdDomain. The second one, E,
is the exponent monoid of the polynomials; it must belong to the
category OrderedAbelianMonoidSup. the third one, V, is
the ordered set of variables; it must belong to the category OrderedSet. The fourth one is the polynomial ring; it must belong to
the category RecursivePolynomialCategory(R,E,V). The fifth one
is a domain of the category RegularTriangularSetCategory(R,E,V,P)
and the last one is a domain of
the category SquareFreeRegularTriangularSetCategory(R,E,V,P).
The abbreviation for LazardSetSolvingPackage is LAZM3PK.
N.B. For the purpose of solving zero-dimensional algebraic systems,
see also LexTriangularPackage and ZeroDimensionalSolvePackage.
These packages are easier to call than LAZM3PK.
Moreover, the ZeroDimensionalSolvePackage
package provides operations
to compute either the complex roots or the real roots.
We illustrate now the use of the LazardSetSolvingPackage package
constructor with two examples (Butcher and Vermeer).
Define the coefficient ring.
Type: Domain
Define the list of variables,
ls : List Symbol := [b1,x,y,z,t,v,u,w]
Type: List Symbol
and make it an ordered set:
|
Type: Domain
then define the exponent monoid.
|
Type: Domain
Define the polynomial ring.
|
Type: Domain
Let the variables be polynomial.
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
Now call the RegularTriangularSet domain constructor.
|
Type: Domain
Define a polynomial system (the Butcher example).
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
p1 := 2*z*u + 2*y*v + 2*t*w - 2*w**2 - w - 1
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
p2 := 3*z*u**2 + 3*y*v**2 - 3*t*w**2 + 3*w**3 + 3*w**2 - t + 4*w
|
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
p3 := 6*x*z*v - 6*t*w**2 + 6*w**3 - 3*t*w + 6*w**2 - t + 4*w
|
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
p4 := 4*z*u**3+ 4*y*v**3+ 4*t*w**3- 4*w**4 - 6*w**3+ 4*t*w- 10*w**2- w- 1
|
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
p5 := 8*x*z*u*v +8*t*w**3 -8*w**4 +4*t*w**2 -12*w**3 +4*t*w -14*w**2 -3*w -1
|
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
p6 := 12*x*z*v**2+12*t*w**3 -12*w**4 +12*t*w**2 -18*w**3 +8*t*w -14*w**2 -w -1
|
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
p7 := -24*t*w**3 + 24*w**4 - 24*t*w**2 + 36*w**3 - 8*t*w + 26*w**2 + 7*w + 1
|
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
lp := [p0, p1, p2, p3, p4, p5, p6, p7]
|
Type: List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
First of all, let us solve this system in the sense of Lazard by means
of the REGSET constructor:
lts := zeroSetSplit(lp,false)$T
|
Type: List
RegularTriangularSet(Integer,
IndexedExponents OrderedVariableList [b1,x,y,z,t,v,u,w],
OrderedVariableList [b1,x,y,z,t,v,u,w],
NewSparseMultivariatePolynomial(
Integer,OrderedVariableList [b1,x,y,z,t,v,u,w]))
We can get the dimensions of each component
of a decomposition as follows.
[coHeight(ts) for ts in lts]
Type: List NonNegativeInteger
The first five sets have a simple shape. However, the last one, which
has dimension zero, can be simplified by using Lazard triangular sets.
Thus we call the SquareFreeRegularTriangularSet domain constructor,
|
Type: Domain
and set the LAZM3PK package constructor to our situation.
pack := LAZM3PK(R,E,V,P,T,ST)
|
Type: Domain
We are ready to solve the system by means of Lazard triangular sets:
zeroSetSplit(lp,false)$pack
|
Type: List
SquareFreeRegularTriangularSet(Integer,
IndexedExponents OrderedVariableList [b1,x,y,z,t,v,u,w],
OrderedVariableList [b1,x,y,z,t,v,u,w],
NewSparseMultivariatePolynomial(Integer,
OrderedVariableList [b1,x,y,z,t,v,u,w]))
We see the sixth triangular set is nicer now: each one of its
polynomials has a constant initial.
We follow with the Vermeer example. The ordering is the usual one
for this system.
Define the polynomial system.
f0 := (w - v) ** 2 + (u - t) ** 2 - 1
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
f2 := 2 * t * (w - v) + 3 * v ** 2 * (u - t)
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
f3 := (3 * z * v ** 2 - 1) * (2 * z * t - 1)
Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
|
Type: List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [b1,x,y,z,t,v,u,w])
First of all, let us solve this system in the sense of Kalkbrener by
means of the REGSET constructor:
|
Type: List
RegularTriangularSet(Integer,
IndexedExponents OrderedVariableList [b1,x,y,z,t,v,u,w],
OrderedVariableList [b1,x,y,z,t,v,u,w],
NewSparseMultivariatePolynomial(Integer,
OrderedVariableList [b1,x,y,z,t,v,u,w]))
We have obtained one regular chain (i.e. regular triangular set) with
dimension 1. This set is in fact a characterist set of the (radical
of) of the ideal generated by the input system lf. Thus we have
only the generic points of the variety associated with lf
(for the elimination ordering given by ls).
So let us get now a full description of this variety.
Hence, we solve this system in the sense of Lazard by means of the REGSET
constructor:
|
Type: List
RegularTriangularSet(Integer,
IndexedExponents OrderedVariableList [b1,x,y,z,t,v,u,w],
OrderedVariableList [b1,x,y,z,t,v,u,w],
NewSparseMultivariatePolynomial(Integer,
OrderedVariableList [b1,x,y,z,t,v,u,w]))
We retrieve our regular chain of dimension 1 and we get three regular
chains of dimension 0 corresponding to the degenerated cases.
We want now to simplify these zero-dimensional regular chains by using
Lazard triangular sets. Moreover, this will allow us to prove that
the above decomposition has no redundant component. N.B.
Generally, decompositions computed by the REGSET constructor do
not have redundant components. However, to be sure that no redundant
component occurs one needs to use the SREGSET or LAZM3PK
constructors.
So let us solve the input system in the sense of Lazard by means of
the LAZM3PK constructor:
zeroSetSplit(lf,false)$pack
|
Type: List
SquareFreeRegularTriangularSet(Integer,
IndexedExponents OrderedVariableList [b1,x,y,z,t,v,u,w],
OrderedVariableList [b1,x,y,z,t,v,u,w],
NewSparseMultivariatePolynomial(Integer,
OrderedVariableList [b1,x,y,z,t,v,u,w]))
Due to square-free factorization, we obtained now four
zero-dimensional regular chains. Moreover, each of them is normalized
(the initials are constant). Note that these zero-dimensional
components may be investigated further with the
ZeroDimensionalSolvePackage package constructor.
9.41 Library
The Library domain provides a simple way to store Axiom values
in a file. This domain is similar to KeyedAccessFile but fewer
declarations are needed and items of different types can be saved
together in the same file.
To create a library, you supply a file name.
stuff := library "/tmp/Neat.stuff"
Type: Library
Now values can be saved by key in the file.
The keys should be mnemonic, just as the field names are for records.
They can be given either as strings or symbols.
Type: PositiveInteger
Type: Polynomial Integer
Type: String
You obtain the set of available keys using the
keyskeysLibrary operation.
Type: List String
You extract values by giving the desired key in this way.
Type: Polynomial Integer
Type: Polynomial Integer
When the file is no longer needed, you should remove it from the
file system.
)system rm -rf /tmp/Neat.stuff
For more information on related topics, see
FileXmpPage ,
TextFileXmpPage , and
KeyedAccessFileXmpPage .
9.42 LieExponentials
Type: Symbol
Type: Symbol
Declarations of domains
coef := Fraction(Integer)
Type: Domain
group := LieExponentials(Symbol, coef, 3)
|
Type: Domain
lpoly := LiePolynomial(Symbol, coef)
|
Type: Domain
poly := XPBWPolynomial(Symbol, coef)
|
Type: Domain
Calculations
ea := exp(a::lpoly)$group
Type: LieExponentials(Symbol,Fraction Integer,3)
eb := exp(b::lpoly)$group
Type: LieExponentials(Symbol,Fraction Integer,3)
|
Type: LieExponentials(Symbol,Fraction Integer,3)
|
Type: XPBWPolynomial(Symbol,Fraction Integer)
|
Type: LiePolynomial(Symbol,Fraction Integer)
Type: LieExponentials(Symbol,Fraction Integer,3)
Type: LieExponentials(Symbol,Fraction Integer,3)
9.43 LiePolynomial
Declaration of domains
Type: Domain
Lpoly := LiePolynomial(Symbol,RN)
|
Type: Domain
Dpoly := XDPOLY(Symbol,RN)
|
Type: Domain
Lword := LyndonWord Symbol
Type: Domain
Initialisation
Type: Symbol
Type: Symbol
Type: Symbol
Type: LiePolynomial(Symbol,Fraction Integer)
Type: LiePolynomial(Symbol,Fraction Integer)
Type: LiePolynomial(Symbol,Fraction Integer)
Type: LiePolynomial(Symbol,Fraction Integer)
Type: LiePolynomial(Symbol,Fraction Integer)
All the Lyndon words of order 4
liste : List Lword := LyndonWordsList([a,b], 4)
|
Type: List LyndonWord Symbol
r: Lpoly := p + q + 3*LiePoly(liste.4)$Lpoly
Type: LiePolynomial(Symbol,Fraction Integer)
Type: LiePolynomial(Symbol,Fraction Integer)
t:Lpoly := s + 2*LiePoly(liste.3) - 5*LiePoly(liste.5)
|
Type: LiePolynomial(Symbol,Fraction Integer)
Type: PositiveInteger
|
Type: LiePolynomial(Symbol,Fraction Integer)
Jacobi Relation
Jacobi(p: Lpoly, q: Lpoly, r: Lpoly): Lpoly == [ [p,q]$Lpoly, r] + [ [q,r]$Lpoly, p] + [ [r,p]$Lpoly, q]
Function declaration Jacobi : (
LiePolynomial(Symbol, Fraction Integer),
LiePolynomial(Symbol,Fraction Integer),
LiePolynomial(Symbol,Fraction Integer)) ->
LiePolynomial(Symbol,Fraction Integer)
has been added to workspace.
Void
Tests
test: Lpoly := Jacobi(a,b,b)
Type: LiePolynomial(Symbol,Fraction Integer)
test: Lpoly := Jacobi(p,q,r)
Type: LiePolynomial(Symbol,Fraction Integer)
test: Lpoly := Jacobi(r,s,t)
Type: LiePolynomial(Symbol,Fraction Integer)
Evaluation
Type: LiePolynomial(Symbol,Fraction Integer)
eval(p, [a,b], [2*bb, 3*aa])$Lpoly
Type: LiePolynomial(Symbol,Fraction Integer)
Type: LiePolynomial(Symbol,Fraction Integer)
r1: Lpoly := eval(r, [a,b,c], [bb, cc, aa])$Lpoly
Type: LiePolynomial(Symbol,Fraction Integer)
r2: Lpoly := eval(r, [a,b,c], [cc, aa, bb])$Lpoly
Type: LiePolynomial(Symbol,Fraction Integer)
Type: LiePolynomial(Symbol,Fraction Integer)
9.44 LinearOrdinaryDifferentialOperator
LinearOrdinaryDifferentialOperator(A, diff) is the domain of
linear ordinary differential operators with coefficients in a ring
A with a given derivation.
9.44.1 Differential Operators with Series Coefficients
Problem:
Find the first few coefficients of exp(x)/x**i of Dop phi where
Dop := D**3 + G/x**2 * D + H/x**3 - 1
phi := sum(s[i]*exp(x)/x**i, i = 0..)
Solution:
Define the differential.
Dx: LODO(EXPR INT, f +-> D(f, x))
Void
Type:
LinearOrdinaryDifferentialOperator(Expression Integer,theMap NIL)
Now define the differential operator Dop.
Dop:= Dx**3 + G/x**2*Dx + H/x**3 - 1
Type:
LinearOrdinaryDifferentialOperator(Expression Integer,theMap NIL)
Void
phi == reduce(+,[subscript(s,[i])*exp(x)/x**i for i in 0..n])
Void
Void
Void
phi3 == retract(phi2)@(POLY INT)
Void
pans == phi3 ::UP(x,POLY INT)
Void
pans1 == [coefficient(pans, (n+3-i) :: NNI) for i in 2..n+1]
Void
leq == solve(pans1,[subscript(s,[i]) for i in 1..n])
Void
Evaluate this for several values of n.
Compiling body of rule n to compute value of type PositiveInteger
Compiling body of rule phi to compute value of type Expression
Integer
Compiling body of rule phi1 to compute value of type Expression
Integer
Compiling body of rule phi2 to compute value of type Expression
Integer
Compiling body of rule phi3 to compute value of type Polynomial
Integer
Compiling body of rule pans to compute value of type
UnivariatePolynomial(x,Polynomial Integer)
Compiling body of rule pans1 to compute value of type List
Polynomial Integer
Compiling body of rule leq to compute value of type List List
Equation Fraction Polynomial Integer
Compiling function G83347 with type Integer -> Boolean
|
Type: List List Equation Fraction Polynomial Integer
|
Type: List List Equation Fraction Polynomial Integer
Compiled code for n has been cleared.
Compiled code for leq has been cleared.
Compiled code for pans1 has been cleared.
Compiled code for phi2 has been cleared.
Compiled code for phi has been cleared.
Compiled code for phi3 has been cleared.
Compiled code for phi1 has been cleared.
Compiled code for pans has been cleared.
1 old definition(s) deleted for function or rule n
Void
Compiling body of rule n to compute value of type PositiveInteger
+++ |*0;n;1;G82322| redefined
Compiling body of rule phi to compute value of type Expression
Integer
+++ |*0;phi;1;G82322| redefined
Compiling body of rule phi1 to compute value of type Expression
Integer
+++ |*0;phi1;1;G82322| redefined
Compiling body of rule phi2 to compute value of type Expression
Integer
+++ |*0;phi2;1;G82322| redefined
Compiling body of rule phi3 to compute value of type Polynomial
Integer
+++ |*0;phi3;1;G82322| redefined
Compiling body of rule pans to compute value of type
UnivariatePolynomial(x,Polynomial Integer)
+++ |*0;pans;1;G82322| redefined
Compiling body of rule pans1 to compute value of type List
Polynomial Integer
+++ |*0;pans1;1;G82322| redefined
Compiling body of rule leq to compute value of type List List
Equation Fraction Polynomial Integer
+++ |*0;leq;1;G82322| redefined
Type: List List Equation Fraction Polynomial Integer